diff --git a/internal/ui/dist/assets/ConfigExplorer-BB1e3kuF.js b/internal/ui/dist/assets/ConfigExplorer-BB1e3kuF.js deleted file mode 100644 index 003e1d5fb..000000000 --- a/internal/ui/dist/assets/ConfigExplorer-BB1e3kuF.js +++ /dev/null @@ -1,3 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{m as n,n as r,t as i}from"./surface-Ck_FblzE.js";import{_ as a,f as o,i as s,o as c,s as l}from"./form-C1olpQVF.js";import{H as ee,J as u,m as d,v as f}from"./index-DJ8h9zNi.js";import{n as p}from"./SavePreview-BHSS1r5l.js";import{n as m,r as h,t as g}from"./page-CiAVS9qS.js";var _=e(),v=t();function y(e,t){let n=e.split(` -`),r=Math.min(Math.max(t,1),n.length)-1,i=n.slice(0,r).reduce((e,t)=>e+t.length+1,0);return{start:i,end:i+(n[r]?.length??0)}}function b({target:e=null}){let t=a(),[b,te]=(0,_.useState)(null),[x,S]=(0,_.useState)(null),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(``),[j,M]=(0,_.useState)(``),[N,P]=(0,_.useState)(!1),[F,I]=(0,_.useState)(``),[L,R]=(0,_.useState)(!1),[z,B]=(0,_.useState)(!1),V=(0,_.useRef)(null),H=(0,_.useRef)(null),U=(0,_.useRef)(0),W=(0,_.useRef)(!1),G=(0,_.useCallback)(async()=>{try{te(await d.overview())}catch(e){O(n(e))}},[]);(0,_.useEffect)(()=>{G()},[G]),(0,_.useEffect)(()=>{e!==null&&K(e.path)},[e]),(0,_.useEffect)(()=>{W.current||e!==null||b===null||x!==null||b.entry.path!==void 0&&(W.current=!0,K(b.entry.path))},[x,b,e]),(0,_.useEffect)(()=>{if(e===null||H.current===e||x===null||x.file.path!==e.path)return;let n=V.current;if(n===null)return;H.current=e;let r=y(x.contents,e.line);n.focus(),n.setSelectionRange(r.start,r.end),I(t(`explorer.opened`,{path:e.path,line:e.line}))},[x,e,t]);async function K(e){let t=++U.current;B(!0),R(!1),S(null),w(``);try{let n=await d.file(e);if(t!==U.current)return;S(n),w(n.contents),E(null),O(null),M(``),P(!1)}catch(e){if(t!==U.current)return;O(n(e))}finally{t===U.current&&B(!1)}}async function q(){if(!(x===null||x.file.path===void 0||j===``))try{let e=await d.save({kind:`file_rename`,path:x.file.path,base:x.contents,destinationPath:j});E(e.preview),O(null),M(``),await G(),await K(j)}catch(e){E(null),O(n(e))}}async function J(){if(!(x===null||x.file.path===void 0))try{let e=await d.save({kind:`file_delete`,path:x.file.path,base:x.contents});E(e.preview),O(null),P(!1),S(null),w(``),await G()}catch(e){E(null),O(n(e))}}async function Y(){if(k===``)return;let e=k;try{await d.save({kind:`file_raw`,path:e,base:``,raw:`# created by sshc -`}),A(``),O(null),await G(),await K(e)}catch(e){O(n(e))}}async function X(){if(k!==``)try{await d.save({kind:`directory_create`,path:k}),A(``),O(null),await G()}catch(e){O(n(e))}}async function Z(){if(k!==``)try{await d.save({kind:`directory_delete`,path:k}),A(``),O(null),await G()}catch(e){O(n(e))}}async function Q(e){if(x===null||x.file.path===void 0)return;let t={kind:`file_raw`,path:x.file.path,base:x.contents,raw:C};try{if(e===`preview`){E(await d.preview(t)),O(null);return}let n=await d.save(t);E(n.preview),O(null),await G(),await K(t.path)}catch(e){E(null),O(n(e))}}if(b===null)return D===null?(0,v.jsx)(f,{tone:`loading`,title:t(`explorer.loading`)}):(0,v.jsx)(f,{tone:`failed`,title:D.message,...D.detail===void 0?{}:{detail:D.detail},action:(0,v.jsx)(i,{onClick:()=>void G(),children:t(`shell.bootstrapRetry`)})});let ne=x?.file.path??x?.file.absolute??``,$=x!==null&&C!==x.contents,re=b.files.filter(e=>e.editable).length;return(0,v.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,v.jsx)(h,{title:t(`explorer.pageTitle`),description:t(`explorer.pageDescription`)}),(0,v.jsx)(m,{"data-config-metrics":!0,className:`grid-cols-3 divide-x divide-hairline sm:grid-cols-3 lg:grid-cols-3`,children:[[t(`explorer.metricFiles`),b.files.length,!1],[t(`explorer.metricEditable`),re,!1],[t(`explorer.metricDiagnostics`),b.diagnostics.length,b.diagnostics.length>0]].map(([e,t,n])=>(0,v.jsx)(g,{label:String(e),value:t,compact:!0,attention:!!n,className:`min-w-0 flex-col items-start sm:flex-row sm:items-center`},String(e)))}),F===``?null:(0,v.jsx)(`p`,{"aria-live":`polite`,className:l,children:F}),(0,v.jsxs)(r,{"data-config-explorer":!0,radius:`md`,className:`grid min-h-0 grid-cols-1 lg:grid-cols-[19rem_minmax(0,1fr)]`,children:[(0,v.jsxs)(`section`,{"aria-labelledby":`explorer-heading`,className:`flex min-h-0 flex-col bg-tree lg:border-r lg:border-line`,children:[(0,v.jsxs)(`div`,{"data-explorer-header":`tree`,className:`flex min-h-12 items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-2`,children:[(0,v.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,v.jsx)(u,{name:`config`,className:`h-4 w-4 text-ink-muted`}),(0,v.jsx)(`h3`,{id:`explorer-heading`,className:`${o} hidden lg:block`,children:t(`explorer.hierarchy`)}),(0,v.jsxs)(`button`,{type:`button`,"aria-expanded":L,"aria-controls":`config-hierarchy`,onClick:()=>R(e=>!e),className:`flex items-center gap-2 text-left text-sm font-semibold text-ink lg:hidden`,children:[t(`explorer.hierarchy`),(0,v.jsx)(`span`,{"aria-hidden":`true`,children:L?`▾`:`▸`})]})]}),(0,v.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:b.files.length})]}),(0,v.jsxs)(`div`,{id:`config-hierarchy`,className:`${L?`flex`:`hidden`} min-h-0 flex-1 flex-col lg:flex`,children:[(0,v.jsx)(`ul`,{className:`flex max-h-96 flex-col gap-0.5 overflow-y-auto p-2 lg:max-h-none lg:flex-1`,children:b.files.map(e=>{let n=(e.file.path??e.file.absolute)===ne,r=t(`explorer.fileState`,{missing:e.missing===!0?t(`explorer.missing`):``,loads:e.loads>1?t(`explorer.readTimes`,{count:e.loads}):``,editable:e.editable?t(`explorer.editable`):t(`explorer.readOnly`)});return(0,v.jsx)(`li`,{className:`rounded-lg ${n?`bg-select-fill`:`hover:bg-surface-subtle`}`,children:(0,v.jsxs)(`div`,{className:`flex items-start gap-2.5 px-2.5 py-2`,children:[(0,v.jsx)(`span`,{"data-config-node-icon":!0,"aria-hidden":`true`,className:`mt-5 shrink-0 md:mt-2.5 [@media(pointer:coarse)]:mt-[1.375rem] ${n?`text-accent`:`text-ink-faint`}`,children:(0,v.jsx)(u,{name:`config`,className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.file.path===void 0?(0,v.jsxs)(`p`,{className:`text-sm text-ink-muted`,children:[(0,v.jsx)(`span`,{className:`block break-all font-mono text-xs`,children:e.file.absolute}),(0,v.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-notice-ink`,children:t(`explorer.externalFile`)})]}):(0,v.jsx)(`button`,{type:`button`,"aria-current":n?`true`:`false`,onClick:()=>void K(e.file.path??``),className:`block min-h-10 w-full truncate text-left font-mono text-sm md:min-h-0 ${n?`font-semibold text-ink`:`text-ink-muted hover:text-ink`}`,children:e.file.path}),(0,v.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-faint`,children:r}),(e.includes??[]).map(n=>(0,v.jsxs)(`div`,{className:`mt-2 min-w-0 overflow-hidden rounded-md bg-surface-subtle px-2 py-1.5 text-xs text-ink-muted`,children:[(0,v.jsx)(`span`,{className:`block break-all font-mono leading-5`,children:n.pattern}),n.condition===void 0?null:(0,v.jsx)(`span`,{className:`mt-0.5 block break-words leading-5 text-notice-ink`,children:t(`explorer.insideCondition`,{condition:n.condition})}),(0,v.jsx)(`ul`,{className:`mt-1`,children:(n.matches??[]).map(e=>(0,v.jsx)(`li`,{className:`truncate font-mono text-ink-faint`,title:e.path??e.absolute,children:`→ ${e.path??e.absolute}`},e.absolute))})]},`${e.file.absolute}:${n.line}:${n.pattern}`))]})]})},e.file.absolute)})}),(0,v.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line bg-toolbar p-3`,children:[(0,v.jsx)(`h3`,{className:o,children:t(`explorer.workspaceActions`)}),(0,v.jsx)(`label`,{htmlFor:`new-file-path`,className:c,children:t(`explorer.newFilePath`)}),(0,v.jsx)(`input`,{id:`new-file-path`,value:k,onChange:e=>A(e.target.value),placeholder:`conf.d/30-lab.conf`,className:`${s} min-h-10 font-mono text-xs md:min-h-0`}),(0,v.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,v.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void Y(),disabled:k===``,children:t(`explorer.createFile`)}),(0,v.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void X(),disabled:k===``,children:t(`explorer.createDirectory`)}),(0,v.jsx)(i,{kind:`danger`,className:`min-h-10 md:min-h-0`,onClick:()=>void Z(),disabled:k===``,children:t(`explorer.deleteDirectory`)})]}),(0,v.jsx)(`p`,{className:l,children:t(`explorer.newFileNote`)}),(0,v.jsxs)(`details`,{className:`text-xs text-ink-muted`,children:[(0,v.jsx)(`summary`,{className:`cursor-pointer text-ink`,children:t(`explorer.directoryHelp`)}),(0,v.jsx)(`p`,{className:`mt-2 leading-5`,children:t(`explorer.directoryNote`)})]})]}),(0,v.jsxs)(`div`,{className:`border-t border-line p-3 ${b.diagnostics.length>0?`bg-notice`:`bg-toolbar`}`,children:[(0,v.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,v.jsx)(`h3`,{className:o,children:t(`explorer.diagnostics`)}),(0,v.jsx)(`span`,{className:`font-mono text-xs ${b.diagnostics.length>0?`text-notice-ink`:`text-ink-faint`}`,children:b.diagnostics.length})]}),b.diagnostics.length===0?(0,v.jsx)(`p`,{className:l,children:t(`explorer.noIncludeProblem`)}):(0,v.jsx)(`ul`,{className:`flex flex-col gap-1`,children:b.diagnostics.map((e,t)=>(0,v.jsx)(`li`,{className:`font-mono text-xs ${e.severity===`error`?`text-danger`:e.severity===`warning`?`text-notice-ink`:`text-ink-muted`}`,children:`${e.code} ${e.path??e.absolute??``}${e.line===void 0?``:`:${e.line}`} ${e.detail??``}`},`${e.code}-${t}`))})]})]})]}),(0,v.jsx)(`section`,{"aria-busy":z,className:`flex min-w-0 flex-col border-t border-line lg:border-t-0`,children:z?(0,v.jsx)(f,{tone:`loading`,title:t(`explorer.loading`),className:`min-h-48 flex-1`}):x===null?(0,v.jsx)(f,{tone:`empty`,title:t(`explorer.emptyHeading`),detail:t(`explorer.selectFile`),className:`min-h-96 flex-1 bg-surface-subtle`,icon:(0,v.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-md bg-surface text-ink-faint`,children:(0,v.jsx)(u,{name:`config`,className:`h-6 w-6`})})}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,v.jsxs)(`div`,{"data-explorer-header":`file`,className:`flex min-h-12 flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-2`,children:[(0,v.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full ${$?`bg-notice-ink`:x.editable?`bg-live`:`bg-ink-faint`}`}),(0,v.jsx)(`span`,{className:`truncate font-mono text-sm font-semibold text-ink`,children:x.file.path??x.file.absolute})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`rounded bg-surface px-2 py-0.5 text-xs text-ink-muted`,children:x.editable?t(`explorer.editable`):t(`explorer.readOnly`)}),$?(0,v.jsx)(`span`,{className:`rounded bg-notice px-2 py-0.5 text-xs font-medium text-notice-ink`,children:t(`explorer.unsaved`)}):null]})]}),(0,v.jsx)(`label`,{htmlFor:`file-raw`,className:`sr-only`,children:t(`explorer.fileText`,{path:x.file.path??x.file.absolute})}),(0,v.jsx)(`textarea`,{id:`file-raw`,ref:V,value:C,onChange:e=>w(e.target.value),rows:24,spellCheck:!1,disabled:!x.editable,className:`min-h-96 w-full flex-1 resize-y border-0 bg-control p-4 font-mono text-xs leading-6 text-ink focus:outline-none focus:ring-2 focus:ring-inset focus:ring-accent disabled:bg-surface-subtle disabled:text-ink-faint`}),(0,v.jsxs)(`div`,{className:`sticky bottom-0 z-10 flex flex-wrap items-center justify-end gap-2 border-t border-line bg-toolbar px-4 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3 md:static md:z-auto md:py-3`,children:[(0,v.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void Q(`preview`),children:t(`explorer.preview`)}),(0,v.jsx)(i,{kind:`primary`,className:`min-h-10 md:min-h-0`,onClick:()=>void Q(`save`),disabled:!x.editable,children:t(`explorer.saveFile`)})]})]}),x.file.path===void 0||!x.editable?null:(0,v.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line bg-surface-subtle p-4`,children:[(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`h4`,{className:o,children:t(`explorer.fileOperations`)}),(0,v.jsx)(`p`,{className:`mt-1 ${l}`,children:t(`explorer.fileOperationsNote`)})]}),(0,v.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-end justify-end gap-2 sm:flex-nowrap`,children:[(0,v.jsx)(`label`,{htmlFor:`rename-file-path`,className:`sr-only`,children:t(`explorer.renameTo`)}),(0,v.jsx)(`input`,{id:`rename-file-path`,value:j,onChange:e=>M(e.target.value),placeholder:x.file.path,className:`${s} min-h-10 min-w-48 max-w-sm font-mono text-xs md:min-h-0`}),(0,v.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void q(),disabled:j===``||j===x.file.path||$,children:t(`explorer.renameFile`)}),(0,v.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>P(!0),disabled:$,children:t(`explorer.deleteFile`)})]})]}),(0,v.jsx)(`p`,{className:l,children:t($?`explorer.saveOrDiscardFirst`:`explorer.deleteIsRecoverable`)})]})]})})]}),(0,v.jsx)(p,{preview:T,conflict:D?.conflict??null,problem:D}),N&&x?.file.path!==void 0?(0,v.jsx)(ee,{id:`config-file-delete-heading`,heading:t(`explorer.deleteFile`),body:(0,v.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm text-ink-muted`,children:[(0,v.jsx)(`p`,{className:`break-all font-mono`,children:x.file.path}),(0,v.jsx)(`p`,{children:t(`explorer.deleteIsRecoverable`)})]}),confirmLabel:t(`explorer.confirmDelete`),cancelLabel:t(`explorer.cancelDelete`),onConfirm:()=>void J(),onCancel:()=>P(!1)}):null]})}export{b as ConfigExplorer}; \ No newline at end of file diff --git a/internal/ui/dist/assets/ConfigExplorer-D0QKY4pL.js b/internal/ui/dist/assets/ConfigExplorer-D0QKY4pL.js new file mode 100644 index 000000000..ab20d699d --- /dev/null +++ b/internal/ui/dist/assets/ConfigExplorer-D0QKY4pL.js @@ -0,0 +1,3 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{g as n,n as r,t as i}from"./surface-DPFJ-mE2.js";import{_ as ee,f as a,i as o,o as te,s}from"./form-zbLY2cuV.js";import{$ as c,_ as l,q as u,x as d}from"./index-DtC-pXtZ.js";import{n as f}from"./SavePreview-BkzRFZRF.js";import{n as p,r as m,t as h}from"./page-BaebBDRI.js";var g=e(),_=t();function v(e,t){let n=e.split(` +`),r=Math.min(Math.max(t,1),n.length)-1,i=n.slice(0,r).reduce((e,t)=>e+t.length+1,0);return{start:i,end:i+(n[r]?.length??0)}}function y({target:e=null}){let t=ee(),[y,b]=(0,g.useState)(null),[x,S]=(0,g.useState)(null),[C,w]=(0,g.useState)(``),[T,E]=(0,g.useState)(null),[D,O]=(0,g.useState)(null),[k,A]=(0,g.useState)(``),[j,M]=(0,g.useState)(``),[N,P]=(0,g.useState)(!1),[F,I]=(0,g.useState)(``),[L,R]=(0,g.useState)(!1),[z,B]=(0,g.useState)(!1),V=(0,g.useRef)(null),H=(0,g.useRef)(null),U=(0,g.useRef)(0),W=(0,g.useRef)(!1),G=(0,g.useCallback)(async()=>{try{b(await l.overview())}catch(e){O(n(e))}},[]);(0,g.useEffect)(()=>{G()},[G]),(0,g.useEffect)(()=>{e!==null&&K(e.path)},[e]),(0,g.useEffect)(()=>{W.current||e!==null||y===null||x!==null||y.entry.path!==void 0&&(W.current=!0,K(y.entry.path))},[x,y,e]),(0,g.useEffect)(()=>{if(e===null||H.current===e||x===null||x.file.path!==e.path)return;let n=V.current;if(n===null)return;H.current=e;let r=v(x.contents,e.line);n.focus(),n.setSelectionRange(r.start,r.end),I(t(`explorer.opened`,{path:e.path,line:e.line}))},[x,e,t]);async function K(e){let t=++U.current;B(!0),R(!1),S(null),w(``);try{let n=await l.file(e);if(t!==U.current)return;S(n),w(n.contents),E(null),O(null),M(``),P(!1)}catch(e){if(t!==U.current)return;O(n(e))}finally{t===U.current&&B(!1)}}async function q(){if(!(x===null||x.file.path===void 0||j===``))try{let e=await l.save({kind:`file_rename`,path:x.file.path,base:x.contents,destinationPath:j});E(e.preview),O(null),M(``),await G(),await K(j)}catch(e){E(null),O(n(e))}}async function J(){if(!(x===null||x.file.path===void 0))try{let e=await l.save({kind:`file_delete`,path:x.file.path,base:x.contents});E(e.preview),O(null),P(!1),S(null),w(``),await G()}catch(e){E(null),O(n(e))}}async function Y(){if(k===``)return;let e=k;try{await l.save({kind:`file_raw`,path:e,base:``,raw:`# created by sshc +`}),A(``),O(null),await G(),await K(e)}catch(e){O(n(e))}}async function X(){if(k!==``)try{await l.save({kind:`directory_create`,path:k}),A(``),O(null),await G()}catch(e){O(n(e))}}async function Z(){if(k!==``)try{await l.save({kind:`directory_delete`,path:k}),A(``),O(null),await G()}catch(e){O(n(e))}}async function Q(e){if(x===null||x.file.path===void 0)return;let t={kind:`file_raw`,path:x.file.path,base:x.contents,raw:C};try{if(e===`preview`){E(await l.preview(t)),O(null);return}let n=await l.save(t);E(n.preview),O(null),await G(),await K(t.path)}catch(e){E(null),O(n(e))}}if(y===null)return D===null?(0,_.jsx)(d,{tone:`loading`,title:t(`explorer.loading`)}):(0,_.jsx)(d,{tone:`failed`,title:D.message,...D.detail===void 0?{}:{detail:D.detail},action:(0,_.jsx)(i,{onClick:()=>void G(),children:t(`shell.bootstrapRetry`)})});let ne=x?.file.path??x?.file.absolute??``,$=x!==null&&C!==x.contents,re=y.files.filter(e=>e.editable).length;return(0,_.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,_.jsx)(m,{title:t(`explorer.pageTitle`),description:t(`explorer.pageDescription`)}),(0,_.jsx)(p,{"data-config-metrics":!0,className:`grid-cols-3 divide-x divide-hairline sm:grid-cols-3 lg:grid-cols-3`,children:[[t(`explorer.metricFiles`),y.files.length,!1],[t(`explorer.metricEditable`),re,!1],[t(`explorer.metricDiagnostics`),y.diagnostics.length,y.diagnostics.length>0]].map(([e,t,n])=>(0,_.jsx)(h,{label:String(e),value:t,compact:!0,attention:!!n,className:`min-w-0 flex-col items-start sm:flex-row sm:items-center`},String(e)))}),F===``?null:(0,_.jsx)(`p`,{"aria-live":`polite`,className:s,children:F}),(0,_.jsxs)(r,{"data-config-explorer":!0,radius:`md`,className:`grid min-h-0 grid-cols-1 lg:grid-cols-[19rem_minmax(0,1fr)]`,children:[(0,_.jsxs)(`section`,{"aria-labelledby":`explorer-heading`,className:`flex min-h-0 flex-col bg-tree lg:border-r lg:border-line`,children:[(0,_.jsxs)(`div`,{"data-explorer-header":`tree`,className:`flex min-h-12 items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-2`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(c,{name:`config`,className:`h-4 w-4 text-ink-muted`}),(0,_.jsx)(`h3`,{id:`explorer-heading`,className:`${a} hidden lg:block`,children:t(`explorer.hierarchy`)}),(0,_.jsxs)(`button`,{type:`button`,"aria-expanded":L,"aria-controls":`config-hierarchy`,onClick:()=>R(e=>!e),className:`flex items-center gap-2 text-left text-sm font-semibold text-ink lg:hidden`,children:[t(`explorer.hierarchy`),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:L?`▾`:`▸`})]})]}),(0,_.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:y.files.length})]}),(0,_.jsxs)(`div`,{id:`config-hierarchy`,className:`${L?`flex`:`hidden`} min-h-0 flex-1 flex-col lg:flex`,children:[(0,_.jsx)(`ul`,{className:`flex max-h-96 flex-col gap-0.5 overflow-y-auto p-2 lg:max-h-none lg:flex-1`,children:y.files.map(e=>{let n=(e.file.path??e.file.absolute)===ne,r=t(`explorer.fileState`,{missing:e.missing===!0?t(`explorer.missing`):``,loads:e.loads>1?t(`explorer.readTimes`,{count:e.loads}):``,editable:e.editable?t(`explorer.editable`):t(`explorer.readOnly`)});return(0,_.jsx)(`li`,{className:`rounded-lg ${n?`bg-select-fill`:`hover:bg-surface-subtle`}`,children:(0,_.jsxs)(`div`,{className:`flex items-start gap-2.5 px-2.5 py-2`,children:[(0,_.jsx)(`span`,{"data-config-node-icon":!0,"aria-hidden":`true`,className:`mt-5 shrink-0 md:mt-2.5 [@media(pointer:coarse)]:mt-[1.375rem] ${n?`text-accent`:`text-ink-faint`}`,children:(0,_.jsx)(c,{name:`config`,className:`h-4 w-4`})}),(0,_.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.file.path===void 0?(0,_.jsxs)(`p`,{className:`text-sm text-ink-muted`,children:[(0,_.jsx)(`span`,{className:`block break-all font-mono text-xs`,children:e.file.absolute}),(0,_.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-notice-ink`,children:t(`explorer.externalFile`)})]}):(0,_.jsx)(`button`,{type:`button`,"aria-current":n?`true`:`false`,onClick:()=>void K(e.file.path??``),className:`block min-h-10 w-full truncate text-left font-mono text-sm md:min-h-0 ${n?`font-semibold text-ink`:`text-ink-muted hover:text-ink`}`,children:e.file.path}),(0,_.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-faint`,children:r}),(e.includes??[]).map(n=>(0,_.jsxs)(`div`,{className:`mt-2 min-w-0 overflow-hidden rounded-md bg-surface-subtle px-2 py-1.5 text-xs text-ink-muted`,children:[(0,_.jsx)(`span`,{className:`block break-all font-mono leading-5`,children:n.pattern}),n.condition===void 0?null:(0,_.jsx)(`span`,{className:`mt-0.5 block break-words leading-5 text-notice-ink`,children:t(`explorer.insideCondition`,{condition:n.condition})}),(0,_.jsx)(`ul`,{className:`mt-1`,children:(n.matches??[]).map(e=>(0,_.jsx)(`li`,{className:`truncate font-mono text-ink-faint`,title:e.path??e.absolute,children:`→ ${e.path??e.absolute}`},e.absolute))})]},`${e.file.absolute}:${n.line}:${n.pattern}`))]})]})},e.file.absolute)})}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line bg-toolbar p-3`,children:[(0,_.jsx)(`h3`,{className:a,children:t(`explorer.workspaceActions`)}),(0,_.jsx)(`label`,{htmlFor:`new-file-path`,className:te,children:t(`explorer.newFilePath`)}),(0,_.jsx)(`input`,{id:`new-file-path`,value:k,onChange:e=>A(e.target.value),placeholder:`conf.d/30-lab.conf`,className:`${o} min-h-10 font-mono text-xs md:min-h-0`}),(0,_.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,_.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void Y(),disabled:k===``,children:t(`explorer.createFile`)}),(0,_.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void X(),disabled:k===``,children:t(`explorer.createDirectory`)}),(0,_.jsx)(i,{kind:`danger`,className:`min-h-10 md:min-h-0`,onClick:()=>void Z(),disabled:k===``,children:t(`explorer.deleteDirectory`)})]}),(0,_.jsx)(`p`,{className:s,children:t(`explorer.newFileNote`)}),(0,_.jsxs)(`details`,{className:`text-xs text-ink-muted`,children:[(0,_.jsx)(`summary`,{className:`cursor-pointer text-ink`,children:t(`explorer.directoryHelp`)}),(0,_.jsx)(`p`,{className:`mt-2 leading-5`,children:t(`explorer.directoryNote`)})]})]}),(0,_.jsxs)(`div`,{className:`border-t border-line p-3 ${y.diagnostics.length>0?`bg-notice`:`bg-toolbar`}`,children:[(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,_.jsx)(`h3`,{className:a,children:t(`explorer.diagnostics`)}),(0,_.jsx)(`span`,{className:`font-mono text-xs ${y.diagnostics.length>0?`text-notice-ink`:`text-ink-faint`}`,children:y.diagnostics.length})]}),y.diagnostics.length===0?(0,_.jsx)(`p`,{className:s,children:t(`explorer.noIncludeProblem`)}):(0,_.jsx)(`ul`,{className:`flex flex-col gap-1`,children:y.diagnostics.map((e,t)=>(0,_.jsx)(`li`,{className:`font-mono text-xs ${e.severity===`error`?`text-danger`:e.severity===`warning`?`text-notice-ink`:`text-ink-muted`}`,children:`${e.code} ${e.path??e.absolute??``}${e.line===void 0?``:`:${e.line}`} ${e.detail??``}`},`${e.code}-${t}`))})]})]})]}),(0,_.jsx)(`section`,{"aria-busy":z,className:`flex min-w-0 flex-col border-t border-line lg:border-t-0`,children:z?(0,_.jsx)(d,{tone:`loading`,title:t(`explorer.loading`),className:`min-h-48 flex-1`}):x===null?(0,_.jsx)(d,{tone:`empty`,title:t(`explorer.emptyHeading`),detail:t(`explorer.selectFile`),className:`min-h-96 flex-1 bg-surface-subtle`,icon:(0,_.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-md bg-surface text-ink-faint`,children:(0,_.jsx)(c,{name:`config`,className:`h-6 w-6`})})}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,_.jsxs)(`div`,{"data-explorer-header":`file`,className:`flex min-h-12 flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-2`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full ${$?`bg-notice-ink`:x.editable?`bg-live`:`bg-ink-faint`}`}),(0,_.jsx)(`span`,{className:`truncate font-mono text-sm font-semibold text-ink`,children:x.file.path??x.file.absolute})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`rounded bg-surface px-2 py-0.5 text-xs text-ink-muted`,children:x.editable?t(`explorer.editable`):t(`explorer.readOnly`)}),$?(0,_.jsx)(`span`,{className:`rounded bg-notice px-2 py-0.5 text-xs font-medium text-notice-ink`,children:t(`explorer.unsaved`)}):null]})]}),(0,_.jsx)(`label`,{htmlFor:`file-raw`,className:`sr-only`,children:t(`explorer.fileText`,{path:x.file.path??x.file.absolute})}),(0,_.jsx)(`textarea`,{id:`file-raw`,ref:V,value:C,onChange:e=>w(e.target.value),rows:24,spellCheck:!1,disabled:!x.editable,className:`min-h-96 w-full flex-1 resize-y border-0 bg-control p-4 font-mono text-xs leading-6 text-ink focus:outline-none focus:ring-2 focus:ring-inset focus:ring-accent disabled:bg-surface-subtle disabled:text-ink-faint`}),(0,_.jsxs)(`div`,{className:`sticky bottom-0 z-10 flex flex-wrap items-center justify-end gap-2 border-t border-line bg-toolbar px-4 pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-3 md:static md:z-auto md:py-3`,children:[(0,_.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void Q(`preview`),children:t(`explorer.preview`)}),(0,_.jsx)(i,{kind:`primary`,className:`min-h-10 md:min-h-0`,onClick:()=>void Q(`save`),disabled:!x.editable,children:t(`explorer.saveFile`)})]})]}),x.file.path===void 0||!x.editable?null:(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line bg-surface-subtle p-4`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h4`,{className:a,children:t(`explorer.fileOperations`)}),(0,_.jsx)(`p`,{className:`mt-1 ${s}`,children:t(`explorer.fileOperationsNote`)})]}),(0,_.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-end justify-end gap-2 sm:flex-nowrap`,children:[(0,_.jsx)(`label`,{htmlFor:`rename-file-path`,className:`sr-only`,children:t(`explorer.renameTo`)}),(0,_.jsx)(`input`,{id:`rename-file-path`,value:j,onChange:e=>M(e.target.value),placeholder:x.file.path,className:`${o} min-h-10 min-w-48 max-w-sm font-mono text-xs md:min-h-0`}),(0,_.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>void q(),disabled:j===``||j===x.file.path||$,children:t(`explorer.renameFile`)}),(0,_.jsx)(i,{className:`min-h-10 md:min-h-0`,onClick:()=>P(!0),disabled:$,children:t(`explorer.deleteFile`)})]})]}),(0,_.jsx)(`p`,{className:s,children:t($?`explorer.saveOrDiscardFirst`:`explorer.deleteIsRecoverable`)})]})]})})]}),(0,_.jsx)(f,{preview:T,conflict:D?.conflict??null,problem:D}),N&&x?.file.path!==void 0?(0,_.jsx)(u,{id:`config-file-delete-heading`,heading:t(`explorer.deleteFile`),body:(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm text-ink-muted`,children:[(0,_.jsx)(`p`,{className:`break-all font-mono`,children:x.file.path}),(0,_.jsx)(`p`,{children:t(`explorer.deleteIsRecoverable`)})]}),confirmLabel:t(`explorer.confirmDelete`),cancelLabel:t(`explorer.cancelDelete`),onConfirm:()=>void J(),onCancel:()=>P(!1)}):null]})}export{y as ConfigExplorer}; \ No newline at end of file diff --git a/internal/ui/dist/assets/ConnectionsPage-BcsnqY3h.js b/internal/ui/dist/assets/ConnectionsPage-BcsnqY3h.js deleted file mode 100644 index 91a915085..000000000 --- a/internal/ui/dist/assets/ConnectionsPage-BcsnqY3h.js +++ /dev/null @@ -1,3 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,i as r,m as i,n as a,r as o,t as s}from"./surface-Ck_FblzE.js";import{_ as c,c as l,f as u,i as d,m as f,n as p,o as m,p as h,s as g,t as _}from"./form-C1olpQVF.js";import{A as v,G as y,H as b,J as x,K as S,L as C,U as w,Z as T,_ as E,d as D,et as O,f as k,h as A,k as j,l as M,m as N,n as P,u as F,v as I}from"./index-DJ8h9zNi.js";import{t as L}from"./diagnostics-Clvm8IB7.js";import{t as R}from"./credentials-Ck0fkrY6.js";import{i as ee,r as z,t as B}from"./rules-Bwt16Wjc.js";import{n as V,t as H}from"./SavePreview-BHSS1r5l.js";import{n as U,t as te}from"./api-DomXbahF.js";import{n as ne,r as re,t as ie}from"./palettes--8RhxKto.js";import{n as W}from"./fonts-CUObG_Dx.js";var G=e(),ae=`application/x-sshc-drag`,K=6,oe=``;function se(e){return e===oe?0:e.split(`/`).length}function ce(e){let t=e.lastIndexOf(`/`);return t<0?e:e.slice(t+1)}function le(e,t){return t===e||t.startsWith(`${e}/`)}function ue(e,t,n){if(e.kind===`connection`)return e.group!==t;if(le(e.name,t))return!1;let r=t===oe?ce(e.name):`${t}/${ce(e.name)}`;return r===e.name||n.includes(r)?!1:se(r)<=K}var q=t();function J(e){return e.identity.alias===``?`Host ${e.patterns.join(` `)}`:e.identity.alias}function de(e,t){let n=t.trim().toLocaleLowerCase();if(n===``)return!0;let r=e.host;return r.identity.alias.toLocaleLowerCase().includes(n)||r.patterns.some(e=>e.toLocaleLowerCase().includes(n))||e.group.toLocaleLowerCase().includes(n)||e.tags.some(e=>e.toLocaleLowerCase().includes(n))||(r.hostName??``).toLocaleLowerCase().includes(n)||(r.user??``).toLocaleLowerCase().includes(n)}function fe(e,t){let n=e;for(;;){let e=n.lastIndexOf(`/`);if(e<0)return``;if(n=n.slice(0,e),t.has(n))return n}}function Y(e,t){return e.group===t||e.group.startsWith(`${t}/`)}function pe(e){if((e.hostName??``)===``)return e.file.path??e.file.absolute;let t=(e.user??``)===``?``:`${e.user}@`,n=(e.port??``)===``||e.port===`22`?``:`:${e.port}`;return`${t}${e.hostName}${n}`}function X(e){return JSON.stringify([e.file.absolute,e.line,e.identity.path,e.identity.alias])}var me=`sshc.connections.groups-width.v1`;function Z({overview:e,selected:t,onSelect:n,onDrop:r,movesDisabled:i=!1}){let a=c(),[o,s]=v(me,144,112,400),l=(0,G.useId)(),[u,f]=(0,G.useState)({kind:`all`}),[p,m]=(0,G.useState)(``),[h,g]=(0,G.useState)(`name`),[_,y]=(0,G.useState)(new Set),[b,S]=(0,G.useState)(null),C=(0,G.useMemo)(()=>e.groups.map(e=>e.name),[e.groups]),w=(0,G.useMemo)(()=>{let t=new Map((e.metadata.hosts??[]).map(e=>[k(e.identity),e])),n=D(e.hosts),r=new Map;return e.hosts.flatMap((e,i)=>{if(e.identity.alias===``)return[];let a=X(e),o=r.get(a)??0;r.set(a,o+1);let s=t.get(k(e.identity));return[{host:e,projectionIdentity:`${a}\u0000${o}`,projectionOrder:i,group:e.group??``,tags:s?.tags??[],colour:s?.colour??``,os:s?.os||s?.detectedOS||``,order:s?.order??0,sourceOrder:i,duplicateAlias:n.has(e.identity.alias)}]})},[e.hosts,e.metadata.hosts]),T=(0,G.useMemo)(()=>{let t=new Set(e.groups.map(e=>e.name)),n=new Map((e.metadata.groups??[]).map(e=>[e.name,e])),r=new Map;e.groups.forEach((e,t)=>{let i=n.get(e.name);r.set(e.name,{name:e.name,label:e.name.slice(e.name.lastIndexOf(`/`)+1),hidden:i?.hidden===!0,order:i?.order??e.order??0,sourceOrder:t,descendantCount:w.filter(t=>Y(t,e.name)).length,children:[]})});let i=[];for(let e of r.values()){let n=fe(e.name,t),a=n===``?void 0:r.get(n);a===void 0?i.push(e):a.children.push(e)}let a=e=>{e.sort((e,t)=>e.order-t.order||e.sourceOrder-t.sourceOrder),e.forEach(e=>a(e.children))};return a(i),i},[w,e.groups,e.metadata.groups]),E=(0,G.useMemo)(()=>{let e=[],t=n=>{n.hidden&&n.descendantCount===0||e.push(n),n.children.forEach(t)};return T.forEach(t),e},[T]),O=(0,G.useMemo)(()=>w.filter(e=>de(e,p)?u.kind===`all`?!0:u.kind===`ungrouped`?e.group===``:Y(e,u.name):!1).sort((e,t)=>h===`name`?J(e.host).localeCompare(J(t.host),`ja`):e.order-t.order||e.sourceOrder-t.sourceOrder),[w,p,u,h]),A=(0,G.useMemo)(()=>{let e=new Map;for(let t of O){let n=e.get(t.group)??[];n.push(t),e.set(t.group,n)}if(u.kind===`ungrouped`)return[{name:``,items:e.get(``)??[]}];let t=new Set(E.map(e=>e.name)),n=E.filter(e=>u.kind===`all`||e.name===u.name||e.name.startsWith(`${u.name}/`)).filter(e=>O.some(t=>Y(t,e.name))).map(t=>({name:t.name,items:e.get(t.name)??[]})),r=[...e.keys()].filter(e=>e!==``&&!t.has(e)).sort((e,t)=>e.localeCompare(t,`ja`));return n.push(...r.map(t=>({name:t,items:e.get(t)??[]}))),u.kind===`all`&&e.has(``)&&n.push({name:``,items:e.get(``)??[]}),n},[E,u,O]),N=u.kind===`all`?`all`:u.kind===`ungrouped`?`ungrouped`:`group:${u.name}`;function P(e){f(e===`all`?{kind:`all`}:e===`ungrouped`?{kind:`ungrouped`}:{kind:`group`,name:e.slice(6)}),S(null)}function F(e,t){i||(e.dataTransfer.setData(ae,JSON.stringify(t)),e.dataTransfer.effectAllowed=`move`,S(t))}function I(e){return!i&&b!==null&&ue(b,e,C)}function L(e){return{onDragOver:t=>{I(e)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`)},onDrop:t=>{b===null||!I(e)||(t.preventDefault(),t.stopPropagation(),r(b,e),S(null))}}}function R(e){return`flex min-h-10 w-auto items-center gap-2 rounded-r-md border-l-2 px-2 py-1.5 text-left text-xs transition-colors md:min-h-0 md:w-full ${e?`border-accent bg-select-fill font-medium text-accent`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`}function ee(e,t=0){if(e.hidden&&e.descendantCount===0)return(0,q.jsx)(G.Fragment,{children:e.children.map(e=>ee(e,t))},e.name);let n=_.has(e.name),r=u.kind===`group`&&u.name===e.name,o={"--sshc-facet-depth":t};return(0,q.jsxs)(`div`,{className:`min-w-max md:min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center rounded-md ${I(e.name)?`bg-select-fill outline outline-1 outline-accent`:``}`,style:o,...L(e.name),children:[e.children.length===0?(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`w-5 shrink-0 md:ms-[calc(var(--sshc-facet-depth)*0.65rem)]`}):(0,q.jsx)(`button`,{type:`button`,"aria-label":a(n?`tree.expand`:`tree.collapse`,{name:e.name}),"aria-expanded":!n,onClick:()=>y(t=>{let n=new Set(t);return n.has(e.name)?n.delete(e.name):n.add(e.name),n}),className:`ms-0 flex size-8 shrink-0 items-center justify-center rounded text-ink-faint hover:text-ink md:ms-[calc(var(--sshc-facet-depth)*0.65rem)] md:size-5`,children:(0,q.jsx)(`span`,{"aria-hidden":`true`,children:n?`▸`:`▾`})}),(0,q.jsxs)(`button`,{type:`button`,"aria-label":e.name,"aria-pressed":r,draggable:!i,onDragStart:t=>F(t,{kind:`group`,name:e.name}),onDragEnd:()=>S(null),onClick:()=>f({kind:`group`,name:e.name}),className:`${R(r)} min-w-0 flex-1 px-1.5`,children:[(0,q.jsx)(x,{name:`groups`,className:`size-4`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),(0,q.jsx)(`span`,{className:`shrink-0 text-[0.68rem] text-ink-faint`,children:e.descendantCount})]})]}),n?null:e.children.map(e=>ee(e,t+1))]},e.name)}function z(){let e=u.kind===`all`,t=u.kind===`ungrouped`,n=w.filter(e=>e.group===``).length;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`button`,{type:`button`,"aria-label":a(`tree.allConnections`),"aria-pressed":e,onClick:()=>f({kind:`all`}),className:R(e),children:[(0,q.jsx)(x,{name:`groups`,className:`size-4`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a(`tree.allConnections`)}),(0,q.jsx)(`span`,{className:`text-[0.68rem] text-ink-faint`,children:w.length})]}),T.map(e=>ee(e)),(0,q.jsx)(`div`,{...L(``),className:I(``)?`rounded-md outline outline-1 outline-accent`:``,children:(0,q.jsxs)(`button`,{type:`button`,"aria-label":a(`tree.ungrouped`),"aria-pressed":t,onClick:()=>f({kind:`ungrouped`}),className:`${R(t)} min-w-max md:min-w-0`,children:[(0,q.jsx)(x,{name:`groups`,className:`size-4`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a(`tree.ungrouped`)}),(0,q.jsx)(`span`,{className:`text-[0.68rem] text-ink-faint`,children:n})]})})]})}function B(e){let r=e.host,o=t?.path===r.identity.path&&t.alias===r.identity.alias,s=`${l}-connection-${e.projectionOrder}`;return(0,q.jsxs)(`li`,{className:`border-b border-hairline last:border-b-0`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":r.identity.alias,"aria-current":o?`true`:void 0,"aria-describedby":s,draggable:!i,onClick:()=>n(r),onDragStart:t=>F(t,{kind:`connection`,path:r.identity.path,alias:r.identity.alias,group:e.group}),onDragEnd:()=>S(null),className:`min-h-14 w-full border-l-[3px] px-3 py-2.5 text-left text-sm transition-colors ${o?`border-accent bg-select-fill text-ink`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`,children:(0,q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,q.jsx)(M,{os:e.os,colour:e.colour,compact:!0}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,q.jsx)(`span`,{className:`truncate ${o?`font-semibold`:`font-medium`}`,children:r.identity.alias}),e.duplicateAlias?(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-notice-ink`,children:`⧉`}):null]}),(0,q.jsx)(`span`,{className:`mt-0.5 block truncate font-mono text-xs leading-4 ${o?`text-ink-muted`:`text-ink-faint`}`,children:pe(r)}),e.tags.length===0?null:(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1 flex flex-wrap gap-1`,children:e.tags.map(e=>(0,q.jsx)(`span`,{className:`rounded bg-toolbar px-1 text-[0.65rem] text-ink-muted`,children:e},e))})]})]})}),(0,q.jsx)(`span`,{id:s,className:`sr-only`,children:[e.duplicateAlias?a(`tree.duplicateAlias`):``,pe(r),r.file.path??r.file.absolute].filter(Boolean).join(`, `)})]},e.projectionIdentity)}function V(e){let t=e.name===``?a(`tree.ungrouped`):e.name;return(0,q.jsxs)(`section`,{"data-connection-group":e.name||`ungrouped`,"aria-label":a(`tree.groupSection`,{name:t,count:e.items.length}),children:[(0,q.jsxs)(`header`,{className:`sticky top-0 z-[1] flex min-h-8 items-center gap-2 border-y border-line bg-tree px-3 py-2 text-[0.68rem] text-ink-muted`,children:[(0,q.jsx)(x,{name:`groups`,className:`size-3.5 shrink-0 text-ink-faint`}),(0,q.jsx)(`h3`,{className:`min-w-0 flex-1 truncate font-medium`,children:t}),(0,q.jsx)(`span`,{className:`shrink-0 font-mono tabular-nums text-ink-faint`,children:e.items.length})]}),e.items.length===0?null:(0,q.jsx)(`ul`,{children:e.items.map(B)})]},e.name||`ungrouped`)}return(0,q.jsxs)(`nav`,{"aria-label":a(`tree.navLabel`),style:{"--groups-width":`${o}px`},className:`grid h-full min-h-0 grid-cols-1 grid-rows-[minmax(0,1fr)] lg:grid-cols-[var(--groups-width)_minmax(0,1fr)] md:grid-rows-1`,children:[(0,q.jsxs)(`aside`,{className:`relative hidden min-h-0 flex-col border-r border-line bg-tree lg:flex`,children:[(0,q.jsx)(`p`,{className:`shrink-0 px-3 pb-1 pt-3 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-ink-faint`,children:a(`tree.byGroups`)}),(0,q.jsx)(`div`,{"data-connection-facets":!0,className:`flex min-h-0 min-w-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto px-3 pb-3`,children:z()}),(0,q.jsx)(j,{label:a(`conn.resizeGroups`),width:o,minimum:112,maximum:400,onWidthChange:s,className:`hidden lg:flex`})]}),(0,q.jsxs)(`section`,{className:`flex min-h-0 flex-col bg-card`,"aria-label":a(`tree.resultsLabel`),children:[(0,q.jsxs)(`header`,{className:`shrink-0 border-b border-line bg-card p-3`,children:[(0,q.jsxs)(`label`,{className:`mb-2 flex min-w-0 items-center gap-2 lg:hidden`,children:[(0,q.jsx)(`span`,{className:`shrink-0 text-xs font-medium text-ink-muted`,children:a(`tree.byGroups`)}),(0,q.jsxs)(`select`,{"aria-label":a(`tree.groupFilter`),value:N,onChange:e=>P(e.currentTarget.value),className:`${d} min-h-10 min-w-0 flex-1 py-2`,children:[(0,q.jsxs)(`option`,{value:`all`,children:[a(`tree.allConnections`),` · `,w.length]}),E.map(e=>(0,q.jsxs)(`option`,{value:`group:${e.name}`,children:[e.name,` · `,e.descendantCount]},e.name)),(0,q.jsxs)(`option`,{value:`ungrouped`,children:[a(`tree.ungrouped`),` · `,w.filter(e=>e.group===``).length]})]})]}),(0,q.jsx)(`div`,{children:(0,q.jsxs)(`label`,{className:`relative block min-w-0`,htmlFor:`connection-filter`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:a(`tree.filter`)}),(0,q.jsx)(x,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint`}),(0,q.jsx)(`input`,{id:`connection-filter`,type:`search`,value:p,onChange:e=>m(e.currentTarget.value),placeholder:a(`tree.filterPlaceholderExpanded`),className:`${d} min-h-10 rounded-lg bg-control py-2 pl-9 pr-3 md:min-h-0`})]})}),(0,q.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-3 text-xs text-ink-faint`,children:[(0,q.jsx)(`span`,{role:`status`,children:a(`tree.resultCount`,{visible:O.length,total:w.length})}),(0,q.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:a(`tree.sortLabel`)}),(0,q.jsxs)(`select`,{value:h,onChange:e=>g(e.currentTarget.value),className:`rounded border-0 bg-transparent py-0.5 text-xs text-ink-muted`,children:[(0,q.jsx)(`option`,{value:`configured`,children:a(`tree.sortConfigured`)}),(0,q.jsx)(`option`,{value:`name`,children:a(`tree.sortName`)})]})]})]}),i?null:(0,q.jsx)(`p`,{className:`sr-only`,children:a(`tree.dragGroupHint`)})]}),O.length===0?(0,q.jsx)(`p`,{role:`status`,className:`p-5 text-sm text-ink-muted`,children:a(`tree.noMatch`)}):(0,q.jsx)(`div`,{"data-connection-results":!0,className:`min-h-0 flex-1 overflow-y-auto`,children:A.map(V)})]})]})}function he({compact:e=!1,overview:t,selection:n,invalidLocation:r,onDismissInvalidLocation:i,onSelect:a,onDrop:o,movesDisabled:l,resizeHandle:u=null}){let d=c();return(0,q.jsxs)(`div`,{className:`relative min-h-0 flex-col border-r border-line bg-tree ${e?``:`md:flex`} ${n===null?`flex`:`hidden`}`,children:[u,(0,q.jsx)(`div`,{className:`min-h-0 flex-1`,children:r?(0,q.jsxs)(`section`,{className:`m-4 flex flex-col gap-2 rounded-lg border border-line bg-card p-3 text-sm`,role:`status`,children:[(0,q.jsx)(`p`,{className:`font-medium`,children:d(`browser.invalidUrl`)}),(0,q.jsx)(s,{className:`min-h-10 self-start md:min-h-0`,onClick:i,children:d(`browser.backToServers`)})]}):(0,q.jsx)(Z,{overview:t,selected:n,onSelect:a,onDrop:o,movesDisabled:l})})]})}function ge({onBackToList:e}){let t=c();return(0,q.jsxs)(`section`,{className:`m-auto flex max-w-sm flex-col items-center rounded-lg bg-tree px-8 py-10 text-center`,role:`status`,children:[(0,q.jsx)(`h2`,{className:`text-lg font-semibold text-ink`,children:t(`conn.missingHeading`)}),(0,q.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-ink-muted`,children:t(`conn.missingHint`)}),(0,q.jsx)(s,{kind:`primary`,className:`mt-4`,onClick:e,children:t(`conn.backToList`)})]})}function _e({preferredKey:e,onBeginCreation:t}){let n=c();return(0,q.jsxs)(`section`,{className:`m-auto flex max-w-sm flex-col items-center rounded-lg bg-tree px-8 py-10 text-center`,role:`status`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`mb-4 flex size-14 items-center justify-center rounded-lg bg-card text-accent shadow-sm`,children:(0,q.jsx)(x,{name:`connections`,className:`size-7`})}),(0,q.jsx)(`h2`,{className:`text-lg font-semibold text-ink`,children:n(e===null?`conn.emptyHeading`:`conn.assignKeyHeading`)}),(0,q.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-ink-muted`,children:e===null?n(`conn.emptyHint`):n(`conn.assignKeyHint`,{path:e.privateRelativePath})}),(0,q.jsx)(s,{kind:`primary`,className:`mt-4`,onClick:t,children:n(`conn.createAnother`)})]})}function ve(e,t){let[n,r]=(0,G.useState)(e===null?null:{path:e.path,alias:e.alias}),[i,a]=(0,G.useState)(t),[o,s]=(0,G.useState)(e?.panel??`Basic`),[c,l]=(0,G.useState)(e?.advanced??`Jump`),[u,d]=(0,G.useState)(!1);return{selection:n,setSelection:r,invalidLocation:i,setInvalidLocation:a,activePanel:o,setActivePanel:s,activeAdvanced:c,setActiveAdvanced:l,missingSelection:u,setMissingSelection:d}}function ye(){let[e,t]=(0,G.useState)(!1),[n,r]=(0,G.useState)(null),[i,a]=(0,G.useState)(null),[o,s]=(0,G.useState)(``);return{editorDirty:e,setEditorDirty:t,preview:n,setPreview:r,problem:i,setProblem:a,localError:o,setLocalError:s}}function be(e){let[t,n]=(0,G.useState)(e),[r,i]=(0,G.useState)(!1),[a,o]=(0,G.useState)(!1);return{creatingConnection:t,setCreatingConnection:n,launching:r,setLaunching:i,managing:a,setManaging:o}}var xe={passwordVault:O.passwordVault,passwordEligibility:O.passwordEligibility,initialiseVault:O.initialiseVault,unlockVault:O.unlockVault,credentials:R.credentials};function Q(e){return`${e.line}-${e.keyword}`}var Se=[{area:`Jump`,label:`host.tabJump`},{area:`Forwards`,label:`conn.portForwarding`},{area:`Directives`,label:`conn.advancedDirectives`},{area:`Raw`,label:`host.tabRaw`}],Ce=Se.map(e=>e.area);function we({detail:e,area:t,onAreaChange:n,onFieldEdits:i,onBlockRaw:u,disabled:f,onDirtyChange:p}){let m=c(),[h,_]=(0,G.useState)({}),[v,y]=(0,G.useState)([]),[b,x]=(0,G.useState)([]),[S,w]=(0,G.useState)(``),[T,E]=(0,G.useState)(``),[D,O]=(0,G.useState)(`local`),[A,j]=(0,G.useState)(``),[M,N]=(0,G.useState)(``),[P,F]=(0,G.useState)(e.form.raw),[I,L]=(0,G.useState)(``);(0,G.useEffect)(()=>{_({}),y([]),x([]),w(``),E(``),O(`local`),j(``),N(``),F(e.form.raw),L(``)},[`${k(e.form.entry.identity)}\u0000${e.file.contents}`]);let R=(0,G.useMemo)(()=>e.form.fields.filter(e=>t===`Directives`?(e.category===`advanced`||e.category===`basic`)&&!Te(e):t===`Forwards`?Te(e):t===`Jump`&&e.category===`jump`),[t,e.form.fields]),z=v.length>0||b.length>0||Object.entries(h).some(([t,n])=>{let r=e.form.fields.find(e=>Q(e)===t);return r!==void 0&&n!==B(r.values)}),V=P!==e.form.raw,H=z||V,U=f||V,te=f||z;(0,G.useEffect)(()=>p(H),[H,p]);let ne=(0,G.useCallback)(()=>{_({}),y([]),x([]),w(``),E(``),O(`local`),j(``),N(``),F(e.form.raw),L(``)},[e.form.raw]);function re(e){return h[Q(e)]??B(e.values)??``}function ie(){let t=[];try{for(let n of e.form.fields){if(v.includes(n.line)){t.push({action:`remove`,line:n.line});continue}let e=h[Q(n)];e===void 0||e===B(n.values)||t.push({action:`set`,line:n.line,values:ee(e)})}t.push(...b)}catch{L(m(`host.unbalancedQuote`));return}t.length!==0&&(L(``),i(t))}function W(){if(S===``){L(m(`host.needsKeyword`));return}try{x([...b,{action:`add`,keyword:S,values:ee(T)}])}catch{L(m(`host.unbalancedQuote`));return}w(``),E(``),L(``)}function ae(){if(!De(A)){L(m(`conn.forwardInvalidPort`));return}if(D===`local`&&!Oe(M)){L(m(`conn.forwardInvalidDestination`));return}x([...b,{action:`add`,keyword:D===`local`?`LocalForward`:`DynamicForward`,values:D===`local`?[A,M]:[A]}]),j(``),N(``),L(``)}return(0,q.jsxs)(`section`,{"aria-label":m(`conn.advancedLabel`),className:`flex flex-col gap-4`,children:[(0,q.jsxs)(`label`,{className:`flex items-center gap-3 md:hidden`,children:[(0,q.jsx)(`span`,{className:`shrink-0 text-xs font-medium text-ink-muted`,children:m(`conn.advancedViewLabel`)}),(0,q.jsx)(`select`,{"aria-label":m(`conn.advancedViews`),value:t,onChange:e=>n(e.currentTarget.value),className:`${d} min-h-11 min-w-0 flex-1 py-2`,children:Se.map(e=>(0,q.jsx)(`option`,{value:e.area,children:m(e.label)},e.area))})]}),(0,q.jsx)(`div`,{role:`tablist`,"aria-label":m(`conn.advancedViews`),className:`hidden border-b border-line md:flex`,children:Se.map((e,r)=>(0,q.jsx)(`button`,{id:`advanced-area-${e.area.toLowerCase()}-tab`,type:`button`,role:`tab`,"aria-selected":t===e.area,"aria-controls":`advanced-settings-panel`,tabIndex:t===e.area?0:-1,onClick:()=>n(e.area),onKeyDown:e=>C(e,r,Ce,n),className:`min-h-10 border-b-2 px-5 py-2 text-sm transition-colors ${t===e.area?`border-accent bg-select-fill font-semibold text-accent`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`,children:m(e.label)},e.area))}),I===``?null:(0,q.jsx)(o,{tone:`danger`,children:I}),(0,q.jsxs)(`div`,{id:`advanced-settings-panel`,role:`tabpanel`,"aria-labelledby":`advanced-area-${t.toLowerCase()}-tab`,children:[(0,q.jsxs)(`div`,{hidden:t===`Raw`,className:`flex flex-col gap-3`,children:[V?(0,q.jsx)(o,{children:m(`conn.advancedRawBlocksFields`)}):null,t===`Forwards`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(o,{children:m(`conn.forwardLoopbackOnly`)}),R.length===0&&b.filter(Ee).length===0?(0,q.jsx)(`p`,{className:g,children:m(`conn.forwardNoneSaved`)}):(0,q.jsxs)(a,{children:[R.map(e=>(0,q.jsx)(r,{label:e.keyword.toLowerCase()===`localforward`?m(`conn.forwardLocal`):m(`conn.forwardDynamic`),stackOnNarrow:!0,action:(0,q.jsx)(s,{className:`px-2 py-1 text-xs`,disabled:U,onClick:()=>y(v.includes(e.line)?v.filter(t=>t!==e.line):[...v,e.line]),children:v.includes(e.line)?m(`host.keep`):m(`host.remove`)}),children:(0,q.jsx)(`input`,{"aria-label":`${e.keyword} ${e.line}`,value:re(e),disabled:U||!e.editable||v.includes(e.line),onChange:t=>_({...h,[Q(e)]:t.target.value}),className:d})},Q(e))),b.filter(Ee).map((e,t)=>(0,q.jsx)(r,{label:e.keyword===`LocalForward`?m(`conn.forwardLocal`):m(`conn.forwardDynamic`),hint:m(`conn.forwardPendingSave`),stackOnNarrow:!0,action:(0,q.jsx)(s,{className:`px-2 py-1 text-xs`,disabled:U,onClick:()=>x(b.filter(t=>t!==e)),children:m(`host.remove`)}),children:(0,q.jsx)(`span`,{className:`w-full truncate font-mono text-sm`,children:(e.values??[]).join(` `)})},`new-forward-${t}`))]}),(0,q.jsxs)(a,{radius:`md`,className:`grid gap-3 p-4 sm:grid-cols-2 sm:items-end 2xl:grid-cols-[10rem_9rem_minmax(12rem,1fr)_auto]`,children:[(0,q.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:[m(`conn.forwardType`),(0,q.jsxs)(`select`,{value:D,disabled:U,onChange:e=>O(e.currentTarget.value),className:d,children:[(0,q.jsx)(`option`,{value:`local`,children:m(`conn.forwardLocal`)}),(0,q.jsx)(`option`,{value:`dynamic`,children:m(`conn.forwardDynamic`)})]})]}),(0,q.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:[m(`conn.forwardListenPort`),(0,q.jsx)(`input`,{inputMode:`numeric`,value:A,disabled:U,onChange:e=>j(e.currentTarget.value),className:d})]}),D===`local`?(0,q.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-ink-muted sm:col-span-2 2xl:col-span-1`,children:[m(`conn.forwardDestination`),(0,q.jsx)(`input`,{"aria-label":m(`conn.forwardDestination`),placeholder:`127.0.0.1:5432`,value:M,disabled:U,onChange:e=>N(e.currentTarget.value),className:d})]}):null,(0,q.jsx)(s,{className:`${l} sm:col-span-2 2xl:col-span-1 ${D===`dynamic`?`2xl:col-start-4`:``}`,disabled:U,onClick:ae,children:m(`conn.forwardAdd`)})]}),(0,q.jsx)(`p`,{className:g,children:m(D===`local`?`conn.forwardDestinationHint`:`conn.forwardDynamicHint`)})]}):R.length===0?(0,q.jsx)(`p`,{className:g,children:m(`conn.advancedNoFields`)}):(0,q.jsx)(a,{children:R.map(e=>(0,q.jsx)(r,{label:e.keyword,warning:[e.dangerous===!0?m(`host.dangerousField`,{keyword:e.keyword}):``,e.duplicate===!0?m(`host.duplicateKeyword`):``].filter(Boolean).join(` `)||void 0,action:(0,q.jsx)(s,{className:`px-2 py-1 text-xs`,disabled:U,onClick:()=>y(v.includes(e.line)?v.filter(t=>t!==e.line):[...v,e.line]),children:v.includes(e.line)?m(`host.keep`):m(`host.remove`)}),children:(0,q.jsx)(`input`,{"aria-label":e.keyword,value:re(e),disabled:U||!e.editable||v.includes(e.line),onChange:t=>_({...h,[Q(e)]:t.target.value}),className:d})},Q(e)))}),(0,q.jsxs)(a,{hidden:t!==`Directives`,radius:`md`,className:`flex flex-col gap-3 p-4`,children:[(0,q.jsx)(`label`,{htmlFor:`new-directive`,className:`text-xs text-ink-muted`,children:m(`host.newDirective`)}),(0,q.jsx)(`input`,{id:`new-directive`,value:S,disabled:U,onChange:e=>w(e.target.value),className:d}),(0,q.jsx)(`label`,{htmlFor:`new-value`,className:`text-xs text-ink-muted`,children:m(`host.newValue`)}),(0,q.jsx)(`input`,{id:`new-value`,value:T,disabled:U,onChange:e=>E(e.target.value),className:d}),(0,q.jsx)(s,{className:l,disabled:U,onClick:W,children:m(`host.addDirective`)})]}),z?(0,q.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-line py-3`,children:[(0,q.jsx)(s,{disabled:!z,onClick:ne,children:m(`conn.discardChanges`)}),(0,q.jsx)(s,{kind:`primary`,disabled:!z||U,onClick:ie,children:m(`host.saveChanges`)})]}):null]}),(0,q.jsxs)(`div`,{hidden:t!==`Raw`,className:`flex flex-col gap-2`,children:[z?(0,q.jsx)(o,{children:m(`conn.advancedFieldsBlockRaw`)}):null,(0,q.jsx)(`label`,{htmlFor:`block-raw`,className:`text-xs text-ink-muted`,children:m(`host.blockText`)}),(0,q.jsx)(`textarea`,{id:`block-raw`,"aria-label":m(`host.blockText`),value:P,disabled:te,onChange:e=>F(e.target.value),rows:16,spellCheck:!1,className:`min-h-80 rounded-lg border border-control-line bg-tree p-4 font-mono text-xs leading-5 text-ink focus:border-accent focus:outline-none`}),V?(0,q.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-line py-3`,children:[(0,q.jsx)(s,{disabled:!V,onClick:ne,children:m(`conn.discardChanges`)}),(0,q.jsx)(s,{kind:`primary`,disabled:!V||te,onClick:()=>u(P),children:m(`host.saveBlock`)})]}):null]})]})]})}function Te(e){let t=e.keyword.toLowerCase();return t===`localforward`||t===`dynamicforward`}function Ee(e){return e.action===`add`&&(e.keyword===`LocalForward`||e.keyword===`DynamicForward`)}function De(e){let t=Number(e);return/^\d+$/.test(e)&&Number.isInteger(t)&&t>0&&t<=65535}function Oe(e){let t=/^\[[^\]]+\]:(\d+)$/.exec(e);if(t!==null)return De(t[1]??``);let n=e.lastIndexOf(`:`);return n<=0||e.slice(0,n).includes(`:`)?!1:De(e.slice(n+1))}function ke({detail:e,alias:t,api:n,disabled:r=!1}){let i=c(),[l,d]=(0,G.useState)(null),[p,m]=(0,G.useState)(!1),[_,v]=(0,G.useState)(``);(0,G.useEffect)(()=>{d(null),v(``),m(!1)},[t,e.file.contents]);async function y(){if(!(p||r)){m(!0),v(``);try{d(await n.effective(t))}catch{v(i(`diag.explainFailed`))}finally{m(!1)}}}return(0,q.jsxs)(`section`,{"aria-label":i(`conn.analysisLabel`),className:`flex flex-col gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{className:u,children:i(`conn.analysisExplained`)}),(0,q.jsx)(`p`,{className:`mt-1 ${g}`,children:i(`conn.analysisExplainedHint`)})]}),(0,q.jsx)(a,{as:`ul`,radius:`md`,children:e.effective.entries.map((e,t)=>(0,q.jsxs)(`li`,{className:`grid gap-1 border-t border-hairline px-4 py-2.5 first:border-t-0 sm:grid-cols-[minmax(0,1fr)_minmax(10rem,0.7fr)] sm:items-baseline`,children:[(0,q.jsx)(`p`,{className:`font-mono text-xs text-ink`,children:`${e.keyword} ${e.values.join(` `)}`}),(0,q.jsx)(`p`,{className:`${g} break-all font-mono sm:text-right`,children:`${e.source.path??e.source.absolute??``}:${e.source.line??0}`})]},`${e.keyword}-${t}`))}),(0,q.jsx)(H,{notices:e.effective.notices??[]})]}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-line pt-5`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{className:u,children:i(`conn.analysisAuthoritative`)}),(0,q.jsx)(`p`,{className:`mt-1 ${g}`,children:i(`conn.analysisAuthoritativeHint`)})]}),(0,q.jsx)(s,{disabled:p||r,onClick:()=>void y(),children:i(p?`conn.analysisRunning`:`conn.analysisRun`)})]}),_===``?null:(0,q.jsx)(o,{tone:`danger`,children:_}),l!==null&&l.executableDirectives.length>0?(0,q.jsxs)(`div`,{className:`rounded border border-notice-line bg-notice p-3 text-sm`,children:[(0,q.jsx)(`h4`,{className:`font-medium text-notice-ink`,children:i(`conn.analysisExecutableHeading`)}),(0,q.jsx)(`p`,{className:g,children:i(`conn.analysisTokenWarning`)}),(0,q.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:l.executableDirectives.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`p`,{className:`text-ink-muted`,children:i(`conn.checksDirectiveAt`,{keyword:e.keyword,path:e.path,line:e.line})}),(0,q.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-xs text-ink`,children:e.command})]},`${e.path}:${e.line}:${e.keyword}`))})]}):null,l!==null&&l.sources.length>0?(0,q.jsx)(a,{radius:`md`,overflow:`x-auto`,className:`px-4 py-2`,children:(0,q.jsxs)(`table`,{"aria-label":i(`conn.analysisSources`),className:`w-full text-sm`,children:[(0,q.jsx)(`thead`,{children:(0,q.jsxs)(`tr`,{className:f,children:[(0,q.jsx)(`th`,{scope:`col`,className:h,children:i(`diag.columnKeyword`)}),(0,q.jsx)(`th`,{scope:`col`,className:h,children:i(`diag.columnValue`)}),(0,q.jsx)(`th`,{scope:`col`,className:h,children:i(`diag.columnWhere`)}),(0,q.jsx)(`th`,{scope:`col`,className:h,children:i(`diag.columnState`)})]})}),(0,q.jsx)(`tbody`,{children:l.sources.map(e=>(0,q.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,q.jsx)(`th`,{scope:`row`,className:`py-1.5 pr-3 text-left font-normal text-ink-muted`,children:e.keyword}),(0,q.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink`,children:e.value}),(0,q.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink-faint`,children:`${e.path}:${e.line}`}),(0,q.jsx)(`td`,{className:`py-1.5 text-ink-faint`,children:i(e.winner?`diag.inEffect`:`diag.superseded`)})]},`${e.path}:${e.line}:${e.keyword}`))})]})}):null]})]})}var Ae={password_authentication_off:`password.blocker.authenticationOff`,alias_not_simple:`password.blocker.aliasNotSimple`,identity_file_configured:`password.blocker.identityFile`,host_key_unknown:`password.warn.hostKeyUnknown`,hostname_unresolved:`password.warn.hostNameUnresolved`};function je(e,t){return t in Ae?e(Ae[t]):t}function Me({draft:e,derived:t,secrets:n,serverPasswordError:r,onEdit:i,onChooseAction:a,onOpenVault:l}){let u=c(),{vault:f,credentials:p,credentialOptionsStatus:m}=n;return t.draftHasExplicitKey?t.passwordCleanup?(0,q.jsx)(`div`,{className:`border-t border-hairline py-3`,children:(0,q.jsx)(o,{children:u(`conn.basicPasswordCleanup`)})}):null:(0,q.jsx)(`div`,{className:`border-t border-hairline py-3`,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:u(`conn.basicStoredPassword`)}),n.loading||m===`loading`?(0,q.jsx)(`p`,{className:g,children:u(`conn.createLoadingOptions`)}):null,m===`failed`?(0,q.jsx)(`p`,{className:g,children:u(`conn.basicCredentialOptionsFailed`)}):null,n.unlocked?(0,q.jsx)(`p`,{className:g,children:p.assigned?p.assignedCredential===``?u(`conn.basicAssignedDedicated`):u(`conn.basicAssignedNamed`,{name:p.assignedCredential}):u(`conn.basicNoPassword`)}):null]}),f!==null&&!f.unlocked?(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-notice-line bg-notice p-3`,children:[(0,q.jsx)(`p`,{className:`text-sm text-notice-ink`,children:u(f.exists?`conn.basicVaultLocked`:`conn.basicVaultMissing`)}),(0,q.jsx)(T,{label:u(`conn.createMasterPassword`),value:e.masterPassword,onChange:e=>i({masterPassword:e})}),f.exists?null:(0,q.jsx)(T,{label:u(`conn.createConfirmMaster`),value:e.masterConfirmation,onChange:e=>i({masterConfirmation:e})}),(0,q.jsx)(s,{kind:`primary`,disabled:n.vaultBusy||!t.canOpenVault,onClick:l,children:u(f.exists?`conn.createUnlockVault`:`conn.createInitialiseVault`)})]}):null,n.unlocked?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:u(`conn.basicPasswordAction`)}),(0,q.jsxs)(`select`,{"aria-label":u(`conn.basicPasswordAction`),value:e.passwordAction,onChange:e=>a(e.target.value),className:d,children:[(0,q.jsx)(`option`,{value:`unchanged`,children:u(`conn.basicPasswordUnchanged`)}),(0,q.jsx)(`option`,{value:`dedicated_password`,children:u(p.assigned?`conn.basicReplaceDedicated`:`conn.createDedicatedPassword`)}),(0,q.jsx)(`option`,{value:`saved_password`,children:u(`conn.createSavedPassword`)}),(0,q.jsx)(`option`,{value:`new_shared_password`,children:u(`conn.createNewSharedPassword`)}),p.assigned?(0,q.jsx)(`option`,{value:`remove`,children:u(`conn.basicRemovePassword`)}):null]})]}),e.passwordAction===`dedicated_password`?(0,q.jsx)(T,{label:u(`conn.createConnectionPassword`),value:e.password,onChange:e=>i({password:e}),hint:u(`conn.basicEmptyPasswordUnchanged`)}):e.passwordAction===`saved_password`?(0,q.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:u(`conn.createChooseSavedPassword`)}),(0,q.jsxs)(`select`,{value:t.savedCredential,onChange:e=>i({savedCredential:e.target.value}),className:d,children:[p.passwords.length===0?(0,q.jsx)(`option`,{value:``,children:u(`conn.createNoSavedPasswords`)}):null,p.passwords.map(e=>(0,q.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}):e.passwordAction===`new_shared_password`?(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:u(`conn.createSavedPasswordName`)}),(0,q.jsx)(`input`,{value:e.newCredential,onChange:e=>i({newCredential:e.target.value}),className:d})]}),(0,q.jsx)(T,{label:u(`conn.createNewPassword`),value:e.newSharedPassword,onChange:e=>i({newSharedPassword:e})})]}):e.passwordAction===`remove`?(0,q.jsx)(_,{label:u(`conn.basicConfirmRemove`),checked:e.confirmRemove,onChange:e=>i({confirmRemove:e}),tone:`danger`}):null,t.passwordBlockers.map((e,t)=>(0,q.jsx)(o,{tone:`danger`,children:je(u,e.code)},`${e.code}-${t}`)),t.passwordWarnings.map((e,t)=>(0,q.jsx)(o,{children:je(u,e.code)},`${e.code}-${t}`)),r===``?null:(0,q.jsx)(o,{tone:`danger`,children:r})]}):null]})})}function Ne(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function Pe(e){return e.form.fields.filter(e=>Ne(e.keyword,`IdentityFile`))}function Fe(e){let t=e.trim();return t!==``&&t.toLocaleLowerCase()!==`none`}function Ie(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function Le(e,t){switch(t){case`HostName`:return e.form.entry.identity.alias;case`User`:return``;case`Port`:return`22`}}function Re(e,t){let n=e.form.fields.filter(e=>Ie(e.keyword,t));if(n.length>1)return{keyword:t,value:n.map(e=>B(e.values)).join(` / `),origin:`complex`,editable:!1};if(n.length===1){let r=n[0];return{keyword:t,value:B(r.values)??``,origin:`direct`,source:e.form.entry.file.path===void 0?{absolute:e.form.entry.file.absolute,line:r.line}:{path:e.form.entry.file.path,line:r.line},editable:r.editable}}let r=e.effective.entries.find(e=>Ie(e.keyword,t));return r===void 0?{keyword:t,value:Le(e,t),origin:`default`,editable:e.form.entry.editable}:{keyword:t,value:B(r.values)??``,origin:`inherited`,source:r.source,editable:e.form.entry.editable}}function $(e,t){let n=Re(e,t);return{state:n,value:n.value,inherit:!1}}var ze=`__custom__`;function Be(e){return`~/.ssh/${e.relativePath}`}function Ve(e,t,n,r){let i=r===null?void 0:t.find(e=>e.id===r.privateKeyId&&e.relativePath===r.privateRelativePath),a=Pe(e).filter(e=>e.values.some(Fe));if(a.length>1)return{keyState:`complex`,customKey:``,initialKey:``,initialSelected:``,preferredAlreadyApplied:!1};if(a.length===1){let e=B(a[0].values)??``,r=t.find(t=>Be(t)===e);return!n||r===void 0?{keyState:`custom`,customKey:e,initialKey:ze,initialSelected:ze,preferredAlreadyApplied:!1}:{keyState:`editable`,customKey:``,initialKey:r.id,initialSelected:i?.id??r.id,preferredAlreadyApplied:i?.id===r.id}}return{keyState:n?`editable`:`loading`,customKey:``,initialKey:``,initialSelected:n?i?.id??``:``,preferredAlreadyApplied:!1}}function He(e,t=``){return{hostName:$(e,`HostName`),user:$(e,`User`),port:$(e,`Port`),selectedKey:t,passwordAction:`unchanged`,password:``,savedCredential:``,newCredential:``,newSharedPassword:``,confirmRemove:!1,totpAction:`unchanged`,savedTOTP:``,keyPassphrase:``,keyPassphraseConfirmation:``,masterPassword:``,masterConfirmation:``}}var Ue={password:``,newSharedPassword:``,masterPassword:``,masterConfirmation:``},We={keyPassphrase:``,keyPassphraseConfirmation:``},Ge={...Ue,...We},Ke={passwordAction:`unchanged`,confirmRemove:!1,newCredential:``};function qe(e,t){if(!(!e.state.editable||e.state.origin===`complex`)){if(e.inherit||t&&e.value===``&&e.state.origin===`direct`)return e.state.origin===`direct`?{action:`inherit`}:void 0;if(e.value!==e.state.value)return{action:`set`,value:e.value}}}function Je(e,t,n,r,i){let{hostName:a,user:o,port:s,selectedKey:c}=t,{keyState:l,initialKey:u}=n,{credentials:d,vault:f,eligibility:p,credentialOptionsStatus:m,keyOptionsStatus:h,privateKeys:g}=r,_=d.passwords.some(e=>e.name===t.savedCredential)?t.savedCredential:d.passwords[0]?.name??``,v=d.totps.some(e=>e.name===t.savedTOTP)?t.savedTOTP:d.totps[0]?.name??``,y=qe(a,!1),b=qe(o,!0),x=s.inherit?s.state.origin===`direct`?{action:`inherit`}:void 0:s.value===s.state.value?void 0:{action:`set`,value:Number(s.value)},S=l!==`editable`||c===u?void 0:c===``?{action:`inherit`}:{action:`set`,keyId:c},C=g.find(e=>e.id===c),w=l===`custom`||l===`complex`||l===`editable`&&c!==``,T=d.assigned&&w,E=y!==void 0||b!==void 0||x!==void 0,D=d.assigned&&!w&&t.passwordAction===`unchanged`&&(E||p?.passwordBinding===`stale`),O=d.assignedTOTP!==``&&t.totpAction===`unchanged`&&(E||p?.totpBinding===`stale`),k=C===void 0?void 0:d.keyPassphrases.find(e=>e.uses.includes(C.relativePath)),A=C!==void 0&&(f?.dedicatedKeyPassphrases??[]).includes(C.relativePath),j=A?`dedicated`:k===void 0?`none`:`named:${k.name}`,M=k===void 0||C===void 0?[]:k.uses.filter(e=>e!==C.relativePath),N=a.inherit?``:a.value===``?i(`conn.createHostRequired`):z(a.value)?``:i(`conn.createHostInvalid`),P=o.value!==``&&/[\s\p{Cc}]/u.test(o.value)?i(`conn.createUserInvalid`):``,F=Number(s.value),I=s.inherit||/^\d+$/.test(s.value)&&F>=1&&F<=65535?``:i(`conn.createPortInvalid`),L=(()=>{if(T)return{kind:`remove`};switch(t.passwordAction){case`dedicated_password`:return t.password===``?{kind:`unchanged`}:{kind:`dedicated_password`,password:t.password};case`saved_password`:return _===``?{kind:`unchanged`}:{kind:`saved_password`,credential:_};case`new_shared_password`:return t.newCredential===``||t.newSharedPassword===``?{kind:`unchanged`}:{kind:`new_shared_password`,credential:t.newCredential,password:t.newSharedPassword};case`remove`:return t.confirmRemove&&d.assigned?{kind:`remove`}:{kind:`unchanged`};case`confirm_route`:return{kind:`confirm_route`};case`unchanged`:return D?{kind:`confirm_route`}:{kind:`unchanged`}}})(),R=C!==void 0&&C.encrypted&&t.keyPassphrase!==``?{kind:`set_dedicated`,keyId:C.id,passphrase:t.keyPassphrase}:{kind:`unchanged`},ee=t.totpAction===`saved_totp`?v===``?{kind:`unchanged`}:{kind:`saved_totp`,credential:v}:t.totpAction===`remove`?{kind:`remove`}:t.totpAction===`confirm_route`||O?{kind:`confirm_route`}:{kind:`unchanged`},B=L.kind!==`unchanged`,V=ee.kind!==`unchanged`,H=t.keyPassphrase!==``||t.keyPassphraseConfirmation!==``,U=!H||t.keyPassphrase!==``&&t.keyPassphrase===t.keyPassphraseConfirmation,te=(p?.blockers??[]).filter(e=>e.code!==`identity_file_configured`),ne=(p?.warnings??[]).filter(e=>e.code!==`identity_file_configured`),re=L.kind===`remove`||L.kind===`unchanged`||!w&&te.length===0,ie=y!==void 0||b!==void 0||x!==void 0||S!==void 0||B||H||V,W=f?.unlocked===!0&&m===`ready`,G=W&&p!==null,ae=W&&h===`ready`,K=W,oe=f===null||f.unlocked,se=N===``&&P===``&&I===``&&re&&U&&(!B||G)&&(!H||ae)&&(!V||K),ce=B&&!G||H&&!ae||V&&!K,le=f?.minPassphraseLength??12,ue=f!==null&&t.masterPassword.length>=le&&(f.exists||t.masterConfirmation===t.masterPassword);function q(){let t={identity:e.form.entry.identity,base:e.file.contents,password:L,keyPassphrase:R,totp:ee};return y!==void 0&&(t.hostName=y),b!==void 0&&(t.user=b),x!==void 0&&(t.port=x),S!==void 0&&(t.identityFile=S),t}return{savedCredential:_,savedTOTP:v,identityFileChange:S,selectedPrivateKey:C,draftHasExplicitKey:w,passwordCleanup:T,confirmPasswordRoute:D,confirmTOTPRoute:O,namedKeyPassphrase:k,dedicatedKeyPassphrase:A,keyPassphraseStorageState:j,otherNamedKeyUses:M,hostError:N,userError:P,portError:I,passwordChange:L,keyPassphraseChange:R,changesPassword:B,changesTOTP:V,hasKeyPassphraseDraft:H,keyPassphraseValid:U,passwordBlockers:te,passwordWarnings:ne,passwordAllowed:re,dirty:ie,valid:se,needsVault:ce,vaultAllowsConfig:oe,canOpenVault:ue,request:q}}function Ye({draft:e,derived:t,keySelection:n,secrets:i,preferredKey:a,serverKeyError:s,serverKeyPassphraseError:l,passphraseOpen:u,onPassphraseOpenChange:f,onSelectKey:p,onEdit:m}){let h=c(),{keyState:_,customKey:v}=n,{selectedPrivateKey:y,identityFileChange:b}=t;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(r,{label:h(`conn.basicPrivateKey`),warning:s||void 0,hint:_===`custom`?h(`conn.basicCustomKey`,{path:v}):_===`complex`?h(`conn.basicComplexKey`):void 0,children:(0,q.jsxs)(`select`,{"aria-label":h(`conn.basicPrivateKey`),value:e.selectedKey,disabled:i.loading||i.keyOptionsStatus!==`ready`||_===`custom`||_===`complex`,onChange:e=>p(e.target.value),className:d,children:[(0,q.jsx)(`option`,{value:``,children:h(`conn.basicAgentOrInherited`)}),_===`custom`?(0,q.jsx)(`option`,{value:ze,children:v}):null,i.privateKeys.map(e=>(0,q.jsxs)(`option`,{value:e.id,children:[e.relativePath,e.fingerprint===``?``:` · ${e.fingerprint}`]},e.id))]})}),a!==null&&b?.action===`set`&&b.keyId===a.privateKeyId?(0,q.jsx)(`p`,{className:`border-t border-hairline px-3 py-2 text-xs text-notice-ink`,children:h(`conn.basicGeneratedKeyStaged`,{path:a.privateRelativePath})}):null,i.unlocked&&_===`editable`&&y!==void 0&&y.encrypted?(0,q.jsxs)(`details`,{open:u,onToggle:e=>f(e.currentTarget.open),className:`border-t border-hairline`,children:[(0,q.jsx)(`summary`,{className:`cursor-pointer px-3 py-3 text-sm font-medium text-ink`,children:h(`conn.basicManageKeyPassphrase`)}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-hairline py-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:h(`conn.basicKeyPassphraseHeading`)}),(0,q.jsx)(`p`,{className:g,children:t.dedicatedKeyPassphrase?h(`conn.basicKeyPassphraseDedicated`):t.namedKeyPassphrase===void 0?h(`conn.basicKeyPassphraseNone`):h(`conn.basicKeyPassphraseShared`,{name:t.namedKeyPassphrase.name})}),t.namedKeyPassphrase!==void 0&&t.otherNamedKeyUses.length>0?(0,q.jsx)(`p`,{className:g,children:h(`conn.basicKeyPassphraseSharedOthers`,{count:t.otherNamedKeyUses.length})}):null,t.namedKeyPassphrase===void 0?null:(0,q.jsx)(`p`,{className:g,children:h(`conn.basicKeyPassphraseDetach`)})]}),(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,q.jsx)(T,{label:h(`conn.basicNewKeyPassphrase`),value:e.keyPassphrase,onChange:e=>m({keyPassphrase:e})}),(0,q.jsx)(T,{label:h(`conn.basicConfirmKeyPassphrase`),value:e.keyPassphraseConfirmation,onChange:e=>m({keyPassphraseConfirmation:e})})]}),t.hasKeyPassphraseDraft&&!t.keyPassphraseValid?(0,q.jsx)(o,{tone:`danger`,children:h(`conn.basicKeyPassphraseMismatch`)}):null,(0,q.jsx)(`p`,{className:g,children:h(`conn.basicKeyPassphraseStoredNote`)}),l===``?null:(0,q.jsx)(o,{tone:`danger`,children:l})]})]}):null,y!==void 0&&!y.encrypted?(0,q.jsx)(`p`,{className:`border-t border-hairline py-3 ${g}`,children:h(`conn.basicKeyPassphraseUnencrypted`)}):null]})}function Xe({draft:e,derived:t,secrets:n,onEdit:r}){let i=c(),{credentials:a,credentialOptionsStatus:o}=n;return(0,q.jsx)(`div`,{className:`border-t border-hairline py-3`,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:i(`conn.basicStoredTOTP`)}),n.loading||o===`loading`?(0,q.jsx)(`p`,{className:g,children:i(`conn.createLoadingOptions`)}):null,o===`failed`?(0,q.jsx)(`p`,{className:g,children:i(`conn.basicCredentialOptionsFailed`)}):null,n.unlocked?(0,q.jsx)(`p`,{className:g,children:a.assignedTOTP===``?i(`conn.basicNoTOTP`):i(`conn.basicAssignedTOTP`,{name:a.assignedTOTP})}):null]}),n.unlocked?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:i(`conn.basicTOTPAction`)}),(0,q.jsxs)(`select`,{"aria-label":i(`conn.basicTOTPAction`),value:e.totpAction,onChange:e=>r({totpAction:e.target.value}),className:d,children:[(0,q.jsx)(`option`,{value:`unchanged`,children:i(`conn.basicTOTPUnchanged`)}),(0,q.jsx)(`option`,{value:`saved_totp`,children:i(`conn.basicUseSavedTOTP`)}),a.assignedTOTP===``?null:(0,q.jsx)(`option`,{value:`remove`,children:i(`conn.basicRemoveTOTP`)})]})]}),e.totpAction===`saved_totp`?(0,q.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:i(`conn.basicChooseSavedTOTP`)}),(0,q.jsxs)(`select`,{value:t.savedTOTP,onChange:e=>r({savedTOTP:e.target.value}),className:d,children:[a.totps.length===0?(0,q.jsx)(`option`,{value:``,children:i(`conn.basicNoSavedTOTPs`)}):null,a.totps.map(e=>(0,q.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}):null,(0,q.jsx)(`p`,{className:g,children:i(`conn.basicTOTPNote`)})]}):null]})})}var Ze={passwords:[],keyPassphrases:[],totps:[],assigned:!1,assignedCredential:``,assignedTOTP:``};function Qe(e,t,n){let r=n.filter(e=>e.kind===`password`),i=n.filter(e=>e.kind===`totp`);return{passwords:r,keyPassphrases:n.filter(e=>e.kind===`key_passphrase`),totps:i,assigned:t?.aliases.includes(e)??!1,assignedCredential:r.find(t=>t.uses.includes(e))?.name??``,assignedTOTP:i.find(t=>t.uses.includes(e))?.name??``}}function $e({detail:e,resetKey:t,keys:n,secrets:r,savedState:i}){let a=c(),o=e.form.entry.identity.alias,[s,l]=(0,G.useState)([]),[u,d]=(0,G.useState)(`loading`),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)(null),[g,_]=(0,G.useState)(Ze),[v,y]=(0,G.useState)(`loading`),[b,x]=(0,G.useState)(!0),[S,C]=(0,G.useState)(!1),[w,T]=(0,G.useState)(``),[E,D]=(0,G.useState)(0);(0,G.useEffect)(()=>{T(``),x(!0),d(`loading`),y(`loading`);let e=!0;if(i!==void 0){let t=i.keys.status===`ready`;l(i.keys.status===`ready`?i.keys.value:[]),d(t?`ready`:`failed`);let n=i.vault.status===`ready`?i.vault.value:null;return p(n),h(i.eligibility.status===`ready`?i.eligibility.value:null),n!==null&&i.credentials.status===`ready`?(_(Qe(o,n,i.credentials.value)),y(`ready`)):(_(Qe(o,n,[])),y(i.credentials.status===`locked`?`locked`:`failed`)),x(!1),D(e=>e+1),()=>{e=!1}}return Promise.all([n.inventory(),r.passwordVault(),r.passwordEligibility(o)]).then(async([t,n,i])=>{let a=n.unlocked?(await r.credentials()).credentials:[];e&&(l(U(t)),d(`ready`),p(n),h(i),_(Qe(o,n,a)),y(n.unlocked?`ready`:`locked`),x(!1),D(e=>e+1))}).catch(()=>{e&&(T(a(`conn.basicOptionsFailed`)),d(`failed`),y(`failed`),x(!1),D(e=>e+1))}),()=>{e=!1}},[t,n,r,a,i]);async function O(e){if(f===null)return!1;C(!0),T(``);try{let t=f.exists?await r.unlockVault(e):await r.initialiseVault(e),[n,i]=t.unlocked?await Promise.all([r.credentials().then(e=>e.credentials),r.passwordEligibility(o)]):[[],m];return p(t),_(Qe(o,t,n)),h(i),y(t.unlocked?`ready`:`locked`),t.unlocked}catch{return T(a(f.exists?`conn.createUnlockFailed`:`conn.createVaultFailed`)),!1}finally{C(!1)}}async function k(){try{let e=await r.passwordVault(),t=e.unlocked?(await r.credentials()).credentials:[];p(e),_(Qe(o,e,t)),y(e.unlocked?`ready`:`locked`)}catch{y(`failed`),T(a(`conn.basicRefreshFailed`))}}return{privateKeys:s,keyOptionsStatus:u,vault:f,eligibility:m,credentials:g,credentialOptionsStatus:v,loading:b,vaultBusy:S,error:w,setError:T,generation:E,openVault:O,refreshCredentials:k,unlocked:f?.unlocked===!0&&v===`ready`}}function et(e,t){return e.origin===`direct`?t(`conn.basicThisConnection`):e.origin==="default"?t(`conn.basicSSHDefault`):e.origin===`complex`?t(`conn.basicReadOnlyAdvanced`):t(`conn.basicInheritedFrom`,{path:e.source?.path??e.source?.absolute??``,line:e.source?.line??0})}function tt({field:e,label:t,error:n,inheritLabel:r,onChange:i,onInherit:a,numeric:o=!1}){let s=c(),l=(0,G.useId)(),u=e.state.origin===`direct`?``:et(e.state,s),f=e.state.origin===`complex`?s(`conn.basicComplex`,{keyword:e.state.keyword}):n;return(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,q.jsx)(`label`,{htmlFor:l,className:`text-sm text-ink-muted`,children:t}),(0,q.jsx)(`input`,{id:l,type:o?`number`:`text`,...o?{min:1,max:65535}:{},value:e.value,disabled:!e.state.editable||e.state.origin===`complex`,onChange:e=>i(e.target.value),"aria-invalid":f!==``||void 0,"aria-describedby":u!==``||f!==``?`${l}-detail`:void 0,className:d}),u===``&&f===``?null:(0,q.jsxs)(`div`,{id:`${l}-detail`,className:`space-y-1 text-xs`,children:[u===``?null:(0,q.jsx)(`p`,{className:`text-ink-muted`,children:u}),f===``?null:(0,q.jsx)(`p`,{className:`text-notice-ink`,children:f})]}),e.state.origin===`direct`?(0,q.jsx)(`button`,{type:`button`,"aria-pressed":e.inherit,onClick:a,className:`self-start rounded py-1 text-left text-xs underline-offset-4 hover:text-accent hover:underline ${e.inherit?`font-medium text-notice-ink`:`text-ink-muted`}`,children:e.inherit?s(`conn.basicKeepDirect`):r}):null]})}function nt({detail:e,problem:t,onSave:n,keys:r=te,secrets:i=xe,preferredKey:a=null,onPreferredKeyApplied:l,savedState:d,onDirtyChange:f,onDiscardReady:p,onRequestRefresh:m,disabled:h=!1}){let _=c(),v=e.form.entry.identity,y=`${k(v)}\u0000${e.file.contents}`,x=$e({detail:e,resetKey:y,keys:r,secrets:i,savedState:d}),S=(0,G.useMemo)(()=>Ve(e,x.privateKeys,x.keyOptionsStatus===`ready`,a),[e,x.privateKeys,x.keyOptionsStatus,a]),[C,w]=(0,G.useState)(()=>He(e)),[T,E]=(0,G.useState)(!1),[D,O]=(0,G.useState)(!1),[A,j]=(0,G.useState)(!1),[M,N]=(0,G.useState)(!1),P=Je(e,C,S,x,_),{setError:F}=x;function I(e,t=!1){w(t=>({...t,...e})),t&&F(``)}(0,G.useEffect)(()=>(w(He(e)),N(!1),E(!1),()=>{w(e=>({...e,...Ge}))}),[y,r,i,_,a,d]),(0,G.useEffect)(()=>{w(e=>({...e,selectedKey:S.initialSelected})),S.preferredAlreadyApplied&&l?.()},[S]);let L=P.selectedPrivateKey?.encrypted===!0?P.selectedPrivateKey.id:``;(0,G.useEffect)(()=>{x.credentialOptionsStatus!==`ready`||L===``||O(P.keyPassphraseStorageState===`none`)},[x.credentialOptionsStatus,L,P.keyPassphraseStorageState]),(0,G.useEffect)(()=>{P.draftHasExplicitKey&&w(e=>({...e,...Ue,...Ke}))},[P.draftHasExplicitKey]),(0,G.useEffect)(()=>{f?.(P.dirty)},[P.dirty,f]);let R=(0,G.useCallback)(()=>{w(He(e,S.initialKey)),F(``),N(!1)},[e,S.initialKey,F]);(0,G.useEffect)(()=>(p?.(R),()=>p?.(null)),[R,p]);function ee(e){I({selectedKey:e,...We});let t=a!==null&&e!==a.privateKeyId;E(t),t&&e===S.initialKey&&l?.()}function z(e){I({...Ue,confirmRemove:!1,passwordAction:e},!0)}async function B(){await x.openVault(C.masterPassword),I(Ge)}async function V(){if(!U)return;let e=P.request(),{identityFileChange:t,keyPassphraseChange:r}=P;j(!0),F(``);try{await n(e),r.kind!==`unchanged`&&O(!1),a!==null&&(T||t?.action===`set`&&t.keyId===a.privateKeyId)&&l?.(),I({...Ge,...Ke,totpAction:`unchanged`}),m===void 0?d===void 0&&await x.refreshCredentials():await m()}catch{I(Ge),F(_(`conn.basicSaveFailed`))}finally{j(!1)}}function H(e){if(e.preventDefault(),U){if(P.confirmPasswordRoute||P.confirmTOTPRoute){N(!0);return}V()}}let U=!h&&!x.loading&&!A&&P.vaultAllowsConfig&&P.dirty&&P.valid,ne=t?.code===`connection_hostname_invalid`?_(`conn.createHostInvalid`):``,re=t?.code===`connection_user_invalid`?_(`conn.createUserInvalid`):``,ie=t?.code===`connection_port_invalid`?_(`conn.createPortInvalid`):``,W=t?.code===`identity_file_invalid`?_(`conn.basicServerKeyInvalid`):``,ae=t?.code===`wrong_passphrase`?_(`conn.basicKeyPassphraseWrong`):t?.code===`external_change`?_(`conn.basicKeyPassphraseChanged`):``,K=t?.code===`credential_already_exists`?_(`conn.basicCredentialExists`):t?.code===`unknown_credential`?_(`conn.basicCredentialMissing`):t?.code===`password_missing`?_(`conn.basicPasswordMissing`):t?.code===`password_ineligible`?_(`conn.basicPasswordBlocked`):t?.code===`password_empty`?_(`conn.createNeedConnectionPassword`):``,oe=e=>({field:C[e],onChange:t=>I({[e]:{...C[e],value:t,inherit:!1}},!0),onInherit:()=>I({[e]:{...C[e],inherit:!C[e].inherit}})});return(0,q.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:H,children:[x.error===``||t!==null?null:(0,q.jsx)(o,{tone:`danger`,children:x.error}),(0,q.jsxs)(`fieldset`,{disabled:h,className:`contents`,children:[(0,q.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-labelledby":`basic-connection-heading`,children:[(0,q.jsx)(`h3`,{id:`basic-connection-heading`,className:u,children:_(`conn.basicConnection`)}),(0,q.jsxs)(`div`,{className:`grid gap-x-4 gap-y-3 sm:grid-cols-2`,children:[(0,q.jsx)(`div`,{className:`sm:col-span-2`,children:(0,q.jsx)(tt,{...oe(`hostName`),label:_(`conn.basicHostName`),error:P.hostError||ne,inheritLabel:_(`conn.basicUseInheritedHost`)})}),(0,q.jsx)(tt,{...oe(`user`),label:_(`conn.basicUser`),error:P.userError||re,inheritLabel:_(`conn.basicUseInheritedUser`)}),(0,q.jsx)(tt,{...oe(`port`),label:_(`conn.basicPort`),error:P.portError||ie,inheritLabel:_(`conn.basicUseInheritedPort`),numeric:!0})]})]}),(0,q.jsxs)(`section`,{className:`flex flex-col gap-3 border-t border-line pt-4`,"aria-labelledby":`basic-auth-heading`,children:[(0,q.jsx)(`h3`,{id:`basic-auth-heading`,className:u,children:_(`conn.basicAuthentication`)}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(Ye,{draft:C,derived:P,keySelection:S,secrets:x,preferredKey:a,serverKeyError:W,serverKeyPassphraseError:ae,passphraseOpen:D,onPassphraseOpenChange:O,onSelectKey:ee,onEdit:e=>I(e,!0)}),(0,q.jsx)(Me,{draft:C,derived:P,secrets:x,serverPasswordError:K,onEdit:e=>I(e),onChooseAction:z,onOpenVault:()=>void B()}),(0,q.jsx)(Xe,{draft:C,derived:P,secrets:x,onEdit:e=>I(e,`totpAction`in e)})]})]}),P.dirty?(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-3 border-t border-line py-3`,children:[P.needsVault?(0,q.jsx)(`p`,{className:`grow ${g}`,children:_(`conn.basicNeedVault`)}):P.passwordAllowed?(0,q.jsx)(`span`,{className:`grow`}):(0,q.jsx)(`p`,{className:`grow ${g}`,children:_(`conn.basicPasswordBlocked`)}),(0,q.jsx)(s,{type:`button`,disabled:!P.dirty||A,onClick:R,children:_(`conn.discardChanges`)}),(0,q.jsx)(s,{type:`submit`,kind:`primary`,disabled:!U,children:_(A?`conn.basicSaving`:`conn.basicSave`)})]}):null]}),M?(0,q.jsx)(b,{id:`connection-route-confirmation-heading`,heading:_(`conn.basicRouteConfirmHeading`),body:(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:_(`conn.basicRouteConfirmBody`)}),confirmLabel:_(`conn.basicRouteConfirmSave`),cancelLabel:_(`conn.basicRouteConfirmCancel`),confirmKind:`primary`,onConfirm:()=>{N(!1),V()},onCancel:()=>N(!1)}):null]})}function rt({alias:e,api:t,disabled:n,resetKey:r}){let i=c(),[a,l]=(0,G.useState)(null),[d,f]=(0,G.useState)(null),[p,m]=(0,G.useState)([]),[h,_]=(0,G.useState)(``),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(null);(0,G.useEffect)(()=>{l(null),f(null),m([]),_(``),y(``),x(null)},[e,r]);async function S(){if(!(n||b!==null)){x(`reachability`),_(``);try{l(await t.reachability(e))}catch{l(null),_(i(`diag.reachabilityFailed`))}finally{x(null)}}}async function C(n){x(`authentication`),y(``);try{f(await t.authentication(e,n)),m([])}catch{f(null),y(i(`diag.authenticationFailed`))}finally{x(null)}}async function w(){if(!(n||b!==null)){x(`authentication`),y(``),m([]);try{let n=await t.effective(e);if(n.executableDirectives.length>0){m(n.executableDirectives);return}f(await t.authentication(e,!1))}catch{f(null),y(i(`diag.authenticationFailed`))}finally{x(null)}}}let T=n||b!==null;return(0,q.jsxs)(`section`,{"aria-label":i(`conn.checksLabel`),className:`flex flex-col gap-3`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(s,{disabled:T,onClick:()=>void S(),className:`max-w-full whitespace-normal text-left text-xs`,children:i(b===`reachability`?`conn.checking`:`conn.checkReachability`)}),(0,q.jsx)(s,{disabled:T,onClick:()=>void w(),className:`max-w-full whitespace-normal text-left text-xs`,children:i(b===`authentication`?`conn.checking`:`conn.checkAuthentication`)}),n?(0,q.jsx)(`p`,{className:`w-full ${g}`,children:i(`conn.summaryDraftBlocksActions`)}):null]}),h===``?null:(0,q.jsx)(o,{tone:`danger`,children:h}),v===``?null:(0,q.jsx)(o,{tone:`danger`,children:v}),p.length===0?null:(0,q.jsxs)(`div`,{className:`rounded border border-notice-line bg-notice p-3 text-sm`,children:[(0,q.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:i(`conn.checksExecutableHeading`)}),(0,q.jsx)(`p`,{className:g,children:i(`conn.checksExecutableHint`)}),(0,q.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:p.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`p`,{className:`text-ink-muted`,children:i(`conn.checksDirectiveAt`,{keyword:e.keyword,path:e.path,line:e.line})}),(0,q.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-xs text-ink`,children:e.command})]},`${e.path}:${e.line}:${e.keyword}`))}),(0,q.jsx)(s,{className:`mt-3`,disabled:b!==null,onClick:()=>void C(!0),children:i(`conn.checksAcknowledge`)})]}),a===null&&d===null?null:(0,q.jsxs)(`div`,{className:`grid border-t border-line pt-3 sm:grid-cols-2 sm:divide-x sm:divide-line`,children:[a===null?null:(0,q.jsxs)(`div`,{className:`flex flex-col gap-1.5 p-3 text-sm`,children:[(0,q.jsx)(`h3`,{className:u,children:i(`diag.reachability`)}),(0,q.jsx)(`p`,{className:`font-mono text-xs text-ink`,children:a.address}),(0,q.jsx)(`p`,{className:`font-medium text-ink`,children:a.outcome}),(0,q.jsx)(`p`,{className:g,children:a.notice})]}),d===null?null:(0,q.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t border-line p-3 text-sm sm:border-t-0`,children:[(0,q.jsx)(`h3`,{className:u,children:i(`diag.authentication`)}),(0,q.jsx)(`p`,{className:`font-medium text-ink`,children:d.outcome}),d.method===``?null:(0,q.jsx)(`p`,{className:g,children:i(`diag.authenticationMethod`,{method:d.method})}),d.detail===``?null:(0,q.jsx)(`pre`,{className:`whitespace-pre-wrap break-all font-mono text-xs text-ink-muted`,children:d.detail})]})]})]})}function it(e){let t=e.form.entry.file.path??e.form.entry.file.absolute;return e.effective.entries.filter(e=>(e.source.path??e.source.absolute)!==t)}function at({detail:e,onMetadata:t}){let n=c(),r=[...e.form.notices??[],...e.effective.notices??[]],i=it(e);return(0,q.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,q.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:n(`inspector.appOnly`)}),(0,q.jsx)(`p`,{className:`mt-1 ${g}`,children:n(`inspector.hostSavesImmediately`)})]}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-4 rounded-md bg-tree p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(p,{label:n(`host.colour`),children:(0,q.jsx)(`input`,{type:`color`,value:e.metadata.colour===void 0||e.metadata.colour===``?`#8e8e93`:e.metadata.colour,onChange:n=>t({...e.metadata,colour:n.target.value}),className:`h-8 w-14 rounded border border-control-line bg-control`})}),e.metadata.colour===void 0||e.metadata.colour===``?null:(0,q.jsx)(s,{className:`self-start`,onClick:()=>t({...e.metadata,colour:``}),children:n(`host.clearColour`)})]}),(0,q.jsx)(p,{label:n(`host.os`),hint:n(`host.osHint`),interactiveChildren:!0,children:(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(M,{os:e.metadata.os||e.metadata.detectedOS||``}),(0,q.jsxs)(`select`,{"aria-label":n(`host.os`),value:e.metadata.os??``,onChange:n=>t({...e.metadata,os:n.target.value}),className:d,children:[(0,q.jsx)(`option`,{value:``,children:n(`host.osAutomatic`)}),F.map(([e,t])=>(0,q.jsx)(`option`,{value:e,children:e===`server`?n(`host.osGeneric`):t},e))]})]})}),(0,q.jsx)(p,{label:n(`connection.paletteLabel`),hint:n(`connection.paletteHint`),children:(0,q.jsx)(re,{choices:ie,value:e.metadata.appearance?.palette??``,onChange:n=>t(P(e.metadata,{palette:n})),unchosen:n(`terminal.paletteFollowsOverall`)})}),(0,q.jsx)(p,{label:n(`connection.fontLabel`),hint:n(`connection.fontHint`),children:(0,q.jsx)(re,{choices:W,value:e.metadata.appearance?.font??``,onChange:n=>t(P(e.metadata,{font:n})),unchosen:n(`terminal.fontFollowsOverall`)})}),(0,q.jsx)(p,{label:n(`connection.backgroundLabel`),hint:n(`connection.backgroundHint`),interactiveChildren:!0,children:(0,q.jsx)(ne,{value:e.metadata.appearance?.background??``,onChange:n=>t(P(e.metadata,{background:n})),tint:e.metadata.appearance?.backgroundTint,onTintChange:n=>t(P(e.metadata,{backgroundTint:n})),unchosen:n(`terminal.backgroundFollowsOverall`)})}),(0,q.jsx)(p,{label:n(`connection.encodingLabel`),hint:n(`connection.encodingHint`),children:(0,q.jsxs)(`select`,{value:e.metadata.encoding??``,onChange:n=>{let r={...e.metadata},i=n.target.value;i===``?delete r.encoding:r.encoding=i,t(r)},className:d,children:[(0,q.jsx)(`option`,{value:``,children:n(`connection.encodingUTF8`)}),(0,q.jsx)(`option`,{value:`shift_jis`,children:n(`connection.encodingShiftJIS`)}),(0,q.jsx)(`option`,{value:`euc-jp`,children:n(`connection.encodingEUCJP`)}),(0,q.jsx)(`option`,{value:`iso-2022-jp`,children:n(`connection.encodingISO2022JP`)})]})}),(0,q.jsx)(p,{label:n(`connection.osc52Label`),hint:n(`connection.osc52Hint`),children:(0,q.jsxs)(`select`,{value:e.metadata.osc52??``,onChange:n=>{let r={...e.metadata},i=n.target.value;i===``?delete r.osc52:r.osc52=i,t(r)},className:d,children:[(0,q.jsx)(`option`,{value:``,children:n(`connection.osc52Inherit`)}),(0,q.jsx)(`option`,{value:`allow`,children:n(`connection.osc52Allow`)}),(0,q.jsx)(`option`,{value:`deny`,children:n(`connection.osc52Deny`)})]})}),(0,q.jsx)(p,{label:n(`host.tags`),children:(0,q.jsx)(`input`,{value:(e.metadata.tags??[]).join(`, `),onChange:n=>t({...e.metadata,tags:n.target.value.split(`,`).map(e=>e.trim()).filter(e=>e!==``)}),className:d})}),(0,q.jsx)(p,{label:n(`host.displayOrder`),children:(0,q.jsx)(`input`,{type:`number`,value:String(e.metadata.order??0),onChange:n=>t({...e.metadata,order:Number(n.target.value)||0}),className:d})})]})]}),(0,q.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h3`,{className:m,children:n(`inspector.notices`)}),r.length===0?(0,q.jsx)(`p`,{className:g,children:n(`inspector.noNotices`)}):(0,q.jsx)(H,{notices:r})]}),(0,q.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h3`,{className:m,children:n(`inspector.inherited`)}),i.length===0?(0,q.jsx)(`p`,{className:g,children:n(`inspector.noInherited`)}):(0,q.jsx)(`ul`,{className:`overflow-hidden rounded-lg bg-tree`,children:i.map((e,t)=>(0,q.jsx)(`li`,{className:`border-t border-hairline px-3 py-2 font-mono text-xs text-ink-muted first:border-t-0`,children:`${e.keyword} ${e.values.join(` `)} · ${e.source.path??e.source.absolute??``}:${e.source.line??0}`},`${e.keyword}-${t}`))})]})]})}var ot={...L,...xe},st=[{area:`Basic`,label:`conn.areaBasic`},{area:`Analysis`,label:`conn.areaAnalysis`},{area:`Advanced`,label:`conn.areaAdvanced`},{area:`Sshc`,label:`conn.areaSshc`}],ct=st.map(e=>e.area);function lt({detail:e,savedState:t,preview:n,problem:r,onFieldEdits:i,onBlockRaw:a,onBasicSave:o,onMetadata:s,integrations:l=ot,panel:u,advanced:d,onLocationChange:f,preferredKey:p,onPreferredKeyApplied:m,onDirtyChange:h,onBasicDiscardReady:g,onRequestRefresh:_,disabled:v=!1,savedRevision:y=0}){let b=c(),[x,S]=(0,G.useState)(`Basic`),[w,T]=(0,G.useState)(`Jump`),[E,D]=(0,G.useState)(!1),[O,A]=(0,G.useState)(!1),j=u??x,M=j===`Advanced`?d??w:w,N=E||O,P=e.form.entry.identity,F=`${k(P)}\u0000${e.file.contents}\u0000${y}`;(0,G.useEffect)(()=>{j===`Advanced`&&T(M)},[M,j]),(0,G.useEffect)(()=>{u===void 0&&S(`Basic`),T(`Jump`),D(!1),A(!1)},[F]),(0,G.useEffect)(()=>h?.(N),[N,h]);let I=(0,G.useCallback)(e=>D(e),[]),L=(0,G.useCallback)(e=>A(e),[]);function R(e){f===void 0?S(e):f(e,M)}function ee(e){T(e),f===void 0?S(`Advanced`):f(`Advanced`,e)}return(0,q.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,q.jsx)(H,{notices:e.form.notices??[]}),j===`Basic`&&P.alias!==``?(0,q.jsx)(rt,{alias:P.alias,api:l,disabled:v||N,resetKey:F}):null,(0,q.jsxs)(`div`,{"data-connection-editor":!0,className:`min-w-0`,children:[(0,q.jsx)(`div`,{role:`tablist`,"aria-label":b(`conn.editorLabel`),className:`grid grid-cols-4 border-b border-line`,children:st.map((e,t)=>(0,q.jsx)(`button`,{id:`connection-area-${e.area.toLowerCase()}-tab`,type:`button`,role:`tab`,"aria-selected":j===e.area,"aria-controls":`connection-area-${e.area.toLowerCase()}-panel`,tabIndex:j===e.area?0:-1,onClick:()=>R(e.area),onKeyDown:e=>C(e,t,ct,R),className:`min-h-11 whitespace-nowrap border-b-2 px-2 py-2.5 text-sm transition-colors ${j===e.area?`border-accent bg-select-fill font-semibold text-accent`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`,children:b(e.label)},e.area))}),(0,q.jsxs)(`div`,{className:`pt-5`,children:[(0,q.jsxs)(`div`,{id:`connection-area-basic-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-basic-tab`,hidden:j!==`Basic`,className:`flex flex-col gap-5`,children:[P.alias===``?(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:b(`host.noDestination`)}):null,(0,q.jsx)(nt,{detail:e,savedState:t,problem:r,onSave:o,secrets:l,preferredKey:p,onPreferredKeyApplied:m,onDirtyChange:I,onDiscardReady:g,onRequestRefresh:_,disabled:v||O})]}),(0,q.jsx)(`div`,{id:`connection-area-analysis-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-analysis-tab`,hidden:j!==`Analysis`,children:(0,q.jsx)(ke,{detail:e,alias:P.alias,api:l,disabled:v||N})}),(0,q.jsx)(`div`,{id:`connection-area-advanced-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-advanced-tab`,hidden:j!==`Advanced`,children:(0,q.jsx)(we,{detail:e,area:M,onAreaChange:ee,onFieldEdits:i,onBlockRaw:a,disabled:v||E,onDirtyChange:L})}),(0,q.jsx)(`div`,{id:`connection-area-sshc-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-sshc-tab`,hidden:j!==`Sshc`,children:(0,q.jsx)(at,{detail:e,onMetadata:s})})]})]}),(0,q.jsx)(V,{preview:n,conflict:r?.conflict??null,problem:r})]})}var ut=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;function dt(e){return e===``?void 0:e}function ft({groups:e,config:t=N,keys:r=te,secrets:i=xe,initialDraft:a,onOpenPrerequisite:l,onClose:f,onCreated:h}){let _=c(),[v,y]=(0,G.useState)(a?.alias??``),[b,S]=(0,G.useState)(a?.group??``),[C,E]=(0,G.useState)(a?.hostName??``),[D,O]=(0,G.useState)(a?.user??``),[k,A]=(0,G.useState)(a?.port??``),[j,M]=(0,G.useState)(a?.authentication??`dedicated_password`),[P,F]=(0,G.useState)(``),[I,L]=(0,G.useState)(a?.savedCredential??``),[R,ee]=(0,G.useState)(a?.newCredential??``),[B,V]=(0,G.useState)(``),[H,ne]=(0,G.useState)(a?.keyID??``),[re,ie]=(0,G.useState)([]),[W,ae]=(0,G.useState)([]),[K,oe]=(0,G.useState)(null),[se,ce]=(0,G.useState)(``),[le,ue]=(0,G.useState)(``),[J,de]=(0,G.useState)(!0),[fe,Y]=(0,G.useState)(!1),[pe,X]=(0,G.useState)(!1),[me,Z]=(0,G.useState)(``),[he,ge]=(0,G.useState)(()=>new Set);function _e(){F(``),V(``),ce(``),ue(``)}function ve(){_e(),Z(``),f()}(0,G.useEffect)(()=>{let e=!0;return Promise.all([i.passwordVault(),r.inventory()]).then(async([t,n])=>{let r=t.unlocked?(await i.credentials()).credentials:[];if(!e)return;let o=r.filter(e=>e.kind===`password`),s=U(n);oe(t),ae(o),L(e=>o.some(t=>t.name===e)?e:o[0]?.name??``),ie(s),ne(e=>s.some(t=>t.id===e)?e:s[0]?.id??``),a===void 0&&s.length>0&&M(`identity_file`),de(!1)}).catch(()=>{e&&(Z(_(`conn.createOptionsFailed`)),de(!1))}),()=>{e=!1}},[a,r,i,_]);let ye=v===``?_(`conn.createAliasRequired`):ut.test(v)?``:_(`conn.createAliasInvalid`),be=C===``?_(`conn.createHostRequired`):z(C)?``:_(`conn.createHostInvalid`),Q=D!==``&&/[\s\p{Cc}]/u.test(D)?_(`conn.createUserInvalid`):``,Se=Number(k),Ce=k!==``&&(!/^\d+$/.test(k)||Se<1||Se>65535)?_(`conn.createPortInvalid`):``,we=(()=>{switch(j){case`dedicated_password`:return P!==``;case`saved_password`:return I!==``;case`new_shared_password`:return R!==``&&B!==``;case`identity_file`:return H!==``}})(),Te=j===`identity_file`||K?.unlocked===!0,Ee=!J&&!fe&&Te&&ye===``&&be===``&&Q===``&&Ce===``&&we;function De(e){_e(),Z(``),M(e)}function Oe(){return{alias:v,group:b,hostName:C,user:D,port:k,authentication:j,savedCredential:I,newCredential:R,keyID:H}}function ke(e){let t=Oe();_e(),Z(``),l?.(e,t)}async function Ae(){if(K!==null){X(!0),Z(``);try{let e=K.exists?await i.unlockVault(se):await i.initialiseVault(se),t=(e.unlocked?(await i.credentials()).credentials:[]).filter(e=>e.kind===`password`);oe(e),ae(t),L(t[0]?.name??``),ce(``),ue(``)}catch{_e(),Z(_(K.exists?`conn.createUnlockFailed`:`conn.createVaultFailed`))}finally{X(!1)}}}function je(){switch(j){case`dedicated_password`:return{kind:j,password:P};case`saved_password`:return{kind:j,credential:I};case`new_shared_password`:return{kind:j,credential:R,password:B};case`identity_file`:return{kind:j,keyId:H}}}async function Me(e){if(e.preventDefault(),ge(new Set([`alias`,`hostName`,`user`,`port`])),!Ee)return;Y(!0),Z(``);let r={alias:v,group:b,hostName:C,authentication:je()},i=dt(D);i!==void 0&&(r.user=i),k!==``&&(r.port=Se);try{let e=await t.createConnection(r);_e(),h(e)}catch(e){switch(_e(),n(e)){case`alias_already_declared`:Z(_(`conn.createAliasTaken`));break;case`group_not_declared`:Z(_(`conn.createGroupMissing`));break;case`identity_file_invalid`:Z(_(`conn.createKeyInvalid`));break;case`unknown_credential`:Z(_(`conn.createCredentialMissing`));break;case`connection_destination_exists`:Z(_(`conn.createDestinationExists`));break;default:Z(_(`conn.createFailed`))}}finally{Y(!1)}}let Ne=K?.minPassphraseLength??12,Pe=K!==null&&se.length>=Ne&&(K.exists||le===se),Fe=(()=>{if(Ee||fe)return``;if(J)return _(`conn.createLoadingOptions`);if(ye!==``)return he.has(`alias`)?``:ye;if(be!==``)return he.has(`hostName`)?``:be;if(Q!==``)return he.has(`user`)?``:Q;if(Ce!==``)return he.has(`port`)?``:Ce;if(!Te)return _(`conn.createNeedVault`);switch(j){case`dedicated_password`:return _(`conn.createNeedConnectionPassword`);case`saved_password`:return _(`conn.createNeedSavedPassword`);case`new_shared_password`:return _(R===``?`conn.createNeedSavedPasswordName`:`conn.createNeedNewPassword`);case`identity_file`:return _(`conn.createNeedPrivateKey`)}})();return(0,q.jsxs)(w,{labelledBy:`create-connection-heading`,onDismiss:()=>{!fe&&!pe&&ve()},panelClassName:`flex max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-lg`,children:[(0,q.jsx)(`div`,{className:`border-b border-line px-5 py-5`,children:(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`flex size-10 shrink-0 items-center justify-center rounded-lg bg-select-fill text-accent`,children:(0,q.jsx)(x,{name:`plus`,className:`size-5`})}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{id:`create-connection-heading`,className:`text-lg font-semibold tracking-tight text-ink`,children:_(`conn.createTitle`)}),(0,q.jsx)(`p`,{className:`mt-1 ${g}`,children:_(`conn.createDescription`)})]})]})}),(0,q.jsxs)(`form`,{className:`flex min-h-0 flex-col`,onSubmit:e=>void Me(e),children:[(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-6 overflow-y-auto p-5`,children:[me===``?null:(0,q.jsx)(o,{tone:`danger`,children:me}),(0,q.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`create-connection-section`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,q.jsx)(`h3`,{id:`create-connection-section`,className:u,children:_(`conn.createConnectionSection`)}),v===``||C===``?null:(0,q.jsx)(`p`,{className:`rounded-md bg-tree px-2.5 py-1.5 font-mono text-xs text-ink-muted`,children:`${v} ${D===``?``:`${D}@`}${C}:${k||`22`}`})]}),(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,q.jsx)(p,{label:_(`conn.createNameRequired`),children:(0,q.jsx)(`input`,{id:`create-connection-name`,"aria-label":_(`conn.createName`),required:!0,autoFocus:!0,value:v,onChange:e=>y(e.target.value),onBlur:()=>ge(e=>new Set(e).add(`alias`)),"aria-invalid":he.has(`alias`)&&ye!==``,className:d})}),he.has(`alias`)&&ye!==``?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:ye}):null]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(p,{label:_(`conn.createGroup`),children:(0,q.jsxs)(`select`,{id:`create-connection-group`,value:b,onChange:e=>S(e.target.value),className:d,children:[(0,q.jsx)(`option`,{value:``,children:_(`conn.createNoGroup`)}),e.map(e=>(0,q.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}),(0,q.jsx)(s,{className:`mt-2`,onClick:()=>ke(`Groups`),children:_(`conn.createManageGroups`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(p,{label:_(`conn.createHostNameRequired`),children:(0,q.jsx)(`input`,{id:`create-connection-hostname`,"aria-label":_(`conn.createHostName`),required:!0,value:C,onChange:e=>E(e.target.value),onBlur:()=>ge(e=>new Set(e).add(`hostName`)),"aria-invalid":he.has(`hostName`)&&be!==``,className:d})}),he.has(`hostName`)&&be!==``?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:be}):null]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(p,{label:_(`conn.createUser`),children:(0,q.jsx)(`input`,{id:`create-connection-user`,value:D,onChange:e=>O(e.target.value),onBlur:()=>ge(e=>new Set(e).add(`user`)),"aria-invalid":he.has(`user`)&&Q!==``,className:d})}),he.has(`user`)&&Q!==``?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:Q}):null]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(p,{label:_(`conn.createPort`),hint:_(`conn.createPortHint`),children:(0,q.jsx)(`input`,{id:`create-connection-port`,type:`number`,min:1,max:65535,value:k,onChange:e=>A(e.target.value),onBlur:()=>ge(e=>new Set(e).add(`port`)),"aria-invalid":he.has(`port`)&&Ce!==``,className:d})}),he.has(`port`)&&Ce!==``?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:Ce}):null]})]})]}),(0,q.jsxs)(`section`,{className:`flex flex-col gap-3 border-t border-line pt-5`,"aria-labelledby":`create-auth-section`,children:[(0,q.jsx)(`h3`,{id:`create-auth-section`,className:u,children:_(`conn.createAuthenticationSection`)}),J?(0,q.jsx)(`p`,{className:g,children:_(`conn.createLoadingOptions`)}):null,K!==null&&!K.unlocked&&j!==`identity_file`?(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-notice-line bg-notice p-3`,children:[(0,q.jsx)(`p`,{className:`text-sm text-notice-ink`,children:_(K.exists?`conn.createVaultLocked`:`conn.createVaultMissing`)}),(0,q.jsx)(T,{label:_(`conn.createMasterPassword`),value:se,onChange:ce}),K.exists?null:(0,q.jsx)(T,{label:_(`conn.createConfirmMaster`),value:le,onChange:ue}),(0,q.jsx)(s,{kind:`primary`,disabled:pe||!Pe,onClick:()=>void Ae(),children:_(K.exists?`conn.createUnlockVault`:`conn.createInitialiseVault`)})]}):null,(0,q.jsxs)(`fieldset`,{className:`grid gap-2 sm:grid-cols-2`,disabled:J,children:[(0,q.jsx)(`legend`,{className:m,children:_(`conn.createAuthenticationMethod`)}),[[`identity_file`,`conn.createIdentityFile`],[`dedicated_password`,`conn.createDedicatedPassword`],[`saved_password`,`conn.createSavedPassword`],[`new_shared_password`,`conn.createNewSharedPassword`]].map(([e,t])=>(0,q.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded-lg border border-line bg-card p-3 text-sm text-ink transition-colors hover:bg-select-fill has-[:checked]:border-accent has-[:checked]:bg-select-fill`,children:[(0,q.jsx)(`input`,{type:`radio`,name:`create-authentication`,value:e,checked:j===e,onChange:()=>De(e),className:`accent-accent`}),(0,q.jsx)(`span`,{children:_(t)})]},e))]}),!J&&re.length===0?(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:g,children:_(`conn.createNoPrivateKeysHint`)}),(0,q.jsx)(s,{className:`mt-2`,onClick:()=>ke(`Keys`),children:_(`conn.createCreatePrivateKey`)})]}):null,j===`identity_file`?(0,q.jsx)(p,{label:_(`conn.createPrivateKey`),children:(0,q.jsxs)(`select`,{value:H,onChange:e=>ne(e.target.value),className:d,children:[re.length===0?(0,q.jsx)(`option`,{value:``,children:_(`conn.createNoPrivateKeys`)}):null,re.map(e=>(0,q.jsxs)(`option`,{value:e.id,children:[e.relativePath,e.fingerprint===``?``:` · ${e.fingerprint}`]},e.id))]})}):K?.unlocked===!0?j===`dedicated_password`?(0,q.jsx)(T,{label:_(`conn.createConnectionPassword`),value:P,onChange:F,hint:_(`conn.createDedicatedHint`)}):j===`saved_password`?(0,q.jsx)(p,{label:_(`conn.createChooseSavedPassword`),hint:_(`conn.createSavedHint`),children:(0,q.jsxs)(`select`,{value:I,onChange:e=>L(e.target.value),className:d,children:[W.length===0?(0,q.jsx)(`option`,{value:``,children:_(`conn.createNoSavedPasswords`)}):null,W.map(e=>(0,q.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}):j===`new_shared_password`?(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,q.jsx)(p,{label:_(`conn.createSavedPasswordName`),children:(0,q.jsx)(`input`,{value:R,onChange:e=>ee(e.target.value),className:d})}),(0,q.jsx)(T,{label:_(`conn.createNewPassword`),value:B,onChange:V})]}):null:null]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-t border-line px-5 py-4`,children:[Fe===``?(0,q.jsx)(`span`,{className:`grow`}):(0,q.jsx)(`p`,{className:`grow ${g}`,children:Fe}),(0,q.jsx)(s,{disabled:fe||pe,onClick:ve,children:_(`conn.cancelCreate`)}),(0,q.jsx)(s,{type:`submit`,kind:`primary`,disabled:!Ee,children:_(fe?`conn.creating`:`conn.create`)})]})]})]})}function pt(e,t){return`${e}${t}`}function mt(e,t){let n=[];return e.note!==void 0&&e.note!==``&&n.push(t(`orphan.note`,{note:e.note})),e.tags!==void 0&&e.tags.length>0&&n.push(t(`orphan.tags`,{tags:e.tags.join(`, `)})),e.colour!==void 0&&e.colour!==``&&n.push(t(`orphan.colour`,{colour:e.colour})),n.length===0?t(`orphan.noSettings`):n.join(` · `)}function ht({metadata:e,hosts:t,onSave:n}){let r=c(),[i,a]=(0,G.useState)({}),[o,l]=(0,G.useState)(``),u=e.hosts??[],d=u.filter(e=>e.orphan===!0);if(d.length===0)return null;let f=new Set(u.filter(e=>e.orphan!==!0).map(e=>pt(e.identity.path,e.identity.alias)));function p(e){let{orphan:t,...n}=e;return n}function m(t){let a=pt(t.identity.path,t.identity.alias),o=i[a]??``;if(o===``){l(r(`orphan.chooseTarget`));return}let[s,c]=o.split(`\0`);if(!(s===void 0||c===void 0)){if(f.has(o)){l(r(`orphan.occupied`,{alias:c}));return}l(``),n({...e,hosts:u.map(e=>e===t?{...p(e),identity:{path:s,alias:c}}:e)})}}function h(t){l(``),n({...e,hosts:u.filter(e=>e!==t)})}return(0,q.jsxs)(`section`,{"aria-labelledby":`orphan-heading`,className:`flex flex-col gap-3 rounded-xl border border-notice-line bg-notice p-4`,children:[(0,q.jsx)(`h3`,{id:`orphan-heading`,className:`text-sm font-medium text-notice-ink`,children:r(`orphan.heading`)}),(0,q.jsx)(`p`,{className:`text-xs text-ink-muted`,children:r(`orphan.explain`)}),o===``?null:(0,q.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:o}),(0,q.jsx)(`ul`,{className:`overflow-hidden rounded-lg bg-card`,children:d.map(e=>{let n=pt(e.identity.path,e.identity.alias);return(0,q.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-hairline p-3 first:border-t-0`,children:[(0,q.jsx)(`p`,{className:`text-sm text-ink`,children:r(`orphan.entry`,{alias:e.identity.alias,path:e.identity.path})}),(0,q.jsx)(`p`,{className:`text-xs text-ink-muted`,children:mt(e,r)}),(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(`label`,{htmlFor:`orphan-target-${n}`,className:`sr-only`,children:r(`orphan.reassociateWith`,{alias:e.identity.alias})}),(0,q.jsxs)(`select`,{id:`orphan-target-${n}`,value:i[n]??``,onChange:e=>a({...i,[n]:e.target.value}),className:`min-w-48 rounded-md border border-control-line bg-control px-2 py-1.5 text-xs`,children:[(0,q.jsx)(`option`,{value:``,children:r(`orphan.reassociatePlaceholder`)}),t.filter(e=>e.identity.alias!==``).map(e=>(0,q.jsx)(`option`,{value:pt(e.identity.path,e.identity.alias),children:r(`orphan.entry`,{alias:e.identity.alias,path:e.identity.path})},pt(e.identity.path,e.identity.alias)))]}),(0,q.jsx)(s,{onClick:()=>m(e),children:r(`orphan.reassociate`,{alias:e.identity.alias})}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>h(e),className:`rounded border border-control-line px-2 py-1 text-xs text-danger`,children:r(`orphan.discard`,{alias:e.identity.alias})})]})]},n)})})]})}function gt(e,t){let n=0;for(let r=1;r0;t--){let t=e.lastIndexOf(` -`,r-2);r=t<0?0:t+1}return r}function vt(e,t,n,r=0){let i=gt(e,t);if(!e.startsWith(n,i))throw Error(`block_moved`);let a=_t(e,i,r);return e.slice(0,a)+e.slice(i+n.length)}function yt(e){return e.status===`fulfilled`?{status:`ready`,value:e.value}:{status:`failed`}}async function bt(e,t,n){let r=e.form.entry.identity.alias,[i,a,o]=await Promise.allSettled([t.inventory(),n.passwordVault(),n.passwordEligibility(r)]),s=i.status===`fulfilled`?{status:`ready`,value:U(i.value)}:{status:`failed`},c=yt(a),l=yt(o),u;if(a.status===`rejected`)u={status:`failed`};else if(!a.value.unlocked)u={status:`locked`};else try{u={status:`ready`,value:(await n.credentials()).credentials}}catch{u={status:`failed`}}return{detail:e,keys:s,vault:c,credentials:u,eligibility:l}}function xt(e){return Pe(e).map(e=>e.values.filter(Fe)).filter(e=>e.length>0).map(B).filter(e=>e!==null)}function St(e,t){let n=xt(e);if(n.length===0)return{state:`none`};if(n.length>1)return{state:`complex`};let r=n[0]??``;if(t.status!==`ready`)return{state:`unavailable`,path:r};let i=t.value.find(e=>`~/.ssh/${e.relativePath}`===r);return i===void 0?{state:`custom`,path:r}:{state:`known`,path:i.relativePath,fingerprint:i.fingerprint,encrypted:i.encrypted}}function Ct(e,t,n,r){if(t.status===`locked`||n.status===`locked`)return{state:`locked`};if(t.status!==`ready`||n.status===`failed`)return{state:`unavailable`};if(!t.value.unlocked)return{state:`locked`};if(n.status!==`ready`)return{state:`unavailable`};if(!t.value.aliases.includes(e))return{state:`none`};let i=n.value.find(t=>t.kind===`password`&&t.uses.includes(e));return r.status===`ready`&&r.value.passwordBinding===`stale`?i===void 0?{state:`stale`}:{state:`stale`,name:i.name}:i===void 0?{state:`dedicated`}:{state:`named`,name:i.name}}function wt(e,t,n){if(e.state===`none`)return{state:`none`};if(e.state!==`known`)return{state:`unavailable`};if(!e.encrypted)return{state:`not_needed`};if(t.status===`locked`||n.status===`locked`)return{state:`locked`};if(t.status!==`ready`||n.status===`failed`)return{state:`unavailable`};if(!t.value.unlocked)return{state:`locked`};if(n.status!==`ready`)return{state:`unavailable`};if(t.value.dedicatedKeyPassphrases.includes(e.path))return{state:`dedicated`};let r=n.value.find(t=>t.kind===`key_passphrase`&&t.uses.includes(e.path));return r===void 0?{state:`none`}:{state:`named`,name:r.name}}function Tt(e){let{detail:t}=e,n=t.form.entry.identity.alias,r=Re(t,`HostName`).value||n,i=Re(t,`User`).value,a=Re(t,`Port`).value||`22`,o=St(t,e.keys);return{alias:n,endpoint:`${i===``?``:`${i}@`}${r}:${a}`,group:t.form.entry.group??``,privateKey:o,keyPassphrase:wt(o,e.vault,e.credentials),accountPassword:Ct(n,e.vault,e.credentials,e.eligibility)}}function Et({state:e,dirty:t,refreshing:n,onConnect:r,connecting:i,connectAvailable:a=!0,onToggleManage:o,managing:l}){let u=c(),d=Tt(e),f=t||n,p=d.privateKey.state!==`none`,m=p&&(d.accountPassword.state===`dedicated`||d.accountPassword.state===`named`||d.accountPassword.state===`stale`),h=p&&d.keyPassphrase.state!==`not_needed`,g=!p&&d.accountPassword.state!==`none`,_=`connection-actions-${encodeURIComponent(d.alias)}`;function v(){switch(d.privateKey.state){case`none`:return u(`conn.summaryKeyNone`);case`known`:return`${d.privateKey.path} · ${d.privateKey.fingerprint}`;case`custom`:return d.privateKey.path;case`complex`:return u(`conn.summaryKeyComplex`);case`unavailable`:return u(`conn.summaryKeyUnavailable`,{path:d.privateKey.path})}}function y(){switch(d.keyPassphrase.state){case`none`:return u(`conn.summaryKeyPassphraseNone`);case`dedicated`:return u(`conn.summaryKeyPassphraseDedicated`);case`named`:return u(`conn.summaryKeyPassphraseNamed`,{name:d.keyPassphrase.name});case`not_needed`:return u(`conn.summaryKeyPassphraseNotNeeded`);case`locked`:return u(`conn.summaryLocked`);case`unavailable`:return u(`conn.summaryUnavailable`)}}function b(){switch(d.accountPassword.state){case`none`:return u(`conn.summaryPasswordNone`);case`dedicated`:return u(`conn.summaryPasswordDedicated`);case`named`:return u(`conn.summaryPasswordNamed`,{name:d.accountPassword.name});case`stale`:return u(`conn.summaryPasswordRouteStale`);case`locked`:return u(`conn.summaryLocked`);case`unavailable`:return u(`conn.summaryUnavailable`)}}return(0,q.jsxs)(`section`,{"data-connection-summary":!0,"aria-labelledby":`connection-summary-heading`,className:`shrink-0 border-b border-line pb-4`,children:[(0,q.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,q.jsx)(M,{os:e.detail.metadata.os||e.detail.metadata.detectedOS,compact:!0}),(0,q.jsx)(`h2`,{id:`connection-summary-heading`,className:`min-w-0 truncate text-xl font-semibold tracking-tight text-ink sm:text-2xl`,children:d.alias}),t?(0,q.jsx)(`span`,{className:`rounded bg-notice px-2 py-1 text-xs font-medium text-notice-ink`,children:u(`conn.summaryUnsaved`)}):null]}),(0,q.jsx)(`p`,{className:`mt-1 break-all font-mono text-sm text-ink-muted`,children:d.endpoint}),d.group===``?null:(0,q.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-ink-muted`,children:[(0,q.jsx)(x,{name:`groups`,className:`size-3.5`}),(0,q.jsxs)(`span`,{className:`sr-only`,children:[u(`conn.summaryGroup`),`: `]}),d.group]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,q.jsxs)(s,{kind:`primary`,disabled:f||i||!a,"aria-describedby":f?_:void 0,onClick:r,className:`inline-flex items-center gap-2`,children:[(0,q.jsx)(x,{name:`terminal`,className:`size-4`}),u(i?`conn.opening`:`conn.connect`)]}),(0,q.jsxs)(s,{"aria-expanded":l,"aria-controls":`connection-management`,onClick:o,className:`inline-flex items-center gap-2 ${l?`border-accent bg-select-fill text-accent`:``}`,children:[(0,q.jsx)(`span`,{children:u(`conn.manageLabel`)}),(0,q.jsx)(x,{name:`chevronRight`,className:`size-3.5 transition-transform ${l?`rotate-90`:``}`})]})]})]}),(0,q.jsxs)(`dl`,{className:`mt-3 flex flex-wrap gap-x-5 gap-y-2 text-xs text-ink-muted`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`dt`,{className:p?`mb-0.5 font-medium text-ink-muted`:`sr-only`,children:u(`conn.summaryPrivateKey`)}),(0,q.jsx)(`dd`,{className:`break-all`,children:v()})]}),h?(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`dt`,{className:`mb-0.5 font-medium text-ink-muted`,children:u(`conn.summaryKeyPassphrase`)}),(0,q.jsx)(`dd`,{children:y()})]}):null,g?(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`dt`,{className:`mb-0.5 font-medium text-ink-muted`,children:u(`conn.summaryAccountPassword`)}),(0,q.jsx)(`dd`,{children:b()})]}):null]}),m?(0,q.jsx)(`p`,{role:`status`,className:`mt-3 rounded border border-notice-line bg-notice px-3 py-2 text-sm text-notice-ink`,children:u(`conn.summaryPasswordCleanup`)}):null,f?(0,q.jsx)(`p`,{id:_,className:`mt-3 text-xs text-notice-ink`,children:u(t?`conn.summaryDraftBlocksActions`:`conn.summaryRefreshing`)}):null]})}function Dt({detail:e,groups:t,files:n,disabled:r,onRename:i,onMoveToGroup:o,onComment:l,onDuplicate:f,onMoveToFile:p,onDelete:m}){let h=c(),_=e.form.entry.identity,v=e.form.entry.group??``,y=e.form.comment||e.metadata.note||``,x=`${k(_)}\u0000${e.file.contents}`,[S,C]=(0,G.useState)(_.alias),[w,T]=(0,G.useState)(v),[E,D]=(0,G.useState)(y),[O,A]=(0,G.useState)(``),[j,M]=(0,G.useState)(!1);(0,G.useEffect)(()=>{C(_.alias),T(v),D(y),A(``),M(!1)},[x]);let N=S!==``&&S!==_.alias,P=E!==y,F=w!==v;return(0,q.jsxs)(a,{id:`connection-management`,as:`section`,"aria-label":h(`conn.manageLabel`),"aria-disabled":r,radius:`md`,className:`flex shrink-0 flex-col gap-5 p-5`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{className:`text-base font-semibold tracking-tight text-ink`,children:h(`conn.manageLabel`)}),(0,q.jsx)(`p`,{className:`mt-1 ${g}`,children:h(`conn.manageIndependent`)}),r?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-notice-ink`,children:h(`conn.manageDraftBlocked`)}):null]}),(0,q.jsxs)(`fieldset`,{disabled:r,className:`contents`,children:[(0,q.jsxs)(`div`,{className:`grid gap-5 border-t border-line pt-5 lg:grid-cols-2`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,q.jsx)(`label`,{htmlFor:`manage-rename-alias`,className:u,children:h(`host.renameAlias`)}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`input`,{id:`manage-rename-alias`,"aria-label":h(`host.renameAlias`),value:S,onChange:e=>C(e.target.value),className:d}),(0,q.jsx)(s,{disabled:!N,onClick:()=>i(S),children:h(`host.rename`)})]})]}),(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,q.jsx)(`label`,{htmlFor:`manage-primary-group`,className:u,children:h(`host.primaryGroup`)}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsxs)(`select`,{id:`manage-primary-group`,"aria-label":h(`host.primaryGroup`),value:w,onChange:e=>T(e.target.value),className:d,children:[(0,q.jsx)(`option`,{value:``,children:h(`host.groupNone`)}),t.map(e=>(0,q.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,q.jsx)(s,{disabled:!F,onClick:()=>o(w),children:h(`host.moveToGroup`)})]}),(0,q.jsx)(`span`,{className:g,children:h(`host.groupNoneMeans`)})]})]}),(0,q.jsxs)(`label`,{className:`flex flex-col gap-2 border-t border-line pt-5`,children:[(0,q.jsx)(`span`,{className:u,children:h(`host.comment`)}),(0,q.jsx)(`textarea`,{"aria-label":h(`host.comment`),value:E,onChange:e=>D(e.target.value),rows:3,className:d}),(0,q.jsx)(`span`,{className:g,children:e.form.comment===``&&(e.metadata.note??``)!==``?h(`host.commentFromNote`):h(`host.commentNote`)})]}),(0,q.jsx)(s,{className:`self-start`,disabled:!P,onClick:()=>l(E),children:h(`host.saveComment`)}),(0,q.jsxs)(`div`,{className:`grid gap-4 border-t border-line pt-5`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h4`,{className:u,children:h(`conn.moveToFile`)}),(0,q.jsx)(`p`,{className:g,children:h(`conn.storageFileNote`)}),(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(`label`,{htmlFor:`manage-storage-file`,className:`text-sm text-ink-muted`,children:h(`conn.moveToFile`)}),(0,q.jsxs)(`select`,{id:`manage-storage-file`,"aria-label":h(`conn.moveToFile`),value:O,onChange:e=>A(e.target.value),className:d,children:[(0,q.jsx)(`option`,{value:``,children:h(`conn.moveToFilePlaceholder`)}),n.filter(e=>e.editable&&e.file.path!==void 0&&e.file.path!==_.path).map(e=>(0,q.jsx)(`option`,{value:e.file.path,children:e.file.path},e.file.absolute))]}),(0,q.jsx)(s,{disabled:O===``,onClick:()=>p(O),children:h(`conn.move`)})]})]}),(0,q.jsx)(s,{className:`self-start`,onClick:f,children:h(`conn.duplicate`)})]}),(0,q.jsxs)(`div`,{className:`border-t border-danger/30 pt-5`,children:[(0,q.jsx)(s,{kind:`danger`,onClick:()=>M(!0),children:h(`conn.delete`)}),j?(0,q.jsx)(b,{id:`delete-connection-heading`,heading:h(`conn.deleteHeading`,{alias:_.alias}),body:(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:h(`conn.deleteBody`)}),confirmLabel:h(`conn.confirmDelete`),cancelLabel:h(`conn.deleteCancel`),onCancel:()=>M(!1),onConfirm:()=>{M(!1),m()}}):null]})]})]})}var Ot=`sshc.connections.list-width.v1`,kt=400,At=256,jt=720,Mt=new Set([`group_not_declared`,`group_directory_missing`,`group_empty`,`group_directory_leftover`]),Nt=new Set([`complex_external_rule`,`wildcard_shadow`,`negated_pattern`,`unnamed_host_block`,`match_block`,`dangerous_directive`,`explained_values_only`]);function Pt({onInspector:e,creationDraft:t=null,onCreationDraftChange:n,onNavigateForCreation:r,location:a={pathname:`/connections`,search:``},onNavigateLocation:l,onNavigationBlockerChange:u,preferredKey:d=null,onPreferredKeyApplied:f,consoles:p,onShowConsole:m}){let h=c(),g=S(a),_=g.kind===`valid`?g.target:null,x=E(A),[C,w]=(0,G.useState)(null),T=C?.entry.path??`config`,{selection:D,setSelection:O,invalidLocation:k,setInvalidLocation:M,activePanel:P,setActivePanel:F,activeAdvanced:L,setActiveAdvanced:R,missingSelection:ee,setMissingSelection:z}=ve(_,g.kind===`invalid`),B=(0,G.useRef)(D),[V,U]=(0,G.useState)(null),[ne,re]=v(Ot,kt,At,jt),[ie,W]=(0,G.useState)(null),[ae,K]=(0,G.useState)(`idle`),[oe,se]=(0,G.useState)(0),[ce,le]=(0,G.useState)(null),ue=(0,G.useRef)(null),{editorDirty:J,setEditorDirty:de,preview:fe,setPreview:Y,problem:pe,setProblem:X,localError:me,setLocalError:Z}=ye(),Q=(0,G.useRef)(J);Q.current=J;let{creatingConnection:Se,setCreatingConnection:Ce,launching:we,setLaunching:Te,managing:Ee,setManaging:De}=be(t!==null);(0,G.useEffect)(()=>{B.current=D},[D]);function Oe(e,t){return(t===void 0?l?.(e):l?.(e,t))!==!1}function ke(e,t,n,r){return Oe(y({path:e.path,alias:e.alias,panel:t,advanced:n}),r)?(F(t),R(n),M(!1),!0):!1}function Ae(e){return Oe(y(null),e)}function je(e,t=P,n=L){B.current=e,O(e),U(null),W(null),z(!1),ke(e,t,n,{replace:!0})}function Me(){B.current=null,O(null),U(null),W(null),z(!1),Ae({replace:!0})}function Ne(){if(J){le({kind:`create`});return}n?.(null),Ce(!0)}function Pe(){let e=ce;if(e!==null){if(le(null),Q.current=!1,de(!1),ue.current?.(),e.kind===`create`){n?.(null),Ce(!0);return}if(e.kind===`select`){He(e.host);return}l?.(`${e.location.pathname}${e.location.search}`)}}function Fe(e,t){n?.(t),Ce(!1),r?.(e)}let Ie=(0,G.useCallback)(async()=>{try{let e=await N.overview();return w(e),e}catch(e){return X(i(e)),null}},[X]);(0,G.useEffect)(()=>{Ie()},[Ie]),(0,G.useEffect)(()=>{let e=S(a);if(e.kind===`redirect`){if(Oe(e.location,{replace:!0}),M(!1),B.current===null)return;B.current=null,O(null),U(null),W(null),de(!1),K(`idle`),F(`Basic`),R(`Jump`),z(!1),Y(null),X(null),De(!1);return}if(e.kind===`invalid`){if(M(!0),B.current===null)return;B.current=null,O(null),U(null),W(null),de(!1),K(`idle`),F(`Basic`),R(`Jump`),z(!1),Y(null),X(null),De(!1);return}M(!1);let t=e.target,n=B.current;if(t===null){if(n===null)return;B.current=null,O(null),U(null),W(null),de(!1),K(`idle`),F(`Basic`),R(`Jump`),z(!1),Y(null),X(null),De(!1);return}if(F(t.panel),R(t.advanced),n?.path===t.path&&n.alias===t.alias)return;let r={path:t.path,alias:t.alias};B.current=r,O(r),U(null),W(null),de(!1),K(`idle`),z(!1),Y(null),X(null),De(!1)},[a.pathname,a.search]),(0,G.useEffect)(()=>{if(!J){u?.(null);return}return u?.(e=>{if(!Q.current)return!0;let t=S(e);if(t.kind===`valid`&&D!==null){let e=t.target;if(e!==null&&e.path===D.path&&e.alias===D.alias)return!0}return le({kind:`navigate`,location:e}),!1}),()=>u?.(null)},[J,u,D]),(0,G.useEffect)(()=>{if(!J)return;let e=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[J]),(0,G.useEffect)(()=>(e(null),()=>e(null)),[e]);let Le=D===null?``:D.path,Re=D===null?``:D.alias;(0,G.useEffect)(()=>{if(Re===``)return;let e=!0;return N.host(Le,Re).then(async e=>({detail:e,saved:await bt(e,te,xe)})).then(({detail:t,saved:n})=>{e&&(U(t),W(n),K(`idle`),X(null),z(!1))}).catch(t=>{e&&(U(null),W(null),X(i(t)),z(!0))}),()=>{e=!1}},[Le,Re,U,W,X,z]);async function $(e,t=!0){let n;try{n=await N.save(e)}catch(t){Y(null);let n=i(t);return e.kind===`duplicate`&&n.code===`alias_already_declared`?(X(null),Z(h(`conn.duplicateAliasTaken`,{alias:e.newAlias??``}))):X(n),{saved:!1,overview:null}}Y(n.preview),X(null);let r=D,a=e.kind===`rename`&&r!==null?{path:r.path,alias:e.newAlias??r.alias}:null;a!==null&&je(a);let o=await Ie();if(t&&r!==null&&a===null)try{let e=await N.host(r.path,r.alias),t=await bt(e,te,xe),n=B.current;n?.path===r.path&&n.alias===r.alias&&(U(e),W(t),se(e=>e+1))}catch(e){let t=B.current;t?.path===r.path&&t.alias===r.alias&&(X(i(e)),z(!0))}return{saved:!0,overview:o}}async function ze(e){let t;try{t=await N.updateConnection(e)}catch(e){throw Y(null),X(i(e)),e}Y(t.preview),X(null),Z(``),ue.current?.(),K(`refreshing`)}function Be(e){return e.keys.status!==`failed`&&e.vault.status!==`failed`&&e.credentials.status!==`failed`&&e.eligibility.status!==`failed`}async function Ve(){if(D===null)return;let e=D;K(`refreshing`);try{let[t,n]=await Promise.all([N.overview(),N.host(e.path,e.alias)]),r=await bt(n,te,xe);if(!Be(r))throw Error(`saved_state_refresh_failed`);let i=B.current;if(i?.path!==e.path||i.alias!==e.alias)return;w(t),U(n),W(r),se(e=>e+1),K(`idle`),Z(``),X(null)}catch{let t=B.current;if(t?.path!==e.path||t.alias!==e.alias)return;K(`failed`),Z(h(`conn.basicConnectionRefreshFailed`))}}function He(e){if(e.identity.alias===``)return;let t={path:e.identity.path,alias:e.identity.alias},n=B.current,r=n?.path===t.path&&n.alias===t.alias;ke(t,`Basic`,`Jump`)&&(r||(Y(null),X(null),U(null),W(null),z(!1),De(!1),B.current=t,O(t),F(`Basic`),R(`Jump`)))}function Ue(e){let t=B.current,n=t?.path!==e.identity.path||t.alias!==e.identity.alias;if(J&&n){le({kind:`select`,host:e});return}He(e)}function We(e){V===null||D===null||$({kind:`host_fields`,path:D.path,alias:D.alias,base:V.file.contents,fields:e})}function Ge(e){V===null||D===null||$({kind:`block_raw`,path:D.path,alias:D.alias,base:V.file.contents,raw:e})}function Ke(e){V===null||D===null||(Z(``),$({kind:`rename`,path:D.path,alias:D.alias,base:V.file.contents,newAlias:e}))}async function qe(e){if(V===null)return;let t=V.form.entry.file.path??``,n=V.form.entry.identity.alias;if(e!==``){let r=await $({kind:`move`,path:t,base:V.file.contents,alias:n,destinationGroup:e},!1);if(!r.saved)return;let i=r.overview?.hosts.find(t=>t.identity.alias===n&&t.group===e);i===void 0?Me():je(i.identity);return}try{let e=await N.file(T);if(!(await $({kind:`move`,path:t,base:V.file.contents,alias:n,destinationPath:T,destinationBase:e.contents},!1)).saved)return;je({path:T,alias:n})}catch(e){X(i(e))}}async function Je(e,t){if(!(J||ae!==`idle`))try{if(e.kind===`group`){let n=e.name.slice(e.name.lastIndexOf(`/`)+1),r=t===``?n:`${t}/${n}`,i=C?.hosts.find(e=>e.identity.path===D?.path&&e.identity.alias===D.alias),a=i?.group===e.name?r:i?.group?.startsWith(`${e.name}/`)?`${r}${i.group.slice(e.name.length)}`:null,o=await N.renameGroup(e.name,r);Y(o.preview),X(null);let s=await Ie();if(D!==null&&a!==null&&s!==null){let e=s.hosts.find(e=>e.identity.alias===D.alias&&e.group===a);e===void 0?Me():je(e.identity)}else D!==null&&a!==null&&Me();return}let n=await N.file(e.path),r=D?.path===e.path&&D.alias===e.alias;if(t!==``){let i=await $({kind:`move`,path:e.path,base:n.contents,alias:e.alias,destinationGroup:t},!1);if(!i.saved)return;if(r&&i.overview!==null){let n=i.overview.hosts.find(n=>n.identity.alias===e.alias&&n.group===t);n===void 0?Me():je(n.identity)}else r&&Me();return}let i=await N.file(T);if(!(await $({kind:`move`,path:e.path,base:n.contents,alias:e.alias,destinationPath:T,destinationBase:i.contents},!1)).saved)return;r&&je({path:T,alias:e.alias})}catch(e){Y(null),X(i(e))}}function Ye(e){V===null||D===null||$({kind:`comment`,path:D.path,alias:D.alias,base:V.file.contents,comment:e})}function Xe(e){if(C===null)return;let t=(C.metadata.hosts??[]).filter(t=>t.identity.path!==e.identity.path||t.identity.alias!==e.identity.alias);$({kind:`metadata`,metadata:{...C.metadata,hosts:[...t,e]}})}async function Ze(e){Ce(!1),n?.(null),Y(e.preview),X(null),Z(``),De(!1),F(`Basic`),R(`Jump`),je(e.identity,`Basic`,`Jump`),await Ie()}async function Qe(){if(D===null||we||J||ae!==`idle`)return;Te(!0),Z(``);let e=await p.open({kind:`ssh`,alias:D.alias});e!==null&&m(e.id),Te(!1)}function $e(){V===null||D===null||(Z(``),$({kind:`duplicate`,path:D.path,base:V.file.contents,alias:D.alias,newAlias:`${D.alias}-copy`}))}async function et(e){if(!(V===null||D===null||e===``))try{let t=await N.file(e),n=D;if(!(await $({kind:`move`,path:n.path,base:V.file.contents,alias:n.alias,destinationPath:e,destinationBase:t.contents},!1)).saved)return;je({path:e,alias:n.alias}),Z(``)}catch(e){X(i(e))}}async function tt(){if(V===null||D===null)return;let e;try{e=vt(V.file.contents,V.form.entry.line,V.form.raw,V.form.commentLines)}catch{Z(h(`conn.blockMoved`));return}let t=D.path,n=V.file.contents;(await $({kind:`file_raw`,path:t,base:n,raw:e},!1)).saved&&(O(null),B.current=null,U(null),W(null),Z(``),Ae({replace:!0}))}return C===null?pe===null?(0,q.jsx)(I,{tone:`loading`,title:h(`conn.loading`)}):(0,q.jsx)(I,{tone:`failed`,title:pe.message,...pe.detail===void 0?{}:{detail:pe.detail},action:(0,q.jsx)(s,{onClick:()=>void Ie(),children:h(`shell.bootstrapRetry`)})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-canvas`,children:[(0,q.jsxs)(`header`,{"data-connections-header":!0,className:`flex shrink-0 items-center justify-between gap-3 border-b border-line bg-card px-3 py-3 md:px-4`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,q.jsx)(`h1`,{className:`truncate text-sm font-semibold tracking-tight text-ink`,children:h(`conn.heading`)}),(0,q.jsx)(`p`,{className:`shrink-0 text-xs text-ink-muted`,children:h(`conn.count`,{count:C.hosts.filter(e=>e.identity.alias!==``).length})})]}),(0,q.jsx)(s,{kind:`primary`,className:`shrink-0`,onClick:Ne,children:h(`conn.new`)})]}),(0,q.jsxs)(`div`,{style:{"--list-width":`${ne}px`},className:`grid min-h-0 flex-1 grid-cols-1 grid-rows-[minmax(0,1fr)] ${x?``:`md:grid-cols-[minmax(16rem,var(--list-width))_minmax(0,1fr)]`}`,children:[(0,q.jsx)(he,{compact:x,resizeHandle:x?null:(0,q.jsx)(j,{label:h(`conn.resizeList`),width:ne,minimum:At,maximum:jt,onWidthChange:re}),overview:C,selection:D,invalidLocation:k,onDismissInvalidLocation:()=>{Oe(y(null),{replace:!0})&&M(!1)},onSelect:Ue,onDrop:(e,t)=>void Je(e,t),movesDisabled:J||ae!==`idle`}),(0,q.jsxs)(`div`,{className:`min-h-0 flex-col gap-4 overflow-y-auto bg-card p-4 lg:p-5 ${x?``:`md:flex`} ${D===null?`hidden`:`flex`}`,children:[(0,q.jsx)(s,{className:`w-fit ${x?``:`md:hidden`}`,onClick:()=>Ae(),children:h(`conn.allConnections`)}),(0,q.jsx)(H,{notices:C.notices.filter(e=>!Mt.has(e.code)&&!Nt.has(e.code))}),(0,q.jsx)(ht,{metadata:C.metadata,hosts:C.hosts,onSave:e=>void $({kind:`metadata`,metadata:e})}),me===``?null:(0,q.jsx)(o,{tone:`danger`,children:me}),V===null&&ee&&D!==null?(0,q.jsx)(ge,{onBackToList:()=>Ae({replace:!0})}):V===null||ie===null?(0,q.jsx)(_e,{preferredKey:d,onBeginCreation:Ne}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Et,{state:ie,dirty:J,refreshing:ae!==`idle`,onConnect:()=>void Qe(),connecting:we,onToggleManage:()=>De(e=>!e),managing:Ee}),ae===`failed`?(0,q.jsx)(s,{className:`self-start`,onClick:()=>void Ve(),children:h(`conn.reloadConnection`)}):null,Ee?(0,q.jsx)(Dt,{detail:V,groups:C.groups,files:C.files,disabled:J||ae!==`idle`,onRename:Ke,onMoveToGroup:e=>void qe(e),onComment:Ye,onDuplicate:$e,onMoveToFile:e=>void et(e),onDelete:()=>void tt()}):null,(0,q.jsx)(lt,{detail:V,savedState:ie,preview:fe,problem:pe,onFieldEdits:We,onBlockRaw:Ge,onBasicSave:ze,onMetadata:Xe,integrations:ot,panel:P,advanced:L,onLocationChange:(e,t)=>{D!==null&&ke(D,e,t)},preferredKey:d,onPreferredKeyApplied:f,onDirtyChange:de,onBasicDiscardReady:e=>{ue.current=e},onRequestRefresh:Ve,savedRevision:oe,disabled:ae!==`idle`})]})]})]})]}),Se?(0,q.jsx)(ft,{groups:C.groups,initialDraft:t??void 0,onOpenPrerequisite:Fe,onClose:()=>{Ce(!1),n?.(null)},onCreated:e=>void Ze(e)}):null,ce===null?null:(0,q.jsx)(b,{id:`connection-discard-heading`,heading:h(`conn.discardChanges`),body:(0,q.jsx)(`p`,{className:`text-sm text-ink-muted`,children:h(`conn.discardPrompt`)}),confirmLabel:h(`conn.discardChanges`),cancelLabel:h(`conn.keepEditing`),onConfirm:Pe,onCancel:()=>le(null)})]})}export{Pt as ConnectionsPage}; \ No newline at end of file diff --git a/internal/ui/dist/assets/ConnectionsPage-CTHBHqx2.js b/internal/ui/dist/assets/ConnectionsPage-CTHBHqx2.js new file mode 100644 index 000000000..c0589ab24 --- /dev/null +++ b/internal/ui/dist/assets/ConnectionsPage-CTHBHqx2.js @@ -0,0 +1,3 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{g as n,i as r,n as i,r as a,t as o,y as s}from"./surface-DPFJ-mE2.js";import{_ as c,c as l,f as u,i as d,m as f,n as p,o as m,p as h,s as g,t as _}from"./form-zbLY2cuV.js";import{$ as v,A as y,B as b,H as x,J as S,N as C,V as w,X as T,Z as E,_ as D,at as O,b as k,d as A,f as j,h as M,m as N,n as P,nt as F,p as ee,q as I,v as L,x as R}from"./index-DtC-pXtZ.js";import{t as z}from"./diagnostics-C7nSnivf.js";import{t as B}from"./credentials-HxEBLVTm.js";import{i as V,r as H,t as U}from"./rules-Bwt16Wjc.js";import{n as te,t as ne}from"./SavePreview-BkzRFZRF.js";import{t as re}from"./useAsyncOperation-DcaEx5AT.js";import{n as W,t as ie}from"./api-ic2UgGYC.js";import{n as ae,r as G,t as oe}from"./palettes-B33rdzLR.js";import{n as se}from"./fonts-Dday_bgd.js";var K=e(),ce=`application/x-sshc-drag`,le=6,ue=``;function q(e){return e===ue?0:e.split(`/`).length}function de(e){let t=e.lastIndexOf(`/`);return t<0?e:e.slice(t+1)}function fe(e,t){return t===e||t.startsWith(`${e}/`)}function J(e,t,n){if(e.kind===`connection`)return e.group!==t;if(fe(e.name,t))return!1;let r=t===ue?de(e.name):`${t}/${de(e.name)}`;return r===e.name||n.includes(r)?!1:q(r)<=le}var Y=t();function pe(e){return e.identity.alias===``?`Host ${e.patterns.join(` `)}`:e.identity.alias}function X(e,t){let n=e.host;return w({alias:n.identity.alias,group:e.group,patterns:n.patterns,tags:e.tags,...n.hostName===void 0?{}:{hostName:n.hostName},...n.user===void 0?{}:{user:n.user}},t)}function me(e,t){return e.group===t||e.group.startsWith(`${t}/`)}function Z(e){if((e.hostName??``)===``)return e.file.path??e.file.absolute;let t=(e.user??``)===``?``:`${e.user}@`,n=(e.port??``)===``||e.port===`22`?``:`:${e.port}`;return`${t}${e.hostName}${n}`}function Q(e){return JSON.stringify([e.file.absolute,e.line,e.identity.path,e.identity.alias])}var he={key:`sshc.connections.groups-width.v1`,fallback:144,minimum:112,maximum:400};function ge({overview:e,selected:t,onSelect:n,onDrop:r,movesDisabled:i=!1}){let a=c(),[o,s]=y(he),l=(0,K.useId)(),[u,f]=(0,K.useState)({kind:`all`}),[p,m]=(0,K.useState)(``),[h,g]=(0,K.useState)(`name`),[_,b]=(0,K.useState)(new Set),[S,w]=(0,K.useState)(null),T=(0,K.useMemo)(()=>e.groups.map(e=>e.name),[e.groups]),E=(0,K.useMemo)(()=>{let t=new Map((e.metadata.hosts??[]).map(e=>[N(e.identity),e])),n=ee(e.hosts),r=new Map;return e.hosts.flatMap((e,i)=>{if(e.identity.alias===``)return[];let a=Q(e),o=r.get(a)??0;r.set(a,o+1);let s=t.get(N(e.identity));return[{host:e,projectionIdentity:`${a}\u0000${o}`,projectionOrder:i,group:e.group??``,tags:s?.tags??[],colour:s?.colour??``,os:s?.os||s?.detectedOS||``,order:s?.order??0,sourceOrder:i,duplicateAlias:n.has(e.identity.alias)}]})},[e.hosts,e.metadata.hosts]),D=(0,K.useMemo)(()=>{let t=new Set(e.groups.map(e=>e.name)),n=new Map((e.metadata.groups??[]).map(e=>[e.name,e])),r=new Map;e.groups.forEach((e,t)=>{let i=n.get(e.name);r.set(e.name,{name:e.name,label:e.name.slice(e.name.lastIndexOf(`/`)+1),hidden:i?.hidden===!0,order:i?.order??e.order??0,sourceOrder:t,descendantCount:E.filter(t=>me(t,e.name)).length,children:[]})});let i=[];for(let e of r.values()){let n=M(e.name,t),a=n===``?void 0:r.get(n);a===void 0?i.push(e):a.children.push(e)}let a=e=>{e.sort((e,t)=>e.order-t.order||e.sourceOrder-t.sourceOrder),e.forEach(e=>a(e.children))};return a(i),i},[E,e.groups,e.metadata.groups]),O=(0,K.useMemo)(()=>{let e=[],t=n=>{n.hidden&&n.descendantCount===0||e.push(n),n.children.forEach(t)};return D.forEach(t),e},[D]),k=(0,K.useMemo)(()=>{let e=x(p);return E.filter(t=>X(t,e)?u.kind===`all`?!0:u.kind===`ungrouped`?t.group===``:me(t,u.name):!1).sort((e,t)=>h===`name`?pe(e.host).localeCompare(pe(t.host),`ja`):e.order-t.order||e.sourceOrder-t.sourceOrder)},[E,p,u,h]),j=(0,K.useMemo)(()=>{let e=new Map;for(let t of k){let n=e.get(t.group)??[];n.push(t),e.set(t.group,n)}if(u.kind===`ungrouped`)return[{name:``,items:e.get(``)??[]}];let t=new Set(O.map(e=>e.name)),n=O.filter(e=>u.kind===`all`||e.name===u.name||e.name.startsWith(`${u.name}/`)).filter(e=>k.some(t=>me(t,e.name))).map(t=>({name:t.name,items:e.get(t.name)??[]})),r=[...e.keys()].filter(e=>e!==``&&!t.has(e)).sort((e,t)=>e.localeCompare(t,`ja`));return n.push(...r.map(t=>({name:t,items:e.get(t)??[]}))),u.kind===`all`&&e.has(``)&&n.push({name:``,items:e.get(``)??[]}),n},[O,u,k]),P=u.kind===`all`?`all`:u.kind===`ungrouped`?`ungrouped`:`group:${u.name}`;function F(e){f(e===`all`?{kind:`all`}:e===`ungrouped`?{kind:`ungrouped`}:{kind:`group`,name:e.slice(6)}),w(null)}function I(e,t){i||(e.dataTransfer.setData(ce,JSON.stringify(t)),e.dataTransfer.effectAllowed=`move`,w(t))}function L(e){return!i&&S!==null&&J(S,e,T)}function R(e){return{onDragOver:t=>{L(e)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`)},onDrop:t=>{S===null||!L(e)||(t.preventDefault(),t.stopPropagation(),r(S,e),w(null))}}}function z(e){return`flex min-h-10 w-auto items-center gap-2 rounded-r-md border-l-2 px-2 py-1.5 text-left text-xs transition-colors md:min-h-0 md:w-full ${e?`border-accent bg-select-fill font-medium text-accent`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`}function B(e,t=0){if(e.hidden&&e.descendantCount===0)return(0,Y.jsx)(K.Fragment,{children:e.children.map(e=>B(e,t))},e.name);let n=_.has(e.name),r=u.kind===`group`&&u.name===e.name,o={"--sshc-facet-depth":t};return(0,Y.jsxs)(`div`,{className:`min-w-max md:min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center rounded-md ${L(e.name)?`bg-select-fill outline outline-1 outline-accent`:``}`,style:o,...R(e.name),children:[e.children.length===0?(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`w-5 shrink-0 md:ms-[calc(var(--sshc-facet-depth)*0.65rem)]`}):(0,Y.jsx)(`button`,{type:`button`,"aria-label":a(n?`tree.expand`:`tree.collapse`,{name:e.name}),"aria-expanded":!n,onClick:()=>b(t=>{let n=new Set(t);return n.has(e.name)?n.delete(e.name):n.add(e.name),n}),className:`ms-0 flex size-8 shrink-0 items-center justify-center rounded text-ink-faint hover:text-ink md:ms-[calc(var(--sshc-facet-depth)*0.65rem)] md:size-5`,children:(0,Y.jsx)(`span`,{"aria-hidden":`true`,children:n?`▸`:`▾`})}),(0,Y.jsxs)(`button`,{type:`button`,"aria-label":e.name,"aria-pressed":r,draggable:!i,onDragStart:t=>I(t,{kind:`group`,name:e.name}),onDragEnd:()=>w(null),onClick:()=>f({kind:`group`,name:e.name}),className:`${z(r)} min-w-0 flex-1 px-1.5`,children:[(0,Y.jsx)(v,{name:`groups`,className:`size-4`}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),(0,Y.jsx)(`span`,{className:`shrink-0 text-[0.68rem] text-ink-faint`,children:e.descendantCount})]})]}),n?null:e.children.map(e=>B(e,t+1))]},e.name)}function V(){let e=u.kind===`all`,t=u.kind===`ungrouped`,n=E.filter(e=>e.group===``).length;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`button`,{type:`button`,"aria-label":a(`tree.allConnections`),"aria-pressed":e,onClick:()=>f({kind:`all`}),className:z(e),children:[(0,Y.jsx)(v,{name:`groups`,className:`size-4`}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a(`tree.allConnections`)}),(0,Y.jsx)(`span`,{className:`text-[0.68rem] text-ink-faint`,children:E.length})]}),D.map(e=>B(e)),(0,Y.jsx)(`div`,{...R(``),className:L(``)?`rounded-md outline outline-1 outline-accent`:``,children:(0,Y.jsxs)(`button`,{type:`button`,"aria-label":a(`tree.ungrouped`),"aria-pressed":t,onClick:()=>f({kind:`ungrouped`}),className:`${z(t)} min-w-max md:min-w-0`,children:[(0,Y.jsx)(v,{name:`groups`,className:`size-4`}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a(`tree.ungrouped`)}),(0,Y.jsx)(`span`,{className:`text-[0.68rem] text-ink-faint`,children:n})]})})]})}function H(e){let r=e.host,o=t?.path===r.identity.path&&t.alias===r.identity.alias,s=`${l}-connection-${e.projectionOrder}`;return(0,Y.jsxs)(`li`,{className:`border-b border-hairline last:border-b-0`,children:[(0,Y.jsx)(`button`,{type:`button`,"aria-label":r.identity.alias,"aria-current":o?`true`:void 0,"aria-describedby":s,draggable:!i,onClick:()=>n(r),onDragStart:t=>I(t,{kind:`connection`,path:r.identity.path,alias:r.identity.alias,group:e.group}),onDragEnd:()=>w(null),className:`min-h-14 w-full border-l-[3px] px-3 py-2.5 text-left text-sm transition-colors ${o?`border-accent bg-select-fill text-ink`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`,children:(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(A,{os:e.os,colour:e.colour,compact:!0}),(0,Y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`truncate ${o?`font-semibold`:`font-medium`}`,children:r.identity.alias}),e.duplicateAlias?(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-notice-ink`,children:`⧉`}):null]}),(0,Y.jsx)(`span`,{className:`mt-0.5 block truncate font-mono text-xs leading-4 ${o?`text-ink-muted`:`text-ink-faint`}`,children:Z(r)}),e.tags.length===0?null:(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1 flex flex-wrap gap-1`,children:e.tags.map(e=>(0,Y.jsx)(`span`,{className:`rounded bg-toolbar px-1 text-[0.65rem] text-ink-muted`,children:e},e))})]})]})}),(0,Y.jsx)(`span`,{id:s,className:`sr-only`,children:[e.duplicateAlias?a(`tree.duplicateAlias`):``,Z(r),r.file.path??r.file.absolute].filter(Boolean).join(`, `)})]},e.projectionIdentity)}function U(e){let t=e.name===``?a(`tree.ungrouped`):e.name;return(0,Y.jsxs)(`section`,{"data-connection-group":e.name||`ungrouped`,"aria-label":a(`tree.groupSection`,{name:t,count:e.items.length}),children:[(0,Y.jsxs)(`header`,{className:`sticky top-0 z-[1] flex min-h-8 items-center gap-2 border-y border-line bg-tree px-3 py-2 text-[0.68rem] text-ink-muted`,children:[(0,Y.jsx)(v,{name:`groups`,className:`size-3.5 shrink-0 text-ink-faint`}),(0,Y.jsx)(`h3`,{className:`min-w-0 flex-1 truncate font-medium`,children:t}),(0,Y.jsx)(`span`,{className:`shrink-0 font-mono tabular-nums text-ink-faint`,children:e.items.length})]}),e.items.length===0?null:(0,Y.jsx)(`ul`,{children:e.items.map(H)})]},e.name||`ungrouped`)}return(0,Y.jsxs)(`nav`,{"aria-label":a(`tree.navLabel`),style:{"--groups-width":`${o}px`},className:`grid h-full min-h-0 grid-cols-1 grid-rows-[minmax(0,1fr)] lg:grid-cols-[var(--groups-width)_minmax(0,1fr)] md:grid-rows-1`,children:[(0,Y.jsxs)(`aside`,{className:`relative hidden min-h-0 flex-col border-r border-line bg-tree lg:flex`,children:[(0,Y.jsx)(`p`,{className:`shrink-0 px-3 pb-1 pt-3 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-ink-faint`,children:a(`tree.byGroups`)}),(0,Y.jsx)(`div`,{"data-connection-facets":!0,className:`flex min-h-0 min-w-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto px-3 pb-3`,children:V()}),(0,Y.jsx)(C,{label:a(`conn.resizeGroups`),width:o,minimum:he.minimum,maximum:he.maximum,onWidthChange:s,className:`hidden lg:flex`})]}),(0,Y.jsxs)(`section`,{className:`flex min-h-0 flex-col bg-card`,"aria-label":a(`tree.resultsLabel`),children:[(0,Y.jsxs)(`header`,{className:`shrink-0 border-b border-line bg-card p-3`,children:[(0,Y.jsxs)(`label`,{className:`mb-2 flex min-w-0 items-center gap-2 lg:hidden`,children:[(0,Y.jsx)(`span`,{className:`shrink-0 text-xs font-medium text-ink-muted`,children:a(`tree.byGroups`)}),(0,Y.jsxs)(`select`,{"aria-label":a(`tree.groupFilter`),value:P,onChange:e=>F(e.currentTarget.value),className:`${d} min-h-10 min-w-0 flex-1 py-2`,children:[(0,Y.jsxs)(`option`,{value:`all`,children:[a(`tree.allConnections`),` · `,E.length]}),O.map(e=>(0,Y.jsxs)(`option`,{value:`group:${e.name}`,children:[e.name,` · `,e.descendantCount]},e.name)),(0,Y.jsxs)(`option`,{value:`ungrouped`,children:[a(`tree.ungrouped`),` · `,E.filter(e=>e.group===``).length]})]})]}),(0,Y.jsx)(`div`,{children:(0,Y.jsxs)(`label`,{className:`relative block min-w-0`,htmlFor:`connection-filter`,children:[(0,Y.jsx)(`span`,{className:`sr-only`,children:a(`tree.filter`)}),(0,Y.jsx)(v,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint`}),(0,Y.jsx)(`input`,{id:`connection-filter`,type:`search`,value:p,onChange:e=>m(e.currentTarget.value),placeholder:a(`tree.filterPlaceholderExpanded`),className:`${d} min-h-10 rounded-lg bg-control py-2 pl-9 pr-3 md:min-h-0`})]})}),(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-3 text-xs text-ink-faint`,children:[(0,Y.jsx)(`span`,{role:`status`,children:a(`tree.resultCount`,{visible:k.length,total:E.length})}),(0,Y.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`sr-only`,children:a(`tree.sortLabel`)}),(0,Y.jsxs)(`select`,{value:h,onChange:e=>g(e.currentTarget.value),className:`rounded border-0 bg-transparent py-0.5 text-xs text-ink-muted`,children:[(0,Y.jsx)(`option`,{value:`configured`,children:a(`tree.sortConfigured`)}),(0,Y.jsx)(`option`,{value:`name`,children:a(`tree.sortName`)})]})]})]}),i?null:(0,Y.jsx)(`p`,{className:`sr-only`,children:a(`tree.dragGroupHint`)})]}),k.length===0?(0,Y.jsx)(`p`,{role:`status`,className:`p-5 text-sm text-ink-muted`,children:a(`tree.noMatch`)}):(0,Y.jsx)(`div`,{"data-connection-results":!0,className:`min-h-0 flex-1 overflow-y-auto`,children:j.map(U)})]})]})}function _e({compact:e=!1,overview:t,selection:n,invalidLocation:r,onDismissInvalidLocation:i,onSelect:a,onDrop:s,movesDisabled:l,resizeHandle:u=null}){let d=c();return(0,Y.jsxs)(`div`,{className:`relative min-h-0 flex-col border-r border-line bg-tree ${e?``:`md:flex`} ${n===null?`flex`:`hidden`}`,children:[u,(0,Y.jsx)(`div`,{className:`min-h-0 flex-1`,children:r?(0,Y.jsxs)(`section`,{className:`m-4 flex flex-col gap-2 rounded-lg border border-line bg-card p-3 text-sm`,role:`status`,children:[(0,Y.jsx)(`p`,{className:`font-medium`,children:d(`browser.invalidUrl`)}),(0,Y.jsx)(o,{className:`min-h-10 self-start md:min-h-0`,onClick:i,children:d(`browser.backToServers`)})]}):(0,Y.jsx)(ge,{overview:t,selected:n,onSelect:a,onDrop:s,movesDisabled:l})})]})}function ve({onBackToList:e}){let t=c();return(0,Y.jsxs)(`section`,{className:`m-auto flex max-w-sm flex-col items-center rounded-lg bg-tree px-8 py-10 text-center`,role:`status`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-semibold text-ink`,children:t(`conn.missingHeading`)}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-ink-muted`,children:t(`conn.missingHint`)}),(0,Y.jsx)(o,{kind:`primary`,className:`mt-4`,onClick:e,children:t(`conn.backToList`)})]})}function ye({preferredKey:e,onBeginCreation:t}){let n=c();return(0,Y.jsxs)(`section`,{className:`m-auto flex max-w-sm flex-col items-center rounded-lg bg-tree px-8 py-10 text-center`,role:`status`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`mb-4 flex size-14 items-center justify-center rounded-lg bg-card text-accent shadow-sm`,children:(0,Y.jsx)(v,{name:`connections`,className:`size-7`})}),(0,Y.jsx)(`h2`,{className:`text-lg font-semibold text-ink`,children:n(e===null?`conn.emptyHeading`:`conn.assignKeyHeading`)}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-ink-muted`,children:e===null?n(`conn.emptyHint`):n(`conn.assignKeyHint`,{path:e.privateRelativePath})}),(0,Y.jsx)(o,{kind:`primary`,className:`mt-4`,onClick:t,children:n(`conn.createAnother`)})]})}function be(e,t){let[n,r]=(0,K.useState)(e===null?null:{path:e.path,alias:e.alias}),[i,a]=(0,K.useState)(t),[o,s]=(0,K.useState)(e?.panel??`Basic`),[c,l]=(0,K.useState)(e?.advanced??`Jump`),[u,d]=(0,K.useState)(!1);return{selection:n,setSelection:r,invalidLocation:i,setInvalidLocation:a,activePanel:o,setActivePanel:s,activeAdvanced:c,setActiveAdvanced:l,missingSelection:u,setMissingSelection:d}}function xe(){let[e,t]=(0,K.useState)(!1),[n,r]=(0,K.useState)(null),[i,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(``);return{editorDirty:e,setEditorDirty:t,preview:n,setPreview:r,problem:i,setProblem:a,localError:o,setLocalError:s}}function Se(e){let[t,n]=(0,K.useState)(e),[r,i]=(0,K.useState)(!1),[a,o]=(0,K.useState)(!1);return{creatingConnection:t,setCreatingConnection:n,launching:r,setLaunching:i,managing:a,setManaging:o}}var Ce={passwordVault:O.passwordVault,passwordEligibility:O.passwordEligibility,initialiseVault:O.initialiseVault,unlockVault:O.unlockVault,credentials:B.credentials};function we(e){return`${e.line}-${e.keyword}`}var Te=[{area:`Jump`,label:`host.tabJump`},{area:`Forwards`,label:`conn.portForwarding`},{area:`Directives`,label:`conn.advancedDirectives`},{area:`Raw`,label:`host.tabRaw`}],Ee=Te.map(e=>e.area);function De({detail:e,area:t,onAreaChange:n,onFieldEdits:s,onBlockRaw:u,disabled:f,onDirtyChange:p}){let m=c(),[h,_]=(0,K.useState)({}),[v,y]=(0,K.useState)([]),[x,S]=(0,K.useState)([]),[C,w]=(0,K.useState)(``),[T,E]=(0,K.useState)(``),[D,O]=(0,K.useState)(`local`),[k,A]=(0,K.useState)(``),[j,M]=(0,K.useState)(``),[P,F]=(0,K.useState)(e.form.raw),[ee,I]=(0,K.useState)(``);(0,K.useEffect)(()=>{_({}),y([]),S([]),w(``),E(``),O(`local`),A(``),M(``),F(e.form.raw),I(``)},[`${N(e.form.entry.identity)}\u0000${e.file.contents}`]);let L=(0,K.useMemo)(()=>e.form.fields.filter(e=>t===`Directives`?(e.category===`advanced`||e.category===`basic`)&&!Oe(e):t===`Forwards`?Oe(e):t===`Jump`&&e.category===`jump`),[t,e.form.fields]),R=v.length>0||x.length>0||Object.entries(h).some(([t,n])=>{let r=e.form.fields.find(e=>we(e)===t);return r!==void 0&&n!==U(r.values)}),z=P!==e.form.raw,B=R||z,H=f||z,te=f||R;(0,K.useEffect)(()=>p(B),[B,p]);let ne=(0,K.useCallback)(()=>{_({}),y([]),S([]),w(``),E(``),O(`local`),A(``),M(``),F(e.form.raw),I(``)},[e.form.raw]);function re(e){return h[we(e)]??U(e.values)??``}function W(){let t=[];try{for(let n of e.form.fields){if(v.includes(n.line)){t.push({action:`remove`,line:n.line});continue}let e=h[we(n)];e===void 0||e===U(n.values)||t.push({action:`set`,line:n.line,values:V(e)})}t.push(...x)}catch{I(m(`host.unbalancedQuote`));return}t.length!==0&&(I(``),s(t))}function ie(){if(C===``){I(m(`host.needsKeyword`));return}try{S([...x,{action:`add`,keyword:C,values:V(T)}])}catch{I(m(`host.unbalancedQuote`));return}w(``),E(``),I(``)}function ae(){if(!Ae(k)){I(m(`conn.forwardInvalidPort`));return}if(D===`local`&&!je(j)){I(m(`conn.forwardInvalidDestination`));return}S([...x,{action:`add`,keyword:D===`local`?`LocalForward`:`DynamicForward`,values:D===`local`?[k,j]:[k]}]),A(``),M(``),I(``)}return(0,Y.jsxs)(`section`,{"aria-label":m(`conn.advancedLabel`),className:`flex flex-col gap-4`,children:[(0,Y.jsxs)(`label`,{className:`flex items-center gap-3 md:hidden`,children:[(0,Y.jsx)(`span`,{className:`shrink-0 text-xs font-medium text-ink-muted`,children:m(`conn.advancedViewLabel`)}),(0,Y.jsx)(`select`,{"aria-label":m(`conn.advancedViews`),value:t,onChange:e=>n(e.currentTarget.value),className:`${d} min-h-11 min-w-0 flex-1 py-2`,children:Te.map(e=>(0,Y.jsx)(`option`,{value:e.area,children:m(e.label)},e.area))})]}),(0,Y.jsx)(`div`,{role:`tablist`,"aria-label":m(`conn.advancedViews`),className:`hidden border-b border-line md:flex`,children:Te.map((e,r)=>(0,Y.jsx)(`button`,{id:`advanced-area-${e.area.toLowerCase()}-tab`,type:`button`,role:`tab`,"aria-selected":t===e.area,"aria-controls":`advanced-settings-panel`,tabIndex:t===e.area?0:-1,onClick:()=>n(e.area),onKeyDown:e=>b(e,r,Ee,n),className:`min-h-10 border-b-2 px-5 py-2 text-sm transition-colors ${t===e.area?`border-accent bg-select-fill font-semibold text-accent`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`,children:m(e.label)},e.area))}),ee===``?null:(0,Y.jsx)(a,{tone:`danger`,children:ee}),(0,Y.jsxs)(`div`,{id:`advanced-settings-panel`,role:`tabpanel`,"aria-labelledby":`advanced-area-${t.toLowerCase()}-tab`,children:[(0,Y.jsxs)(`div`,{hidden:t===`Raw`,className:`flex flex-col gap-3`,children:[z?(0,Y.jsx)(a,{children:m(`conn.advancedRawBlocksFields`)}):null,t===`Forwards`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(a,{children:m(`conn.forwardLoopbackOnly`)}),L.length===0&&x.filter(ke).length===0?(0,Y.jsx)(`p`,{className:g,children:m(`conn.forwardNoneSaved`)}):(0,Y.jsxs)(i,{children:[L.map(e=>(0,Y.jsx)(r,{label:e.keyword.toLowerCase()===`localforward`?m(`conn.forwardLocal`):m(`conn.forwardDynamic`),stackOnNarrow:!0,action:(0,Y.jsx)(o,{className:`px-2 py-1 text-xs`,disabled:H,onClick:()=>y(v.includes(e.line)?v.filter(t=>t!==e.line):[...v,e.line]),children:v.includes(e.line)?m(`host.keep`):m(`host.remove`)}),children:(0,Y.jsx)(`input`,{"aria-label":`${e.keyword} ${e.line}`,value:re(e),disabled:H||!e.editable||v.includes(e.line),onChange:t=>_({...h,[we(e)]:t.target.value}),className:d})},we(e))),x.filter(ke).map((e,t)=>(0,Y.jsx)(r,{label:e.keyword===`LocalForward`?m(`conn.forwardLocal`):m(`conn.forwardDynamic`),hint:m(`conn.forwardPendingSave`),stackOnNarrow:!0,action:(0,Y.jsx)(o,{className:`px-2 py-1 text-xs`,disabled:H,onClick:()=>S(x.filter(t=>t!==e)),children:m(`host.remove`)}),children:(0,Y.jsx)(`span`,{className:`w-full truncate font-mono text-sm`,children:(e.values??[]).join(` `)})},`new-forward-${t}`))]}),(0,Y.jsxs)(i,{radius:`md`,className:`grid gap-3 p-4 sm:grid-cols-2 sm:items-end 2xl:grid-cols-[10rem_9rem_minmax(12rem,1fr)_auto]`,children:[(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:[m(`conn.forwardType`),(0,Y.jsxs)(`select`,{value:D,disabled:H,onChange:e=>O(e.currentTarget.value),className:d,children:[(0,Y.jsx)(`option`,{value:`local`,children:m(`conn.forwardLocal`)}),(0,Y.jsx)(`option`,{value:`dynamic`,children:m(`conn.forwardDynamic`)})]})]}),(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:[m(`conn.forwardListenPort`),(0,Y.jsx)(`input`,{inputMode:`numeric`,value:k,disabled:H,onChange:e=>A(e.currentTarget.value),className:d})]}),D===`local`?(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-ink-muted sm:col-span-2 2xl:col-span-1`,children:[m(`conn.forwardDestination`),(0,Y.jsx)(`input`,{"aria-label":m(`conn.forwardDestination`),placeholder:`127.0.0.1:5432`,value:j,disabled:H,onChange:e=>M(e.currentTarget.value),className:d})]}):null,(0,Y.jsx)(o,{className:`${l} sm:col-span-2 2xl:col-span-1 ${D===`dynamic`?`2xl:col-start-4`:``}`,disabled:H,onClick:ae,children:m(`conn.forwardAdd`)})]}),(0,Y.jsx)(`p`,{className:g,children:m(D===`local`?`conn.forwardDestinationHint`:`conn.forwardDynamicHint`)})]}):L.length===0?(0,Y.jsx)(`p`,{className:g,children:m(`conn.advancedNoFields`)}):(0,Y.jsx)(i,{children:L.map(e=>(0,Y.jsx)(r,{label:e.keyword,warning:[e.dangerous===!0?m(`host.dangerousField`,{keyword:e.keyword}):``,e.duplicate===!0?m(`host.duplicateKeyword`):``].filter(Boolean).join(` `)||void 0,action:(0,Y.jsx)(o,{className:`px-2 py-1 text-xs`,disabled:H,onClick:()=>y(v.includes(e.line)?v.filter(t=>t!==e.line):[...v,e.line]),children:v.includes(e.line)?m(`host.keep`):m(`host.remove`)}),children:(0,Y.jsx)(`input`,{"aria-label":e.keyword,value:re(e),disabled:H||!e.editable||v.includes(e.line),onChange:t=>_({...h,[we(e)]:t.target.value}),className:d})},we(e)))}),(0,Y.jsxs)(i,{hidden:t!==`Directives`,radius:`md`,className:`flex flex-col gap-3 p-4`,children:[(0,Y.jsx)(`label`,{htmlFor:`new-directive`,className:`text-xs text-ink-muted`,children:m(`host.newDirective`)}),(0,Y.jsx)(`input`,{id:`new-directive`,value:C,disabled:H,onChange:e=>w(e.target.value),className:d}),(0,Y.jsx)(`label`,{htmlFor:`new-value`,className:`text-xs text-ink-muted`,children:m(`host.newValue`)}),(0,Y.jsx)(`input`,{id:`new-value`,value:T,disabled:H,onChange:e=>E(e.target.value),className:d}),(0,Y.jsx)(o,{className:l,disabled:H,onClick:ie,children:m(`host.addDirective`)})]}),R?(0,Y.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-line py-3`,children:[(0,Y.jsx)(o,{disabled:!R,onClick:ne,children:m(`conn.discardChanges`)}),(0,Y.jsx)(o,{kind:`primary`,disabled:!R||H,onClick:W,children:m(`host.saveChanges`)})]}):null]}),(0,Y.jsxs)(`div`,{hidden:t!==`Raw`,className:`flex flex-col gap-2`,children:[R?(0,Y.jsx)(a,{children:m(`conn.advancedFieldsBlockRaw`)}):null,(0,Y.jsx)(`label`,{htmlFor:`block-raw`,className:`text-xs text-ink-muted`,children:m(`host.blockText`)}),(0,Y.jsx)(`textarea`,{id:`block-raw`,"aria-label":m(`host.blockText`),value:P,disabled:te,onChange:e=>F(e.target.value),rows:16,spellCheck:!1,className:`min-h-80 rounded-lg border border-control-line bg-tree p-4 font-mono text-xs leading-5 text-ink focus:border-accent focus:outline-none`}),z?(0,Y.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-line py-3`,children:[(0,Y.jsx)(o,{disabled:!z,onClick:ne,children:m(`conn.discardChanges`)}),(0,Y.jsx)(o,{kind:`primary`,disabled:!z||te,onClick:()=>u(P),children:m(`host.saveBlock`)})]}):null]})]})]})}function Oe(e){let t=e.keyword.toLowerCase();return t===`localforward`||t===`dynamicforward`}function ke(e){return e.action===`add`&&(e.keyword===`LocalForward`||e.keyword===`DynamicForward`)}function Ae(e){let t=Number(e);return/^\d+$/.test(e)&&Number.isInteger(t)&&t>0&&t<=65535}function je(e){let t=/^\[[^\]]+\]:(\d+)$/.exec(e);if(t!==null)return Ae(t[1]??``);let n=e.lastIndexOf(`:`);return n<=0||e.slice(0,n).includes(`:`)?!1:Ae(e.slice(n+1))}function Me({detail:e,alias:t,api:n,disabled:r=!1}){let s=c(),[l,d]=(0,K.useState)(null),p=re(),{clearError:m}=p;(0,K.useEffect)(()=>{d(null),m()},[t,e.file.contents,m]);async function _(){p.busy||r||await p.run(()=>n.effective(t),{apply:d,describe:()=>s(`diag.explainFailed`)})}return(0,Y.jsxs)(`section`,{"aria-label":s(`conn.analysisLabel`),className:`flex flex-col gap-4`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:u,children:s(`conn.analysisExplained`)}),(0,Y.jsx)(`p`,{className:`mt-1 ${g}`,children:s(`conn.analysisExplainedHint`)})]}),(0,Y.jsx)(i,{as:`ul`,radius:`md`,children:e.effective.entries.map((e,t)=>(0,Y.jsxs)(`li`,{className:`grid gap-1 border-t border-hairline px-4 py-2.5 first:border-t-0 sm:grid-cols-[minmax(0,1fr)_minmax(10rem,0.7fr)] sm:items-baseline`,children:[(0,Y.jsx)(`p`,{className:`font-mono text-xs text-ink`,children:`${e.keyword} ${e.values.join(` `)}`}),(0,Y.jsx)(`p`,{className:`${g} break-all font-mono sm:text-right`,children:`${e.source.path??e.source.absolute??``}:${e.source.line??0}`})]},`${e.keyword}-${t}`))}),(0,Y.jsx)(ne,{notices:e.effective.notices??[]})]}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-line pt-5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:u,children:s(`conn.analysisAuthoritative`)}),(0,Y.jsx)(`p`,{className:`mt-1 ${g}`,children:s(`conn.analysisAuthoritativeHint`)})]}),(0,Y.jsx)(o,{disabled:p.busy||r,onClick:()=>void _(),children:p.busy?s(`conn.analysisRunning`):s(`conn.analysisRun`)})]}),p.error===``?null:(0,Y.jsx)(a,{tone:`danger`,children:p.error}),l!==null&&l.executableDirectives.length>0?(0,Y.jsxs)(`div`,{className:`rounded border border-notice-line bg-notice p-3 text-sm`,children:[(0,Y.jsx)(`h4`,{className:`font-medium text-notice-ink`,children:s(`conn.analysisExecutableHeading`)}),(0,Y.jsx)(`p`,{className:g,children:s(`conn.analysisTokenWarning`)}),(0,Y.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:l.executableDirectives.map(e=>(0,Y.jsxs)(`li`,{children:[(0,Y.jsx)(`p`,{className:`text-ink-muted`,children:s(`conn.checksDirectiveAt`,{keyword:e.keyword,path:e.path,line:e.line})}),(0,Y.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-xs text-ink`,children:e.command})]},`${e.path}:${e.line}:${e.keyword}`))})]}):null,l!==null&&l.sources.length>0?(0,Y.jsx)(i,{radius:`md`,overflow:`x-auto`,className:`px-4 py-2`,children:(0,Y.jsxs)(`table`,{"aria-label":s(`conn.analysisSources`),className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:f,children:[(0,Y.jsx)(`th`,{scope:`col`,className:h,children:s(`diag.columnKeyword`)}),(0,Y.jsx)(`th`,{scope:`col`,className:h,children:s(`diag.columnValue`)}),(0,Y.jsx)(`th`,{scope:`col`,className:h,children:s(`diag.columnWhere`)}),(0,Y.jsx)(`th`,{scope:`col`,className:h,children:s(`diag.columnState`)})]})}),(0,Y.jsx)(`tbody`,{children:l.sources.map(e=>(0,Y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,Y.jsx)(`th`,{scope:`row`,className:`py-1.5 pr-3 text-left font-normal text-ink-muted`,children:e.keyword}),(0,Y.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink`,children:e.value}),(0,Y.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink-faint`,children:`${e.path}:${e.line}`}),(0,Y.jsx)(`td`,{className:`py-1.5 text-ink-faint`,children:s(e.winner?`diag.inEffect`:`diag.superseded`)})]},`${e.path}:${e.line}:${e.keyword}`))})]})}):null]})]})}var Ne={password_authentication_off:`password.blocker.authenticationOff`,alias_not_simple:`password.blocker.aliasNotSimple`,identity_file_configured:`password.blocker.identityFile`,host_key_unknown:`password.warn.hostKeyUnknown`,hostname_unresolved:`password.warn.hostNameUnresolved`};function Pe(e,t){return t in Ne?e(Ne[t]):t}function Fe({draft:e,derived:t,secrets:n,serverPasswordError:r,onEdit:i,onChooseAction:s,onOpenVault:l}){let u=c(),{vault:f,credentials:p,credentialOptionsStatus:m}=n;return t.draftHasExplicitKey?t.passwordCleanup?(0,Y.jsx)(`div`,{className:`border-t border-hairline py-3`,children:(0,Y.jsx)(a,{children:u(`conn.basicPasswordCleanup`)})}):null:(0,Y.jsx)(`div`,{className:`border-t border-hairline py-3`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:u(`conn.basicStoredPassword`)}),n.loading||m===`loading`?(0,Y.jsx)(`p`,{className:g,children:u(`conn.createLoadingOptions`)}):null,m===`failed`?(0,Y.jsx)(`p`,{className:g,children:u(`conn.basicCredentialOptionsFailed`)}):null,n.unlocked?(0,Y.jsx)(`p`,{className:g,children:p.assigned?p.assignedCredential===``?u(`conn.basicAssignedDedicated`):u(`conn.basicAssignedNamed`,{name:p.assignedCredential}):u(`conn.basicNoPassword`)}):null]}),f!==null&&!f.unlocked?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-notice-line bg-notice p-3`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-notice-ink`,children:u(f.exists?`conn.basicVaultLocked`:`conn.basicVaultMissing`)}),(0,Y.jsx)(F,{label:u(`conn.createMasterPassword`),value:e.masterPassword,onChange:e=>i({masterPassword:e})}),f.exists?null:(0,Y.jsx)(F,{label:u(`conn.createConfirmMaster`),value:e.masterConfirmation,onChange:e=>i({masterConfirmation:e})}),(0,Y.jsx)(o,{kind:`primary`,disabled:n.vaultBusy||!t.canOpenVault,onClick:l,children:u(f.exists?`conn.createUnlockVault`:`conn.createInitialiseVault`)})]}):null,n.unlocked?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:u(`conn.basicPasswordAction`)}),(0,Y.jsxs)(`select`,{"aria-label":u(`conn.basicPasswordAction`),value:e.passwordAction,onChange:e=>s(e.target.value),className:d,children:[(0,Y.jsx)(`option`,{value:`unchanged`,children:u(`conn.basicPasswordUnchanged`)}),(0,Y.jsx)(`option`,{value:`dedicated_password`,children:u(p.assigned?`conn.basicReplaceDedicated`:`conn.createDedicatedPassword`)}),(0,Y.jsx)(`option`,{value:`saved_password`,children:u(`conn.createSavedPassword`)}),(0,Y.jsx)(`option`,{value:`new_shared_password`,children:u(`conn.createNewSharedPassword`)}),p.assigned?(0,Y.jsx)(`option`,{value:`remove`,children:u(`conn.basicRemovePassword`)}):null]})]}),e.passwordAction===`dedicated_password`?(0,Y.jsx)(F,{label:u(`conn.createConnectionPassword`),value:e.password,onChange:e=>i({password:e}),hint:u(`conn.basicEmptyPasswordUnchanged`)}):e.passwordAction===`saved_password`?(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:u(`conn.createChooseSavedPassword`)}),(0,Y.jsxs)(`select`,{value:t.savedCredential,onChange:e=>i({savedCredential:e.target.value}),className:d,children:[p.passwords.length===0?(0,Y.jsx)(`option`,{value:``,children:u(`conn.createNoSavedPasswords`)}):null,p.passwords.map(e=>(0,Y.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}):e.passwordAction===`new_shared_password`?(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:u(`conn.createSavedPasswordName`)}),(0,Y.jsx)(`input`,{value:e.newCredential,onChange:e=>i({newCredential:e.target.value}),className:d})]}),(0,Y.jsx)(F,{label:u(`conn.createNewPassword`),value:e.newSharedPassword,onChange:e=>i({newSharedPassword:e})})]}):e.passwordAction===`remove`?(0,Y.jsx)(_,{label:u(`conn.basicConfirmRemove`),checked:e.confirmRemove,onChange:e=>i({confirmRemove:e}),tone:`danger`}):null,t.passwordBlockers.map((e,t)=>(0,Y.jsx)(a,{tone:`danger`,children:Pe(u,e.code)},`${e.code}-${t}`)),t.passwordWarnings.map((e,t)=>(0,Y.jsx)(a,{children:Pe(u,e.code)},`${e.code}-${t}`)),r===``?null:(0,Y.jsx)(a,{tone:`danger`,children:r})]}):null]})})}function Ie(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function Le(e){return e.form.fields.filter(e=>Ie(e.keyword,`IdentityFile`))}function Re(e){let t=e.trim();return t!==``&&t.toLocaleLowerCase()!==`none`}function $(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function ze(e,t){switch(t){case`HostName`:return e.form.entry.identity.alias;case`User`:return``;case`Port`:return`22`}}function Be(e,t){let n=e.form.fields.filter(e=>$(e.keyword,t));if(n.length>1)return{keyword:t,value:n.map(e=>U(e.values)).join(` / `),origin:`complex`,editable:!1};if(n.length===1){let r=n[0];return{keyword:t,value:U(r.values)??``,origin:`direct`,source:e.form.entry.file.path===void 0?{absolute:e.form.entry.file.absolute,line:r.line}:{path:e.form.entry.file.path,line:r.line},editable:r.editable}}let r=e.effective.entries.find(e=>$(e.keyword,t));return r===void 0?{keyword:t,value:ze(e,t),origin:`default`,editable:e.form.entry.editable}:{keyword:t,value:U(r.values)??``,origin:`inherited`,source:r.source,editable:e.form.entry.editable}}function Ve(e,t){let n=Be(e,t);return{state:n,value:n.value,inherit:!1}}var He=`__custom__`;function Ue(e){return`~/.ssh/${e.relativePath}`}function We(e,t,n,r){let i=r===null?void 0:t.find(e=>e.id===r.privateKeyId&&e.relativePath===r.privateRelativePath),a=Le(e).filter(e=>e.values.some(Re));if(a.length>1)return{keyState:`complex`,customKey:``,initialKey:``,initialSelected:``,preferredAlreadyApplied:!1};if(a.length===1){let e=U(a[0].values)??``,r=t.find(t=>Ue(t)===e);return!n||r===void 0?{keyState:`custom`,customKey:e,initialKey:He,initialSelected:He,preferredAlreadyApplied:!1}:{keyState:`editable`,customKey:``,initialKey:r.id,initialSelected:i?.id??r.id,preferredAlreadyApplied:i?.id===r.id}}return{keyState:n?`editable`:`loading`,customKey:``,initialKey:``,initialSelected:n?i?.id??``:``,preferredAlreadyApplied:!1}}function Ge(e,t=``){return{hostName:Ve(e,`HostName`),user:Ve(e,`User`),port:Ve(e,`Port`),selectedKey:t,passwordAction:`unchanged`,password:``,savedCredential:``,newCredential:``,newSharedPassword:``,confirmRemove:!1,totpAction:`unchanged`,savedTOTP:``,keyPassphrase:``,keyPassphraseConfirmation:``,masterPassword:``,masterConfirmation:``}}var Ke={password:``,newSharedPassword:``,masterPassword:``,masterConfirmation:``},qe={keyPassphrase:``,keyPassphraseConfirmation:``},Je={...Ke,...qe},Ye={passwordAction:`unchanged`,confirmRemove:!1,newCredential:``};function Xe(e,t){if(!(!e.state.editable||e.state.origin===`complex`)){if(e.inherit||t&&e.value===``&&e.state.origin===`direct`)return e.state.origin===`direct`?{action:`inherit`}:void 0;if(e.value!==e.state.value)return{action:`set`,value:e.value}}}function Ze(e,t,n,r,i){let{hostName:a,user:o,port:s,selectedKey:c}=t,{keyState:l,initialKey:u}=n,{credentials:d,vault:f,eligibility:p,credentialOptionsStatus:m,keyOptionsStatus:h,privateKeys:g}=r,_=d.passwords.some(e=>e.name===t.savedCredential)?t.savedCredential:d.passwords[0]?.name??``,v=d.totps.some(e=>e.name===t.savedTOTP)?t.savedTOTP:d.totps[0]?.name??``,y=Xe(a,!1),b=Xe(o,!0),x=s.inherit?s.state.origin===`direct`?{action:`inherit`}:void 0:s.value===s.state.value?void 0:{action:`set`,value:Number(s.value)},S=l!==`editable`||c===u?void 0:c===``?{action:`inherit`}:{action:`set`,keyId:c},C=g.find(e=>e.id===c),w=l===`custom`||l===`complex`||l===`editable`&&c!==``,T=d.assigned&&w,E=y!==void 0||b!==void 0||x!==void 0,D=d.assigned&&!w&&t.passwordAction===`unchanged`&&(E||p?.passwordBinding===`stale`),O=d.assignedTOTP!==``&&t.totpAction===`unchanged`&&(E||p?.totpBinding===`stale`),k=C===void 0?void 0:d.keyPassphrases.find(e=>e.uses.includes(C.relativePath)),A=C!==void 0&&(f?.dedicatedKeyPassphrases??[]).includes(C.relativePath),j=A?`dedicated`:k===void 0?`none`:`named:${k.name}`,M=k===void 0||C===void 0?[]:k.uses.filter(e=>e!==C.relativePath),N=a.inherit?``:a.value===``?i(`conn.createHostRequired`):H(a.value)?``:i(`conn.createHostInvalid`),P=o.value!==``&&/[\s\p{Cc}]/u.test(o.value)?i(`conn.createUserInvalid`):``,F=Number(s.value),ee=s.inherit||/^\d+$/.test(s.value)&&F>=1&&F<=65535?``:i(`conn.createPortInvalid`),I=(()=>{if(T)return{kind:`remove`};switch(t.passwordAction){case`dedicated_password`:return t.password===``?{kind:`unchanged`}:{kind:`dedicated_password`,password:t.password};case`saved_password`:return _===``?{kind:`unchanged`}:{kind:`saved_password`,credential:_};case`new_shared_password`:return t.newCredential===``||t.newSharedPassword===``?{kind:`unchanged`}:{kind:`new_shared_password`,credential:t.newCredential,password:t.newSharedPassword};case`remove`:return t.confirmRemove&&d.assigned?{kind:`remove`}:{kind:`unchanged`};case`confirm_route`:return{kind:`confirm_route`};case`unchanged`:return D?{kind:`confirm_route`}:{kind:`unchanged`}}})(),L=C!==void 0&&C.encrypted&&t.keyPassphrase!==``?{kind:`set_dedicated`,keyId:C.id,passphrase:t.keyPassphrase}:{kind:`unchanged`},R=t.totpAction===`saved_totp`?v===``?{kind:`unchanged`}:{kind:`saved_totp`,credential:v}:t.totpAction===`remove`?{kind:`remove`}:t.totpAction===`confirm_route`||O?{kind:`confirm_route`}:{kind:`unchanged`},z=I.kind!==`unchanged`,B=R.kind!==`unchanged`,V=t.keyPassphrase!==``||t.keyPassphraseConfirmation!==``,U=!V||t.keyPassphrase!==``&&t.keyPassphrase===t.keyPassphraseConfirmation,te=(p?.blockers??[]).filter(e=>e.code!==`identity_file_configured`),ne=(p?.warnings??[]).filter(e=>e.code!==`identity_file_configured`),re=I.kind===`remove`||I.kind===`unchanged`||!w&&te.length===0,W=y!==void 0||b!==void 0||x!==void 0||S!==void 0||z||V||B,ie=f?.unlocked===!0&&m===`ready`,ae=ie&&p!==null,G=ie&&h===`ready`,oe=ie,se=f===null||f.unlocked,K=N===``&&P===``&&ee===``&&re&&U&&(!z||ae)&&(!V||G)&&(!B||oe),ce=z&&!ae||V&&!G||B&&!oe,le=f?.minPassphraseLength??12,ue=f!==null&&t.masterPassword.length>=le&&(f.exists||t.masterConfirmation===t.masterPassword);function q(){let t={identity:e.form.entry.identity,base:e.file.contents,password:I,keyPassphrase:L,totp:R};return y!==void 0&&(t.hostName=y),b!==void 0&&(t.user=b),x!==void 0&&(t.port=x),S!==void 0&&(t.identityFile=S),t}return{savedCredential:_,savedTOTP:v,identityFileChange:S,selectedPrivateKey:C,draftHasExplicitKey:w,passwordCleanup:T,confirmPasswordRoute:D,confirmTOTPRoute:O,namedKeyPassphrase:k,dedicatedKeyPassphrase:A,keyPassphraseStorageState:j,otherNamedKeyUses:M,hostError:N,userError:P,portError:ee,passwordChange:I,keyPassphraseChange:L,changesPassword:z,changesTOTP:B,hasKeyPassphraseDraft:V,keyPassphraseValid:U,passwordBlockers:te,passwordWarnings:ne,passwordAllowed:re,dirty:W,valid:K,needsVault:ce,vaultAllowsConfig:se,canOpenVault:ue,request:q}}function Qe({draft:e,derived:t,keySelection:n,secrets:i,preferredKey:o,serverKeyError:s,serverKeyPassphraseError:l,passphraseOpen:u,onPassphraseOpenChange:f,onSelectKey:p,onEdit:m}){let h=c(),{keyState:_,customKey:v}=n,{selectedPrivateKey:y,identityFileChange:b}=t;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(r,{label:h(`conn.basicPrivateKey`),warning:s||void 0,hint:_===`custom`?h(`conn.basicCustomKey`,{path:v}):_===`complex`?h(`conn.basicComplexKey`):void 0,children:(0,Y.jsxs)(`select`,{"aria-label":h(`conn.basicPrivateKey`),value:e.selectedKey,disabled:i.loading||i.keyOptionsStatus!==`ready`||_===`custom`||_===`complex`,onChange:e=>p(e.target.value),className:d,children:[(0,Y.jsx)(`option`,{value:``,children:h(`conn.basicAgentOrInherited`)}),_===`custom`?(0,Y.jsx)(`option`,{value:He,children:v}):null,i.privateKeys.map(e=>(0,Y.jsxs)(`option`,{value:e.id,children:[e.relativePath,e.fingerprint===``?``:` · ${e.fingerprint}`]},e.id))]})}),o!==null&&b?.action===`set`&&b.keyId===o.privateKeyId?(0,Y.jsx)(`p`,{className:`border-t border-hairline px-3 py-2 text-xs text-notice-ink`,children:h(`conn.basicGeneratedKeyStaged`,{path:o.privateRelativePath})}):null,i.unlocked&&_===`editable`&&y!==void 0&&y.encrypted?(0,Y.jsxs)(`details`,{open:u,onToggle:e=>f(e.currentTarget.open),className:`border-t border-hairline`,children:[(0,Y.jsx)(`summary`,{className:`cursor-pointer px-3 py-3 text-sm font-medium text-ink`,children:h(`conn.basicManageKeyPassphrase`)}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-hairline py-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:h(`conn.basicKeyPassphraseHeading`)}),(0,Y.jsx)(`p`,{className:g,children:t.dedicatedKeyPassphrase?h(`conn.basicKeyPassphraseDedicated`):t.namedKeyPassphrase===void 0?h(`conn.basicKeyPassphraseNone`):h(`conn.basicKeyPassphraseShared`,{name:t.namedKeyPassphrase.name})}),t.namedKeyPassphrase!==void 0&&t.otherNamedKeyUses.length>0?(0,Y.jsx)(`p`,{className:g,children:h(`conn.basicKeyPassphraseSharedOthers`,{count:t.otherNamedKeyUses.length})}):null,t.namedKeyPassphrase===void 0?null:(0,Y.jsx)(`p`,{className:g,children:h(`conn.basicKeyPassphraseDetach`)})]}),(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(F,{label:h(`conn.basicNewKeyPassphrase`),value:e.keyPassphrase,onChange:e=>m({keyPassphrase:e})}),(0,Y.jsx)(F,{label:h(`conn.basicConfirmKeyPassphrase`),value:e.keyPassphraseConfirmation,onChange:e=>m({keyPassphraseConfirmation:e})})]}),t.hasKeyPassphraseDraft&&!t.keyPassphraseValid?(0,Y.jsx)(a,{tone:`danger`,children:h(`conn.basicKeyPassphraseMismatch`)}):null,(0,Y.jsx)(`p`,{className:g,children:h(`conn.basicKeyPassphraseStoredNote`)}),l===``?null:(0,Y.jsx)(a,{tone:`danger`,children:l})]})]}):null,y!==void 0&&!y.encrypted?(0,Y.jsx)(`p`,{className:`border-t border-hairline py-3 ${g}`,children:h(`conn.basicKeyPassphraseUnencrypted`)}):null]})}function $e({draft:e,derived:t,secrets:n,onEdit:r}){let i=c(),{credentials:a,credentialOptionsStatus:o}=n;return(0,Y.jsx)(`div`,{className:`border-t border-hairline py-3`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:i(`conn.basicStoredTOTP`)}),n.loading||o===`loading`?(0,Y.jsx)(`p`,{className:g,children:i(`conn.createLoadingOptions`)}):null,o===`failed`?(0,Y.jsx)(`p`,{className:g,children:i(`conn.basicCredentialOptionsFailed`)}):null,n.unlocked?(0,Y.jsx)(`p`,{className:g,children:a.assignedTOTP===``?i(`conn.basicNoTOTP`):i(`conn.basicAssignedTOTP`,{name:a.assignedTOTP})}):null]}),n.unlocked?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:i(`conn.basicTOTPAction`)}),(0,Y.jsxs)(`select`,{"aria-label":i(`conn.basicTOTPAction`),value:e.totpAction,onChange:e=>r({totpAction:e.target.value}),className:d,children:[(0,Y.jsx)(`option`,{value:`unchanged`,children:i(`conn.basicTOTPUnchanged`)}),(0,Y.jsx)(`option`,{value:`saved_totp`,children:i(`conn.basicUseSavedTOTP`)}),a.assignedTOTP===``?null:(0,Y.jsx)(`option`,{value:`remove`,children:i(`conn.basicRemoveTOTP`)})]})]}),e.totpAction===`saved_totp`?(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium tracking-wide text-ink-muted`,children:i(`conn.basicChooseSavedTOTP`)}),(0,Y.jsxs)(`select`,{value:t.savedTOTP,onChange:e=>r({savedTOTP:e.target.value}),className:d,children:[a.totps.length===0?(0,Y.jsx)(`option`,{value:``,children:i(`conn.basicNoSavedTOTPs`)}):null,a.totps.map(e=>(0,Y.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}):null,(0,Y.jsx)(`p`,{className:g,children:i(`conn.basicTOTPNote`)})]}):null]})})}var et={passwords:[],keyPassphrases:[],totps:[],assigned:!1,assignedCredential:``,assignedTOTP:``};function tt(e,t,n){let r=n.filter(e=>e.kind===`password`),i=n.filter(e=>e.kind===`totp`);return{passwords:r,keyPassphrases:n.filter(e=>e.kind===`key_passphrase`),totps:i,assigned:t?.aliases.includes(e)??!1,assignedCredential:r.find(t=>t.uses.includes(e))?.name??``,assignedTOTP:i.find(t=>t.uses.includes(e))?.name??``}}function nt({detail:e,resetKey:t,keys:n,secrets:r,savedState:i}){let a=c(),o=e.form.entry.identity.alias,[s,l]=(0,K.useState)([]),[u,d]=(0,K.useState)(`loading`),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(et),[v,y]=(0,K.useState)(`loading`),[b,x]=(0,K.useState)(!0),[S,C]=(0,K.useState)(!1),[w,T]=(0,K.useState)(``),[E,D]=(0,K.useState)(0);(0,K.useEffect)(()=>{T(``),x(!0),d(`loading`),y(`loading`);let e=!0;if(i!==void 0){let t=i.keys.status===`ready`;l(i.keys.status===`ready`?i.keys.value:[]),d(t?`ready`:`failed`);let n=i.vault.status===`ready`?i.vault.value:null;return p(n),h(i.eligibility.status===`ready`?i.eligibility.value:null),n!==null&&i.credentials.status===`ready`?(_(tt(o,n,i.credentials.value)),y(`ready`)):(_(tt(o,n,[])),y(i.credentials.status===`locked`?`locked`:`failed`)),x(!1),D(e=>e+1),()=>{e=!1}}return Promise.all([n.inventory(),r.passwordVault(),r.passwordEligibility(o)]).then(async([t,n,i])=>{let a=n.unlocked?(await r.credentials()).credentials:[];e&&(l(W(t)),d(`ready`),p(n),h(i),_(tt(o,n,a)),y(n.unlocked?`ready`:`locked`),x(!1),D(e=>e+1))}).catch(()=>{e&&(T(a(`conn.basicOptionsFailed`)),d(`failed`),y(`failed`),x(!1),D(e=>e+1))}),()=>{e=!1}},[t,n,r,a,i]);async function O(e){if(f===null)return!1;C(!0),T(``);try{let t=f.exists?await r.unlockVault(e):await r.initialiseVault(e),[n,i]=t.unlocked?await Promise.all([r.credentials().then(e=>e.credentials),r.passwordEligibility(o)]):[[],m];return p(t),_(tt(o,t,n)),h(i),y(t.unlocked?`ready`:`locked`),t.unlocked}catch{return T(a(f.exists?`conn.createUnlockFailed`:`conn.createVaultFailed`)),!1}finally{C(!1)}}async function k(){try{let e=await r.passwordVault(),t=e.unlocked?(await r.credentials()).credentials:[];p(e),_(tt(o,e,t)),y(e.unlocked?`ready`:`locked`)}catch{y(`failed`),T(a(`conn.basicRefreshFailed`))}}return{privateKeys:s,keyOptionsStatus:u,vault:f,eligibility:m,credentials:g,credentialOptionsStatus:v,loading:b,vaultBusy:S,error:w,setError:T,generation:E,openVault:O,refreshCredentials:k,unlocked:f?.unlocked===!0&&v===`ready`}}function rt(e,t){return e.origin===`direct`?t(`conn.basicThisConnection`):e.origin==="default"?t(`conn.basicSSHDefault`):e.origin===`complex`?t(`conn.basicReadOnlyAdvanced`):t(`conn.basicInheritedFrom`,{path:e.source?.path??e.source?.absolute??``,line:e.source?.line??0})}function it({field:e,label:t,error:n,inheritLabel:r,onChange:i,onInherit:a,numeric:o=!1}){let s=c(),l=(0,K.useId)(),u=e.state.origin===`direct`?``:rt(e.state,s),f=e.state.origin===`complex`?s(`conn.basicComplex`,{keyword:e.state.keyword}):n;return(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(`label`,{htmlFor:l,className:`text-sm text-ink-muted`,children:t}),(0,Y.jsx)(`input`,{id:l,type:o?`number`:`text`,...o?{min:1,max:65535}:{},value:e.value,disabled:!e.state.editable||e.state.origin===`complex`,onChange:e=>i(e.target.value),"aria-invalid":f!==``||void 0,"aria-describedby":u!==``||f!==``?`${l}-detail`:void 0,className:d}),u===``&&f===``?null:(0,Y.jsxs)(`div`,{id:`${l}-detail`,className:`space-y-1 text-xs`,children:[u===``?null:(0,Y.jsx)(`p`,{className:`text-ink-muted`,children:u}),f===``?null:(0,Y.jsx)(`p`,{className:`text-notice-ink`,children:f})]}),e.state.origin===`direct`?(0,Y.jsx)(`button`,{type:`button`,"aria-pressed":e.inherit,onClick:a,className:`self-start rounded py-1 text-left text-xs underline-offset-4 hover:text-accent hover:underline ${e.inherit?`font-medium text-notice-ink`:`text-ink-muted`}`,children:e.inherit?s(`conn.basicKeepDirect`):r}):null]})}function at({detail:e,problem:t,onSave:n,keys:r=ie,secrets:i=Ce,preferredKey:s=null,onPreferredKeyApplied:l,savedState:d,onDirtyChange:f,onDiscardReady:p,onRequestRefresh:m,disabled:h=!1}){let _=c(),v=e.form.entry.identity,y=`${N(v)}\u0000${e.file.contents}`,b=nt({detail:e,resetKey:y,keys:r,secrets:i,savedState:d}),x=(0,K.useMemo)(()=>We(e,b.privateKeys,b.keyOptionsStatus===`ready`,s),[e,b.privateKeys,b.keyOptionsStatus,s]),[S,C]=(0,K.useState)(()=>Ge(e)),[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(!1),[A,j]=(0,K.useState)(!1),M=Ze(e,S,x,b,_),{setError:P}=b;function F(e,t=!1){C(t=>({...t,...e})),t&&P(``)}(0,K.useEffect)(()=>(C(Ge(e)),j(!1),T(!1),()=>{C(e=>({...e,...Je}))}),[y,r,i,_,s,d]),(0,K.useEffect)(()=>{C(e=>({...e,selectedKey:x.initialSelected})),x.preferredAlreadyApplied&&l?.()},[x]);let ee=M.selectedPrivateKey?.encrypted===!0?M.selectedPrivateKey.id:``;(0,K.useEffect)(()=>{b.credentialOptionsStatus!==`ready`||ee===``||D(M.keyPassphraseStorageState===`none`)},[b.credentialOptionsStatus,ee,M.keyPassphraseStorageState]),(0,K.useEffect)(()=>{M.draftHasExplicitKey&&C(e=>({...e,...Ke,...Ye}))},[M.draftHasExplicitKey]),(0,K.useEffect)(()=>{f?.(M.dirty)},[M.dirty,f]);let L=(0,K.useCallback)(()=>{C(Ge(e,x.initialKey)),P(``),j(!1)},[e,x.initialKey,P]);(0,K.useEffect)(()=>(p?.(L),()=>p?.(null)),[L,p]);function R(e){F({selectedKey:e,...qe});let t=s!==null&&e!==s.privateKeyId;T(t),t&&e===x.initialKey&&l?.()}function z(e){F({...Ke,confirmRemove:!1,passwordAction:e},!0)}async function B(){await b.openVault(S.masterPassword),F(Je)}async function V(){if(!U)return;let e=M.request(),{identityFileChange:t,keyPassphraseChange:r}=M;k(!0),P(``);try{await n(e),r.kind!==`unchanged`&&D(!1),s!==null&&(w||t?.action===`set`&&t.keyId===s.privateKeyId)&&l?.(),F({...Je,...Ye,totpAction:`unchanged`}),m===void 0?d===void 0&&await b.refreshCredentials():await m()}catch{F(Je),P(_(`conn.basicSaveFailed`))}finally{k(!1)}}function H(e){if(e.preventDefault(),U){if(M.confirmPasswordRoute||M.confirmTOTPRoute){j(!0);return}V()}}let U=!h&&!b.loading&&!O&&M.vaultAllowsConfig&&M.dirty&&M.valid,te=t?.code===`connection_hostname_invalid`?_(`conn.createHostInvalid`):``,ne=t?.code===`connection_user_invalid`?_(`conn.createUserInvalid`):``,re=t?.code===`connection_port_invalid`?_(`conn.createPortInvalid`):``,W=t?.code===`identity_file_invalid`?_(`conn.basicServerKeyInvalid`):``,ae=t?.code===`wrong_passphrase`?_(`conn.basicKeyPassphraseWrong`):t?.code===`external_change`?_(`conn.basicKeyPassphraseChanged`):``,G=t?.code===`credential_already_exists`?_(`conn.basicCredentialExists`):t?.code===`unknown_credential`?_(`conn.basicCredentialMissing`):t?.code===`password_missing`?_(`conn.basicPasswordMissing`):t?.code===`password_ineligible`?_(`conn.basicPasswordBlocked`):t?.code===`password_empty`?_(`conn.createNeedConnectionPassword`):``,oe=e=>({field:S[e],onChange:t=>F({[e]:{...S[e],value:t,inherit:!1}},!0),onInherit:()=>F({[e]:{...S[e],inherit:!S[e].inherit}})});return(0,Y.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:H,children:[b.error===``||t!==null?null:(0,Y.jsx)(a,{tone:`danger`,children:b.error}),(0,Y.jsxs)(`fieldset`,{disabled:h,className:`contents`,children:[(0,Y.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-labelledby":`basic-connection-heading`,children:[(0,Y.jsx)(`h3`,{id:`basic-connection-heading`,className:u,children:_(`conn.basicConnection`)}),(0,Y.jsxs)(`div`,{className:`grid gap-x-4 gap-y-3 sm:grid-cols-2`,children:[(0,Y.jsx)(`div`,{className:`sm:col-span-2`,children:(0,Y.jsx)(it,{...oe(`hostName`),label:_(`conn.basicHostName`),error:M.hostError||te,inheritLabel:_(`conn.basicUseInheritedHost`)})}),(0,Y.jsx)(it,{...oe(`user`),label:_(`conn.basicUser`),error:M.userError||ne,inheritLabel:_(`conn.basicUseInheritedUser`)}),(0,Y.jsx)(it,{...oe(`port`),label:_(`conn.basicPort`),error:M.portError||re,inheritLabel:_(`conn.basicUseInheritedPort`),numeric:!0})]})]}),(0,Y.jsxs)(`section`,{className:`flex flex-col gap-3 border-t border-line pt-4`,"aria-labelledby":`basic-auth-heading`,children:[(0,Y.jsx)(`h3`,{id:`basic-auth-heading`,className:u,children:_(`conn.basicAuthentication`)}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(Qe,{draft:S,derived:M,keySelection:x,secrets:b,preferredKey:s,serverKeyError:W,serverKeyPassphraseError:ae,passphraseOpen:E,onPassphraseOpenChange:D,onSelectKey:R,onEdit:e=>F(e,!0)}),(0,Y.jsx)(Fe,{draft:S,derived:M,secrets:b,serverPasswordError:G,onEdit:e=>F(e),onChooseAction:z,onOpenVault:()=>void B()}),(0,Y.jsx)($e,{draft:S,derived:M,secrets:b,onEdit:e=>F(e,`totpAction`in e)})]})]}),M.dirty?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-3 border-t border-line py-3`,children:[M.needsVault?(0,Y.jsx)(`p`,{className:`grow ${g}`,children:_(`conn.basicNeedVault`)}):M.passwordAllowed?(0,Y.jsx)(`span`,{className:`grow`}):(0,Y.jsx)(`p`,{className:`grow ${g}`,children:_(`conn.basicPasswordBlocked`)}),(0,Y.jsx)(o,{type:`button`,disabled:!M.dirty||O,onClick:L,children:_(`conn.discardChanges`)}),(0,Y.jsx)(o,{type:`submit`,kind:`primary`,disabled:!U,children:_(O?`conn.basicSaving`:`conn.basicSave`)})]}):null]}),A?(0,Y.jsx)(I,{id:`connection-route-confirmation-heading`,heading:_(`conn.basicRouteConfirmHeading`),body:(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:_(`conn.basicRouteConfirmBody`)}),confirmLabel:_(`conn.basicRouteConfirmSave`),cancelLabel:_(`conn.basicRouteConfirmCancel`),confirmKind:`primary`,onConfirm:()=>{j(!1),V()},onCancel:()=>j(!1)}):null]})}function ot({alias:e,api:t,disabled:n,resetKey:r}){let i=c(),[s,l]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)([]),[h,_]=(0,K.useState)(``),[v,y]=(0,K.useState)(``),[b,x]=(0,K.useState)(null);(0,K.useEffect)(()=>{l(null),f(null),m([]),_(``),y(``),x(null)},[e,r]);async function S(){if(!(n||b!==null)){x(`reachability`),_(``);try{l(await t.reachability(e))}catch{l(null),_(i(`diag.reachabilityFailed`))}finally{x(null)}}}async function C(n){x(`authentication`),y(``);try{f(await t.authentication(e,n)),m([])}catch{f(null),y(i(`diag.authenticationFailed`))}finally{x(null)}}async function w(){if(!(n||b!==null)){x(`authentication`),y(``),m([]);try{let n=await t.effective(e);if(n.executableDirectives.length>0){m(n.executableDirectives);return}f(await t.authentication(e,!1))}catch{f(null),y(i(`diag.authenticationFailed`))}finally{x(null)}}}let T=n||b!==null;return(0,Y.jsxs)(`section`,{"aria-label":i(`conn.checksLabel`),className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Y.jsx)(o,{disabled:T,onClick:()=>void S(),className:`max-w-full whitespace-normal text-left text-xs`,children:i(b===`reachability`?`conn.checking`:`conn.checkReachability`)}),(0,Y.jsx)(o,{disabled:T,onClick:()=>void w(),className:`max-w-full whitespace-normal text-left text-xs`,children:i(b===`authentication`?`conn.checking`:`conn.checkAuthentication`)}),n?(0,Y.jsx)(`p`,{className:`w-full ${g}`,children:i(`conn.summaryDraftBlocksActions`)}):null]}),h===``?null:(0,Y.jsx)(a,{tone:`danger`,children:h}),v===``?null:(0,Y.jsx)(a,{tone:`danger`,children:v}),p.length===0?null:(0,Y.jsxs)(`div`,{className:`rounded border border-notice-line bg-notice p-3 text-sm`,children:[(0,Y.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:i(`conn.checksExecutableHeading`)}),(0,Y.jsx)(`p`,{className:g,children:i(`conn.checksExecutableHint`)}),(0,Y.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:p.map(e=>(0,Y.jsxs)(`li`,{children:[(0,Y.jsx)(`p`,{className:`text-ink-muted`,children:i(`conn.checksDirectiveAt`,{keyword:e.keyword,path:e.path,line:e.line})}),(0,Y.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-xs text-ink`,children:e.command})]},`${e.path}:${e.line}:${e.keyword}`))}),(0,Y.jsx)(o,{className:`mt-3`,disabled:b!==null,onClick:()=>void C(!0),children:i(`conn.checksAcknowledge`)})]}),s===null&&d===null?null:(0,Y.jsxs)(`div`,{className:`grid border-t border-line pt-3 sm:grid-cols-2 sm:divide-x sm:divide-line`,children:[s===null?null:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5 p-3 text-sm`,children:[(0,Y.jsx)(`h3`,{className:u,children:i(`diag.reachability`)}),(0,Y.jsx)(`p`,{className:`font-mono text-xs text-ink`,children:s.address}),(0,Y.jsx)(`p`,{className:`font-medium text-ink`,children:s.outcome}),(0,Y.jsx)(`p`,{className:g,children:s.notice})]}),d===null?null:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t border-line p-3 text-sm sm:border-t-0`,children:[(0,Y.jsx)(`h3`,{className:u,children:i(`diag.authentication`)}),(0,Y.jsx)(`p`,{className:`font-medium text-ink`,children:d.outcome}),d.method===``?null:(0,Y.jsx)(`p`,{className:g,children:i(`diag.authenticationMethod`,{method:d.method})}),d.detail===``?null:(0,Y.jsx)(`pre`,{className:`whitespace-pre-wrap break-all font-mono text-xs text-ink-muted`,children:d.detail})]})]})]})}function st(e){let t=e.form.entry.file.path??e.form.entry.file.absolute;return e.effective.entries.filter(e=>(e.source.path??e.source.absolute)!==t)}function ct({detail:e,onMetadata:t}){let n=c(),r=[...e.form.notices??[],...e.effective.notices??[]],i=st(e);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,Y.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:n(`inspector.appOnly`)}),(0,Y.jsx)(`p`,{className:`mt-1 ${g}`,children:n(`inspector.hostSavesImmediately`)})]}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 rounded-md bg-tree p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(p,{label:n(`host.colour`),children:(0,Y.jsx)(`input`,{type:`color`,value:e.metadata.colour===void 0||e.metadata.colour===``?`#8e8e93`:e.metadata.colour,onChange:n=>t({...e.metadata,colour:n.target.value}),className:`h-8 w-14 rounded border border-control-line bg-control`})}),e.metadata.colour===void 0||e.metadata.colour===``?null:(0,Y.jsx)(o,{className:`self-start`,onClick:()=>t({...e.metadata,colour:``}),children:n(`host.clearColour`)})]}),(0,Y.jsx)(p,{label:n(`host.os`),hint:n(`host.osHint`),interactiveChildren:!0,children:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(A,{os:e.metadata.os||e.metadata.detectedOS||``}),(0,Y.jsxs)(`select`,{"aria-label":n(`host.os`),value:e.metadata.os??``,onChange:n=>t({...e.metadata,os:n.target.value}),className:d,children:[(0,Y.jsx)(`option`,{value:``,children:n(`host.osAutomatic`)}),j.map(([e,t])=>(0,Y.jsx)(`option`,{value:e,children:e===`server`?n(`host.osGeneric`):t},e))]})]})}),(0,Y.jsx)(p,{label:n(`connection.paletteLabel`),hint:n(`connection.paletteHint`),children:(0,Y.jsx)(G,{choices:oe,value:e.metadata.appearance?.palette??``,onChange:n=>t(P(e.metadata,{palette:n})),unchosen:n(`terminal.paletteFollowsOverall`)})}),(0,Y.jsx)(p,{label:n(`connection.fontLabel`),hint:n(`connection.fontHint`),children:(0,Y.jsx)(G,{choices:se,value:e.metadata.appearance?.font??``,onChange:n=>t(P(e.metadata,{font:n})),unchosen:n(`terminal.fontFollowsOverall`)})}),(0,Y.jsx)(p,{label:n(`connection.backgroundLabel`),hint:n(`connection.backgroundHint`),interactiveChildren:!0,children:(0,Y.jsx)(ae,{value:e.metadata.appearance?.background??``,onChange:n=>t(P(e.metadata,{background:n})),tint:e.metadata.appearance?.backgroundTint,onTintChange:n=>t(P(e.metadata,{backgroundTint:n})),unchosen:n(`terminal.backgroundFollowsOverall`)})}),(0,Y.jsx)(p,{label:n(`connection.encodingLabel`),hint:n(`connection.encodingHint`),children:(0,Y.jsxs)(`select`,{value:e.metadata.encoding??``,onChange:n=>{let r={...e.metadata},i=n.target.value;i===``?delete r.encoding:r.encoding=i,t(r)},className:d,children:[(0,Y.jsx)(`option`,{value:``,children:n(`connection.encodingUTF8`)}),(0,Y.jsx)(`option`,{value:`shift_jis`,children:n(`connection.encodingShiftJIS`)}),(0,Y.jsx)(`option`,{value:`euc-jp`,children:n(`connection.encodingEUCJP`)}),(0,Y.jsx)(`option`,{value:`iso-2022-jp`,children:n(`connection.encodingISO2022JP`)})]})}),(0,Y.jsx)(p,{label:n(`connection.osc52Label`),hint:n(`connection.osc52Hint`),children:(0,Y.jsxs)(`select`,{value:e.metadata.osc52??``,onChange:n=>{let r={...e.metadata},i=n.target.value;i===``?delete r.osc52:r.osc52=i,t(r)},className:d,children:[(0,Y.jsx)(`option`,{value:``,children:n(`connection.osc52Inherit`)}),(0,Y.jsx)(`option`,{value:`allow`,children:n(`connection.osc52Allow`)}),(0,Y.jsx)(`option`,{value:`deny`,children:n(`connection.osc52Deny`)})]})}),(0,Y.jsx)(p,{label:n(`host.tags`),children:(0,Y.jsx)(`input`,{value:(e.metadata.tags??[]).join(`, `),onChange:n=>t({...e.metadata,tags:n.target.value.split(`,`).map(e=>e.trim()).filter(e=>e!==``)}),className:d})}),(0,Y.jsx)(p,{label:n(`host.displayOrder`),children:(0,Y.jsx)(`input`,{type:`number`,value:String(e.metadata.order??0),onChange:n=>t({...e.metadata,order:Number(n.target.value)||0}),className:d})})]})]}),(0,Y.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h3`,{className:m,children:n(`inspector.notices`)}),r.length===0?(0,Y.jsx)(`p`,{className:g,children:n(`inspector.noNotices`)}):(0,Y.jsx)(ne,{notices:r})]}),(0,Y.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h3`,{className:m,children:n(`inspector.inherited`)}),i.length===0?(0,Y.jsx)(`p`,{className:g,children:n(`inspector.noInherited`)}):(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-lg bg-tree`,children:i.map((e,t)=>(0,Y.jsx)(`li`,{className:`border-t border-hairline px-3 py-2 font-mono text-xs text-ink-muted first:border-t-0`,children:`${e.keyword} ${e.values.join(` `)} · ${e.source.path??e.source.absolute??``}:${e.source.line??0}`},`${e.keyword}-${t}`))})]})]})}var lt={...z,...Ce},ut=[{area:`Basic`,label:`conn.areaBasic`},{area:`Analysis`,label:`conn.areaAnalysis`},{area:`Advanced`,label:`conn.areaAdvanced`},{area:`Sshc`,label:`conn.areaSshc`}],dt=ut.map(e=>e.area);function ft({detail:e,savedState:t,preview:n,problem:r,onFieldEdits:i,onBlockRaw:a,onBasicSave:o,onMetadata:s,integrations:l=lt,panel:u,advanced:d,onLocationChange:f,preferredKey:p,onPreferredKeyApplied:m,onDirtyChange:h,onBasicDiscardReady:g,onRequestRefresh:_,disabled:v=!1,savedRevision:y=0}){let x=c(),[S,C]=(0,K.useState)(`Basic`),[w,T]=(0,K.useState)(`Jump`),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(!1),A=u??S,j=A===`Advanced`?d??w:w,M=E||O,P=e.form.entry.identity,F=`${N(P)}\u0000${e.file.contents}\u0000${y}`;(0,K.useEffect)(()=>{A===`Advanced`&&T(j)},[j,A]),(0,K.useEffect)(()=>{u===void 0&&C(`Basic`),T(`Jump`),D(!1),k(!1)},[F]),(0,K.useEffect)(()=>h?.(M),[M,h]);let ee=(0,K.useCallback)(e=>D(e),[]),I=(0,K.useCallback)(e=>k(e),[]);function L(e){f===void 0?C(e):f(e,j)}function R(e){T(e),f===void 0?C(`Advanced`):f(`Advanced`,e)}return(0,Y.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,Y.jsx)(ne,{notices:e.form.notices??[]}),A===`Basic`&&P.alias!==``?(0,Y.jsx)(ot,{alias:P.alias,api:l,disabled:v||M,resetKey:F}):null,(0,Y.jsxs)(`div`,{"data-connection-editor":!0,className:`min-w-0`,children:[(0,Y.jsx)(`div`,{role:`tablist`,"aria-label":x(`conn.editorLabel`),className:`grid grid-cols-4 border-b border-line`,children:ut.map((e,t)=>(0,Y.jsx)(`button`,{id:`connection-area-${e.area.toLowerCase()}-tab`,type:`button`,role:`tab`,"aria-selected":A===e.area,"aria-controls":`connection-area-${e.area.toLowerCase()}-panel`,tabIndex:A===e.area?0:-1,onClick:()=>L(e.area),onKeyDown:e=>b(e,t,dt,L),className:`min-h-11 whitespace-nowrap border-b-2 px-2 py-2.5 text-sm transition-colors ${A===e.area?`border-accent bg-select-fill font-semibold text-accent`:`border-transparent text-ink-muted hover:bg-hover hover:text-ink`}`,children:x(e.label)},e.area))}),(0,Y.jsxs)(`div`,{className:`pt-5`,children:[(0,Y.jsxs)(`div`,{id:`connection-area-basic-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-basic-tab`,hidden:A!==`Basic`,className:`flex flex-col gap-5`,children:[P.alias===``?(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:x(`host.noDestination`)}):null,(0,Y.jsx)(at,{detail:e,savedState:t,problem:r,onSave:o,secrets:l,preferredKey:p,onPreferredKeyApplied:m,onDirtyChange:ee,onDiscardReady:g,onRequestRefresh:_,disabled:v||O})]}),(0,Y.jsx)(`div`,{id:`connection-area-analysis-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-analysis-tab`,hidden:A!==`Analysis`,children:(0,Y.jsx)(Me,{detail:e,alias:P.alias,api:l,disabled:v||M})}),(0,Y.jsx)(`div`,{id:`connection-area-advanced-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-advanced-tab`,hidden:A!==`Advanced`,children:(0,Y.jsx)(De,{detail:e,area:j,onAreaChange:R,onFieldEdits:i,onBlockRaw:a,disabled:v||E,onDirtyChange:I})}),(0,Y.jsx)(`div`,{id:`connection-area-sshc-panel`,role:`tabpanel`,"aria-labelledby":`connection-area-sshc-tab`,hidden:A!==`Sshc`,children:(0,Y.jsx)(ct,{detail:e,onMetadata:s})})]})]}),(0,Y.jsx)(te,{preview:n,conflict:r?.conflict??null,problem:r})]})}var pt=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;function mt(e){return e===``?void 0:e}function ht({groups:e,config:t=D,keys:n=ie,secrets:r=Ce,initialDraft:i,onOpenPrerequisite:l,onClose:f,onCreated:h}){let _=c(),[y,b]=(0,K.useState)(i?.alias??``),[x,C]=(0,K.useState)(i?.group??``),[w,T]=(0,K.useState)(i?.hostName??``),[E,O]=(0,K.useState)(i?.user??``),[k,A]=(0,K.useState)(i?.port??``),[j,M]=(0,K.useState)(i?.authentication??`dedicated_password`),[N,P]=(0,K.useState)(``),[ee,I]=(0,K.useState)(i?.savedCredential??``),[L,R]=(0,K.useState)(i?.newCredential??``),[z,B]=(0,K.useState)(``),[V,U]=(0,K.useState)(i?.keyID??``),[te,ne]=(0,K.useState)([]),[re,ae]=(0,K.useState)([]),[G,oe]=(0,K.useState)(null),[se,ce]=(0,K.useState)(``),[le,ue]=(0,K.useState)(``),[q,de]=(0,K.useState)(!0),[fe,J]=(0,K.useState)(!1),[pe,X]=(0,K.useState)(!1),[me,Z]=(0,K.useState)(``),[Q,he]=(0,K.useState)(()=>new Set);function ge(){P(``),B(``),ce(``),ue(``)}function _e(){ge(),Z(``),f()}(0,K.useEffect)(()=>{let e=!0;return Promise.all([r.passwordVault(),n.inventory()]).then(async([t,n])=>{let a=t.unlocked?(await r.credentials()).credentials:[];if(!e)return;let o=a.filter(e=>e.kind===`password`),s=W(n);oe(t),ae(o),I(e=>o.some(t=>t.name===e)?e:o[0]?.name??``),ne(s),U(e=>s.some(t=>t.id===e)?e:s[0]?.id??``),i===void 0&&s.length>0&&M(`identity_file`),de(!1)}).catch(()=>{e&&(Z(_(`conn.createOptionsFailed`)),de(!1))}),()=>{e=!1}},[i,n,r,_]);let ve=y===``?_(`conn.createAliasRequired`):pt.test(y)?``:_(`conn.createAliasInvalid`),ye=w===``?_(`conn.createHostRequired`):H(w)?``:_(`conn.createHostInvalid`),be=E!==``&&/[\s\p{Cc}]/u.test(E)?_(`conn.createUserInvalid`):``,xe=Number(k),Se=k!==``&&(!/^\d+$/.test(k)||xe<1||xe>65535)?_(`conn.createPortInvalid`):``,we=(()=>{switch(j){case`dedicated_password`:return N!==``;case`saved_password`:return ee!==``;case`new_shared_password`:return L!==``&&z!==``;case`identity_file`:return V!==``}})(),Te=j===`identity_file`||G?.unlocked===!0,Ee=!q&&!fe&&Te&&ve===``&&ye===``&&be===``&&Se===``&&we;function De(e){ge(),Z(``),M(e)}function Oe(){return{alias:y,group:x,hostName:w,user:E,port:k,authentication:j,savedCredential:ee,newCredential:L,keyID:V}}function ke(e){let t=Oe();ge(),Z(``),l?.(e,t)}async function Ae(){if(G!==null){X(!0),Z(``);try{let e=G.exists?await r.unlockVault(se):await r.initialiseVault(se),t=(e.unlocked?(await r.credentials()).credentials:[]).filter(e=>e.kind===`password`);oe(e),ae(t),I(t[0]?.name??``),ce(``),ue(``)}catch{ge(),Z(_(G.exists?`conn.createUnlockFailed`:`conn.createVaultFailed`))}finally{X(!1)}}}function je(){switch(j){case`dedicated_password`:return{kind:j,password:N};case`saved_password`:return{kind:j,credential:ee};case`new_shared_password`:return{kind:j,credential:L,password:z};case`identity_file`:return{kind:j,keyId:V}}}async function Me(e){if(e.preventDefault(),he(new Set([`alias`,`hostName`,`user`,`port`])),!Ee)return;J(!0),Z(``);let n={alias:y,group:x,hostName:w,authentication:je()},r=mt(E);r!==void 0&&(n.user=r),k!==``&&(n.port=xe);try{let e=await t.createConnection(n);ge(),h(e)}catch(e){switch(ge(),s(e)){case`alias_already_declared`:Z(_(`conn.createAliasTaken`));break;case`group_not_declared`:Z(_(`conn.createGroupMissing`));break;case`identity_file_invalid`:Z(_(`conn.createKeyInvalid`));break;case`unknown_credential`:Z(_(`conn.createCredentialMissing`));break;case`connection_destination_exists`:Z(_(`conn.createDestinationExists`));break;default:Z(_(`conn.createFailed`))}}finally{J(!1)}}let Ne=G?.minPassphraseLength??12,Pe=G!==null&&se.length>=Ne&&(G.exists||le===se),Fe=(()=>{if(Ee||fe)return``;if(q)return _(`conn.createLoadingOptions`);if(ve!==``)return Q.has(`alias`)?``:ve;if(ye!==``)return Q.has(`hostName`)?``:ye;if(be!==``)return Q.has(`user`)?``:be;if(Se!==``)return Q.has(`port`)?``:Se;if(!Te)return _(`conn.createNeedVault`);switch(j){case`dedicated_password`:return _(`conn.createNeedConnectionPassword`);case`saved_password`:return _(`conn.createNeedSavedPassword`);case`new_shared_password`:return _(L===``?`conn.createNeedSavedPasswordName`:`conn.createNeedNewPassword`);case`identity_file`:return _(`conn.createNeedPrivateKey`)}})();return(0,Y.jsxs)(S,{labelledBy:`create-connection-heading`,onDismiss:()=>{!fe&&!pe&&_e()},panelClassName:`flex max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-lg`,children:[(0,Y.jsx)(`div`,{className:`border-b border-line px-5 py-5`,children:(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`flex size-10 shrink-0 items-center justify-center rounded-lg bg-select-fill text-accent`,children:(0,Y.jsx)(v,{name:`plus`,className:`size-5`})}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h2`,{id:`create-connection-heading`,className:`text-lg font-semibold tracking-tight text-ink`,children:_(`conn.createTitle`)}),(0,Y.jsx)(`p`,{className:`mt-1 ${g}`,children:_(`conn.createDescription`)})]})]})}),(0,Y.jsxs)(`form`,{className:`flex min-h-0 flex-col`,onSubmit:e=>void Me(e),children:[(0,Y.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-6 overflow-y-auto p-5`,children:[me===``?null:(0,Y.jsx)(a,{tone:`danger`,children:me}),(0,Y.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`create-connection-section`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,Y.jsx)(`h3`,{id:`create-connection-section`,className:u,children:_(`conn.createConnectionSection`)}),y===``||w===``?null:(0,Y.jsx)(`p`,{className:`rounded-md bg-tree px-2.5 py-1.5 font-mono text-xs text-ink-muted`,children:`${y} ${E===``?``:`${E}@`}${w}:${k||`22`}`})]}),(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Y.jsx)(p,{label:_(`conn.createNameRequired`),children:(0,Y.jsx)(`input`,{id:`create-connection-name`,"aria-label":_(`conn.createName`),required:!0,autoFocus:!0,value:y,onChange:e=>b(e.target.value),onBlur:()=>he(e=>new Set(e).add(`alias`)),"aria-invalid":Q.has(`alias`)&&ve!==``,className:d})}),Q.has(`alias`)&&ve!==``?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:ve}):null]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(p,{label:_(`conn.createGroup`),children:(0,Y.jsxs)(`select`,{id:`create-connection-group`,value:x,onChange:e=>C(e.target.value),className:d,children:[(0,Y.jsx)(`option`,{value:``,children:_(`conn.createNoGroup`)}),e.map(e=>(0,Y.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}),(0,Y.jsx)(o,{className:`mt-2`,onClick:()=>ke(`Groups`),children:_(`conn.createManageGroups`)})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(p,{label:_(`conn.createHostNameRequired`),children:(0,Y.jsx)(`input`,{id:`create-connection-hostname`,"aria-label":_(`conn.createHostName`),required:!0,value:w,onChange:e=>T(e.target.value),onBlur:()=>he(e=>new Set(e).add(`hostName`)),"aria-invalid":Q.has(`hostName`)&&ye!==``,className:d})}),Q.has(`hostName`)&&ye!==``?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:ye}):null]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(p,{label:_(`conn.createUser`),children:(0,Y.jsx)(`input`,{id:`create-connection-user`,value:E,onChange:e=>O(e.target.value),onBlur:()=>he(e=>new Set(e).add(`user`)),"aria-invalid":Q.has(`user`)&&be!==``,className:d})}),Q.has(`user`)&&be!==``?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:be}):null]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(p,{label:_(`conn.createPort`),hint:_(`conn.createPortHint`),children:(0,Y.jsx)(`input`,{id:`create-connection-port`,type:`number`,min:1,max:65535,value:k,onChange:e=>A(e.target.value),onBlur:()=>he(e=>new Set(e).add(`port`)),"aria-invalid":Q.has(`port`)&&Se!==``,className:d})}),Q.has(`port`)&&Se!==``?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:Se}):null]})]})]}),(0,Y.jsxs)(`section`,{className:`flex flex-col gap-3 border-t border-line pt-5`,"aria-labelledby":`create-auth-section`,children:[(0,Y.jsx)(`h3`,{id:`create-auth-section`,className:u,children:_(`conn.createAuthenticationSection`)}),q?(0,Y.jsx)(`p`,{className:g,children:_(`conn.createLoadingOptions`)}):null,G!==null&&!G.unlocked&&j!==`identity_file`?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-notice-line bg-notice p-3`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-notice-ink`,children:_(G.exists?`conn.createVaultLocked`:`conn.createVaultMissing`)}),(0,Y.jsx)(F,{label:_(`conn.createMasterPassword`),value:se,onChange:ce}),G.exists?null:(0,Y.jsx)(F,{label:_(`conn.createConfirmMaster`),value:le,onChange:ue}),(0,Y.jsx)(o,{kind:`primary`,disabled:pe||!Pe,onClick:()=>void Ae(),children:_(G.exists?`conn.createUnlockVault`:`conn.createInitialiseVault`)})]}):null,(0,Y.jsxs)(`fieldset`,{className:`grid gap-2 sm:grid-cols-2`,disabled:q,children:[(0,Y.jsx)(`legend`,{className:m,children:_(`conn.createAuthenticationMethod`)}),[[`identity_file`,`conn.createIdentityFile`],[`dedicated_password`,`conn.createDedicatedPassword`],[`saved_password`,`conn.createSavedPassword`],[`new_shared_password`,`conn.createNewSharedPassword`]].map(([e,t])=>(0,Y.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded-lg border border-line bg-card p-3 text-sm text-ink transition-colors hover:bg-select-fill has-[:checked]:border-accent has-[:checked]:bg-select-fill`,children:[(0,Y.jsx)(`input`,{type:`radio`,name:`create-authentication`,value:e,checked:j===e,onChange:()=>De(e),className:`accent-accent`}),(0,Y.jsx)(`span`,{children:_(t)})]},e))]}),!q&&te.length===0?(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:g,children:_(`conn.createNoPrivateKeysHint`)}),(0,Y.jsx)(o,{className:`mt-2`,onClick:()=>ke(`Keys`),children:_(`conn.createCreatePrivateKey`)})]}):null,j===`identity_file`?(0,Y.jsx)(p,{label:_(`conn.createPrivateKey`),children:(0,Y.jsxs)(`select`,{value:V,onChange:e=>U(e.target.value),className:d,children:[te.length===0?(0,Y.jsx)(`option`,{value:``,children:_(`conn.createNoPrivateKeys`)}):null,te.map(e=>(0,Y.jsxs)(`option`,{value:e.id,children:[e.relativePath,e.fingerprint===``?``:` · ${e.fingerprint}`]},e.id))]})}):G?.unlocked===!0?j===`dedicated_password`?(0,Y.jsx)(F,{label:_(`conn.createConnectionPassword`),value:N,onChange:P,hint:_(`conn.createDedicatedHint`)}):j===`saved_password`?(0,Y.jsx)(p,{label:_(`conn.createChooseSavedPassword`),hint:_(`conn.createSavedHint`),children:(0,Y.jsxs)(`select`,{value:ee,onChange:e=>I(e.target.value),className:d,children:[re.length===0?(0,Y.jsx)(`option`,{value:``,children:_(`conn.createNoSavedPasswords`)}):null,re.map(e=>(0,Y.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}):j===`new_shared_password`?(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(p,{label:_(`conn.createSavedPasswordName`),children:(0,Y.jsx)(`input`,{value:L,onChange:e=>R(e.target.value),className:d})}),(0,Y.jsx)(F,{label:_(`conn.createNewPassword`),value:z,onChange:B})]}):null:null]})]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-t border-line px-5 py-4`,children:[Fe===``?(0,Y.jsx)(`span`,{className:`grow`}):(0,Y.jsx)(`p`,{className:`grow ${g}`,children:Fe}),(0,Y.jsx)(o,{disabled:fe||pe,onClick:_e,children:_(`conn.cancelCreate`)}),(0,Y.jsx)(o,{type:`submit`,kind:`primary`,disabled:!Ee,children:_(fe?`conn.creating`:`conn.create`)})]})]})]})}function gt(e,t){return`${e}${t}`}function _t(e,t){let n=[];return e.note!==void 0&&e.note!==``&&n.push(t(`orphan.note`,{note:e.note})),e.tags!==void 0&&e.tags.length>0&&n.push(t(`orphan.tags`,{tags:e.tags.join(`, `)})),e.colour!==void 0&&e.colour!==``&&n.push(t(`orphan.colour`,{colour:e.colour})),n.length===0?t(`orphan.noSettings`):n.join(` · `)}function vt({metadata:e,hosts:t,onSave:n}){let r=c(),[i,a]=(0,K.useState)({}),[s,l]=(0,K.useState)(``),u=e.hosts??[],d=u.filter(e=>e.orphan===!0);if(d.length===0)return null;let f=new Set(u.filter(e=>e.orphan!==!0).map(e=>gt(e.identity.path,e.identity.alias)));function p(e){let{orphan:t,...n}=e;return n}function m(t){let a=gt(t.identity.path,t.identity.alias),o=i[a]??``;if(o===``){l(r(`orphan.chooseTarget`));return}let[s,c]=o.split(`\0`);if(!(s===void 0||c===void 0)){if(f.has(o)){l(r(`orphan.occupied`,{alias:c}));return}l(``),n({...e,hosts:u.map(e=>e===t?{...p(e),identity:{path:s,alias:c}}:e)})}}function h(t){l(``),n({...e,hosts:u.filter(e=>e!==t)})}return(0,Y.jsxs)(`section`,{"aria-labelledby":`orphan-heading`,className:`flex flex-col gap-3 rounded-xl border border-notice-line bg-notice p-4`,children:[(0,Y.jsx)(`h3`,{id:`orphan-heading`,className:`text-sm font-medium text-notice-ink`,children:r(`orphan.heading`)}),(0,Y.jsx)(`p`,{className:`text-xs text-ink-muted`,children:r(`orphan.explain`)}),s===``?null:(0,Y.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:s}),(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-lg bg-card`,children:d.map(e=>{let n=gt(e.identity.path,e.identity.alias);return(0,Y.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-hairline p-3 first:border-t-0`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-ink`,children:r(`orphan.entry`,{alias:e.identity.alias,path:e.identity.path})}),(0,Y.jsx)(`p`,{className:`text-xs text-ink-muted`,children:_t(e,r)}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`label`,{htmlFor:`orphan-target-${n}`,className:`sr-only`,children:r(`orphan.reassociateWith`,{alias:e.identity.alias})}),(0,Y.jsxs)(`select`,{id:`orphan-target-${n}`,value:i[n]??``,onChange:e=>a({...i,[n]:e.target.value}),className:`min-w-48 rounded-md border border-control-line bg-control px-2 py-1.5 text-xs`,children:[(0,Y.jsx)(`option`,{value:``,children:r(`orphan.reassociatePlaceholder`)}),t.filter(e=>e.identity.alias!==``).map(e=>(0,Y.jsx)(`option`,{value:gt(e.identity.path,e.identity.alias),children:r(`orphan.entry`,{alias:e.identity.alias,path:e.identity.path})},gt(e.identity.path,e.identity.alias)))]}),(0,Y.jsx)(o,{onClick:()=>m(e),children:r(`orphan.reassociate`,{alias:e.identity.alias})}),(0,Y.jsx)(`button`,{type:`button`,onClick:()=>h(e),className:`rounded border border-control-line px-2 py-1 text-xs text-danger`,children:r(`orphan.discard`,{alias:e.identity.alias})})]})]},n)})})]})}function yt(e,t){let n=0;for(let r=1;r0;t--){let t=e.lastIndexOf(` +`,r-2);r=t<0?0:t+1}return r}function xt(e,t,n,r=0){let i=yt(e,t);if(!e.startsWith(n,i))throw Error(`block_moved`);let a=bt(e,i,r);return e.slice(0,a)+e.slice(i+n.length)}function St(e){return e.status===`fulfilled`?{status:`ready`,value:e.value}:{status:`failed`}}async function Ct(e,t,n){let r=e.form.entry.identity.alias,[i,a,o]=await Promise.allSettled([t.inventory(),n.passwordVault(),n.passwordEligibility(r)]),s=i.status===`fulfilled`?{status:`ready`,value:W(i.value)}:{status:`failed`},c=St(a),l=St(o),u;if(a.status===`rejected`)u={status:`failed`};else if(!a.value.unlocked)u={status:`locked`};else try{u={status:`ready`,value:(await n.credentials()).credentials}}catch{u={status:`failed`}}return{detail:e,keys:s,vault:c,credentials:u,eligibility:l}}function wt(e){return Le(e).map(e=>e.values.filter(Re)).filter(e=>e.length>0).map(U).filter(e=>e!==null)}function Tt(e,t){let n=wt(e);if(n.length===0)return{state:`none`};if(n.length>1)return{state:`complex`};let r=n[0]??``;if(t.status!==`ready`)return{state:`unavailable`,path:r};let i=t.value.find(e=>`~/.ssh/${e.relativePath}`===r);return i===void 0?{state:`custom`,path:r}:{state:`known`,path:i.relativePath,fingerprint:i.fingerprint,encrypted:i.encrypted}}function Et(e,t,n,r){if(t.status===`locked`||n.status===`locked`)return{state:`locked`};if(t.status!==`ready`||n.status===`failed`)return{state:`unavailable`};if(!t.value.unlocked)return{state:`locked`};if(n.status!==`ready`)return{state:`unavailable`};if(!t.value.aliases.includes(e))return{state:`none`};let i=n.value.find(t=>t.kind===`password`&&t.uses.includes(e));return r.status===`ready`&&r.value.passwordBinding===`stale`?i===void 0?{state:`stale`}:{state:`stale`,name:i.name}:i===void 0?{state:`dedicated`}:{state:`named`,name:i.name}}function Dt(e,t,n){if(e.state===`none`)return{state:`none`};if(e.state!==`known`)return{state:`unavailable`};if(!e.encrypted)return{state:`not_needed`};if(t.status===`locked`||n.status===`locked`)return{state:`locked`};if(t.status!==`ready`||n.status===`failed`)return{state:`unavailable`};if(!t.value.unlocked)return{state:`locked`};if(n.status!==`ready`)return{state:`unavailable`};if(t.value.dedicatedKeyPassphrases.includes(e.path))return{state:`dedicated`};let r=n.value.find(t=>t.kind===`key_passphrase`&&t.uses.includes(e.path));return r===void 0?{state:`none`}:{state:`named`,name:r.name}}function Ot(e){let{detail:t}=e,n=t.form.entry.identity.alias,r=Be(t,`HostName`).value||n,i=Be(t,`User`).value,a=Be(t,`Port`).value||`22`,o=Tt(t,e.keys);return{alias:n,endpoint:`${i===``?``:`${i}@`}${r}:${a}`,group:t.form.entry.group??``,privateKey:o,keyPassphrase:Dt(o,e.vault,e.credentials),accountPassword:Et(n,e.vault,e.credentials,e.eligibility)}}function kt({state:e,dirty:t,refreshing:n,onConnect:r,connecting:i,connectAvailable:a=!0,onToggleManage:s,managing:l}){let u=c(),d=Ot(e),f=t||n,p=d.privateKey.state!==`none`,m=p&&(d.accountPassword.state===`dedicated`||d.accountPassword.state===`named`||d.accountPassword.state===`stale`),h=p&&d.keyPassphrase.state!==`not_needed`,g=!p&&d.accountPassword.state!==`none`,_=`connection-actions-${encodeURIComponent(d.alias)}`;function y(){switch(d.privateKey.state){case`none`:return u(`conn.summaryKeyNone`);case`known`:return`${d.privateKey.path} · ${d.privateKey.fingerprint}`;case`custom`:return d.privateKey.path;case`complex`:return u(`conn.summaryKeyComplex`);case`unavailable`:return u(`conn.summaryKeyUnavailable`,{path:d.privateKey.path})}}function b(){switch(d.keyPassphrase.state){case`none`:return u(`conn.summaryKeyPassphraseNone`);case`dedicated`:return u(`conn.summaryKeyPassphraseDedicated`);case`named`:return u(`conn.summaryKeyPassphraseNamed`,{name:d.keyPassphrase.name});case`not_needed`:return u(`conn.summaryKeyPassphraseNotNeeded`);case`locked`:return u(`conn.summaryLocked`);case`unavailable`:return u(`conn.summaryUnavailable`)}}function x(){switch(d.accountPassword.state){case`none`:return u(`conn.summaryPasswordNone`);case`dedicated`:return u(`conn.summaryPasswordDedicated`);case`named`:return u(`conn.summaryPasswordNamed`,{name:d.accountPassword.name});case`stale`:return u(`conn.summaryPasswordRouteStale`);case`locked`:return u(`conn.summaryLocked`);case`unavailable`:return u(`conn.summaryUnavailable`)}}return(0,Y.jsxs)(`section`,{"data-connection-summary":!0,"aria-labelledby":`connection-summary-heading`,className:`shrink-0 border-b border-line pb-4`,children:[(0,Y.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-3`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Y.jsx)(A,{os:e.detail.metadata.os||e.detail.metadata.detectedOS,compact:!0}),(0,Y.jsx)(`h2`,{id:`connection-summary-heading`,className:`min-w-0 truncate text-xl font-semibold tracking-tight text-ink sm:text-2xl`,children:d.alias}),t?(0,Y.jsx)(`span`,{className:`rounded bg-notice px-2 py-1 text-xs font-medium text-notice-ink`,children:u(`conn.summaryUnsaved`)}):null]}),(0,Y.jsx)(`p`,{className:`mt-1 break-all font-mono text-sm text-ink-muted`,children:d.endpoint}),d.group===``?null:(0,Y.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-ink-muted`,children:[(0,Y.jsx)(v,{name:`groups`,className:`size-3.5`}),(0,Y.jsxs)(`span`,{className:`sr-only`,children:[u(`conn.summaryGroup`),`: `]}),d.group]})]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Y.jsxs)(o,{kind:`primary`,disabled:f||i||!a,"aria-describedby":f?_:void 0,onClick:r,className:`inline-flex items-center gap-2`,children:[(0,Y.jsx)(v,{name:`terminal`,className:`size-4`}),u(i?`conn.opening`:`conn.connect`)]}),(0,Y.jsxs)(o,{"aria-expanded":l,"aria-controls":`connection-management`,onClick:s,className:`inline-flex items-center gap-2 ${l?`border-accent bg-select-fill text-accent`:``}`,children:[(0,Y.jsx)(`span`,{children:u(`conn.manageLabel`)}),(0,Y.jsx)(v,{name:`chevronRight`,className:`size-3.5 transition-transform ${l?`rotate-90`:``}`})]})]})]}),(0,Y.jsxs)(`dl`,{className:`mt-3 flex flex-wrap gap-x-5 gap-y-2 text-xs text-ink-muted`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:p?`mb-0.5 font-medium text-ink-muted`:`sr-only`,children:u(`conn.summaryPrivateKey`)}),(0,Y.jsx)(`dd`,{className:`break-all`,children:y()})]}),h?(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`mb-0.5 font-medium text-ink-muted`,children:u(`conn.summaryKeyPassphrase`)}),(0,Y.jsx)(`dd`,{children:b()})]}):null,g?(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`mb-0.5 font-medium text-ink-muted`,children:u(`conn.summaryAccountPassword`)}),(0,Y.jsx)(`dd`,{children:x()})]}):null]}),m?(0,Y.jsx)(`p`,{role:`status`,className:`mt-3 rounded border border-notice-line bg-notice px-3 py-2 text-sm text-notice-ink`,children:u(`conn.summaryPasswordCleanup`)}):null,f?(0,Y.jsx)(`p`,{id:_,className:`mt-3 text-xs text-notice-ink`,children:u(t?`conn.summaryDraftBlocksActions`:`conn.summaryRefreshing`)}):null]})}function At({detail:e,groups:t,files:n,disabled:r,onRename:a,onMoveToGroup:s,onComment:l,onDuplicate:f,onMoveToFile:p,onDelete:m}){let h=c(),_=e.form.entry.identity,v=e.form.entry.group??``,y=e.form.comment||e.metadata.note||``,b=`${N(_)}\u0000${e.file.contents}`,[x,S]=(0,K.useState)(_.alias),[C,w]=(0,K.useState)(v),[T,E]=(0,K.useState)(y),[D,O]=(0,K.useState)(``),[k,A]=(0,K.useState)(!1);(0,K.useEffect)(()=>{S(_.alias),w(v),E(y),O(``),A(!1)},[b]);let j=x!==``&&x!==_.alias,M=T!==y,P=C!==v;return(0,Y.jsxs)(i,{id:`connection-management`,as:`section`,"aria-label":h(`conn.manageLabel`),"aria-disabled":r,radius:`md`,className:`flex shrink-0 flex-col gap-5 p-5`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-base font-semibold tracking-tight text-ink`,children:h(`conn.manageLabel`)}),(0,Y.jsx)(`p`,{className:`mt-1 ${g}`,children:h(`conn.manageIndependent`)}),r?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-notice-ink`,children:h(`conn.manageDraftBlocked`)}):null]}),(0,Y.jsxs)(`fieldset`,{disabled:r,className:`contents`,children:[(0,Y.jsxs)(`div`,{className:`grid gap-5 border-t border-line pt-5 lg:grid-cols-2`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(`label`,{htmlFor:`manage-rename-alias`,className:u,children:h(`host.renameAlias`)}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(`input`,{id:`manage-rename-alias`,"aria-label":h(`host.renameAlias`),value:x,onChange:e=>S(e.target.value),className:d}),(0,Y.jsx)(o,{disabled:!j,onClick:()=>a(x),children:h(`host.rename`)})]})]}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(`label`,{htmlFor:`manage-primary-group`,className:u,children:h(`host.primaryGroup`)}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsxs)(`select`,{id:`manage-primary-group`,"aria-label":h(`host.primaryGroup`),value:C,onChange:e=>w(e.target.value),className:d,children:[(0,Y.jsx)(`option`,{value:``,children:h(`host.groupNone`)}),t.map(e=>(0,Y.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,Y.jsx)(o,{disabled:!P,onClick:()=>s(C),children:h(`host.moveToGroup`)})]}),(0,Y.jsx)(`span`,{className:g,children:h(`host.groupNoneMeans`)})]})]}),(0,Y.jsxs)(`label`,{className:`flex flex-col gap-2 border-t border-line pt-5`,children:[(0,Y.jsx)(`span`,{className:u,children:h(`host.comment`)}),(0,Y.jsx)(`textarea`,{"aria-label":h(`host.comment`),value:T,onChange:e=>E(e.target.value),rows:3,className:d}),(0,Y.jsx)(`span`,{className:g,children:e.form.comment===``&&(e.metadata.note??``)!==``?h(`host.commentFromNote`):h(`host.commentNote`)})]}),(0,Y.jsx)(o,{className:`self-start`,disabled:!M,onClick:()=>l(T),children:h(`host.saveComment`)}),(0,Y.jsxs)(`div`,{className:`grid gap-4 border-t border-line pt-5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h4`,{className:u,children:h(`conn.moveToFile`)}),(0,Y.jsx)(`p`,{className:g,children:h(`conn.storageFileNote`)}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`label`,{htmlFor:`manage-storage-file`,className:`text-sm text-ink-muted`,children:h(`conn.moveToFile`)}),(0,Y.jsxs)(`select`,{id:`manage-storage-file`,"aria-label":h(`conn.moveToFile`),value:D,onChange:e=>O(e.target.value),className:d,children:[(0,Y.jsx)(`option`,{value:``,children:h(`conn.moveToFilePlaceholder`)}),n.filter(e=>e.editable&&e.file.path!==void 0&&e.file.path!==_.path).map(e=>(0,Y.jsx)(`option`,{value:e.file.path,children:e.file.path},e.file.absolute))]}),(0,Y.jsx)(o,{disabled:D===``,onClick:()=>p(D),children:h(`conn.move`)})]})]}),(0,Y.jsx)(o,{className:`self-start`,onClick:f,children:h(`conn.duplicate`)})]}),(0,Y.jsxs)(`div`,{className:`border-t border-danger/30 pt-5`,children:[(0,Y.jsx)(o,{kind:`danger`,onClick:()=>A(!0),children:h(`conn.delete`)}),k?(0,Y.jsx)(I,{id:`delete-connection-heading`,heading:h(`conn.deleteHeading`,{alias:_.alias}),body:(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:h(`conn.deleteBody`)}),confirmLabel:h(`conn.confirmDelete`),cancelLabel:h(`conn.deleteCancel`),onCancel:()=>A(!1),onConfirm:()=>{A(!1),m()}}):null]})]})]})}var jt={key:`sshc.connections.list-width.v1`,fallback:400,minimum:256,maximum:720},Mt=new Set([`group_not_declared`,`group_directory_missing`,`group_empty`,`group_directory_leftover`]),Nt=new Set([`complex_external_rule`,`wildcard_shadow`,`negated_pattern`,`unnamed_host_block`,`match_block`,`dangerous_directive`,`explained_values_only`]);function Pt({onInspector:e,creationDraft:t=null,onCreationDraftChange:r,onNavigateForCreation:i,location:s={pathname:`/connections`,search:``},onNavigateLocation:l,onNavigationBlockerChange:u,preferredKey:d=null,onPreferredKeyApplied:f,consoles:p,onShowConsole:m}){let h=c(),g=E(s),_=g.kind===`valid`?g.target:null,v=k(L),[b,x]=(0,K.useState)(null),S=b?.entry.path??`config`,{selection:w,setSelection:O,invalidLocation:A,setInvalidLocation:j,activePanel:M,setActivePanel:N,activeAdvanced:P,setActiveAdvanced:F,missingSelection:ee,setMissingSelection:z}=be(_,g.kind===`invalid`),B=(0,K.useRef)(w),[V,H]=(0,K.useState)(null),[U,te]=y(jt),[re,W]=(0,K.useState)(null),[ae,G]=(0,K.useState)(`idle`),[oe,se]=(0,K.useState)(0),[ce,le]=(0,K.useState)(null),ue=(0,K.useRef)(null),{editorDirty:q,setEditorDirty:de,preview:fe,setPreview:J,problem:pe,setProblem:X,localError:me,setLocalError:Z}=xe(),Q=(0,K.useRef)(q);Q.current=q;let{creatingConnection:he,setCreatingConnection:ge,launching:we,setLaunching:Te,managing:Ee,setManaging:De}=Se(t!==null);(0,K.useEffect)(()=>{B.current=w},[w]);function Oe(e,t){return(t===void 0?l?.(e):l?.(e,t))!==!1}function ke(e,t,n,r){return Oe(T({path:e.path,alias:e.alias,panel:t,advanced:n}),r)?(N(t),F(n),j(!1),!0):!1}function Ae(e){return Oe(T(null),e)}function je(e,t=M,n=P){B.current=e,O(e),H(null),W(null),z(!1),ke(e,t,n,{replace:!0})}function Me(){B.current=null,O(null),H(null),W(null),z(!1),Ae({replace:!0})}function Ne(){if(q){le({kind:`create`});return}r?.(null),ge(!0)}function Pe(){let e=ce;if(e!==null){if(le(null),Q.current=!1,de(!1),ue.current?.(),e.kind===`create`){r?.(null),ge(!0);return}if(e.kind===`select`){He(e.host);return}l?.(`${e.location.pathname}${e.location.search}`)}}function Fe(e,t){r?.(t),ge(!1),i?.(e)}let Ie=(0,K.useCallback)(async()=>{try{let e=await D.overview();return x(e),e}catch(e){return X(n(e)),null}},[X]);(0,K.useEffect)(()=>{Ie()},[Ie]),(0,K.useEffect)(()=>{let e=E(s);if(e.kind===`redirect`){if(Oe(e.location,{replace:!0}),j(!1),B.current===null)return;B.current=null,O(null),H(null),W(null),de(!1),G(`idle`),N(`Basic`),F(`Jump`),z(!1),J(null),X(null),De(!1);return}if(e.kind===`invalid`){if(j(!0),B.current===null)return;B.current=null,O(null),H(null),W(null),de(!1),G(`idle`),N(`Basic`),F(`Jump`),z(!1),J(null),X(null),De(!1);return}j(!1);let t=e.target,n=B.current;if(t===null){if(n===null)return;B.current=null,O(null),H(null),W(null),de(!1),G(`idle`),N(`Basic`),F(`Jump`),z(!1),J(null),X(null),De(!1);return}if(N(t.panel),F(t.advanced),n?.path===t.path&&n.alias===t.alias)return;let r={path:t.path,alias:t.alias};B.current=r,O(r),H(null),W(null),de(!1),G(`idle`),z(!1),J(null),X(null),De(!1)},[s.pathname,s.search]),(0,K.useEffect)(()=>{if(!q){u?.(null);return}return u?.(e=>{if(!Q.current)return!0;let t=E(e);if(t.kind===`valid`&&w!==null){let e=t.target;if(e!==null&&e.path===w.path&&e.alias===w.alias)return!0}return le({kind:`navigate`,location:e}),!1}),()=>u?.(null)},[q,u,w]),(0,K.useEffect)(()=>{if(!q)return;let e=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[q]),(0,K.useEffect)(()=>(e(null),()=>e(null)),[e]);let Le=w===null?``:w.path,Re=w===null?``:w.alias;(0,K.useEffect)(()=>{if(Re===``)return;let e=!0;return D.host(Le,Re).then(async e=>({detail:e,saved:await Ct(e,ie,Ce)})).then(({detail:t,saved:n})=>{e&&(H(t),W(n),G(`idle`),X(null),z(!1))}).catch(t=>{e&&(H(null),W(null),X(n(t)),z(!0))}),()=>{e=!1}},[Le,Re,H,W,X,z]);async function $(e,t=!0){let r;try{r=await D.save(e)}catch(t){J(null);let r=n(t);return e.kind===`duplicate`&&r.code===`alias_already_declared`?(X(null),Z(h(`conn.duplicateAliasTaken`,{alias:e.newAlias??``}))):X(r),{saved:!1,overview:null}}J(r.preview),X(null);let i=w,a=e.kind===`rename`&&i!==null?{path:i.path,alias:e.newAlias??i.alias}:null;a!==null&&je(a);let o=await Ie();if(t&&i!==null&&a===null)try{let e=await D.host(i.path,i.alias),t=await Ct(e,ie,Ce),n=B.current;n?.path===i.path&&n.alias===i.alias&&(H(e),W(t),se(e=>e+1))}catch(e){let t=B.current;t?.path===i.path&&t.alias===i.alias&&(X(n(e)),z(!0))}return{saved:!0,overview:o}}async function ze(e){let t;try{t=await D.updateConnection(e)}catch(e){throw J(null),X(n(e)),e}J(t.preview),X(null),Z(``),ue.current?.(),G(`refreshing`)}function Be(e){return e.keys.status!==`failed`&&e.vault.status!==`failed`&&e.credentials.status!==`failed`&&e.eligibility.status!==`failed`}async function Ve(){if(w===null)return;let e=w;G(`refreshing`);try{let[t,n]=await Promise.all([D.overview(),D.host(e.path,e.alias)]),r=await Ct(n,ie,Ce);if(!Be(r))throw Error(`saved_state_refresh_failed`);let i=B.current;if(i?.path!==e.path||i.alias!==e.alias)return;x(t),H(n),W(r),se(e=>e+1),G(`idle`),Z(``),X(null)}catch{let t=B.current;if(t?.path!==e.path||t.alias!==e.alias)return;G(`failed`),Z(h(`conn.basicConnectionRefreshFailed`))}}function He(e){if(e.identity.alias===``)return;let t={path:e.identity.path,alias:e.identity.alias},n=B.current,r=n?.path===t.path&&n.alias===t.alias;ke(t,`Basic`,`Jump`)&&(r||(J(null),X(null),H(null),W(null),z(!1),De(!1),B.current=t,O(t),N(`Basic`),F(`Jump`)))}function Ue(e){let t=B.current,n=t?.path!==e.identity.path||t.alias!==e.identity.alias;if(q&&n){le({kind:`select`,host:e});return}He(e)}function We(e){V===null||w===null||$({kind:`host_fields`,path:w.path,alias:w.alias,base:V.file.contents,fields:e})}function Ge(e){V===null||w===null||$({kind:`block_raw`,path:w.path,alias:w.alias,base:V.file.contents,raw:e})}function Ke(e){V===null||w===null||(Z(``),$({kind:`rename`,path:w.path,alias:w.alias,base:V.file.contents,newAlias:e}))}async function qe(e){if(V===null)return;let t=V.form.entry.file.path??``,r=V.form.entry.identity.alias;if(e!==``){let n=await $({kind:`move`,path:t,base:V.file.contents,alias:r,destinationGroup:e},!1);if(!n.saved)return;let i=n.overview?.hosts.find(t=>t.identity.alias===r&&t.group===e);i===void 0?Me():je(i.identity);return}try{let e=await D.file(S);if(!(await $({kind:`move`,path:t,base:V.file.contents,alias:r,destinationPath:S,destinationBase:e.contents},!1)).saved)return;je({path:S,alias:r})}catch(e){X(n(e))}}async function Je(e,t){if(!(q||ae!==`idle`))try{if(e.kind===`group`){let n=e.name.slice(e.name.lastIndexOf(`/`)+1),r=t===``?n:`${t}/${n}`,i=b?.hosts.find(e=>e.identity.path===w?.path&&e.identity.alias===w.alias),a=i?.group===e.name?r:i?.group?.startsWith(`${e.name}/`)?`${r}${i.group.slice(e.name.length)}`:null,o=await D.renameGroup(e.name,r);J(o.preview),X(null);let s=await Ie();if(w!==null&&a!==null&&s!==null){let e=s.hosts.find(e=>e.identity.alias===w.alias&&e.group===a);e===void 0?Me():je(e.identity)}else w!==null&&a!==null&&Me();return}let n=await D.file(e.path),r=w?.path===e.path&&w.alias===e.alias;if(t!==``){let i=await $({kind:`move`,path:e.path,base:n.contents,alias:e.alias,destinationGroup:t},!1);if(!i.saved)return;if(r&&i.overview!==null){let n=i.overview.hosts.find(n=>n.identity.alias===e.alias&&n.group===t);n===void 0?Me():je(n.identity)}else r&&Me();return}let i=await D.file(S);if(!(await $({kind:`move`,path:e.path,base:n.contents,alias:e.alias,destinationPath:S,destinationBase:i.contents},!1)).saved)return;r&&je({path:S,alias:e.alias})}catch(e){J(null),X(n(e))}}function Ye(e){V===null||w===null||$({kind:`comment`,path:w.path,alias:w.alias,base:V.file.contents,comment:e})}function Xe(e){if(b===null)return;let t=(b.metadata.hosts??[]).filter(t=>t.identity.path!==e.identity.path||t.identity.alias!==e.identity.alias);$({kind:`metadata`,metadata:{...b.metadata,hosts:[...t,e]}})}async function Ze(e){ge(!1),r?.(null),J(e.preview),X(null),Z(``),De(!1),N(`Basic`),F(`Jump`),je(e.identity,`Basic`,`Jump`),await Ie()}async function Qe(){if(w===null||we||q||ae!==`idle`)return;Te(!0),Z(``);let e=await p.open({kind:`ssh`,alias:w.alias});e!==null&&m(e.id),Te(!1)}function $e(){V===null||w===null||(Z(``),$({kind:`duplicate`,path:w.path,base:V.file.contents,alias:w.alias,newAlias:`${w.alias}-copy`}))}async function et(e){if(!(V===null||w===null||e===``))try{let t=await D.file(e),n=w;if(!(await $({kind:`move`,path:n.path,base:V.file.contents,alias:n.alias,destinationPath:e,destinationBase:t.contents},!1)).saved)return;je({path:e,alias:n.alias}),Z(``)}catch(e){X(n(e))}}async function tt(){if(V===null||w===null)return;let e;try{e=xt(V.file.contents,V.form.entry.line,V.form.raw,V.form.commentLines)}catch{Z(h(`conn.blockMoved`));return}let t=w.path,n=V.file.contents;(await $({kind:`file_raw`,path:t,base:n,raw:e},!1)).saved&&(O(null),B.current=null,H(null),W(null),Z(``),Ae({replace:!0}))}return b===null?pe===null?(0,Y.jsx)(R,{tone:`loading`,title:h(`conn.loading`)}):(0,Y.jsx)(R,{tone:`failed`,title:pe.message,...pe.detail===void 0?{}:{detail:pe.detail},action:(0,Y.jsx)(o,{onClick:()=>void Ie(),children:h(`shell.bootstrapRetry`)})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-canvas`,children:[(0,Y.jsxs)(`header`,{"data-connections-header":!0,className:`flex shrink-0 items-center justify-between gap-3 border-b border-line bg-card px-3 py-3 md:px-4`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Y.jsx)(`h1`,{className:`truncate text-sm font-semibold tracking-tight text-ink`,children:h(`conn.heading`)}),(0,Y.jsx)(`p`,{className:`shrink-0 text-xs text-ink-muted`,children:h(`conn.count`,{count:b.hosts.filter(e=>e.identity.alias!==``).length})})]}),(0,Y.jsx)(o,{kind:`primary`,className:`shrink-0`,onClick:Ne,children:h(`conn.new`)})]}),(0,Y.jsxs)(`div`,{style:{"--list-width":`${U}px`},className:`grid min-h-0 flex-1 grid-cols-1 grid-rows-[minmax(0,1fr)] ${v?``:`md:grid-cols-[minmax(16rem,var(--list-width))_minmax(0,1fr)]`}`,children:[(0,Y.jsx)(_e,{compact:v,resizeHandle:v?null:(0,Y.jsx)(C,{label:h(`conn.resizeList`),width:U,minimum:jt.minimum,maximum:jt.maximum,onWidthChange:te}),overview:b,selection:w,invalidLocation:A,onDismissInvalidLocation:()=>{Oe(T(null),{replace:!0})&&j(!1)},onSelect:Ue,onDrop:(e,t)=>void Je(e,t),movesDisabled:q||ae!==`idle`}),(0,Y.jsxs)(`div`,{className:`min-h-0 flex-col gap-4 overflow-y-auto bg-card p-4 lg:p-5 ${v?``:`md:flex`} ${w===null?`hidden`:`flex`}`,children:[(0,Y.jsx)(o,{className:`w-fit ${v?``:`md:hidden`}`,onClick:()=>Ae(),children:h(`conn.allConnections`)}),(0,Y.jsx)(ne,{notices:b.notices.filter(e=>!Mt.has(e.code)&&!Nt.has(e.code))}),(0,Y.jsx)(vt,{metadata:b.metadata,hosts:b.hosts,onSave:e=>void $({kind:`metadata`,metadata:e})}),me===``?null:(0,Y.jsx)(a,{tone:`danger`,children:me}),V===null&&ee&&w!==null?(0,Y.jsx)(ve,{onBackToList:()=>Ae({replace:!0})}):V===null||re===null?(0,Y.jsx)(ye,{preferredKey:d,onBeginCreation:Ne}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(kt,{state:re,dirty:q,refreshing:ae!==`idle`,onConnect:()=>void Qe(),connecting:we,onToggleManage:()=>De(e=>!e),managing:Ee}),ae===`failed`?(0,Y.jsx)(o,{className:`self-start`,onClick:()=>void Ve(),children:h(`conn.reloadConnection`)}):null,Ee?(0,Y.jsx)(At,{detail:V,groups:b.groups,files:b.files,disabled:q||ae!==`idle`,onRename:Ke,onMoveToGroup:e=>void qe(e),onComment:Ye,onDuplicate:$e,onMoveToFile:e=>void et(e),onDelete:()=>void tt()}):null,(0,Y.jsx)(ft,{detail:V,savedState:re,preview:fe,problem:pe,onFieldEdits:We,onBlockRaw:Ge,onBasicSave:ze,onMetadata:Xe,integrations:lt,panel:M,advanced:P,onLocationChange:(e,t)=>{w!==null&&ke(w,e,t)},preferredKey:d,onPreferredKeyApplied:f,onDirtyChange:de,onBasicDiscardReady:e=>{ue.current=e},onRequestRefresh:Ve,savedRevision:oe,disabled:ae!==`idle`})]})]})]})]}),he?(0,Y.jsx)(ht,{groups:b.groups,initialDraft:t??void 0,onOpenPrerequisite:Fe,onClose:()=>{ge(!1),r?.(null)},onCreated:e=>void Ze(e)}):null,ce===null?null:(0,Y.jsx)(I,{id:`connection-discard-heading`,heading:h(`conn.discardChanges`),body:(0,Y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:h(`conn.discardPrompt`)}),confirmLabel:h(`conn.discardChanges`),cancelLabel:h(`conn.keepEditing`),onConfirm:Pe,onCancel:()=>le(null)})]})}export{Pt as ConnectionsPage}; \ No newline at end of file diff --git a/internal/ui/dist/assets/DiagnosticsPanel-BHiHI9ah.js b/internal/ui/dist/assets/DiagnosticsPanel-BHiHI9ah.js deleted file mode 100644 index b7c5f9cdf..000000000 --- a/internal/ui/dist/assets/DiagnosticsPanel-BHiHI9ah.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{n,r,t as i}from"./surface-Ck_FblzE.js";import{_ as a,f as o,i as s,m as c,n as l,p as u,s as d}from"./form-C1olpQVF.js";import{J as f}from"./index-DJ8h9zNi.js";import{t as p}from"./diagnostics-Clvm8IB7.js";import{r as m}from"./page-CiAVS9qS.js";var h=e(),g=t(),_=`[&_button]:min-h-10 md:[&_button]:min-h-0`;function v({api:e=p,host:t,hosts:v=[]}){let y=a(),b=t!==void 0,[x,S]=(0,h.useState)(``),C=t??x,[w,T]=(0,h.useState)(null),[E,D]=(0,h.useState)(null),[O,k]=(0,h.useState)(null),[A,j]=(0,h.useState)(null),[M,N]=(0,h.useState)(``),[P,F]=(0,h.useState)(!1);(0,h.useEffect)(()=>{if(b)return;let t=!0;return e.configCheck().then(e=>{t&&T(e)}).catch(()=>{t&&N(y(`diag.configUnreadable`))}),()=>{t=!1}},[e,b,y]),(0,h.useEffect)(()=>{D(null),k(null),j(null),N(``)},[C]);async function I(e,t,n){N(``),F(!0);try{t(await e())}catch{N(n)}finally{F(!1)}}let L=E?.executableDirectives??[],R=[{label:y(`diag.explain`),start:()=>void I(()=>e.effective(C),D,y(`diag.explainFailed`))},{label:y(`diag.checkReachability`),start:()=>void I(()=>e.reachability(C),k,y(`diag.reachabilityFailed`))},{label:y(`diag.testAuthentication`),start:()=>void I(()=>e.authentication(C,L.some(e=>!e.overridable)),j,y(`diag.authenticationFailed`))}],z=P||C===``,B=E!==null||O!==null||A!==null;return(0,g.jsxs)(`section`,{"aria-label":b?y(`diag.forHost`,{host:t??``}):void 0,className:`${b?`flex flex-col gap-4`:`mx-auto flex w-full max-w-5xl flex-col gap-6`} ${_}`,children:[b?null:(0,g.jsx)(m,{title:y(`diag.heading`),description:y(`diag.pageDescription`)}),M?(0,g.jsx)(r,{tone:`danger`,children:M}):null,(0,g.jsx)(n,{as:`section`,radius:`md`,"aria-label":y(`diag.heading`),children:(0,g.jsxs)(`div`,{className:`flex flex-col gap-4 bg-toolbar px-4 py-4 sm:px-5`,children:[(0,g.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[b?(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:y(`diag.hostAlias`)}),(0,g.jsx)(`p`,{className:`mt-1 truncate font-mono text-base font-semibold text-ink`,children:C})]}):(0,g.jsxs)(`div`,{className:`min-w-56 flex-1 sm:max-w-sm`,children:[(0,g.jsx)(l,{label:y(`diag.hostAlias`),children:(0,g.jsx)(`input`,{value:x,onChange:e=>S(e.target.value),list:`diagnostic-host-options`,placeholder:`bastion`,className:`${s} font-mono`})}),(0,g.jsx)(`datalist`,{id:`diagnostic-host-options`,children:v.map(e=>(0,g.jsx)(`option`,{value:e,children:e},e))})]}),(0,g.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:R.map((e,t)=>(0,g.jsx)(i,{kind:t===0?`primary`:`secondary`,onClick:e.start,disabled:z,children:e.label},e.label))})]}),(0,g.jsxs)(`p`,{"aria-live":`polite`,className:`flex items-center gap-2 text-xs text-ink-muted`,children:[(0,g.jsx)(`span`,{className:`h-2 w-2 rounded-full ${P?`bg-notice-ink`:C===``?`bg-ink-faint`:`bg-live`}`}),y(P?`diag.running`:C===``?`diag.needsAlias`:`diag.idle`)]})]})}),w?(0,g.jsxs)(n,{as:`section`,radius:`md`,children:[(0,g.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(f,{name:`config`,className:`h-4 w-4 text-ink-muted`}),(0,g.jsx)(`h3`,{className:o,children:y(`diag.configuration`)})]}),(0,g.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:w.files.length})]}),(0,g.jsx)(`ul`,{className:`divide-y divide-hairline px-4`,children:w.files.map(e=>(0,g.jsxs)(`li`,{className:`flex items-center gap-2 py-2.5 font-mono text-xs text-ink-muted`,children:[(0,g.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${e.missing?`bg-notice-ink`:`bg-live`}`}),e.path,e.missing?(0,g.jsx)(`span`,{className:`text-notice-ink`,children:y(`diag.missingSuffix`)}):null]},e.path))}),w.diagnostics.length>0?(0,g.jsx)(`ul`,{className:`border-t border-line bg-surface-subtle px-4 py-3`,children:w.diagnostics.map((e,t)=>(0,g.jsx)(`li`,{className:`py-1 font-mono text-xs ${e.severity===`error`?`text-danger`:e.severity===`warning`?`text-notice-ink`:`text-ink-muted`}`,children:`${e.code} ${e.path}${e.line>0?`:${e.line}`:``} ${e.detail}`},`${e.code}-${t}`))}):null]}):null,B?(0,g.jsxs)(n,{radius:`md`,children:[L.length>0?(0,g.jsxs)(`section`,{className:`border-b border-notice-line bg-notice px-4 py-4 text-sm`,children:[(0,g.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:y(`diag.canRunCommand`)}),(0,g.jsx)(`p`,{className:`text-ink-muted`,children:y(`conn.analysisTokenWarning`)}),(0,g.jsx)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:L.map(e=>(0,g.jsxs)(`li`,{children:[(0,g.jsx)(`span`,{className:`text-ink-muted`,children:y(`diag.directiveAt`,{keyword:e.keyword,path:e.path,line:e.line})}),(0,g.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-ink`,children:e.command})]},`${e.path}:${e.line}:${e.keyword}`))})]}):null,E&&E.sources.length>0?(0,g.jsxs)(`section`,{className:`px-4 py-4`,children:[(0,g.jsxs)(`p`,{className:`mb-2 flex items-center justify-end gap-1 text-xs text-ink-muted md:hidden`,children:[y(`diag.tableScrollHint`),(0,g.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]}),(0,g.jsx)(`div`,{className:`overflow-x-auto`,children:(0,g.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,g.jsx)(`caption`,{className:`mb-2 text-left ${d}`,children:y(`diag.sourcesCaption`)}),(0,g.jsx)(`thead`,{children:(0,g.jsxs)(`tr`,{className:c,children:[(0,g.jsx)(`th`,{scope:`col`,className:u,children:y(`diag.columnKeyword`)}),(0,g.jsx)(`th`,{scope:`col`,className:u,children:y(`diag.columnValue`)}),(0,g.jsx)(`th`,{scope:`col`,className:u,children:y(`diag.columnWhere`)}),(0,g.jsx)(`th`,{scope:`col`,className:u,children:y(`diag.columnCondition`)}),(0,g.jsx)(`th`,{scope:`col`,className:u,children:y(`diag.columnState`)})]})}),(0,g.jsx)(`tbody`,{children:E.sources.map(e=>(0,g.jsxs)(`tr`,{className:`border-b border-line ${e.winner?``:`opacity-60`}`,children:[(0,g.jsx)(`th`,{scope:`row`,className:`py-1.5 pr-3 text-left font-normal text-ink-muted`,children:e.keyword}),(0,g.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink`,children:e.value}),(0,g.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink-faint`,children:`${e.path}:${e.line}`}),(0,g.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink-faint`,children:e.condition}),(0,g.jsx)(`td`,{className:`py-1.5 text-ink-faint`,children:e.winner?y(`diag.inEffect`):y(`diag.superseded`)})]},`${e.path}:${e.line}:${e.keyword}`))})]})})]}):null,E&&E.route.length>0?(0,g.jsxs)(`section`,{className:`border-t border-line px-4 py-4 text-sm`,children:[(0,g.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,g.jsx)(f,{name:`connections`,className:`h-4 w-4 text-ink-muted`}),(0,g.jsx)(`h3`,{className:o,children:y(`diag.route`)})]}),(0,g.jsx)(`ol`,{className:`flex flex-col gap-2`,children:E.route.map(e=>(0,g.jsxs)(`li`,{className:`flex items-start gap-3`,style:{marginInlineStart:`${e.depth}rem`},children:[(0,g.jsx)(`span`,{className:`mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-select-fill font-mono text-[10px] text-ink-muted`,children:e.order+1}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`span`,{className:`font-medium text-ink`,children:e.hop}),e.complex?(0,g.jsx)(`span`,{className:`ml-2 text-notice-ink`,children:y(`diag.hopComplex`)}):(0,g.jsx)(`span`,{className:`ml-2 text-ink-muted`,children:`${e.user===``?``:`${e.user}@`}${e.hostname}${e.port===``?``:`:${e.port}`}`}),e.parent===``?null:(0,g.jsx)(`span`,{className:`ml-2 text-ink-faint`,children:y(`diag.reachedThrough`,{parent:e.parent})})]})]},`${e.order}-${e.hop}`))})]}):null,E&&E.complexities.length>0?(0,g.jsxs)(`section`,{className:`border-t border-notice-line bg-notice px-4 py-4 text-sm`,children:[(0,g.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:y(`diag.notSimple`)}),(0,g.jsx)(`p`,{className:`text-ink-muted`,children:y(`diag.notSimpleDetail`)}),(0,g.jsx)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:E.complexities.map((e,t)=>(0,g.jsxs)(`li`,{children:[(0,g.jsx)(`span`,{className:`text-ink`,children:e.code}),(0,g.jsx)(`span`,{className:`ml-2 text-ink-muted`,children:`${e.path}:${e.line}`}),e.condition===``?null:(0,g.jsx)(`span`,{className:`ml-2 text-ink-faint`,children:y(`diag.inside`,{condition:e.condition})}),e.detail===``?null:(0,g.jsx)(`p`,{className:`text-ink-muted`,children:e.detail})]},`${e.code}-${e.path}-${e.line}-${t}`))})]}):null,O||A?(0,g.jsxs)(`div`,{className:`grid border-t border-line md:grid-cols-2 md:divide-x md:divide-line`,children:[O?(0,g.jsxs)(`section`,{className:`flex flex-col gap-2 px-4 py-4 text-sm`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,g.jsx)(`h3`,{className:o,children:y(`diag.reachability`)}),(0,g.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-live`})]}),(0,g.jsx)(`p`,{className:`font-mono text-xs text-ink`,children:O.address}),(0,g.jsx)(`p`,{className:`font-medium text-ink`,children:O.outcome}),(0,g.jsx)(`p`,{className:d,children:O.notice})]}):null,A?(0,g.jsxs)(`section`,{className:`flex flex-col gap-2 border-t border-line px-4 py-4 text-sm md:border-t-0`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,g.jsx)(`h3`,{className:o,children:y(`diag.authentication`)}),(0,g.jsx)(`span`,{className:`h-2 w-2 rounded-full ${A.authenticated?`bg-live`:`bg-notice-ink`}`})]}),(0,g.jsx)(`p`,{className:`font-medium text-ink`,children:A.outcome}),A.method?(0,g.jsx)(`p`,{className:d,children:y(`diag.authenticationMethod`,{method:A.method})}):null,A.detail?(0,g.jsx)(`pre`,{className:`whitespace-pre-wrap break-all font-mono text-xs text-ink-muted`,children:A.detail}):null]}):null]}):null]}):null]})}export{v as DiagnosticsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/DiagnosticsPanel-BK7IKd4T.js b/internal/ui/dist/assets/DiagnosticsPanel-BK7IKd4T.js new file mode 100644 index 000000000..4c857f733 --- /dev/null +++ b/internal/ui/dist/assets/DiagnosticsPanel-BK7IKd4T.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{n,r,t as i}from"./surface-DPFJ-mE2.js";import{_ as a,f as o,i as s,m as c,n as l,p as u,s as d}from"./form-zbLY2cuV.js";import{$ as f}from"./index-DtC-pXtZ.js";import{t as p}from"./diagnostics-C7nSnivf.js";import{t as m}from"./useAsyncOperation-DcaEx5AT.js";import{r as h}from"./page-BaebBDRI.js";var g=e(),_=t(),v=`[&_button]:min-h-10 md:[&_button]:min-h-0`;function y({api:e=p,host:t,hosts:y=[]}){let b=a(),x=t!==void 0,[S,C]=(0,g.useState)(``),w=t??S,[T,E]=(0,g.useState)(null),[D,O]=(0,g.useState)(null),[k,A]=(0,g.useState)(null),[j,M]=(0,g.useState)(null),N=m(),{fail:P,clearError:F}=N;(0,g.useEffect)(()=>{if(x)return;let t=!0;return e.configCheck().then(e=>{t&&E(e)}).catch(()=>{t&&P(b(`diag.configUnreadable`))}),()=>{t=!1}},[e,x,b,P]),(0,g.useEffect)(()=>{O(null),A(null),M(null),F()},[w,F]);function I(e,t,n){return N.run(e,{apply:t,describe:()=>n})}let L=D?.executableDirectives??[],R=[{label:b(`diag.explain`),start:()=>void I(()=>e.effective(w),O,b(`diag.explainFailed`))},{label:b(`diag.checkReachability`),start:()=>void I(()=>e.reachability(w),A,b(`diag.reachabilityFailed`))},{label:b(`diag.testAuthentication`),start:()=>void I(()=>e.authentication(w,L.some(e=>!e.overridable)),M,b(`diag.authenticationFailed`))}],z=N.busy||w===``,B=D!==null||k!==null||j!==null;return(0,_.jsxs)(`section`,{"aria-label":x?b(`diag.forHost`,{host:t??``}):void 0,className:`${x?`flex flex-col gap-4`:`mx-auto flex w-full max-w-5xl flex-col gap-6`} ${v}`,children:[x?null:(0,_.jsx)(h,{title:b(`diag.heading`),description:b(`diag.pageDescription`)}),N.error?(0,_.jsx)(r,{tone:`danger`,children:N.error}):null,(0,_.jsx)(n,{as:`section`,radius:`md`,"aria-label":b(`diag.heading`),children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-4 bg-toolbar px-4 py-4 sm:px-5`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[x?(0,_.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,_.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:b(`diag.hostAlias`)}),(0,_.jsx)(`p`,{className:`mt-1 truncate font-mono text-base font-semibold text-ink`,children:w})]}):(0,_.jsxs)(`div`,{className:`min-w-56 flex-1 sm:max-w-sm`,children:[(0,_.jsx)(l,{label:b(`diag.hostAlias`),children:(0,_.jsx)(`input`,{value:S,onChange:e=>C(e.target.value),list:`diagnostic-host-options`,placeholder:`bastion`,className:`${s} font-mono`})}),(0,_.jsx)(`datalist`,{id:`diagnostic-host-options`,children:y.map(e=>(0,_.jsx)(`option`,{value:e,children:e},e))})]}),(0,_.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:R.map((e,t)=>(0,_.jsx)(i,{kind:t===0?`primary`:`secondary`,onClick:e.start,disabled:z,children:e.label},e.label))})]}),(0,_.jsxs)(`p`,{"aria-live":`polite`,className:`flex items-center gap-2 text-xs text-ink-muted`,children:[(0,_.jsx)(`span`,{className:`h-2 w-2 rounded-full ${N.busy?`bg-notice-ink`:w===``?`bg-ink-faint`:`bg-live`}`}),N.busy?b(`diag.running`):b(w===``?`diag.needsAlias`:`diag.idle`)]})]})}),T?(0,_.jsxs)(n,{as:`section`,radius:`md`,children:[(0,_.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(f,{name:`config`,className:`h-4 w-4 text-ink-muted`}),(0,_.jsx)(`h3`,{className:o,children:b(`diag.configuration`)})]}),(0,_.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:T.files.length})]}),(0,_.jsx)(`ul`,{className:`divide-y divide-hairline px-4`,children:T.files.map(e=>(0,_.jsxs)(`li`,{className:`flex items-center gap-2 py-2.5 font-mono text-xs text-ink-muted`,children:[(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${e.missing?`bg-notice-ink`:`bg-live`}`}),e.path,e.missing?(0,_.jsx)(`span`,{className:`text-notice-ink`,children:b(`diag.missingSuffix`)}):null]},e.path))}),T.diagnostics.length>0?(0,_.jsx)(`ul`,{className:`border-t border-line bg-surface-subtle px-4 py-3`,children:T.diagnostics.map((e,t)=>(0,_.jsx)(`li`,{className:`py-1 font-mono text-xs ${e.severity===`error`?`text-danger`:e.severity===`warning`?`text-notice-ink`:`text-ink-muted`}`,children:`${e.code} ${e.path}${e.line>0?`:${e.line}`:``} ${e.detail}`},`${e.code}-${t}`))}):null]}):null,B?(0,_.jsxs)(n,{radius:`md`,children:[L.length>0?(0,_.jsxs)(`section`,{className:`border-b border-notice-line bg-notice px-4 py-4 text-sm`,children:[(0,_.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:b(`diag.canRunCommand`)}),(0,_.jsx)(`p`,{className:`text-ink-muted`,children:b(`conn.analysisTokenWarning`)}),(0,_.jsx)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:L.map(e=>(0,_.jsxs)(`li`,{children:[(0,_.jsx)(`span`,{className:`text-ink-muted`,children:b(`diag.directiveAt`,{keyword:e.keyword,path:e.path,line:e.line})}),(0,_.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-ink`,children:e.command})]},`${e.path}:${e.line}:${e.keyword}`))})]}):null,D&&D.sources.length>0?(0,_.jsxs)(`section`,{className:`px-4 py-4`,children:[(0,_.jsxs)(`p`,{className:`mb-2 flex items-center justify-end gap-1 text-xs text-ink-muted md:hidden`,children:[b(`diag.tableScrollHint`),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]}),(0,_.jsx)(`div`,{className:`overflow-x-auto`,children:(0,_.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,_.jsx)(`caption`,{className:`mb-2 text-left ${d}`,children:b(`diag.sourcesCaption`)}),(0,_.jsx)(`thead`,{children:(0,_.jsxs)(`tr`,{className:c,children:[(0,_.jsx)(`th`,{scope:`col`,className:u,children:b(`diag.columnKeyword`)}),(0,_.jsx)(`th`,{scope:`col`,className:u,children:b(`diag.columnValue`)}),(0,_.jsx)(`th`,{scope:`col`,className:u,children:b(`diag.columnWhere`)}),(0,_.jsx)(`th`,{scope:`col`,className:u,children:b(`diag.columnCondition`)}),(0,_.jsx)(`th`,{scope:`col`,className:u,children:b(`diag.columnState`)})]})}),(0,_.jsx)(`tbody`,{children:D.sources.map(e=>(0,_.jsxs)(`tr`,{className:`border-b border-line ${e.winner?``:`opacity-60`}`,children:[(0,_.jsx)(`th`,{scope:`row`,className:`py-1.5 pr-3 text-left font-normal text-ink-muted`,children:e.keyword}),(0,_.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink`,children:e.value}),(0,_.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink-faint`,children:`${e.path}:${e.line}`}),(0,_.jsx)(`td`,{className:`py-1.5 pr-3 font-mono text-xs text-ink-faint`,children:e.condition}),(0,_.jsx)(`td`,{className:`py-1.5 text-ink-faint`,children:e.winner?b(`diag.inEffect`):b(`diag.superseded`)})]},`${e.path}:${e.line}:${e.keyword}`))})]})})]}):null,D&&D.route.length>0?(0,_.jsxs)(`section`,{className:`border-t border-line px-4 py-4 text-sm`,children:[(0,_.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,_.jsx)(f,{name:`connections`,className:`h-4 w-4 text-ink-muted`}),(0,_.jsx)(`h3`,{className:o,children:b(`diag.route`)})]}),(0,_.jsx)(`ol`,{className:`flex flex-col gap-2`,children:D.route.map(e=>(0,_.jsxs)(`li`,{className:`flex items-start gap-3`,style:{marginInlineStart:`${e.depth}rem`},children:[(0,_.jsx)(`span`,{className:`mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-select-fill font-mono text-[10px] text-ink-muted`,children:e.order+1}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{className:`font-medium text-ink`,children:e.hop}),e.complex?(0,_.jsx)(`span`,{className:`ml-2 text-notice-ink`,children:b(`diag.hopComplex`)}):(0,_.jsx)(`span`,{className:`ml-2 text-ink-muted`,children:`${e.user===``?``:`${e.user}@`}${e.hostname}${e.port===``?``:`:${e.port}`}`}),e.parent===``?null:(0,_.jsx)(`span`,{className:`ml-2 text-ink-faint`,children:b(`diag.reachedThrough`,{parent:e.parent})})]})]},`${e.order}-${e.hop}`))})]}):null,D&&D.complexities.length>0?(0,_.jsxs)(`section`,{className:`border-t border-notice-line bg-notice px-4 py-4 text-sm`,children:[(0,_.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:b(`diag.notSimple`)}),(0,_.jsx)(`p`,{className:`text-ink-muted`,children:b(`diag.notSimpleDetail`)}),(0,_.jsx)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:D.complexities.map((e,t)=>(0,_.jsxs)(`li`,{children:[(0,_.jsx)(`span`,{className:`text-ink`,children:e.code}),(0,_.jsx)(`span`,{className:`ml-2 text-ink-muted`,children:`${e.path}:${e.line}`}),e.condition===``?null:(0,_.jsx)(`span`,{className:`ml-2 text-ink-faint`,children:b(`diag.inside`,{condition:e.condition})}),e.detail===``?null:(0,_.jsx)(`p`,{className:`text-ink-muted`,children:e.detail})]},`${e.code}-${e.path}-${e.line}-${t}`))})]}):null,k||j?(0,_.jsxs)(`div`,{className:`grid border-t border-line md:grid-cols-2 md:divide-x md:divide-line`,children:[k?(0,_.jsxs)(`section`,{className:`flex flex-col gap-2 px-4 py-4 text-sm`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`h3`,{className:o,children:b(`diag.reachability`)}),(0,_.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-live`})]}),(0,_.jsx)(`p`,{className:`font-mono text-xs text-ink`,children:k.address}),(0,_.jsx)(`p`,{className:`font-medium text-ink`,children:k.outcome}),(0,_.jsx)(`p`,{className:d,children:k.notice})]}):null,j?(0,_.jsxs)(`section`,{className:`flex flex-col gap-2 border-t border-line px-4 py-4 text-sm md:border-t-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`h3`,{className:o,children:b(`diag.authentication`)}),(0,_.jsx)(`span`,{className:`h-2 w-2 rounded-full ${j.authenticated?`bg-live`:`bg-notice-ink`}`})]}),(0,_.jsx)(`p`,{className:`font-medium text-ink`,children:j.outcome}),j.method?(0,_.jsx)(`p`,{className:d,children:b(`diag.authenticationMethod`,{method:j.method})}):null,j.detail?(0,_.jsx)(`pre`,{className:`whitespace-pre-wrap break-all font-mono text-xs text-ink-muted`,children:j.detail}):null]}):null]}):null]}):null]})}export{y as DiagnosticsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/GroupsPanel-B9EFjIFq.js b/internal/ui/dist/assets/GroupsPanel-B9EFjIFq.js deleted file mode 100644 index dd7d3411e..000000000 --- a/internal/ui/dist/assets/GroupsPanel-B9EFjIFq.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{m as n,n as r,r as i,t as a}from"./surface-Ck_FblzE.js";import{_ as o,c as s,f as c,i as l,n as u,o as d,s as f,t as p}from"./form-C1olpQVF.js";import{m,v as h}from"./index-DJ8h9zNi.js";import{i as ee,n as g,t as te}from"./rules-Bwt16Wjc.js";import{n as ne,t as _}from"./SavePreview-BHSS1r5l.js";import{n as re,r as ie,t as ae}from"./page-CiAVS9qS.js";var v=e(),y=t();function b({group:e,members:t,onUpdate:n}){let r=o(),i=e.colour===void 0||e.colour===``?``:e.colour;return(0,y.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,y.jsx)(`h3`,{className:d,children:r(`inspector.appOnly`)}),(0,y.jsx)(`p`,{className:f,children:r(`inspector.groupChangesStaged`)}),(0,y.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-line bg-surface-subtle`,children:[(0,y.jsxs)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_7rem]`,children:[(0,y.jsx)(u,{label:r(`groups.colour`),children:(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`input`,{id:`group-colour-${e.name}`,type:`color`,value:i===``?`#8e8e93`:i,onChange:e=>n({colour:e.target.value}),className:`h-9 w-14 rounded-md border border-control-line bg-control`}),i===``?null:(0,y.jsx)(a,{onClick:()=>n({colour:``}),children:r(`groups.clearColour`,{name:e.name})})]})}),(0,y.jsx)(u,{label:r(`groups.displayOrder`),children:(0,y.jsx)(`input`,{id:`group-order-${e.name}`,type:`number`,value:String(e.order??0),onChange:e=>n({order:Number(e.target.value)||0}),className:l})})]}),(0,y.jsxs)(`div`,{className:`border-t border-line p-4`,children:[(0,y.jsx)(p,{label:r(`groups.hide`,{name:e.name}),checked:e.hidden===!0,disabled:t.length>0,onChange:e=>n({hidden:e})}),t.length===0?null:(0,y.jsx)(`p`,{className:`mt-2 ${f}`,children:r(`groups.hideOnlyContainers`)})]})]})]})}function x(e){return e.split(`/`).length}function oe(e){let t=new Map(e.map(e=>[e.name,e.order??0])),n=e=>{let n=[],r=``;for(let i of e.split(`/`))r=r===``?i:`${r}/${i}`,n.push(t.get(r)??0,i);return n};return[...e].sort((e,t)=>{let r=n(e.name),i=n(t.name);for(let e=0;e{try{let e=await m.overview();S(e),w(e.metadata)}catch(e){D(n(e))}},[]);if((0,v.useEffect)(()=>{G()},[G]),(0,v.useEffect)(()=>{if(e===void 0)return;let n=(C?.groups??[]).find(e=>e.name===H);if(n===void 0){e(null);return}e({label:t(`inspector.groupLabel`),attention:(p?.notices??[]).some(e=>e.detail===n.name&&[`group_not_declared`,`group_directory_missing`].includes(e.code)),body:(0,y.jsx)(b,{group:n,members:(p?.hosts??[]).filter(e=>e.group===n.name).map(e=>e.identity.alias),onUpdate:e=>Q(n.name,e)})})},[H,C,p,e]),p===null||C===null)return E===null?(0,y.jsx)(h,{tone:`loading`,title:t(`groups.loading`)}):(0,y.jsx)(h,{tone:`failed`,title:E.message,...E.detail===void 0?{}:{detail:E.detail},action:(0,y.jsx)(a,{onClick:()=>void G(),children:t(`shell.bootstrapRetry`)})});let K=C,ce=p.metadata,q=p.hosts,J=oe(K.groups??[]),le=(p.notices??[]).filter(e=>[`group_not_declared`,`group_directory_missing`].includes(e.code)),Y=new Set((p.metadata.groups??[]).map(e=>e.name)),X=JSON.stringify(K)!==JSON.stringify(p.metadata);function Z(e){return q.filter(t=>t.group===e).map(e=>e.identity.alias)}function ue(){if(!g(O)){V(t(`groups.invalidName`));return}if(J.some(e=>e.name.toLowerCase()===O.toLowerCase())){V(t(`groups.nameTaken`));return}let e={name:O};w({...K,groups:[...J,e]}),k(``),V(``)}function de(){if(H===``||A===``){V(t(`groups.chooseGroupAndKeyword`));return}let e;try{e=ee(M)}catch{V(t(`groups.unbalancedQuote`));return}w({...K,groups:J.map(t=>t.name===H?{...t,settings:[...t.settings??[],{keyword:A,values:e}]}:t)}),j(``),N(``),V(``)}function Q(e,t){w({...K,groups:(K.groups??[]).map(n=>n.name===e?{...n,...t}:n)})}async function fe(e){if(X){V(t(`groups.saveDraftFirst`));return}let r=(P[e]??``).trim();if(r===``||r===e){V(t(`groups.renameNeedsName`));return}if(!g(r)){V(t(`groups.invalidName`));return}if(J.some(e=>e.name===r)){V(t(`groups.renameCollides`,{name:r}));return}try{let t=await m.renameGroup(e,r);T(t.preview),D(null),V(``),F({...P,[e]:``}),await G()}catch(e){T(null),D(n(e))}}async function pe(e){if(X){V(t(`groups.saveDraftFirst`));return}try{let t=await m.deleteGroup(e,I[e]??``);z({...R,[e]:!1}),T(t.preview),D(null),V(``),await G()}catch(e){T(null),D(n(e))}}async function $(e){try{if(e===`preview`){T(await m.preview({kind:`groups`,metadata:K})),D(null);return}let t=await m.save({kind:`groups`,metadata:K});T(t.preview),D(null),await G()}catch(e){T(null),D(n(e))}}function me(){w(ce),T(null),D(null),V(``),F({}),L({}),z({})}return(0,y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,y.jsx)(ie,{title:t(`groups.pageTitle`),description:t(`groups.pageDescription`)}),(0,y.jsx)(re,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[[t(`groups.metricGroups`),J.length],[t(`groups.metricConnections`),q.filter(e=>e.identity.alias!==``).length],[t(`groups.metricDraft`),+!!X]].map(([e,t],n)=>(0,y.jsx)(ae,{label:String(e),value:t,compact:!0,attention:X&&n===2},String(e)))}),(0,y.jsxs)(`details`,{className:`rounded-lg border border-line bg-surface-subtle px-4 py-3`,children:[(0,y.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium text-ink`,children:t(`groups.howItWorks`)}),(0,y.jsxs)(`div`,{className:`mt-3 border-t border-line pt-3`,children:[(0,y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`groups.directoryNote`,{connections:`connections`,keys:`keys`})}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:t(`groups.compileNote`,{file:K.groupsFile??`groups.sshc.conf`})}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-ink-faint`,children:t(`groups.orderNote`)})]})]}),B===``?null:(0,y.jsx)(i,{tone:`danger`,children:B}),(0,y.jsx)(_,{notices:le}),(0,y.jsxs)(r,{as:`section`,radius:`md`,children:[(0,y.jsxs)(`div`,{className:`border-b border-line bg-surface-subtle px-4 py-3`,children:[(0,y.jsx)(`h3`,{className:c,children:t(`groups.addHeading`)}),(0,y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-end gap-2`,children:[(0,y.jsx)(`div`,{className:`min-w-52 flex-1`,children:(0,y.jsx)(u,{label:t(`groups.newName`),hint:t(`groups.nestingNote`),children:(0,y.jsx)(`input`,{ref:W,id:`group-name`,value:O,onChange:e=>k(e.target.value),placeholder:`work/eu`,className:l})})}),(0,y.jsx)(a,{onClick:ue,disabled:O===``,children:t(`groups.add`)})]})]}),J.length===0?(0,y.jsx)(`p`,{className:`p-5 text-sm text-ink-muted`,children:t(`groups.empty`)}):null,(0,y.jsx)(`ul`,{"aria-label":t(`groups.listLabel`),className:`divide-y divide-line`,children:J.map(e=>(0,y.jsxs)(`li`,{onFocus:()=>U(e.name),onClick:()=>U(e.name),className:`relative px-4 py-3 transition-colors ${H===e.name?`bg-select-fill`:`hover:bg-surface-subtle`}`,style:{marginInlineStart:`${(x(e.name)-1)*1.5}rem`},children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,y.jsxs)(`h3`,{className:`flex items-baseline gap-2 text-sm font-medium`,children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,className:`h-2.5 w-2.5 shrink-0 self-center rounded-full ring-4 ring-surface`,style:{backgroundColor:e.colour===void 0||e.colour===``?`var(--ui-ink-faint)`:e.colour}}),x(e.name)===1?null:(0,y.jsx)(`span`,{className:`text-ink-faint`,children:e.name.slice(0,e.name.lastIndexOf(`/`)+1)}),(0,y.jsx)(`span`,{children:e.name.slice(e.name.lastIndexOf(`/`)+1)})]}),Y.has(e.name)?null:(0,y.jsx)(`span`,{className:`rounded border border-notice-line px-1.5 py-0.5 text-[10px] font-normal text-notice-ink`,children:t(`groups.unsaved`)}),(0,y.jsx)(`p`,{className:`font-mono text-xs text-ink-faint`,children:t(`groups.directories`,{connections:`connections/${e.name}`,keys:`keys/${e.name}`})})]}),(0,y.jsxs)(`p`,{className:`mt-1 pl-[1.125rem] text-xs text-ink-muted`,children:[t(`groups.members`),` `,(0,y.jsx)(`span`,{children:Z(e.name).length===0?t(`groups.noMembers`):Z(e.name).join(`, `)})]}),(e.settings??[]).length===0?null:(0,y.jsx)(`ul`,{className:`mt-2 ml-[1.125rem] flex flex-wrap gap-1.5 font-mono text-xs text-ink-muted`,children:(e.settings??[]).map((e,t)=>(0,y.jsx)(`li`,{className:`rounded-md bg-surface px-2 py-1`,children:`${e.keyword} ${te(e.values)}`},`${e.keyword}-${t}`))}),H===e.name?(0,y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-end gap-x-4 gap-y-3 border-t border-line pt-3`,children:[(0,y.jsx)(`p`,{className:`w-full ${f}`,children:t(`groups.immediateActions`)}),(0,y.jsxs)(`label`,{htmlFor:`group-rename-${e.name}`,className:`flex flex-col gap-1`,children:[(0,y.jsx)(`span`,{className:d,children:t(`groups.renameShort`)}),(0,y.jsxs)(`span`,{className:`flex items-end gap-2`,children:[(0,y.jsx)(`input`,{id:`group-rename-${e.name}`,"aria-label":t(`groups.renameTo`,{name:e.name}),value:P[e.name]??``,disabled:X,onChange:t=>F({...P,[e.name]:t.target.value}),className:s}),(0,y.jsx)(a,{onClick:()=>void fe(e.name),disabled:!Y.has(e.name)||X,children:t(`groups.rename`,{name:e.name})})]})]}),R[e.name]===!0?null:(0,y.jsx)(a,{onClick:()=>z({...R,[e.name]:!0}),disabled:!Y.has(e.name)||X,children:t(`groups.remove`,{name:e.name})}),(0,y.jsx)(a,{onClick:()=>{k(`${e.name}/`),W.current?.focus()},children:t(`groups.addChild`,{name:e.name})})]}):null,Y.has(e.name)?null:(0,y.jsx)(`p`,{className:`mt-2 text-xs text-notice-ink`,children:t(`groups.newGroupNote`)}),R[e.name]===!0?(0,y.jsxs)(`div`,{role:`group`,"aria-label":t(`groups.removeInto`,{name:e.name}),className:`mt-3 flex flex-col gap-2 rounded border border-control-line bg-card/30 p-3`,children:[(0,y.jsx)(`p`,{className:`text-sm text-ink`,children:Z(e.name).length===0?t(`groups.removeExplainEmpty`,{name:e.name}):t(`groups.removeExplain`,{name:e.name,count:Z(e.name).length})}),Z(e.name).length===0?null:(0,y.jsxs)(`label`,{htmlFor:`group-move-${e.name}`,className:`flex flex-col gap-1`,children:[(0,y.jsx)(`span`,{className:d,children:t(`groups.removeIntoShort`)}),(0,y.jsxs)(`select`,{id:`group-move-${e.name}`,value:I[e.name]??``,disabled:X,onChange:t=>L({...I,[e.name]:t.target.value}),className:`${l} w-56`,children:[(0,y.jsx)(`option`,{value:``,children:t(`groups.removeIntoNone`)}),J.filter(t=>t.name!==e.name&&!t.name.startsWith(`${e.name}/`)).map(e=>(0,y.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}),(0,y.jsx)(`p`,{className:f,children:t(`groups.removeKeepsFiles`)}),(0,y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,y.jsx)(a,{kind:`danger`,onClick:()=>void pe(e.name),disabled:X,children:t(`groups.removeConfirm`,{name:e.name})}),(0,y.jsx)(a,{onClick:()=>z({...R,[e.name]:!1}),children:t(`groups.removeCancel`)})]})]}):null]},e.name))})]}),H===``?null:(0,y.jsxs)(r,{as:`section`,radius:`md`,className:`flex flex-col gap-4 p-4`,children:[(0,y.jsx)(`h3`,{className:c,children:t(`groups.settingHeadingFor`,{name:H})}),(0,y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,y.jsx)(u,{label:t(`groups.directive`),children:(0,y.jsx)(`input`,{id:`setting-keyword`,value:A,onChange:e=>j(e.target.value),placeholder:`ServerAliveInterval`,className:l})}),(0,y.jsx)(u,{label:t(`groups.value`),children:(0,y.jsx)(`input`,{id:`setting-value`,value:M,onChange:e=>N(e.target.value),placeholder:`30`,className:l})})]}),(0,y.jsx)(a,{onClick:de,className:`self-start`,children:t(`groups.addSetting`)})]}),X?(0,y.jsxs)(`section`,{"aria-label":t(`groups.unsavedBarLabel`),className:`flex flex-wrap items-center gap-3 rounded-md border border-notice-line bg-notice p-3`,children:[(0,y.jsx)(`p`,{className:`min-w-0 grow text-sm text-notice-ink`,children:t(`groups.unsavedBarNote`)}),(0,y.jsx)(a,{onClick:()=>void $(`preview`),children:t(`groups.previewChanges`)}),(0,y.jsx)(a,{onClick:me,children:t(`groups.discard`)}),(0,y.jsx)(a,{kind:`primary`,onClick:()=>void $(`save`),children:t(`groups.save`)})]}):(0,y.jsx)(`p`,{className:`text-xs text-ink-muted`,children:t(`groups.savedNote`)}),(0,y.jsx)(ne,{preview:se,conflict:E?.conflict??null,problem:E})]})}export{S as GroupsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/GroupsPanel-Dl838IU6.js b/internal/ui/dist/assets/GroupsPanel-Dl838IU6.js new file mode 100644 index 000000000..b5522ca32 --- /dev/null +++ b/internal/ui/dist/assets/GroupsPanel-Dl838IU6.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{g as n,n as r,r as i,t as a}from"./surface-DPFJ-mE2.js";import{_ as o,c as s,f as c,i as l,n as u,o as d,s as f,t as p}from"./form-zbLY2cuV.js";import{_ as m,x as h}from"./index-DtC-pXtZ.js";import{i as ee,n as g,t as te}from"./rules-Bwt16Wjc.js";import{n as ne,t as _}from"./SavePreview-BkzRFZRF.js";import{n as re,r as ie,t as ae}from"./page-BaebBDRI.js";var v=e(),y=t();function b({group:e,members:t,onUpdate:n}){let r=o(),i=e.colour===void 0||e.colour===``?``:e.colour;return(0,y.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,y.jsx)(`h3`,{className:d,children:r(`inspector.appOnly`)}),(0,y.jsx)(`p`,{className:f,children:r(`inspector.groupChangesStaged`)}),(0,y.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-line bg-surface-subtle`,children:[(0,y.jsxs)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_7rem]`,children:[(0,y.jsx)(u,{label:r(`groups.colour`),children:(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`input`,{id:`group-colour-${e.name}`,type:`color`,value:i===``?`#8e8e93`:i,onChange:e=>n({colour:e.target.value}),className:`h-9 w-14 rounded-md border border-control-line bg-control`}),i===``?null:(0,y.jsx)(a,{onClick:()=>n({colour:``}),children:r(`groups.clearColour`,{name:e.name})})]})}),(0,y.jsx)(u,{label:r(`groups.displayOrder`),children:(0,y.jsx)(`input`,{id:`group-order-${e.name}`,type:`number`,value:String(e.order??0),onChange:e=>n({order:Number(e.target.value)||0}),className:l})})]}),(0,y.jsxs)(`div`,{className:`border-t border-line p-4`,children:[(0,y.jsx)(p,{label:r(`groups.hide`,{name:e.name}),checked:e.hidden===!0,disabled:t.length>0,onChange:e=>n({hidden:e})}),t.length===0?null:(0,y.jsx)(`p`,{className:`mt-2 ${f}`,children:r(`groups.hideOnlyContainers`)})]})]})]})}function x(e){return e.split(`/`).length}function oe(e){let t=new Map(e.map(e=>[e.name,e.order??0])),n=e=>{let n=[],r=``;for(let i of e.split(`/`))r=r===``?i:`${r}/${i}`,n.push(t.get(r)??0,i);return n};return[...e].sort((e,t)=>{let r=n(e.name),i=n(t.name);for(let e=0;e{try{let e=await m.overview();S(e),w(e.metadata)}catch(e){D(n(e))}},[]);if((0,v.useEffect)(()=>{G()},[G]),(0,v.useEffect)(()=>{if(e===void 0)return;let n=(C?.groups??[]).find(e=>e.name===H);if(n===void 0){e(null);return}e({label:t(`inspector.groupLabel`),attention:(p?.notices??[]).some(e=>e.detail===n.name&&[`group_not_declared`,`group_directory_missing`].includes(e.code)),body:(0,y.jsx)(b,{group:n,members:(p?.hosts??[]).filter(e=>e.group===n.name).map(e=>e.identity.alias),onUpdate:e=>Q(n.name,e)})})},[H,C,p,e]),p===null||C===null)return E===null?(0,y.jsx)(h,{tone:`loading`,title:t(`groups.loading`)}):(0,y.jsx)(h,{tone:`failed`,title:E.message,...E.detail===void 0?{}:{detail:E.detail},action:(0,y.jsx)(a,{onClick:()=>void G(),children:t(`shell.bootstrapRetry`)})});let K=C,ce=p.metadata,q=p.hosts,J=oe(K.groups??[]),le=(p.notices??[]).filter(e=>[`group_not_declared`,`group_directory_missing`].includes(e.code)),Y=new Set((p.metadata.groups??[]).map(e=>e.name)),X=JSON.stringify(K)!==JSON.stringify(p.metadata);function Z(e){return q.filter(t=>t.group===e).map(e=>e.identity.alias)}function ue(){if(!g(O)){V(t(`groups.invalidName`));return}if(J.some(e=>e.name.toLowerCase()===O.toLowerCase())){V(t(`groups.nameTaken`));return}let e={name:O};w({...K,groups:[...J,e]}),k(``),V(``)}function de(){if(H===``||A===``){V(t(`groups.chooseGroupAndKeyword`));return}let e;try{e=ee(M)}catch{V(t(`groups.unbalancedQuote`));return}w({...K,groups:J.map(t=>t.name===H?{...t,settings:[...t.settings??[],{keyword:A,values:e}]}:t)}),j(``),N(``),V(``)}function Q(e,t){w({...K,groups:(K.groups??[]).map(n=>n.name===e?{...n,...t}:n)})}async function fe(e){if(X){V(t(`groups.saveDraftFirst`));return}let r=(P[e]??``).trim();if(r===``||r===e){V(t(`groups.renameNeedsName`));return}if(!g(r)){V(t(`groups.invalidName`));return}if(J.some(e=>e.name===r)){V(t(`groups.renameCollides`,{name:r}));return}try{let t=await m.renameGroup(e,r);T(t.preview),D(null),V(``),F({...P,[e]:``}),await G()}catch(e){T(null),D(n(e))}}async function pe(e){if(X){V(t(`groups.saveDraftFirst`));return}try{let t=await m.deleteGroup(e,I[e]??``);z({...R,[e]:!1}),T(t.preview),D(null),V(``),await G()}catch(e){T(null),D(n(e))}}async function $(e){try{if(e===`preview`){T(await m.preview({kind:`groups`,metadata:K})),D(null);return}let t=await m.save({kind:`groups`,metadata:K});T(t.preview),D(null),await G()}catch(e){T(null),D(n(e))}}function me(){w(ce),T(null),D(null),V(``),F({}),L({}),z({})}return(0,y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,y.jsx)(ie,{title:t(`groups.pageTitle`),description:t(`groups.pageDescription`)}),(0,y.jsx)(re,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[[t(`groups.metricGroups`),J.length],[t(`groups.metricConnections`),q.filter(e=>e.identity.alias!==``).length],[t(`groups.metricDraft`),+!!X]].map(([e,t],n)=>(0,y.jsx)(ae,{label:String(e),value:t,compact:!0,attention:X&&n===2},String(e)))}),(0,y.jsxs)(`details`,{className:`rounded-lg border border-line bg-surface-subtle px-4 py-3`,children:[(0,y.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium text-ink`,children:t(`groups.howItWorks`)}),(0,y.jsxs)(`div`,{className:`mt-3 border-t border-line pt-3`,children:[(0,y.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`groups.directoryNote`,{connections:`connections`,keys:`keys`})}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:t(`groups.compileNote`,{file:K.groupsFile??`groups.sshc.conf`})}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-ink-faint`,children:t(`groups.orderNote`)})]})]}),B===``?null:(0,y.jsx)(i,{tone:`danger`,children:B}),(0,y.jsx)(_,{notices:le}),(0,y.jsxs)(r,{as:`section`,radius:`md`,children:[(0,y.jsxs)(`div`,{className:`border-b border-line bg-surface-subtle px-4 py-3`,children:[(0,y.jsx)(`h3`,{className:c,children:t(`groups.addHeading`)}),(0,y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-end gap-2`,children:[(0,y.jsx)(`div`,{className:`min-w-52 flex-1`,children:(0,y.jsx)(u,{label:t(`groups.newName`),hint:t(`groups.nestingNote`),children:(0,y.jsx)(`input`,{ref:W,id:`group-name`,value:O,onChange:e=>k(e.target.value),placeholder:`work/eu`,className:l})})}),(0,y.jsx)(a,{onClick:ue,disabled:O===``,children:t(`groups.add`)})]})]}),J.length===0?(0,y.jsx)(`p`,{className:`p-5 text-sm text-ink-muted`,children:t(`groups.empty`)}):null,(0,y.jsx)(`ul`,{"aria-label":t(`groups.listLabel`),className:`divide-y divide-line`,children:J.map(e=>(0,y.jsxs)(`li`,{onFocus:()=>U(e.name),onClick:()=>U(e.name),className:`relative px-4 py-3 transition-colors ${H===e.name?`bg-select-fill`:`hover:bg-surface-subtle`}`,style:{marginInlineStart:`${(x(e.name)-1)*1.5}rem`},children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,y.jsxs)(`h3`,{className:`flex items-baseline gap-2 text-sm font-medium`,children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,className:`h-2.5 w-2.5 shrink-0 self-center rounded-full ring-4 ring-surface`,style:{backgroundColor:e.colour===void 0||e.colour===``?`var(--ui-ink-faint)`:e.colour}}),x(e.name)===1?null:(0,y.jsx)(`span`,{className:`text-ink-faint`,children:e.name.slice(0,e.name.lastIndexOf(`/`)+1)}),(0,y.jsx)(`span`,{children:e.name.slice(e.name.lastIndexOf(`/`)+1)})]}),Y.has(e.name)?null:(0,y.jsx)(`span`,{className:`rounded border border-notice-line px-1.5 py-0.5 text-[10px] font-normal text-notice-ink`,children:t(`groups.unsaved`)}),(0,y.jsx)(`p`,{className:`font-mono text-xs text-ink-faint`,children:t(`groups.directories`,{connections:`connections/${e.name}`,keys:`keys/${e.name}`})})]}),(0,y.jsxs)(`p`,{className:`mt-1 pl-[1.125rem] text-xs text-ink-muted`,children:[t(`groups.members`),` `,(0,y.jsx)(`span`,{children:Z(e.name).length===0?t(`groups.noMembers`):Z(e.name).join(`, `)})]}),(e.settings??[]).length===0?null:(0,y.jsx)(`ul`,{className:`mt-2 ml-[1.125rem] flex flex-wrap gap-1.5 font-mono text-xs text-ink-muted`,children:(e.settings??[]).map((e,t)=>(0,y.jsx)(`li`,{className:`rounded-md bg-surface px-2 py-1`,children:`${e.keyword} ${te(e.values)}`},`${e.keyword}-${t}`))}),H===e.name?(0,y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-end gap-x-4 gap-y-3 border-t border-line pt-3`,children:[(0,y.jsx)(`p`,{className:`w-full ${f}`,children:t(`groups.immediateActions`)}),(0,y.jsxs)(`label`,{htmlFor:`group-rename-${e.name}`,className:`flex flex-col gap-1`,children:[(0,y.jsx)(`span`,{className:d,children:t(`groups.renameShort`)}),(0,y.jsxs)(`span`,{className:`flex items-end gap-2`,children:[(0,y.jsx)(`input`,{id:`group-rename-${e.name}`,"aria-label":t(`groups.renameTo`,{name:e.name}),value:P[e.name]??``,disabled:X,onChange:t=>F({...P,[e.name]:t.target.value}),className:s}),(0,y.jsx)(a,{onClick:()=>void fe(e.name),disabled:!Y.has(e.name)||X,children:t(`groups.rename`,{name:e.name})})]})]}),R[e.name]===!0?null:(0,y.jsx)(a,{onClick:()=>z({...R,[e.name]:!0}),disabled:!Y.has(e.name)||X,children:t(`groups.remove`,{name:e.name})}),(0,y.jsx)(a,{onClick:()=>{k(`${e.name}/`),W.current?.focus()},children:t(`groups.addChild`,{name:e.name})})]}):null,Y.has(e.name)?null:(0,y.jsx)(`p`,{className:`mt-2 text-xs text-notice-ink`,children:t(`groups.newGroupNote`)}),R[e.name]===!0?(0,y.jsxs)(`div`,{role:`group`,"aria-label":t(`groups.removeInto`,{name:e.name}),className:`mt-3 flex flex-col gap-2 rounded border border-control-line bg-card/30 p-3`,children:[(0,y.jsx)(`p`,{className:`text-sm text-ink`,children:Z(e.name).length===0?t(`groups.removeExplainEmpty`,{name:e.name}):t(`groups.removeExplain`,{name:e.name,count:Z(e.name).length})}),Z(e.name).length===0?null:(0,y.jsxs)(`label`,{htmlFor:`group-move-${e.name}`,className:`flex flex-col gap-1`,children:[(0,y.jsx)(`span`,{className:d,children:t(`groups.removeIntoShort`)}),(0,y.jsxs)(`select`,{id:`group-move-${e.name}`,value:I[e.name]??``,disabled:X,onChange:t=>L({...I,[e.name]:t.target.value}),className:`${l} w-56`,children:[(0,y.jsx)(`option`,{value:``,children:t(`groups.removeIntoNone`)}),J.filter(t=>t.name!==e.name&&!t.name.startsWith(`${e.name}/`)).map(e=>(0,y.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}),(0,y.jsx)(`p`,{className:f,children:t(`groups.removeKeepsFiles`)}),(0,y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,y.jsx)(a,{kind:`danger`,onClick:()=>void pe(e.name),disabled:X,children:t(`groups.removeConfirm`,{name:e.name})}),(0,y.jsx)(a,{onClick:()=>z({...R,[e.name]:!1}),children:t(`groups.removeCancel`)})]})]}):null]},e.name))})]}),H===``?null:(0,y.jsxs)(r,{as:`section`,radius:`md`,className:`flex flex-col gap-4 p-4`,children:[(0,y.jsx)(`h3`,{className:c,children:t(`groups.settingHeadingFor`,{name:H})}),(0,y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,y.jsx)(u,{label:t(`groups.directive`),children:(0,y.jsx)(`input`,{id:`setting-keyword`,value:A,onChange:e=>j(e.target.value),placeholder:`ServerAliveInterval`,className:l})}),(0,y.jsx)(u,{label:t(`groups.value`),children:(0,y.jsx)(`input`,{id:`setting-value`,value:M,onChange:e=>N(e.target.value),placeholder:`30`,className:l})})]}),(0,y.jsx)(a,{onClick:de,className:`self-start`,children:t(`groups.addSetting`)})]}),X?(0,y.jsxs)(`section`,{"aria-label":t(`groups.unsavedBarLabel`),className:`flex flex-wrap items-center gap-3 rounded-md border border-notice-line bg-notice p-3`,children:[(0,y.jsx)(`p`,{className:`min-w-0 grow text-sm text-notice-ink`,children:t(`groups.unsavedBarNote`)}),(0,y.jsx)(a,{onClick:()=>void $(`preview`),children:t(`groups.previewChanges`)}),(0,y.jsx)(a,{onClick:me,children:t(`groups.discard`)}),(0,y.jsx)(a,{kind:`primary`,onClick:()=>void $(`save`),children:t(`groups.save`)})]}):(0,y.jsx)(`p`,{className:`text-xs text-ink-muted`,children:t(`groups.savedNote`)}),(0,y.jsx)(ne,{preview:se,conflict:E?.conflict??null,problem:E})]})}export{S as GroupsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/HistoryPanel-D75T25CW.js b/internal/ui/dist/assets/HistoryPanel-D7zkZVvV.js similarity index 95% rename from internal/ui/dist/assets/HistoryPanel-D75T25CW.js rename to internal/ui/dist/assets/HistoryPanel-D7zkZVvV.js index f2ae85daa..a27ecee94 100644 --- a/internal/ui/dist/assets/HistoryPanel-D75T25CW.js +++ b/internal/ui/dist/assets/HistoryPanel-D7zkZVvV.js @@ -1 +1 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{m as n,n as r,r as i,t as a}from"./surface-Ck_FblzE.js";import{_ as o}from"./form-C1olpQVF.js";import{J as s,m as c,v as l}from"./index-DJ8h9zNi.js";import{n as u,r as d,t as f}from"./page-CiAVS9qS.js";var p=e(),m=t(),h=`[&_button]:min-h-10 md:[&_button]:min-h-0`;function g(e){return e.startsWith(`connection.`)?`history.operation.connection`:e.startsWith(`key.`)?`history.operation.key`:e.startsWith(`terminal.`)?`history.operation.terminal`:e.startsWith(`engine.`)?`history.operation.engine`:e.startsWith(`secret.`)?`history.operation.vault`:e.startsWith(`sync.`)?`history.operation.sync`:e.startsWith(`config.`)||e.startsWith(`directory.`)||e.startsWith(`group.`)?`history.operation.configuration`:`history.operation.other`}function _(e){switch(e){case`staging`:return`history.status.staging`;case`staged`:return`history.status.staged`;case`applied`:return`history.status.applied`;case`completed`:return`history.status.completed`;case`rolled_back`:return`history.status.rolledBack`;default:return`history.status.unknown`}}function v(){let e=o(),[t,v]=(0,p.useState)(null),[y,b]=(0,p.useState)([]),[x,S]=(0,p.useState)(null),[C,w]=(0,p.useState)(``),T=(0,p.useCallback)(async()=>{let[e,t]=await Promise.allSettled([c.history(),c.overview()]),r=null;e.status===`fulfilled`?v(e.value):(v(e=>e??[]),r=n(e.reason)),t.status===`fulfilled`?b(t.value.pending??[]):r===null&&(r=n(t.reason)),S(r)},[]);(0,p.useEffect)(()=>{T()},[T]);async function E(t,r){try{let n=await c.restore(t,r);w(e(`history.restored`,{path:r,id:n.transactionId})),S(null),await T()}catch(e){S(n(e))}}async function D(t,r){try{await c.recover(t,r),w(e(r===`complete`?`history.completedTransaction`:`history.rolledBack`)),S(null),await T()}catch(e){S(n(e))}}if(t===null)return(0,m.jsx)(l,{tone:`loading`,title:e(`history.loading`)});let O=t.reduce((e,t)=>e+(t.restorable?.length??0),0);return(0,m.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6 ${h}`,children:[(0,m.jsx)(d,{title:e(`history.pageTitle`),description:e(`history.pageDescription`)}),(0,m.jsx)(u,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[[e(`history.metricChanges`),t.length,!1],[e(`history.metricInterrupted`),y.length,y.length>0],[e(`history.metricRestorable`),O,!1]].map(([e,t,n])=>(0,m.jsx)(f,{label:String(e),value:t,compact:!0,attention:!!n},String(e)))}),x===null?null:(0,m.jsx)(i,{tone:`danger`,children:e(`history.requestRejected`,{code:x.code})}),C===``?null:(0,m.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:C}),y.length===0?null:(0,m.jsxs)(r,{as:`section`,"aria-labelledby":`pending-heading`,radius:`md`,tone:`notice`,children:[(0,m.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-notice-line px-4 py-3`,children:[(0,m.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-lg bg-card text-notice-ink`,children:(0,m.jsx)(s,{name:`history`,className:`h-4 w-4`})}),(0,m.jsx)(`h3`,{id:`pending-heading`,className:`text-sm font-semibold text-notice-ink`,children:e(`history.interrupted`)})]}),(0,m.jsx)(`div`,{className:`divide-y divide-notice-line`,children:y.map(t=>(0,m.jsxs)(`article`,{className:`grid gap-4 px-4 py-4 md:grid-cols-[minmax(0,1fr)_auto] md:items-center`,children:[(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:e(g(t.operation))}),(0,m.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:e(`history.interruptedDetail`,{operation:e(g(t.operation)),startedAt:t.startedAt,committed:t.committed,total:t.paths.length})}),(0,m.jsx)(`p`,{className:`mt-2 truncate font-mono text-xs text-ink-muted`,children:t.paths.join(`, `)})]}),(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(a,{disabled:!t.canComplete,onClick:()=>void D(t.id,`complete`),children:e(`history.complete`)}),(0,m.jsx)(a,{onClick:()=>void D(t.id,`rollback`),children:e(`history.rollBack`)})]})]},t.id))})]}),(0,m.jsxs)(r,{as:`section`,"aria-labelledby":`history-heading`,radius:`md`,children:[(0,m.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(s,{name:`history`,className:`h-4 w-4 text-ink-muted`}),(0,m.jsx)(`h3`,{id:`history-heading`,className:`text-sm font-semibold text-ink`,children:e(`history.completed`)})]}),(0,m.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:t.length})]}),t.length===0?(0,m.jsx)(l,{tone:`empty`,title:e(`history.empty`)}):(0,m.jsx)(`ol`,{className:`divide-y divide-line`,children:t.map(t=>(0,m.jsxs)(`li`,{className:`grid gap-4 px-4 py-4 md:grid-cols-[10rem_minmax(0,1fr)_auto] md:items-center`,children:[(0,m.jsx)(`time`,{dateTime:t.startedAt,className:`font-mono text-xs text-ink-muted`,children:t.startedAt}),(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsx)(`p`,{className:`font-medium text-ink`,children:e(g(t.operation))}),(0,m.jsx)(`span`,{className:`rounded-md bg-select-fill px-2 py-0.5 text-[11px] text-ink-muted`,children:e(_(t.status))})]}),(0,m.jsx)(`p`,{className:`mt-1 truncate font-mono text-xs text-ink-faint`,children:t.paths.join(`, `)})]}),(0,m.jsx)(`div`,{className:`flex flex-wrap gap-2 md:justify-end`,children:(t.restorable??[]).map(n=>(0,m.jsx)(a,{onClick:()=>void E(t.id,n),children:e(`history.restorePath`,{path:n})},n))})]},t.id))}),(0,m.jsx)(`p`,{className:`border-t border-line bg-toolbar px-4 py-3 text-xs text-ink-faint`,children:e(`history.backupsKept`)})]})]})}export{v as HistoryPanel}; \ No newline at end of file +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{g as n,n as r,r as i,t as a}from"./surface-DPFJ-mE2.js";import{_ as o}from"./form-zbLY2cuV.js";import{$ as s,_ as c,x as l}from"./index-DtC-pXtZ.js";import{n as u,r as d,t as f}from"./page-BaebBDRI.js";var p=e(),m=t(),h=`[&_button]:min-h-10 md:[&_button]:min-h-0`;function g(e){return e.startsWith(`connection.`)?`history.operation.connection`:e.startsWith(`key.`)?`history.operation.key`:e.startsWith(`terminal.`)?`history.operation.terminal`:e.startsWith(`engine.`)?`history.operation.engine`:e.startsWith(`secret.`)?`history.operation.vault`:e.startsWith(`sync.`)?`history.operation.sync`:e.startsWith(`config.`)||e.startsWith(`directory.`)||e.startsWith(`group.`)?`history.operation.configuration`:`history.operation.other`}function _(e){switch(e){case`staging`:return`history.status.staging`;case`staged`:return`history.status.staged`;case`applied`:return`history.status.applied`;case`completed`:return`history.status.completed`;case`rolled_back`:return`history.status.rolledBack`;default:return`history.status.unknown`}}function v(){let e=o(),[t,v]=(0,p.useState)(null),[y,b]=(0,p.useState)([]),[x,S]=(0,p.useState)(null),[C,w]=(0,p.useState)(``),T=(0,p.useCallback)(async()=>{let[e,t]=await Promise.allSettled([c.history(),c.overview()]),r=null;e.status===`fulfilled`?v(e.value):(v(e=>e??[]),r=n(e.reason)),t.status===`fulfilled`?b(t.value.pending??[]):r===null&&(r=n(t.reason)),S(r)},[]);(0,p.useEffect)(()=>{T()},[T]);async function E(t,r){try{let n=await c.restore(t,r);w(e(`history.restored`,{path:r,id:n.transactionId})),S(null),await T()}catch(e){S(n(e))}}async function D(t,r){try{await c.recover(t,r),w(e(r===`complete`?`history.completedTransaction`:`history.rolledBack`)),S(null),await T()}catch(e){S(n(e))}}if(t===null)return(0,m.jsx)(l,{tone:`loading`,title:e(`history.loading`)});let O=t.reduce((e,t)=>e+(t.restorable?.length??0),0);return(0,m.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6 ${h}`,children:[(0,m.jsx)(d,{title:e(`history.pageTitle`),description:e(`history.pageDescription`)}),(0,m.jsx)(u,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[[e(`history.metricChanges`),t.length,!1],[e(`history.metricInterrupted`),y.length,y.length>0],[e(`history.metricRestorable`),O,!1]].map(([e,t,n])=>(0,m.jsx)(f,{label:String(e),value:t,compact:!0,attention:!!n},String(e)))}),x===null?null:(0,m.jsx)(i,{tone:`danger`,children:e(`history.requestRejected`,{code:x.code})}),C===``?null:(0,m.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:C}),y.length===0?null:(0,m.jsxs)(r,{as:`section`,"aria-labelledby":`pending-heading`,radius:`md`,tone:`notice`,children:[(0,m.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-notice-line px-4 py-3`,children:[(0,m.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-lg bg-card text-notice-ink`,children:(0,m.jsx)(s,{name:`history`,className:`h-4 w-4`})}),(0,m.jsx)(`h3`,{id:`pending-heading`,className:`text-sm font-semibold text-notice-ink`,children:e(`history.interrupted`)})]}),(0,m.jsx)(`div`,{className:`divide-y divide-notice-line`,children:y.map(t=>(0,m.jsxs)(`article`,{className:`grid gap-4 px-4 py-4 md:grid-cols-[minmax(0,1fr)_auto] md:items-center`,children:[(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:e(g(t.operation))}),(0,m.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:e(`history.interruptedDetail`,{operation:e(g(t.operation)),startedAt:t.startedAt,committed:t.committed,total:t.paths.length})}),(0,m.jsx)(`p`,{className:`mt-2 truncate font-mono text-xs text-ink-muted`,children:t.paths.join(`, `)})]}),(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(a,{disabled:!t.canComplete,onClick:()=>void D(t.id,`complete`),children:e(`history.complete`)}),(0,m.jsx)(a,{onClick:()=>void D(t.id,`rollback`),children:e(`history.rollBack`)})]})]},t.id))})]}),(0,m.jsxs)(r,{as:`section`,"aria-labelledby":`history-heading`,radius:`md`,children:[(0,m.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(s,{name:`history`,className:`h-4 w-4 text-ink-muted`}),(0,m.jsx)(`h3`,{id:`history-heading`,className:`text-sm font-semibold text-ink`,children:e(`history.completed`)})]}),(0,m.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:t.length})]}),t.length===0?(0,m.jsx)(l,{tone:`empty`,title:e(`history.empty`)}):(0,m.jsx)(`ol`,{className:`divide-y divide-line`,children:t.map(t=>(0,m.jsxs)(`li`,{className:`grid gap-4 px-4 py-4 md:grid-cols-[10rem_minmax(0,1fr)_auto] md:items-center`,children:[(0,m.jsx)(`time`,{dateTime:t.startedAt,className:`font-mono text-xs text-ink-muted`,children:t.startedAt}),(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsx)(`p`,{className:`font-medium text-ink`,children:e(g(t.operation))}),(0,m.jsx)(`span`,{className:`rounded-md bg-select-fill px-2 py-0.5 text-[11px] text-ink-muted`,children:e(_(t.status))})]}),(0,m.jsx)(`p`,{className:`mt-1 truncate font-mono text-xs text-ink-faint`,children:t.paths.join(`, `)})]}),(0,m.jsx)(`div`,{className:`flex flex-wrap gap-2 md:justify-end`,children:(t.restorable??[]).map(n=>(0,m.jsx)(a,{onClick:()=>void E(t.id,n),children:e(`history.restorePath`,{path:n})},n))})]},t.id))}),(0,m.jsx)(`p`,{className:`border-t border-line bg-toolbar px-4 py-3 text-xs text-ink-faint`,children:e(`history.backupsKept`)})]})]})}export{v as HistoryPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/KeysScreen-C8IdSb-o.js b/internal/ui/dist/assets/KeysScreen-C8IdSb-o.js new file mode 100644 index 000000000..0db5beee4 --- /dev/null +++ b/internal/ui/dist/assets/KeysScreen-C8IdSb-o.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{i as n,n as r,r as i,t as a}from"./surface-DPFJ-mE2.js";import{_ as o,d as s,f as c,i as l,l as u,m as d,n as f,p,s as m,t as h}from"./form-zbLY2cuV.js";import{$ as g,J as _,at as v,q as y,rt as b,tt as x,x as ee}from"./index-DtC-pXtZ.js";import{t as S}from"./credentials-HxEBLVTm.js";import{t as te}from"./api-ic2UgGYC.js";import{n as ne,r as re,t as C}from"./page-BaebBDRI.js";import{i as w,n as T,r as E,t as D}from"./tableSort-Bd9PEJHh.js";var O=e();function k(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)([]),[i,a]=(0,O.useState)(``);return{phrases:e,setPhrases:t,dedicatedPhrasePaths:n,setDedicatedPhrasePaths:r,chosenPhrase:i,setChosenPhrase:a,reset:(0,O.useCallback)(()=>{a(``),t([]),r([])},[])}}function ie(){let[e,t]=(0,O.useState)(null),[n,r]=(0,O.useState)(``),[i,a]=(0,O.useState)(``),[o,s]=(0,O.useState)(!1);return{changingPassphrase:e,setChangingPassphrase:t,currentPassphrase:n,setCurrentPassphrase:r,newPassphrase:i,setNewPassphrase:a,removePassphrase:o,setRemovePassphrase:s,close:(0,O.useCallback)(()=>{r(``),a(``),s(!1),t(null)},[])}}function A(e){let[t,n]=(0,O.useState)(null),[r,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(0);return{registering:t,setRegistering:n,agentPassphrase:r,setAgentPassphrase:i,agentLifetime:a,setAgentLifetime:o,close:(0,O.useCallback)(()=>{i(``),o(0),e.reset(),n(null)},[e])}}function ae(e){let[t,n]=(0,O.useState)(null),[r,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(``);return{managingPassphrase:t,setManagingPassphrase:n,storedPhraseName:r,setStoredPhraseName:i,storedPhraseSecret:a,setStoredPhraseSecret:o,close:(0,O.useCallback)(()=>{i(``),o(``),e.reset(),n(null)},[e])}}function j(){let[e,t]=(0,O.useState)(null),[n,r]=(0,O.useState)(``),[i,a]=(0,O.useState)(``);return{relocating:e,setRelocating:t,newName:n,setNewName:r,newGroup:i,setNewGroup:a,close:(0,O.useCallback)(()=>{r(``),a(``),t(null)},[])}}function oe(){let[e,t]=(0,O.useState)(`ed25519`),[n,r]=(0,O.useState)(``),[i,a]=(0,O.useState)(``),[o,s]=(0,O.useState)(``),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(``);return{algorithm:e,setAlgorithm:t,createGroup:u,setCreateGroup:d,fileName:n,setFileName:r,comment:i,setComment:a,passphrase:o,setPassphrase:s,unencrypted:c,setUnencrypted:l}}function M(){let[e,t]=(0,O.useState)({kind:`all`}),[n,r]=(0,O.useState)(new Set),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(``),[u,d]=(0,O.useState)(`keys`),[f,p]=(0,O.useState)(``),[m,h]=(0,O.useState)(``),[g,_]=(0,O.useState)(null);return{folder:e,setFolder:t,chosen:n,setChosen:r,dragging:i,setDragging:a,moveOutcome:o,setMoveOutcome:s,moveTarget:c,setMoveTarget:l,listFilter:u,setListFilter:d,keyQuery:f,setKeyQuery:p,detailsFor:m,setDetailsFor:h,selectedKey:g,setSelectedKey:_}}var N=t();function se({keyId:e,relativePath:t,api:n,onClose:r}){let i=o(),[s,c]=(0,O.useState)(`confirm`),[l,u]=(0,O.useState)(``),d=(0,O.useRef)(null);function f(){u(``),c(`confirm`),r()}async function p(){c(`loading`);try{let t=await n.reveal(e);u(t.privateKey),c(`shown`)}catch{u(``),c(`error`)}}return(0,N.jsxs)(_,{labelledBy:`reveal-heading`,onDismiss:f,initialFocusRef:d,panelClassName:`w-full max-w-2xl rounded-lg p-4 sm:p-5`,children:[(0,N.jsx)(`h3`,{id:`reveal-heading`,className:`font-medium`,children:i(`reveal.heading`,{path:t})}),s===`confirm`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`p`,{className:`mt-3 rounded-md bg-notice px-3 py-2 text-sm text-notice-ink`,children:i(`reveal.warning`)}),(0,N.jsx)(a,{ref:d,className:`mt-4`,onClick:()=>void p(),children:i(`reveal.show`)})]}),s===`loading`&&(0,N.jsx)(`p`,{"aria-live":`polite`,className:`mt-2 text-sm text-ink-muted`,children:i(`reveal.requesting`)}),s===`shown`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`pre`,{"aria-label":i(`reveal.privateKeyLabel`),className:`mt-4 overflow-x-auto rounded-md bg-canvas p-4 text-xs`,children:l}),(0,N.jsx)(`div`,{className:`mt-2`,children:(0,N.jsx)(x,{value:l,label:`copy.privateKey`})})]}),s===`error`&&(0,N.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-danger`,children:i(`reveal.failed`)}),(0,N.jsx)(a,{className:`mt-4`,onClick:f,children:i(`reveal.close`)})]})}var P=`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,F=`inline-flex items-center justify-center rounded border border-control-line px-2 py-1 text-center text-xs leading-tight text-danger hover:bg-select-fill`,I={fingerprint_unavailable:`keys.noteFingerprintUnavailable`,symbolic_link:`keys.noteSymbolicLink`,empty_file:`keys.noteEmptyFile`,not_regular_file:`keys.noteNotRegularFile`,comment_not_preserved:`keys.noteCommentNotPreserved`},ce={private_key:`keys.kind.privateKey`,public_key:`keys.kind.publicKey`,certificate:`keys.kind.certificate`,other:`keys.kind.other`,unreadable:`keys.kind.unreadable`};function L(e,t){return t(ce[e]??`keys.kind.other`)}var le={key_destination_occupied:`keys.blockerTargetOccupied`,key_reference_unresolved:`keys.blockerUnresolved`,key_reference_outside_workspace:`keys.blockerReferenceExternal`,key_group_not_declared:`keys.blockerGroupNotDeclared`,key_destination_is_config:`keys.blockerDestinationIsConfig`,key_in_state_directory:`keys.blockerStateDirectory`};function ue(e,t){let n=e.indexOf(`:`),r=n<0?e:e.slice(0,n),i=n<0?e:e.slice(n+1);return t(le[r]??`keys.blockerOther`,{detail:i})}function R(e){let t=e.split(`/`);return t.length<3||t[0]!==`keys`?``:t.slice(1,-1).join(`/`)}function de(e,t){return e.kind===t.kind?e.kind===`group`&&t.kind===`group`?e.name===t.name:!0:!1}function fe(e,t){if(t.kind===`all`)return e;let n=t.kind===`ungrouped`?``:t.name;return e.filter(e=>R(e.relativePath)===n)}function pe(e,t){let n=new Map;for(let t of e){let e=R(t.relativePath);n.set(e,(n.get(e)??0)+1)}let r=[{folder:{kind:`all`},count:e.length,depth:0}];for(let e of[...t].sort())r.push({folder:{kind:`group`,name:e},count:n.get(e)??0,depth:e.split(`/`).length});return r.push({folder:{kind:`ungrouped`},count:n.get(``)??0,depth:0}),r}var me=new Set([`private_key`,`public_key`,`certificate`]);function he(e,t){return t===`all`?e:e.filter(e=>me.has(e.kind)||e.permissionRisk)}function ge(e){return e.kind===`public_key`?e.fingerprint:e.kind===`certificate`?e.certificate?.signedKeyFingerprint??``:``}function z(e){let t=new Map;for(let n of e)n.kind===`private_key`&&n.fingerprint!==``&&!t.has(n.fingerprint)&&t.set(n.fingerprint,n);let n=new Map,r=new Set;for(let i of e){let e=ge(i);if(e===``)continue;let a=t.get(e);a!==void 0&&(n.set(a.id,[...n.get(a.id)??[],i]),r.add(i.id))}return e.flatMap(e=>r.has(e.id)?[]:[{primary:e,related:n.get(e.id)??[]}])}function _e(e,t){let n=new Set(t.map(e=>e.id));for(let t of z(e)){let e=[t.primary,...t.related];if(e.some(e=>n.has(e.id)))for(let t of e)n.add(t.id)}return e.filter(e=>n.has(e.id))}async function ve(e,t,n){let r=n.kind===`ungrouped`?``:n.name,i={moved:[],unchanged:[],blocked:[],failed:[]};for(let n of t){let t=n.relativePath;if(R(t)===r){i.unchanged.push(t);continue}try{let a=await e(n.id,{group:r});if(a.blockers.length>0){i.blocked.push({path:t,blockers:a.blockers});continue}i.moved.push(t)}catch{i.failed.push(t)}}return i}function ye({items:e,inventory:t,chosen:n,selected:r,detailsFor:i,now:a,revealRelated:s=!1,inlinePanel:c,actions:l}){let u=o(),[f,m]=(0,O.useState)(new Set),[h,g]=(0,O.useState)({key:`file`,direction:`ascending`}),_=z(e),v=(e,n)=>h.key===`kind`?T(`${e.kind}\u0000${e.algorithm}\u0000${e.bits}`,`${n.kind}\u0000${n.algorithm}\u0000${n.bits}`):h.key===`state`?T(xe(e,t),xe(n,t)):T(e.relativePath,n.relativePath),y=w(_,(e,t)=>v(e.primary,t.primary),h.direction).flatMap(e=>{let t=s||f.has(e.primary.id);return[{item:e.primary,relatedCount:e.related.length,relatedExpanded:t,relatedTo:null},...t?w(e.related,v,h.direction).map(t=>({item:t,relatedCount:0,relatedExpanded:!1,relatedTo:e.primary.id})):[]]});function b(e){m(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n})}function x(e){g(t=>E(t.key,t.direction,e))}return(0,N.jsxs)(`table`,{className:`block w-full text-left text-sm md:table md:min-w-[56rem]`,children:[(0,N.jsx)(`caption`,{className:`sr-only`,children:u(`keys.tableCaption`)}),(0,N.jsx)(`thead`,{className:`hidden md:table-header-group`,children:(0,N.jsxs)(`tr`,{className:`${d} bg-surface-subtle`,children:[(0,N.jsx)(`th`,{scope:`col`,className:`${p} w-12 pl-3`,children:(0,N.jsx)(`span`,{className:`sr-only`,children:u(`keys.colChoose`)})}),(0,N.jsx)(D,{column:`file`,activeColumn:h.key,direction:h.direction,onSort:x,className:`${p} w-[30%] whitespace-nowrap`,children:u(`keys.colFile`)}),(0,N.jsx)(D,{column:`kind`,activeColumn:h.key,direction:h.direction,onSort:x,className:`${p} w-[18%] whitespace-nowrap`,children:u(`keys.colKind`)}),(0,N.jsx)(D,{column:`state`,activeColumn:h.key,direction:h.direction,onSort:x,className:`${p} w-[20%] whitespace-nowrap`,children:u(`keys.colState`)}),(0,N.jsx)(`th`,{scope:`col`,className:`${p} whitespace-nowrap text-right`,children:u(`keys.colActions`)})]})}),(0,N.jsxs)(`tbody`,{className:`block md:table-row-group`,children:[y.map(({item:e,relatedCount:o,relatedExpanded:d,relatedTo:f})=>{let p=be(t,e),m=r===e.id,h=i===e.id;return(0,N.jsxs)(O.Fragment,{children:[(0,N.jsxs)(`tr`,{"data-key-related-to":f??void 0,className:`grid grid-cols-[2.25rem_minmax(0,1fr)] border-b border-hairline align-top transition-colors last:border-b-0 md:table-row ${m?`bg-select-fill`:``} ${f===null?``:`bg-surface-subtle`}`,children:[(0,N.jsx)(`td`,{className:`row-span-3 py-3 pl-2 md:table-cell md:pl-3`,children:V(e,t.items)?(0,N.jsxs)(`div`,{className:`flex flex-col items-center gap-1 md:flex-row`,children:[(0,N.jsx)(`label`,{className:`grid min-h-10 min-w-8 place-items-center md:min-h-0 md:min-w-0`,children:(0,N.jsx)(`input`,{type:`checkbox`,"aria-label":u(`keys.chooseKey`,{path:e.relativePath}),checked:n.has(e.id),onChange:t=>l.onToggleChosen(e,t.target.checked),className:`h-4 w-4 accent-accent`})}),(0,N.jsx)(`span`,{draggable:!0,"aria-label":u(`keys.dragKey`,{path:e.relativePath}),onDragStart:t=>l.onBeginDrag(t,e),onDragEnd:l.onEndDrag,className:`flex min-h-10 min-w-8 cursor-grab select-none items-center justify-center rounded px-1.5 py-1 text-sm leading-none text-ink-faint hover:bg-surface active:cursor-grabbing md:min-h-0 md:min-w-0`,children:`⠿`})]}):null}),(0,N.jsxs)(`td`,{className:`min-w-0 py-3 pr-3 md:table-cell md:pr-4 ${f===null?``:`pl-3 md:pl-6`}`,children:[(0,N.jsx)(`button`,{type:`button`,"aria-pressed":m,onClick:()=>l.onSelect(e),className:`block min-h-10 max-w-full break-all text-left font-mono text-sm font-semibold text-ink underline-offset-4 hover:text-accent hover:underline md:min-h-0 md:break-normal`,children:e.relativePath}),e.fingerprint===``?null:(0,N.jsx)(`p`,{className:`mt-1 max-w-xs truncate font-mono text-[11px] text-ink-muted`,title:e.fingerprint,children:e.fingerprint}),e.comment===``?null:(0,N.jsx)(`p`,{className:`mt-0.5 max-w-xs truncate text-xs text-ink-muted`,children:e.comment}),o===0?null:(0,N.jsxs)(`button`,{type:`button`,"aria-expanded":d,disabled:s,onClick:()=>b(e),className:`mt-2 inline-flex min-h-10 items-center gap-1.5 rounded-md bg-surface px-2 py-1 text-xs font-medium text-ink-muted hover:text-ink disabled:cursor-default md:min-h-0`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono text-ink-faint`,children:d?`▾`:`▸`}),u(`keys.relatedPublicFiles`,{count:o})]})]}),(0,N.jsxs)(`td`,{className:`col-start-2 min-w-0 pb-3 pr-3 md:table-cell md:py-3 md:pr-4`,children:[(0,N.jsx)(`span`,{className:`inline-flex rounded-md bg-surface px-2 py-1 text-xs text-ink-muted`,children:L(e.kind,u)}),e.algorithm===``?null:(0,N.jsx)(`p`,{className:`mt-2 font-mono text-xs font-medium text-ink`,children:e.bits>0?`${e.algorithm} · ${e.bits}`:e.algorithm}),e.certificate===void 0?null:(0,N.jsx)(`ul`,{className:`mt-1 text-xs text-ink-muted`,children:B(e.certificate,a,u).map(e=>(0,N.jsx)(`li`,{className:e.expired?`text-danger`:void 0,children:e.text},e.text))})]}),(0,N.jsx)(`td`,{className:`col-start-2 min-w-0 pb-3 pr-3 text-xs md:table-cell md:py-3 md:pr-4`,children:(0,N.jsxs)(`span`,{className:`flex flex-wrap gap-1.5`,children:[e.permissionRisk&&(0,N.jsx)(`span`,{className:`rounded-md bg-notice px-2 py-1 font-medium text-notice-ink`,children:u(`keys.permissionRisk`)}),p&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md bg-surface px-2 py-1 font-medium text-live`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-1.5 rounded-full bg-live`}),u(`keys.stateInAgent`)]}),e.references.length>0&&(0,N.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-1 text-ink-muted`,children:u(`keys.stateUsedBy`,{count:e.references.length})}),e.notes.map(e=>(0,N.jsx)(`span`,{className:`rounded-md bg-notice px-2 py-1 text-notice-ink`,children:e in I?u(I[e]):e},e))]})}),(0,N.jsx)(`td`,{className:`col-span-2 border-t border-hairline p-3 md:table-cell md:border-t-0 md:py-3 md:pr-3 md:pl-0`,children:(0,N.jsxs)(`button`,{type:`button`,className:`${P} ml-auto`,"aria-expanded":h,onClick:()=>l.onToggleDetails(e),children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`mr-1 font-mono text-ink-faint`,children:h?`▾`:`▸`}),u(h?`keys.hideDetails`:`keys.showDetails`)]})})]}),h?(0,N.jsx)(`tr`,{"data-key-detail-for":e.id,className:`block border-b border-line bg-card md:table-row`,children:(0,N.jsx)(`td`,{colSpan:5,className:`block p-3 pt-0 md:table-cell md:p-4 md:pt-1`,children:(0,N.jsxs)(`section`,{"aria-label":u(`keys.actionsHeading`,{path:e.relativePath}),className:`rounded-md border border-line bg-surface-subtle p-3 sm:p-4`,children:[(0,N.jsxs)(`div`,{role:`group`,"aria-label":u(`keys.keyActions`),className:`flex flex-wrap items-center gap-2`,children:[(e.kind===`public_key`||e.kind===`certificate`)&&(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md bg-accent px-2.5 py-1.5 text-center text-xs font-medium leading-tight text-accent-ink hover:brightness-110 disabled:bg-line disabled:text-ink-faint`,onClick:()=>l.onShowPublicKey(e),children:u(`keys.showPublicKey`)}),e.kind===`private_key`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,onClick:()=>l.onReveal(e),children:u(`keys.showPrivateKey`)}),(0,N.jsx)(`button`,{type:`button`,className:p?`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`:`inline-flex items-center justify-center rounded-md bg-accent px-2.5 py-1.5 text-center text-xs font-medium leading-tight text-accent-ink hover:brightness-110 disabled:bg-line disabled:text-ink-faint`,disabled:!t.agentAvailable,onClick:()=>p?l.onRemoveFromAgent(e):l.onAddToAgent(e),children:u(p?`keys.removeFromAgent`:`keys.addToAgent`)}),e.encrypted?(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,onClick:()=>l.onManageStoredPassphrase(e),children:u(`keys.manageStoredPassphrase`)}):null,(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,onClick:()=>l.onChangePassphrase(e),children:u(`keys.changePassphrase`)})]}),V(e,t.items)?(0,N.jsx)(`button`,{type:`button`,className:P,onClick:()=>l.onRelocate(e),children:u(`keys.relocate`)}):null,e.kind===`private_key`?(0,N.jsx)(`button`,{type:`button`,className:`${F} sm:ml-auto`,onClick:()=>l.onMoveToTrash(e),children:u(`keys.moveToTrash`)}):null]}),c?.itemId===e.id?(0,N.jsx)(`div`,{className:`mt-3 border-t border-line pt-3`,children:c.content}):null]})})}):null]},e.id)}),y.length===0&&(0,N.jsx)(`tr`,{className:`block md:table-row`,children:(0,N.jsx)(`td`,{colSpan:5,className:`block p-8 text-center text-sm text-ink-muted md:table-cell`,children:t.items.length===0?u(`keys.inventoryEmpty`):u(`keys.noMatches`)})})]})]})}function B(e,t,n){let r=[];if(e.keyId!==``&&r.push({text:n(`keys.certKeyId`,{keyId:e.keyId}),expired:!1}),e.principals.length>0?r.push({text:n(`keys.certFor`,{principals:e.principals.join(`, `)}),expired:!1}):r.push({text:n(`keys.certAnyPrincipal`),expired:!1}),e.neverExpires)r.push({text:n(`keys.certNeverExpires`),expired:!1});else{let i=new Date(e.validBefore*1e3),a=e.validBefore*1e3<=t,o=`${i.toISOString().slice(0,16).replace(`T`,` `)}Z`;r.push({text:n(a?`keys.certExpired`:`keys.certValidUntil`,{when:o}),expired:a})}return e.signedKeyType!==``&&r.push({text:n(`keys.certSigns`,{keyType:e.signedKeyType,fingerprint:e.signedKeyFingerprint}).trim(),expired:!1}),r}function V(e,t){if(e.kind===`private_key`)return!0;if(e.kind!==`public_key`&&e.kind!==`certificate`)return!1;let n=e.kind===`certificate`&&e.certificate!==void 0?e.certificate.signedKeyFingerprint:e.fingerprint;return n===``||!t.some(e=>e.kind===`private_key`&&e.fingerprint===n)}function be(e,t){return!e.agentAvailable||t.fingerprint===``?!1:e.agentIdentities.some(e=>e.fingerprint===t.fingerprint)}function xe(e,t){return[e.permissionRisk?`permission-risk`:``,be(t,e)?`in-agent`:``,e.references.length>0?`used-${e.references.length}`:``,...e.notes].join(`\0`)}function H(e,t){return e.find(e=>e.uses.includes(t.relativePath))}function U(e,t){return e.includes(t.relativePath)}function W(e,t,n){return H(e,n)!==void 0||U(t,n)}function Se({form:e,groups:t,onSubmit:i}){let s=o(),u=e.relocating;return u===null?null:(0,N.jsxs)(`form`,{"aria-labelledby":`relocate-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i(u)},children:[(0,N.jsx)(`h3`,{id:`relocate-heading`,className:c,children:s(`keys.relocateHeading`,{path:u.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:s(`keys.relocateNote`)}),(0,N.jsxs)(r,{children:[(0,N.jsx)(n,{label:s(`keys.relocateNewName`),children:(0,N.jsx)(`input`,{className:l,value:e.newName,onChange:t=>e.setNewName(t.target.value)})}),(0,N.jsx)(n,{label:s(`keys.relocateGroup`),children:(0,N.jsxs)(`select`,{className:l,value:e.newGroup,onChange:t=>e.setNewGroup(t.target.value),children:[(0,N.jsx)(`option`,{value:``,children:s(`keys.groupNone`)}),t.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]})})]}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(a,{kind:`primary`,type:`submit`,children:s(`keys.relocateSubmit`)}),(0,N.jsx)(a,{onClick:e.close,children:s(`keys.cancel`)})]})]})}function Ce({form:e,onSubmit:t}){let i=o(),s=e.changingPassphrase;return s===null?null:(0,N.jsxs)(`form`,{"aria-labelledby":`passphrase-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),t(s)},children:[(0,N.jsx)(`h3`,{id:`passphrase-heading`,className:c,children:i(`keys.passphraseHeading`,{path:s.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:i(`keys.passphraseNote`)}),(0,N.jsxs)(r,{children:[(0,N.jsx)(n,{label:i(`keys.currentPassphrase`),interactiveChildren:!0,children:(0,N.jsx)(b,{label:i(`keys.currentPassphrase`),value:e.currentPassphrase,onChange:e.setCurrentPassphrase})}),(0,N.jsx)(n,{label:i(`keys.newPassphrase`),interactiveChildren:!0,children:(0,N.jsx)(b,{label:i(`keys.newPassphrase`),value:e.newPassphrase,onChange:e.setNewPassphrase,disabled:e.removePassphrase})})]}),(0,N.jsx)(h,{label:i(`keys.removePassphrase`),checked:e.removePassphrase,onChange:t=>{e.setRemovePassphrase(t),e.setNewPassphrase(``)}}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(a,{kind:`primary`,type:`submit`,children:i(`keys.savePassphrase`)}),(0,N.jsx)(a,{onClick:e.close,children:i(`keys.cancel`)})]})]})}function we({form:e,storedPhrases:t,onSubmit:i,onAssignPhrase:s}){let u=o(),d=e.registering;if(d===null)return null;let{phrases:f,dedicatedPhrasePaths:p,chosenPhrase:m,setChosenPhrase:h}=t,g=W(f,p,d);return(0,N.jsxs)(`form`,{"aria-labelledby":`agent-register-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i(d)},children:[(0,N.jsx)(`h3`,{id:`agent-register-heading`,className:c,children:u(`keys.registerHeading`,{path:d.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:u(`keys.registerNote`)}),(0,N.jsxs)(r,{children:[d.encrypted&&(0,N.jsx)(n,{label:u(`keys.keyPassphrase`),interactiveChildren:!0,...g?{hint:u(`keys.typedWins`)}:{},children:(0,N.jsx)(b,{label:u(`keys.keyPassphrase`),value:e.agentPassphrase,onChange:e.setAgentPassphrase})}),(0,N.jsx)(n,{label:u(`keys.lifetime`),children:(0,N.jsxs)(`select`,{className:l,value:String(e.agentLifetime),onChange:t=>e.setAgentLifetime(Number(t.target.value)),children:[(0,N.jsx)(`option`,{value:`0`,children:u(`keys.lifetimeForever`)}),(0,N.jsx)(`option`,{value:`3600`,children:u(`keys.lifetimeHour`)}),(0,N.jsx)(`option`,{value:`14400`,children:u(`keys.lifetimeFourHours`)}),(0,N.jsx)(`option`,{value:`43200`,children:u(`keys.lifetimeTwelveHours`)})]})})]}),d.encrypted&&g&&(0,N.jsx)(`p`,{className:`text-xs text-ink-muted`,children:U(p,d)?u(`keys.usesDedicatedPassphrase`):u(`keys.usesStoredPassphrase`,{name:H(f,d).name})}),d.encrypted&&f.length>0&&(0,N.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,N.jsx)(n,{label:u(`keys.useStoredPassphrase`),children:(0,N.jsxs)(`select`,{className:`w-full rounded-md border border-control-line bg-control px-2 py-1.5 text-sm text-ink placeholder:text-ink-faint focus:border-accent focus:outline-none disabled:border-line disabled:text-ink-faint`,value:m,onChange:e=>h(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:u(`keys.choosePassphraseName`)}),f.map(e=>(0,N.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}),(0,N.jsx)(a,{disabled:m===``,onClick:()=>s(d),children:u(`keys.useThisPassphrase`)})]}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(a,{kind:`primary`,type:`submit`,children:u(`keys.registerSubmit`)}),(0,N.jsx)(a,{onClick:e.close,children:u(`keys.cancel`)})]})]})}function Te({form:e,storedPhrases:t,onAssign:n,onUnassign:r,onStoreAndAssign:i}){let u=o(),d=e.managingPassphrase;if(d===null)return null;let{phrases:p,dedicatedPhrasePaths:h,chosenPhrase:g,setChosenPhrase:_}=t;return(0,N.jsxs)(`section`,{"aria-labelledby":`stored-passphrase-heading`,className:s,children:[(0,N.jsx)(`h3`,{id:`stored-passphrase-heading`,className:c,children:u(`keys.storedPassphraseHeading`,{path:d.relativePath})}),(0,N.jsx)(`p`,{className:m,children:u(`keys.storedPassphraseNote`)}),W(p,h,d)?(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-lg border border-line bg-card p-3`,children:[(0,N.jsx)(`p`,{className:`grow text-sm text-ink`,children:U(h,d)?u(`keys.usesDedicatedPassphrase`):u(`keys.usesStoredPassphrase`,{name:H(p,d).name})}),(0,N.jsx)(a,{onClick:()=>r(d),children:u(`keys.unassignPassphrase`)})]}):null,p.length===0?null:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,N.jsx)(f,{label:u(`keys.useStoredPassphrase`),children:(0,N.jsxs)(`select`,{className:l,value:g,onChange:e=>_(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:u(`keys.choosePassphraseName`)}),p.map(e=>(0,N.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}),(0,N.jsx)(a,{disabled:g===``,onClick:()=>n(d),children:u(`keys.useThisPassphrase`)})]}),(0,N.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,N.jsx)(f,{label:u(`keys.newStoredPassphraseName`),children:(0,N.jsx)(`input`,{value:e.storedPhraseName,onChange:t=>e.setStoredPhraseName(t.target.value),className:l})}),(0,N.jsx)(f,{label:u(`keys.newStoredPassphraseValue`),interactiveChildren:!0,children:(0,N.jsx)(b,{label:u(`keys.newStoredPassphraseValue`),value:e.storedPhraseSecret,onChange:e.setStoredPhraseSecret})})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(a,{kind:`primary`,disabled:e.storedPhraseName===``||e.storedPhraseSecret===``,onClick:()=>i(d),children:u(`keys.storeAndUsePassphrase`)}),(0,N.jsx)(a,{onClick:e.close,children:u(`keys.cancel`)})]})]})}function Ee({item:e,members:t,onConfirm:n,onCancel:r}){let i=o();return e===null?null:(0,N.jsxs)(`section`,{"aria-labelledby":`trash-confirm-heading`,className:s,children:[(0,N.jsx)(`h3`,{id:`trash-confirm-heading`,className:c,children:i(`keys.trashConfirmHeading`,{path:e.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink`,children:i(`keys.trashExplain`)}),(0,N.jsx)(`ul`,{className:`flex flex-col gap-0.5 font-mono text-xs text-ink-muted`,children:t.map(e=>(0,N.jsx)(`li`,{children:e.relativePath},e.id))}),e.references.length===0?(0,N.jsx)(`p`,{className:m,children:i(`keys.trashNoReferences`)}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`p`,{className:`text-sm text-notice-ink`,children:i(`keys.trashReferences`,{count:e.references.length})}),(0,N.jsx)(`ul`,{className:`flex flex-col gap-0.5 font-mono text-xs text-notice-ink`,children:e.references.map((e,t)=>(0,N.jsx)(`li`,{children:`${e.hostPatterns.join(` `)} · ${e.configPath}:${e.line}`},`${e.configPath}-${e.line}-${t}`))})]}),(0,N.jsx)(`p`,{className:m,children:i(`keys.trashIsRecoverable`)}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(`button`,{type:`button`,className:F,onClick:()=>n(e.id),children:i(`keys.trashConfirm`)}),(0,N.jsx)(a,{onClick:r,children:i(`keys.trashCancel`)})]})]})}function De({result:e,onClose:t}){let n=o();return e===null?null:(0,N.jsxs)(`section`,{"aria-labelledby":`relocate-result-heading`,className:`flex flex-col gap-2 text-sm`,children:[(0,N.jsx)(`h3`,{id:`relocate-result-heading`,className:c,children:e.blockers.length>0?n(`keys.relocateRefused`):n(`keys.relocateDone`,{path:e.relativePath})}),e.blockers.length>0&&(0,N.jsx)(`ul`,{role:`alert`,className:`text-notice-ink`,children:e.blockers.map(e=>(0,N.jsx)(`li`,{children:ue(e,n)},e))}),e.files.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-ink-muted`,children:n(`keys.relocateMoved`)}),(0,N.jsx)(`ul`,{className:`font-mono text-xs text-ink-muted`,children:e.files.map(e=>(0,N.jsx)(`li`,{children:n(`keys.relocateFilePair`,{from:e.from,to:e.to})},e.from))})]}),e.references.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-ink-muted`,children:n(`keys.relocateRewritten`)}),(0,N.jsx)(`ul`,{className:`text-xs text-ink-muted`,children:e.references.map(e=>(0,N.jsx)(`li`,{children:n(`keys.relocateReference`,{directive:e.directive,from:e.from,to:e.to,path:e.configPath,line:e.line})},`${e.configPath}:${e.line}:${e.from}`))})]}),e.skipped.length>0&&(0,N.jsx)(`p`,{className:`text-ink-muted`,children:n(`keys.relocateSkipped`,{paths:e.skipped.join(`, `)})}),e.notes.map(e=>(0,N.jsx)(`p`,{className:`text-notice-ink`,children:e in I?n(I[e]):e},e)),(0,N.jsx)(`div`,{children:(0,N.jsx)(a,{onClick:t,children:n(`keys.close`)})})]})}function Oe({inventory:e}){let t=o(),[n,r]=(0,O.useState)({key:`algorithm`,direction:`ascending`});return(0,N.jsxs)(`section`,{"aria-labelledby":`agent-heading`,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{id:`agent-heading`,className:c,children:t(`keys.agentHeading`)}),e.agentAvailable?e.agentIdentities.length===0?(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`keys.agentEmpty`)}):(0,N.jsxs)(`table`,{className:`w-full min-w-[32rem] text-left text-sm`,children:[(0,N.jsx)(`caption`,{className:`sr-only`,children:t(`keys.agentIdentitiesCaption`)}),(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:d,children:[(0,N.jsx)(D,{column:`algorithm`,activeColumn:n.key,direction:n.direction,onSort:e=>r(t=>E(t.key,t.direction,e)),className:`${p} whitespace-nowrap`,children:t(`keys.colAlgorithm`)}),(0,N.jsx)(D,{column:`fingerprint`,activeColumn:n.key,direction:n.direction,onSort:e=>r(t=>E(t.key,t.direction,e)),className:`${p} whitespace-nowrap`,children:t(`keys.colFingerprint`)}),(0,N.jsx)(D,{column:`comment`,activeColumn:n.key,direction:n.direction,onSort:e=>r(t=>E(t.key,t.direction,e)),className:`${p} whitespace-nowrap`,children:t(`keys.colComment`)})]})}),(0,N.jsx)(`tbody`,{children:w(e.agentIdentities,(e,t)=>n.key===`fingerprint`?T(e.fingerprint,t.fingerprint):n.key===`comment`?T(e.comment,t.comment):T(`${e.algorithm}\u0000${e.bits}`,`${t.algorithm}\u0000${t.bits}`),n.direction).map(e=>(0,N.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,N.jsx)(`td`,{className:`py-2 pr-3`,children:e.bits>0?`${e.algorithm} · ${e.bits}`:e.algorithm}),(0,N.jsx)(`td`,{className:`py-2 pr-3 font-mono text-xs break-all`,children:e.fingerprint}),(0,N.jsx)(`td`,{className:`py-2`,children:e.comment})]},e.fingerprint))})]}):(0,N.jsx)(`p`,{className:`text-sm text-notice-ink`,children:t(`keys.agentUnavailable`)}),e.agentDelegations.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`keys.agentDelegationsNote`)}),(0,N.jsx)(`ul`,{className:`text-sm text-ink-muted`,children:e.agentDelegations.map(e=>(0,N.jsxs)(`li`,{children:[t(`keys.reference`,{directive:e.directive,value:e.value,path:e.configPath,line:e.line}),e.hostPatterns.length>0?` (${e.hostPatterns.join(` `)})`:``]},`${e.configPath}:${e.line}`))})]})]})}function ke({trash:e,onRestore:t,onPurge:n}){let r=o(),[i,a]=(0,O.useState)({key:`files`,direction:`ascending`}),[s,l]=(0,O.useState)(``);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`details`,{className:`border-t border-line bg-surface-subtle p-4`,children:[(0,N.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium text-ink`,children:r(`keys.trashSummary`,{count:e.entries.length})}),(0,N.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2 border-t border-line pt-3`,children:[(0,N.jsx)(`h3`,{className:c,children:r(`keys.trashHeading`)}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`keys.trashNote`)}),(0,N.jsx)(`div`,{className:`overflow-x-auto`,children:(0,N.jsxs)(`table`,{className:`w-full min-w-[40rem] text-left text-sm`,children:[(0,N.jsx)(`caption`,{className:`sr-only`,children:r(`keys.trashCaption`)}),(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:d,children:[(0,N.jsx)(D,{column:`files`,activeColumn:i.key,direction:i.direction,onSort:e=>a(t=>E(t.key,t.direction,e)),className:`${p} whitespace-nowrap`,children:r(`keys.colFiles`)}),(0,N.jsx)(D,{column:`age`,activeColumn:i.key,direction:i.direction,onSort:e=>a(t=>E(t.key,t.direction,e)),className:`${p} whitespace-nowrap`,children:r(`keys.colAge`)}),(0,N.jsx)(D,{column:`status`,activeColumn:i.key,direction:i.direction,onSort:e=>a(t=>E(t.key,t.direction,e)),className:`${p} whitespace-nowrap`,children:r(`keys.colStatus`)}),(0,N.jsx)(`th`,{scope:`col`,className:`${p} whitespace-nowrap`,children:r(`keys.colActions`)})]})}),(0,N.jsxs)(`tbody`,{children:[w(e.entries,(e,t)=>i.key===`age`?e.ageDays-t.ageDays:i.key===`status`?T(e.restorable?r(`keys.restorable`):e.blockers.join(`, `),t.restorable?r(`keys.restorable`):t.blockers.join(`, `)):T(e.files.map(e=>e.originalRelativePath).join(`, `),t.files.map(e=>e.originalRelativePath).join(`, `)),i.direction).map(n=>(0,N.jsxs)(`tr`,{className:`border-b border-line align-top`,children:[(0,N.jsx)(`td`,{className:`py-2 pr-3 font-mono text-xs`,children:n.files.map(e=>e.originalRelativePath).join(`, `)}),(0,N.jsx)(`td`,{className:`py-2 pr-3`,children:n.stale?r(`keys.ageStale`,{days:n.ageDays,retention:e.retentionDays}):r(`keys.age`,{days:n.ageDays})}),(0,N.jsx)(`td`,{className:`py-2 pr-3`,children:n.restorable?r(`keys.restorable`):n.blockers.join(`, `)}),(0,N.jsx)(`td`,{className:`py-2`,children:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,N.jsx)(`button`,{type:`button`,className:P,onClick:()=>void t(n.id),children:r(`keys.restore`)}),(0,N.jsx)(`button`,{type:`button`,className:F,onClick:()=>l(n.id),children:r(`keys.purge`)})]})})]},n.id)),e.entries.length===0&&(0,N.jsx)(`tr`,{children:(0,N.jsx)(`td`,{colSpan:4,className:`py-3 text-sm text-ink-muted`,children:r(`keys.trashEmpty`)})})]})]})})]})]}),s===``?null:(0,N.jsx)(y,{id:`key-purge-heading`,heading:r(`keys.purge`),body:(0,N.jsx)(`p`,{className:`text-sm text-danger`,children:r(`keys.purgeWarning`)}),confirmLabel:r(`keys.confirmPurge`),cancelLabel:r(`keys.cancel`),onConfirm:()=>void n(s).then(e=>{e&&l(``)}),onCancel:()=>l(``)})]})}function Ae({api:e=te,variants:t,groups:i,onGenerated:u,onFailure:d,onAssignGeneratedKey:f,onInstallGeneratedKey:p}){let g=o(),{algorithm:_,setAlgorithm:v,fileName:y,setFileName:ee,comment:S,setComment:ne,passphrase:re,setPassphrase:C,unencrypted:w,setUnencrypted:T,createGroup:E,setCreateGroup:D}=oe(),[k,ie]=(0,O.useState)(null),[A,ae]=(0,O.useState)(null),j=t.find(e=>e.algorithm===_),M=j===void 0||j.inProcess;async function se(){d(``),ie(null),ae(null);try{if(j!==void 0&&!j.inProcess){let t=await e.hardwareCommand({algorithm:_,fileName:y,group:E,comment:S});ie(t.command);return}let t=await e.generate({algorithm:_,bits:j?.bits??0,fileName:y,group:E,comment:S,passphrase:re,unencrypted:w});ae({private:{privateKeyId:t.id,privateRelativePath:t.relativePath},public:{publicRelativePath:t.publicRelativePath}}),C(``),ee(``),await u()}catch{C(``),d(g(`keys.createFailed`))}}return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`form`,{"aria-labelledby":`create-key-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),se()},children:[(0,N.jsx)(`h3`,{id:`create-key-heading`,className:c,children:g(`keys.createHeading`)}),(0,N.jsxs)(r,{children:[(0,N.jsx)(n,{label:g(`keys.algorithm`),stackOnNarrow:!0,children:(0,N.jsx)(`select`,{className:`${l} min-h-10 sm:min-h-0`,value:_,onChange:e=>v(e.target.value),children:t.map(e=>(0,N.jsx)(`option`,{value:e.algorithm,children:e.label},`${e.algorithm}-${e.bits}`))})}),(0,N.jsx)(n,{label:g(`keys.createGroup`),stackOnNarrow:!0,children:(0,N.jsxs)(`select`,{className:`${l} min-h-10 sm:min-h-0`,value:E,onChange:e=>D(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:g(`keys.groupNone`)}),i.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]})}),(0,N.jsx)(n,{label:g(`keys.fileName`),stackOnNarrow:!0,children:(0,N.jsx)(`input`,{className:`${l} min-h-10 sm:min-h-0`,value:y,onChange:e=>ee(e.target.value)})}),(0,N.jsx)(n,{label:g(`keys.comment`),stackOnNarrow:!0,children:(0,N.jsx)(`input`,{className:`${l} min-h-10 sm:min-h-0`,value:S,onChange:e=>ne(e.target.value)})}),M&&(0,N.jsx)(n,{label:g(`keys.passphrase`),stackOnNarrow:!0,interactiveChildren:!0,children:(0,N.jsx)(b,{label:g(`keys.passphrase`),className:`w-full rounded-md border border-control-line bg-control px-2 py-1.5 text-sm text-ink placeholder:text-ink-faint focus:border-accent focus:outline-none disabled:border-line disabled:text-ink-faint min-h-10 sm:min-h-0`,value:re,onChange:C,disabled:w})})]}),M&&(0,N.jsx)(h,{label:g(`keys.createUnencrypted`),checked:w,onChange:e=>{T(e),C(``)}}),(0,N.jsx)(a,{kind:`primary`,type:`submit`,className:`self-start`,children:g(M?`keys.createSubmit`:`keys.showTerminalCommand`)})]}),A===null?null:(0,N.jsxs)(`section`,{"aria-live":`polite`,className:s,children:[(0,N.jsx)(`h3`,{className:c,children:g(`keys.generatedHeading`)}),(0,N.jsx)(`p`,{className:m,children:g(`keys.generatedNext`,{path:A.private.privateRelativePath})}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(a,{kind:`primary`,onClick:()=>f?.(A.private),children:g(`keys.assignGenerated`)}),(0,N.jsx)(a,{onClick:()=>p?.(A.public),children:g(`keys.installGenerated`)})]})]}),k!==null&&(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:g(`keys.hardwareNote`)}),(0,N.jsx)(`pre`,{"aria-label":g(`copy.terminalCommand`),className:`overflow-x-auto rounded-md bg-canvas p-4 text-xs`,children:k.join(` `)}),(0,N.jsx)(`div`,{className:`mt-2`,children:(0,N.jsx)(x,{value:k.join(` `),label:`copy.terminalCommand`})})]})]})}function G(e,t){return e.kind===`all`?t(`keys.folderAll`):e.kind===`ungrouped`?t(`keys.folderUngrouped`):e.name}function je(e){return e.kind===`all`?null:e}function Me({rows:e,selected:t,dragging:n,onSelect:r,onDropInto:i}){let a=o(),[s,l]=(0,O.useState)(``);return(0,N.jsxs)(`nav`,{"aria-label":a(`keys.foldersLabel`),className:`w-full shrink-0 bg-surface-subtle p-3 md:w-52 md:self-stretch md:border-r md:border-line`,children:[(0,N.jsx)(`h3`,{className:`${c} px-2 py-1 text-xs uppercase tracking-wider text-ink-muted`,children:a(`keys.folders`)}),(0,N.jsx)(`ul`,{className:`mt-1 flex gap-1 overflow-x-auto md:flex-col md:overflow-visible`,children:e.map(e=>{let o=je(e.folder),c=de(e.folder,t),u=a(`keys.folderRow`,{name:G(e.folder,a),count:e.count}),d=`${e.folder.kind}:${e.folder.kind===`group`?e.folder.name:``}`;return(0,N.jsx)(`li`,{children:(0,N.jsxs)(`button`,{type:`button`,"aria-label":u,"aria-current":c,onClick:()=>r(e.folder),onDragOver:o===null?void 0:e=>{e.preventDefault(),l(d)},onDragLeave:o===null?void 0:()=>l(e=>e===d?``:e),onDrop:o===null?void 0:e=>{e.preventDefault(),l(``),i(o)},style:{paddingLeft:`${.5+e.depth*.75}rem`},className:`flex min-w-max items-center justify-between gap-3 rounded-lg py-2 pr-2 text-left text-sm md:w-full md:min-w-0 ${c?`bg-card font-semibold text-ink shadow-sm`:`text-ink-muted hover:bg-select-fill hover:text-ink`} ${n&&o!==null?`outline outline-1 outline-dashed outline-control-line`:``} ${s===d?`bg-accent/20 outline-2 outline-solid outline-accent`:``}`,children:[(0,N.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-1.5 shrink-0 rounded-full ${c?`bg-accent`:`bg-ink-faint`}`}),(0,N.jsx)(`span`,{className:`truncate`,children:G(e.folder,a)})]}),(0,N.jsx)(`span`,{className:`shrink-0 rounded-full bg-surface px-1.5 py-0.5 text-[11px] tabular-nums text-ink-muted`,children:e.count})]})},d)})})]})}function Ne({item:e,now:t}){let n=o(),r=e.references.map(e=>e.hostPatterns.join(` `));return(0,N.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,N.jsxs)(`header`,{className:`rounded-lg bg-surface-subtle p-3`,children:[(0,N.jsx)(`p`,{className:`break-all font-mono text-sm font-semibold text-ink`,children:e.relativePath}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 text-xs text-ink-muted`,children:[(0,N.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-1`,children:L(e.kind,n)}),(0,N.jsx)(`span`,{className:`font-mono`,children:e.bits>0?`${e.algorithm} · ${e.bits}`:e.algorithm})]})]}),(0,N.jsxs)(`dl`,{className:`grid gap-3 text-sm`,children:[e.fingerprint===``?null:(0,N.jsx)(K,{label:n(`keys.colFingerprint`),value:(0,N.jsx)(`span`,{className:`font-mono text-xs break-all`,children:e.fingerprint})}),(0,N.jsx)(K,{label:n(`keys.colPermissions`),value:(0,N.jsxs)(N.Fragment,{children:[e.permission,e.permissionRisk&&(0,N.jsx)(`span`,{className:`ml-2 text-notice-ink`,children:n(`keys.permissionRisk`)})]})}),(0,N.jsx)(K,{label:n(`keys.colUsedBy`),value:r.length===0?n(`keys.usedByNothing`):r.join(`, `)})]}),e.notes.length===0?null:(0,N.jsx)(`ul`,{className:`flex flex-col gap-1 text-xs text-notice-ink`,children:e.notes.map(e=>(0,N.jsx)(`li`,{children:e in I?n(I[e]):e},e))}),e.certificate===void 0?null:(0,N.jsx)(`ul`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:B(e.certificate,t,n).map(e=>(0,N.jsx)(`li`,{className:e.expired?`text-danger`:void 0,children:e.text},e.text))})]})}function K({label:e,value:t}){return(0,N.jsxs)(`div`,{className:`grid gap-0.5 border-b border-hairline pb-3 last:border-b-0 last:pb-0`,children:[(0,N.jsx)(`dt`,{className:`text-[11px] font-medium uppercase tracking-wide text-ink-muted`,children:e}),(0,N.jsx)(`dd`,{className:`text-ink`,children:t})]})}var Pe={...v,...S};function Fe(e){let t=e.relativePath.split(`/`).pop()??e.relativePath;if(e.kind===`private_key`)return t;for(let e of[`-cert.pub`,`.pub`])if(t.endsWith(e)&&t.length>e.length)return t.slice(0,-e.length);return t}function Ie({onInspector:e,api:t=te,groups:n=[],secrets:s=Pe,onAssignGeneratedKey:d,onInstallGeneratedKey:f}){let p=o(),[m,h]=(0,O.useState)(`loading`),[_,v]=(0,O.useState)(null),[y,b]=(0,O.useState)(null),[S,w]=(0,O.useState)([]),[T,E]=(0,O.useState)(null),D=k(),{phrases:oe,setPhrases:P,setDedicatedPhrasePaths:F,chosenPhrase:I,setChosenPhrase:ce}=D,L=ie(),{setChangingPassphrase:le,currentPassphrase:ue,setCurrentPassphrase:de,newPassphrase:me,setNewPassphrase:ge,removePassphrase:z,close:B}=L,V=A(D),{setRegistering:be,agentPassphrase:xe,setAgentPassphrase:H,agentLifetime:U,close:W}=V,G=ae(D),{setManagingPassphrase:je,storedPhraseName:K,storedPhraseSecret:Ie,setStoredPhraseSecret:Le,close:Re}=G,[q,J]=(0,O.useState)(null),[ze,Be]=(0,O.useState)(null),Ve=j(),{setRelocating:He,newName:Ue,setNewName:We,newGroup:Ge,setNewGroup:Ke,close:qe}=Ve,[Je,Ye]=(0,O.useState)(null),[Xe,Y]=(0,O.useState)(``),{folder:Ze,setFolder:Qe,chosen:X,setChosen:$e,dragging:et,setDragging:tt,moveOutcome:nt,setMoveOutcome:rt,moveTarget:it,setMoveTarget:at,listFilter:ot,setListFilter:st,keyQuery:ct,setKeyQuery:lt,detailsFor:ut,setDetailsFor:dt,selectedKey:ft,setSelectedKey:pt}=M(),Z=(0,O.useCallback)(async()=>{try{let[e,n,r]=await Promise.all([t.inventory(),t.listTrash(),t.algorithms()]);v(e),b(n),w(r.variants),h(`ready`)}catch{h(`error`)}},[t]);(0,O.useEffect)(()=>{Z()},[Z]);let mt=Date.now();function Q(){B(),W(),Re()}let ht={onSelect:e=>pt(t=>t===e.id?null:e.id),onToggleChosen:(e,t)=>{let n=new Set(X);t?n.add(e.id):n.delete(e.id),$e(n)},onBeginDrag:Tt,onEndDrag:()=>tt(!1),onReveal:e=>{J(null),E(e)},onShowPublicKey:e=>void Ct(e),onManageStoredPassphrase:e=>{Q(),je(e),vt()},onAddToAgent:e=>{Q(),be(e),e.encrypted&&vt()},onRemoveFromAgent:e=>{Q(),_t(e.id)},onToggleDetails:e=>{let t=ut===e.id;dt(t?``:e.id),E(null),J(null),Q()},onChangePassphrase:e=>{Q(),le(e)},onRelocate:e=>{Q(),Be(null),We(Fe(e)),Ke(R(e.relativePath)),He(e)},onMoveToTrash:e=>{Q(),Ye(e)}};(0,O.useEffect)(()=>{if(e===void 0)return;let t=_?.items.find(e=>e.id===ft);if(t===void 0){e(null);return}e({label:p(`keys.inspectorLabel`),attention:t.permissionRisk,body:(0,N.jsx)(Ne,{item:t,now:mt})})},[ft,_,e,p,mt]);async function gt(e){Y(``);try{await t.changePassphrase(e.id,{currentPassphrase:ue,newPassphrase:z?``:me,unencrypted:z}),B(),await Z()}catch{de(``),ge(``),Y(p(`keys.passphraseFailed`))}}async function _t(e){try{await t.deregisterFromAgent(e),await Z()}catch{Y(p(`keys.agentRemoveFailed`))}}async function vt(){try{let e=await s.passwordVault();if(F(e.dedicatedKeyPassphrases),!e.unlocked){P([]);return}let t=await s.credentials();P(t.credentials.filter(e=>e.kind===`key_passphrase`))}catch{P([]),F([])}}async function yt(e){try{let t=await s.assignCredential(`key_passphrase`,e.relativePath,I);P(t.credentials.filter(e=>e.kind===`key_passphrase`)),F(t=>t.filter(t=>t!==e.relativePath)),ce(``)}catch{Y(p(`keys.assignPassphraseFailed`))}}async function bt(e){if(!(K===``||Ie===``)){if(Y(``),oe.some(e=>e.name===K)){Le(``),Y(p(`keys.storedPassphraseExists`));return}try{await s.storeCredential(`key_passphrase`,K,Ie);let t=await s.assignCredential(`key_passphrase`,e.relativePath,K);P(t.credentials.filter(e=>e.kind===`key_passphrase`)),F(t=>t.filter(t=>t!==e.relativePath)),Re()}catch{Le(``),Y(p(`keys.storePassphraseFailed`))}}}async function xt(e){Y(``);try{let t=await s.unassignCredential(`key_passphrase`,e.relativePath);P(t.credentials.filter(e=>e.kind===`key_passphrase`)),F(t=>t.filter(t=>t!==e.relativePath)),ce(``)}catch{Y(p(`keys.unassignPassphraseFailed`))}}async function St(e){Y(``);try{await t.registerWithAgent(e.id,{passphrase:xe,lifetimeSeconds:U}),W(),await Z()}catch{H(``),Y(p(`keys.agentFailed`))}}async function Ct(e){Y(``),E(null),J(null);try{let n=await t.publicKey(e.id);J({id:e.id,relativePath:n.relativePath,text:n.publicKey.trimEnd()})}catch{J(null),Y(p(`keys.publicKeyFailed`))}}async function wt(e){if(_===null)return;let n=_.items.filter(e=>X.has(e.id));if(n.length===0)return;Y(``);let r=await ve((e,n)=>t.relocate(e,n),n,e);rt(r),$e(new Set),await Z()}function Tt(e,t){e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t.relativePath),tt(!0),X.has(t.id)||$e(new Set([t.id]))}async function Et(e){Y(``),Be(null);try{let n=R(e.relativePath),r=await t.relocate(e.id,{...Ue===Fe(e)?{}:{newName:Ue},...Ge===n?{}:{group:Ge}});if(Be(r),r.blockers.length>0)return;qe(),await Z()}catch{Y(p(`keys.relocateFailed`))}}async function Dt(e){Y(``);try{await t.trash(e),Ye(null),await Z()}catch{Y(p(`keys.trashFailed`))}}function Ot(e){let t=e.fingerprint;return t===``||_===null?[e]:_.items.filter(e=>e.fingerprint===t)}async function kt(e){Y(``);try{let n=await t.restore(e);if(n.blockers.length>0){Y(p(`keys.restoreRefused`,{blockers:n.blockers.join(`, `)}));return}await Z()}catch{Y(p(`keys.restoreFailed`))}}async function At(e){Y(``);try{return await t.purge(e),await Z(),!0}catch{return Y(p(`keys.purgeFailed`)),!1}}if(m===`loading`)return(0,N.jsx)(ee,{tone:`loading`,title:p(`keys.reading`)});if(m===`error`||_===null||y===null)return(0,N.jsx)(ee,{tone:`failed`,title:p(`keys.unreadable`)});let $=ct.trim().toLowerCase(),jt=he(_.items,ot),Mt=pe(jt,n),Nt=fe(jt,Ze),Pt=Nt.filter(e=>$===``||e.relativePath.toLowerCase().includes($)||e.kind.toLowerCase().includes($)||e.algorithm.toLowerCase().includes($)||e.fingerprint.toLowerCase().includes($)||e.references.some(e=>e.hostPatterns.some(e=>e.toLowerCase().includes($)))),Ft=$===``?Pt:_e(Nt,Pt),It=_.unreadable.length+_.unresolvedReferences.length+_.items.filter(e=>e.permissionRisk).length,Lt=T===null?q===null?null:{itemId:q.id,content:(0,N.jsxs)(`section`,{"aria-labelledby":`public-key-heading`,className:`flex flex-col gap-3 rounded-md border border-line bg-surface-subtle p-3 sm:p-4`,children:[(0,N.jsx)(`h3`,{id:`public-key-heading`,className:c,children:p(`keys.publicKeyHeading`,{path:q.relativePath})}),(0,N.jsx)(`pre`,{"aria-label":p(`keys.publicKeyLabel`),className:`overflow-x-auto rounded-md bg-canvas p-4 text-xs`,children:q.text}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(x,{value:q.text,label:`copy.publicKey`}),(0,N.jsx)(a,{onClick:()=>J(null),children:p(`keys.close`)})]})]})}:{itemId:T.id,content:(0,N.jsx)(se,{keyId:T.id,relativePath:T.relativePath,api:t,onClose:()=>E(null)})};return(0,N.jsxs)(`section`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-7 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,N.jsx)(re,{title:p(`keys.heading`),description:p(`keys.pageDescription`),actions:(0,N.jsx)(`a`,{href:`#create-key-heading`,className:u,children:p(`keys.createHeading`)})}),(0,N.jsxs)(ne,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[(0,N.jsx)(C,{label:p(`keys.metricFiles`),value:_.items.length,icon:(0,N.jsx)(g,{name:`keys`,className:`h-5 w-5`})}),(0,N.jsx)(C,{label:p(`keys.metricPrivate`),value:_.items.filter(e=>e.kind===`private_key`).length}),(0,N.jsx)(C,{label:p(`keys.metricAttention`),value:It,attention:It>0})]}),Xe!==``&&(0,N.jsx)(i,{tone:`danger`,children:Xe}),X.size===0?null:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-lg border border-control-line bg-card p-3`,children:[(0,N.jsx)(`p`,{className:`grow text-sm text-ink`,children:p(`keys.chosenCount`,{count:X.size})}),(0,N.jsxs)(`select`,{"aria-label":p(`keys.moveTargetLabel`),className:l,value:it,onChange:e=>at(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:p(`keys.folderUngrouped`)}),n.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]}),(0,N.jsx)(a,{kind:`primary`,onClick:()=>void wt(it===``?{kind:`ungrouped`}:{kind:`group`,name:it}),children:p(`keys.moveChosen`)}),(0,N.jsx)(a,{onClick:()=>$e(new Set),children:p(`keys.clearChosen`)})]}),nt===null?null:(0,N.jsxs)(`div`,{role:`status`,className:`rounded-lg border border-line bg-card p-3 text-sm`,children:[(0,N.jsx)(`p`,{className:`text-ink`,children:p(`keys.moveMoved`,{count:nt.moved.length})}),nt.blocked.map(e=>(0,N.jsx)(`p`,{className:`text-danger`,children:p(`keys.moveBlocked`,{path:e.path,reason:e.blockers.join(` / `)})},e.path)),nt.failed.map(e=>(0,N.jsx)(`p`,{className:`text-danger`,children:p(`keys.moveFailed`,{path:e})},e))]}),(0,N.jsxs)(`section`,{"aria-label":p(`keys.metricFiles`),className:`flex flex-col gap-3`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,N.jsx)(`p`,{className:`font-mono text-xs font-medium text-ink-muted`,children:`~/.ssh`}),(0,N.jsxs)(`div`,{className:`flex w-full flex-wrap gap-2 sm:w-auto`,children:[(0,N.jsxs)(`label`,{children:[(0,N.jsx)(`span`,{className:`sr-only`,children:p(`keys.listFilter`)}),(0,N.jsxs)(`select`,{className:l,value:ot,onChange:e=>st(e.target.value),children:[(0,N.jsx)(`option`,{value:`keys`,children:p(`keys.listFilterKeys`)}),(0,N.jsx)(`option`,{value:`all`,children:p(`keys.listFilterAll`)})]})]}),(0,N.jsxs)(`label`,{className:`min-w-0 grow sm:w-72 sm:grow-0`,children:[(0,N.jsx)(`span`,{className:`sr-only`,children:p(`keys.search`)}),(0,N.jsx)(`input`,{type:`search`,value:ct,onChange:e=>lt(e.target.value),placeholder:p(`keys.searchPlaceholder`),className:l})]})]})]}),(0,N.jsxs)(r,{radius:`md`,children:[(0,N.jsxs)(`div`,{className:`flex flex-col md:flex-row`,children:[(0,N.jsx)(Me,{rows:Mt,selected:Ze,dragging:et,onSelect:e=>{Qe(e),rt(null)},onDropInto:e=>void wt(e)}),(0,N.jsx)(`div`,{className:`min-w-0 grow md:overflow-x-auto`,children:(0,N.jsx)(ye,{items:Ft,inventory:_,chosen:X,selected:ft,detailsFor:ut,now:mt,revealRelated:$!==``,inlinePanel:Lt,actions:ht})})]}),(0,N.jsx)(ke,{trash:y,onRestore:kt,onPurge:At})]})]}),(0,N.jsx)(Te,{form:G,storedPhrases:D,onAssign:e=>void yt(e),onUnassign:e=>void xt(e),onStoreAndAssign:e=>void bt(e)}),(0,N.jsx)(Ee,{item:Je,members:Je===null?[]:Ot(Je),onConfirm:e=>void Dt(e),onCancel:()=>Ye(null)}),_.unreadable.length>0&&(0,N.jsxs)(`section`,{"aria-labelledby":`unreadable-heading`,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{id:`unreadable-heading`,className:`text-sm font-medium text-notice-ink`,children:p(`keys.unreadableHeading`)}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:p(`keys.unreadableNote`)}),(0,N.jsx)(`ul`,{className:`text-sm text-ink-muted`,children:_.unreadable.map(e=>(0,N.jsx)(`li`,{children:p(`keys.unreadableEntry`,{path:e.relativePath,reason:e.reason})},e.relativePath))})]}),_.unresolvedReferences.length>0&&(0,N.jsxs)(`section`,{"aria-labelledby":`unresolved-heading`,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{id:`unresolved-heading`,className:`text-sm font-medium text-notice-ink`,children:p(`keys.unresolvedHeading`)}),(0,N.jsx)(`ul`,{className:`text-sm text-ink-muted`,children:_.unresolvedReferences.map(e=>(0,N.jsx)(`li`,{children:p(`keys.referenceWithReason`,{directive:e.directive,value:e.value,path:e.configPath,line:e.line,reason:e.reason})},`${e.configPath}:${e.line}:${e.value}`))})]}),(0,N.jsx)(Oe,{inventory:_}),(0,N.jsx)(we,{form:V,storedPhrases:D,onSubmit:e=>void St(e),onAssignPhrase:e=>void yt(e)}),(0,N.jsx)(Se,{form:Ve,groups:n,onSubmit:e=>void Et(e)}),(0,N.jsx)(De,{result:ze,onClose:()=>Be(null)}),(0,N.jsx)(Ce,{form:L,onSubmit:e=>void gt(e)}),(0,N.jsx)(Ae,{api:t,variants:S,groups:n,onGenerated:Z,onFailure:Y,onAssignGeneratedKey:d,onInstallGeneratedKey:f})]})}export{Ie as KeysScreen}; \ No newline at end of file diff --git a/internal/ui/dist/assets/KeysScreen-CtJ38_1X.js b/internal/ui/dist/assets/KeysScreen-CtJ38_1X.js deleted file mode 100644 index 27934e897..000000000 --- a/internal/ui/dist/assets/KeysScreen-CtJ38_1X.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{i as n,n as r,t as i}from"./surface-Ck_FblzE.js";import{_ as a,d as o,f as s,i as c,l,m as u,n as d,p as f,s as p,t as m}from"./form-C1olpQVF.js";import{H as h,J as g,Q as _,U as v,X as y,et as b,v as x}from"./index-DJ8h9zNi.js";import{t as S}from"./credentials-Ck0fkrY6.js";import{t as ee}from"./api-DomXbahF.js";import{n as C,r as te,t as w}from"./page-CiAVS9qS.js";import{i as T,n as E,r as D,t as O}from"./tableSort-CcSWRQGj.js";var k=e();function ne(){let[e,t]=(0,k.useState)([]),[n,r]=(0,k.useState)([]),[i,a]=(0,k.useState)(``);return{phrases:e,setPhrases:t,dedicatedPhrasePaths:n,setDedicatedPhrasePaths:r,chosenPhrase:i,setChosenPhrase:a,reset:(0,k.useCallback)(()=>{a(``),t([]),r([])},[])}}function A(){let[e,t]=(0,k.useState)(null),[n,r]=(0,k.useState)(``),[i,a]=(0,k.useState)(``),[o,s]=(0,k.useState)(!1);return{changingPassphrase:e,setChangingPassphrase:t,currentPassphrase:n,setCurrentPassphrase:r,newPassphrase:i,setNewPassphrase:a,removePassphrase:o,setRemovePassphrase:s,close:(0,k.useCallback)(()=>{r(``),a(``),s(!1),t(null)},[])}}function re(e){let[t,n]=(0,k.useState)(null),[r,i]=(0,k.useState)(``),[a,o]=(0,k.useState)(0);return{registering:t,setRegistering:n,agentPassphrase:r,setAgentPassphrase:i,agentLifetime:a,setAgentLifetime:o,close:(0,k.useCallback)(()=>{i(``),o(0),e.reset(),n(null)},[e])}}function j(e){let[t,n]=(0,k.useState)(null),[r,i]=(0,k.useState)(``),[a,o]=(0,k.useState)(``);return{managingPassphrase:t,setManagingPassphrase:n,storedPhraseName:r,setStoredPhraseName:i,storedPhraseSecret:a,setStoredPhraseSecret:o,close:(0,k.useCallback)(()=>{i(``),o(``),e.reset(),n(null)},[e])}}function ie(){let[e,t]=(0,k.useState)(null),[n,r]=(0,k.useState)(``),[i,a]=(0,k.useState)(``);return{relocating:e,setRelocating:t,newName:n,setNewName:r,newGroup:i,setNewGroup:a,close:(0,k.useCallback)(()=>{r(``),a(``),t(null)},[])}}function ae(){let[e,t]=(0,k.useState)(`ed25519`),[n,r]=(0,k.useState)(``),[i,a]=(0,k.useState)(``),[o,s]=(0,k.useState)(``),[c,l]=(0,k.useState)(!1),[u,d]=(0,k.useState)(``);return{algorithm:e,setAlgorithm:t,createGroup:u,setCreateGroup:d,fileName:n,setFileName:r,comment:i,setComment:a,passphrase:o,setPassphrase:s,unencrypted:c,setUnencrypted:l}}function M(){let[e,t]=(0,k.useState)({kind:`all`}),[n,r]=(0,k.useState)(new Set),[i,a]=(0,k.useState)(!1),[o,s]=(0,k.useState)(null),[c,l]=(0,k.useState)(``),[u,d]=(0,k.useState)(`keys`),[f,p]=(0,k.useState)(``),[m,h]=(0,k.useState)(``),[g,_]=(0,k.useState)(null);return{folder:e,setFolder:t,chosen:n,setChosen:r,dragging:i,setDragging:a,moveOutcome:o,setMoveOutcome:s,moveTarget:c,setMoveTarget:l,listFilter:u,setListFilter:d,keyQuery:f,setKeyQuery:p,detailsFor:m,setDetailsFor:h,selectedKey:g,setSelectedKey:_}}var N=t();function oe({keyId:e,relativePath:t,api:n,onClose:r}){let o=a(),[s,c]=(0,k.useState)(`confirm`),[l,u]=(0,k.useState)(``),d=(0,k.useRef)(null);function f(){u(``),c(`confirm`),r()}async function p(){c(`loading`);try{let t=await n.reveal(e);u(t.privateKey),c(`shown`)}catch{u(``),c(`error`)}}return(0,N.jsxs)(v,{labelledBy:`reveal-heading`,onDismiss:f,initialFocusRef:d,panelClassName:`w-full max-w-2xl rounded-lg p-4 sm:p-5`,children:[(0,N.jsx)(`h3`,{id:`reveal-heading`,className:`font-medium`,children:o(`reveal.heading`,{path:t})}),s===`confirm`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`p`,{className:`mt-3 rounded-md bg-notice px-3 py-2 text-sm text-notice-ink`,children:o(`reveal.warning`)}),(0,N.jsx)(i,{ref:d,className:`mt-4`,onClick:()=>void p(),children:o(`reveal.show`)})]}),s===`loading`&&(0,N.jsx)(`p`,{"aria-live":`polite`,className:`mt-2 text-sm text-ink-muted`,children:o(`reveal.requesting`)}),s===`shown`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`pre`,{"aria-label":o(`reveal.privateKeyLabel`),className:`mt-4 overflow-x-auto rounded-md bg-canvas p-4 text-xs`,children:l}),(0,N.jsx)(`div`,{className:`mt-2`,children:(0,N.jsx)(y,{value:l,label:`copy.privateKey`})})]}),s===`error`&&(0,N.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-danger`,children:o(`reveal.failed`)}),(0,N.jsx)(i,{className:`mt-4`,onClick:f,children:o(`reveal.close`)})]})}var P=`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,F=`inline-flex items-center justify-center rounded border border-control-line px-2 py-1 text-center text-xs leading-tight text-danger hover:bg-select-fill`,I={fingerprint_unavailable:`keys.noteFingerprintUnavailable`,symbolic_link:`keys.noteSymbolicLink`,empty_file:`keys.noteEmptyFile`,not_regular_file:`keys.noteNotRegularFile`,comment_not_preserved:`keys.noteCommentNotPreserved`},se={private_key:`keys.kind.privateKey`,public_key:`keys.kind.publicKey`,certificate:`keys.kind.certificate`,other:`keys.kind.other`,unreadable:`keys.kind.unreadable`};function L(e,t){return t(se[e]??`keys.kind.other`)}var ce={key_destination_occupied:`keys.blockerTargetOccupied`,key_reference_unresolved:`keys.blockerUnresolved`,key_reference_outside_workspace:`keys.blockerReferenceExternal`,key_group_not_declared:`keys.blockerGroupNotDeclared`,key_destination_is_config:`keys.blockerDestinationIsConfig`,key_in_state_directory:`keys.blockerStateDirectory`};function le(e,t){let n=e.indexOf(`:`),r=n<0?e:e.slice(0,n),i=n<0?e:e.slice(n+1);return t(ce[r]??`keys.blockerOther`,{detail:i})}function R(e){let t=e.split(`/`);return t.length<3||t[0]!==`keys`?``:t.slice(1,-1).join(`/`)}function ue(e,t){return e.kind===t.kind?e.kind===`group`&&t.kind===`group`?e.name===t.name:!0:!1}function de(e,t){if(t.kind===`all`)return e;let n=t.kind===`ungrouped`?``:t.name;return e.filter(e=>R(e.relativePath)===n)}function fe(e,t){let n=new Map;for(let t of e){let e=R(t.relativePath);n.set(e,(n.get(e)??0)+1)}let r=[{folder:{kind:`all`},count:e.length,depth:0}];for(let e of[...t].sort())r.push({folder:{kind:`group`,name:e},count:n.get(e)??0,depth:e.split(`/`).length});return r.push({folder:{kind:`ungrouped`},count:n.get(``)??0,depth:0}),r}var pe=new Set([`private_key`,`public_key`,`certificate`]);function me(e,t){return t===`all`?e:e.filter(e=>pe.has(e.kind)||e.permissionRisk)}function he(e){return e.kind===`public_key`?e.fingerprint:e.kind===`certificate`?e.certificate?.signedKeyFingerprint??``:``}function z(e){let t=new Map;for(let n of e)n.kind===`private_key`&&n.fingerprint!==``&&!t.has(n.fingerprint)&&t.set(n.fingerprint,n);let n=new Map,r=new Set;for(let i of e){let e=he(i);if(e===``)continue;let a=t.get(e);a!==void 0&&(n.set(a.id,[...n.get(a.id)??[],i]),r.add(i.id))}return e.flatMap(e=>r.has(e.id)?[]:[{primary:e,related:n.get(e.id)??[]}])}function ge(e,t){let n=new Set(t.map(e=>e.id));for(let t of z(e)){let e=[t.primary,...t.related];if(e.some(e=>n.has(e.id)))for(let t of e)n.add(t.id)}return e.filter(e=>n.has(e.id))}async function _e(e,t,n){let r=n.kind===`ungrouped`?``:n.name,i={moved:[],unchanged:[],blocked:[],failed:[]};for(let n of t){let t=n.relativePath;if(R(t)===r){i.unchanged.push(t);continue}try{let a=await e(n.id,{group:r});if(a.blockers.length>0){i.blocked.push({path:t,blockers:a.blockers});continue}i.moved.push(t)}catch{i.failed.push(t)}}return i}function ve({items:e,inventory:t,chosen:n,selected:r,detailsFor:i,now:o,revealRelated:s=!1,inlinePanel:c,actions:l}){let d=a(),[p,m]=(0,k.useState)(new Set),[h,g]=(0,k.useState)({key:`file`,direction:`ascending`}),_=z(e),v=(e,n)=>h.key===`kind`?E(`${e.kind}\u0000${e.algorithm}\u0000${e.bits}`,`${n.kind}\u0000${n.algorithm}\u0000${n.bits}`):h.key===`state`?E(Se(e,t),Se(n,t)):E(e.relativePath,n.relativePath),y=T(_,(e,t)=>v(e.primary,t.primary),h.direction).flatMap(e=>{let t=s||p.has(e.primary.id);return[{item:e.primary,relatedCount:e.related.length,relatedExpanded:t,relatedTo:null},...t?T(e.related,v,h.direction).map(t=>({item:t,relatedCount:0,relatedExpanded:!1,relatedTo:e.primary.id})):[]]});function b(e){m(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n})}function x(e){g(t=>D(t.key,t.direction,e))}return(0,N.jsxs)(`table`,{className:`block w-full text-left text-sm md:table md:min-w-[56rem]`,children:[(0,N.jsx)(`caption`,{className:`sr-only`,children:d(`keys.tableCaption`)}),(0,N.jsx)(`thead`,{className:`hidden md:table-header-group`,children:(0,N.jsxs)(`tr`,{className:`${u} bg-surface-subtle`,children:[(0,N.jsx)(`th`,{scope:`col`,className:`${f} w-12 pl-3`,children:(0,N.jsx)(`span`,{className:`sr-only`,children:d(`keys.colChoose`)})}),(0,N.jsx)(O,{column:`file`,activeColumn:h.key,direction:h.direction,onSort:x,className:`${f} w-[30%] whitespace-nowrap`,children:d(`keys.colFile`)}),(0,N.jsx)(O,{column:`kind`,activeColumn:h.key,direction:h.direction,onSort:x,className:`${f} w-[18%] whitespace-nowrap`,children:d(`keys.colKind`)}),(0,N.jsx)(O,{column:`state`,activeColumn:h.key,direction:h.direction,onSort:x,className:`${f} w-[20%] whitespace-nowrap`,children:d(`keys.colState`)}),(0,N.jsx)(`th`,{scope:`col`,className:`${f} whitespace-nowrap text-right`,children:d(`keys.colActions`)})]})}),(0,N.jsxs)(`tbody`,{className:`block md:table-row-group`,children:[y.map(({item:e,relatedCount:a,relatedExpanded:u,relatedTo:f})=>{let p=xe(t,e),m=r===e.id,h=i===e.id;return(0,N.jsxs)(k.Fragment,{children:[(0,N.jsxs)(`tr`,{"data-key-related-to":f??void 0,className:`grid grid-cols-[2.25rem_minmax(0,1fr)] border-b border-hairline align-top transition-colors last:border-b-0 md:table-row ${m?`bg-select-fill`:``} ${f===null?``:`bg-surface-subtle`}`,children:[(0,N.jsx)(`td`,{className:`row-span-3 py-3 pl-2 md:table-cell md:pl-3`,children:be(e,t.items)?(0,N.jsxs)(`div`,{className:`flex flex-col items-center gap-1 md:flex-row`,children:[(0,N.jsx)(`label`,{className:`grid min-h-10 min-w-8 place-items-center md:min-h-0 md:min-w-0`,children:(0,N.jsx)(`input`,{type:`checkbox`,"aria-label":d(`keys.chooseKey`,{path:e.relativePath}),checked:n.has(e.id),onChange:t=>l.onToggleChosen(e,t.target.checked),className:`h-4 w-4 accent-accent`})}),(0,N.jsx)(`span`,{draggable:!0,"aria-label":d(`keys.dragKey`,{path:e.relativePath}),onDragStart:t=>l.onBeginDrag(t,e),onDragEnd:l.onEndDrag,className:`flex min-h-10 min-w-8 cursor-grab select-none items-center justify-center rounded px-1.5 py-1 text-sm leading-none text-ink-faint hover:bg-surface active:cursor-grabbing md:min-h-0 md:min-w-0`,children:`⠿`})]}):null}),(0,N.jsxs)(`td`,{className:`min-w-0 py-3 pr-3 md:table-cell md:pr-4 ${f===null?``:`pl-3 md:pl-6`}`,children:[(0,N.jsx)(`button`,{type:`button`,"aria-pressed":m,onClick:()=>l.onSelect(e),className:`block min-h-10 max-w-full break-all text-left font-mono text-sm font-semibold text-ink underline-offset-4 hover:text-accent hover:underline md:min-h-0 md:break-normal`,children:e.relativePath}),e.fingerprint===``?null:(0,N.jsx)(`p`,{className:`mt-1 max-w-xs truncate font-mono text-[11px] text-ink-muted`,title:e.fingerprint,children:e.fingerprint}),e.comment===``?null:(0,N.jsx)(`p`,{className:`mt-0.5 max-w-xs truncate text-xs text-ink-muted`,children:e.comment}),a===0?null:(0,N.jsxs)(`button`,{type:`button`,"aria-expanded":u,disabled:s,onClick:()=>b(e),className:`mt-2 inline-flex min-h-10 items-center gap-1.5 rounded-md bg-surface px-2 py-1 text-xs font-medium text-ink-muted hover:text-ink disabled:cursor-default md:min-h-0`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono text-ink-faint`,children:u?`▾`:`▸`}),d(`keys.relatedPublicFiles`,{count:a})]})]}),(0,N.jsxs)(`td`,{className:`col-start-2 min-w-0 pb-3 pr-3 md:table-cell md:py-3 md:pr-4`,children:[(0,N.jsx)(`span`,{className:`inline-flex rounded-md bg-surface px-2 py-1 text-xs text-ink-muted`,children:L(e.kind,d)}),e.algorithm===``?null:(0,N.jsx)(`p`,{className:`mt-2 font-mono text-xs font-medium text-ink`,children:e.bits>0?`${e.algorithm} · ${e.bits}`:e.algorithm}),e.certificate===void 0?null:(0,N.jsx)(`ul`,{className:`mt-1 text-xs text-ink-muted`,children:ye(e.certificate,o,d).map(e=>(0,N.jsx)(`li`,{className:e.expired?`text-danger`:void 0,children:e.text},e.text))})]}),(0,N.jsx)(`td`,{className:`col-start-2 min-w-0 pb-3 pr-3 text-xs md:table-cell md:py-3 md:pr-4`,children:(0,N.jsxs)(`span`,{className:`flex flex-wrap gap-1.5`,children:[e.permissionRisk&&(0,N.jsx)(`span`,{className:`rounded-md bg-notice px-2 py-1 font-medium text-notice-ink`,children:d(`keys.permissionRisk`)}),p&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md bg-surface px-2 py-1 font-medium text-live`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-1.5 rounded-full bg-live`}),d(`keys.stateInAgent`)]}),e.references.length>0&&(0,N.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-1 text-ink-muted`,children:d(`keys.stateUsedBy`,{count:e.references.length})}),e.notes.map(e=>(0,N.jsx)(`span`,{className:`rounded-md bg-notice px-2 py-1 text-notice-ink`,children:e in I?d(I[e]):e},e))]})}),(0,N.jsx)(`td`,{className:`col-span-2 border-t border-hairline p-3 md:table-cell md:border-t-0 md:py-3 md:pr-3 md:pl-0`,children:(0,N.jsxs)(`button`,{type:`button`,className:`${P} ml-auto`,"aria-expanded":h,onClick:()=>l.onToggleDetails(e),children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`mr-1 font-mono text-ink-faint`,children:h?`▾`:`▸`}),d(h?`keys.hideDetails`:`keys.showDetails`)]})})]}),h?(0,N.jsx)(`tr`,{"data-key-detail-for":e.id,className:`block border-b border-line bg-card md:table-row`,children:(0,N.jsx)(`td`,{colSpan:5,className:`block p-3 pt-0 md:table-cell md:p-4 md:pt-1`,children:(0,N.jsxs)(`section`,{"aria-label":d(`keys.actionsHeading`,{path:e.relativePath}),className:`rounded-md border border-line bg-surface-subtle p-3 sm:p-4`,children:[(0,N.jsxs)(`div`,{role:`group`,"aria-label":d(`keys.keyActions`),className:`flex flex-wrap items-center gap-2`,children:[(e.kind===`public_key`||e.kind===`certificate`)&&(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md bg-accent px-2.5 py-1.5 text-center text-xs font-medium leading-tight text-accent-ink hover:brightness-110 disabled:bg-line disabled:text-ink-faint`,onClick:()=>l.onShowPublicKey(e),children:d(`keys.showPublicKey`)}),e.kind===`private_key`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,onClick:()=>l.onReveal(e),children:d(`keys.showPrivateKey`)}),(0,N.jsx)(`button`,{type:`button`,className:p?`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`:`inline-flex items-center justify-center rounded-md bg-accent px-2.5 py-1.5 text-center text-xs font-medium leading-tight text-accent-ink hover:brightness-110 disabled:bg-line disabled:text-ink-faint`,disabled:!t.agentAvailable,onClick:()=>p?l.onRemoveFromAgent(e):l.onAddToAgent(e),children:d(p?`keys.removeFromAgent`:`keys.addToAgent`)}),e.encrypted?(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,onClick:()=>l.onManageStoredPassphrase(e),children:d(`keys.manageStoredPassphrase`)}):null,(0,N.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-md border border-transparent px-2 py-1.5 text-center text-xs leading-tight text-ink-muted hover:border-control-line hover:bg-select-fill hover:text-ink disabled:text-ink-faint`,onClick:()=>l.onChangePassphrase(e),children:d(`keys.changePassphrase`)})]}),be(e,t.items)?(0,N.jsx)(`button`,{type:`button`,className:P,onClick:()=>l.onRelocate(e),children:d(`keys.relocate`)}):null,e.kind===`private_key`?(0,N.jsx)(`button`,{type:`button`,className:`${F} sm:ml-auto`,onClick:()=>l.onMoveToTrash(e),children:d(`keys.moveToTrash`)}):null]}),c?.itemId===e.id?(0,N.jsx)(`div`,{className:`mt-3 border-t border-line pt-3`,children:c.content}):null]})})}):null]},e.id)}),y.length===0&&(0,N.jsx)(`tr`,{className:`block md:table-row`,children:(0,N.jsx)(`td`,{colSpan:5,className:`block p-8 text-center text-sm text-ink-muted md:table-cell`,children:t.items.length===0?d(`keys.inventoryEmpty`):d(`keys.noMatches`)})})]})]})}function ye(e,t,n){let r=[];if(e.keyId!==``&&r.push({text:n(`keys.certKeyId`,{keyId:e.keyId}),expired:!1}),e.principals.length>0?r.push({text:n(`keys.certFor`,{principals:e.principals.join(`, `)}),expired:!1}):r.push({text:n(`keys.certAnyPrincipal`),expired:!1}),e.neverExpires)r.push({text:n(`keys.certNeverExpires`),expired:!1});else{let i=new Date(e.validBefore*1e3),a=e.validBefore*1e3<=t,o=`${i.toISOString().slice(0,16).replace(`T`,` `)}Z`;r.push({text:n(a?`keys.certExpired`:`keys.certValidUntil`,{when:o}),expired:a})}return e.signedKeyType!==``&&r.push({text:n(`keys.certSigns`,{keyType:e.signedKeyType,fingerprint:e.signedKeyFingerprint}).trim(),expired:!1}),r}function be(e,t){if(e.kind===`private_key`)return!0;if(e.kind!==`public_key`&&e.kind!==`certificate`)return!1;let n=e.kind===`certificate`&&e.certificate!==void 0?e.certificate.signedKeyFingerprint:e.fingerprint;return n===``||!t.some(e=>e.kind===`private_key`&&e.fingerprint===n)}function xe(e,t){return!e.agentAvailable||t.fingerprint===``?!1:e.agentIdentities.some(e=>e.fingerprint===t.fingerprint)}function Se(e,t){return[e.permissionRisk?`permission-risk`:``,xe(t,e)?`in-agent`:``,e.references.length>0?`used-${e.references.length}`:``,...e.notes].join(`\0`)}function Ce(e,t){return e.find(e=>e.uses.includes(t.relativePath))}function B(e,t){return e.includes(t.relativePath)}function V(e,t,n){return Ce(e,n)!==void 0||B(t,n)}function we({form:e,groups:t,onSubmit:o}){let l=a(),u=e.relocating;return u===null?null:(0,N.jsxs)(`form`,{"aria-labelledby":`relocate-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),o(u)},children:[(0,N.jsx)(`h3`,{id:`relocate-heading`,className:s,children:l(`keys.relocateHeading`,{path:u.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:l(`keys.relocateNote`)}),(0,N.jsxs)(r,{children:[(0,N.jsx)(n,{label:l(`keys.relocateNewName`),children:(0,N.jsx)(`input`,{className:c,value:e.newName,onChange:t=>e.setNewName(t.target.value)})}),(0,N.jsx)(n,{label:l(`keys.relocateGroup`),children:(0,N.jsxs)(`select`,{className:c,value:e.newGroup,onChange:t=>e.setNewGroup(t.target.value),children:[(0,N.jsx)(`option`,{value:``,children:l(`keys.groupNone`)}),t.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]})})]}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(i,{kind:`primary`,type:`submit`,children:l(`keys.relocateSubmit`)}),(0,N.jsx)(i,{onClick:e.close,children:l(`keys.cancel`)})]})]})}function Te({form:e,onSubmit:t}){let o=a(),c=e.changingPassphrase;return c===null?null:(0,N.jsxs)(`form`,{"aria-labelledby":`passphrase-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),t(c)},children:[(0,N.jsx)(`h3`,{id:`passphrase-heading`,className:s,children:o(`keys.passphraseHeading`,{path:c.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:o(`keys.passphraseNote`)}),(0,N.jsxs)(r,{children:[(0,N.jsx)(n,{label:o(`keys.currentPassphrase`),interactiveChildren:!0,children:(0,N.jsx)(_,{label:o(`keys.currentPassphrase`),value:e.currentPassphrase,onChange:e.setCurrentPassphrase})}),(0,N.jsx)(n,{label:o(`keys.newPassphrase`),interactiveChildren:!0,children:(0,N.jsx)(_,{label:o(`keys.newPassphrase`),value:e.newPassphrase,onChange:e.setNewPassphrase,disabled:e.removePassphrase})})]}),(0,N.jsx)(m,{label:o(`keys.removePassphrase`),checked:e.removePassphrase,onChange:t=>{e.setRemovePassphrase(t),e.setNewPassphrase(``)}}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(i,{kind:`primary`,type:`submit`,children:o(`keys.savePassphrase`)}),(0,N.jsx)(i,{onClick:e.close,children:o(`keys.cancel`)})]})]})}function Ee({form:e,storedPhrases:t,onSubmit:o,onAssignPhrase:l}){let u=a(),d=e.registering;if(d===null)return null;let{phrases:f,dedicatedPhrasePaths:p,chosenPhrase:m,setChosenPhrase:h}=t,g=V(f,p,d);return(0,N.jsxs)(`form`,{"aria-labelledby":`agent-register-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),o(d)},children:[(0,N.jsx)(`h3`,{id:`agent-register-heading`,className:s,children:u(`keys.registerHeading`,{path:d.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:u(`keys.registerNote`)}),(0,N.jsxs)(r,{children:[d.encrypted&&(0,N.jsx)(n,{label:u(`keys.keyPassphrase`),interactiveChildren:!0,...g?{hint:u(`keys.typedWins`)}:{},children:(0,N.jsx)(_,{label:u(`keys.keyPassphrase`),value:e.agentPassphrase,onChange:e.setAgentPassphrase})}),(0,N.jsx)(n,{label:u(`keys.lifetime`),children:(0,N.jsxs)(`select`,{className:c,value:String(e.agentLifetime),onChange:t=>e.setAgentLifetime(Number(t.target.value)),children:[(0,N.jsx)(`option`,{value:`0`,children:u(`keys.lifetimeForever`)}),(0,N.jsx)(`option`,{value:`3600`,children:u(`keys.lifetimeHour`)}),(0,N.jsx)(`option`,{value:`14400`,children:u(`keys.lifetimeFourHours`)}),(0,N.jsx)(`option`,{value:`43200`,children:u(`keys.lifetimeTwelveHours`)})]})})]}),d.encrypted&&g&&(0,N.jsx)(`p`,{className:`text-xs text-ink-muted`,children:B(p,d)?u(`keys.usesDedicatedPassphrase`):u(`keys.usesStoredPassphrase`,{name:Ce(f,d).name})}),d.encrypted&&f.length>0&&(0,N.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,N.jsx)(n,{label:u(`keys.useStoredPassphrase`),children:(0,N.jsxs)(`select`,{className:`w-full rounded-md border border-control-line bg-control px-2 py-1.5 text-sm text-ink placeholder:text-ink-faint focus:border-accent focus:outline-none disabled:border-line disabled:text-ink-faint`,value:m,onChange:e=>h(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:u(`keys.choosePassphraseName`)}),f.map(e=>(0,N.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}),(0,N.jsx)(i,{disabled:m===``,onClick:()=>l(d),children:u(`keys.useThisPassphrase`)})]}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(i,{kind:`primary`,type:`submit`,children:u(`keys.registerSubmit`)}),(0,N.jsx)(i,{onClick:e.close,children:u(`keys.cancel`)})]})]})}function De({form:e,storedPhrases:t,onAssign:n,onUnassign:r,onStoreAndAssign:l}){let u=a(),f=e.managingPassphrase;if(f===null)return null;let{phrases:m,dedicatedPhrasePaths:h,chosenPhrase:g,setChosenPhrase:v}=t;return(0,N.jsxs)(`section`,{"aria-labelledby":`stored-passphrase-heading`,className:o,children:[(0,N.jsx)(`h3`,{id:`stored-passphrase-heading`,className:s,children:u(`keys.storedPassphraseHeading`,{path:f.relativePath})}),(0,N.jsx)(`p`,{className:p,children:u(`keys.storedPassphraseNote`)}),V(m,h,f)?(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-lg border border-line bg-card p-3`,children:[(0,N.jsx)(`p`,{className:`grow text-sm text-ink`,children:B(h,f)?u(`keys.usesDedicatedPassphrase`):u(`keys.usesStoredPassphrase`,{name:Ce(m,f).name})}),(0,N.jsx)(i,{onClick:()=>r(f),children:u(`keys.unassignPassphrase`)})]}):null,m.length===0?null:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,N.jsx)(d,{label:u(`keys.useStoredPassphrase`),children:(0,N.jsxs)(`select`,{className:c,value:g,onChange:e=>v(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:u(`keys.choosePassphraseName`)}),m.map(e=>(0,N.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}),(0,N.jsx)(i,{disabled:g===``,onClick:()=>n(f),children:u(`keys.useThisPassphrase`)})]}),(0,N.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,N.jsx)(d,{label:u(`keys.newStoredPassphraseName`),children:(0,N.jsx)(`input`,{value:e.storedPhraseName,onChange:t=>e.setStoredPhraseName(t.target.value),className:c})}),(0,N.jsx)(d,{label:u(`keys.newStoredPassphraseValue`),interactiveChildren:!0,children:(0,N.jsx)(_,{label:u(`keys.newStoredPassphraseValue`),value:e.storedPhraseSecret,onChange:e.setStoredPhraseSecret})})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(i,{kind:`primary`,disabled:e.storedPhraseName===``||e.storedPhraseSecret===``,onClick:()=>l(f),children:u(`keys.storeAndUsePassphrase`)}),(0,N.jsx)(i,{onClick:e.close,children:u(`keys.cancel`)})]})]})}function Oe({item:e,members:t,onConfirm:n,onCancel:r}){let c=a();return e===null?null:(0,N.jsxs)(`section`,{"aria-labelledby":`trash-confirm-heading`,className:o,children:[(0,N.jsx)(`h3`,{id:`trash-confirm-heading`,className:s,children:c(`keys.trashConfirmHeading`,{path:e.relativePath})}),(0,N.jsx)(`p`,{className:`text-sm text-ink`,children:c(`keys.trashExplain`)}),(0,N.jsx)(`ul`,{className:`flex flex-col gap-0.5 font-mono text-xs text-ink-muted`,children:t.map(e=>(0,N.jsx)(`li`,{children:e.relativePath},e.id))}),e.references.length===0?(0,N.jsx)(`p`,{className:p,children:c(`keys.trashNoReferences`)}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`p`,{className:`text-sm text-notice-ink`,children:c(`keys.trashReferences`,{count:e.references.length})}),(0,N.jsx)(`ul`,{className:`flex flex-col gap-0.5 font-mono text-xs text-notice-ink`,children:e.references.map((e,t)=>(0,N.jsx)(`li`,{children:`${e.hostPatterns.join(` `)} · ${e.configPath}:${e.line}`},`${e.configPath}-${e.line}-${t}`))})]}),(0,N.jsx)(`p`,{className:p,children:c(`keys.trashIsRecoverable`)}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(`button`,{type:`button`,className:F,onClick:()=>n(e.id),children:c(`keys.trashConfirm`)}),(0,N.jsx)(i,{onClick:r,children:c(`keys.trashCancel`)})]})]})}function ke({result:e,onClose:t}){let n=a();return e===null?null:(0,N.jsxs)(`section`,{"aria-labelledby":`relocate-result-heading`,className:`flex flex-col gap-2 text-sm`,children:[(0,N.jsx)(`h3`,{id:`relocate-result-heading`,className:s,children:e.blockers.length>0?n(`keys.relocateRefused`):n(`keys.relocateDone`,{path:e.relativePath})}),e.blockers.length>0&&(0,N.jsx)(`ul`,{role:`alert`,className:`text-notice-ink`,children:e.blockers.map(e=>(0,N.jsx)(`li`,{children:le(e,n)},e))}),e.files.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-ink-muted`,children:n(`keys.relocateMoved`)}),(0,N.jsx)(`ul`,{className:`font-mono text-xs text-ink-muted`,children:e.files.map(e=>(0,N.jsx)(`li`,{children:n(`keys.relocateFilePair`,{from:e.from,to:e.to})},e.from))})]}),e.references.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-ink-muted`,children:n(`keys.relocateRewritten`)}),(0,N.jsx)(`ul`,{className:`text-xs text-ink-muted`,children:e.references.map(e=>(0,N.jsx)(`li`,{children:n(`keys.relocateReference`,{directive:e.directive,from:e.from,to:e.to,path:e.configPath,line:e.line})},`${e.configPath}:${e.line}:${e.from}`))})]}),e.skipped.length>0&&(0,N.jsx)(`p`,{className:`text-ink-muted`,children:n(`keys.relocateSkipped`,{paths:e.skipped.join(`, `)})}),e.notes.map(e=>(0,N.jsx)(`p`,{className:`text-notice-ink`,children:e in I?n(I[e]):e},e)),(0,N.jsx)(`div`,{children:(0,N.jsx)(i,{onClick:t,children:n(`keys.close`)})})]})}function Ae({inventory:e}){let t=a(),[n,r]=(0,k.useState)({key:`algorithm`,direction:`ascending`});return(0,N.jsxs)(`section`,{"aria-labelledby":`agent-heading`,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{id:`agent-heading`,className:s,children:t(`keys.agentHeading`)}),e.agentAvailable?e.agentIdentities.length===0?(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`keys.agentEmpty`)}):(0,N.jsxs)(`table`,{className:`w-full min-w-[32rem] text-left text-sm`,children:[(0,N.jsx)(`caption`,{className:`sr-only`,children:t(`keys.agentIdentitiesCaption`)}),(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:u,children:[(0,N.jsx)(O,{column:`algorithm`,activeColumn:n.key,direction:n.direction,onSort:e=>r(t=>D(t.key,t.direction,e)),className:`${f} whitespace-nowrap`,children:t(`keys.colAlgorithm`)}),(0,N.jsx)(O,{column:`fingerprint`,activeColumn:n.key,direction:n.direction,onSort:e=>r(t=>D(t.key,t.direction,e)),className:`${f} whitespace-nowrap`,children:t(`keys.colFingerprint`)}),(0,N.jsx)(O,{column:`comment`,activeColumn:n.key,direction:n.direction,onSort:e=>r(t=>D(t.key,t.direction,e)),className:`${f} whitespace-nowrap`,children:t(`keys.colComment`)})]})}),(0,N.jsx)(`tbody`,{children:T(e.agentIdentities,(e,t)=>n.key===`fingerprint`?E(e.fingerprint,t.fingerprint):n.key===`comment`?E(e.comment,t.comment):E(`${e.algorithm}\u0000${e.bits}`,`${t.algorithm}\u0000${t.bits}`),n.direction).map(e=>(0,N.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,N.jsx)(`td`,{className:`py-2 pr-3`,children:e.bits>0?`${e.algorithm} · ${e.bits}`:e.algorithm}),(0,N.jsx)(`td`,{className:`py-2 pr-3 font-mono text-xs break-all`,children:e.fingerprint}),(0,N.jsx)(`td`,{className:`py-2`,children:e.comment})]},e.fingerprint))})]}):(0,N.jsx)(`p`,{className:`text-sm text-notice-ink`,children:t(`keys.agentUnavailable`)}),e.agentDelegations.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`keys.agentDelegationsNote`)}),(0,N.jsx)(`ul`,{className:`text-sm text-ink-muted`,children:e.agentDelegations.map(e=>(0,N.jsxs)(`li`,{children:[t(`keys.reference`,{directive:e.directive,value:e.value,path:e.configPath,line:e.line}),e.hostPatterns.length>0?` (${e.hostPatterns.join(` `)})`:``]},`${e.configPath}:${e.line}`))})]})]})}function je({trash:e,onRestore:t,onPurge:n}){let r=a(),[i,o]=(0,k.useState)({key:`files`,direction:`ascending`}),[c,l]=(0,k.useState)(``);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`details`,{className:`border-t border-line bg-surface-subtle p-4`,children:[(0,N.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium text-ink`,children:r(`keys.trashSummary`,{count:e.entries.length})}),(0,N.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2 border-t border-line pt-3`,children:[(0,N.jsx)(`h3`,{className:s,children:r(`keys.trashHeading`)}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`keys.trashNote`)}),(0,N.jsx)(`div`,{className:`overflow-x-auto`,children:(0,N.jsxs)(`table`,{className:`w-full min-w-[40rem] text-left text-sm`,children:[(0,N.jsx)(`caption`,{className:`sr-only`,children:r(`keys.trashCaption`)}),(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:u,children:[(0,N.jsx)(O,{column:`files`,activeColumn:i.key,direction:i.direction,onSort:e=>o(t=>D(t.key,t.direction,e)),className:`${f} whitespace-nowrap`,children:r(`keys.colFiles`)}),(0,N.jsx)(O,{column:`age`,activeColumn:i.key,direction:i.direction,onSort:e=>o(t=>D(t.key,t.direction,e)),className:`${f} whitespace-nowrap`,children:r(`keys.colAge`)}),(0,N.jsx)(O,{column:`status`,activeColumn:i.key,direction:i.direction,onSort:e=>o(t=>D(t.key,t.direction,e)),className:`${f} whitespace-nowrap`,children:r(`keys.colStatus`)}),(0,N.jsx)(`th`,{scope:`col`,className:`${f} whitespace-nowrap`,children:r(`keys.colActions`)})]})}),(0,N.jsxs)(`tbody`,{children:[T(e.entries,(e,t)=>i.key===`age`?e.ageDays-t.ageDays:i.key===`status`?E(e.restorable?r(`keys.restorable`):e.blockers.join(`, `),t.restorable?r(`keys.restorable`):t.blockers.join(`, `)):E(e.files.map(e=>e.originalRelativePath).join(`, `),t.files.map(e=>e.originalRelativePath).join(`, `)),i.direction).map(n=>(0,N.jsxs)(`tr`,{className:`border-b border-line align-top`,children:[(0,N.jsx)(`td`,{className:`py-2 pr-3 font-mono text-xs`,children:n.files.map(e=>e.originalRelativePath).join(`, `)}),(0,N.jsx)(`td`,{className:`py-2 pr-3`,children:n.stale?r(`keys.ageStale`,{days:n.ageDays,retention:e.retentionDays}):r(`keys.age`,{days:n.ageDays})}),(0,N.jsx)(`td`,{className:`py-2 pr-3`,children:n.restorable?r(`keys.restorable`):n.blockers.join(`, `)}),(0,N.jsx)(`td`,{className:`py-2`,children:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,N.jsx)(`button`,{type:`button`,className:P,onClick:()=>void t(n.id),children:r(`keys.restore`)}),(0,N.jsx)(`button`,{type:`button`,className:F,onClick:()=>l(n.id),children:r(`keys.purge`)})]})})]},n.id)),e.entries.length===0&&(0,N.jsx)(`tr`,{children:(0,N.jsx)(`td`,{colSpan:4,className:`py-3 text-sm text-ink-muted`,children:r(`keys.trashEmpty`)})})]})]})})]})]}),c===``?null:(0,N.jsx)(h,{id:`key-purge-heading`,heading:r(`keys.purge`),body:(0,N.jsx)(`p`,{className:`text-sm text-danger`,children:r(`keys.purgeWarning`)}),confirmLabel:r(`keys.confirmPurge`),cancelLabel:r(`keys.cancel`),onConfirm:()=>void n(c).then(e=>{e&&l(``)}),onCancel:()=>l(``)})]})}function Me({api:e=ee,variants:t,groups:l,onGenerated:u,onFailure:d,onAssignGeneratedKey:f,onInstallGeneratedKey:h}){let g=a(),{algorithm:v,setAlgorithm:b,fileName:x,setFileName:S,comment:C,setComment:te,passphrase:w,setPassphrase:T,unencrypted:E,setUnencrypted:D,createGroup:O,setCreateGroup:ne}=ae(),[A,re]=(0,k.useState)(null),[j,ie]=(0,k.useState)(null),M=t.find(e=>e.algorithm===v),oe=M===void 0||M.inProcess;async function P(){d(``),re(null),ie(null);try{if(M!==void 0&&!M.inProcess){let t=await e.hardwareCommand({algorithm:v,fileName:x,group:O,comment:C});re(t.command);return}let t=await e.generate({algorithm:v,bits:M?.bits??0,fileName:x,group:O,comment:C,passphrase:w,unencrypted:E});ie({private:{privateKeyId:t.id,privateRelativePath:t.relativePath},public:{publicRelativePath:t.publicRelativePath}}),T(``),S(``),await u()}catch{T(``),d(g(`keys.createFailed`))}}return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`form`,{"aria-labelledby":`create-key-heading`,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),P()},children:[(0,N.jsx)(`h3`,{id:`create-key-heading`,className:s,children:g(`keys.createHeading`)}),(0,N.jsxs)(r,{children:[(0,N.jsx)(n,{label:g(`keys.algorithm`),stackOnNarrow:!0,children:(0,N.jsx)(`select`,{className:`${c} min-h-10 sm:min-h-0`,value:v,onChange:e=>b(e.target.value),children:t.map(e=>(0,N.jsx)(`option`,{value:e.algorithm,children:e.label},`${e.algorithm}-${e.bits}`))})}),(0,N.jsx)(n,{label:g(`keys.createGroup`),stackOnNarrow:!0,children:(0,N.jsxs)(`select`,{className:`${c} min-h-10 sm:min-h-0`,value:O,onChange:e=>ne(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:g(`keys.groupNone`)}),l.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]})}),(0,N.jsx)(n,{label:g(`keys.fileName`),stackOnNarrow:!0,children:(0,N.jsx)(`input`,{className:`${c} min-h-10 sm:min-h-0`,value:x,onChange:e=>S(e.target.value)})}),(0,N.jsx)(n,{label:g(`keys.comment`),stackOnNarrow:!0,children:(0,N.jsx)(`input`,{className:`${c} min-h-10 sm:min-h-0`,value:C,onChange:e=>te(e.target.value)})}),oe&&(0,N.jsx)(n,{label:g(`keys.passphrase`),stackOnNarrow:!0,interactiveChildren:!0,children:(0,N.jsx)(_,{label:g(`keys.passphrase`),className:`w-full rounded-md border border-control-line bg-control px-2 py-1.5 text-sm text-ink placeholder:text-ink-faint focus:border-accent focus:outline-none disabled:border-line disabled:text-ink-faint min-h-10 sm:min-h-0`,value:w,onChange:T,disabled:E})})]}),oe&&(0,N.jsx)(m,{label:g(`keys.createUnencrypted`),checked:E,onChange:e=>{D(e),T(``)}}),(0,N.jsx)(i,{kind:`primary`,type:`submit`,className:`self-start`,children:g(oe?`keys.createSubmit`:`keys.showTerminalCommand`)})]}),j===null?null:(0,N.jsxs)(`section`,{"aria-live":`polite`,className:o,children:[(0,N.jsx)(`h3`,{className:s,children:g(`keys.generatedHeading`)}),(0,N.jsx)(`p`,{className:p,children:g(`keys.generatedNext`,{path:j.private.privateRelativePath})}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(i,{kind:`primary`,onClick:()=>f?.(j.private),children:g(`keys.assignGenerated`)}),(0,N.jsx)(i,{onClick:()=>h?.(j.public),children:g(`keys.installGenerated`)})]})]}),A!==null&&(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:g(`keys.hardwareNote`)}),(0,N.jsx)(`pre`,{"aria-label":g(`copy.terminalCommand`),className:`overflow-x-auto rounded-md bg-canvas p-4 text-xs`,children:A.join(` `)}),(0,N.jsx)(`div`,{className:`mt-2`,children:(0,N.jsx)(y,{value:A.join(` `),label:`copy.terminalCommand`})})]})]})}function H(e,t){return e.kind===`all`?t(`keys.folderAll`):e.kind===`ungrouped`?t(`keys.folderUngrouped`):e.name}function Ne(e){return e.kind===`all`?null:e}function Pe({rows:e,selected:t,dragging:n,onSelect:r,onDropInto:i}){let o=a(),[c,l]=(0,k.useState)(``);return(0,N.jsxs)(`nav`,{"aria-label":o(`keys.foldersLabel`),className:`w-full shrink-0 bg-surface-subtle p-3 md:w-52 md:self-stretch md:border-r md:border-line`,children:[(0,N.jsx)(`h3`,{className:`${s} px-2 py-1 text-xs uppercase tracking-wider text-ink-muted`,children:o(`keys.folders`)}),(0,N.jsx)(`ul`,{className:`mt-1 flex gap-1 overflow-x-auto md:flex-col md:overflow-visible`,children:e.map(e=>{let a=Ne(e.folder),s=ue(e.folder,t),u=o(`keys.folderRow`,{name:H(e.folder,o),count:e.count}),d=`${e.folder.kind}:${e.folder.kind===`group`?e.folder.name:``}`;return(0,N.jsx)(`li`,{children:(0,N.jsxs)(`button`,{type:`button`,"aria-label":u,"aria-current":s,onClick:()=>r(e.folder),onDragOver:a===null?void 0:e=>{e.preventDefault(),l(d)},onDragLeave:a===null?void 0:()=>l(e=>e===d?``:e),onDrop:a===null?void 0:e=>{e.preventDefault(),l(``),i(a)},style:{paddingLeft:`${.5+e.depth*.75}rem`},className:`flex min-w-max items-center justify-between gap-3 rounded-lg py-2 pr-2 text-left text-sm md:w-full md:min-w-0 ${s?`bg-card font-semibold text-ink shadow-sm`:`text-ink-muted hover:bg-select-fill hover:text-ink`} ${n&&a!==null?`outline outline-1 outline-dashed outline-control-line`:``} ${c===d?`bg-accent/20 outline-2 outline-solid outline-accent`:``}`,children:[(0,N.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-1.5 shrink-0 rounded-full ${s?`bg-accent`:`bg-ink-faint`}`}),(0,N.jsx)(`span`,{className:`truncate`,children:H(e.folder,o)})]}),(0,N.jsx)(`span`,{className:`shrink-0 rounded-full bg-surface px-1.5 py-0.5 text-[11px] tabular-nums text-ink-muted`,children:e.count})]})},d)})})]})}function Fe({item:e,now:t}){let n=a(),r=e.references.map(e=>e.hostPatterns.join(` `));return(0,N.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,N.jsxs)(`header`,{className:`rounded-lg bg-surface-subtle p-3`,children:[(0,N.jsx)(`p`,{className:`break-all font-mono text-sm font-semibold text-ink`,children:e.relativePath}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 text-xs text-ink-muted`,children:[(0,N.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-1`,children:L(e.kind,n)}),(0,N.jsx)(`span`,{className:`font-mono`,children:e.bits>0?`${e.algorithm} · ${e.bits}`:e.algorithm})]})]}),(0,N.jsxs)(`dl`,{className:`grid gap-3 text-sm`,children:[e.fingerprint===``?null:(0,N.jsx)(U,{label:n(`keys.colFingerprint`),value:(0,N.jsx)(`span`,{className:`font-mono text-xs break-all`,children:e.fingerprint})}),(0,N.jsx)(U,{label:n(`keys.colPermissions`),value:(0,N.jsxs)(N.Fragment,{children:[e.permission,e.permissionRisk&&(0,N.jsx)(`span`,{className:`ml-2 text-notice-ink`,children:n(`keys.permissionRisk`)})]})}),(0,N.jsx)(U,{label:n(`keys.colUsedBy`),value:r.length===0?n(`keys.usedByNothing`):r.join(`, `)})]}),e.notes.length===0?null:(0,N.jsx)(`ul`,{className:`flex flex-col gap-1 text-xs text-notice-ink`,children:e.notes.map(e=>(0,N.jsx)(`li`,{children:e in I?n(I[e]):e},e))}),e.certificate===void 0?null:(0,N.jsx)(`ul`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:ye(e.certificate,t,n).map(e=>(0,N.jsx)(`li`,{className:e.expired?`text-danger`:void 0,children:e.text},e.text))})]})}function U({label:e,value:t}){return(0,N.jsxs)(`div`,{className:`grid gap-0.5 border-b border-hairline pb-3 last:border-b-0 last:pb-0`,children:[(0,N.jsx)(`dt`,{className:`text-[11px] font-medium uppercase tracking-wide text-ink-muted`,children:e}),(0,N.jsx)(`dd`,{className:`text-ink`,children:t})]})}var Ie={...b,...S};function Le(e){let t=e.relativePath.split(`/`).pop()??e.relativePath;if(e.kind===`private_key`)return t;for(let e of[`-cert.pub`,`.pub`])if(t.endsWith(e)&&t.length>e.length)return t.slice(0,-e.length);return t}function Re({onInspector:e,api:t=ee,groups:n=[],secrets:o=Ie,onAssignGeneratedKey:u,onInstallGeneratedKey:d}){let f=a(),[p,m]=(0,k.useState)(`loading`),[h,_]=(0,k.useState)(null),[v,b]=(0,k.useState)(null),[S,T]=(0,k.useState)([]),[E,D]=(0,k.useState)(null),O=ne(),{phrases:ae,setPhrases:P,setDedicatedPhrasePaths:F,chosenPhrase:I,setChosenPhrase:se}=O,L=A(),{setChangingPassphrase:ce,currentPassphrase:le,setCurrentPassphrase:ue,newPassphrase:pe,setNewPassphrase:he,removePassphrase:z,close:ye}=L,be=re(O),{setRegistering:xe,agentPassphrase:Se,setAgentPassphrase:Ce,agentLifetime:B,close:V}=be,H=j(O),{setManagingPassphrase:Ne,storedPhraseName:U,storedPhraseSecret:Re,setStoredPhraseSecret:ze,close:Be}=H,[W,G]=(0,k.useState)(null),[Ve,K]=(0,k.useState)(null),He=ie(),{setRelocating:Ue,newName:We,setNewName:Ge,newGroup:Ke,setNewGroup:qe,close:Je}=He,[Ye,Xe]=(0,k.useState)(null),[Ze,q]=(0,k.useState)(``),{folder:Qe,setFolder:$e,chosen:J,setChosen:Y,dragging:et,setDragging:tt,moveOutcome:X,setMoveOutcome:nt,moveTarget:rt,setMoveTarget:it,listFilter:at,setListFilter:ot,keyQuery:st,setKeyQuery:ct,detailsFor:lt,setDetailsFor:ut,selectedKey:dt,setSelectedKey:ft}=M(),Z=(0,k.useCallback)(async()=>{try{let[e,n,r]=await Promise.all([t.inventory(),t.listTrash(),t.algorithms()]);_(e),b(n),T(r.variants),m(`ready`)}catch{m(`error`)}},[t]);(0,k.useEffect)(()=>{Z()},[Z]);let pt=Date.now();function Q(){ye(),V(),Be()}let mt={onSelect:e=>ft(t=>t===e.id?null:e.id),onToggleChosen:(e,t)=>{let n=new Set(J);t?n.add(e.id):n.delete(e.id),Y(n)},onBeginDrag:wt,onEndDrag:()=>tt(!1),onReveal:e=>{G(null),D(e)},onShowPublicKey:e=>void St(e),onManageStoredPassphrase:e=>{Q(),Ne(e),_t()},onAddToAgent:e=>{Q(),xe(e),e.encrypted&&_t()},onRemoveFromAgent:e=>{Q(),gt(e.id)},onToggleDetails:e=>{let t=lt===e.id;ut(t?``:e.id),D(null),G(null),Q()},onChangePassphrase:e=>{Q(),ce(e)},onRelocate:e=>{Q(),K(null),Ge(Le(e)),qe(R(e.relativePath)),Ue(e)},onMoveToTrash:e=>{Q(),Xe(e)}};(0,k.useEffect)(()=>{if(e===void 0)return;let t=h?.items.find(e=>e.id===dt);if(t===void 0){e(null);return}e({label:f(`keys.inspectorLabel`),attention:t.permissionRisk,body:(0,N.jsx)(Fe,{item:t,now:pt})})},[dt,h,e,f,pt]);async function ht(e){q(``);try{await t.changePassphrase(e.id,{currentPassphrase:le,newPassphrase:z?``:pe,unencrypted:z}),ye(),await Z()}catch{ue(``),he(``),q(f(`keys.passphraseFailed`))}}async function gt(e){try{await t.deregisterFromAgent(e),await Z()}catch{q(f(`keys.agentRemoveFailed`))}}async function _t(){try{let e=await o.passwordVault();if(F(e.dedicatedKeyPassphrases),!e.unlocked){P([]);return}let t=await o.credentials();P(t.credentials.filter(e=>e.kind===`key_passphrase`))}catch{P([]),F([])}}async function vt(e){try{let t=await o.assignCredential(`key_passphrase`,e.relativePath,I);P(t.credentials.filter(e=>e.kind===`key_passphrase`)),F(t=>t.filter(t=>t!==e.relativePath)),se(``)}catch{q(f(`keys.assignPassphraseFailed`))}}async function yt(e){if(!(U===``||Re===``)){if(q(``),ae.some(e=>e.name===U)){ze(``),q(f(`keys.storedPassphraseExists`));return}try{await o.storeCredential(`key_passphrase`,U,Re);let t=await o.assignCredential(`key_passphrase`,e.relativePath,U);P(t.credentials.filter(e=>e.kind===`key_passphrase`)),F(t=>t.filter(t=>t!==e.relativePath)),Be()}catch{ze(``),q(f(`keys.storePassphraseFailed`))}}}async function bt(e){q(``);try{let t=await o.unassignCredential(`key_passphrase`,e.relativePath);P(t.credentials.filter(e=>e.kind===`key_passphrase`)),F(t=>t.filter(t=>t!==e.relativePath)),se(``)}catch{q(f(`keys.unassignPassphraseFailed`))}}async function xt(e){q(``);try{await t.registerWithAgent(e.id,{passphrase:Se,lifetimeSeconds:B}),V(),await Z()}catch{Ce(``),q(f(`keys.agentFailed`))}}async function St(e){q(``),D(null),G(null);try{let n=await t.publicKey(e.id);G({id:e.id,relativePath:n.relativePath,text:n.publicKey.trimEnd()})}catch{G(null),q(f(`keys.publicKeyFailed`))}}async function Ct(e){if(h===null)return;let n=h.items.filter(e=>J.has(e.id));if(n.length===0)return;q(``);let r=await _e((e,n)=>t.relocate(e,n),n,e);nt(r),Y(new Set),await Z()}function wt(e,t){e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t.relativePath),tt(!0),J.has(t.id)||Y(new Set([t.id]))}async function Tt(e){q(``),K(null);try{let n=R(e.relativePath),r=await t.relocate(e.id,{...We===Le(e)?{}:{newName:We},...Ke===n?{}:{group:Ke}});if(K(r),r.blockers.length>0)return;Je(),await Z()}catch{q(f(`keys.relocateFailed`))}}async function Et(e){q(``);try{await t.trash(e),Xe(null),await Z()}catch{q(f(`keys.trashFailed`))}}function Dt(e){let t=e.fingerprint;return t===``||h===null?[e]:h.items.filter(e=>e.fingerprint===t)}async function Ot(e){q(``);try{let n=await t.restore(e);if(n.blockers.length>0){q(f(`keys.restoreRefused`,{blockers:n.blockers.join(`, `)}));return}await Z()}catch{q(f(`keys.restoreFailed`))}}async function kt(e){q(``);try{return await t.purge(e),await Z(),!0}catch{return q(f(`keys.purgeFailed`)),!1}}if(p===`loading`)return(0,N.jsx)(x,{tone:`loading`,title:f(`keys.reading`)});if(p===`error`||h===null||v===null)return(0,N.jsx)(x,{tone:`failed`,title:f(`keys.unreadable`)});let $=st.trim().toLowerCase(),At=me(h.items,at),jt=fe(At,n),Mt=de(At,Qe),Nt=Mt.filter(e=>$===``||e.relativePath.toLowerCase().includes($)||e.kind.toLowerCase().includes($)||e.algorithm.toLowerCase().includes($)||e.fingerprint.toLowerCase().includes($)||e.references.some(e=>e.hostPatterns.some(e=>e.toLowerCase().includes($)))),Pt=$===``?Nt:ge(Mt,Nt),Ft=h.unreadable.length+h.unresolvedReferences.length+h.items.filter(e=>e.permissionRisk).length,It=E===null?W===null?null:{itemId:W.id,content:(0,N.jsxs)(`section`,{"aria-labelledby":`public-key-heading`,className:`flex flex-col gap-3 rounded-md border border-line bg-surface-subtle p-3 sm:p-4`,children:[(0,N.jsx)(`h3`,{id:`public-key-heading`,className:s,children:f(`keys.publicKeyHeading`,{path:W.relativePath})}),(0,N.jsx)(`pre`,{"aria-label":f(`keys.publicKeyLabel`),className:`overflow-x-auto rounded-md bg-canvas p-4 text-xs`,children:W.text}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsx)(y,{value:W.text,label:`copy.publicKey`}),(0,N.jsx)(i,{onClick:()=>G(null),children:f(`keys.close`)})]})]})}:{itemId:E.id,content:(0,N.jsx)(oe,{keyId:E.id,relativePath:E.relativePath,api:t,onClose:()=>D(null)})};return(0,N.jsxs)(`section`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-7 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,N.jsx)(te,{title:f(`keys.heading`),description:f(`keys.pageDescription`),actions:(0,N.jsx)(`a`,{href:`#create-key-heading`,className:l,children:f(`keys.createHeading`)})}),(0,N.jsxs)(C,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[(0,N.jsx)(w,{label:f(`keys.metricFiles`),value:h.items.length,icon:(0,N.jsx)(g,{name:`keys`,className:`h-5 w-5`})}),(0,N.jsx)(w,{label:f(`keys.metricPrivate`),value:h.items.filter(e=>e.kind===`private_key`).length}),(0,N.jsx)(w,{label:f(`keys.metricAttention`),value:Ft,attention:Ft>0})]}),Ze!==``&&(0,N.jsx)(`p`,{role:`alert`,className:`rounded-md border border-control-line p-3 text-sm text-danger`,children:Ze}),J.size===0?null:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-lg border border-control-line bg-card p-3`,children:[(0,N.jsx)(`p`,{className:`grow text-sm text-ink`,children:f(`keys.chosenCount`,{count:J.size})}),(0,N.jsxs)(`select`,{"aria-label":f(`keys.moveTargetLabel`),className:c,value:rt,onChange:e=>it(e.target.value),children:[(0,N.jsx)(`option`,{value:``,children:f(`keys.folderUngrouped`)}),n.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))]}),(0,N.jsx)(i,{kind:`primary`,onClick:()=>void Ct(rt===``?{kind:`ungrouped`}:{kind:`group`,name:rt}),children:f(`keys.moveChosen`)}),(0,N.jsx)(i,{onClick:()=>Y(new Set),children:f(`keys.clearChosen`)})]}),X===null?null:(0,N.jsxs)(`div`,{role:`status`,className:`rounded-lg border border-line bg-card p-3 text-sm`,children:[(0,N.jsx)(`p`,{className:`text-ink`,children:f(`keys.moveMoved`,{count:X.moved.length})}),X.blocked.map(e=>(0,N.jsx)(`p`,{className:`text-danger`,children:f(`keys.moveBlocked`,{path:e.path,reason:e.blockers.join(` / `)})},e.path)),X.failed.map(e=>(0,N.jsx)(`p`,{className:`text-danger`,children:f(`keys.moveFailed`,{path:e})},e))]}),(0,N.jsxs)(`section`,{"aria-label":f(`keys.metricFiles`),className:`flex flex-col gap-3`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,N.jsx)(`p`,{className:`font-mono text-xs font-medium text-ink-muted`,children:`~/.ssh`}),(0,N.jsxs)(`div`,{className:`flex w-full flex-wrap gap-2 sm:w-auto`,children:[(0,N.jsxs)(`label`,{children:[(0,N.jsx)(`span`,{className:`sr-only`,children:f(`keys.listFilter`)}),(0,N.jsxs)(`select`,{className:c,value:at,onChange:e=>ot(e.target.value),children:[(0,N.jsx)(`option`,{value:`keys`,children:f(`keys.listFilterKeys`)}),(0,N.jsx)(`option`,{value:`all`,children:f(`keys.listFilterAll`)})]})]}),(0,N.jsxs)(`label`,{className:`min-w-0 grow sm:w-72 sm:grow-0`,children:[(0,N.jsx)(`span`,{className:`sr-only`,children:f(`keys.search`)}),(0,N.jsx)(`input`,{type:`search`,value:st,onChange:e=>ct(e.target.value),placeholder:f(`keys.searchPlaceholder`),className:c})]})]})]}),(0,N.jsxs)(r,{radius:`md`,children:[(0,N.jsxs)(`div`,{className:`flex flex-col md:flex-row`,children:[(0,N.jsx)(Pe,{rows:jt,selected:Qe,dragging:et,onSelect:e=>{$e(e),nt(null)},onDropInto:e=>void Ct(e)}),(0,N.jsx)(`div`,{className:`min-w-0 grow md:overflow-x-auto`,children:(0,N.jsx)(ve,{items:Pt,inventory:h,chosen:J,selected:dt,detailsFor:lt,now:pt,revealRelated:$!==``,inlinePanel:It,actions:mt})})]}),(0,N.jsx)(je,{trash:v,onRestore:Ot,onPurge:kt})]})]}),(0,N.jsx)(De,{form:H,storedPhrases:O,onAssign:e=>void vt(e),onUnassign:e=>void bt(e),onStoreAndAssign:e=>void yt(e)}),(0,N.jsx)(Oe,{item:Ye,members:Ye===null?[]:Dt(Ye),onConfirm:e=>void Et(e),onCancel:()=>Xe(null)}),h.unreadable.length>0&&(0,N.jsxs)(`section`,{"aria-labelledby":`unreadable-heading`,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{id:`unreadable-heading`,className:`text-sm font-medium text-notice-ink`,children:f(`keys.unreadableHeading`)}),(0,N.jsx)(`p`,{className:`text-sm text-ink-muted`,children:f(`keys.unreadableNote`)}),(0,N.jsx)(`ul`,{className:`text-sm text-ink-muted`,children:h.unreadable.map(e=>(0,N.jsx)(`li`,{children:f(`keys.unreadableEntry`,{path:e.relativePath,reason:e.reason})},e.relativePath))})]}),h.unresolvedReferences.length>0&&(0,N.jsxs)(`section`,{"aria-labelledby":`unresolved-heading`,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{id:`unresolved-heading`,className:`text-sm font-medium text-notice-ink`,children:f(`keys.unresolvedHeading`)}),(0,N.jsx)(`ul`,{className:`text-sm text-ink-muted`,children:h.unresolvedReferences.map(e=>(0,N.jsx)(`li`,{children:f(`keys.referenceWithReason`,{directive:e.directive,value:e.value,path:e.configPath,line:e.line,reason:e.reason})},`${e.configPath}:${e.line}:${e.value}`))})]}),(0,N.jsx)(Ae,{inventory:h}),(0,N.jsx)(Ee,{form:be,storedPhrases:O,onSubmit:e=>void xt(e),onAssignPhrase:e=>void vt(e)}),(0,N.jsx)(we,{form:He,groups:n,onSubmit:e=>void Tt(e)}),(0,N.jsx)(ke,{result:Ve,onClose:()=>K(null)}),(0,N.jsx)(Te,{form:L,onSubmit:e=>void ht(e)}),(0,N.jsx)(Me,{api:t,variants:S,groups:n,onGenerated:Z,onFailure:q,onAssignGeneratedKey:u,onInstallGeneratedKey:d})]})}export{Re as KeysScreen}; \ No newline at end of file diff --git a/internal/ui/dist/assets/KnownHostsPanel-2G8g54MH.js b/internal/ui/dist/assets/KnownHostsPanel-2G8g54MH.js new file mode 100644 index 000000000..dcdef059f --- /dev/null +++ b/internal/ui/dist/assets/KnownHostsPanel-2G8g54MH.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{m as n,n as r,r as i,t as a,u as o,v as s,w as c,y as ee}from"./surface-DPFJ-mE2.js";import{_ as l,f as u,i as d,m as f,n as p,p as m,t as h}from"./form-zbLY2cuV.js";import{q as g}from"./index-DtC-pXtZ.js";import{n as _,r as v,t as y}from"./page-BaebBDRI.js";import{i as b,n as x,r as S,t as C}from"./tableSort-Bd9PEJHh.js";var w=e(),T=`known_hosts.delete`,E=`known_hosts.scan`,D=`known_hosts.add`;function O(e){return c(`KnownHostsResponse`,e)}function k(e){return c(`KnownHostsChangeResponse`,e)}function A(e){return c(`KnownHostsScanResponse`,e)}var te={async knownHosts(e){return O(await s.read(`/api/v1/known-hosts?query=${encodeURIComponent(e)}`))},async deleteKnownHosts(e,t){let r=await o(T,t);return k(await n(`/api/v1/known-hosts/delete`,{entries:e},r))},async scanKnownHosts(e,t){let r=await o(E,e);return A(await n(`/api/v1/known-hosts/scan`,{host:e,port:t},r))},async addKnownHost(e,t,r){let i=await o(D,e.host);return k(await n(`/api/v1/known-hosts/add`,{host:e.host,port:e.port,keyType:e.keyType,key:e.key,expectedFingerprint:t,acknowledged:r},i))}},j=t();function M({api:e=te}){let t=l(),[n,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(null),[T,E]=(0,w.useState)(null),[D,O]=(0,w.useState)(``),[k,A]=(0,w.useState)(``),[M,N]=(0,w.useState)([]),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(``),[R,z]=(0,w.useState)(!1),[B,V]=(0,w.useState)(``),[H,U]=(0,w.useState)(``),[W,G]=(0,w.useState)({key:`host`,direction:`ascending`}),[K,q]=(0,w.useState)({key:`host`,direction:`ascending`});(0,w.useEffect)(()=>{let n=!0;return e.knownHosts(``).then(e=>{n&&c(e)}).catch(()=>{n&&U(t(`kh.unreadable`))}),()=>{n=!1}},[e,t]);async function J(n){U(``);try{c(await e.knownHosts(n))}catch{U(t(`kh.unreadable`))}}async function Y(){if(!(!T||!s)){U(``);try{let r=await e.deleteKnownHosts([{line:T.line,digest:T.digest}],s.path);V(t(`kh.removed`,{id:r.transactionId})),E(null),await J(n)}catch{U(t(`kh.removeFailed`)),E(null)}}}async function ne(){U(``);try{let t=await e.scanKnownHosts(D,22);A(t.notice),N(t.candidates)}catch{U(t(`kh.scanFailed`))}}function X(){L(``),z(!1)}function re(e){X(),F(e)}function Z(){X(),F(null)}async function ie(){if(!P)return;let r=I.trim();if(r!==``&&r!==P.fingerprint){U(t(`kh.fingerprintMismatch`,{typed:r,scanned:P.fingerprint}));return}U(``);try{let i=await e.addKnownHost({host:P.host,port:P.port,keyType:P.keyType,key:P.key},r,R);V(t(`kh.added`,{host:P.host,id:i.transactionId})),Z(),await J(n)}catch(e){let n=ee(e);U(n===``?t(`kh.addFailed`):t(`kh.addFailedCode`,{code:n})),Z()}}let ae=I.trim()!==``||R,oe=b(M,(e,t)=>W.key===`type`?x(e.keyType,t.keyType):W.key===`fingerprint`?x(e.fingerprint,t.fingerprint):W.key===`trust`?0:x(e.host,t.host),W.direction),se=b(s?.entries??[],(e,n)=>K.key===`type`?x(e.keyType,n.keyType):K.key===`fingerprint`?x(e.fingerprint,n.fingerprint):x(e.hashed?t(`kh.hashed`):e.hosts.join(`, `),n.hashed?t(`kh.hashed`):n.hosts.join(`, `)),K.direction);function Q(e){G(t=>S(t.key,t.direction,e))}function $(e){q(t=>S(t.key,t.direction,e))}return(0,j.jsxs)(`section`,{"aria-label":t(`kh.heading`),className:`mx-auto flex w-full max-w-5xl flex-col gap-6 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,j.jsx)(v,{title:t(`kh.heading`),description:t(`kh.pageDescription`)}),(0,j.jsx)(_,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[[t(`kh.metricEntries`),s?.entries.length??0],[t(`kh.metricHashed`),s?.entries.filter(e=>e.hashed).length??0],[t(`kh.metricCandidates`),M.length]].map(([e,t],n)=>(0,j.jsx)(y,{label:String(e),value:t,compact:!0,attention:n===2&&M.length>0},String(e)))}),(0,j.jsx)(`p`,{"aria-live":`polite`,className:`text-sm text-ink-muted`,children:B}),H?(0,j.jsx)(i,{tone:`danger`,children:H}):null,(0,j.jsxs)(r,{as:`section`,radius:`md`,"aria-labelledby":`known-hosts-scan-heading`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4 bg-surface-subtle px-4 py-4`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{id:`known-hosts-scan-heading`,className:u,children:t(`kh.scanHeading`)}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:t(`kh.pageDescription`)})]}),(0,j.jsxs)(`div`,{className:`flex min-w-64 flex-1 flex-wrap items-end gap-2 sm:max-w-xl`,children:[(0,j.jsx)(`div`,{className:`min-w-48 flex-1`,children:(0,j.jsx)(p,{label:t(`kh.hostToScan`),children:(0,j.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),className:d})})}),(0,j.jsx)(a,{kind:`primary`,onClick:()=>void ne(),children:t(`kh.scan`)})]})]}),k?(0,j.jsx)(`p`,{className:`border-t border-notice-line bg-notice px-4 py-3 text-sm text-notice-ink`,children:k}):null,M.length>0?(0,j.jsx)(`div`,{className:`overflow-x-auto px-4 py-3`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,j.jsx)(`caption`,{className:`mb-2 text-left text-ink-muted`,children:t(`kh.scanCandidates`)}),(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{className:f,children:[(0,j.jsx)(C,{column:`host`,activeColumn:W.key,direction:W.direction,onSort:Q,className:m,children:t(`kh.columnHost`)}),(0,j.jsx)(C,{column:`type`,activeColumn:W.key,direction:W.direction,onSort:Q,className:m,children:t(`kh.columnType`)}),(0,j.jsx)(C,{column:`fingerprint`,activeColumn:W.key,direction:W.direction,onSort:Q,className:m,children:t(`kh.columnFingerprint`)}),(0,j.jsx)(C,{column:`trust`,activeColumn:W.key,direction:W.direction,onSort:Q,className:m,children:t(`kh.columnTrust`)}),(0,j.jsx)(`th`,{scope:`col`,className:m,children:t(`kh.columnActions`)})]})}),(0,j.jsx)(`tbody`,{children:oe.map(e=>(0,j.jsxs)(`tr`,{className:`border-b border-line last:border-b-0`,children:[(0,j.jsx)(`td`,{className:`py-2 pr-3`,children:e.host}),(0,j.jsx)(`td`,{className:`py-2 pr-3 text-ink-muted`,children:e.keyType}),(0,j.jsx)(`td`,{className:`py-2 pr-3 font-mono text-xs text-ink-muted`,children:e.fingerprint}),(0,j.jsx)(`td`,{className:`py-2 pr-3`,children:(0,j.jsx)(`span`,{className:`rounded-full bg-notice px-2 py-1 text-xs font-medium text-notice-ink`,children:t(`kh.unverified`)})}),(0,j.jsx)(`td`,{className:`py-2`,children:(0,j.jsx)(a,{onClick:()=>re(e),children:t(`kh.add`)})})]},`${e.host}-${e.fingerprint}`))})]})}):null,P?(0,j.jsxs)(`div`,{className:`border-t border-notice-line bg-notice p-4 text-sm`,children:[(0,j.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:t(`kh.addHeading`)}),(0,j.jsx)(`p`,{className:`text-ink-muted`,children:t(`kh.addExplain`,{host:P.host})}),(0,j.jsxs)(`p`,{className:`text-ink-muted`,children:[P.keyType,` · `,P.fingerprint]}),(0,j.jsx)(p,{label:t(`kh.expectedFingerprint`),children:(0,j.jsx)(`input`,{value:I,onChange:e=>L(e.target.value),className:d})}),(0,j.jsx)(h,{label:t(`kh.acknowledge`),checked:R,onChange:z}),(0,j.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,j.jsx)(`button`,{type:`button`,disabled:!ae,onClick:()=>void ie(),className:`rounded-md bg-accent px-3 py-1.5 font-medium text-accent-ink disabled:bg-line disabled:text-ink-faint`,children:t(`kh.addToKnownHosts`)}),(0,j.jsx)(a,{onClick:Z,children:t(`kh.cancel`)})]})]}):null]}),(0,j.jsxs)(r,{as:`section`,radius:`md`,"aria-labelledby":`known-hosts-trusted-heading`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4 border-b border-line px-4 py-4`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{id:`known-hosts-trusted-heading`,className:u,children:t(`kh.trustedHeading`)}),s?(0,j.jsx)(`p`,{className:`mt-1 font-mono text-xs text-ink-faint`,children:s.path}):null]}),(0,j.jsx)(`div`,{className:`w-full sm:w-72`,children:(0,j.jsx)(p,{label:t(`kh.search`),children:(0,j.jsx)(`input`,{value:n,onChange:e=>{o(e.target.value),J(e.target.value)},className:d})})})]}),s?(0,j.jsx)(`div`,{className:`px-4 pb-4`,children:(0,j.jsxs)(`table`,{className:`block w-full text-sm sm:table`,children:[(0,j.jsx)(`caption`,{className:`sr-only`,children:s.path}),(0,j.jsx)(`thead`,{className:`hidden sm:table-header-group`,children:(0,j.jsxs)(`tr`,{className:f,children:[(0,j.jsx)(C,{column:`host`,activeColumn:K.key,direction:K.direction,onSort:$,className:m,children:t(`kh.columnHost`)}),(0,j.jsx)(C,{column:`type`,activeColumn:K.key,direction:K.direction,onSort:$,className:m,children:t(`kh.columnType`)}),(0,j.jsx)(C,{column:`fingerprint`,activeColumn:K.key,direction:K.direction,onSort:$,className:m,children:t(`kh.columnFingerprint`)}),(0,j.jsx)(`th`,{scope:`col`,className:m,children:t(`kh.columnActions`)})]})}),(0,j.jsx)(`tbody`,{className:`block sm:table-row-group`,children:se.map(e=>(0,j.jsxs)(`tr`,{className:`grid gap-2 border-b border-line py-3 last:border-b-0 sm:table-row sm:py-0`,children:[(0,j.jsxs)(`td`,{className:`flex min-w-0 items-start justify-between gap-4 sm:table-cell sm:py-2 sm:pr-3`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-xs font-medium uppercase tracking-wide text-ink-muted sm:hidden`,children:t(`kh.columnHost`)}),(0,j.jsx)(`span`,{className:`min-w-0 break-all text-right sm:text-left`,children:e.hashed?t(`kh.hashed`):e.hosts.join(`, `)})]}),(0,j.jsxs)(`td`,{className:`flex min-w-0 items-start justify-between gap-4 text-ink-muted sm:table-cell sm:py-2 sm:pr-3`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-xs font-medium uppercase tracking-wide sm:hidden`,children:t(`kh.columnType`)}),(0,j.jsx)(`span`,{className:`min-w-0 break-all text-right sm:text-left`,children:e.keyType})]}),(0,j.jsxs)(`td`,{className:`flex min-w-0 items-start justify-between gap-4 font-mono text-xs text-ink-muted sm:table-cell sm:py-3 sm:pr-3`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 font-sans font-medium uppercase tracking-wide sm:hidden`,children:t(`kh.columnFingerprint`)}),(0,j.jsx)(`span`,{className:`min-w-0 break-all text-right sm:text-left`,children:e.fingerprint})]}),(0,j.jsx)(`td`,{className:`flex justify-end sm:table-cell sm:py-2`,children:(0,j.jsx)(a,{className:`w-full sm:w-auto`,onClick:()=>E(e),children:t(`kh.delete`)})})]},`${e.line}-${e.digest}`))})]})}):null]}),T===null?null:(0,j.jsx)(g,{id:`known-host-delete-heading`,heading:t(`kh.delete`),body:(0,j.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`kh.confirmRemove`,{line:T.line,fingerprint:T.fingerprint})}),confirmLabel:t(`kh.confirmDelete`),cancelLabel:t(`kh.cancel`),onConfirm:()=>void Y(),onCancel:()=>E(null)})]})}export{M as KnownHostsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/KnownHostsPanel-CVuqmEac.js b/internal/ui/dist/assets/KnownHostsPanel-CVuqmEac.js deleted file mode 100644 index eca40d7dc..000000000 --- a/internal/ui/dist/assets/KnownHostsPanel-CVuqmEac.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{S as n,_ as r,g as i,n as a,p as o,r as ee,t as s,u as c}from"./surface-Ck_FblzE.js";import{_ as l,f as u,i as d,m as f,n as p,p as m,t as h}from"./form-C1olpQVF.js";import{H as g}from"./index-DJ8h9zNi.js";import{n as _,r as v,t as y}from"./page-CiAVS9qS.js";import{i as b,n as x,r as S,t as C}from"./tableSort-CcSWRQGj.js";var w=e(),T=`known_hosts.delete`,E=`known_hosts.scan`,D=`known_hosts.add`;function O(e){return n(`KnownHostsResponse`,e)}function k(e){return n(`KnownHostsChangeResponse`,e)}function A(e){return n(`KnownHostsScanResponse`,e)}var j={async knownHosts(e){return O(await i.read(`/api/v1/known-hosts?query=${encodeURIComponent(e)}`))},async deleteKnownHosts(e,t){let n=await c(T,t);return k(await o(`/api/v1/known-hosts/delete`,{entries:e},n))},async scanKnownHosts(e,t){let n=await c(E,e);return A(await o(`/api/v1/known-hosts/scan`,{host:e,port:t},n))},async addKnownHost(e,t,n){let r=await c(D,e.host);return k(await o(`/api/v1/known-hosts/add`,{host:e.host,port:e.port,keyType:e.keyType,key:e.key,expectedFingerprint:t,acknowledged:n},r))}},M=t();function N({api:e=j}){let t=l(),[n,i]=(0,w.useState)(``),[o,c]=(0,w.useState)(null),[T,E]=(0,w.useState)(null),[D,O]=(0,w.useState)(``),[k,A]=(0,w.useState)(``),[N,P]=(0,w.useState)([]),[F,I]=(0,w.useState)(null),[L,R]=(0,w.useState)(``),[z,B]=(0,w.useState)(!1),[V,H]=(0,w.useState)(``),[U,W]=(0,w.useState)(``),[G,K]=(0,w.useState)({key:`host`,direction:`ascending`}),[q,J]=(0,w.useState)({key:`host`,direction:`ascending`});(0,w.useEffect)(()=>{let n=!0;return e.knownHosts(``).then(e=>{n&&c(e)}).catch(()=>{n&&W(t(`kh.unreadable`))}),()=>{n=!1}},[e,t]);async function Y(n){W(``);try{c(await e.knownHosts(n))}catch{W(t(`kh.unreadable`))}}async function te(){if(!(!T||!o)){W(``);try{let r=await e.deleteKnownHosts([{line:T.line,digest:T.digest}],o.path);H(t(`kh.removed`,{id:r.transactionId})),E(null),await Y(n)}catch{W(t(`kh.removeFailed`)),E(null)}}}async function ne(){W(``);try{let t=await e.scanKnownHosts(D,22);A(t.notice),P(t.candidates)}catch{W(t(`kh.scanFailed`))}}function X(){R(``),B(!1)}function re(e){X(),I(e)}function Z(){X(),I(null)}async function ie(){if(!F)return;let i=L.trim();if(i!==``&&i!==F.fingerprint){W(t(`kh.fingerprintMismatch`,{typed:i,scanned:F.fingerprint}));return}W(``);try{let r=await e.addKnownHost({host:F.host,port:F.port,keyType:F.keyType,key:F.key},i,z);H(t(`kh.added`,{host:F.host,id:r.transactionId})),Z(),await Y(n)}catch(e){let n=r(e);W(n===``?t(`kh.addFailed`):t(`kh.addFailedCode`,{code:n})),Z()}}let ae=L.trim()!==``||z,oe=b(N,(e,t)=>G.key===`type`?x(e.keyType,t.keyType):G.key===`fingerprint`?x(e.fingerprint,t.fingerprint):G.key===`trust`?0:x(e.host,t.host),G.direction),se=b(o?.entries??[],(e,n)=>q.key===`type`?x(e.keyType,n.keyType):q.key===`fingerprint`?x(e.fingerprint,n.fingerprint):x(e.hashed?t(`kh.hashed`):e.hosts.join(`, `),n.hashed?t(`kh.hashed`):n.hosts.join(`, `)),q.direction);function Q(e){K(t=>S(t.key,t.direction,e))}function $(e){J(t=>S(t.key,t.direction,e))}return(0,M.jsxs)(`section`,{"aria-label":t(`kh.heading`),className:`mx-auto flex w-full max-w-5xl flex-col gap-6 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,M.jsx)(v,{title:t(`kh.heading`),description:t(`kh.pageDescription`)}),(0,M.jsx)(_,{className:`sm:grid-cols-3 lg:grid-cols-3`,children:[[t(`kh.metricEntries`),o?.entries.length??0],[t(`kh.metricHashed`),o?.entries.filter(e=>e.hashed).length??0],[t(`kh.metricCandidates`),N.length]].map(([e,t],n)=>(0,M.jsx)(y,{label:String(e),value:t,compact:!0,attention:n===2&&N.length>0},String(e)))}),(0,M.jsx)(`p`,{"aria-live":`polite`,className:`text-sm text-ink-muted`,children:V}),U?(0,M.jsx)(ee,{tone:`danger`,children:U}):null,(0,M.jsxs)(a,{as:`section`,radius:`md`,"aria-labelledby":`known-hosts-scan-heading`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4 bg-surface-subtle px-4 py-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{id:`known-hosts-scan-heading`,className:u,children:t(`kh.scanHeading`)}),(0,M.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:t(`kh.pageDescription`)})]}),(0,M.jsxs)(`div`,{className:`flex min-w-64 flex-1 flex-wrap items-end gap-2 sm:max-w-xl`,children:[(0,M.jsx)(`div`,{className:`min-w-48 flex-1`,children:(0,M.jsx)(p,{label:t(`kh.hostToScan`),children:(0,M.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),className:d})})}),(0,M.jsx)(s,{kind:`primary`,onClick:()=>void ne(),children:t(`kh.scan`)})]})]}),k?(0,M.jsx)(`p`,{className:`border-t border-notice-line bg-notice px-4 py-3 text-sm text-notice-ink`,children:k}):null,N.length>0?(0,M.jsx)(`div`,{className:`overflow-x-auto px-4 py-3`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`caption`,{className:`mb-2 text-left text-ink-muted`,children:t(`kh.scanCandidates`)}),(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:f,children:[(0,M.jsx)(C,{column:`host`,activeColumn:G.key,direction:G.direction,onSort:Q,className:m,children:t(`kh.columnHost`)}),(0,M.jsx)(C,{column:`type`,activeColumn:G.key,direction:G.direction,onSort:Q,className:m,children:t(`kh.columnType`)}),(0,M.jsx)(C,{column:`fingerprint`,activeColumn:G.key,direction:G.direction,onSort:Q,className:m,children:t(`kh.columnFingerprint`)}),(0,M.jsx)(C,{column:`trust`,activeColumn:G.key,direction:G.direction,onSort:Q,className:m,children:t(`kh.columnTrust`)}),(0,M.jsx)(`th`,{scope:`col`,className:m,children:t(`kh.columnActions`)})]})}),(0,M.jsx)(`tbody`,{children:oe.map(e=>(0,M.jsxs)(`tr`,{className:`border-b border-line last:border-b-0`,children:[(0,M.jsx)(`td`,{className:`py-2 pr-3`,children:e.host}),(0,M.jsx)(`td`,{className:`py-2 pr-3 text-ink-muted`,children:e.keyType}),(0,M.jsx)(`td`,{className:`py-2 pr-3 font-mono text-xs text-ink-muted`,children:e.fingerprint}),(0,M.jsx)(`td`,{className:`py-2 pr-3`,children:(0,M.jsx)(`span`,{className:`rounded-full bg-notice px-2 py-1 text-xs font-medium text-notice-ink`,children:t(`kh.unverified`)})}),(0,M.jsx)(`td`,{className:`py-2`,children:(0,M.jsx)(s,{onClick:()=>re(e),children:t(`kh.add`)})})]},`${e.host}-${e.fingerprint}`))})]})}):null,F?(0,M.jsxs)(`div`,{className:`border-t border-notice-line bg-notice p-4 text-sm`,children:[(0,M.jsx)(`h3`,{className:`font-medium text-notice-ink`,children:t(`kh.addHeading`)}),(0,M.jsx)(`p`,{className:`text-ink-muted`,children:t(`kh.addExplain`,{host:F.host})}),(0,M.jsxs)(`p`,{className:`text-ink-muted`,children:[F.keyType,` · `,F.fingerprint]}),(0,M.jsx)(p,{label:t(`kh.expectedFingerprint`),children:(0,M.jsx)(`input`,{value:L,onChange:e=>R(e.target.value),className:d})}),(0,M.jsx)(h,{label:t(`kh.acknowledge`),checked:z,onChange:B}),(0,M.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,M.jsx)(`button`,{type:`button`,disabled:!ae,onClick:()=>void ie(),className:`rounded-md bg-accent px-3 py-1.5 font-medium text-accent-ink disabled:bg-line disabled:text-ink-faint`,children:t(`kh.addToKnownHosts`)}),(0,M.jsx)(s,{onClick:Z,children:t(`kh.cancel`)})]})]}):null]}),(0,M.jsxs)(a,{as:`section`,radius:`md`,"aria-labelledby":`known-hosts-trusted-heading`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4 border-b border-line px-4 py-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{id:`known-hosts-trusted-heading`,className:u,children:t(`kh.trustedHeading`)}),o?(0,M.jsx)(`p`,{className:`mt-1 font-mono text-xs text-ink-faint`,children:o.path}):null]}),(0,M.jsx)(`div`,{className:`w-full sm:w-72`,children:(0,M.jsx)(p,{label:t(`kh.search`),children:(0,M.jsx)(`input`,{value:n,onChange:e=>{i(e.target.value),Y(e.target.value)},className:d})})})]}),o?(0,M.jsx)(`div`,{className:`px-4 pb-4`,children:(0,M.jsxs)(`table`,{className:`block w-full text-sm sm:table`,children:[(0,M.jsx)(`caption`,{className:`sr-only`,children:o.path}),(0,M.jsx)(`thead`,{className:`hidden sm:table-header-group`,children:(0,M.jsxs)(`tr`,{className:f,children:[(0,M.jsx)(C,{column:`host`,activeColumn:q.key,direction:q.direction,onSort:$,className:m,children:t(`kh.columnHost`)}),(0,M.jsx)(C,{column:`type`,activeColumn:q.key,direction:q.direction,onSort:$,className:m,children:t(`kh.columnType`)}),(0,M.jsx)(C,{column:`fingerprint`,activeColumn:q.key,direction:q.direction,onSort:$,className:m,children:t(`kh.columnFingerprint`)}),(0,M.jsx)(`th`,{scope:`col`,className:m,children:t(`kh.columnActions`)})]})}),(0,M.jsx)(`tbody`,{className:`block sm:table-row-group`,children:se.map(e=>(0,M.jsxs)(`tr`,{className:`grid gap-2 border-b border-line py-3 last:border-b-0 sm:table-row sm:py-0`,children:[(0,M.jsxs)(`td`,{className:`flex min-w-0 items-start justify-between gap-4 sm:table-cell sm:py-2 sm:pr-3`,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-xs font-medium uppercase tracking-wide text-ink-muted sm:hidden`,children:t(`kh.columnHost`)}),(0,M.jsx)(`span`,{className:`min-w-0 break-all text-right sm:text-left`,children:e.hashed?t(`kh.hashed`):e.hosts.join(`, `)})]}),(0,M.jsxs)(`td`,{className:`flex min-w-0 items-start justify-between gap-4 text-ink-muted sm:table-cell sm:py-2 sm:pr-3`,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-xs font-medium uppercase tracking-wide sm:hidden`,children:t(`kh.columnType`)}),(0,M.jsx)(`span`,{className:`min-w-0 break-all text-right sm:text-left`,children:e.keyType})]}),(0,M.jsxs)(`td`,{className:`flex min-w-0 items-start justify-between gap-4 font-mono text-xs text-ink-muted sm:table-cell sm:py-3 sm:pr-3`,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 font-sans font-medium uppercase tracking-wide sm:hidden`,children:t(`kh.columnFingerprint`)}),(0,M.jsx)(`span`,{className:`min-w-0 break-all text-right sm:text-left`,children:e.fingerprint})]}),(0,M.jsx)(`td`,{className:`flex justify-end sm:table-cell sm:py-2`,children:(0,M.jsx)(s,{className:`w-full sm:w-auto`,onClick:()=>E(e),children:t(`kh.delete`)})})]},`${e.line}-${e.digest}`))})]})}):null]}),T===null?null:(0,M.jsx)(g,{id:`known-host-delete-heading`,heading:t(`kh.delete`),body:(0,M.jsx)(`p`,{className:`text-sm text-ink-muted`,children:t(`kh.confirmRemove`,{line:T.line,fingerprint:T.fingerprint})}),confirmLabel:t(`kh.confirmDelete`),cancelLabel:t(`kh.cancel`),onConfirm:()=>void te(),onCancel:()=>E(null)})]})}export{N as KnownHostsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/LicensePage-CwJdmrxm.js b/internal/ui/dist/assets/LicensePage-4RM7GLPH.js similarity index 99% rename from internal/ui/dist/assets/LicensePage-CwJdmrxm.js rename to internal/ui/dist/assets/LicensePage-4RM7GLPH.js index c64e55589..010f32029 100644 --- a/internal/ui/dist/assets/LicensePage-CwJdmrxm.js +++ b/internal/ui/dist/assets/LicensePage-4RM7GLPH.js @@ -1 +1 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,i as r}from"./form-C1olpQVF.js";var i=e(),a=JSON.parse(`[{"name":"sshc","version":"","category":"Application","url":"https://github.com/aida0710/sshc","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"@types/trusted-types","version":"2.0.7","category":"Web","url":"https://www.npmjs.com/package/@types/trusted-types","license":"MIT","notices":[{"name":"LICENSE","text":" MIT License\\n\\n Copyright (c) Microsoft Corporation.\\n\\n Permission is hereby granted, free of charge, to any person obtaining a copy\\n of this software and associated documentation files (the \\"Software\\"), to deal\\n in the Software without restriction, including without limitation the rights\\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\n copies of the Software, and to permit persons to whom the Software is\\n furnished to do so, subject to the following conditions:\\n\\n The above copyright notice and this permission notice shall be included in all\\n copies or substantial portions of the Software.\\n\\n THE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\n SOFTWARE\\n"}]},{"name":"@xterm/addon-fit","version":"0.11.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/addon-fit","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"@xterm/addon-search","version":"0.16.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/addon-search","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"@xterm/addon-webgl","version":"0.19.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/addon-webgl","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2018, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"@xterm/xterm","version":"6.0.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/xterm","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\nCopyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)\\nCopyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"androidx.activity:activity","version":"1.13.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/activity#1.13.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/activity/activity/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.annotation:annotation-experimental","version":"1.4.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/annotation#1.4.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.annotation:annotation-jvm","version":"1.9.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/annotation#1.9.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/annotation/annotation/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.arch.core:core-common","version":"2.2.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.arch.core:core-runtime","version":"2.2.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.collection:collection-jvm","version":"1.4.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/collection#1.4.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.compose.runtime:runtime-annotation-android","version":"1.9.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.9.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/compose/runtime/runtime-annotation/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.concurrent:concurrent-futures","version":"1.1.0","category":"Android","url":"https://developer.android.com/topic/libraries/architecture/index.html","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.core:core","version":"1.18.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/core#1.18.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/core/core/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.core:core-ktx","version":"1.18.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/core#1.18.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/core/core-ktx/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.core:core-viewtree","version":"1.0.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/core#1.0.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/core/core-viewtree/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.interpolator:interpolator","version":"1.0.0","category":"Android","url":"http://developer.android.com/tools/extras/support-library.html","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-common","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-livedata-core","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-runtime","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-viewmodel","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-viewmodel-savedstate","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.navigationevent:navigationevent-android","version":"1.0.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/navigationevent/navigationevent/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.profileinstaller:profileinstaller","version":"1.4.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.4.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/profileinstaller/profileinstaller/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.savedstate:savedstate","version":"1.2.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.startup:startup-runtime","version":"1.1.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/startup#1.1.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.tracing:tracing","version":"1.2.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/tracing#1.2.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.versionedparcelable:versionedparcelable","version":"1.1.1","category":"Android","url":"http://developer.android.com/tools/extras/support-library.html","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"com.google.guava:listenablefuture","version":"1.0","category":"Android","url":"https://developer.android.com/jetpack/androidx","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"Devicon","version":"7330accdbc47","category":"Icons","url":"https://github.com/devicons/devicon","license":"MIT","notices":[{"name":"LICENSE","text":"The MIT License (MIT)\\n\\nCopyright (c) 2015 konpa\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy of\\nthis software and associated documentation files (the \\"Software\\"), to deal in\\nthe Software without restriction, including without limitation the rights to\\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\nthe Software, and to permit persons to whom the Software is furnished to do so,\\nsubject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n"}]},{"name":"dompurify","version":"3.4.14","category":"Web","url":"https://www.npmjs.com/package/dompurify","license":"(MPL-2.0 OR Apache-2.0)","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"LICENSE-MPL","text":"Mozilla Public License Version 2.0\\n==================================\\n\\n1. Definitions\\n--------------\\n\\n1.1. \\"Contributor\\"\\n means each individual or legal entity that creates, contributes to\\n the creation of, or owns Covered Software.\\n\\n1.2. \\"Contributor Version\\"\\n means the combination of the Contributions of others (if any) used\\n by a Contributor and that particular Contributor's Contribution.\\n\\n1.3. \\"Contribution\\"\\n means Covered Software of a particular Contributor.\\n\\n1.4. \\"Covered Software\\"\\n means Source Code Form to which the initial Contributor has attached\\n the notice in Exhibit A, the Executable Form of such Source Code\\n Form, and Modifications of such Source Code Form, in each case\\n including portions thereof.\\n\\n1.5. \\"Incompatible With Secondary Licenses\\"\\n means\\n\\n (a) that the initial Contributor has attached the notice described\\n in Exhibit B to the Covered Software; or\\n\\n (b) that the Covered Software was made available under the terms of\\n version 1.1 or earlier of the License, but not also under the\\n terms of a Secondary License.\\n\\n1.6. \\"Executable Form\\"\\n means any form of the work other than Source Code Form.\\n\\n1.7. \\"Larger Work\\"\\n means a work that combines Covered Software with other material, in \\n a separate file or files, that is not Covered Software.\\n\\n1.8. \\"License\\"\\n means this document.\\n\\n1.9. \\"Licensable\\"\\n means having the right to grant, to the maximum extent possible,\\n whether at the time of the initial grant or subsequently, any and\\n all of the rights conveyed by this License.\\n\\n1.10. \\"Modifications\\"\\n means any of the following:\\n\\n (a) any file in Source Code Form that results from an addition to,\\n deletion from, or modification of the contents of Covered\\n Software; or\\n\\n (b) any new file in Source Code Form that contains any Covered\\n Software.\\n\\n1.11. \\"Patent Claims\\" of a Contributor\\n means any patent claim(s), including without limitation, method,\\n process, and apparatus claims, in any patent Licensable by such\\n Contributor that would be infringed, but for the grant of the\\n License, by the making, using, selling, offering for sale, having\\n made, import, or transfer of either its Contributions or its\\n Contributor Version.\\n\\n1.12. \\"Secondary License\\"\\n means either the GNU General Public License, Version 2.0, the GNU\\n Lesser General Public License, Version 2.1, the GNU Affero General\\n Public License, Version 3.0, or any later versions of those\\n licenses.\\n\\n1.13. \\"Source Code Form\\"\\n means the form of the work preferred for making modifications.\\n\\n1.14. \\"You\\" (or \\"Your\\")\\n means an individual or a legal entity exercising rights under this\\n License. For legal entities, \\"You\\" includes any entity that\\n controls, is controlled by, or is under common control with You. For\\n purposes of this definition, \\"control\\" means (a) the power, direct\\n or indirect, to cause the direction or management of such entity,\\n whether by contract or otherwise, or (b) ownership of more than\\n fifty percent (50%) of the outstanding shares or beneficial\\n ownership of such entity.\\n\\n2. License Grants and Conditions\\n--------------------------------\\n\\n2.1. Grants\\n\\nEach Contributor hereby grants You a world-wide, royalty-free,\\nnon-exclusive license:\\n\\n(a) under intellectual property rights (other than patent or trademark)\\n Licensable by such Contributor to use, reproduce, make available,\\n modify, display, perform, distribute, and otherwise exploit its\\n Contributions, either on an unmodified basis, with Modifications, or\\n as part of a Larger Work; and\\n\\n(b) under Patent Claims of such Contributor to make, use, sell, offer\\n for sale, have made, import, and otherwise transfer either its\\n Contributions or its Contributor Version.\\n\\n2.2. Effective Date\\n\\nThe licenses granted in Section 2.1 with respect to any Contribution\\nbecome effective for each Contribution on the date the Contributor first\\ndistributes such Contribution.\\n\\n2.3. Limitations on Grant Scope\\n\\nThe licenses granted in this Section 2 are the only rights granted under\\nthis License. No additional rights or licenses will be implied from the\\ndistribution or licensing of Covered Software under this License.\\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\\nContributor:\\n\\n(a) for any code that a Contributor has removed from Covered Software;\\n or\\n\\n(b) for infringements caused by: (i) Your and any other third party's\\n modifications of Covered Software, or (ii) the combination of its\\n Contributions with other software (except as part of its Contributor\\n Version); or\\n\\n(c) under Patent Claims infringed by Covered Software in the absence of\\n its Contributions.\\n\\nThis License does not grant any rights in the trademarks, service marks,\\nor logos of any Contributor (except as may be necessary to comply with\\nthe notice requirements in Section 3.4).\\n\\n2.4. Subsequent Licenses\\n\\nNo Contributor makes additional grants as a result of Your choice to\\ndistribute the Covered Software under a subsequent version of this\\nLicense (see Section 10.2) or under the terms of a Secondary License (if\\npermitted under the terms of Section 3.3).\\n\\n2.5. Representation\\n\\nEach Contributor represents that the Contributor believes its\\nContributions are its original creation(s) or it has sufficient rights\\nto grant the rights to its Contributions conveyed by this License.\\n\\n2.6. Fair Use\\n\\nThis License is not intended to limit any rights You have under\\napplicable copyright doctrines of fair use, fair dealing, or other\\nequivalents.\\n\\n2.7. Conditions\\n\\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\\nin Section 2.1.\\n\\n3. Responsibilities\\n-------------------\\n\\n3.1. Distribution of Source Form\\n\\nAll distribution of Covered Software in Source Code Form, including any\\nModifications that You create or to which You contribute, must be under\\nthe terms of this License. You must inform recipients that the Source\\nCode Form of the Covered Software is governed by the terms of this\\nLicense, and how they can obtain a copy of this License. You may not\\nattempt to alter or restrict the recipients' rights in the Source Code\\nForm.\\n\\n3.2. Distribution of Executable Form\\n\\nIf You distribute Covered Software in Executable Form then:\\n\\n(a) such Covered Software must also be made available in Source Code\\n Form, as described in Section 3.1, and You must inform recipients of\\n the Executable Form how they can obtain a copy of such Source Code\\n Form by reasonable means in a timely manner, at a charge no more\\n than the cost of distribution to the recipient; and\\n\\n(b) You may distribute such Executable Form under the terms of this\\n License, or sublicense it under different terms, provided that the\\n license for the Executable Form does not attempt to limit or alter\\n the recipients' rights in the Source Code Form under this License.\\n\\n3.3. Distribution of a Larger Work\\n\\nYou may create and distribute a Larger Work under terms of Your choice,\\nprovided that You also comply with the requirements of this License for\\nthe Covered Software. If the Larger Work is a combination of Covered\\nSoftware with a work governed by one or more Secondary Licenses, and the\\nCovered Software is not Incompatible With Secondary Licenses, this\\nLicense permits You to additionally distribute such Covered Software\\nunder the terms of such Secondary License(s), so that the recipient of\\nthe Larger Work may, at their option, further distribute the Covered\\nSoftware under the terms of either this License or such Secondary\\nLicense(s).\\n\\n3.4. Notices\\n\\nYou may not remove or alter the substance of any license notices\\n(including copyright notices, patent notices, disclaimers of warranty,\\nor limitations of liability) contained within the Source Code Form of\\nthe Covered Software, except that You may alter any license notices to\\nthe extent required to remedy known factual inaccuracies.\\n\\n3.5. Application of Additional Terms\\n\\nYou may choose to offer, and to charge a fee for, warranty, support,\\nindemnity or liability obligations to one or more recipients of Covered\\nSoftware. However, You may do so only on Your own behalf, and not on\\nbehalf of any Contributor. You must make it absolutely clear that any\\nsuch warranty, support, indemnity, or liability obligation is offered by\\nYou alone, and You hereby agree to indemnify every Contributor for any\\nliability incurred by such Contributor as a result of warranty, support,\\nindemnity or liability terms You offer. You may include additional\\ndisclaimers of warranty and limitations of liability specific to any\\njurisdiction.\\n\\n4. Inability to Comply Due to Statute or Regulation\\n---------------------------------------------------\\n\\nIf it is impossible for You to comply with any of the terms of this\\nLicense with respect to some or all of the Covered Software due to\\nstatute, judicial order, or regulation then You must: (a) comply with\\nthe terms of this License to the maximum extent possible; and (b)\\ndescribe the limitations and the code they affect. Such description must\\nbe placed in a text file included with all distributions of the Covered\\nSoftware under this License. Except to the extent prohibited by statute\\nor regulation, such description must be sufficiently detailed for a\\nrecipient of ordinary skill to be able to understand it.\\n\\n5. Termination\\n--------------\\n\\n5.1. The rights granted under this License will terminate automatically\\nif You fail to comply with any of its terms. However, if You become\\ncompliant, then the rights granted under this License from a particular\\nContributor are reinstated (a) provisionally, unless and until such\\nContributor explicitly and finally terminates Your grants, and (b) on an\\nongoing basis, if such Contributor fails to notify You of the\\nnon-compliance by some reasonable means prior to 60 days after You have\\ncome back into compliance. Moreover, Your grants from a particular\\nContributor are reinstated on an ongoing basis if such Contributor\\nnotifies You of the non-compliance by some reasonable means, this is the\\nfirst time You have received notice of non-compliance with this License\\nfrom such Contributor, and You become compliant prior to 30 days after\\nYour receipt of the notice.\\n\\n5.2. If You initiate litigation against any entity by asserting a patent\\ninfringement claim (excluding declaratory judgment actions,\\ncounter-claims, and cross-claims) alleging that a Contributor Version\\ndirectly or indirectly infringes any patent, then the rights granted to\\nYou by any and all Contributors for the Covered Software under Section\\n2.1 of this License shall terminate.\\n\\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\\nend user license agreements (excluding distributors and resellers) which\\nhave been validly granted by You or Your distributors under this License\\nprior to termination shall survive termination.\\n\\n************************************************************************\\n* *\\n* 6. Disclaimer of Warranty *\\n* ------------------------- *\\n* *\\n* Covered Software is provided under this License on an \\"as is\\" *\\n* basis, without warranty of any kind, either expressed, implied, or *\\n* statutory, including, without limitation, warranties that the *\\n* Covered Software is free of defects, merchantable, fit for a *\\n* particular purpose or non-infringing. The entire risk as to the *\\n* quality and performance of the Covered Software is with You. *\\n* Should any Covered Software prove defective in any respect, You *\\n* (not any Contributor) assume the cost of any necessary servicing, *\\n* repair, or correction. This disclaimer of warranty constitutes an *\\n* essential part of this License. No use of any Covered Software is *\\n* authorized under this License except under this disclaimer. *\\n* *\\n************************************************************************\\n\\n************************************************************************\\n* *\\n* 7. Limitation of Liability *\\n* -------------------------- *\\n* *\\n* Under no circumstances and under no legal theory, whether tort *\\n* (including negligence), contract, or otherwise, shall any *\\n* Contributor, or anyone who distributes Covered Software as *\\n* permitted above, be liable to You for any direct, indirect, *\\n* special, incidental, or consequential damages of any character *\\n* including, without limitation, damages for lost profits, loss of *\\n* goodwill, work stoppage, computer failure or malfunction, or any *\\n* and all other commercial damages or losses, even if such party *\\n* shall have been informed of the possibility of such damages. This *\\n* limitation of liability shall not apply to liability for death or *\\n* personal injury resulting from such party's negligence to the *\\n* extent applicable law prohibits such limitation. Some *\\n* jurisdictions do not allow the exclusion or limitation of *\\n* incidental or consequential damages, so this exclusion and *\\n* limitation may not apply to You. *\\n* *\\n************************************************************************\\n\\n8. Litigation\\n-------------\\n\\nAny litigation relating to this License may be brought only in the\\ncourts of a jurisdiction where the defendant maintains its principal\\nplace of business and such litigation shall be governed by laws of that\\njurisdiction, without reference to its conflict-of-law provisions.\\nNothing in this Section shall prevent a party's ability to bring\\ncross-claims or counter-claims.\\n\\n9. Miscellaneous\\n----------------\\n\\nThis License represents the complete agreement concerning the subject\\nmatter hereof. If any provision of this License is held to be\\nunenforceable, such provision shall be reformed only to the extent\\nnecessary to make it enforceable. Any law or regulation which provides\\nthat the language of a contract shall be construed against the drafter\\nshall not be used to construe this License against a Contributor.\\n\\n10. Versions of the License\\n---------------------------\\n\\n10.1. New Versions\\n\\nMozilla Foundation is the license steward. Except as provided in Section\\n10.3, no one other than the license steward has the right to modify or\\npublish new versions of this License. Each version will be given a\\ndistinguishing version number.\\n\\n10.2. Effect of New Versions\\n\\nYou may distribute the Covered Software under the terms of the version\\nof the License under which You originally received the Covered Software,\\nor under the terms of any subsequent version published by the license\\nsteward.\\n\\n10.3. Modified Versions\\n\\nIf you create software not governed by this License, and you want to\\ncreate a new license for such software, you may create and use a\\nmodified version of this License if you rename the license and remove\\nany references to the name of the license steward (except to note that\\nsuch modified license differs from this License).\\n\\n10.4. Distributing Source Code Form that is Incompatible With Secondary\\nLicenses\\n\\nIf You choose to distribute Source Code Form that is Incompatible With\\nSecondary Licenses under the terms of this version of the License, the\\nnotice described in Exhibit B of this License must be attached.\\n\\nExhibit A - Source Code Form License Notice\\n-------------------------------------------\\n\\n This Source Code Form is subject to the terms of the Mozilla Public\\n License, v. 2.0. If a copy of the MPL was not distributed with this\\n file, You can obtain one at http://mozilla.org/MPL/2.0/.\\n\\nIf it is not possible or desirable to put the notice in a particular\\nfile, then You may include the notice in a location (such as a LICENSE\\nfile in a relevant directory) where a recipient would be likely to look\\nfor such a notice.\\n\\nYou may add additional accurate notices of copyright ownership.\\n\\nExhibit B - \\"Incompatible With Secondary Licenses\\" Notice\\n---------------------------------------------------------\\n\\n This Source Code Form is \\"Incompatible With Secondary Licenses\\", as\\n defined by the Mozilla Public License, v. 2.0.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2","version":"v1.43.4","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2@v1.43.4","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"NOTICE.txt","text":"AWS SDK for Go\\nCopyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\\nCopyright 2014-2015 Stripe, Inc.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream","version":"v1.7.16","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream@v1.7.16","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/credentials","version":"v1.19.34","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials@v1.19.34","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/internal/configsources","version":"v1.4.35","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/configsources@v1.4.35","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/internal/endpoints/v2","version":"v2.7.35","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2@v2.7.35","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/internal/v4a","version":"v1.4.36","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/v4a@v1.4.36","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding","version":"v1.13.15","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding@v1.13.15","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/checksum","version":"v1.9.28","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/checksum@v1.9.28","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/presigned-url","version":"v1.13.35","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url@v1.13.35","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/s3shared","version":"v1.19.36","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/s3shared@v1.19.36","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/s3","version":"v1.107.0","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3@v1.107.0","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/smithy-go","version":"v1.27.6","category":"Go","url":"https://pkg.go.dev/github.com/aws/smithy-go@v1.27.6","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n"},{"name":"NOTICE","text":"Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\\n"}]},{"name":"github.com/coder/websocket","version":"v1.8.15","category":"Go","url":"https://pkg.go.dev/github.com/coder/websocket@v1.8.15","license":"ISC","notices":[{"name":"LICENSE.txt","text":"Copyright (c) 2025 Coder\\n\\nPermission to use, copy, modify, and distribute this software for any\\npurpose with or without fee is hereby granted, provided that the above\\ncopyright notice and this permission notice appear in all copies.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\\n"}]},{"name":"github.com/creack/pty","version":"v1.1.24","category":"Go","url":"https://pkg.go.dev/github.com/creack/pty@v1.1.24","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2011 Keith Rarick\\n\\nPermission is hereby granted, free of charge, to any person\\nobtaining a copy of this software and associated\\ndocumentation files (the \\"Software\\"), to deal in the\\nSoftware without restriction, including without limitation\\nthe rights to use, copy, modify, merge, publish, distribute,\\nsublicense, and/or sell copies of the Software, and to\\npermit persons to whom the Software is furnished to do so,\\nsubject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall\\nbe included in all copies or substantial portions of the\\nSoftware.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY\\nKIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n"}]},{"name":"github.com/kr/fs","version":"v0.1.0","category":"Go","url":"https://pkg.go.dev/github.com/kr/fs@v0.1.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright (c) 2012 The Go Authors. All rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google Inc. nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"}]},{"name":"github.com/labstack/echo/v5","version":"v5.3.1","category":"Go","url":"https://pkg.go.dev/github.com/labstack/echo/v5@v5.3.1","license":"MIT","notices":[{"name":"LICENSE","text":"The MIT License (MIT)\\n\\nCopyright (c) 2022 LabStack\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]},{"name":"github.com/pkg/sftp","version":"v1.13.11","category":"Go","url":"https://pkg.go.dev/github.com/pkg/sftp@v1.13.11","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright (c) 2013, Dave Cheney\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\\n\\n * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"}]},{"name":"Go","version":"go1.27.1","category":"Runtime","url":"https://go.dev","license":"BSD-3-Clause","notices":[{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"go.bug.st/serial","version":"v1.8.0","category":"Go","url":"https://pkg.go.dev/go.bug.st/serial@v1.8.0","license":"BSD","notices":[{"name":"LICENSE","text":"\\nCopyright (c) 2014-2026, Cristian Maglie.\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions\\nare met:\\n\\n1. Redistributions of source code must retain the above copyright\\n notice, this list of conditions and the following disclaimer.\\n\\n2. Redistributions in binary form must reproduce the above copyright\\n notice, this list of conditions and the following disclaimer in\\n the documentation and/or other materials provided with the\\n distribution.\\n\\n3. Neither the name of the copyright holder nor the names of its\\n contributors may be used to endorse or promote products derived\\n from this software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\\nFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\\nCOPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\\nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\\nLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\nPOSSIBILITY OF SUCH DAMAGE.\\n\\n"}]},{"name":"golang.org/x/crypto","version":"v0.56.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/crypto@v0.56.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/mobile","version":"v0.0.0-20260813181013-1960c775504c","category":"Go","url":"https://pkg.go.dev/golang.org/x/mobile@v0.0.0-20260813181013-1960c775504c","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/mod","version":"v0.39.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/mod@v0.39.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/sys","version":"v0.47.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/sys@v0.47.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/term","version":"v0.45.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/term@v0.45.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/text","version":"v0.41.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/text@v0.41.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"JetBrains Mono","version":"","category":"Font","url":"https://github.com/JetBrains/JetBrainsMono","license":"OFL-1.1","notices":[{"name":"OFL.txt","text":"Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)\\n\\nThis Font Software is licensed under the SIL Open Font License, Version 1.1.\\nThis license is copied below, and is also available with a FAQ at:\\nhttps://scripts.sil.org/OFL\\n\\n\\n-----------------------------------------------------------\\nSIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\\n-----------------------------------------------------------\\n\\nPREAMBLE\\nThe goals of the Open Font License (OFL) are to stimulate worldwide\\ndevelopment of collaborative font projects, to support the font creation\\nefforts of academic and linguistic communities, and to provide a free and\\nopen framework in which fonts may be shared and improved in partnership\\nwith others.\\n\\nThe OFL allows the licensed fonts to be used, studied, modified and\\nredistributed freely as long as they are not sold by themselves. The\\nfonts, including any derivative works, can be bundled, embedded, \\nredistributed and/or sold with any software provided that any reserved\\nnames are not used by derivative works. The fonts and derivatives,\\nhowever, cannot be released under any other type of license. The\\nrequirement for fonts to remain under this license does not apply\\nto any document created using the fonts or their derivatives.\\n\\nDEFINITIONS\\n\\"Font Software\\" refers to the set of files released by the Copyright\\nHolder(s) under this license and clearly marked as such. This may\\ninclude source files, build scripts and documentation.\\n\\n\\"Reserved Font Name\\" refers to any names specified as such after the\\ncopyright statement(s).\\n\\n\\"Original Version\\" refers to the collection of Font Software components as\\ndistributed by the Copyright Holder(s).\\n\\n\\"Modified Version\\" refers to any derivative made by adding to, deleting,\\nor substituting -- in part or in whole -- any of the components of the\\nOriginal Version, by changing formats or by porting the Font Software to a\\nnew environment.\\n\\n\\"Author\\" refers to any designer, engineer, programmer, technical\\nwriter or other person who contributed to the Font Software.\\n\\nPERMISSION & CONDITIONS\\nPermission is hereby granted, free of charge, to any person obtaining\\na copy of the Font Software, to use, study, copy, merge, embed, modify,\\nredistribute, and sell modified and unmodified copies of the Font\\nSoftware, subject to the following conditions:\\n\\n1) Neither the Font Software nor any of its individual components,\\nin Original or Modified Versions, may be sold by itself.\\n\\n2) Original or Modified Versions of the Font Software may be bundled,\\nredistributed and/or sold with any software, provided that each copy\\ncontains the above copyright notice and this license. These can be\\nincluded either as stand-alone text files, human-readable headers or\\nin the appropriate machine-readable metadata fields within text or\\nbinary files as long as those fields can be easily viewed by the user.\\n\\n3) No Modified Version of the Font Software may use the Reserved Font\\nName(s) unless explicit written permission is granted by the corresponding\\nCopyright Holder. This restriction only applies to the primary font name as\\npresented to the users.\\n\\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font\\nSoftware shall not be used to promote, endorse or advertise any\\nModified Version, except to acknowledge the contribution(s) of the\\nCopyright Holder(s) and the Author(s) or with their explicit written\\npermission.\\n\\n5) The Font Software, modified or unmodified, in part or in whole,\\nmust be distributed entirely under this license, and must not be\\ndistributed under any other license. The requirement for fonts to\\nremain under this license does not apply to any document created\\nusing the Font Software.\\n\\nTERMINATION\\nThis license becomes null and void if any of the above conditions are\\nnot met.\\n\\nDISCLAIMER\\nTHE FONT SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\\nOF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE\\nCOPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\\nINCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\\nDAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\\nFROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM\\nOTHER DEALINGS IN THE FONT SOFTWARE.\\n"}]},{"name":"marked","version":"14.0.0","category":"Web","url":"https://www.npmjs.com/package/marked","license":"MIT","notices":[{"name":"LICENSE.md","text":"# License information\\n\\n## Contribution License Agreement\\n\\nIf you contribute code to this project, you are implicitly allowing your code\\nto be distributed under the MIT license. You are also implicitly verifying that\\nall code is your original work. \`\`\\n\\n## Marked\\n\\nCopyright (c) 2018+, MarkedJS (https://github.com/markedjs/)\\nCopyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n\\n## Markdown\\n\\nCopyright © 2004, John Gruber\\nhttp://daringfireball.net/\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\\n\\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\\n* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\\n\\nThis software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.\\n"}]},{"name":"monaco-editor","version":"0.56.0","category":"Web","url":"https://www.npmjs.com/package/monaco-editor","license":"MIT","notices":[{"name":"LICENSE","text":"The MIT License (MIT)\\n\\nCopyright (c) 2016 - present Microsoft Corporation\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"},{"name":"ThirdPartyNotices.txt","text":"THIRD-PARTY SOFTWARE NOTICES AND INFORMATION\\nDo Not Translate or Localize\\n\\nThis project incorporates components from the projects listed below. The original copyright notices and the licenses\\nunder which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted\\nherein, whether by implication, estoppel or otherwise.\\n\\n\\n\\n%% nodejs path library (https://github.com/nodejs/node/tree/43dd49c9782848c25e5b03448c8a0f923f13c158)\\n=========================================\\nCopyright Joyent, Inc. and other Node contributors.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a\\ncopy of this software and associated documentation files (the\\n\\"Software\\"), to deal in the Software without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Software, and to permit\\npersons to whom the Software is furnished to do so, subject to the\\nfollowing conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\\n=========================================\\nEND OF nodejs path library NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% markedjs NOTICES AND INFORMATION BEGIN HERE\\n=========================================\\nThe MIT License (MIT)\\n\\nCopyright (c) 2018+, MarkedJS (https://github.com/markedjs/)\\nCopyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n=========================================\\nEND OF markedjs NOTICES AND INFORMATION\\n\\n\\n\\n%% typescript version 4.4.4 (https://github.com/microsoft/TypeScript)\\n=========================================\\nCopyright (c) Microsoft Corporation. All rights reserved.\\n\\nApache License\\n\\nVersion 2.0, January 2004\\n\\nhttp://www.apache.org/licenses/\\n\\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n1. Definitions.\\n\\n\\"License\\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\\n\\n\\"Licensor\\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\\n\\n\\"Legal Entity\\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \\"control\\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n\\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity exercising permissions granted by this License.\\n\\n\\"Source\\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\\n\\n\\"Object\\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\\n\\n\\"Work\\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\\n\\n\\"Derivative Works\\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\\n\\n\\"Contribution\\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \\"submitted\\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n\\"Contributor\\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\\n\\n2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\\n\\n3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\\n\\n4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\\n\\nYou must give any other recipients of the Work or Derivative Works a copy of this License; and\\n\\nYou must cause any modified files to carry prominent notices stating that You changed the files; and\\n\\nYou must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\\n\\nIf the Work includes a \\"NOTICE\\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\\n\\n5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\\n\\n6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\\n\\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\\n\\n8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\\n\\n9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\\n\\nEND OF TERMS AND CONDITIONS\\n\\n\\nThe TypeScript software incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.\\n\\n\\n------------------- DefinitelyTyped --------------------\\nThis file is based on or incorporates material from the projects listed below (collectively \\"Third Party Code\\"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.\\nDefinitelyTyped\\nThis project is licensed under the MIT license. Copyrights are respective of each contributor listed at the beginning of each definition file. Provided for Informational Purposes Only\\n\\nMIT License\\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \\"\\"Software\\"\\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n--------------------------------------------------------------------------------------\\n\\n------------------- Unicode --------------------\\nUNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE\\n\\nUnicode Data Files include all data files under the directories\\nhttp://www.unicode.org/Public/, http://www.unicode.org/reports/,\\nhttp://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and\\nhttp://www.unicode.org/utility/trac/browser/.\\n\\nUnicode Data Files do not include PDF online code charts under the\\ndirectory http://www.unicode.org/Public/.\\n\\nSoftware includes any source code published in the Unicode Standard\\nor under the directories\\nhttp://www.unicode.org/Public/, http://www.unicode.org/reports/,\\nhttp://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and\\nhttp://www.unicode.org/utility/trac/browser/.\\n\\nNOTICE TO USER: Carefully read the following legal agreement.\\nBY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S\\nDATA FILES (\\"DATA FILES\\"), AND/OR SOFTWARE (\\"SOFTWARE\\"),\\nYOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE\\nTERMS AND CONDITIONS OF THIS AGREEMENT.\\nIF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE\\nTHE DATA FILES OR SOFTWARE.\\n\\nCOPYRIGHT AND PERMISSION NOTICE\\n\\nCopyright (c) 1991-2017 Unicode, Inc. All rights reserved.\\nDistributed under the Terms of Use in http://www.unicode.org/copyright.html.\\n\\nPermission is hereby granted, free of charge, to any person obtaining\\na copy of the Unicode data files and any associated documentation\\n(the \\"Data Files\\") or Unicode software and any associated documentation\\n(the \\"Software\\") to deal in the Data Files or Software\\nwithout restriction, including without limitation the rights to use,\\ncopy, modify, merge, publish, distribute, and/or sell copies of\\nthe Data Files or Software, and to permit persons to whom the Data Files\\nor Software are furnished to do so, provided that either\\n(a) this copyright and permission notice appear with all copies\\nof the Data Files or Software, or\\n(b) this copyright and permission notice appear in associated\\nDocumentation.\\n\\nTHE DATA FILES AND SOFTWARE ARE PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF\\nANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\\nNONINFRINGEMENT OF THIRD PARTY RIGHTS.\\nIN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS\\nNOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL\\nDAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\\nDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\\nPERFORMANCE OF THE DATA FILES OR SOFTWARE.\\n\\nExcept as contained in this notice, the name of a copyright holder\\nshall not be used in advertising or otherwise to promote the sale,\\nuse or other dealings in these Data Files or Software without prior\\nwritten authorization of the copyright holder.\\n-------------------------------------------------------------------------------------\\n\\n-------------------Document Object Model-----------------------------\\nDOM\\n\\nW3C License\\nThis work is being provided by the copyright holders under the following license.\\nBy obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.\\nPermission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following\\non ALL copies of the work or portions thereof, including modifications:\\n* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.\\n* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.\\n* Notice of any changes or modifications, through a copyright statement on the new code or document such as \\"This software or document includes material copied from or derived\\nfrom [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang).\\"\\nDisclaimers\\nTHIS WORK IS PROVIDED \\"AS IS,\\" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR\\nFITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.\\nCOPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.\\nThe name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission.\\nTitle to copyright in this work will at all times remain with copyright holders.\\n\\n---------\\n\\nDOM\\nCopyright © 2018 WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License: Attribution 4.0 International\\n=======================================================================\\nCreative Commons Corporation (\\"Creative Commons\\") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an \\"as-is\\" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors:\\n\\nwiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees =======================================================================\\nCreative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License (\\"Public License\\"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the \\"Licensor.\\" Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark \\"Creative Commons\\" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org.\\n\\n--------------------------------------------------------------------------------\\n\\n----------------------Web Background Synchronization------------------------------\\n\\nWeb Background Synchronization Specification\\nPortions of spec © by W3C\\n\\nW3C Community Final Specification Agreement\\nTo secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a \\"summary\\" is\\navailable. See also the related \\"W3C Community Contributor License Agreement\\".\\n1. The Purpose of this Agreement.\\nThis Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification.\\nAny other capitalized terms not specifically defined herein have the same meaning as those terms have in the \\"W3C Patent Policy\\", and if not defined there, in the \\"W3C Process Document\\".\\n2. Copyrights.\\n2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification.\\n2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number.\\n3. Patents.\\n3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification.\\n3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site.\\n4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel.\\n5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards.\\n6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement.\\n7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply:\\n7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group.\\n7.2. If I Do Not Join the Corresponding Working Group.\\n7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy.\\n7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy.\\n8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms.\\n9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED “AS IS.” The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search.\\n10. Definitions.\\n10.1. Agreement. “Agreement” means this W3C Community Final Specification Agreement.\\n10.2. Corresponding Working Group. “Corresponding Working Group” is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input.\\n10.3. Essential Claims. “Essential Claims” shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims:\\n10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and\\n10.3.2. claims which would be infringed only by:\\nportions of an implementation that are not specified in the normative portions of the Specification, or\\nenabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or\\nthe implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification.\\n10.3.3. design patents and design registrations.\\nFor purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative.\\n10.4. I, Me, or My. “I,” “me,” or “my” refers to the signatory.\\n10.5 Project. “Project” means the W3C Community Group or Business Group for which I executed this Agreement.\\n10.6. Specification. “Specification” means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification.\\n10.7. W3C Community RF Licensing Requirements. “W3C Community RF Licensing Requirements” license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that:\\n10.7.1. shall be available to all, worldwide, whether or not they are W3C Members;\\n10.7.2. shall extend to all Essential Claims owned or controlled by me;\\n10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification;\\n10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all.\\n10.7.5. may not be conditioned on payment of royalties, fees or other consideration;\\n10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation;\\n10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution;\\n10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor.\\n10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question.\\nI am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available.\\n10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls.\\n\\n-------------------------------------------------------------------------------------\\n\\n------------------- WebGL -----------------------------\\nCopyright (c) 2018 The Khronos Group Inc.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a\\ncopy of this software and/or associated documentation files (the\\n\\"Materials\\"), to deal in the Materials without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Materials, and to\\npermit persons to whom the Materials are furnished to do so, subject to\\nthe following conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Materials.\\n\\nTHE MATERIALS ARE PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\nMATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\\n------------------------------------------------------\\n\\n\\n=========================================\\nEND OF typescript NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)\\n=========================================\\nCopyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied\\nfrom or derived from HTML 5.1 W3C Working Draft (http://www.w3.org/TR/2015/WD-html51-20151008/.)\\n\\nTHIS DOCUMENT IS PROVIDED \\"AS IS,\\" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT\\nNOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF\\nTHE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY\\nPATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.\\n\\nCOPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE\\nDOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.\\n\\nThe name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents\\nwithout specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders.\\n=========================================\\nEND OF HTML 5.1 W3C Working Draft NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% JS Beautifier version 1.6.2 (https://github.com/beautify-web/js-beautify)\\n=========================================\\nThe MIT License (MIT)\\n\\nCopyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \\"Software\\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n=========================================\\nEND OF js-beautify NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% Ionic documentation version 1.2.4 (https://github.com/driftyco/ionic-site)\\n=========================================\\nCopyright Drifty Co. http://drifty.com/.\\n\\nApache License\\n\\nVersion 2.0, January 2004\\n\\nhttp://www.apache.org/licenses/\\n\\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n1. Definitions.\\n\\n\\"License\\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\\n\\n\\"Licensor\\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\\n\\n\\"Legal Entity\\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \\"control\\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n\\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity exercising permissions granted by this License.\\n\\n\\"Source\\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\\n\\n\\"Object\\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\\n\\n\\"Work\\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\\n\\n\\"Derivative Works\\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\\n\\n\\"Contribution\\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \\"submitted\\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n\\"Contributor\\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\\n\\n2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\\n\\n3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\\n\\n4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\\n\\nYou must give any other recipients of the Work or Derivative Works a copy of this License; and\\n\\nYou must cause any modified files to carry prominent notices stating that You changed the files; and\\n\\nYou must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\\n\\nIf the Work includes a \\"NOTICE\\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\\n\\n5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\\n\\n6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\\n\\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\\n\\n8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\\n\\n9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\\n\\nEND OF TERMS AND CONDITIONS\\n=========================================\\nEND OF Ionic documentation NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)\\n=========================================\\nThe MIT License (MIT)\\n\\nCopyright (c) 2015 David Owens II\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n=========================================\\nEND OF vscode-swift NOTICES AND INFORMATION\\n\\n"}]},{"name":"org.jetbrains.kotlin:kotlin-stdlib","version":"2.2.10","category":"Android","url":"https://kotlinlang.org/","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jetbrains.kotlinx:kotlinx-coroutines-android","version":"1.9.0","category":"Android","url":"https://github.com/Kotlin/kotlinx.coroutines","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm","version":"1.9.0","category":"Android","url":"https://github.com/Kotlin/kotlinx.coroutines","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jetbrains:annotations","version":"23.0.0","category":"Android","url":"https://github.com/JetBrains/java-annotations","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jspecify:jspecify","version":"1.0.0","category":"Android","url":"http://jspecify.org/","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"react","version":"19.2.8","category":"Web","url":"https://www.npmjs.com/package/react","license":"MIT","notices":[{"name":"LICENSE","text":"MIT License\\n\\nCopyright (c) Meta Platforms, Inc. and affiliates.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]},{"name":"react-dom","version":"19.2.8","category":"Web","url":"https://www.npmjs.com/package/react-dom","license":"MIT","notices":[{"name":"LICENSE","text":"MIT License\\n\\nCopyright (c) Meta Platforms, Inc. and affiliates.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]},{"name":"scheduler","version":"0.27.0","category":"Web","url":"https://www.npmjs.com/package/scheduler","license":"MIT","notices":[{"name":"LICENSE","text":"MIT License\\n\\nCopyright (c) Meta Platforms, Inc. and affiliates.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]}]`),o=t();function s(){let e=n(),[t,s]=(0,i.useState)(``),c=t.trim().toLocaleLowerCase(),l=a.filter(e=>`${e.name} ${e.version} ${e.license} ${e.category}`.toLocaleLowerCase().includes(c));return(0,o.jsxs)(`section`,{"aria-labelledby":`license-heading`,className:`mx-auto flex w-full max-w-5xl flex-col gap-4`,children:[(0,o.jsxs)(`header`,{className:`border-b border-line pb-3`,children:[(0,o.jsx)(`h2`,{id:`license-heading`,className:`text-xl font-semibold text-ink`,children:e(`section.license`)}),(0,o.jsx)(`p`,{className:`mt-2 text-sm text-ink-muted`,children:e(`license.description`)})]}),(0,o.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm text-ink-muted`,children:[e(`license.search`),(0,o.jsx)(`input`,{type:`search`,className:r,value:t,onChange:e=>s(e.target.value)})]}),(0,o.jsx)(`p`,{role:`status`,className:`text-xs text-ink-muted`,children:e(`license.count`,{count:l.length})}),l.length===0?(0,o.jsx)(`p`,{className:`text-sm text-ink-muted`,children:e(`license.noMatches`)}):null,(0,o.jsx)(`ul`,{className:`divide-y divide-line overflow-hidden rounded border border-line bg-card`,children:l.map(e=>(0,o.jsx)(`li`,{children:(0,o.jsxs)(`details`,{className:`group`,children:[(0,o.jsxs)(`summary`,{className:`cursor-pointer px-4 py-3 focus-visible:outline-2 focus-visible:outline-accent`,children:[(0,o.jsx)(`span`,{className:`ml-2 break-words text-sm font-medium text-ink`,children:e.name}),(0,o.jsx)(`span`,{className:`ml-2 text-xs text-ink-muted`,children:e.version}),(0,o.jsx)(`span`,{className:`ml-3 text-xs text-ink-muted`,children:e.license})]}),(0,o.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line p-4`,children:[(0,o.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`self-start break-all text-sm text-accent underline`,children:e.url}),e.notices.map(e=>(0,o.jsxs)(`section`,{children:[(0,o.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-ink-muted`,children:e.name}),(0,o.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap break-words rounded bg-control p-3 text-xs text-ink`,tabIndex:0,children:e.text})]},e.name))]})]})},`${e.category}:${e.name}`))})]})}export{s as LicensePage}; \ No newline at end of file +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{_ as n,i as r}from"./form-zbLY2cuV.js";var i=e(),a=JSON.parse(`[{"name":"sshc","version":"","category":"Application","url":"https://github.com/aida0710/sshc","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"@types/trusted-types","version":"2.0.7","category":"Web","url":"https://www.npmjs.com/package/@types/trusted-types","license":"MIT","notices":[{"name":"LICENSE","text":" MIT License\\n\\n Copyright (c) Microsoft Corporation.\\n\\n Permission is hereby granted, free of charge, to any person obtaining a copy\\n of this software and associated documentation files (the \\"Software\\"), to deal\\n in the Software without restriction, including without limitation the rights\\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\n copies of the Software, and to permit persons to whom the Software is\\n furnished to do so, subject to the following conditions:\\n\\n The above copyright notice and this permission notice shall be included in all\\n copies or substantial portions of the Software.\\n\\n THE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\n SOFTWARE\\n"}]},{"name":"@xterm/addon-fit","version":"0.11.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/addon-fit","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"@xterm/addon-search","version":"0.16.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/addon-search","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"@xterm/addon-webgl","version":"0.19.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/addon-webgl","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2018, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"@xterm/xterm","version":"6.0.0","category":"Web","url":"https://www.npmjs.com/package/@xterm/xterm","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)\\nCopyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)\\nCopyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n"}]},{"name":"androidx.activity:activity","version":"1.13.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/activity#1.13.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/activity/activity/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.annotation:annotation-experimental","version":"1.4.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/annotation#1.4.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.annotation:annotation-jvm","version":"1.9.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/annotation#1.9.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/annotation/annotation/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.arch.core:core-common","version":"2.2.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.arch.core:core-runtime","version":"2.2.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.collection:collection-jvm","version":"1.4.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/collection#1.4.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.compose.runtime:runtime-annotation-android","version":"1.9.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.9.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/compose/runtime/runtime-annotation/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.concurrent:concurrent-futures","version":"1.1.0","category":"Android","url":"https://developer.android.com/topic/libraries/architecture/index.html","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.core:core","version":"1.18.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/core#1.18.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/core/core/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.core:core-ktx","version":"1.18.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/core#1.18.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/core/core-ktx/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.core:core-viewtree","version":"1.0.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/core#1.0.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/core/core-viewtree/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.interpolator:interpolator","version":"1.0.0","category":"Android","url":"http://developer.android.com/tools/extras/support-library.html","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-common","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-livedata-core","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-runtime","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-viewmodel","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.lifecycle:lifecycle-viewmodel-savedstate","version":"2.6.2","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.2","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.navigationevent:navigationevent-android","version":"1.0.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/navigationevent/navigationevent/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.profileinstaller:profileinstaller","version":"1.4.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.4.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"META-INF/androidx/profileinstaller/profileinstaller/LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n"}]},{"name":"androidx.savedstate:savedstate","version":"1.2.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.startup:startup-runtime","version":"1.1.1","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/startup#1.1.1","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.tracing:tracing","version":"1.2.0","category":"Android","url":"https://developer.android.com/jetpack/androidx/releases/tracing#1.2.0","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"androidx.versionedparcelable:versionedparcelable","version":"1.1.1","category":"Android","url":"http://developer.android.com/tools/extras/support-library.html","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"com.google.guava:listenablefuture","version":"1.0","category":"Android","url":"https://developer.android.com/jetpack/androidx","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"Devicon","version":"7330accdbc47","category":"Icons","url":"https://github.com/devicons/devicon","license":"MIT","notices":[{"name":"LICENSE","text":"The MIT License (MIT)\\n\\nCopyright (c) 2015 konpa\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy of\\nthis software and associated documentation files (the \\"Software\\"), to deal in\\nthe Software without restriction, including without limitation the rights to\\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\nthe Software, and to permit persons to whom the Software is furnished to do so,\\nsubject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n"}]},{"name":"dompurify","version":"3.4.14","category":"Web","url":"https://www.npmjs.com/package/dompurify","license":"(MPL-2.0 OR Apache-2.0)","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"LICENSE-MPL","text":"Mozilla Public License Version 2.0\\n==================================\\n\\n1. Definitions\\n--------------\\n\\n1.1. \\"Contributor\\"\\n means each individual or legal entity that creates, contributes to\\n the creation of, or owns Covered Software.\\n\\n1.2. \\"Contributor Version\\"\\n means the combination of the Contributions of others (if any) used\\n by a Contributor and that particular Contributor's Contribution.\\n\\n1.3. \\"Contribution\\"\\n means Covered Software of a particular Contributor.\\n\\n1.4. \\"Covered Software\\"\\n means Source Code Form to which the initial Contributor has attached\\n the notice in Exhibit A, the Executable Form of such Source Code\\n Form, and Modifications of such Source Code Form, in each case\\n including portions thereof.\\n\\n1.5. \\"Incompatible With Secondary Licenses\\"\\n means\\n\\n (a) that the initial Contributor has attached the notice described\\n in Exhibit B to the Covered Software; or\\n\\n (b) that the Covered Software was made available under the terms of\\n version 1.1 or earlier of the License, but not also under the\\n terms of a Secondary License.\\n\\n1.6. \\"Executable Form\\"\\n means any form of the work other than Source Code Form.\\n\\n1.7. \\"Larger Work\\"\\n means a work that combines Covered Software with other material, in \\n a separate file or files, that is not Covered Software.\\n\\n1.8. \\"License\\"\\n means this document.\\n\\n1.9. \\"Licensable\\"\\n means having the right to grant, to the maximum extent possible,\\n whether at the time of the initial grant or subsequently, any and\\n all of the rights conveyed by this License.\\n\\n1.10. \\"Modifications\\"\\n means any of the following:\\n\\n (a) any file in Source Code Form that results from an addition to,\\n deletion from, or modification of the contents of Covered\\n Software; or\\n\\n (b) any new file in Source Code Form that contains any Covered\\n Software.\\n\\n1.11. \\"Patent Claims\\" of a Contributor\\n means any patent claim(s), including without limitation, method,\\n process, and apparatus claims, in any patent Licensable by such\\n Contributor that would be infringed, but for the grant of the\\n License, by the making, using, selling, offering for sale, having\\n made, import, or transfer of either its Contributions or its\\n Contributor Version.\\n\\n1.12. \\"Secondary License\\"\\n means either the GNU General Public License, Version 2.0, the GNU\\n Lesser General Public License, Version 2.1, the GNU Affero General\\n Public License, Version 3.0, or any later versions of those\\n licenses.\\n\\n1.13. \\"Source Code Form\\"\\n means the form of the work preferred for making modifications.\\n\\n1.14. \\"You\\" (or \\"Your\\")\\n means an individual or a legal entity exercising rights under this\\n License. For legal entities, \\"You\\" includes any entity that\\n controls, is controlled by, or is under common control with You. For\\n purposes of this definition, \\"control\\" means (a) the power, direct\\n or indirect, to cause the direction or management of such entity,\\n whether by contract or otherwise, or (b) ownership of more than\\n fifty percent (50%) of the outstanding shares or beneficial\\n ownership of such entity.\\n\\n2. License Grants and Conditions\\n--------------------------------\\n\\n2.1. Grants\\n\\nEach Contributor hereby grants You a world-wide, royalty-free,\\nnon-exclusive license:\\n\\n(a) under intellectual property rights (other than patent or trademark)\\n Licensable by such Contributor to use, reproduce, make available,\\n modify, display, perform, distribute, and otherwise exploit its\\n Contributions, either on an unmodified basis, with Modifications, or\\n as part of a Larger Work; and\\n\\n(b) under Patent Claims of such Contributor to make, use, sell, offer\\n for sale, have made, import, and otherwise transfer either its\\n Contributions or its Contributor Version.\\n\\n2.2. Effective Date\\n\\nThe licenses granted in Section 2.1 with respect to any Contribution\\nbecome effective for each Contribution on the date the Contributor first\\ndistributes such Contribution.\\n\\n2.3. Limitations on Grant Scope\\n\\nThe licenses granted in this Section 2 are the only rights granted under\\nthis License. No additional rights or licenses will be implied from the\\ndistribution or licensing of Covered Software under this License.\\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\\nContributor:\\n\\n(a) for any code that a Contributor has removed from Covered Software;\\n or\\n\\n(b) for infringements caused by: (i) Your and any other third party's\\n modifications of Covered Software, or (ii) the combination of its\\n Contributions with other software (except as part of its Contributor\\n Version); or\\n\\n(c) under Patent Claims infringed by Covered Software in the absence of\\n its Contributions.\\n\\nThis License does not grant any rights in the trademarks, service marks,\\nor logos of any Contributor (except as may be necessary to comply with\\nthe notice requirements in Section 3.4).\\n\\n2.4. Subsequent Licenses\\n\\nNo Contributor makes additional grants as a result of Your choice to\\ndistribute the Covered Software under a subsequent version of this\\nLicense (see Section 10.2) or under the terms of a Secondary License (if\\npermitted under the terms of Section 3.3).\\n\\n2.5. Representation\\n\\nEach Contributor represents that the Contributor believes its\\nContributions are its original creation(s) or it has sufficient rights\\nto grant the rights to its Contributions conveyed by this License.\\n\\n2.6. Fair Use\\n\\nThis License is not intended to limit any rights You have under\\napplicable copyright doctrines of fair use, fair dealing, or other\\nequivalents.\\n\\n2.7. Conditions\\n\\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\\nin Section 2.1.\\n\\n3. Responsibilities\\n-------------------\\n\\n3.1. Distribution of Source Form\\n\\nAll distribution of Covered Software in Source Code Form, including any\\nModifications that You create or to which You contribute, must be under\\nthe terms of this License. You must inform recipients that the Source\\nCode Form of the Covered Software is governed by the terms of this\\nLicense, and how they can obtain a copy of this License. You may not\\nattempt to alter or restrict the recipients' rights in the Source Code\\nForm.\\n\\n3.2. Distribution of Executable Form\\n\\nIf You distribute Covered Software in Executable Form then:\\n\\n(a) such Covered Software must also be made available in Source Code\\n Form, as described in Section 3.1, and You must inform recipients of\\n the Executable Form how they can obtain a copy of such Source Code\\n Form by reasonable means in a timely manner, at a charge no more\\n than the cost of distribution to the recipient; and\\n\\n(b) You may distribute such Executable Form under the terms of this\\n License, or sublicense it under different terms, provided that the\\n license for the Executable Form does not attempt to limit or alter\\n the recipients' rights in the Source Code Form under this License.\\n\\n3.3. Distribution of a Larger Work\\n\\nYou may create and distribute a Larger Work under terms of Your choice,\\nprovided that You also comply with the requirements of this License for\\nthe Covered Software. If the Larger Work is a combination of Covered\\nSoftware with a work governed by one or more Secondary Licenses, and the\\nCovered Software is not Incompatible With Secondary Licenses, this\\nLicense permits You to additionally distribute such Covered Software\\nunder the terms of such Secondary License(s), so that the recipient of\\nthe Larger Work may, at their option, further distribute the Covered\\nSoftware under the terms of either this License or such Secondary\\nLicense(s).\\n\\n3.4. Notices\\n\\nYou may not remove or alter the substance of any license notices\\n(including copyright notices, patent notices, disclaimers of warranty,\\nor limitations of liability) contained within the Source Code Form of\\nthe Covered Software, except that You may alter any license notices to\\nthe extent required to remedy known factual inaccuracies.\\n\\n3.5. Application of Additional Terms\\n\\nYou may choose to offer, and to charge a fee for, warranty, support,\\nindemnity or liability obligations to one or more recipients of Covered\\nSoftware. However, You may do so only on Your own behalf, and not on\\nbehalf of any Contributor. You must make it absolutely clear that any\\nsuch warranty, support, indemnity, or liability obligation is offered by\\nYou alone, and You hereby agree to indemnify every Contributor for any\\nliability incurred by such Contributor as a result of warranty, support,\\nindemnity or liability terms You offer. You may include additional\\ndisclaimers of warranty and limitations of liability specific to any\\njurisdiction.\\n\\n4. Inability to Comply Due to Statute or Regulation\\n---------------------------------------------------\\n\\nIf it is impossible for You to comply with any of the terms of this\\nLicense with respect to some or all of the Covered Software due to\\nstatute, judicial order, or regulation then You must: (a) comply with\\nthe terms of this License to the maximum extent possible; and (b)\\ndescribe the limitations and the code they affect. Such description must\\nbe placed in a text file included with all distributions of the Covered\\nSoftware under this License. Except to the extent prohibited by statute\\nor regulation, such description must be sufficiently detailed for a\\nrecipient of ordinary skill to be able to understand it.\\n\\n5. Termination\\n--------------\\n\\n5.1. The rights granted under this License will terminate automatically\\nif You fail to comply with any of its terms. However, if You become\\ncompliant, then the rights granted under this License from a particular\\nContributor are reinstated (a) provisionally, unless and until such\\nContributor explicitly and finally terminates Your grants, and (b) on an\\nongoing basis, if such Contributor fails to notify You of the\\nnon-compliance by some reasonable means prior to 60 days after You have\\ncome back into compliance. Moreover, Your grants from a particular\\nContributor are reinstated on an ongoing basis if such Contributor\\nnotifies You of the non-compliance by some reasonable means, this is the\\nfirst time You have received notice of non-compliance with this License\\nfrom such Contributor, and You become compliant prior to 30 days after\\nYour receipt of the notice.\\n\\n5.2. If You initiate litigation against any entity by asserting a patent\\ninfringement claim (excluding declaratory judgment actions,\\ncounter-claims, and cross-claims) alleging that a Contributor Version\\ndirectly or indirectly infringes any patent, then the rights granted to\\nYou by any and all Contributors for the Covered Software under Section\\n2.1 of this License shall terminate.\\n\\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\\nend user license agreements (excluding distributors and resellers) which\\nhave been validly granted by You or Your distributors under this License\\nprior to termination shall survive termination.\\n\\n************************************************************************\\n* *\\n* 6. Disclaimer of Warranty *\\n* ------------------------- *\\n* *\\n* Covered Software is provided under this License on an \\"as is\\" *\\n* basis, without warranty of any kind, either expressed, implied, or *\\n* statutory, including, without limitation, warranties that the *\\n* Covered Software is free of defects, merchantable, fit for a *\\n* particular purpose or non-infringing. The entire risk as to the *\\n* quality and performance of the Covered Software is with You. *\\n* Should any Covered Software prove defective in any respect, You *\\n* (not any Contributor) assume the cost of any necessary servicing, *\\n* repair, or correction. This disclaimer of warranty constitutes an *\\n* essential part of this License. No use of any Covered Software is *\\n* authorized under this License except under this disclaimer. *\\n* *\\n************************************************************************\\n\\n************************************************************************\\n* *\\n* 7. Limitation of Liability *\\n* -------------------------- *\\n* *\\n* Under no circumstances and under no legal theory, whether tort *\\n* (including negligence), contract, or otherwise, shall any *\\n* Contributor, or anyone who distributes Covered Software as *\\n* permitted above, be liable to You for any direct, indirect, *\\n* special, incidental, or consequential damages of any character *\\n* including, without limitation, damages for lost profits, loss of *\\n* goodwill, work stoppage, computer failure or malfunction, or any *\\n* and all other commercial damages or losses, even if such party *\\n* shall have been informed of the possibility of such damages. This *\\n* limitation of liability shall not apply to liability for death or *\\n* personal injury resulting from such party's negligence to the *\\n* extent applicable law prohibits such limitation. Some *\\n* jurisdictions do not allow the exclusion or limitation of *\\n* incidental or consequential damages, so this exclusion and *\\n* limitation may not apply to You. *\\n* *\\n************************************************************************\\n\\n8. Litigation\\n-------------\\n\\nAny litigation relating to this License may be brought only in the\\ncourts of a jurisdiction where the defendant maintains its principal\\nplace of business and such litigation shall be governed by laws of that\\njurisdiction, without reference to its conflict-of-law provisions.\\nNothing in this Section shall prevent a party's ability to bring\\ncross-claims or counter-claims.\\n\\n9. Miscellaneous\\n----------------\\n\\nThis License represents the complete agreement concerning the subject\\nmatter hereof. If any provision of this License is held to be\\nunenforceable, such provision shall be reformed only to the extent\\nnecessary to make it enforceable. Any law or regulation which provides\\nthat the language of a contract shall be construed against the drafter\\nshall not be used to construe this License against a Contributor.\\n\\n10. Versions of the License\\n---------------------------\\n\\n10.1. New Versions\\n\\nMozilla Foundation is the license steward. Except as provided in Section\\n10.3, no one other than the license steward has the right to modify or\\npublish new versions of this License. Each version will be given a\\ndistinguishing version number.\\n\\n10.2. Effect of New Versions\\n\\nYou may distribute the Covered Software under the terms of the version\\nof the License under which You originally received the Covered Software,\\nor under the terms of any subsequent version published by the license\\nsteward.\\n\\n10.3. Modified Versions\\n\\nIf you create software not governed by this License, and you want to\\ncreate a new license for such software, you may create and use a\\nmodified version of this License if you rename the license and remove\\nany references to the name of the license steward (except to note that\\nsuch modified license differs from this License).\\n\\n10.4. Distributing Source Code Form that is Incompatible With Secondary\\nLicenses\\n\\nIf You choose to distribute Source Code Form that is Incompatible With\\nSecondary Licenses under the terms of this version of the License, the\\nnotice described in Exhibit B of this License must be attached.\\n\\nExhibit A - Source Code Form License Notice\\n-------------------------------------------\\n\\n This Source Code Form is subject to the terms of the Mozilla Public\\n License, v. 2.0. If a copy of the MPL was not distributed with this\\n file, You can obtain one at http://mozilla.org/MPL/2.0/.\\n\\nIf it is not possible or desirable to put the notice in a particular\\nfile, then You may include the notice in a location (such as a LICENSE\\nfile in a relevant directory) where a recipient would be likely to look\\nfor such a notice.\\n\\nYou may add additional accurate notices of copyright ownership.\\n\\nExhibit B - \\"Incompatible With Secondary Licenses\\" Notice\\n---------------------------------------------------------\\n\\n This Source Code Form is \\"Incompatible With Secondary Licenses\\", as\\n defined by the Mozilla Public License, v. 2.0.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2","version":"v1.43.4","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2@v1.43.4","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"},{"name":"NOTICE.txt","text":"AWS SDK for Go\\nCopyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\\nCopyright 2014-2015 Stripe, Inc.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream","version":"v1.7.16","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream@v1.7.16","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/credentials","version":"v1.19.34","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials@v1.19.34","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/internal/configsources","version":"v1.4.35","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/configsources@v1.4.35","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/internal/endpoints/v2","version":"v2.7.35","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2@v2.7.35","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/internal/v4a","version":"v1.4.36","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/v4a@v1.4.36","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding","version":"v1.13.15","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding@v1.13.15","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/checksum","version":"v1.9.28","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/checksum@v1.9.28","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/presigned-url","version":"v1.13.35","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url@v1.13.35","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/internal/s3shared","version":"v1.19.36","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/s3shared@v1.19.36","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/aws-sdk-go-v2/service/s3","version":"v1.107.0","category":"Go","url":"https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3@v1.107.0","license":"Apache-2.0","notices":[{"name":"LICENSE.txt","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright [yyyy] [name of copyright owner]\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"github.com/aws/smithy-go","version":"v1.27.6","category":"Go","url":"https://pkg.go.dev/github.com/aws/smithy-go@v1.27.6","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n"},{"name":"NOTICE","text":"Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\\n"}]},{"name":"github.com/coder/websocket","version":"v1.8.15","category":"Go","url":"https://pkg.go.dev/github.com/coder/websocket@v1.8.15","license":"ISC","notices":[{"name":"LICENSE.txt","text":"Copyright (c) 2025 Coder\\n\\nPermission to use, copy, modify, and distribute this software for any\\npurpose with or without fee is hereby granted, provided that the above\\ncopyright notice and this permission notice appear in all copies.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\\n"}]},{"name":"github.com/creack/pty","version":"v1.1.24","category":"Go","url":"https://pkg.go.dev/github.com/creack/pty@v1.1.24","license":"MIT","notices":[{"name":"LICENSE","text":"Copyright (c) 2011 Keith Rarick\\n\\nPermission is hereby granted, free of charge, to any person\\nobtaining a copy of this software and associated\\ndocumentation files (the \\"Software\\"), to deal in the\\nSoftware without restriction, including without limitation\\nthe rights to use, copy, modify, merge, publish, distribute,\\nsublicense, and/or sell copies of the Software, and to\\npermit persons to whom the Software is furnished to do so,\\nsubject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall\\nbe included in all copies or substantial portions of the\\nSoftware.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY\\nKIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n"}]},{"name":"github.com/kr/fs","version":"v0.1.0","category":"Go","url":"https://pkg.go.dev/github.com/kr/fs@v0.1.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright (c) 2012 The Go Authors. All rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google Inc. nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"}]},{"name":"github.com/labstack/echo/v5","version":"v5.3.1","category":"Go","url":"https://pkg.go.dev/github.com/labstack/echo/v5@v5.3.1","license":"MIT","notices":[{"name":"LICENSE","text":"The MIT License (MIT)\\n\\nCopyright (c) 2022 LabStack\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]},{"name":"github.com/pkg/sftp","version":"v1.13.11","category":"Go","url":"https://pkg.go.dev/github.com/pkg/sftp@v1.13.11","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright (c) 2013, Dave Cheney\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\\n\\n * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"}]},{"name":"Go","version":"go1.27.1","category":"Runtime","url":"https://go.dev","license":"BSD-3-Clause","notices":[{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"go.bug.st/serial","version":"v1.8.0","category":"Go","url":"https://pkg.go.dev/go.bug.st/serial@v1.8.0","license":"BSD","notices":[{"name":"LICENSE","text":"\\nCopyright (c) 2014-2026, Cristian Maglie.\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions\\nare met:\\n\\n1. Redistributions of source code must retain the above copyright\\n notice, this list of conditions and the following disclaimer.\\n\\n2. Redistributions in binary form must reproduce the above copyright\\n notice, this list of conditions and the following disclaimer in\\n the documentation and/or other materials provided with the\\n distribution.\\n\\n3. Neither the name of the copyright holder nor the names of its\\n contributors may be used to endorse or promote products derived\\n from this software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\\nFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\\nCOPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\\nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\\nLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\nPOSSIBILITY OF SUCH DAMAGE.\\n\\n"}]},{"name":"golang.org/x/crypto","version":"v0.56.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/crypto@v0.56.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/mobile","version":"v0.0.0-20260813181013-1960c775504c","category":"Go","url":"https://pkg.go.dev/golang.org/x/mobile@v0.0.0-20260813181013-1960c775504c","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/mod","version":"v0.39.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/mod@v0.39.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/sys","version":"v0.47.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/sys@v0.47.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/term","version":"v0.45.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/term@v0.45.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"golang.org/x/text","version":"v0.41.0","category":"Go","url":"https://pkg.go.dev/golang.org/x/text@v0.41.0","license":"BSD","notices":[{"name":"LICENSE","text":"Copyright 2009 The Go Authors.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are\\nmet:\\n\\n * Redistributions of source code must retain the above copyright\\nnotice, this list of conditions and the following disclaimer.\\n * Redistributions in binary form must reproduce the above\\ncopyright notice, this list of conditions and the following disclaimer\\nin the documentation and/or other materials provided with the\\ndistribution.\\n * Neither the name of Google LLC nor the names of its\\ncontributors may be used to endorse or promote products derived from\\nthis software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\\n\\"AS IS\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n"},{"name":"PATENTS","text":"Additional IP Rights Grant (Patents)\\n\\n\\"This implementation\\" means the copyrightable works distributed by\\nGoogle as part of the Go project.\\n\\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\\nno-charge, royalty-free, irrevocable (except as stated in this section)\\npatent license to make, have made, use, offer to sell, sell, import,\\ntransfer and otherwise run, modify and propagate the contents of this\\nimplementation of Go, where such license applies only to those patent\\nclaims, both currently owned or controlled by Google and acquired in\\nthe future, licensable by Google that are necessarily infringed by this\\nimplementation of Go. This grant does not include claims that would be\\ninfringed only as a consequence of further modification of this\\nimplementation. If you or your agent or exclusive licensee institute or\\norder or agree to the institution of patent litigation against any\\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\\nthat this implementation of Go or any code incorporated within this\\nimplementation of Go constitutes direct or contributory patent\\ninfringement, or inducement of patent infringement, then any patent\\nrights granted to you under this License for this implementation of Go\\nshall terminate as of the date such litigation is filed.\\n"}]},{"name":"JetBrains Mono","version":"","category":"Font","url":"https://github.com/JetBrains/JetBrainsMono","license":"OFL-1.1","notices":[{"name":"OFL.txt","text":"Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)\\n\\nThis Font Software is licensed under the SIL Open Font License, Version 1.1.\\nThis license is copied below, and is also available with a FAQ at:\\nhttps://scripts.sil.org/OFL\\n\\n\\n-----------------------------------------------------------\\nSIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\\n-----------------------------------------------------------\\n\\nPREAMBLE\\nThe goals of the Open Font License (OFL) are to stimulate worldwide\\ndevelopment of collaborative font projects, to support the font creation\\nefforts of academic and linguistic communities, and to provide a free and\\nopen framework in which fonts may be shared and improved in partnership\\nwith others.\\n\\nThe OFL allows the licensed fonts to be used, studied, modified and\\nredistributed freely as long as they are not sold by themselves. The\\nfonts, including any derivative works, can be bundled, embedded, \\nredistributed and/or sold with any software provided that any reserved\\nnames are not used by derivative works. The fonts and derivatives,\\nhowever, cannot be released under any other type of license. The\\nrequirement for fonts to remain under this license does not apply\\nto any document created using the fonts or their derivatives.\\n\\nDEFINITIONS\\n\\"Font Software\\" refers to the set of files released by the Copyright\\nHolder(s) under this license and clearly marked as such. This may\\ninclude source files, build scripts and documentation.\\n\\n\\"Reserved Font Name\\" refers to any names specified as such after the\\ncopyright statement(s).\\n\\n\\"Original Version\\" refers to the collection of Font Software components as\\ndistributed by the Copyright Holder(s).\\n\\n\\"Modified Version\\" refers to any derivative made by adding to, deleting,\\nor substituting -- in part or in whole -- any of the components of the\\nOriginal Version, by changing formats or by porting the Font Software to a\\nnew environment.\\n\\n\\"Author\\" refers to any designer, engineer, programmer, technical\\nwriter or other person who contributed to the Font Software.\\n\\nPERMISSION & CONDITIONS\\nPermission is hereby granted, free of charge, to any person obtaining\\na copy of the Font Software, to use, study, copy, merge, embed, modify,\\nredistribute, and sell modified and unmodified copies of the Font\\nSoftware, subject to the following conditions:\\n\\n1) Neither the Font Software nor any of its individual components,\\nin Original or Modified Versions, may be sold by itself.\\n\\n2) Original or Modified Versions of the Font Software may be bundled,\\nredistributed and/or sold with any software, provided that each copy\\ncontains the above copyright notice and this license. These can be\\nincluded either as stand-alone text files, human-readable headers or\\nin the appropriate machine-readable metadata fields within text or\\nbinary files as long as those fields can be easily viewed by the user.\\n\\n3) No Modified Version of the Font Software may use the Reserved Font\\nName(s) unless explicit written permission is granted by the corresponding\\nCopyright Holder. This restriction only applies to the primary font name as\\npresented to the users.\\n\\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font\\nSoftware shall not be used to promote, endorse or advertise any\\nModified Version, except to acknowledge the contribution(s) of the\\nCopyright Holder(s) and the Author(s) or with their explicit written\\npermission.\\n\\n5) The Font Software, modified or unmodified, in part or in whole,\\nmust be distributed entirely under this license, and must not be\\ndistributed under any other license. The requirement for fonts to\\nremain under this license does not apply to any document created\\nusing the Font Software.\\n\\nTERMINATION\\nThis license becomes null and void if any of the above conditions are\\nnot met.\\n\\nDISCLAIMER\\nTHE FONT SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\\nOF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE\\nCOPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\\nINCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\\nDAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\\nFROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM\\nOTHER DEALINGS IN THE FONT SOFTWARE.\\n"}]},{"name":"marked","version":"14.0.0","category":"Web","url":"https://www.npmjs.com/package/marked","license":"MIT","notices":[{"name":"LICENSE.md","text":"# License information\\n\\n## Contribution License Agreement\\n\\nIf you contribute code to this project, you are implicitly allowing your code\\nto be distributed under the MIT license. You are also implicitly verifying that\\nall code is your original work. \`\`\\n\\n## Marked\\n\\nCopyright (c) 2018+, MarkedJS (https://github.com/markedjs/)\\nCopyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n\\n## Markdown\\n\\nCopyright © 2004, John Gruber\\nhttp://daringfireball.net/\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\\n\\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\\n* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\\n\\nThis software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.\\n"}]},{"name":"monaco-editor","version":"0.56.0","category":"Web","url":"https://www.npmjs.com/package/monaco-editor","license":"MIT","notices":[{"name":"LICENSE","text":"The MIT License (MIT)\\n\\nCopyright (c) 2016 - present Microsoft Corporation\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"},{"name":"ThirdPartyNotices.txt","text":"THIRD-PARTY SOFTWARE NOTICES AND INFORMATION\\nDo Not Translate or Localize\\n\\nThis project incorporates components from the projects listed below. The original copyright notices and the licenses\\nunder which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted\\nherein, whether by implication, estoppel or otherwise.\\n\\n\\n\\n%% nodejs path library (https://github.com/nodejs/node/tree/43dd49c9782848c25e5b03448c8a0f923f13c158)\\n=========================================\\nCopyright Joyent, Inc. and other Node contributors.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a\\ncopy of this software and associated documentation files (the\\n\\"Software\\"), to deal in the Software without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Software, and to permit\\npersons to whom the Software is furnished to do so, subject to the\\nfollowing conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\\n=========================================\\nEND OF nodejs path library NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% markedjs NOTICES AND INFORMATION BEGIN HERE\\n=========================================\\nThe MIT License (MIT)\\n\\nCopyright (c) 2018+, MarkedJS (https://github.com/markedjs/)\\nCopyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in\\nall copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\\nTHE SOFTWARE.\\n=========================================\\nEND OF markedjs NOTICES AND INFORMATION\\n\\n\\n\\n%% typescript version 4.4.4 (https://github.com/microsoft/TypeScript)\\n=========================================\\nCopyright (c) Microsoft Corporation. All rights reserved.\\n\\nApache License\\n\\nVersion 2.0, January 2004\\n\\nhttp://www.apache.org/licenses/\\n\\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n1. Definitions.\\n\\n\\"License\\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\\n\\n\\"Licensor\\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\\n\\n\\"Legal Entity\\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \\"control\\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n\\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity exercising permissions granted by this License.\\n\\n\\"Source\\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\\n\\n\\"Object\\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\\n\\n\\"Work\\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\\n\\n\\"Derivative Works\\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\\n\\n\\"Contribution\\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \\"submitted\\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n\\"Contributor\\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\\n\\n2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\\n\\n3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\\n\\n4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\\n\\nYou must give any other recipients of the Work or Derivative Works a copy of this License; and\\n\\nYou must cause any modified files to carry prominent notices stating that You changed the files; and\\n\\nYou must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\\n\\nIf the Work includes a \\"NOTICE\\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\\n\\n5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\\n\\n6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\\n\\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\\n\\n8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\\n\\n9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\\n\\nEND OF TERMS AND CONDITIONS\\n\\n\\nThe TypeScript software incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.\\n\\n\\n------------------- DefinitelyTyped --------------------\\nThis file is based on or incorporates material from the projects listed below (collectively \\"Third Party Code\\"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.\\nDefinitelyTyped\\nThis project is licensed under the MIT license. Copyrights are respective of each contributor listed at the beginning of each definition file. Provided for Informational Purposes Only\\n\\nMIT License\\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \\"\\"Software\\"\\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n--------------------------------------------------------------------------------------\\n\\n------------------- Unicode --------------------\\nUNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE\\n\\nUnicode Data Files include all data files under the directories\\nhttp://www.unicode.org/Public/, http://www.unicode.org/reports/,\\nhttp://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and\\nhttp://www.unicode.org/utility/trac/browser/.\\n\\nUnicode Data Files do not include PDF online code charts under the\\ndirectory http://www.unicode.org/Public/.\\n\\nSoftware includes any source code published in the Unicode Standard\\nor under the directories\\nhttp://www.unicode.org/Public/, http://www.unicode.org/reports/,\\nhttp://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and\\nhttp://www.unicode.org/utility/trac/browser/.\\n\\nNOTICE TO USER: Carefully read the following legal agreement.\\nBY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S\\nDATA FILES (\\"DATA FILES\\"), AND/OR SOFTWARE (\\"SOFTWARE\\"),\\nYOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE\\nTERMS AND CONDITIONS OF THIS AGREEMENT.\\nIF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE\\nTHE DATA FILES OR SOFTWARE.\\n\\nCOPYRIGHT AND PERMISSION NOTICE\\n\\nCopyright (c) 1991-2017 Unicode, Inc. All rights reserved.\\nDistributed under the Terms of Use in http://www.unicode.org/copyright.html.\\n\\nPermission is hereby granted, free of charge, to any person obtaining\\na copy of the Unicode data files and any associated documentation\\n(the \\"Data Files\\") or Unicode software and any associated documentation\\n(the \\"Software\\") to deal in the Data Files or Software\\nwithout restriction, including without limitation the rights to use,\\ncopy, modify, merge, publish, distribute, and/or sell copies of\\nthe Data Files or Software, and to permit persons to whom the Data Files\\nor Software are furnished to do so, provided that either\\n(a) this copyright and permission notice appear with all copies\\nof the Data Files or Software, or\\n(b) this copyright and permission notice appear in associated\\nDocumentation.\\n\\nTHE DATA FILES AND SOFTWARE ARE PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF\\nANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\\nNONINFRINGEMENT OF THIRD PARTY RIGHTS.\\nIN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS\\nNOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL\\nDAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\\nDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\\nPERFORMANCE OF THE DATA FILES OR SOFTWARE.\\n\\nExcept as contained in this notice, the name of a copyright holder\\nshall not be used in advertising or otherwise to promote the sale,\\nuse or other dealings in these Data Files or Software without prior\\nwritten authorization of the copyright holder.\\n-------------------------------------------------------------------------------------\\n\\n-------------------Document Object Model-----------------------------\\nDOM\\n\\nW3C License\\nThis work is being provided by the copyright holders under the following license.\\nBy obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.\\nPermission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following\\non ALL copies of the work or portions thereof, including modifications:\\n* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.\\n* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.\\n* Notice of any changes or modifications, through a copyright statement on the new code or document such as \\"This software or document includes material copied from or derived\\nfrom [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang).\\"\\nDisclaimers\\nTHIS WORK IS PROVIDED \\"AS IS,\\" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR\\nFITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.\\nCOPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.\\nThe name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission.\\nTitle to copyright in this work will at all times remain with copyright holders.\\n\\n---------\\n\\nDOM\\nCopyright © 2018 WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License: Attribution 4.0 International\\n=======================================================================\\nCreative Commons Corporation (\\"Creative Commons\\") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an \\"as-is\\" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors:\\n\\nwiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees =======================================================================\\nCreative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License (\\"Public License\\"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the \\"Licensor.\\" Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark \\"Creative Commons\\" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org.\\n\\n--------------------------------------------------------------------------------\\n\\n----------------------Web Background Synchronization------------------------------\\n\\nWeb Background Synchronization Specification\\nPortions of spec © by W3C\\n\\nW3C Community Final Specification Agreement\\nTo secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a \\"summary\\" is\\navailable. See also the related \\"W3C Community Contributor License Agreement\\".\\n1. The Purpose of this Agreement.\\nThis Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification.\\nAny other capitalized terms not specifically defined herein have the same meaning as those terms have in the \\"W3C Patent Policy\\", and if not defined there, in the \\"W3C Process Document\\".\\n2. Copyrights.\\n2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification.\\n2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number.\\n3. Patents.\\n3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification.\\n3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site.\\n4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel.\\n5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards.\\n6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement.\\n7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply:\\n7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group.\\n7.2. If I Do Not Join the Corresponding Working Group.\\n7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy.\\n7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy.\\n8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms.\\n9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED “AS IS.” The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search.\\n10. Definitions.\\n10.1. Agreement. “Agreement” means this W3C Community Final Specification Agreement.\\n10.2. Corresponding Working Group. “Corresponding Working Group” is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input.\\n10.3. Essential Claims. “Essential Claims” shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims:\\n10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and\\n10.3.2. claims which would be infringed only by:\\nportions of an implementation that are not specified in the normative portions of the Specification, or\\nenabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or\\nthe implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification.\\n10.3.3. design patents and design registrations.\\nFor purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative.\\n10.4. I, Me, or My. “I,” “me,” or “my” refers to the signatory.\\n10.5 Project. “Project” means the W3C Community Group or Business Group for which I executed this Agreement.\\n10.6. Specification. “Specification” means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification.\\n10.7. W3C Community RF Licensing Requirements. “W3C Community RF Licensing Requirements” license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that:\\n10.7.1. shall be available to all, worldwide, whether or not they are W3C Members;\\n10.7.2. shall extend to all Essential Claims owned or controlled by me;\\n10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification;\\n10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all.\\n10.7.5. may not be conditioned on payment of royalties, fees or other consideration;\\n10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation;\\n10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution;\\n10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor.\\n10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question.\\nI am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available.\\n10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls.\\n\\n-------------------------------------------------------------------------------------\\n\\n------------------- WebGL -----------------------------\\nCopyright (c) 2018 The Khronos Group Inc.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a\\ncopy of this software and/or associated documentation files (the\\n\\"Materials\\"), to deal in the Materials without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Materials, and to\\npermit persons to whom the Materials are furnished to do so, subject to\\nthe following conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Materials.\\n\\nTHE MATERIALS ARE PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\nMATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\\n------------------------------------------------------\\n\\n\\n=========================================\\nEND OF typescript NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)\\n=========================================\\nCopyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied\\nfrom or derived from HTML 5.1 W3C Working Draft (http://www.w3.org/TR/2015/WD-html51-20151008/.)\\n\\nTHIS DOCUMENT IS PROVIDED \\"AS IS,\\" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT\\nNOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF\\nTHE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY\\nPATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.\\n\\nCOPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE\\nDOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.\\n\\nThe name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents\\nwithout specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders.\\n=========================================\\nEND OF HTML 5.1 W3C Working Draft NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% JS Beautifier version 1.6.2 (https://github.com/beautify-web/js-beautify)\\n=========================================\\nThe MIT License (MIT)\\n\\nCopyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \\"Software\\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n=========================================\\nEND OF js-beautify NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% Ionic documentation version 1.2.4 (https://github.com/driftyco/ionic-site)\\n=========================================\\nCopyright Drifty Co. http://drifty.com/.\\n\\nApache License\\n\\nVersion 2.0, January 2004\\n\\nhttp://www.apache.org/licenses/\\n\\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n1. Definitions.\\n\\n\\"License\\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\\n\\n\\"Licensor\\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\\n\\n\\"Legal Entity\\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \\"control\\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n\\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity exercising permissions granted by this License.\\n\\n\\"Source\\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\\n\\n\\"Object\\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\\n\\n\\"Work\\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\\n\\n\\"Derivative Works\\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\\n\\n\\"Contribution\\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \\"submitted\\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n\\"Contributor\\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\\n\\n2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\\n\\n3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\\n\\n4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\\n\\nYou must give any other recipients of the Work or Derivative Works a copy of this License; and\\n\\nYou must cause any modified files to carry prominent notices stating that You changed the files; and\\n\\nYou must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\\n\\nIf the Work includes a \\"NOTICE\\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\\n\\n5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\\n\\n6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\\n\\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\\n\\n8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\\n\\n9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\\n\\nEND OF TERMS AND CONDITIONS\\n=========================================\\nEND OF Ionic documentation NOTICES AND INFORMATION\\n\\n\\n\\n\\n%% vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)\\n=========================================\\nThe MIT License (MIT)\\n\\nCopyright (c) 2015 David Owens II\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n=========================================\\nEND OF vscode-swift NOTICES AND INFORMATION\\n\\n"}]},{"name":"org.jetbrains.kotlin:kotlin-stdlib","version":"2.2.10","category":"Android","url":"https://kotlinlang.org/","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jetbrains.kotlinx:kotlinx-coroutines-android","version":"1.9.0","category":"Android","url":"https://github.com/Kotlin/kotlinx.coroutines","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm","version":"1.9.0","category":"Android","url":"https://github.com/Kotlin/kotlinx.coroutines","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jetbrains:annotations","version":"23.0.0","category":"Android","url":"https://github.com/JetBrains/java-annotations","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"org.jspecify:jspecify","version":"1.0.0","category":"Android","url":"http://jspecify.org/","license":"Apache-2.0","notices":[{"name":"LICENSE","text":"\\n Apache License\\n Version 2.0, January 2004\\n http://www.apache.org/licenses/\\n\\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\\n\\n 1. Definitions.\\n\\n \\"License\\" shall mean the terms and conditions for use, reproduction,\\n and distribution as defined by Sections 1 through 9 of this document.\\n\\n \\"Licensor\\" shall mean the copyright owner or entity authorized by\\n the copyright owner that is granting the License.\\n\\n \\"Legal Entity\\" shall mean the union of the acting entity and all\\n other entities that control, are controlled by, or are under common\\n control with that entity. For the purposes of this definition,\\n \\"control\\" means (i) the power, direct or indirect, to cause the\\n direction or management of such entity, whether by contract or\\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\\n outstanding shares, or (iii) beneficial ownership of such entity.\\n\\n \\"You\\" (or \\"Your\\") shall mean an individual or Legal Entity\\n exercising permissions granted by this License.\\n\\n \\"Source\\" form shall mean the preferred form for making modifications,\\n including but not limited to software source code, documentation\\n source, and configuration files.\\n\\n \\"Object\\" form shall mean any form resulting from mechanical\\n transformation or translation of a Source form, including but\\n not limited to compiled object code, generated documentation,\\n and conversions to other media types.\\n\\n \\"Work\\" shall mean the work of authorship, whether in Source or\\n Object form, made available under the License, as indicated by a\\n copyright notice that is included in or attached to the work\\n (an example is provided in the Appendix below).\\n\\n \\"Derivative Works\\" shall mean any work, whether in Source or Object\\n form, that is based on (or derived from) the Work and for which the\\n editorial revisions, annotations, elaborations, or other modifications\\n represent, as a whole, an original work of authorship. For the purposes\\n of this License, Derivative Works shall not include works that remain\\n separable from, or merely link (or bind by name) to the interfaces of,\\n the Work and Derivative Works thereof.\\n\\n \\"Contribution\\" shall mean any work of authorship, including\\n the original version of the Work and any modifications or additions\\n to that Work or Derivative Works thereof, that is intentionally\\n submitted to Licensor for inclusion in the Work by the copyright owner\\n or by an individual or Legal Entity authorized to submit on behalf of\\n the copyright owner. For the purposes of this definition, \\"submitted\\"\\n means any form of electronic, verbal, or written communication sent\\n to the Licensor or its representatives, including but not limited to\\n communication on electronic mailing lists, source code control systems,\\n and issue tracking systems that are managed by, or on behalf of, the\\n Licensor for the purpose of discussing and improving the Work, but\\n excluding communication that is conspicuously marked or otherwise\\n designated in writing by the copyright owner as \\"Not a Contribution.\\"\\n\\n \\"Contributor\\" shall mean Licensor and any individual or Legal Entity\\n on behalf of whom a Contribution has been received by Licensor and\\n subsequently incorporated within the Work.\\n\\n 2. Grant of Copyright License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n copyright license to reproduce, prepare Derivative Works of,\\n publicly display, publicly perform, sublicense, and distribute the\\n Work and such Derivative Works in Source or Object form.\\n\\n 3. Grant of Patent License. Subject to the terms and conditions of\\n this License, each Contributor hereby grants to You a perpetual,\\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\\n (except as stated in this section) patent license to make, have made,\\n use, offer to sell, sell, import, and otherwise transfer the Work,\\n where such license applies only to those patent claims licensable\\n by such Contributor that are necessarily infringed by their\\n Contribution(s) alone or by combination of their Contribution(s)\\n with the Work to which such Contribution(s) was submitted. If You\\n institute patent litigation against any entity (including a\\n cross-claim or counterclaim in a lawsuit) alleging that the Work\\n or a Contribution incorporated within the Work constitutes direct\\n or contributory patent infringement, then any patent licenses\\n granted to You under this License for that Work shall terminate\\n as of the date such litigation is filed.\\n\\n 4. Redistribution. You may reproduce and distribute copies of the\\n Work or Derivative Works thereof in any medium, with or without\\n modifications, and in Source or Object form, provided that You\\n meet the following conditions:\\n\\n (a) You must give any other recipients of the Work or\\n Derivative Works a copy of this License; and\\n\\n (b) You must cause any modified files to carry prominent notices\\n stating that You changed the files; and\\n\\n (c) You must retain, in the Source form of any Derivative Works\\n that You distribute, all copyright, patent, trademark, and\\n attribution notices from the Source form of the Work,\\n excluding those notices that do not pertain to any part of\\n the Derivative Works; and\\n\\n (d) If the Work includes a \\"NOTICE\\" text file as part of its\\n distribution, then any Derivative Works that You distribute must\\n include a readable copy of the attribution notices contained\\n within such NOTICE file, excluding those notices that do not\\n pertain to any part of the Derivative Works, in at least one\\n of the following places: within a NOTICE text file distributed\\n as part of the Derivative Works; within the Source form or\\n documentation, if provided along with the Derivative Works; or,\\n within a display generated by the Derivative Works, if and\\n wherever such third-party notices normally appear. The contents\\n of the NOTICE file are for informational purposes only and\\n do not modify the License. You may add Your own attribution\\n notices within Derivative Works that You distribute, alongside\\n or as an addendum to the NOTICE text from the Work, provided\\n that such additional attribution notices cannot be construed\\n as modifying the License.\\n\\n You may add Your own copyright statement to Your modifications and\\n may provide additional or different license terms and conditions\\n for use, reproduction, or distribution of Your modifications, or\\n for any such Derivative Works as a whole, provided Your use,\\n reproduction, and distribution of the Work otherwise complies with\\n the conditions stated in this License.\\n\\n 5. Submission of Contributions. Unless You explicitly state otherwise,\\n any Contribution intentionally submitted for inclusion in the Work\\n by You to the Licensor shall be under the terms and conditions of\\n this License, without any additional terms or conditions.\\n Notwithstanding the above, nothing herein shall supersede or modify\\n the terms of any separate license agreement you may have executed\\n with Licensor regarding such Contributions.\\n\\n 6. Trademarks. This License does not grant permission to use the trade\\n names, trademarks, service marks, or product names of the Licensor,\\n except as required for reasonable and customary use in describing the\\n origin of the Work and reproducing the content of the NOTICE file.\\n\\n 7. Disclaimer of Warranty. Unless required by applicable law or\\n agreed to in writing, Licensor provides the Work (and each\\n Contributor provides its Contributions) on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\\n implied, including, without limitation, any warranties or conditions\\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\\n PARTICULAR PURPOSE. You are solely responsible for determining the\\n appropriateness of using or redistributing the Work and assume any\\n risks associated with Your exercise of permissions under this License.\\n\\n 8. Limitation of Liability. In no event and under no legal theory,\\n whether in tort (including negligence), contract, or otherwise,\\n unless required by applicable law (such as deliberate and grossly\\n negligent acts) or agreed to in writing, shall any Contributor be\\n liable to You for damages, including any direct, indirect, special,\\n incidental, or consequential damages of any character arising as a\\n result of this License or out of the use or inability to use the\\n Work (including but not limited to damages for loss of goodwill,\\n work stoppage, computer failure or malfunction, or any and all\\n other commercial damages or losses), even if such Contributor\\n has been advised of the possibility of such damages.\\n\\n 9. Accepting Warranty or Additional Liability. While redistributing\\n the Work or Derivative Works thereof, You may choose to offer,\\n and charge a fee for, acceptance of support, warranty, indemnity,\\n or other liability obligations and/or rights consistent with this\\n License. However, in accepting such obligations, You may act only\\n on Your own behalf and on Your sole responsibility, not on behalf\\n of any other Contributor, and only if You agree to indemnify,\\n defend, and hold each Contributor harmless for any liability\\n incurred by, or claims asserted against, such Contributor by reason\\n of your accepting any such warranty or additional liability.\\n\\n END OF TERMS AND CONDITIONS\\n\\n APPENDIX: How to apply the Apache License to your work.\\n\\n To apply the Apache License to your work, attach the following\\n boilerplate notice, with the fields enclosed by brackets \\"[]\\"\\n replaced with your own identifying information. (Don't include\\n the brackets!) The text should be enclosed in the appropriate\\n comment syntax for the file format. We also recommend that a\\n file or class name and description of purpose be included on the\\n same \\"printed page\\" as the copyright notice for easier\\n identification within third-party archives.\\n\\n Copyright 2026 Masaki Aida\\n\\n Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n"}]},{"name":"react","version":"19.2.8","category":"Web","url":"https://www.npmjs.com/package/react","license":"MIT","notices":[{"name":"LICENSE","text":"MIT License\\n\\nCopyright (c) Meta Platforms, Inc. and affiliates.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]},{"name":"react-dom","version":"19.2.8","category":"Web","url":"https://www.npmjs.com/package/react-dom","license":"MIT","notices":[{"name":"LICENSE","text":"MIT License\\n\\nCopyright (c) Meta Platforms, Inc. and affiliates.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]},{"name":"scheduler","version":"0.27.0","category":"Web","url":"https://www.npmjs.com/package/scheduler","license":"MIT","notices":[{"name":"LICENSE","text":"MIT License\\n\\nCopyright (c) Meta Platforms, Inc. and affiliates.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\"Software\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n"}]}]`),o=t();function s(){let e=n(),[t,s]=(0,i.useState)(``),c=t.trim().toLocaleLowerCase(),l=a.filter(e=>`${e.name} ${e.version} ${e.license} ${e.category}`.toLocaleLowerCase().includes(c));return(0,o.jsxs)(`section`,{"aria-labelledby":`license-heading`,className:`mx-auto flex w-full max-w-5xl flex-col gap-4`,children:[(0,o.jsxs)(`header`,{className:`border-b border-line pb-3`,children:[(0,o.jsx)(`h2`,{id:`license-heading`,className:`text-xl font-semibold text-ink`,children:e(`section.license`)}),(0,o.jsx)(`p`,{className:`mt-2 text-sm text-ink-muted`,children:e(`license.description`)})]}),(0,o.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm text-ink-muted`,children:[e(`license.search`),(0,o.jsx)(`input`,{type:`search`,className:r,value:t,onChange:e=>s(e.target.value)})]}),(0,o.jsx)(`p`,{role:`status`,className:`text-xs text-ink-muted`,children:e(`license.count`,{count:l.length})}),l.length===0?(0,o.jsx)(`p`,{className:`text-sm text-ink-muted`,children:e(`license.noMatches`)}):null,(0,o.jsx)(`ul`,{className:`divide-y divide-line overflow-hidden rounded border border-line bg-card`,children:l.map(e=>(0,o.jsx)(`li`,{children:(0,o.jsxs)(`details`,{className:`group`,children:[(0,o.jsxs)(`summary`,{className:`cursor-pointer px-4 py-3 focus-visible:outline-2 focus-visible:outline-accent`,children:[(0,o.jsx)(`span`,{className:`ml-2 break-words text-sm font-medium text-ink`,children:e.name}),(0,o.jsx)(`span`,{className:`ml-2 text-xs text-ink-muted`,children:e.version}),(0,o.jsx)(`span`,{className:`ml-3 text-xs text-ink-muted`,children:e.license})]}),(0,o.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line p-4`,children:[(0,o.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`self-start break-all text-sm text-accent underline`,children:e.url}),e.notices.map(e=>(0,o.jsxs)(`section`,{children:[(0,o.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-ink-muted`,children:e.name}),(0,o.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap break-words rounded bg-control p-3 text-xs text-ink`,tabIndex:0,children:e.text})]},e.name))]})]})},`${e.category}:${e.name}`))})]})}export{s as LicensePage}; \ No newline at end of file diff --git a/internal/ui/dist/assets/MonacoEditor-BZDkteXl.js b/internal/ui/dist/assets/MonacoEditor-BZDkteXl.js deleted file mode 100644 index 1ffaa2636..000000000 --- a/internal/ui/dist/assets/MonacoEditor-BZDkteXl.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-D-jvHwC7.js","assets/editor.api-BUrKrayv.js","assets/index-DJ8h9zNi.js","assets/jsx-runtime-QtymfJMM.js","assets/surface-Ck_FblzE.js","assets/form-C1olpQVF.js","assets/clipboard-ObSO6ZLv.js","assets/index-BmAKYKBT.css","assets/editor-jjEx9u7D.css","assets/javascript-CbZk-tvH.js","assets/typescript-CKpXzKI4.js","assets/jsonMode-zGNRG1gJ.js","assets/jsonMode--ixms01u.css","assets/python-Br794m9x.js","assets/yaml-B1CYWq_z.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{$ as n,_ as r,s as i}from"./index-DJ8h9zNi.js";import{a,o,t as s}from"./editor.api-BUrKrayv.js";import{n as c,r as l}from"./reducedMotion-XhcdVu33.js";var u=e();function d(e){return new Worker(`/assets/editor.worker-Bbk1whK-.js`,{name:e?.name})}function f(e){return new Worker(`/assets/json.worker-Ax0gao5O.js`,{name:e?.name})}var p={},m={},h=class e{static getOrCreate(t){return m[t]||(m[t]=new e(t)),m[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,p[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function g(e){let t=e.id;p[t]=e,o.register(e);let n=h.getOrCreate(t);o.registerTokensProviderFactory(t,{create:async()=>(await n.load()).language}),o.onLanguageEncountered(t,async()=>{let e=await n.load();o.setLanguageConfiguration(t,e.conf)})}g({id:`css`,extensions:[`.css`],aliases:[`CSS`,`css`],mimetypes:[`text/css`],loader:()=>i(()=>import(`./css-DIMkf-bt.js`),[])}),g({id:`go`,extensions:[`.go`],aliases:[`Go`],loader:()=>i(()=>import(`./go-C-y9NEjX.js`),[])}),g({id:`html`,extensions:[`.html`,`.htm`,`.shtml`,`.xhtml`,`.mdoc`,`.jsp`,`.asp`,`.aspx`,`.jshtm`],aliases:[`HTML`,`htm`,`html`,`xhtml`],mimetypes:[`text/html`,`text/x-jshtm`,`text/template`,`text/ng-template`],loader:()=>i(()=>import(`./html-D-jvHwC7.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))}),g({id:`javascript`,extensions:[`.js`,`.es6`,`.jsx`,`.mjs`,`.cjs`],firstLine:`^#!.*\\bnode`,filenames:[`jakefile`],aliases:[`JavaScript`,`javascript`,`js`],mimetypes:[`text/javascript`],loader:()=>i(()=>import(`./javascript-CbZk-tvH.js`),__vite__mapDeps([9,10,1,2,3,4,5,6,7,8]))});var _=new class{constructor(e,t,n){this._onDidChange=new s,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function v(){return i(()=>import(`./jsonMode-zGNRG1gJ.js`),__vite__mapDeps([11,1,2,3,4,5,6,7,8,12]))}o.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),o.onLanguage(`json`,()=>{v().then(e=>e.setupMode(_))}),g({id:`markdown`,extensions:[`.md`,`.markdown`,`.mdown`,`.mkdn`,`.mkd`,`.mdwn`,`.mdtxt`,`.mdtext`],aliases:[`Markdown`,`markdown`],loader:()=>i(()=>import(`./markdown-Cimd5fb3.js`),[])}),g({id:`python`,extensions:[`.py`,`.rpy`,`.pyw`,`.cpy`,`.gyp`,`.gypi`],aliases:[`Python`,`py`],firstLine:`^#!/.*\\bpython[0-9.-]*\\b`,loader:()=>i(()=>import(`./python-Br794m9x.js`),__vite__mapDeps([13,1,2,3,4,5,6,7,8]))}),g({id:`shell`,extensions:[`.sh`,`.bash`],aliases:[`Shell`,`sh`],loader:()=>i(()=>import(`./shell-CC2rA5mh.js`),[])}),g({id:`typescript`,extensions:[`.ts`,`.tsx`,`.cts`,`.mts`],aliases:[`TypeScript`,`ts`,`typescript`],mimetypes:[`text/typescript`],loader:()=>i(()=>import(`./typescript-CKpXzKI4.js`),__vite__mapDeps([10,1,2,3,4,5,6,7,8]))}),g({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`,`text/x-yaml`],loader:()=>i(()=>import(`./yaml-B1CYWq_z.js`),__vite__mapDeps([14,1,2,3,4,5,6,7,8]))});var y=t(),b=globalThis;b.MonacoEnvironment??={getWorker:(e,t)=>t===`json`?new f:new d};function x(e){let t=e.toLowerCase();return t.endsWith(`.json`)||t.endsWith(`.jsonc`)?`json`:t.endsWith(`.yaml`)||t.endsWith(`.yml`)?`yaml`:t.endsWith(`.js`)||t.endsWith(`.mjs`)||t.endsWith(`.cjs`)?`javascript`:t.endsWith(`.ts`)||t.endsWith(`.tsx`)?`typescript`:t.endsWith(`.sh`)||t.endsWith(`.bash`)||t.endsWith(`.zsh`)?`shell`:t.endsWith(`.md`)||t.endsWith(`.markdown`)?`markdown`:t.endsWith(`.go`)?`go`:t.endsWith(`.py`)?`python`:t.endsWith(`.html`)||t.endsWith(`.htm`)?`html`:t.endsWith(`.css`)?`css`:`plaintext`}function S({path:e,value:t,onChange:i,readOnly:o=!1}){let s=(0,u.useRef)(null),d=(0,u.useRef)(i),f=(0,u.useRef)(t),p=(0,u.useRef)(null),{resolved:m}=n(),h=r(l);return d.current=i,f.current=t,(0,u.useEffect)(()=>{if(s.current===null)return;let n=a.createModel(t,x(e)),r=a.create(s.current,{model:n,readOnly:o,automaticLayout:!0,minimap:{enabled:!1},fontFamily:`JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,fontSize:13,lineNumbersMinChars:3,padding:{top:10,bottom:10},scrollBeyondLastLine:!1,cursorBlinking:c(h),theme:m===`dark`?`vs-dark`:`vs`});p.current=r;let i=n.onDidChangeContent(()=>{let e=n.getValue();f.current=e,d.current(e)});return()=>{i.dispose(),r.dispose(),n.dispose(),p.current=null}},[e]),(0,u.useEffect)(()=>{let e=p.current?.getModel();e!=null&&e.getValue()!==t&&e.setValue(t)},[t]),(0,u.useEffect)(()=>{p.current?.updateOptions({readOnly:o,cursorBlinking:c(h),theme:m===`dark`?`vs-dark`:`vs`})},[o,h,m]),(0,y.jsx)(`div`,{ref:s,className:`h-full min-h-64 w-full overflow-hidden`})}export{S as MonacoEditor}; \ No newline at end of file diff --git a/internal/ui/dist/assets/MonacoEditor-DkWzB-rB.js b/internal/ui/dist/assets/MonacoEditor-DkWzB-rB.js new file mode 100644 index 000000000..78b88d085 --- /dev/null +++ b/internal/ui/dist/assets/MonacoEditor-DkWzB-rB.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-DMa_AVOZ.js","assets/editor.api-BJ0kNDCq.js","assets/index-DtC-pXtZ.js","assets/jsx-runtime-BOsSdQ68.js","assets/surface-DPFJ-mE2.js","assets/form-zbLY2cuV.js","assets/clipboard-ObSO6ZLv.js","assets/index-BmAKYKBT.css","assets/editor-jjEx9u7D.css","assets/javascript-CT0_diQI.js","assets/typescript-BGLra-jT.js","assets/jsonMode-C7dCI1gT.js","assets/jsonMode--ixms01u.css","assets/python-DviOXdGw.js","assets/yaml-DRNvN4jR.js"])))=>i.map(i=>d[i]); +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{b as n,it as r,s as i}from"./index-DtC-pXtZ.js";import{a,o,t as s}from"./editor.api-BJ0kNDCq.js";import{n as c,r as l}from"./reducedMotion-XhcdVu33.js";var u=e();function d(e){return new Worker(`/assets/editor.worker-Bbk1whK-.js`,{name:e?.name})}function f(e){return new Worker(`/assets/json.worker-Ax0gao5O.js`,{name:e?.name})}var p={},m={},h=class e{static getOrCreate(t){return m[t]||(m[t]=new e(t)),m[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,p[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function g(e){let t=e.id;p[t]=e,o.register(e);let n=h.getOrCreate(t);o.registerTokensProviderFactory(t,{create:async()=>(await n.load()).language}),o.onLanguageEncountered(t,async()=>{let e=await n.load();o.setLanguageConfiguration(t,e.conf)})}g({id:`css`,extensions:[`.css`],aliases:[`CSS`,`css`],mimetypes:[`text/css`],loader:()=>i(()=>import(`./css-DIMkf-bt.js`),[])}),g({id:`go`,extensions:[`.go`],aliases:[`Go`],loader:()=>i(()=>import(`./go-C-y9NEjX.js`),[])}),g({id:`html`,extensions:[`.html`,`.htm`,`.shtml`,`.xhtml`,`.mdoc`,`.jsp`,`.asp`,`.aspx`,`.jshtm`],aliases:[`HTML`,`htm`,`html`,`xhtml`],mimetypes:[`text/html`,`text/x-jshtm`,`text/template`,`text/ng-template`],loader:()=>i(()=>import(`./html-DMa_AVOZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))}),g({id:`javascript`,extensions:[`.js`,`.es6`,`.jsx`,`.mjs`,`.cjs`],firstLine:`^#!.*\\bnode`,filenames:[`jakefile`],aliases:[`JavaScript`,`javascript`,`js`],mimetypes:[`text/javascript`],loader:()=>i(()=>import(`./javascript-CT0_diQI.js`),__vite__mapDeps([9,10,1,2,3,4,5,6,7,8]))});var _=new class{constructor(e,t,n){this._onDidChange=new s,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function v(){return i(()=>import(`./jsonMode-C7dCI1gT.js`),__vite__mapDeps([11,1,2,3,4,5,6,7,8,12]))}o.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),o.onLanguage(`json`,()=>{v().then(e=>e.setupMode(_))}),g({id:`markdown`,extensions:[`.md`,`.markdown`,`.mdown`,`.mkdn`,`.mkd`,`.mdwn`,`.mdtxt`,`.mdtext`],aliases:[`Markdown`,`markdown`],loader:()=>i(()=>import(`./markdown-Cimd5fb3.js`),[])}),g({id:`python`,extensions:[`.py`,`.rpy`,`.pyw`,`.cpy`,`.gyp`,`.gypi`],aliases:[`Python`,`py`],firstLine:`^#!/.*\\bpython[0-9.-]*\\b`,loader:()=>i(()=>import(`./python-DviOXdGw.js`),__vite__mapDeps([13,1,2,3,4,5,6,7,8]))}),g({id:`shell`,extensions:[`.sh`,`.bash`],aliases:[`Shell`,`sh`],loader:()=>i(()=>import(`./shell-CC2rA5mh.js`),[])}),g({id:`typescript`,extensions:[`.ts`,`.tsx`,`.cts`,`.mts`],aliases:[`TypeScript`,`ts`,`typescript`],mimetypes:[`text/typescript`],loader:()=>i(()=>import(`./typescript-BGLra-jT.js`),__vite__mapDeps([10,1,2,3,4,5,6,7,8]))}),g({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`,`text/x-yaml`],loader:()=>i(()=>import(`./yaml-DRNvN4jR.js`),__vite__mapDeps([14,1,2,3,4,5,6,7,8]))});var y=t(),b=globalThis;b.MonacoEnvironment??={getWorker:(e,t)=>t===`json`?new f:new d};function x(e){let t=e.toLowerCase();return t.endsWith(`.json`)||t.endsWith(`.jsonc`)?`json`:t.endsWith(`.yaml`)||t.endsWith(`.yml`)?`yaml`:t.endsWith(`.js`)||t.endsWith(`.mjs`)||t.endsWith(`.cjs`)?`javascript`:t.endsWith(`.ts`)||t.endsWith(`.tsx`)?`typescript`:t.endsWith(`.sh`)||t.endsWith(`.bash`)||t.endsWith(`.zsh`)?`shell`:t.endsWith(`.md`)||t.endsWith(`.markdown`)?`markdown`:t.endsWith(`.go`)?`go`:t.endsWith(`.py`)?`python`:t.endsWith(`.html`)||t.endsWith(`.htm`)?`html`:t.endsWith(`.css`)?`css`:`plaintext`}function S({path:e,value:t,onChange:i,readOnly:o=!1}){let s=(0,u.useRef)(null),d=(0,u.useRef)(i),f=(0,u.useRef)(t),p=(0,u.useRef)(null),{resolved:m}=r(),h=n(l);return d.current=i,f.current=t,(0,u.useEffect)(()=>{if(s.current===null)return;let n=a.createModel(t,x(e)),r=a.create(s.current,{model:n,readOnly:o,automaticLayout:!0,minimap:{enabled:!1},fontFamily:`JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,fontSize:13,lineNumbersMinChars:3,padding:{top:10,bottom:10},scrollBeyondLastLine:!1,cursorBlinking:c(h),theme:m===`dark`?`vs-dark`:`vs`});p.current=r;let i=n.onDidChangeContent(()=>{let e=n.getValue();f.current=e,d.current(e)});return()=>{i.dispose(),r.dispose(),n.dispose(),p.current=null}},[e]),(0,u.useEffect)(()=>{let e=p.current?.getModel();e!=null&&e.getValue()!==t&&e.setValue(t)},[t]),(0,u.useEffect)(()=>{p.current?.updateOptions({readOnly:o,cursorBlinking:c(h),theme:m===`dark`?`vs-dark`:`vs`})},[o,h,m]),(0,y.jsx)(`div`,{ref:s,className:`h-full min-h-64 w-full overflow-hidden`})}export{S as MonacoEditor}; \ No newline at end of file diff --git a/internal/ui/dist/assets/RemoteKeyPanel-D45eirBG.js b/internal/ui/dist/assets/RemoteKeyPanel-D45eirBG.js new file mode 100644 index 000000000..7ed04bdb9 --- /dev/null +++ b/internal/ui/dist/assets/RemoteKeyPanel-D45eirBG.js @@ -0,0 +1,2 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{m as n,n as r,r as i,t as a,w as o,y as s}from"./surface-DPFJ-mE2.js";import{_ as c,i as l,n as u,t as ee}from"./form-zbLY2cuV.js";import{tt as d}from"./index-DtC-pXtZ.js";import{t as te}from"./api-ic2UgGYC.js";import{r as ne}from"./page-BaebBDRI.js";var f=e();function p(e){return o(`RemoteKeyPlan`,e)}function m(e){return o(`RemoteKeyRegisterResponse`,e)}var re={async plan(e){return p(await n(`/api/v1/remote-keys/plan`,{alias:e.alias,keyPath:e.keyPath,publicKey:e.publicKey}))},async register(e){return m(await n(`/api/v1/remote-keys/register`,{alias:e.alias,keyPath:e.keyPath,publicKey:e.publicKey,acknowledgeExecutable:e.acknowledgeExecutable},e.actionToken))}},h=t(),g={added:`rk.added`,already_present:`rk.alreadyPresent`},_={engine:`rk.valuesFromEngine`,"ssh -G":`rk.valuesFromSshG`};function v({api:e=re,keys:t=te,hosts:n=[],preferredPublicKeyPath:o=null,onPreferredPublicKeyHandled:d}){let p=c(),[m,_]=(0,f.useState)(``),[v,x]=(0,f.useState)([]),[S,C]=(0,f.useState)(``),[w,T]=(0,f.useState)(``),[E,D]=(0,f.useState)([]),[O,k]=(0,f.useState)(!1),[A,j]=(0,f.useState)(new Set),[M,N]=(0,f.useState)([]),[P,F]=(0,f.useState)(!1),[I,L]=(0,f.useState)(!1),[R,z]=(0,f.useState)(``),[B,V]=(0,f.useState)([]),[ae,H]=(0,f.useState)(``),U=(0,f.useRef)(0),W=(0,f.useRef)(0),G=(0,f.useRef)(!1),K=(0,f.useMemo)(()=>[...new Set(n.filter(e=>e!==``))].sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`,numeric:!0})),[n]),q=(0,f.useMemo)(()=>{let e=m.trim().toLocaleLowerCase();return e===``?K:K.filter(t=>t.toLocaleLowerCase().includes(e))},[K,m]),J=(0,f.useCallback)(()=>{o===null||G.current||(G.current=!0,d?.())},[o,d]);(0,f.useEffect)(()=>{let e=!0;o!==null&&(G.current=!1);let n=o===null?null:++U.current;return t.inventory().then(async r=>{let i=r.items.filter(e=>e.kind===`public_key`);if(!e||(V(i),o===null))return;let a=i.find(e=>e.relativePath===o);if(a===void 0)return;let s=await t.publicKey(a.id);!e||n!==U.current||(Y(),H(a.id),C(s.relativePath),T(s.publicKey.trimEnd()),z(``),J())}).catch(()=>void 0),()=>{e=!1}},[t,d,o,J]);function Y(){W.current+=1,F(!1),D([]),k(!1),j(new Set),N([])}function oe(e){return t=>{Y(),e(t)}}function X(e){return t=>{U.current+=1,J(),H(``),oe(e)(t)}}async function se(e){let n=++U.current;if(J(),Y(),H(e),e!==``)try{let r=await t.publicKey(e);if(n!==U.current)return;Y(),C(r.relativePath),T(r.publicKey.trimEnd()),z(``)}catch{if(n!==U.current)return;z(p(`rk.publicKeyUnreadable`))}}function ce(e){Y(),x(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}function le(){q.length!==0&&(Y(),x(e=>[...new Set([...e,...q])]))}function ue(){Y(),x([]),_(``)}async function de(){z(``),Y();let t=W.current,n=m.trim(),r=v.length>0?v:n===``?[]:[n];if(r.length===0){z(p(`rk.chooseHost`));return}F(!0);let i=r.map(e=>({alias:e,keyPath:S,publicKey:w})),a=await b(i,4,t=>e.plan(t));if(t!==W.current)return;let o=a.flatMap((e,t)=>e.status===`fulfilled`?[{input:i[t],plan:e.value}]:[]),s=a.flatMap((e,t)=>e.status===`rejected`?[`${i[t].alias}: ${y(e.reason,p,`rk.planFailed`)}`]:[]);D(o),s.length>0&&z(s.join(` +`)),F(!1)}async function fe(){let t=E.filter(({plan:e})=>e.supported&&!A.has(e.alias));if(t.length===0)return;z(``),L(!0);let n=await b(t,4,({input:t,plan:n})=>e.register({...t,acknowledgeExecutable:O,actionToken:n.actionToken})),r=new Set(A),i=n.map((e,n)=>{let i=t[n].plan.alias;return e.status===`fulfilled`?{alias:i,response:e.value}:(s(e.reason)===`unsupported_remote`&&r.add(i),{alias:i,error:y(e.reason,p,`rk.registerFailed`)})});j(r),N(i);let a=i.filter(e=>e.error!==void 0);if(a.length>0){let e=a[0]?.error;z(i.length===1&&e!==void 0?e:p(`rk.someRegistrationsFailed`))}L(!1)}let Z=E.flatMap(({plan:e})=>e.executableDirectives.filter(e=>!e.overridable).map(t=>({alias:e.alias,directive:t}))),Q=E.filter(({plan:e})=>e.supported&&!A.has(e.alias)),$=P||I,pe=Q.length===0||$||Z.length>0&&!O;return(0,h.jsxs)(`section`,{"aria-label":p(`rk.heading`),className:`mx-auto flex w-full max-w-5xl flex-col gap-6 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,h.jsx)(ne,{title:p(`rk.heading`),description:p(`rk.pageDescription`)}),(0,h.jsx)(`p`,{"aria-live":`polite`,className:`rounded-lg bg-surface-subtle px-3 py-2 text-sm text-ink-muted`,children:p($?`rk.waiting`:`rk.idle`)}),R?(0,h.jsx)(i,{tone:`danger`,children:R}):null,(0,h.jsxs)(r,{as:`section`,radius:`md`,children:[(0,h.jsxs)(`div`,{className:`grid lg:grid-cols-2`,children:[(0,h.jsxs)(`div`,{className:`border-b border-line p-5 lg:border-b-0 lg:border-r`,children:[(0,h.jsxs)(`div`,{className:`mb-4 flex items-center gap-3`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-7 w-7 place-items-center rounded-full bg-accent text-xs font-semibold text-accent-ink`,children:`1`}),(0,h.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:p(`rk.pickFromSsh`)})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,h.jsx)(u,{label:p(`rk.pickFromSsh`),children:(0,h.jsxs)(`select`,{value:ae,disabled:$,onChange:e=>void se(e.target.value),className:l,children:[(0,h.jsx)(`option`,{value:``,children:p(`rk.typeInstead`)}),B.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.fingerprint===``?e.relativePath:`${e.relativePath} · ${e.fingerprint}`},e.id))]})}),(0,h.jsx)(u,{label:p(`rk.publicKeyFile`),children:(0,h.jsx)(`input`,{value:S,disabled:$,onChange:e=>X(C)(e.target.value),className:`${l} font-mono`})})]})]}),(0,h.jsxs)(`div`,{className:`p-5`,children:[(0,h.jsxs)(`div`,{className:`mb-4 flex items-center gap-3`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-7 w-7 place-items-center rounded-full bg-surface text-xs font-semibold text-ink-muted`,children:`2`}),(0,h.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:p(`rk.hostAlias`)})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,h.jsx)(u,{label:p(`rk.hostSearch`),children:(0,h.jsx)(`input`,{type:`search`,"aria-label":p(`rk.hostAlias`),value:m,disabled:$,placeholder:p(`rk.hostSearchPlaceholder`),onChange:e=>{v.length===0&&Y(),_(e.target.value)},className:`${l} font-mono`})}),K.length===0?(0,h.jsx)(`p`,{className:`text-xs text-ink-muted`,children:p(`rk.hostTypeHint`)}):(0,h.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-line`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-line bg-surface-subtle px-3 py-2`,children:[(0,h.jsx)(`span`,{className:`text-xs text-ink-muted`,children:p(`rk.hostsSelected`,{count:v.length})}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`button`,{type:`button`,disabled:$||q.length===0,onClick:le,className:`text-xs text-accent hover:underline disabled:text-ink-faint disabled:no-underline`,children:p(`rk.selectMatches`)}),(0,h.jsx)(`button`,{type:`button`,disabled:$||v.length===0,onClick:ue,className:`text-xs text-ink-muted hover:text-ink disabled:text-ink-faint`,children:p(`rk.clearSelection`)})]})]}),(0,h.jsx)(`div`,{role:`group`,"aria-label":p(`rk.hostChoices`),className:`max-h-44 overflow-y-auto p-1.5`,children:q.length===0?(0,h.jsx)(`p`,{className:`px-2 py-4 text-center text-xs text-ink-muted`,children:p(`rk.noHostMatches`)}):q.map(e=>(0,h.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-select-fill`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:v.includes(e),disabled:$,onChange:()=>ce(e)}),(0,h.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e})]},e))})]})]})]})]}),(0,h.jsx)(`div`,{className:`border-t border-line bg-surface-subtle p-5`,children:(0,h.jsx)(u,{label:p(`rk.publicKeyLine`),children:(0,h.jsx)(`textarea`,{value:w,disabled:$,onChange:e=>X(T)(e.target.value),rows:3,className:`${l} font-mono text-xs leading-5`})})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-line px-5 py-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-ink-muted`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`h-2 w-2 rounded-full ${E.length===0?`bg-ink-faint`:`bg-live`}`}),E.length===0?p(`rk.showWhatWouldHappen`):p(`rk.plannedHosts`,{count:E.length})]}),(0,h.jsxs)(`div`,{className:`flex w-full flex-col gap-2 sm:w-auto sm:flex-row`,children:[(0,h.jsx)(a,{className:`w-full sm:w-auto`,disabled:$,onClick:()=>void de(),children:p(`rk.showWhatWouldHappen`)}),E.length>0&&Q.length===0?null:(0,h.jsx)(a,{className:`w-full sm:w-auto`,kind:`primary`,disabled:pe,onClick:()=>void fe(),children:Q.length>1?p(`rk.registerMany`,{count:Q.length}):p(`rk.register`)})]})]})]}),E.length>0?(0,h.jsxs)(r,{as:`section`,"aria-labelledby":`remote-key-plan-heading`,radius:`md`,className:`text-sm`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-line bg-surface-subtle px-5 py-4`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-7 w-7 place-items-center rounded-full bg-live text-xs font-semibold text-accent-ink`,children:`3`}),(0,h.jsx)(`h3`,{id:`remote-key-plan-heading`,className:`font-semibold`,children:E.length===1?p(`rk.confirmHeading`):p(`rk.confirmManyHeading`,{count:E.length})})]}),(0,h.jsx)(`div`,{className:`divide-y divide-line`,children:E.map(({plan:e})=>(0,h.jsx)(ie,{plan:e,manual:!e.supported||A.has(e.alias)},e.alias))}),Z.length>0?(0,h.jsxs)(`div`,{className:`border-t border-notice-line bg-notice p-4`,children:[(0,h.jsx)(`h4`,{className:`font-medium text-notice-ink`,children:p(`rk.connectingRuns`)}),(0,h.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:Z.map(({alias:e,directive:t})=>(0,h.jsxs)(`li`,{children:[(0,h.jsxs)(`span`,{className:`text-ink-muted`,children:[e,` · `,t.keyword,` at `,t.path,`:`,t.line]}),(0,h.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-ink`,children:t.command})]},`${e}:${t.path}:${t.line}:${t.keyword}`))}),(0,h.jsx)(ee,{className:`mt-2`,label:p(`rk.acknowledgeRuns`),checked:O,onChange:k,tone:`notice`})]}):null]}):null,M.length>0?(0,h.jsxs)(r,{as:`section`,radius:`md`,className:`text-sm`,children:[(0,h.jsx)(`h3`,{className:`px-4 pt-4 font-semibold text-live`,children:p(`rk.result`)}),(0,h.jsx)(`ul`,{className:`mt-2 divide-y divide-line`,children:M.map(e=>(0,h.jsxs)(`li`,{className:`grid gap-1 px-4 py-3 sm:grid-cols-[12rem_minmax(0,1fr)]`,children:[(0,h.jsx)(`span`,{className:`font-mono font-medium`,children:e.alias}),(0,h.jsx)(`div`,{children:e.response===void 0?(0,h.jsx)(`p`,{className:`text-danger`,children:e.error}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{children:e.response.outcome in g?p(g[e.response.outcome]):e.response.outcome}),e.response.stderr?(0,h.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-ink-muted`,children:e.response.stderr}):null]})})]},e.alias))})]}):null]})}function ie({plan:e,manual:t}){let n=c();return(0,h.jsxs)(`article`,{"aria-label":n(`rk.planFor`,{alias:e.alias}),children:[(0,h.jsx)(`h4`,{className:`border-b border-hairline px-5 py-3 font-mono font-semibold text-ink`,children:e.alias}),(0,h.jsxs)(`div`,{className:`grid lg:grid-cols-[minmax(0,1fr)_minmax(0,1.15fr)]`,children:[(0,h.jsx)(`dl`,{className:`border-b border-line lg:border-b-0 lg:border-r`,children:[[n(`rk.effectiveUser`),e.user===``?n(`rk.noUser`):e.user],[n(`rk.destination`),`${e.hostname}:${e.port}`],[n(`rk.valuesCameFrom`),e.valuesFrom in _?n(_[e.valuesFrom]):e.valuesFrom],[n(`rk.keyFile`),e.keyPath],[n(`rk.fingerprint`),e.fingerprint]].map(([e,t])=>(0,h.jsxs)(`div`,{className:`grid gap-1 border-t border-hairline px-5 py-3 first:border-t-0 sm:grid-cols-[9rem_minmax(0,1fr)]`,children:[(0,h.jsx)(`dt`,{className:`text-xs font-medium text-ink-muted`,children:e}),(0,h.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-xs`,children:t})]},e))}),(0,h.jsxs)(`div`,{className:`p-5`,children:[(0,h.jsx)(`p`,{children:n(`rk.appendTo`,{remotePath:e.remotePath,account:e.user===``?n(`rk.theRemoteAccount`):n(`rk.usersAccount`,{user:e.user}),hostname:e.hostname})}),(0,h.jsx)(`pre`,{"aria-label":n(`rk.keyLineLabel`),className:`mt-3 overflow-x-auto rounded-lg border border-line bg-canvas p-3 font-mono text-xs`,children:e.keyLine}),(0,h.jsx)(`div`,{className:`mt-2`,children:(0,h.jsx)(d,{value:e.keyLine,label:`copy.keyLine`})}),(0,h.jsx)(`p`,{className:`mt-5 text-ink-muted`,children:n(`rk.remoteRuns`)}),(0,h.jsx)(`pre`,{"aria-label":n(`rk.remoteCommandLabel`),className:`mt-2 overflow-x-auto rounded-lg border border-line bg-canvas p-3 font-mono text-xs`,children:e.routine}),(0,h.jsx)(`div`,{className:`mt-1`,children:(0,h.jsx)(d,{value:e.routine,label:`copy.remoteCommand`})}),t?(0,h.jsxs)(`div`,{className:`mt-4 rounded-lg bg-surface-subtle p-3`,children:[(0,h.jsx)(`h5`,{className:`font-medium text-notice-ink`,children:n(`rk.manualHeading`)}),(0,h.jsx)(`ol`,{className:`mt-1 list-decimal pl-5`,children:e.manual.map(e=>(0,h.jsx)(`li`,{children:e},e))})]}):null]})]})]})}function y(e,t,n){let r=s(e);return r===``?t(n):t(`rk.withCode`,{message:t(n),code:r})}async function b(e,t,n){let r=Array(e.length),i=0;async function a(){for(;ia())),r}export{v as RemoteKeyPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/RemoteKeyPanel-S-URk5vh.js b/internal/ui/dist/assets/RemoteKeyPanel-S-URk5vh.js deleted file mode 100644 index c296c0ac2..000000000 --- a/internal/ui/dist/assets/RemoteKeyPanel-S-URk5vh.js +++ /dev/null @@ -1,2 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{S as n,_ as r,d as i,g as a,n as o,r as s,t as c}from"./surface-Ck_FblzE.js";import{_ as l,i as u,n as d,t as ee}from"./form-C1olpQVF.js";import{X as f}from"./index-DJ8h9zNi.js";import{t as te}from"./api-DomXbahF.js";import{r as ne}from"./page-CiAVS9qS.js";var p=e();function m(e){return n(`RemoteKeyPlan`,e)}function h(e){return n(`RemoteKeyRegisterResponse`,e)}var re={async plan(e){return m(await a.mutate(`/api/v1/remote-keys/plan`,{method:`POST`,headers:i,body:JSON.stringify({alias:e.alias,keyPath:e.keyPath,publicKey:e.publicKey})}))},async register(e){return h(await a.mutate(`/api/v1/remote-keys/register`,{method:`POST`,headers:{...i,"X-SSHC-Action":e.actionToken},body:JSON.stringify({alias:e.alias,keyPath:e.keyPath,publicKey:e.publicKey,acknowledgeExecutable:e.acknowledgeExecutable})}))}},g=t(),_={added:`rk.added`,already_present:`rk.alreadyPresent`},v={engine:`rk.valuesFromEngine`,"ssh -G":`rk.valuesFromSshG`};function y({api:e=re,keys:t=te,hosts:n=[],preferredPublicKeyPath:i=null,onPreferredPublicKeyHandled:a}){let f=l(),[m,h]=(0,p.useState)(``),[v,y]=(0,p.useState)([]),[C,w]=(0,p.useState)(``),[T,E]=(0,p.useState)(``),[D,O]=(0,p.useState)([]),[k,A]=(0,p.useState)(!1),[j,M]=(0,p.useState)(new Set),[N,P]=(0,p.useState)([]),[F,I]=(0,p.useState)(!1),[L,R]=(0,p.useState)(!1),[z,B]=(0,p.useState)(``),[V,ie]=(0,p.useState)([]),[ae,H]=(0,p.useState)(``),U=(0,p.useRef)(0),W=(0,p.useRef)(0),G=(0,p.useRef)(!1),K=(0,p.useMemo)(()=>[...new Set(n.filter(e=>e!==``))].sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`,numeric:!0})),[n]),q=(0,p.useMemo)(()=>{let e=m.trim().toLocaleLowerCase();return e===``?K:K.filter(t=>t.toLocaleLowerCase().includes(e))},[K,m]),J=(0,p.useCallback)(()=>{i===null||G.current||(G.current=!0,a?.())},[i,a]);(0,p.useEffect)(()=>{let e=!0;i!==null&&(G.current=!1);let n=i===null?null:++U.current;return t.inventory().then(async r=>{let a=r.items.filter(e=>e.kind===`public_key`);if(!e||(ie(a),i===null))return;let o=a.find(e=>e.relativePath===i);if(o===void 0)return;let s=await t.publicKey(o.id);!e||n!==U.current||(Y(),H(o.id),w(s.relativePath),E(s.publicKey.trimEnd()),B(``),J())}).catch(()=>void 0),()=>{e=!1}},[t,a,i,J]);function Y(){W.current+=1,I(!1),O([]),A(!1),M(new Set),P([])}function oe(e){return t=>{Y(),e(t)}}function X(e){return t=>{U.current+=1,J(),H(``),oe(e)(t)}}async function se(e){let n=++U.current;if(J(),Y(),H(e),e!==``)try{let r=await t.publicKey(e);if(n!==U.current)return;Y(),w(r.relativePath),E(r.publicKey.trimEnd()),B(``)}catch{if(n!==U.current)return;B(f(`rk.publicKeyUnreadable`))}}function ce(e){Y(),y(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}function le(){q.length!==0&&(Y(),y(e=>[...new Set([...e,...q])]))}function ue(){Y(),y([]),h(``)}async function de(){B(``),Y();let t=W.current,n=m.trim(),r=v.length>0?v:n===``?[]:[n];if(r.length===0){B(f(`rk.chooseHost`));return}I(!0);let i=r.map(e=>({alias:e,keyPath:C,publicKey:T})),a=await S(i,4,t=>e.plan(t));if(t!==W.current)return;let o=a.flatMap((e,t)=>e.status===`fulfilled`?[{input:i[t],plan:e.value}]:[]),s=a.flatMap((e,t)=>e.status===`rejected`?[`${i[t].alias}: ${x(e.reason,f,`rk.planFailed`)}`]:[]);O(o),s.length>0&&B(s.join(` -`)),I(!1)}async function fe(){let t=D.filter(({plan:e})=>e.supported&&!j.has(e.alias));if(t.length===0)return;B(``),R(!0);let n=await S(t,4,({input:t,plan:n})=>e.register({...t,acknowledgeExecutable:k,actionToken:n.actionToken})),i=new Set(j),a=n.map((e,n)=>{let a=t[n].plan.alias;return e.status===`fulfilled`?{alias:a,response:e.value}:(r(e.reason)===`unsupported_remote`&&i.add(a),{alias:a,error:x(e.reason,f,`rk.registerFailed`)})});M(i),P(a);let o=a.filter(e=>e.error!==void 0);if(o.length>0){let e=o[0]?.error;B(a.length===1&&e!==void 0?e:f(`rk.someRegistrationsFailed`))}R(!1)}let Z=D.flatMap(({plan:e})=>e.executableDirectives.filter(e=>!e.overridable).map(t=>({alias:e.alias,directive:t}))),Q=D.filter(({plan:e})=>e.supported&&!j.has(e.alias)),$=F||L,pe=Q.length===0||$||Z.length>0&&!k;return(0,g.jsxs)(`section`,{"aria-label":f(`rk.heading`),className:`mx-auto flex w-full max-w-5xl flex-col gap-6 [&_button]:min-h-10 sm:[&_button]:min-h-0`,children:[(0,g.jsx)(ne,{title:f(`rk.heading`),description:f(`rk.pageDescription`)}),(0,g.jsx)(`p`,{"aria-live":`polite`,className:`rounded-lg bg-surface-subtle px-3 py-2 text-sm text-ink-muted`,children:f($?`rk.waiting`:`rk.idle`)}),z?(0,g.jsx)(s,{tone:`danger`,children:z}):null,(0,g.jsxs)(o,{as:`section`,radius:`md`,children:[(0,g.jsxs)(`div`,{className:`grid lg:grid-cols-2`,children:[(0,g.jsxs)(`div`,{className:`border-b border-line p-5 lg:border-b-0 lg:border-r`,children:[(0,g.jsxs)(`div`,{className:`mb-4 flex items-center gap-3`,children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-7 w-7 place-items-center rounded-full bg-accent text-xs font-semibold text-accent-ink`,children:`1`}),(0,g.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:f(`rk.pickFromSsh`)})]}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,g.jsx)(d,{label:f(`rk.pickFromSsh`),children:(0,g.jsxs)(`select`,{value:ae,disabled:$,onChange:e=>void se(e.target.value),className:u,children:[(0,g.jsx)(`option`,{value:``,children:f(`rk.typeInstead`)}),V.map(e=>(0,g.jsx)(`option`,{value:e.id,children:e.fingerprint===``?e.relativePath:`${e.relativePath} · ${e.fingerprint}`},e.id))]})}),(0,g.jsx)(d,{label:f(`rk.publicKeyFile`),children:(0,g.jsx)(`input`,{value:C,disabled:$,onChange:e=>X(w)(e.target.value),className:`${u} font-mono`})})]})]}),(0,g.jsxs)(`div`,{className:`p-5`,children:[(0,g.jsxs)(`div`,{className:`mb-4 flex items-center gap-3`,children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-7 w-7 place-items-center rounded-full bg-surface text-xs font-semibold text-ink-muted`,children:`2`}),(0,g.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:f(`rk.hostAlias`)})]}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,g.jsx)(d,{label:f(`rk.hostSearch`),children:(0,g.jsx)(`input`,{type:`search`,"aria-label":f(`rk.hostAlias`),value:m,disabled:$,placeholder:f(`rk.hostSearchPlaceholder`),onChange:e=>{v.length===0&&Y(),h(e.target.value)},className:`${u} font-mono`})}),K.length===0?(0,g.jsx)(`p`,{className:`text-xs text-ink-muted`,children:f(`rk.hostTypeHint`)}):(0,g.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-line`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-line bg-surface-subtle px-3 py-2`,children:[(0,g.jsx)(`span`,{className:`text-xs text-ink-muted`,children:f(`rk.hostsSelected`,{count:v.length})}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`button`,{type:`button`,disabled:$||q.length===0,onClick:le,className:`text-xs text-accent hover:underline disabled:text-ink-faint disabled:no-underline`,children:f(`rk.selectMatches`)}),(0,g.jsx)(`button`,{type:`button`,disabled:$||v.length===0,onClick:ue,className:`text-xs text-ink-muted hover:text-ink disabled:text-ink-faint`,children:f(`rk.clearSelection`)})]})]}),(0,g.jsx)(`div`,{role:`group`,"aria-label":f(`rk.hostChoices`),className:`max-h-44 overflow-y-auto p-1.5`,children:q.length===0?(0,g.jsx)(`p`,{className:`px-2 py-4 text-center text-xs text-ink-muted`,children:f(`rk.noHostMatches`)}):q.map(e=>(0,g.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-select-fill`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:v.includes(e),disabled:$,onChange:()=>ce(e)}),(0,g.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e})]},e))})]})]})]})]}),(0,g.jsx)(`div`,{className:`border-t border-line bg-surface-subtle p-5`,children:(0,g.jsx)(d,{label:f(`rk.publicKeyLine`),children:(0,g.jsx)(`textarea`,{value:T,disabled:$,onChange:e=>X(E)(e.target.value),rows:3,className:`${u} font-mono text-xs leading-5`})})}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-line px-5 py-4`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-ink-muted`,children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`h-2 w-2 rounded-full ${D.length===0?`bg-ink-faint`:`bg-live`}`}),D.length===0?f(`rk.showWhatWouldHappen`):f(`rk.plannedHosts`,{count:D.length})]}),(0,g.jsxs)(`div`,{className:`flex w-full flex-col gap-2 sm:w-auto sm:flex-row`,children:[(0,g.jsx)(c,{className:`w-full sm:w-auto`,disabled:$,onClick:()=>void de(),children:f(`rk.showWhatWouldHappen`)}),D.length>0&&Q.length===0?null:(0,g.jsx)(c,{className:`w-full sm:w-auto`,kind:`primary`,disabled:pe,onClick:()=>void fe(),children:Q.length>1?f(`rk.registerMany`,{count:Q.length}):f(`rk.register`)})]})]})]}),D.length>0?(0,g.jsxs)(o,{as:`section`,"aria-labelledby":`remote-key-plan-heading`,radius:`md`,className:`text-sm`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-line bg-surface-subtle px-5 py-4`,children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-7 w-7 place-items-center rounded-full bg-live text-xs font-semibold text-accent-ink`,children:`3`}),(0,g.jsx)(`h3`,{id:`remote-key-plan-heading`,className:`font-semibold`,children:D.length===1?f(`rk.confirmHeading`):f(`rk.confirmManyHeading`,{count:D.length})})]}),(0,g.jsx)(`div`,{className:`divide-y divide-line`,children:D.map(({plan:e})=>(0,g.jsx)(b,{plan:e,manual:!e.supported||j.has(e.alias)},e.alias))}),Z.length>0?(0,g.jsxs)(`div`,{className:`border-t border-notice-line bg-notice p-4`,children:[(0,g.jsx)(`h4`,{className:`font-medium text-notice-ink`,children:f(`rk.connectingRuns`)}),(0,g.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:Z.map(({alias:e,directive:t})=>(0,g.jsxs)(`li`,{children:[(0,g.jsxs)(`span`,{className:`text-ink-muted`,children:[e,` · `,t.keyword,` at `,t.path,`:`,t.line]}),(0,g.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-ink`,children:t.command})]},`${e}:${t.path}:${t.line}:${t.keyword}`))}),(0,g.jsx)(ee,{className:`mt-2`,label:f(`rk.acknowledgeRuns`),checked:k,onChange:A,tone:`notice`})]}):null]}):null,N.length>0?(0,g.jsxs)(o,{as:`section`,radius:`md`,className:`text-sm`,children:[(0,g.jsx)(`h3`,{className:`px-4 pt-4 font-semibold text-live`,children:f(`rk.result`)}),(0,g.jsx)(`ul`,{className:`mt-2 divide-y divide-line`,children:N.map(e=>(0,g.jsxs)(`li`,{className:`grid gap-1 px-4 py-3 sm:grid-cols-[12rem_minmax(0,1fr)]`,children:[(0,g.jsx)(`span`,{className:`font-mono font-medium`,children:e.alias}),(0,g.jsx)(`div`,{children:e.response===void 0?(0,g.jsx)(`p`,{className:`text-danger`,children:e.error}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`p`,{children:e.response.outcome in _?f(_[e.response.outcome]):e.response.outcome}),e.response.stderr?(0,g.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-ink-muted`,children:e.response.stderr}):null]})})]},e.alias))})]}):null]})}function b({plan:e,manual:t}){let n=l();return(0,g.jsxs)(`article`,{"aria-label":n(`rk.planFor`,{alias:e.alias}),children:[(0,g.jsx)(`h4`,{className:`border-b border-hairline px-5 py-3 font-mono font-semibold text-ink`,children:e.alias}),(0,g.jsxs)(`div`,{className:`grid lg:grid-cols-[minmax(0,1fr)_minmax(0,1.15fr)]`,children:[(0,g.jsx)(`dl`,{className:`border-b border-line lg:border-b-0 lg:border-r`,children:[[n(`rk.effectiveUser`),e.user===``?n(`rk.noUser`):e.user],[n(`rk.destination`),`${e.hostname}:${e.port}`],[n(`rk.valuesCameFrom`),e.valuesFrom in v?n(v[e.valuesFrom]):e.valuesFrom],[n(`rk.keyFile`),e.keyPath],[n(`rk.fingerprint`),e.fingerprint]].map(([e,t])=>(0,g.jsxs)(`div`,{className:`grid gap-1 border-t border-hairline px-5 py-3 first:border-t-0 sm:grid-cols-[9rem_minmax(0,1fr)]`,children:[(0,g.jsx)(`dt`,{className:`text-xs font-medium text-ink-muted`,children:e}),(0,g.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-xs`,children:t})]},e))}),(0,g.jsxs)(`div`,{className:`p-5`,children:[(0,g.jsx)(`p`,{children:n(`rk.appendTo`,{remotePath:e.remotePath,account:e.user===``?n(`rk.theRemoteAccount`):n(`rk.usersAccount`,{user:e.user}),hostname:e.hostname})}),(0,g.jsx)(`pre`,{"aria-label":n(`rk.keyLineLabel`),className:`mt-3 overflow-x-auto rounded-lg border border-line bg-canvas p-3 font-mono text-xs`,children:e.keyLine}),(0,g.jsx)(`div`,{className:`mt-2`,children:(0,g.jsx)(f,{value:e.keyLine,label:`copy.keyLine`})}),(0,g.jsx)(`p`,{className:`mt-5 text-ink-muted`,children:n(`rk.remoteRuns`)}),(0,g.jsx)(`pre`,{"aria-label":n(`rk.remoteCommandLabel`),className:`mt-2 overflow-x-auto rounded-lg border border-line bg-canvas p-3 font-mono text-xs`,children:e.routine}),(0,g.jsx)(`div`,{className:`mt-1`,children:(0,g.jsx)(f,{value:e.routine,label:`copy.remoteCommand`})}),t?(0,g.jsxs)(`div`,{className:`mt-4 rounded-lg bg-surface-subtle p-3`,children:[(0,g.jsx)(`h5`,{className:`font-medium text-notice-ink`,children:n(`rk.manualHeading`)}),(0,g.jsx)(`ol`,{className:`mt-1 list-decimal pl-5`,children:e.manual.map(e=>(0,g.jsx)(`li`,{children:e},e))})]}):null]})]})]})}function x(e,t,n){let i=r(e);return i===``?t(n):t(`rk.withCode`,{message:t(n),code:i})}async function S(e,t,n){let r=Array(e.length),i=0;async function a(){for(;ia())),r}export{y as RemoteKeyPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SFTPWorkspace-Cifnx1fQ.js b/internal/ui/dist/assets/SFTPWorkspace-Cifnx1fQ.js deleted file mode 100644 index 94982bc95..000000000 --- a/internal/ui/dist/assets/SFTPWorkspace-Cifnx1fQ.js +++ /dev/null @@ -1,4 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MonacoEditor-BZDkteXl.js","assets/jsx-runtime-QtymfJMM.js","assets/index-DJ8h9zNi.js","assets/surface-Ck_FblzE.js","assets/form-C1olpQVF.js","assets/clipboard-ObSO6ZLv.js","assets/index-BmAKYKBT.css","assets/editor.api-BUrKrayv.js","assets/editor-jjEx9u7D.css","assets/reducedMotion-XhcdVu33.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,t as r}from"./surface-Ck_FblzE.js";import{_ as i}from"./form-C1olpQVF.js";import{t as a}from"./clipboard-ObSO6ZLv.js";import{D as o,F as s,H as c,I as l,J as u,L as d,O as f,U as p,W as m,_ as h,a as g,g as _,h as v,i as y,r as b,s as x,v as S}from"./index-DJ8h9zNi.js";import{i as C,n as w,r as T,t as E}from"./tableSort-CcSWRQGj.js";var D=e();function O(e){return e<1024?`${Math.max(0,e).toLocaleString()} B`:e<1<<20?`${(e/1024).toFixed(1)} KiB`:e<1<<30?`${(e/(1<<20)).toFixed(1)} MiB`:`${(e/(1<<30)).toFixed(1)} GiB`}function k(e){return e.type===`symlink`?e.targetType??`other`:e.type===`file`||e.type===`directory`?e.type:`other`}function A(e){return e.type===`file`||e.type===`directory`}var j=`application/x-sshc-sftp-entries`;function M(e){if(e.includes(`\\`))return null;let t=e.replace(/^\/+/,``).split(`/`);return t.length===0||t.some(e=>e===``||e===`.`||e===`..`||/[\u0000-\u001f]/.test(e))?null:t.join(`/`)}function N(e){let t=new Set;for(let n of e){let e=n.relativePath.split(`/`);e.pop();for(let n=1;n<=e.length;n+=1)t.add(e.slice(0,n).join(`/`))}return[...t].sort((e,t)=>e.split(`/`).length-t.split(`/`).length||e.localeCompare(t))}function P(e){let t=e.slice(-9);return t.length===9?[0,3,6].map(e=>{let n=0;return t[e]===`r`&&(n+=4),t[e+1]===`w`&&(n+=2),t[e+2]!==`-`&&(n+=1),String(n)}).join(``):`600`}var F=t(),I=65536;function ee(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(typeof r.result==`string`?r.result:``),r.onerror=()=>n(r.error??Error(`preview_unreadable`)),r.readAsDataURL(e)})}function te(e){switch(n(e)){case`sftp_not_utf8`:case`sftp_preview_type`:return`sftp.binaryHint`;case`sftp_text_too_large`:case`sftp_preview_too_large`:return`sftp.tooLargeHint`;default:return`sftp.previewUnavailable`}}function L({label:e,children:t}){return(0,F.jsxs)(`div`,{className:`border-t border-hairline py-1.5 first:border-t-0`,children:[(0,F.jsx)(`dt`,{className:`text-[11px] uppercase tracking-wide text-ink-faint`,children:e}),(0,F.jsx)(`dd`,{className:`break-all font-mono text-xs text-ink`,children:t})]})}function ne({alias:e,entries:t,busy:a,onClose:o,onEdit:s,onDownload:c,canDownload:l,onRename:u,returnFocusRef:d}){let m=i(),g=(0,D.useId)(),_=h(v),[y,b]=(0,D.useState)({kind:`idle`}),[x,S]=(0,D.useState)({kind:`idle`}),C=t.length===1?t[0]??null:null,w=C===null?null:k(C),T=C!==null&&w===`file`?C.path:null,E=C!==null&&w===`directory`?C.path:null,A=t.reduce((e,t)=>e+(k(t)===`file`?t.size:0),0),j=C===null?m(`sftp.detailsForCount`,{count:t.length}):m(`sftp.detailsFor`,{name:C.name});(0,D.useEffect)(()=>{if(T===null){b({kind:`idle`});return}let t=!0;return b({kind:`loading`}),(async()=>{try{let n=await ee((await f.previewFile(e,T)).blob);if(!t)return;b({kind:`image`,url:n});return}catch(e){if(!t)return;if(n(e)!==`sftp_preview_type`){b({kind:`unavailable`,reason:te(e)});return}}try{let n=await f.readText(e,T);if(!t)return;b({kind:`text`,contents:n.contents.slice(0,I),truncated:n.contents.length>I})}catch(e){if(!t)return;b({kind:`unavailable`,reason:te(e)})}})(),()=>{t=!1}},[e,T]),(0,D.useEffect)(()=>{if(E===null){S({kind:`idle`});return}let t=!0;return S({kind:`loading`}),f.directoryStats(e,E).then(e=>{t&&S({kind:`loaded`,stats:e})},()=>{t&&S({kind:`unavailable`})}),()=>{t=!1}},[e,E]);let M=(0,F.jsx)(`dl`,{role:`group`,className:`min-h-0 overflow-auto border-t border-line px-3 py-2 md:border-l md:border-t-0`,"aria-label":m(`sftp.properties`),children:C===null?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(L,{label:m(`sftp.selectedItems`),children:t.length.toLocaleString()}),(0,F.jsx)(L,{label:m(`sftp.totalSize`),children:`${A.toLocaleString()} (${O(A)})`})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(L,{label:m(`sftp.path`),children:C.path}),(0,F.jsx)(L,{label:m(`sftp.type`),children:m(`sftp.type.${C.type}`)}),C.type===`symlink`?(0,F.jsx)(L,{label:m(`sftp.linkTarget`),children:C.targetType===void 0?m(`sftp.brokenLink`,{target:C.linkTarget??``}):C.linkTarget??``}):null,(0,F.jsx)(L,{label:m(`sftp.size`),children:w===`file`?`${C.size.toLocaleString()} (${O(C.size)})`:x.kind===`loading`?m(`sftp.calculating`):x.kind===`loaded`?`${x.stats.truncated?m(`sftp.partialSizePrefix`):``}${x.stats.bytes.toLocaleString()} (${O(x.stats.bytes)})`:m(`sftp.sizeUnavailable`)}),w===`directory`&&x.kind===`loaded`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(L,{label:m(`sftp.containedFiles`),children:x.stats.files.toLocaleString()}),(0,F.jsx)(L,{label:m(`sftp.containedDirectories`),children:Math.max(0,x.stats.directories-1).toLocaleString()})]}):null,(0,F.jsx)(L,{label:m(`sftp.modified`),children:(0,F.jsx)(`time`,{dateTime:C.modifiedAt,children:new Date(C.modifiedAt).toLocaleString()})}),(0,F.jsx)(L,{label:m(`sftp.permissions`),children:`${C.mode} (${P(C.mode)})`}),(0,F.jsx)(L,{label:m(`sftp.revision`),children:C.revision})]})});return(0,F.jsxs)(p,{labelledBy:g,onDismiss:o,...d===void 0?{}:{returnFocusRef:d},panelClassName:`flex h-[min(46rem,calc(100dvh-2rem))] w-full max-w-4xl flex-col overflow-hidden rounded-lg`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line bg-toolbar px-3 py-2`,children:[(0,F.jsx)(`h2`,{id:g,className:`min-w-0 grow truncate text-sm font-medium`,children:j}),(0,F.jsx)(`button`,{type:`button`,className:`text-xs text-ink-muted hover:text-ink`,onClick:o,children:m(`sftp.close`)})]}),(0,F.jsxs)(`div`,{className:_?`flex min-h-0 flex-1 flex-col overflow-hidden`:`grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_18rem] overflow-hidden`,children:[(0,F.jsx)(`div`,{role:`group`,className:`min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain bg-surface-subtle p-3`,"aria-label":m(`sftp.preview`),children:C===null?(0,F.jsx)(`ul`,{className:`space-y-1 text-xs`,"aria-label":m(`sftp.selectedItems`),children:t.map(e=>(0,F.jsx)(`li`,{className:`break-all font-mono text-ink-muted`,children:e.path},e.path))}):y.kind===`loading`?(0,F.jsx)(`p`,{className:`text-sm text-ink-muted`,children:m(`sftp.previewLoading`)}):y.kind===`image`?(0,F.jsx)(`img`,{src:y.url,alt:C.name,className:`mx-auto max-h-full max-w-full object-contain`}):y.kind===`text`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`pre`,{className:`whitespace-pre-wrap break-all font-mono text-xs text-ink`,children:y.contents}),y.truncated?(0,F.jsx)(`p`,{className:`mt-2 text-xs text-ink-muted`,children:m(`sftp.previewTruncated`)}):null]}):y.kind===`unavailable`?(0,F.jsx)(`p`,{className:`text-sm text-ink-muted`,children:m(y.reason)}):(0,F.jsx)(`p`,{className:`text-sm text-ink-muted`,children:m(`sftp.type.${C.type}`)})}),_?(0,F.jsxs)(`details`,{className:`min-h-0 shrink-0 overflow-auto border-t border-line`,children:[(0,F.jsx)(`summary`,{className:`cursor-pointer px-3 py-3 text-sm text-ink-muted`,children:m(`sftp.properties`)}),(0,F.jsx)(`div`,{className:`max-h-40 overflow-auto`,children:M})]}):M]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-line px-3 py-2`,children:[C!==null&&w===`file`?(0,F.jsx)(r,{disabled:a,onClick:()=>s(C),children:m(`sftp.editFile`)}):null,t.some(l)?(0,F.jsx)(r,{disabled:a,onClick:()=>c(t),children:m(`sftp.download`)}):null,C===null?null:(0,F.jsx)(r,{disabled:a,onClick:()=>u(C),children:m(`sftp.rename`)})]})]})}function re(e,t){return C(e,(e,n)=>{switch(t.key){case`type`:return w(e.type,n.type);case`size`:return e.size-n.size;case`modified`:return Date.parse(e.modifiedAt)-Date.parse(n.modifiedAt);case`name`:return w(e.name,n.name)}},t.direction)}var R=500,z=12;function ie({entries:e,loadedEntries:t,parentRowVisible:n,busy:r,locked:i=!1,mobileInteraction:a,onActivate:o,onOpenParent:s,onInteract:c,onContextMenu:l,onRenameKey:u,onDeleteKey:d,onEscape:f}){let[p,m]=(0,D.useState)(()=>new Set),[h,g]=(0,D.useState)(null),_=(0,D.useRef)(null),v=(0,D.useRef)(null),y=(0,D.useRef)(new Map),b=(0,D.useRef)(null),x=(0,D.useRef)(null),S=(0,D.useRef)(null),C=(0,D.useRef)(!1),w=t.filter(e=>p.has(e.path)),T=w.length===1?w[0]??null:null,E=e.length>0&&e.every(e=>p.has(e.path)),O=[...n?[`..`]:[],...e.map(e=>e.path)],k=h!==null&&O.includes(h)?h:O[0]??null;(0,D.useEffect)(()=>()=>{S.current!==null&&globalThis.clearTimeout(S.current.timer)},[]),(0,D.useEffect)(()=>{_.current!==null&&(_.current.indeterminate=w.length>0&&!E)},[E,w.length]),(0,D.useEffect)(()=>{b.current=k===null?null:y.current.get(k)??null}),(0,D.useEffect)(()=>{let e=x.current;if(e===null)return;x.current=null;let t=y.current.get(e);t!==void 0&&(g(e),t.focus())},[t]);function A(e){r||i||(c?.(),o(e))}function j(){x.current=`..`,s()}function M(t,n={}){let r=v.current===null?-1:e.findIndex(e=>e.path===v.current),i=e.findIndex(e=>e.path===t.path);if(n.shift===!0&&r>=0&&i>=0){let t=Math.min(r,i),a=Math.max(r,i);m(r=>{let i=n.additive===!0?new Set(r):new Set;for(let n of e.slice(t,a+1))i.add(n.path);return i})}else if(n.additive===!0){oe(t),v.current=t.path;return}else m(new Set([t.path])),v.current=t.path;c?.()}function N(e,t){if(C.current){C.current=!1;return}if(!(r||i)){if(g(e.path),a&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey){p.size>0?oe(e):A(e);return}M(e,{shift:t.shiftKey,additive:t.metaKey||t.ctrlKey})}}function P(e){g(e);let t=y.current.get(e);t?.focus(),t?.scrollIntoView?.({block:`nearest`})}function F(e,t){t===null?y.current.delete(e):y.current.set(e,t)}function I(e){return(e instanceof Element?e.closest(`[data-row-key]`):null)?.getAttribute(`data-row-key`)??k}function ee(t,n){if(O.length===0)return;let r=n===null?-1:O.indexOf(n),i=O.length-1,a=t.key===`Home`?0:t.key===`End`?i:t.key===`ArrowDown`?r<0?0:Math.min(i,r+1):r<0?i:Math.max(0,r-1),o=O[a];if(o===void 0)return;P(o);let s=e.find(e=>e.path===o);s===void 0||t.ctrlKey||t.metaKey||M(s,{shift:t.shiftKey,additive:!1})}function te(t){return e.find(e=>e.path===t)??null}function L(e){if(r)return;if((e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===`a`){e.preventDefault(),ce();return}let t=e.target instanceof HTMLInputElement,n=I(e.target);switch(e.key){case`ArrowDown`:case`ArrowUp`:case`Home`:case`End`:e.preventDefault(),ee(e,n);return;case` `:{if(t)return;let r=te(n);if(r===null)return;e.preventDefault(),oe(r);return}case`Enter`:{if(t||r||i)return;if(n===`..`){e.preventDefault(),j();return}let a=te(n);if(a===null)return;e.preventDefault(),A(a);return}case`F2`:if(u===void 0)return;e.preventDefault(),u();return;case`Delete`:if(d===void 0)return;e.preventDefault(),d();return;case`Escape`:if(p.size>0){e.preventDefault(),m(new Set),v.current=null;return}if(f===void 0)return;e.preventDefault(),f();return;default:}}function ne(e,t,n){l===void 0||r||i||(p.has(e.path)||(m(new Set([e.path])),v.current=e.path),P(e.path),l(e,t,n))}function re(e,t){l!==void 0&&(e.preventDefault(),ne(t,e.clientX,e.clientY))}function ie(){S.current!==null&&(globalThis.clearTimeout(S.current.timer),S.current=null)}function ae(e,t){if(l===void 0||e.pointerType===`mouse`||r||i)return;ie(),C.current=!1;let{clientX:n,clientY:a}=e,o=globalThis.setTimeout(()=>{S.current=null,C.current=!0,ne(t,n,a)},R);S.current={timer:o,x:n,y:a}}function B(e){let t=S.current;t!==null&&(Math.abs(e.clientX-t.x)>z||Math.abs(e.clientY-t.y)>z)&&ie()}function oe(e){r||(m(t=>{let n=new Set(t);return n.has(e.path)?n.delete(e.path):n.add(e.path),n}),v.current=e.path,c?.())}function se(){m(t=>{let n=new Set(t);for(let t of e)E?n.delete(t.path):n.add(t.path);return n}),c?.()}function ce(){m(t=>{let n=new Set(t);for(let t of e)n.add(t.path);return n}),v.current=e[0]?.path??null,c?.()}function V(){m(t=>{let n=new Set(t);for(let t of e)n.has(t.path)?n.delete(t.path):n.add(t.path);return n}),c?.()}function le(){m(new Set),v.current=null}return{selectedPaths:p,setSelectedPaths:m,selectedEntries:w,selectedEntry:T,allDisplayedSelected:E,rowKeys:O,activeRowKey:k,setFocusedKey:g,focusRow:P,registerRow:F,pendingFocus:x,selectionAnchor:v,activeRow:b,selectAll:_,activate:A,openParent:j,selectEntry:M,clickEntry:N,toggleSelection:oe,toggleAllDisplayed:se,selectAllDisplayed:ce,invertDisplayedSelection:V,clearSelection:le,handleListKeys:L,rowContextMenu:re,beginLongPress:ae,trackLongPress:B,cancelLongPress:ie}}function ae(e){return k(e)===`file`?O(e.size):`—`}function B(e){return k(e)===`directory`?`groups`:`config`}function oe({entry:e}){let t=i();if(e.type!==`symlink`)return(0,F.jsx)(F.Fragment,{children:e.name});let n=e.targetType===void 0?t(`sftp.brokenLink`,{target:e.linkTarget??``}):e.linkTarget??``;return(0,F.jsxs)(F.Fragment,{children:[e.name,(0,F.jsx)(`span`,{className:`font-normal text-ink-muted`,children:` → ${n}`})]})}function se({model:e,entries:t,sort:n,onSort:r,compact:a,mobileInteraction:o,busy:s,locked:c=!1,parentRowVisible:l,draggable:d=()=>!1,onDragStart:f,entryContext:p}){let m=i(),{selectedPaths:h,activeRowKey:g,allDisplayedSelected:_,selectAll:v,registerRow:y,setFocusedKey:b,activate:x,openParent:S,clickEntry:C,toggleSelection:w,toggleAllDisplayed:T,rowContextMenu:D,beginLongPress:O,trackLongPress:k,cancelLongPress:A}=e,j=e=>!o&&d(e);if(a){let e=!o;return(0,F.jsxs)(`ul`,{"aria-label":m(`sftp.entries`),className:`divide-y divide-line/40`,children:[l?(0,F.jsx)(`li`,{"data-row-key":`..`,children:(0,F.jsxs)(`button`,{type:`button`,ref:e=>{y(`..`,e)},tabIndex:g===`..`?0:-1,disabled:s||c,onFocus:()=>b(`..`),onClick:S,className:`flex min-h-11 w-full items-center gap-2 px-2 py-1.5 text-left text-sm hover:bg-hover disabled:text-ink-faint md:min-h-8 md:py-0.5`,children:[(0,F.jsx)(u,{name:`groups`,className:`size-4 text-ink-muted`}),(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono`,children:`..`}),(0,F.jsx)(`span`,{className:`sr-only`,children:m(`sftp.parentDirectory`)})]})}):null,t.map(t=>(0,F.jsxs)(`li`,{"data-row-key":t.path,className:`flex items-center transition-colors ${h.has(t.path)?`bg-select-fill/75`:``}`,onContextMenu:e=>D(e,t),draggable:j(t),onDragStart:e=>f?.(e,t),children:[(0,F.jsx)(`label`,{className:`flex shrink-0 items-center justify-center ${e?`size-8`:`size-11 md:size-8`}`,children:(0,F.jsx)(`input`,{type:`checkbox`,"aria-label":m(`sftp.selectEntry`,{name:t.name}),checked:h.has(t.path),tabIndex:g===t.path?0:-1,disabled:s,onChange:()=>w(t),className:`size-4 accent-accent`})}),(0,F.jsxs)(`button`,{type:`button`,ref:e=>{y(t.path,e)},"aria-label":t.name,"aria-pressed":h.has(t.path),tabIndex:g===t.path?0:-1,className:`flex min-w-0 grow touch-pan-y select-none items-center gap-2 px-2 text-left hover:bg-hover active:bg-select-fill disabled:text-ink-faint ${e?`min-h-8 py-0.5`:`min-h-12 py-2`}`,onFocus:()=>b(t.path),onClick:e=>C(t,e),onDoubleClick:o?void 0:()=>x(t),disabled:s||c,onPointerDown:e=>O(e,t),onPointerMove:k,onPointerUp:A,onPointerCancel:A,children:[(0,F.jsx)(u,{name:B(t),className:`size-4 shrink-0 text-ink-muted`}),e?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,F.jsx)(`span`,{className:`block truncate font-mono text-sm font-medium leading-4 text-ink`,children:(0,F.jsx)(oe,{entry:t})}),p===void 0?null:(0,F.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-3 text-ink-muted`,children:p(t)})]}),(0,F.jsx)(`span`,{className:`shrink-0 whitespace-nowrap text-[11px] text-ink-muted`,children:ae(t)}),(0,F.jsx)(`time`,{className:`hidden shrink-0 whitespace-nowrap text-[11px] text-ink-muted sm:inline`,dateTime:t.modifiedAt,children:new Date(t.modifiedAt).toLocaleDateString()})]}):(0,F.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,F.jsx)(`span`,{className:`block truncate font-mono text-sm font-medium leading-4 text-ink`,children:(0,F.jsx)(oe,{entry:t})}),(0,F.jsxs)(`span`,{className:`mt-0.5 flex min-w-0 gap-2 text-[11px] leading-3 text-ink-muted`,children:[(0,F.jsx)(`span`,{className:`truncate font-mono`,children:p===void 0?t.mode:p(t)}),(0,F.jsx)(`span`,{children:ae(t)}),(0,F.jsx)(`time`,{className:`truncate`,dateTime:t.modifiedAt,children:new Date(t.modifiedAt).toLocaleString()})]})]})]})]},t.path))]})}return(0,F.jsxs)(`table`,{className:`w-full min-w-[44rem] text-left text-sm`,children:[(0,F.jsx)(`thead`,{className:`sticky top-0 bg-toolbar/75 text-xs text-ink-muted`,children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{scope:`col`,className:`w-9 px-2 py-1.5 md:py-1`,children:(0,F.jsx)(`input`,{ref:v,type:`checkbox`,"aria-label":m(`sftp.selectAll`),checked:_,onChange:T,className:`size-4 accent-accent`})}),(0,F.jsx)(E,{column:`name`,activeColumn:n.key,direction:n.direction,onSort:r,className:`px-2 py-1.5 md:py-1`,children:m(`sftp.name`)}),(0,F.jsx)(E,{column:`modified`,activeColumn:n.key,direction:n.direction,onSort:r,className:`px-2 py-1.5 md:py-1`,children:m(`sftp.modified`)}),(0,F.jsx)(E,{column:`size`,activeColumn:n.key,direction:n.direction,onSort:r,className:`px-2 py-1.5 text-right md:py-1`,buttonClassName:`justify-end`,children:m(`sftp.size`)}),(0,F.jsx)(E,{column:`type`,activeColumn:n.key,direction:n.direction,onSort:r,className:`w-24 whitespace-nowrap px-2 py-1.5 md:py-1`,children:m(`sftp.type`)}),(0,F.jsx)(`th`,{scope:`col`,className:`w-28 whitespace-nowrap px-2 py-1.5 md:py-1`,children:m(`sftp.permissions`)})]})}),(0,F.jsxs)(`tbody`,{children:[l?(0,F.jsx)(`tr`,{"data-row-key":`..`,className:`border-t border-line/40 hover:bg-hover/60`,children:(0,F.jsx)(`td`,{className:`px-2 py-1 md:py-0.5`,colSpan:6,children:(0,F.jsxs)(`button`,{type:`button`,ref:e=>{y(`..`,e)},tabIndex:g===`..`?0:-1,disabled:s||c,onFocus:()=>b(`..`),onClick:S,className:`flex w-full items-center gap-2 rounded py-0.5 text-left text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:text-ink-faint`,children:[(0,F.jsx)(u,{name:`groups`,className:`size-4 text-ink-muted`}),(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono`,children:`..`}),(0,F.jsx)(`span`,{className:`sr-only`,children:m(`sftp.parentDirectory`)})]})})}):null,t.map(e=>(0,F.jsxs)(`tr`,{"data-row-key":e.path,"aria-selected":h.has(e.path),onDoubleClick:()=>x(e),onContextMenu:t=>D(t,e),draggable:j(e),onDragStart:t=>f?.(t,e),className:`cursor-default border-t border-line/40 transition-colors ${h.has(e.path)?`bg-select-fill/75`:`hover:bg-hover/55`}`,children:[(0,F.jsx)(`td`,{className:`w-9 px-2 py-1 md:py-0.5`,children:(0,F.jsx)(`input`,{type:`checkbox`,"aria-label":m(`sftp.selectEntry`,{name:e.name}),checked:h.has(e.path),tabIndex:g===e.path?0:-1,disabled:s,onChange:()=>w(e),onDoubleClick:e=>e.stopPropagation(),className:`size-4 accent-accent`})}),(0,F.jsx)(`td`,{className:`max-w-64 px-2 py-1 md:py-0.5`,children:(0,F.jsxs)(`button`,{type:`button`,ref:t=>{y(e.path,t)},"aria-label":e.name,"aria-pressed":h.has(e.path),tabIndex:g===e.path?0:-1,onFocus:()=>b(e.path),onClick:t=>C(e,t),onPointerDown:t=>O(t,e),onPointerMove:k,onPointerUp:A,onPointerCancel:A,className:`flex w-full min-w-0 items-center gap-2 rounded text-left focus:outline-none focus-visible:ring-1 focus-visible:ring-accent`,children:[(0,F.jsx)(u,{name:B(e),className:`size-4 text-ink-muted`}),(0,F.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,F.jsx)(`span`,{className:`block truncate font-mono text-sm font-medium leading-4 text-ink`,children:(0,F.jsx)(oe,{entry:e})}),p===void 0?null:(0,F.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-3 text-ink-muted`,children:p(e)})]})]})}),(0,F.jsx)(`td`,{className:`whitespace-nowrap px-2 py-1 text-xs text-ink-muted md:py-0.5`,children:new Date(e.modifiedAt).toLocaleString()}),(0,F.jsx)(`td`,{className:`px-2 py-1 text-right text-xs text-ink-muted md:py-0.5`,children:ae(e)}),(0,F.jsx)(`td`,{className:`w-24 whitespace-nowrap px-2 py-1 text-xs text-ink-muted md:py-0.5`,children:m(`sftp.type.${e.type}`)}),(0,F.jsx)(`td`,{className:`w-28 whitespace-nowrap px-2 py-1 font-mono text-xs text-ink-muted md:py-0.5`,children:e.mode})]},e.path))]})]})}var ce=(0,D.lazy)(()=>x(async()=>{let{MonacoEditor:e}=await import(`./MonacoEditor-BZDkteXl.js`);return{MonacoEditor:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(({MonacoEditor:e})=>({default:e})));function V({source:e=f,onProblem:t,onSaved:r,onNavigationBlockerChange:a,onDirtyChange:o,onNavigateLocation:s}){let c=i(),[l,u]=(0,D.useState)(null),[d,p]=(0,D.useState)(``),[m,h]=(0,D.useState)(!1),[g,_]=(0,D.useState)(null),v=(0,D.useRef)(0),y=l!==null&&d!==l.file.contents;(0,D.useEffect)(()=>(o?.(y?l?.file.entry.path??``:null),()=>o?.(null)),[y,o,l?.file.entry.path]),(0,D.useEffect)(()=>{if(!y){a?.(null);return}a?.(e=>(_(e),!1));let e=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,e),()=>{a?.(null),window.removeEventListener(`beforeunload`,e)}},[y,a]);function b(){v.current+=1,u(null),p(``),h(!1),_(null)}async function x(r,i){if(y){t(c(`sftp.unsavedBlocked`));return}let a=++v.current;h(!0),t(``);try{let t=await e.readText(r,i.path);if(a!==v.current)return;u({alias:r,file:t}),p(t.contents)}catch(e){if(a!==v.current)return;let r=n(e);t(r===`sftp_not_utf8`||r===`sftp_text_too_large`?c(r===`sftp_not_utf8`?`sftp.binaryHint`:`sftp.tooLargeHint`):r||(e instanceof Error?e.message:`sftp_failed`))}finally{a===v.current&&h(!1)}}async function S(){if(l===null)return;let i=v.current,{alias:a,file:o}=l;h(!0),t(``);try{let t=await e.saveText(a,o.entry.path,d,o.revision);if(i!==v.current)return;let n=await r(a,t);if(i!==v.current||!n)return;u({alias:a,file:t}),p(t.contents)}catch(e){if(i!==v.current)return;t(n(e)===`sftp_conflict`?c(`sftp.conflict`):n(e)||`sftp_failed`)}finally{i===v.current&&h(!1)}}function C(){y?t(c(`sftp.unsavedBlocked`)):b()}function w(){if(g===null)return;let e=g;b(),a?.(null),s?.(`${e.pathname}${e.search}`)}return{opened:l?.file??null,contents:d,setContents:p,dirty:y,busy:m,leaving:g,open:x,save:S,close:b,dismiss:C,discardAndLeave:w,stay:()=>_(null)}}function le({editor:e,busy:t=!1}){let n=i(),a=(0,D.useId)(),{opened:o,contents:s,setContents:l,dirty:u,leaving:d}=e;return(0,F.jsxs)(F.Fragment,{children:[o===null?null:(0,F.jsxs)(p,{labelledBy:`${a}-editor`,onDismiss:e.dismiss,panelClassName:`flex h-[min(52rem,calc(100dvh-2rem))] w-full max-w-6xl flex-col overflow-hidden rounded-lg`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line bg-toolbar px-3 py-2`,children:[(0,F.jsx)(`h2`,{id:`${a}-editor`,className:`min-w-0 grow truncate font-mono text-xs`,children:o.entry.path}),u?(0,F.jsx)(`span`,{className:`text-xs text-notice-ink`,children:n(`sftp.unsaved`)}):null,(0,F.jsx)(r,{disabled:t||e.busy||!u,onClick:()=>void e.save(),children:n(`sftp.save`)}),(0,F.jsx)(`button`,{type:`button`,disabled:u,className:`text-xs text-ink-muted disabled:text-ink-faint`,onClick:e.close,children:n(`sftp.close`)})]}),(0,F.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,F.jsx)(D.Suspense,{fallback:(0,F.jsx)(`div`,{className:`p-4 text-sm text-ink-muted`,children:n(`sftp.editorLoading`)}),children:(0,F.jsx)(ce,{path:o.entry.path,value:s,onChange:l,readOnly:e.busy})})})]}),d===null?null:(0,F.jsx)(c,{id:`${a}-leave`,heading:n(`sftp.leaveHeading`),body:(0,F.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`sftp.leaveBody`,{path:o?.entry.path??``})}),confirmLabel:n(`sftp.leaveDiscard`),cancelLabel:n(`sftp.leaveStay`),onConfirm:e.discardAndLeave,onCancel:e.stay})]})}var ue=`sshc://local`;function de(e){return e.startsWith(`/`)||/^[A-Za-z]:\//.test(e)}var fe=[];function H({aliases:e,hosts:t=fe,value:n,disabled:r=!1,compact:a=!1,includeLocal:o=!1,loadRecent:s,onChange:c}){let d=i(),[f,p]=(0,D.useState)(!1),m=(0,D.useRef)(null),h=d(`sftp.local.connection`),g=o?[{id:`engine`,label:h,detail:d(`sftp.local.engine`),current:n===ue}]:[];function _(e){c(e),p(!1)}return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{ref:m,type:`button`,"aria-label":d(`sftp.host`),"data-value":n,disabled:r||e.length===0&&!o,onClick:()=>p(!0),title:n===`sshc://local`?h:n||d(`sftp.chooseHost`),className:a?`flex size-11 shrink-0 items-center justify-center rounded-md border border-control-line bg-control text-ink-muted active:bg-select-fill disabled:text-ink-faint`:`flex min-h-9 min-w-0 max-w-full items-center justify-between gap-2 rounded-md border border-control-line bg-control px-3 py-1.5 text-left text-sm disabled:text-ink-faint md:min-h-8 md:py-1`,children:a?(0,F.jsx)(u,{name:n===`sshc://local`?`home`:`terminal`,className:`size-4`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`truncate`,children:n===`sshc://local`?h:n||d(e.length===0&&!o?`sftp.noHosts`:`sftp.chooseHost`)}),(0,F.jsx)(u,{name:`chevronRight`,className:`size-3 rotate-90 text-ink-muted`})]})}),(0,F.jsx)(l,{open:f,heading:d(`sftp.chooseHostHeading`),aliases:e,hosts:t,value:n,local:g,...s===void 0?{}:{loadRecent:s},initialFocus:a?`close`:`search`,returnFocusRef:m,onChoose:_,onChooseLocal:()=>_(ue),onClose:()=>p(!1)})]})}function U({busy:e,canBack:t,canForward:n,canHome:r,canRoot:a,onBack:o,onForward:s,onHome:c,onRoot:l}){let d=i();return(0,F.jsxs)(`div`,{role:`group`,"aria-label":d(`sftp.navigation`),className:`flex shrink-0 overflow-hidden rounded-md bg-toolbar/70`,children:[(0,F.jsx)(`button`,{type:`button`,"aria-label":d(`sftp.back`),disabled:e||!t,onClick:o,className:`flex size-9 items-center justify-center text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`←`})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":d(`sftp.forward`),disabled:e||!n,onClick:s,className:`flex size-9 items-center justify-center text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`→`})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":d(`sftp.homeDirectory`),disabled:e||!r,onClick:c,className:`flex size-9 items-center justify-center text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:(0,F.jsx)(u,{name:`home`,className:`size-4`})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":d(`sftp.rootDirectory`),disabled:e||!a,onClick:l,className:`flex size-9 items-center justify-center font-mono text-sm text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:`/`})]})}function pe({browser:e,aliases:t,hosts:n,onHostChange:o,onRefresh:s,busy:c,locked:l=!1,mobile:d,labels:f,leading:p,mobileActions:m}){let h=i(),{alias:g,path:_,connected:v}=e,[y,b]=(0,D.useState)(_),[x,S]=(0,D.useState)(!1),C=(0,D.useRef)(null),w=c||l||!v,T=s??(()=>{e.refresh()}),E=e.crumbs,O=E.at(-1);(0,D.useEffect)(()=>{b(_),S(!1)},[g,_]),(0,D.useEffect)(()=>{x&&(C.current?.focus(),C.current?.select())},[x]);function k(){w||e.load(y.trim())}function A(){b(_),S(!1)}async function j(){try{await a.writeText(_),e.setProblem(``)}catch{e.setProblem(h(`copy.refused`))}}return d?(0,F.jsxs)(`div`,{className:`flex min-h-11 shrink-0 items-center gap-1 border-b border-line/50 pb-1`,children:[(0,F.jsx)(H,{aliases:t,...n===void 0?{}:{hosts:n},value:g,disabled:l,onChange:o,compact:!0,includeLocal:!0}),(0,F.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.back`),disabled:c||l||!e.canBack,onClick:()=>void e.back(),className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted active:bg-select-fill disabled:text-ink-faint`,children:`←`}),x?(0,F.jsxs)(`form`,{className:`flex min-w-0 flex-1 items-center gap-1`,onSubmit:e=>{e.preventDefault(),k()},children:[(0,F.jsx)(`input`,{ref:C,"aria-label":f.input,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Escape`&&A()},className:`h-11 min-w-0 w-full rounded border border-control-line bg-control px-2 font-mono text-base`}),(0,F.jsx)(r,{type:`submit`,disabled:w,children:h(`sftp.go`)})]}):(0,F.jsxs)(`button`,{type:`button`,"data-testid":`sftp-current-path`,"data-path":_,"aria-label":f.editPath,title:_,disabled:w,onClick:()=>S(!0),className:`flex h-11 min-w-0 flex-1 items-center gap-1 rounded px-2 text-left active:bg-select-fill disabled:text-ink-faint`,children:[(0,F.jsx)(`span`,{className:`truncate font-mono text-sm font-medium`,children:O?.label??`/`}),(0,F.jsx)(u,{name:`chevronRight`,className:`size-3 shrink-0 rotate-90 text-ink-muted`})]}),x?(0,F.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.cancel`),onClick:A,className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted`,children:(0,F.jsx)(u,{name:`close`,className:`size-4`})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.refreshDirectory`),disabled:w,onClick:T,className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted active:bg-select-fill disabled:text-ink-faint`,children:(0,F.jsx)(u,{name:`sync`,className:`size-4`})}),m]})]}):(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 border-b border-line/50 pb-1.5 md:pb-1`,children:[(0,F.jsx)(H,{aliases:t,...n===void 0?{}:{hosts:n},value:g,disabled:l,onChange:o,includeLocal:!0}),p,(0,F.jsx)(U,{busy:c||l,canBack:e.canBack,canForward:e.canForward,canHome:v,canRoot:v&&!e.atRoot,onBack:()=>void e.back(),onForward:()=>void e.forward(),onHome:()=>void e.goHome(),onRoot:()=>void e.goRoot()}),(0,F.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.refreshDirectory`),title:h(`sftp.refreshDirectory`),disabled:w,onClick:T,className:`flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint md:size-8`,children:(0,F.jsx)(u,{name:`sync`,className:`size-4`})}),x?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{ref:C,"aria-label":f.input,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),A()):e.key===`Enter`&&(e.preventDefault(),k())},className:`min-w-44 grow rounded-md border border-control-line/70 bg-control px-2 py-1.5 font-mono text-sm outline-none focus:border-accent md:py-1`}),(0,F.jsx)(r,{disabled:w,onClick:k,children:h(`sftp.go`)})]}):(0,F.jsxs)(`div`,{className:`flex min-w-44 grow items-center rounded-md bg-control/60 px-1`,"data-testid":`sftp-current-path`,"data-path":_,children:[(0,F.jsx)(`nav`,{"aria-label":f.path,onClick:e=>{e.target===e.currentTarget&&!w&&S(!0)},title:f.editPath,className:`flex min-w-0 grow cursor-text items-center overflow-x-auto whitespace-nowrap font-mono text-sm`,children:E.map((t,n)=>(0,F.jsxs)(`span`,{className:`flex min-w-0 items-center`,children:[n>0?(0,F.jsx)(u,{name:`chevronRight`,className:`size-3 text-ink-faint`}):null,n===E.length-1?(0,F.jsx)(`span`,{className:`max-w-48 truncate px-1.5 py-1.5 font-medium text-ink md:py-1`,title:t.path,"aria-current":`location`,children:t.label}):(0,F.jsx)(`button`,{type:`button`,disabled:w,onClick:()=>void e.load(t.path),className:`max-w-40 truncate rounded px-1.5 py-1.5 text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint md:py-1`,title:t.path,children:t.label})]},t.path))}),(0,F.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.copyPath`),title:h(`sftp.copyPath`),disabled:!v,onClick:()=>{j()},className:`flex size-8 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:(0,F.jsx)(u,{name:`copy`,className:`size-3.5`})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":f.editPath,title:f.editPath,disabled:w,onClick:()=>S(!0),className:`flex size-8 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:(0,F.jsx)(u,{name:`edit`,className:`size-3.5`})})]})]})}function me(e){return e<60?`${e}s`:e<3600?`${Math.ceil(e/60)}m`:`${Math.floor(e/3600)}h ${Math.ceil(e%3600/60)}m`}var W=`sshc.sftp.queueView`,he=96,ge=560,_e=224,ve=[1,2,3,4,5,6,7,8],ye=[0,30,300,3600],G=1<<20,K=128;function be({label:e,valueBytes:t,min:n,max:r,onCommit:i}){let a=t/G,[o,s]=(0,D.useState)(String(a));(0,D.useEffect)(()=>s(String(a)),[a]);function c(){let e=Number(o);if(!Number.isInteger(e)||er){s(String(a));return}i(e*G)}return(0,F.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,F.jsx)(`span`,{children:e}),(0,F.jsx)(`input`,{type:`number`,inputMode:`numeric`,"aria-label":e,min:n,max:r,step:1,value:o,onChange:e=>s(e.target.value),onBlur:c,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(s(String(a)),e.currentTarget.blur())},className:`w-16 rounded border border-control-line bg-control px-1 py-0.5 text-right text-xs tabular-nums`}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`MiB`})]})}function xe({label:e,value:t,min:n,max:r,onCommit:i}){let[a,o]=(0,D.useState)(String(t));(0,D.useEffect)(()=>o(String(t)),[t]);function s(){let e=Number(a);if(!Number.isInteger(e)||er){o(String(t));return}i(e)}return(0,F.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,F.jsx)(`span`,{children:e}),(0,F.jsx)(`input`,{type:`number`,inputMode:`numeric`,"aria-label":e,min:n,max:r,step:1,value:a,onChange:e=>o(e.target.value),onBlur:s,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(o(String(t)),e.currentTarget.blur())},className:`w-14 rounded border border-control-line bg-control px-1 py-0.5 text-right text-xs tabular-nums`})]})}function q(e){return Math.min(ge,Math.max(he,Math.round(e)))}function J(){try{let e=JSON.parse(window.localStorage.getItem(W)??`{}`),t=typeof e==`object`&&e?e:{},n=typeof t.height==`number`?q(t.height):_e;return{collapsed:t.collapsed===void 0||t.collapsed===!0,height:n}}catch{return{collapsed:!0,height:_e}}}function Se(e){try{window.localStorage.setItem(W,JSON.stringify(e))}catch{}}function Ce(e){return e===`failed`?`text-danger`:e===`completed`?`text-live`:e===`needs_overwrite`||e===`reconcile`?`text-notice-ink`:`text-ink-muted`}function we(e){return e.direction===`remote`&&e.status===`reattach`&&e.problem===`sftp_reconciliation_required`}function Te({openRequest:e=0}){let t=i(),[r,a]=(0,D.useState)(J),c=h(v),[l,d]=(0,D.useState)(!1),f=(0,D.useRef)(0);(0,D.useEffect)(()=>{e===0||f.current===e||(f.current=e,a(e=>{let t={...e,collapsed:!1};return Se(t),t}),c&&d(!0))},[e,c]);let g=(0,D.useRef)(null),_=(0,D.useRef)(null),y=(0,D.useId)(),[b,x]=(0,D.useState)(!1),[S,C]=(0,D.useState)(``),w=c?!l:r.collapsed,T=(0,D.useRef)(null),E=(0,D.useRef)(null),k=(0,D.useRef)(null),A=(0,D.useSyncExternalStore)(o.subscribe,o.getSnapshot),j=(0,D.useMemo)(()=>{let e=new Map;for(let t of A)e.set(t.batchId,[...e.get(t.batchId)??[],t]);return[...e.entries()]},[A]),M=A.some(e=>e.allowedActions.includes(`pause`)),N=A.some(e=>e.allowedActions.includes(`resume`)&&e.status!==`needs_overwrite`),P=A.some(e=>e.allowedActions.includes(`cancel`)),I=A.some(e=>(e.status===`completed`||e.status===`cancelled`)&&e.allowedActions.includes(`remove`)),ee=A.some(e=>e.status===`failed`&&e.allowedActions.includes(`remove`)),te=M||N||P||I||ee,L=A.filter(e=>e.status===`queued`),ne=o.getMaxConcurrent(),re=o.getClearCompletedAfter(),R=o.getProcessingStopped(),z=o.getLargeFileThreshold(),ie=o.getLargeFileParallelism(),ae=o.getLargeFileChunkBytes(),B=A.filter(e=>e.status!==`completed`&&e.status!==`cancelled`&&e.status!==`failed`),oe=A.filter(e=>e.status===`running`),se=B.reduce((e,t)=>e+Math.max(t.totalBytes,0),0),ce=B.reduce((e,t)=>e+Math.max(t.transferredBytes,0),0),V=se>0?Math.min(100,Math.round(ce/se*100)):0,le=oe.reduce((e,t)=>e+Math.max(t.bytesPerSecond,0),0),ue=r.height,de=ge;function fe(){x(!1),d(!1)}function H(e){a(t=>{let n={...t,...e};return Se(n),n})}function U(e,t=!1){a(n=>{let r={...n,height:e};return t&&Se(r),r})}function pe(e){e.preventDefault();let t=e.clientY,n=ue,r=e=>{U(Math.min(de,Math.max(he,Math.round(n+(t-e.clientY)))))},i=()=>{window.removeEventListener(`pointermove`,r),window.removeEventListener(`pointerup`,i),window.removeEventListener(`pointercancel`,i),a(e=>(Se(e),e))};window.addEventListener(`pointermove`,r),window.addEventListener(`pointerup`,i),window.addEventListener(`pointercancel`,i)}function W(e){e===`Home`?U(he,!0):e===`End`?U(ge,!0):e===`ArrowUp`?U(q(ue+32),!0):e===`ArrowDown`&&U(q(ue-32),!0)}function _e(e){G(()=>o.applySettings(e.maxConcurrent??ne,e.clearCompletedAfterSeconds??re,e.processingStopped??R,e.largeFileThresholdBytes??z,e.largeFileParallelism??ie,e.largeFileChunkBytes??ae))}function G(e){C(``),e().catch(async e=>{await o.reconcile().catch(()=>void 0);let r=n(e)||(e instanceof Error?e.message:``);C(t(r===`sftp_transfer_state`?`sftp.manager.controlChanged`:r===`sftp_failed`||r===`sftp_cleanup_pending`?`sftp.manager.cleanupFailed`:`sftp.manager.controlFailed`))})}m({open:b,containerRefs:[T],onDismiss:()=>x(!1),returnFocusRef:k}),s({open:b,menuRef:E,onClose:()=>x(!1)});let Te=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,F.jsx)(`span`,{className:c?``:`hidden sm:inline`,children:t(`sftp.manager.concurrency`)}),(0,F.jsx)(`select`,{"aria-label":t(`sftp.manager.concurrency`),value:ne,onChange:e=>_e({maxConcurrent:Number(e.target.value)}),className:`rounded border border-control-line bg-control px-1 py-0.5 text-xs`,children:ve.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))})]}),(0,F.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,F.jsx)(`span`,{className:c?``:`hidden md:inline`,children:t(`sftp.manager.autoClear`)}),(0,F.jsx)(`select`,{"aria-label":t(`sftp.manager.autoClear`),value:ye.includes(re)?re:0,onChange:e=>_e({clearCompletedAfterSeconds:Number(e.target.value)}),className:`rounded border border-control-line bg-control px-1 py-0.5 text-xs`,children:ye.map(e=>(0,F.jsx)(`option`,{value:e,children:e===0?t(`sftp.manager.autoClearOff`):me(e)},e))})]}),(0,F.jsx)(be,{label:t(`sftp.manager.largeFileThreshold`),valueBytes:z,min:16,max:1024,onCommit:e=>_e({largeFileThresholdBytes:e})}),(0,F.jsx)(xe,{label:t(`sftp.manager.largeFileParallelism`),value:ie,min:1,max:K,onCommit:e=>_e({largeFileParallelism:e})}),(0,F.jsx)(be,{label:t(`sftp.manager.largeFileChunk`),valueBytes:ae,min:8,max:4096,onCommit:e=>_e({largeFileChunkBytes:e})})]}),Ee=(0,F.jsxs)(`section`,{className:c?`flex min-h-0 flex-1 flex-col text-sm`:`relative mt-3 shrink-0 overflow-visible rounded-md border border-line/60 bg-toolbar/30 text-xs md:mt-2`,"aria-labelledby":y,children:[c||w||A.length===0?null:(0,F.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,"aria-label":t(`sftp.manager.resize`),"aria-valuenow":ue,"aria-valuemin":he,"aria-valuemax":de,tabIndex:0,onPointerDown:pe,onKeyDown:e=>{[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)&&(e.preventDefault(),W(e.key))},className:`group absolute inset-x-0 -top-3 z-10 flex h-6 touch-none cursor-row-resize items-center justify-center focus:outline-none`,children:(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`h-1 w-10 rounded-full bg-control-line transition-colors group-hover:bg-ink-muted group-active:bg-accent group-focus-visible:bg-accent`})}),(0,F.jsxs)(`div`,{className:`relative flex shrink-0 items-center gap-2 px-3 ${c?`min-h-14 border-b border-line py-1`:`min-h-9 flex-wrap py-1.5 md:min-h-8 md:py-1`}`,children:[c?(0,F.jsx)(`h3`,{id:y,className:`min-w-0 flex-1 truncate font-medium`,children:t(`sftp.manager.heading`)}):(0,F.jsxs)(`button`,{type:`button`,"aria-label":t(w?`sftp.manager.expand`:`sftp.manager.collapse`),"aria-expanded":!w,"aria-controls":`${y}-jobs`,onClick:()=>H({collapsed:!w}),className:`flex min-w-0 items-center gap-1.5 rounded ${w?`after:absolute after:inset-0 after:cursor-pointer after:rounded-md`:``} hover:text-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-accent`,children:[(0,F.jsx)(u,{name:`chevronRight`,className:`size-3 transition-transform ${w?``:`rotate-90`}`}),(0,F.jsx)(`h3`,{id:y,className:`${w?`text-ink-muted`:`text-ink`} truncate font-medium`,children:t(`sftp.manager.heading`)})]}),w?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`min-w-0 grow truncate font-medium text-ink`,children:B.length>0?t(`sftp.manager.summaryRunning`,{count:B.length,progress:V,speed:O(le)}):t(`sftp.manager.summaryIdle`,{count:A.length})}),se>0?(0,F.jsx)(`progress`,{className:`hidden w-28 sm:block`,max:se,value:ce}):null]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,"aria-pressed":R,"aria-label":t(R?`sftp.manager.startProcessing`:`sftp.manager.stopProcessing`),onClick:()=>_e({processingStopped:!R}),className:`flex size-9 items-center justify-center rounded md:size-7 ${R?`text-notice-ink`:`text-ink-muted`} hover:bg-select-fill focus:bg-select-fill focus:outline-none`,children:(0,F.jsx)(`span`,{"aria-hidden":`true`,children:R?`▶`:`⏸`})}),c?null:Te]}),(0,F.jsxs)(`div`,{ref:T,className:`relative ml-auto`,children:[te?(0,F.jsx)(`button`,{ref:k,type:`button`,"aria-label":t(`sftp.manager.actions`),"aria-haspopup":`menu`,"aria-expanded":b,onClick:()=>x(e=>!e),className:`flex size-8 items-center justify-center rounded text-ink-muted hover:bg-select-fill hover:text-ink focus:bg-select-fill focus:outline-none`,children:(0,F.jsx)(u,{name:`moreHorizontal`,className:`size-4`})}):null,b?(0,F.jsxs)(`div`,{ref:E,role:`menu`,"aria-label":t(`sftp.manager.actions`),className:`absolute right-0 z-20 w-48 rounded-lg border border-control-line bg-card p-1 shadow-lg ${c?`top-full mt-1`:`bottom-full mb-1`}`,children:[M?(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{x(!1),G(()=>o.pauseAll())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.pauseAll`)}):null,N?(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{x(!1),G(()=>o.resumeAll())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.resumeAll`)}):null,P?(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{x(!1),G(()=>o.cancelAll())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm text-danger hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.cancelAll`)}):null,I?(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{x(!1),G(()=>o.clearFinished())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.transfer.clear`)}):null,ee?(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{x(!1),G(()=>o.clearFailed())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.clearFailed`)}):null]}):null]}),c?(0,F.jsx)(`button`,{ref:_,type:`button`,"aria-label":t(`sftp.manager.close`),onClick:fe,className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-select-fill`,children:(0,F.jsx)(u,{name:`close`,className:`size-4`})}):null]}),c?(0,F.jsxs)(`details`,{className:`shrink-0 border-b border-line px-3`,children:[(0,F.jsx)(`summary`,{className:`cursor-pointer py-3 text-sm text-ink-muted`,children:t(`sftp.manager.settings`)}),(0,F.jsx)(`div`,{className:`flex max-h-40 flex-wrap items-center gap-3 overflow-y-auto pb-3`,children:Te})]}):null,S===``?null:(0,F.jsxs)(`div`,{role:`alert`,className:`mx-2.5 mb-2 flex items-start gap-2 rounded bg-danger/10 px-2.5 py-2 text-danger`,children:[(0,F.jsx)(`span`,{className:`grow`,children:S}),(0,F.jsx)(`button`,{type:`button`,"aria-label":t(`sftp.manager.dismissError`),onClick:()=>C(``),className:`shrink-0 text-ink-muted hover:text-ink`,children:`×`})]}),c&&A.length===0?(0,F.jsx)(`p`,{className:`p-6 text-center text-ink-muted`,children:t(`sftp.manager.summaryIdle`,{count:0})}):null,w||A.length===0?null:(0,F.jsx)(`div`,{id:`${y}-jobs`,style:c?void 0:{height:ue},className:`space-y-1.5 overflow-auto overscroll-contain px-2.5 pb-2.5 ${c?`min-h-0 flex-1 pt-2`:``}`,children:j.map(([e,n])=>{let r=n[0],i=n.filter(e=>e.status===`failed`).length,a=n.filter(e=>e.status===`completed`).length;return(0,F.jsxs)(`section`,{className:`rounded-md bg-surface-subtle/70 p-2`,"aria-label":r.batchName,children:[(0,F.jsxs)(`div`,{className:`mb-1 flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,children:r.operation===`delete`?`×`:r.operation===`put`||r.direction===`upload`?`↑`:r.operation===`get`||r.direction===`download`?`↓`:`⇄`}),(0,F.jsx)(`span`,{className:`min-w-0 grow truncate font-medium`,title:r.batchName,children:r.batchName}),(0,F.jsx)(`span`,{className:`text-ink-muted`,children:t(r.batchKind===`folder`?`sftp.manager.folder`:`sftp.manager.file`)}),(0,F.jsxs)(`span`,{className:`tabular-nums text-ink-muted`,children:[a,`/`,n.length]}),i>0?(0,F.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>o.retryFailed(e)),children:t(`sftp.manager.retryFailed`,{count:i})}):null]}),(0,F.jsx)(`ul`,{className:`space-y-1`,"aria-label":t(`sftp.manager.items`),children:n.map(e=>{let n=e.totalBytes>=0?e.totalBytes:Math.max(e.transferredBytes,1),r=e.direction===`upload`&&(e.status===`queued`||e.status===`paused`||e.status===`reattach`||e.status===`needs_overwrite`)&&!o.hasUploadSource(e.id),i=we(e)?`reconcile`:r?`reattach`:e.status;return(0,F.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-2 gap-y-1`,children:[(0,F.jsx)(`span`,{className:`truncate font-mono`,title:`${e.alias}:${e.remotePath}`,children:e.name}),(0,F.jsxs)(`span`,{className:`flex items-center justify-self-end gap-1`,children:[(0,F.jsx)(`progress`,{className:`w-14`,max:Math.max(n,1),value:e.transferredBytes}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink-muted`,children:e.operation===`delete`?`${e.transferredBytes}/${Math.max(e.totalBytes,0)}`:e.totalBytes<0?O(e.transferredBytes):`${O(e.transferredBytes)}/${O(e.totalBytes)}`})]}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink-muted`,children:e.operation===`delete`?t(`sftp.manager.delete`):e.bytesPerSecond>0?`${O(e.bytesPerSecond)}/s`:`—`}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink-muted`,children:e.remainingSeconds>=0&&e.status===`running`?t(`sftp.manager.remaining`,{duration:me(e.remainingSeconds)}):`—`}),(0,F.jsxs)(`span`,{className:`col-span-2 flex flex-wrap items-center justify-end gap-2 whitespace-nowrap`,children:[(0,F.jsx)(`span`,{className:Ce(i),children:i===`failed`?e.problem===``?t(`sftp.manager.status.failed`):`${t(`sftp.manager.status.failed`)} · ${e.problem}`:t(R&&i===`queued`?`sftp.manager.status.held`:`sftp.manager.status.${i}`)}),e.status===`queued`&&L.length>1?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,"aria-label":t(`sftp.manager.moveUp`,{name:e.name}),disabled:L[0]?.id===e.id,onClick:()=>G(()=>o.move(e.id,`up`)),className:`flex size-9 items-center justify-center rounded text-accent disabled:text-ink-faint md:size-5`,children:`↑`}),(0,F.jsx)(`button`,{type:`button`,"aria-label":t(`sftp.manager.moveDown`,{name:e.name}),disabled:L[L.length-1]?.id===e.id,onClick:()=>G(()=>o.move(e.id,`down`)),className:`flex size-9 items-center justify-center rounded text-accent disabled:text-ink-faint md:size-5`,children:`↓`})]}):null,!r&&e.allowedActions.includes(`pause`)?(0,F.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>o.pause(e.id)),children:t(`sftp.transfer.pause`)}):null,!r&&e.allowedActions.includes(`resume`)&&e.status!==`needs_overwrite`?(0,F.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>o.resume(e.id)),children:t(`sftp.transfer.resume`)}):null,e.allowedActions.includes(`retry`)?(0,F.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>o.retry(e.id)),children:t(`sftp.manager.retry`)}):null,!r&&e.allowedActions.includes(`resume`)&&e.status===`needs_overwrite`?(0,F.jsx)(`button`,{type:`button`,className:`text-notice-ink`,onClick:()=>G(()=>o.overwrite(e.id)),children:t(`sftp.overwrite`)}):null,e.allowedActions.includes(`cancel`)?(0,F.jsx)(`button`,{type:`button`,className:`text-danger`,onClick:()=>G(()=>o.cancel(e.id)),children:t(`sftp.cancel`)}):null,e.allowedActions.includes(`remove`)?(0,F.jsx)(`button`,{type:`button`,className:`text-ink-muted hover:text-ink`,onClick:()=>G(()=>o.remove(e.id)),children:t(`sftp.manager.remove`)}):null]})]},e.id)})})]},e)})})]});return c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{ref:g,type:`button`,"aria-label":t(`sftp.manager.expand`),"aria-haspopup":`dialog`,"aria-expanded":l,onClick:()=>d(!0),className:`relative mt-1 flex min-h-11 shrink-0 items-center gap-2 overflow-hidden rounded-md border border-line/60 bg-toolbar/50 px-3 text-left text-xs active:bg-select-fill`,children:[(0,F.jsx)(u,{name:`chevronRight`,className:`size-3 -rotate-90 text-ink-muted`}),(0,F.jsx)(`span`,{className:`shrink-0 font-medium`,children:t(`sftp.manager.heading`)}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-ink-muted`,children:B.length>0?t(`sftp.manager.summaryRunning`,{count:B.length,progress:V,speed:O(le)}):t(`sftp.manager.summaryIdle`,{count:A.length})}),se>0?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`absolute bottom-0 left-0 h-0.5 bg-accent transition-[width]`,style:{width:`${V}%`}}):null]}),(0,F.jsx)(p,{open:l,labelledBy:y,onDismiss:fe,closeOnOutside:!0,initialFocusRef:_,returnFocusRef:g,placement:`sheet`,panelClassName:`flex h-[min(36rem,85dvh)] max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-xl`,children:Ee})]}):Ee}function Ee(e){if(e===`/`)return`/`;let t=e.split(`/`).filter(Boolean);return t.pop(),`/${t.join(`/`)}`||`/`}function De(e,t){return`${e===`/`?``:e}/${t}`}var Y={connect:!0,edit:!0,createEntries:!0,rename:!0,chmod:!0,delete:!0,search:!0,details:!0,browserUpload:!0,download:!0,dragOut:!0,terminal:!0};function X(e){return{alias:e,local:!1,can:Y,list:t=>f.list(e,t),parentOf:Ee,join:De,isRoot:e=>e===`/`,rootOf:()=>`/`,crumbs(e){let t=e.split(`/`).filter(Boolean);return[{label:`/`,path:`/`},...t.map((e,n)=>({label:e,path:`/${t.slice(0,n+1).join(`/`)}`}))]},acceptsPath:e=>e.startsWith(`/`)}}function Oe(e){let t=/^\/\/[^/]+\/[^/]+(?:\/|$)/.exec(e);return t?`${t[0].replace(/\/$/,``)}/`:/^[A-Za-z]:\//.test(e)?e.slice(0,3):`/`}function ke(e){let t=e.replace(/\\/g,`/`),n=Oe(t);if(t===n||t===n.replace(/\/$/,``))return e;let r=t.replace(/\/$/,``),i=r.lastIndexOf(`/`);return if.listLocal(e),parentOf:ke,join:Ae,isRoot:e=>e===Oe(e),rootOf:Oe,crumbs(e,t){let n=e.replace(/\\/g,`/`),r=Oe(n),i=e=>e.path===t?{...e,label:`~`}:e;if(n===r)return[i({label:r,path:r})];let a=n.slice(r.length).split(`/`).filter(Boolean);return[i({label:r,path:r}),...a.map((e,t)=>i({label:e,path:`${r}${a.slice(0,t+1).join(`/`)}`}))]},acceptsPath:e=>e.startsWith(`/`)||/^[A-Za-z]:\//.test(e)};function Z(e){return e===``?null:e===`sshc://local`?je:X(e)}function Me({aliases:e,initialLocation:t=null,onLocationChange:r=()=>void 0,onLoaded:a,onReset:o}){let s=i(),[c,l]=(0,D.useState)(``),[u,d]=(0,D.useState)(``),[f,p]=(0,D.useState)(void 0),[m,h]=(0,D.useState)(!1),[g,_]=(0,D.useState)([]),[v,y]=(0,D.useState)(!1),[b,x]=(0,D.useState)(``),[S,C]=(0,D.useState)(null),[w,T]=(0,D.useState)({paths:[],index:-1}),E=(0,D.useRef)(0),O=(0,D.useRef)(``),k=(0,D.useRef)(!1),A=(0,D.useRef)(r);A.current=r;let j=(0,D.useRef)({alias:c,path:u});j.current={alias:c,path:u};let M=(0,D.useMemo)(()=>Z(c),[c]);function N(t){return t===`sshc://local`||e.includes(t)}async function P(e=j.current.path,t={}){let r=t.alias??j.current.alias,i=Z(r),o=++E.current;if(i===null)return y(!1),null;let c=t.refresh===!0,l=t.record??!c;O.current=e,y(!0),C(e),x(``);try{let t=await i.list(e);if(o!==E.current)return null;let n=t.path!==j.current.path||r!==j.current.alias;return d(t.path),p(t.home),h(!0),_(t.entries),A.current(r,t.path),l&&T(e=>{if(e.paths[e.index]===t.path)return e;let n=[...e.paths.slice(0,e.index+1),t.path];return{paths:n,index:n.length-1}}),a?.(t,{refresh:c,changed:n}),t.entries}catch(e){if(o!==E.current)return null;let t=n(e),r=e instanceof Error?e.message:`sftp_failed`;return x(i.local?t||r:t===`sftp_failed`?s(`sftp.connectionFailed`):t||(e instanceof Error?e.message:s(`sftp.connectionFailed`))),null}finally{o===E.current&&(y(!1),C(null))}}async function F(e,t){let r=++E.current;y(!0),C(e),x(``);try{let e=await t();return r===E.current?e:null}catch(e){return r===E.current&&x(n(e)||(e instanceof Error?e.message:`sftp_failed`)),null}finally{r===E.current&&(y(!1),C(null))}}function I(e){E.current+=1,A.current(e,``),l(e),h(!1),d(``),p(void 0),_([]),T({paths:[],index:-1}),x(``),y(!1),C(null),o?.(),j.current={alias:e,path:``};let t=Z(e);t!==null&&!t.can.connect&&P(``,{alias:e})}(0,D.useEffect)(()=>{if(t===null||k.current)return;let e=Z(t.alias);e===null||!N(t.alias)||t.path!==``&&!e.acceptsPath(t.path)||(k.current=!0,E.current+=1,l(t.alias),d(t.path),h(!1),j.current={alias:t.alias,path:t.path},(!e.can.connect||t.connect===!0)&&P(t.path,{alias:t.alias}))},[e,t?.alias,t?.path]);async function ee(e){let t=w.index+e,n=w.paths[t];n!==void 0&&await P(n,{record:!1})!==null&&T(e=>e.paths[t]===n?{...e,index:t}:e)}let te=w.index>0,L=w.index>=0&&w.indexP(j.current.path),retry:()=>P(O.current),refresh:()=>P(j.current.path,{refresh:!0}),back:()=>ee(-1),forward:()=>ee(1),goHome:()=>P(``),goRoot:()=>P(M===null?`/`:M.rootOf(j.current.path)),openParent:()=>P(M===null?`/`:M.parentOf(j.current.path)),crumbs:M===null||u===``?[]:M.crumbs(u,f)}}function Ne({browser:e,list:t,refreshAfterChange:r,onQueueOpen:s,onInteract:c}){let l=i(),{alias:u,path:d,setProblem:p}=e,m=e.generation,{selectedEntries:h,selectedEntry:g,rowKeys:_,pendingFocus:v,setSelectedPaths:y}=t,[b,x]=(0,D.useState)(!1),[S,C]=(0,D.useState)(null),[w,T]=(0,D.useState)(null),[E,O]=(0,D.useState)(null);function k(e,t=`sftp_failed`){p(n(e)||(e instanceof Error?e.message:t))}function A(e,t){O({label:e,run:async()=>{O(null);try{await t()}catch(e){k(e)}}})}async function j(t){let n=m.current,r=u,i=d;x(!0);try{if(await f.mkdir(r,De(i,t)),n!==m.current)return;v.current=De(i,t),await e.load(i,{alias:r})}catch(e){if(n!==m.current)return;k(e)}finally{x(!1)}}async function M(t){let n=m.current,r=u,i=d,a=De(i,t);x(!0),p(``);try{if(await f.createEmptyFile(r,a),n!==m.current)return;v.current=a,await e.load(i,{alias:r})}catch(e){if(n!==m.current)return;k(e)}finally{x(!1)}}async function N(e,t){let n=m.current,i=u,a=Ee(e.path),o=De(a,t);x(!0);try{if(await f.rename(i,e.path,o),n!==m.current)return;v.current=o,await r(a,i),A(l(`sftp.renamedTo`,{name:t}),async()=>{await f.rename(i,o,e.path),v.current=e.path,await r(a,i)})}catch(e){if(n!==m.current)return;k(e)}finally{x(!1)}}async function F(t,r,i){if(t.type===`symlink`||t.type===`other`)return;let a=m.current,o=u,s=d,c=P(t.mode);x(!0);try{if(await f.chmod(o,t.path,r,t.revision,i),a!==m.current)return;let n=(await e.load(s,{alias:o,refresh:!0}))?.find(e=>e.path===t.path);!i&&n!==void 0&&c!==r&&A(l(`sftp.permissionsChanged`,{mode:r}),async()=>{await f.chmod(o,t.path,c,n.revision,!1),await e.load(s,{alias:o,refresh:!0})})}catch(e){if(a!==m.current)return;p(n(e)===`sftp_conflict`?l(`sftp.conflict`):n(e)||`sftp_failed`)}finally{x(!1)}}async function I(e,t,n){x(!0),p(``);try{await o.addRemoteTransfers(e.map(e=>({sourceAlias:u,sourcePath:e.path,targetAlias:u,targetPath:n(e),kind:e.type===`directory`?`folder`:`file`,name:e.name,totalBytes:e.type===`file`?e.size:-1})),t),y(new Set)}catch(e){k(e)}finally{x(!1)}}async function ee(){if(w===null)return;let e=new Set(o.getSnapshot().map(e=>e.id)),t=()=>{T(null),y(new Set),s()};x(!0),p(``);try{await o.addRemoteTransfers(w.map(e=>({sourceAlias:u,sourcePath:e.path,targetAlias:u,targetPath:e.path,kind:e.type===`directory`?`folder`:`file`,name:e.name,totalBytes:-1})),`delete`),t()}catch(n){o.getSnapshot().some(t=>!e.has(t.id)&&t.operation===`delete`)&&t(),k(n,`delete_failed`)}finally{x(!1)}}function te(){if(h.length===0||b)return;let e=new Set(h.map(e=>e.path)),t=_.slice(_.findIndex(t=>e.has(t))+1).find(t=>!e.has(t));v.current=t??_.filter(t=>!e.has(t)).pop()??`..`,c?.(),T(h)}function L(){g===null||b||(c?.(),C({kind:`rename`,entry:g}))}function ne(e){c?.(),C(e)}async function re(e){c?.();try{await a.writeText(h.map(t=>e===`name`?t.name:t.path).join(` -`))}catch{p(l(`copy.refused`))}}async function R(){try{await a.writeText(d),p(``)}catch{p(l(`copy.refused`))}}return{acting:b,undo:E,dismissUndo:()=>O(null),inputIntent:S,deleting:w,ask:ne,cancelInput:()=>C(null),cancelDelete:()=>{v.current=null,T(null)},deleteSelection:te,renameSelection:L,copySelected:re,copyCurrentPath:R,submit(e){let t=S;t!==null&&(C(null),t.kind===`mkdir`?j(e):t.kind===`createFile`?M(e):t.kind===`rename`?N(t.entry,e):t.kind===`duplicate`?I([t.entry],`copy`,()=>De(Ee(t.entry.path),e)):t.kind===`moveTo`?I(t.entries,`move`,t=>De(e,t.name)):F(t.entry,e,t.recursive))},remove:ee}}function Pe({actions:e,currentPath:t,returnFocusRef:n}){let r=i(),a=(0,D.useId)(),{inputIntent:o,deleting:s}=e;return(0,F.jsxs)(F.Fragment,{children:[s===null?null:(0,F.jsx)(c,{id:`${a}-delete`,heading:s.length===1?r(`sftp.deleteHeading`):r(`sftp.deleteHeadingCount`,{count:s.length}),body:(0,F.jsxs)(`div`,{className:`space-y-2 text-sm text-ink-muted`,children:[s.some(e=>e.type===`directory`)?(0,F.jsx)(`p`,{children:r(`sftp.deleteContentsWarning`)}):null,(0,F.jsx)(`ul`,{className:`max-h-48 space-y-1 overflow-auto`,children:s.map(e=>(0,F.jsx)(`li`,{className:`break-all font-mono`,children:e.path},e.path))})]}),confirmLabel:r(`sftp.delete`),cancelLabel:r(`sftp.cancel`),returnFocusRef:n,onConfirm:()=>void e.remove(),onCancel:e.cancelDelete}),o===null?null:(0,F.jsx)(g,{id:`${a}-input`,heading:r(o.kind===`mkdir`?`sftp.newFolder`:o.kind===`createFile`?`sftp.newFile`:o.kind===`rename`?`sftp.rename`:o.kind===`duplicate`?`sftp.duplicate`:o.kind===`moveTo`?`sftp.moveTo`:o.recursive?`sftp.chmodRecursive`:`sftp.chmod`),label:r(o.kind===`chmod`?`sftp.chmodPrompt`:o.kind===`rename`||o.kind===`duplicate`?`sftp.renamePrompt`:o.kind===`createFile`?`sftp.newFilePrompt`:o.kind===`moveTo`?`sftp.moveToPrompt`:`sftp.mkdirPrompt`),initialValue:o.kind===`mkdir`||o.kind===`createFile`?``:o.kind===`rename`?o.entry.name:o.kind===`duplicate`?`${o.entry.name}.copy`:o.kind===`moveTo`?t:P(o.entry.mode),inputMode:o.kind===`chmod`?`numeric`:`text`,submitLabel:r(o.kind===`mkdir`?`sftp.newFolder`:o.kind===`createFile`?`sftp.newFile`:o.kind===`rename`?`sftp.rename`:o.kind===`duplicate`?`sftp.duplicate`:o.kind===`moveTo`?`sftp.move`:`sftp.chmod`),cancelLabel:r(`sftp.cancel`),returnFocusRef:n,validate:e=>o.kind===`chmod`?/^0?[0-7]{3}$/.test(e)?``:r(`sftp.chmodInvalid`):o.kind===`moveTo`?e.startsWith(`/`)?``:r(`sftp.pathAbsolute`):e===``?r(`sftp.nameRequired`):e.includes(`/`)?r(`sftp.nameInvalid`):o.kind===`rename`&&e===o.entry.name||o.kind===`duplicate`&&e===o.entry.name?r(`sftp.renameUnchanged`):``,onSubmit:e.submit,onCancel:e.cancelInput})]})}function Fe({browser:e,onResults:t}){let{alias:n,path:r,entries:i}=e,[a,o]=(0,D.useState)(null),[s,c]=(0,D.useState)(``),[l,u]=(0,D.useState)(!1),d=(0,D.useRef)(null);(0,D.useEffect)(()=>{l&&d.current?.focus()},[l]);let p=a===null?i:a.entries,m=s.trim().toLocaleLowerCase(),h=e=>m===``||a!==null?e:e.filter(e=>e.name.toLocaleLowerCase().includes(m));async function g(i=s,c=a?.root??r){let l=i.trim();if(n===``||l===``||c===``)return;let u=await e.track(c,()=>f.search(n,c,l));u!==null&&(o({root:u.path,query:u.query,entries:u.entries,truncated:u.truncated}),t?.())}function _(){if(a===null)return;let t=a.root;o(null),c(``),e.load(t)}function v(t,n){return a===null?e.load(t,{alias:n}):g(a.query,a.root)}function y(){a===null?e.refresh():g(a.query,a.root)}function b(e,t){return a===null?t(e)===r:a.root===`/`||e===a.root||e.startsWith(`${a.root}/`)}function x(){o(null),c(``),u(!1)}return{search:a,setSearch:o,filter:s,setFilter:c,normalizedFilter:m,listedEntries:p,matches:h,mobileSearchOpen:l,setMobileSearchOpen:u,searchInput:d,runSearch:g,endSearch:_,refreshAfterChange:v,refreshCurrent:y,covers:b,clear:x}}var Q=new Map;function $(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function Ie(e){let t=$();return Q.set(t,e),t}function Le(e){Q.delete(e)}function Re(e){return Q.get(e)??null}async function ze(e){let t=[],n=new Set,r=async(e,i)=>{let a=i===``?e.name:`${i}/${e.name}`;if(e.isFile&&e.file!==void 0){let n=await new Promise((t,n)=>e.file?.(t,n)),r=M(a);r!==null&&t.push({file:n,relativePath:r});return}if(!e.isDirectory||e.createReader===void 0)return;let o=M(a);o!==null&&n.add(o);let s=e.createReader();for(;;){let e=await new Promise((e,t)=>s.readEntries(e,t));if(e.length===0)break;for(let t of e)await r(t,a)}},i=[...e.items??[]].map(e=>e.webkitGetAsEntry?.()??null);if(i.some(e=>e!==null)){for(let e of i)e!==null&&await r(e,``);return{files:t,directories:[...n]}}return{files:[...e.files].flatMap(e=>{let t=M(e.name);return t===null?[]:[{file:e,relativePath:t}]}),directories:[]}}function Be(e){return M(e)===e&&!e.includes(`/`)}function Ve(e){return e.filter(A)}function He({browser:e,selectedEntries:t,busy:r,counterpart:a=null,onQueueOpen:s}){let c=i(),{alias:l,path:u,connected:d,source:p,setProblem:m}=e,[h,g]=(0,D.useState)(!1),[_,v]=(0,D.useState)(null),[y,b]=(0,D.useState)(!1),[x,S]=(0,D.useState)(0),C=(0,D.useRef)(null),w=(0,D.useRef)(null),T=(0,D.useSyncExternalStore)(o.subscribe,o.getSnapshot),E=(0,D.useRef)(new Set),O=p?.local===!0,P=a!==null&&a.alias===`sshc://local`,F=a!==null&&!P&&a.alias!==``;function I(e,t=`sftp_failed`){m(n(e)||(e instanceof Error?e.message:t))}function ee(){S(e=>e+1),s?.()}(0,D.useEffect)(()=>{if(!d||u===``)return;let t=T.filter(e=>e.status===`completed`&&!E.current.has(e.id)&&(O?e.operation===`get`&&ke(e.remotePath)===u:(e.direction===`upload`||e.operation===`put`)&&e.alias===l&&Ee(e.remotePath)===u));if(t.length!==0){for(let e of t)E.current.add(e.id);e.refresh()}},[T,l,u,d,O]);async function te(t,i=[]){if(l===``||O||t.length===0&&i.length===0||r)return;let a=t.flatMap(e=>{let t=M(e.relativePath);return t===null?[]:[{file:e.file,relativePath:t}]}),s=i.flatMap(e=>{let t=M(e);return t===null?[]:[t]});if(a.length===0&&s.length===0)return;let d=t=>e.source?.join(u,t)??`${u}/${t}`;b(!0),m(``);let p=a.map(e=>({alias:l,remotePath:d(e.relativePath),localName:e.relativePath,file:e.file})),h;try{h=o.reserveUploads(p);let e=[...new Set([...N(a),...s])].sort((e,t)=>e.split(`/`).length-t.split(`/`).length||e.localeCompare(t));for(let t of e)try{await f.mkdir(l,d(t))}catch(e){if(n(e)!==`sftp_exists`)throw e}let t=[...s,...a.map(e=>e.relativePath)].map(e=>e.split(`/`)[0]??e).find(e=>e!==``)??c(`sftp.manager.folder`),r=s.length>0||a.length>1||a.some(e=>e.relativePath.includes(`/`));await o.addUploads(p,{name:r?t:a[0]?.relativePath??t,kind:r?`folder`:`file`},h),h=void 0}catch(e){I(e)}finally{h?.release(),b(!1)}}function L(e,t){let n=Array.from(e.target.files??[]).flatMap(e=>{let n=M(t(e));return n===null?[]:[{file:e,relativePath:n}]});e.target.value=``,te(n)}async function ne(e,t){b(!0);try{await o.addRemoteTransfers(t,e),ee(),m(``)}catch(e){I(e)}finally{b(!1)}}async function re(e){if(!(p===null||u===``)){if(O){if(e.alias===`sshc://local`)return;await ne(`get`,Ve(e.entries).map(t=>({sourceAlias:e.alias,sourcePath:t.path,targetAlias:e.alias,targetPath:Ae(u,t.name),name:t.name,kind:t.type===`directory`?`folder`:`file`,totalBytes:t.size})));return}if(e.alias===`sshc://local`){await ne(`put`,e.entries.map(e=>({sourceAlias:l,sourcePath:e.path,targetAlias:l,targetPath:p.join(u,e.name),name:e.name,kind:e.type===`directory`?`folder`:`file`,totalBytes:e.size})));return}if(e.alias===l){let t=e.entries.filter(e=>Ee(e.path)!==u);t.length>0&&await se({alias:e.alias,entries:t},`move`);return}v(e)}}async function R(e){if(e.preventDefault(),g(!1),r||l===``||!d)return;let t=typeof e.dataTransfer.getData==`function`?e.dataTransfer.getData(j):``;if(t!==``){let e=Re(t);if(e===null||!e.entries.every(e=>Be(e.name))){m(c(`sftp.remoteDropInvalid`));return}await re(e);return}if(O)return;let n=await ze(e.dataTransfer);await te(n.files,n.directories)}function z(e){e.preventDefault(),!(r||!d)&&(O&&!e.dataTransfer.types.includes(`application/x-sshc-sftp-entries`)||g(!0))}function ie(e){O&&!e.dataTransfer.types.includes(`application/x-sshc-sftp-entries`)||(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function ae(e){e.currentTarget.contains(e.relatedTarget)||g(!1)}function B(e,n,r){if(n.type!==`file`&&n.type!==`directory`){e.preventDefault();return}let i=r.has(n.path)?t:[n],a={alias:l,entries:Ve(i).map(e=>({name:e.name,path:e.path,type:e.type,size:e.size}))};e.dataTransfer.effectAllowed=`copyMove`;let o=Ie(a);e.dataTransfer.setData(j,o),e.dataTransfer.setData(`text/plain`,a.entries.map(e=>`${l}:${e.path}`).join(` -`)),e.currentTarget.addEventListener(`dragend`,()=>Le(o),{once:!0})}async function oe(e){let t=_;v(null),t!==null&&await se(t,e)}async function se(e,t){if(!(p===null||l===``||u===``)){m(``);try{await o.addRemoteTransfers(e.entries.map(t=>({sourceAlias:e.alias,sourcePath:t.path,targetAlias:l,targetPath:p.join(u,t.name),kind:t.type===`directory`?`folder`:`file`,name:t.name,totalBytes:t.type===`file`?t.size:-1})),t)}catch(e){I(e)}}}function ce(e){return O||P?A(e):k(e)!==`other`}async function V(e,t=l){let n=e.filter(ce);if(r||n.length===0)return;if(m(``),Z(t)?.local===!0){if(!F||a===null)return;await ne(`put`,n.map(e=>({sourceAlias:a.alias,sourcePath:e.path,targetAlias:a.alias,targetPath:`${a.path.replace(/\/$/,``)}/${e.name}`,name:e.name,kind:e.type===`directory`?`folder`:`file`,totalBytes:e.size})));return}let i=(await Promise.allSettled(n.map(e=>{let n=k(e)===`directory`?`folder`:`file`,r=k(e)===`file`?e.size:-1;return P&&a!==null?o.addRemoteTransfers([{sourceAlias:t,sourcePath:e.path,targetAlias:t,targetPath:Ae(a.path,e.name),name:e.name,kind:n,totalBytes:r}],`get`):o.addDownload(t,e.path,n,r)}))).find(e=>e.status===`rejected`);i?.status===`rejected`&&I(i.reason)}return{dragging:h,sendable:ce,dragEnter:z,dragOver:ie,dragLeave:ae,acceptDrop:R,beginDrag:B,remoteDrop:_,acceptRemoteDrop:oe,dismissRemoteDrop:()=>v(null),uploadInput:C,folderUploadInput:w,uploadFromInput:L,chooseFiles:()=>C.current?.click(),chooseFolder:()=>w.current?.click(),transferOut:V,canTransferOut:!O||F,queuing:y,openQueueRequest:x,openQueue:ee}}var Ue=[],We=224,Ge=40;function Ke({actions:e}){return(0,F.jsx)(F.Fragment,{children:e.map(e=>(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:e.disabled===!0,onClick:e.run,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0 ${e.danger===!0?`text-danger`:``}`,children:e.label},e.key))})}function qe({aliases:e,hosts:t=Ue,target:n=null,initialLocation:a=null,initialSort:c={key:`name`,direction:`ascending`},showTransfers:l=!0,counterpart:d=null,onTargetHandled:f=()=>void 0,onLocationChange:g=()=>void 0,onSortChange:y=()=>void 0,onNavigationBlockerChange:b,onDirtyChange:x,onNavigateLocation:C,onOpenTerminal:w,onQueueOpen:E}){let j=i(),[M,N]=(0,D.useState)(null),[P,I]=(0,D.useState)(null),[ee,te]=(0,D.useState)(c),L=(0,D.useRef)(null),R=_(L),z=h(v),ae=(0,D.useId)(),B=(0,D.useRef)(0),oe=(0,D.useRef)(null),ce=(0,D.useRef)(null),ue=(0,D.useRef)(null),de=(0,D.useRef)(new Set),fe=(0,D.useSyncExternalStore)(o.subscribe,o.getSnapshot);m({open:P!==null&&!z,containerRefs:[oe],onDismiss:()=>I(null),returnFocusRef:ue}),s({open:P!==null&&!z,menuRef:ce,onClose:()=>I(null)});let H=Me({aliases:e,initialLocation:a,onLocationChange:g,onLoaded:(e,{refresh:t,changed:n})=>{we.setSelectedPaths(t=>new Set(e.entries.filter(e=>t.has(e.path)).map(e=>e.path))),I(null),J.setSearch(null),n&&Z.dismissUndo(),t||xe.close()},onReset:()=>{xe.close(),N(null),we.clearSelection(),we.setFocusedKey(null),J.clear(),I(null),Z.dismissUndo()}}),{alias:U,path:me,connected:W,entries:he,problem:ge,setProblem:_e,pendingPath:ve,listingFailed:ye,source:G}=H,K=G?.can,be=G?.local===!0,xe=V({onProblem:_e,onSaved:async(e,t)=>await H.load(Ee(t.entry.path),{alias:e,refresh:!0})!==null,onNavigationBlockerChange:b,onDirtyChange:x,onNavigateLocation:C}),q=xe.dirty,J=Fe({browser:H,onResults:()=>{we.clearSelection(),we.setFocusedKey(null),I(null),Z.dismissUndo()}}),Se=J.matches(re(J.listedEntries,ee)),Ce=J.search===null&&!H.atRoot,we=ie({entries:Se,loadedEntries:J.listedEntries,parentRowVisible:Ce,busy:H.busy||xe.busy,locked:q,mobileInteraction:z,onActivate:e=>{k(e)===`directory`?ze(e.path):K?.details&&N([e])},onOpenParent:()=>{H.openParent()},onInteract:()=>I(null),onContextMenu:(e,t,n)=>{ue.current=null,I({kind:`context`,x:t,y:n})},onRenameKey:()=>{K?.rename&&Z.renameSelection()},onDeleteKey:()=>{K?.delete&&Z.deleteSelection()},onEscape:J.search===null?void 0:J.endSearch}),{selectedPaths:De,selectedEntries:Y,selectedEntry:X,pendingFocus:Oe,activeRow:ke,activate:Ae,openParent:je}=we,Z=Ne({browser:H,list:we,refreshAfterChange:J.refreshAfterChange,onQueueOpen:()=>Q.openQueue(),onInteract:()=>I(null)}),Q=He({browser:H,selectedEntries:Y,busy:H.busy||Z.acting||xe.busy,counterpart:d,onQueueOpen:E}),$=H.busy||Z.acting||xe.busy||Q.queuing,[Ie,Le]=(0,D.useState)(null);function Re(e){te(t=>{let n=T(t.key,t.direction,e);return y(n),n})}function ze(e,t){return I(null),H.load(e,t)}(0,D.useEffect)(()=>{if(!(n===null||n.request===B.current)){if(B.current=n.request,f(n.request),!e.includes(n.alias)||!n.path.startsWith(`/`)||n.path.length>4096||/[\x00\r\n]/u.test(n.path)){_e(j(`sftp.linkTargetInvalid`));return}H.selectHost(n.alias),ze(Ee(n.path),{alias:n.alias}).then(async e=>{if(e===null)return;let t=e.find(e=>e.path===n.path);if(n.action===`browse`){t?.type===`directory`&&await ze(t.path,{alias:n.alias});return}if(t===void 0){_e(j(`sftp.linkTargetNotFound`));return}if(n.action===`edit`&&t.type!==`file`){_e(j(`sftp.linkTargetNotFile`));return}Le({alias:n.alias,action:n.action,entry:t})})}},[n?.request]),(0,D.useEffect)(()=>{Ie===null||$||U!==Ie.alias||(Le(null),Ie.action===`edit`?xe.open(Ie.alias,Ie.entry):Q.transferOut([Ie.entry],Ie.alias))},[Ie,$,U]),(0,D.useEffect)(()=>{if(!W||q||be)return;let e=fe.filter(e=>e.direction===`remote`&&e.operation===`delete`&&e.status===`completed`&&e.alias===U&&J.covers(e.remotePath,Ee)&&!de.current.has(e.id));if(e.length!==0){for(let t of e)de.current.add(t.id);J.refreshAfterChange(me,U)}},[fe,U,me,W,q,J.search,be]);function Be(){Y.length===0||!K?.details||(I(null),N(Y))}function Ve(e,t){ue.current=t,I(t=>t?.kind===e?null:{kind:e})}let qe=Y.some(Q.sendable),Je=j(be?`sftp.local.upload`:`sftp.download`);function Ye(){let e=[];return X!==null&&k(X)===`directory`&&e.push({key:`open`,label:j(`sftp.openFolder`),disabled:$||q,run:()=>Ae(X)}),J.search!==null&&X!==null&&e.push({key:`reveal`,label:j(`sftp.revealInFolder`),disabled:$||q,run:()=>{I(null),Oe.current=X.path,ze(Ee(X.path))}}),K?.details&&e.push({key:`details`,label:j(`sftp.details`),disabled:$,run:Be}),K?.edit&&X!==null&&k(X)===`file`&&e.push({key:`edit`,label:j(`sftp.editFile`),disabled:$||q,run:()=>{I(null),xe.open(U,X)}}),qe&&Q.canTransferOut&&e.push({key:`download`,label:Je,disabled:$,run:()=>{I(null),Q.transferOut(Y)}}),K?.chmod&&X!==null&&(X.type===`file`||X.type===`directory`)&&e.push({key:`chmod`,label:j(`sftp.chmod`),disabled:$,run:()=>Z.ask({kind:`chmod`,entry:X,recursive:!1})}),K?.chmod&&X!==null&&X.type===`directory`&&e.push({key:`chmodRecursive`,label:j(`sftp.chmodRecursive`),disabled:$,run:()=>Z.ask({kind:`chmod`,entry:X,recursive:!0})}),K?.rename&&X!==null&&e.push({key:`rename`,label:j(`sftp.rename`),disabled:$,run:Z.renameSelection}),K?.createEntries&&X!==null&&(X.type===`file`||X.type===`directory`)&&e.push({key:`duplicate`,label:j(`sftp.duplicate`),disabled:$,run:()=>Z.ask({kind:`duplicate`,entry:X})}),K?.rename&&Y.length>0&&Y.every(e=>e.type===`file`||e.type===`directory`)&&e.push({key:`moveTo`,label:j(`sftp.moveTo`),disabled:$,run:()=>Z.ask({kind:`moveTo`,entries:Y})}),e.push({key:`copyName`,label:j(Y.length===1?`sftp.copyName`:`sftp.copyNames`),run:()=>void Z.copySelected(`name`)}),e.push({key:`copyPath`,label:j(Y.length===1?`sftp.copyPath`:`sftp.copyPaths`),run:()=>void Z.copySelected(`path`)}),K?.delete&&e.push({key:`delete`,label:j(`sftp.delete`),danger:!0,disabled:$,run:Z.deleteSelection}),e.push({key:`invert`,label:j(`sftp.invertSelection`),run:we.invertDisplayedSelection}),e.push({key:`clear`,label:j(`sftp.clearSelection`),run:()=>{I(null),we.clearSelection()}}),e}function Xe(){return X===null?j(`sftp.selectedActionsCount`,{count:Y.length}):j(`sftp.selectedActions`,{name:X.name})}function Ze(){return[{key:`copyCurrentPath`,label:j(`sftp.copyPath`),disabled:!W,run:()=>{I(null),Z.copyCurrentPath()}},...K?.createEntries?[{key:`newFolder`,label:j(`sftp.newFolder`),disabled:$||!W,run:()=>Z.ask({kind:`mkdir`})},{key:`newFile`,label:j(`sftp.newFile`),disabled:$||!W,run:()=>Z.ask({kind:`createFile`})}]:[],...K?.browserUpload?[{key:`upload`,label:j(`sftp.upload`),disabled:$||!W,run:()=>{I(null),Q.chooseFiles()}},{key:`uploadFolder`,label:j(`sftp.uploadFolder`),disabled:$||!W,run:()=>{I(null),Q.chooseFolder()}}]:[],{key:`forward`,label:j(`sftp.forward`),disabled:$||q||!H.canForward,run:()=>{I(null),H.forward()}},{key:`home`,label:j(`sftp.homeDirectory`),disabled:$||q||!W,run:()=>{ze(``)}},{key:`root`,label:j(`sftp.rootDirectory`),disabled:$||q||!W||H.atRoot,run:()=>{I(null),H.goRoot()}},...K?.terminal&&w!==void 0?[{key:`terminal`,label:j(`sftp.openTerminalHere`),disabled:$||q||!W,run:()=>{I(null),w(U,me)}}]:[],{key:`selectAll`,label:j(`sftp.selectAll`),disabled:$||Se.length===0,run:we.selectAllDisplayed},...[`name`,`type`,`size`,`modified`].map(e=>({key:`sort-${e}`,label:`${j(`sftp.${e}`)}${j(ee.key===e&&ee.direction===`ascending`?`table.sortDescending`:`table.sortAscending`)}`,run:()=>{Re(e),I(null)}}))]}let Qe=(0,F.jsx)(`input`,{type:`search`,"aria-label":j(`sftp.filter`),value:J.filter,onChange:e=>J.setFilter(e.target.value),onKeyDown:e=>{e.key!==`Enter`||!K?.search||(e.preventDefault(),J.runSearch())},placeholder:j(`sftp.filterPlaceholder`),className:`h-8 w-full rounded-md border border-control-line/60 bg-control/70 py-1 pl-7 pr-2 text-xs outline-none focus:border-accent md:h-7`}),$e=j(be?`sftp.local.loading`:`sftp.loading`);return(0,F.jsxs)(`section`,{ref:L,className:`flex h-full min-h-0 min-w-0 flex-col gap-1.5 md:gap-1`,"aria-labelledby":ae,children:[(0,F.jsx)(`h2`,{id:ae,className:`sr-only`,children:j(be?`sftp.local.heading`:`sftp.heading`)}),(0,F.jsx)(pe,{browser:H,aliases:e,hosts:t,onHostChange:H.selectHost,onRefresh:()=>{!$&&!q&&W&&J.refreshCurrent()},busy:$,locked:q,mobile:z,labels:be?{path:j(`sftp.local.path`),editPath:j(`sftp.local.editPath`),input:j(`sftp.local.pathInput`)}:{path:j(`sftp.path`),editPath:j(`sftp.editPath`),input:j(`sftp.path`)},leading:K?.terminal&&w!==void 0?(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.openTerminalHere`),title:j(`sftp.openTerminalHere`),disabled:$||q||!W||me===``,onClick:()=>void w(U,me),className:`flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint md:size-8`,children:(0,F.jsx)(u,{name:`terminal`,className:`size-4`})}):null,mobileActions:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.mobile.search`),"aria-expanded":J.mobileSearchOpen,disabled:$||!W,onClick:()=>J.setMobileSearchOpen(e=>!e),className:`flex size-11 shrink-0 items-center justify-center rounded active:bg-select-fill ${J.mobileSearchOpen||J.filter!==``?`text-accent`:`text-ink-muted`}`,children:(0,F.jsx)(u,{name:`search`,className:`size-4`})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.mobile.actions`),"aria-haspopup":`dialog`,"aria-expanded":P?.kind===`folder`,onClick:e=>Ve(`folder`,e.currentTarget),className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted active:bg-select-fill`,children:(0,F.jsx)(u,{name:`moreHorizontal`,className:`size-4`})})]})}),ge===``||ye?null:(0,F.jsx)(`p`,{role:`alert`,className:`rounded-md border border-notice-line bg-notice px-3 py-2 text-sm text-notice-ink`,children:ge}),J.search===null?null:(0,F.jsxs)(`p`,{role:`status`,className:`flex items-center gap-3 rounded-md border border-line bg-surface-subtle px-3 py-2 text-sm text-ink-muted`,children:[(0,F.jsx)(`span`,{className:`min-w-0 grow truncate`,children:j(J.search.truncated?`sftp.searchResultsTruncated`:`sftp.searchResults`,{count:J.search.entries.length,query:J.search.query,path:J.search.root})}),(0,F.jsx)(`button`,{type:`button`,disabled:$,onClick:J.endSearch,className:`shrink-0 text-accent disabled:text-ink-faint`,children:j(`sftp.searchEnd`)})]}),Z.undo===null?null:(0,F.jsxs)(`p`,{role:`status`,className:`flex items-center gap-3 rounded-md border border-line bg-surface-subtle px-3 py-2 text-sm text-ink-muted`,children:[(0,F.jsx)(`span`,{className:`min-w-0 grow truncate`,children:Z.undo.label}),(0,F.jsx)(`button`,{type:`button`,disabled:$,onClick:()=>void Z.undo?.run(),className:`shrink-0 text-accent disabled:text-ink-faint`,children:j(`sftp.undo`)}),(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.dismissUndo`),onClick:Z.dismissUndo,className:`flex size-6 shrink-0 items-center justify-center rounded text-ink-muted hover:text-ink`,children:(0,F.jsx)(u,{name:`close`,className:`size-3`})})]}),(0,F.jsx)(`div`,{className:`grid min-h-0 min-w-0 flex-1 grid-cols-1 gap-2`,children:(0,F.jsxs)(`div`,{"aria-label":j(be?`sftp.local.dropZone`:`sftp.dropZone`),"aria-busy":$,className:`relative flex min-h-0 min-w-0 flex-col rounded-md border bg-card transition-shadow ${Q.dragging?`border-accent ring-1 ring-accent`:`border-line/60`}`,onDragEnter:Q.dragEnter,onDragOver:Q.dragOver,onDragLeave:Q.dragLeave,onDrop:e=>{Q.acceptDrop(e)},children:[(0,F.jsxs)(`div`,{ref:oe,hidden:z&&Y.length===0&&!J.mobileSearchOpen,className:z&&Y.length===0&&!J.mobileSearchOpen?`hidden`:`relative flex min-h-10 shrink-0 items-center gap-1 border-b border-line/50 bg-toolbar/45 px-2 py-1 md:min-h-8 md:py-0.5`,children:[Y.length>0&&!(z&&J.mobileSearchOpen)?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.clearSelection`),onClick:we.clearSelection,className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover hover:text-ink md:size-7`,children:(0,F.jsx)(u,{name:`close`,className:`size-3.5`})}),(0,F.jsx)(`span`,{className:`min-w-0 grow truncate text-xs font-medium text-ink`,children:X===null?j(`sftp.selectedCountSize`,{count:Y.length,size:O(Y.reduce((e,t)=>e+(t.type===`file`?t.size:0),0))}):j(`sftp.selected`,{name:X.name})}),(0,F.jsxs)(`label`,{className:z?`hidden`:`relative min-w-20 max-w-32 grow`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:j(`sftp.filter`)}),(0,F.jsx)(u,{name:`search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-ink-muted`}),Qe]}),R||!K?.details?null:(0,F.jsx)(`button`,{type:`button`,disabled:$,onClick:Be,className:`rounded px-2 py-1 text-xs text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:j(`sftp.details`)}),R&&!be?null:(0,F.jsx)(`button`,{type:`button`,disabled:$||!qe||!Q.canTransferOut,title:Q.canTransferOut?void 0:j(`sftp.local.connectRemote`),onClick:()=>void Q.transferOut(Y),className:`rounded px-2 py-1 text-xs text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:Je}),R||X===null||!K?.rename?null:(0,F.jsx)(`button`,{type:`button`,disabled:$,onClick:Z.renameSelection,className:`rounded px-2 py-1 text-xs text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:j(`sftp.rename`)}),R||!K?.delete?null:(0,F.jsx)(`button`,{type:`button`,disabled:$,onClick:Z.deleteSelection,className:`rounded px-2 py-1 text-xs text-danger hover:bg-hover disabled:text-ink-faint`,children:j(`sftp.delete`)}),(0,F.jsx)(`button`,{type:`button`,"aria-label":Xe(),"aria-haspopup":`menu`,"aria-expanded":!z&&P?.kind===`selected`,onClick:e=>Ve(`selected`,e.currentTarget),className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none md:size-7`,children:(0,F.jsx)(u,{name:`moreHorizontal`,className:`size-4`})})]}):z?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{ref:J.searchInput,type:`search`,"aria-label":j(`sftp.filter`),value:J.filter,onChange:e=>J.setFilter(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),K?.search&&J.runSearch(),e.currentTarget.blur())},placeholder:j(`sftp.filterPlaceholder`),className:`h-11 min-w-0 flex-1 rounded-md border border-control-line bg-control px-3 text-base`}),K?.search?(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.searchBelow`),disabled:$||!W||J.filter.trim()===``,onClick:()=>{J.searchInput.current?.blur(),J.runSearch()},className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted disabled:text-ink-faint`,children:(0,F.jsx)(u,{name:`search`,className:`size-4`})}):null,(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.close`),onClick:()=>{J.setMobileSearchOpen(!1),J.setFilter(``)},className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted`,children:(0,F.jsx)(u,{name:`close`,className:`size-4`})})]}):(0,F.jsxs)(F.Fragment,{children:[K?.createEntries||K?.browserUpload?(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.createActions`),"aria-haspopup":`menu`,"aria-expanded":!z&&P?.kind===`create`,disabled:$||!W,onClick:e=>Ve(`create`,e.currentTarget),className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:size-7`,children:(0,F.jsx)(u,{name:`plus`,className:`size-4`})}):null,(0,F.jsxs)(`label`,{className:`relative min-w-24 max-w-52 grow`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:j(`sftp.filter`)}),(0,F.jsx)(u,{name:`search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-ink-muted`}),Qe]}),K?.search?(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.searchBelow`),title:j(`sftp.searchBelow`),disabled:$||!W||J.filter.trim()===``,onClick:()=>void J.runSearch(),className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:size-7`,children:(0,F.jsx)(u,{name:`search`,className:`size-4`})}):null]}),K?.browserUpload?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{ref:Q.uploadInput,type:`file`,multiple:!0,className:`hidden`,onChange:e=>Q.uploadFromInput(e,e=>e.name)}),(0,F.jsx)(`input`,{ref:e=>{Q.folderUploadInput.current=e,e?.setAttribute(`webkitdirectory`,``)},type:`file`,multiple:!0,className:`hidden`,onChange:e=>Q.uploadFromInput(e,e=>e.webkitRelativePath??e.name)})]}):null,!z&&P?.kind===`create`?(0,F.jsxs)(`div`,{ref:ce,role:`menu`,"aria-label":j(`sftp.createActions`),className:`absolute left-2 top-full z-20 mt-1 w-52 rounded-lg border border-control-line bg-card p-1 shadow-lg`,children:[K?.createEntries?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>Z.ask({kind:`mkdir`}),className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:j(`sftp.newFolder`)}),(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>Z.ask({kind:`createFile`}),className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:j(`sftp.newFile`)})]}):null,K?.browserUpload?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>{I(null),Q.chooseFiles()},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:j(`sftp.upload`)}),(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>{I(null),Q.chooseFolder()},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:j(`sftp.uploadFolder`)})]}):null]}):null,!z&&P?.kind===`selected`&&Y.length>0?(0,F.jsx)(`div`,{ref:ce,role:`menu`,"aria-label":Xe(),className:`absolute right-2 top-full z-20 mt-1 w-52 rounded-lg border border-control-line bg-card p-1 shadow-lg`,children:(0,F.jsx)(Ke,{actions:Ye()})}):null,!z&&P?.kind===`context`&&Y.length>0?(0,F.jsx)(`div`,{ref:ce,role:`menu`,"aria-label":Xe(),style:{left:Math.max(8,Math.min(P.x,window.innerWidth-We-8)),top:Math.max(8,Math.min(P.y,window.innerHeight-Ye().length*Ge-16))},className:`fixed z-30 w-56 rounded-lg border border-control-line bg-card p-1 shadow-lg`,children:(0,F.jsx)(Ke,{actions:Ye()})}):null]}),W&&ve!==null?(0,F.jsx)(`div`,{role:`status`,className:`absolute inset-0 z-10 flex items-center justify-center rounded-md bg-card/80 p-4 backdrop-blur-[1px]`,children:(0,F.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3 rounded-lg bg-toolbar px-4 py-3 text-sm`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`size-4 shrink-0 animate-spin rounded-full border-2 border-accent border-t-transparent motion-reduce:animate-none`}),(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block`,children:$e}),(0,F.jsx)(`span`,{className:`block truncate font-mono text-xs text-ink-muted`,children:ve||j(`sftp.homeDirectory`)})]})]})}):null,(0,F.jsx)(`div`,{"data-testid":`sftp-file-list`,className:`min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain`,inert:W&&$,onKeyDown:we.handleListKeys,children:U===``||K===void 0?(0,F.jsx)(S,{tone:`empty`,title:j(`sftp.chooseHost`),detail:j(`sftp.chooseHostHint`)}):!W&&$?(0,F.jsx)(S,{tone:`loading`,title:K.connect?j(`sftp.connecting`,{alias:U}):$e}):!W&&ge!==``?(0,F.jsx)(S,{tone:`failed`,title:ge,action:(0,F.jsx)(r,{onClick:()=>void H.retry(),children:j(`sftp.retry`)})}):!W&&K.connect?(0,F.jsx)(S,{tone:`empty`,title:j(`sftp.readyToConnect`,{alias:U}),detail:j(`sftp.connectHint`),action:(0,F.jsx)(r,{kind:`primary`,onClick:()=>void H.connect(),children:j(`sftp.connect`)})}):!W||$&&he.length===0&&ge===``?(0,F.jsx)(S,{tone:`loading`,title:$e}):ye?(0,F.jsx)(S,{tone:`failed`,title:ge,action:(0,F.jsx)(r,{onClick:()=>void H.retry(),children:j(`sftp.retry`)})}):J.search!==null&&Se.length===0?(0,F.jsx)(S,{tone:`empty`,title:j(`sftp.searchNoMatches`,{query:J.search.query}),action:(0,F.jsx)(r,{onClick:J.endSearch,children:j(`sftp.searchEnd`)})}):Se.length===0?(0,F.jsx)(S,{tone:`empty`,title:j(J.normalizedFilter===``?`sftp.emptyDirectory`:`sftp.noFilterMatches`),...J.normalizedFilter===``?{}:{detail:j(`sftp.clearFilterHint`)},action:Ce?(0,F.jsx)(r,{disabled:$||q,onClick:je,children:j(`sftp.parentDirectory`)}):void 0}):(0,F.jsx)(se,{model:we,entries:Se,sort:ee,onSort:Re,compact:R,mobileInteraction:z,busy:$,locked:q,parentRowVisible:Ce,draggable:e=>K.dragOut&&A(e),onDragStart:(e,t)=>Q.beginDrag(e,t,De),entryContext:J.search===null?void 0:e=>Ee(e.path)})}),l?(0,F.jsx)(Te,{openRequest:Q.openQueueRequest}):null]})}),z&&P!==null?(0,F.jsxs)(p,{labelledBy:`${ae}-mobile-actions`,onDismiss:()=>I(null),closeOnOutside:!0,returnFocusRef:ue,placement:`sheet`,panelClassName:`flex max-h-[80dvh] w-full max-w-lg flex-col overflow-hidden rounded-xl`,children:[(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-line px-4 py-1`,children:[(0,F.jsx)(`h3`,{id:`${ae}-mobile-actions`,className:`min-w-0 truncate font-medium`,children:P.kind===`selected`||P.kind===`context`?Xe():j(`sftp.mobile.actions`)}),(0,F.jsx)(`button`,{type:`button`,"aria-label":j(`sftp.close`),onClick:()=>I(null),className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted`,children:(0,F.jsx)(u,{name:`close`,className:`size-4`})})]}),(0,F.jsx)(`div`,{role:`menu`,className:`min-h-0 overflow-y-auto overscroll-contain p-2`,children:P.kind===`selected`||P.kind===`context`?(0,F.jsx)(Ke,{actions:Ye()}):(0,F.jsx)(Ke,{actions:Ze()})})]}):null,Q.remoteDrop===null?null:(0,F.jsxs)(p,{labelledBy:`${ae}-remote-drop`,onDismiss:Q.dismissRemoteDrop,panelClassName:`w-full max-w-md rounded-lg p-5`,children:[(0,F.jsx)(`h3`,{id:`${ae}-remote-drop`,className:`text-base font-semibold text-ink`,children:j(`sftp.remoteDropTitle`)}),(0,F.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-ink-muted`,children:j(`sftp.remoteDropDescription`,{count:Q.remoteDrop.entries.length,alias:U})}),(0,F.jsxs)(`div`,{className:`mt-5 flex flex-wrap justify-end gap-2`,children:[(0,F.jsx)(r,{onClick:Q.dismissRemoteDrop,children:j(`sftp.cancel`)}),(0,F.jsx)(r,{onClick:()=>void Q.acceptRemoteDrop(`move`),children:j(`sftp.moveHere`)}),(0,F.jsx)(r,{kind:`primary`,onClick:()=>void Q.acceptRemoteDrop(`copy`),children:j(`sftp.copyHere`)})]})]}),(0,F.jsx)(le,{editor:xe,busy:H.busy||Z.acting||Q.queuing}),M===null?null:(0,F.jsx)(ne,{alias:U,entries:M,busy:$,returnFocusRef:ke,onClose:()=>N(null),onEdit:e=>{N(null),xe.open(U,e)},onDownload:e=>{N(null),Q.transferOut(e)},canDownload:Q.sendable,onRename:e=>{N(null),Z.ask({kind:`rename`,entry:e})}}),(0,F.jsx)(Pe,{actions:Z,currentPath:me,returnFocusRef:ke})]})}function Je(e,t){return`${e===`/`?``:e}/${t}`}function Ye({left:e,right:t,onDismiss:a}){let s=i(),[c,l]=(0,D.useState)(null),[u,d]=(0,D.useState)(new Set),[m,h]=(0,D.useState)(``),[g,_]=(0,D.useState)(!0);(0,D.useEffect)(()=>{let r=!0;return _(!0),f.compareDirectories(e.alias,e.path,t.alias,t.path).then(e=>{r&&(l(e),d(new Set(e.entries.filter(e=>e.status!==`same`).map(e=>e.relativePath))))}).catch(e=>{r&&h(n(e)||`sftp_failed`)}).finally(()=>{r&&_(!1)}),()=>{r=!1}},[e.alias,e.path,t.alias,t.path]);let v=(0,D.useMemo)(()=>c?.entries.filter(e=>e.status!==`same`)??[],[c]);function y(e){d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async function b(r){if(c===null)return;let i=r===`left`?c.leftPath:c.rightPath,s=r===`left`?c.rightPath:c.leftPath,l=r===`left`?e.alias:t.alias,d=r===`left`?t.alias:e.alias,f=v.filter(e=>u.has(e.relativePath)).filter(e=>(r===`left`?e.left:e.right)!==void 0),p=f.flatMap(e=>(r===`left`?e.left:e.right)?.type===`directory`?[e.relativePath]:[]),m=f.flatMap(e=>{let t=r===`left`?e.left:e.right;return t===void 0||p.some(t=>e.relativePath!==t&&e.relativePath.startsWith(`${t}/`))?[]:[{sourceAlias:l,sourcePath:`${i===`/`?``:i}/${e.relativePath}`,targetAlias:d,targetPath:Je(s,e.relativePath),kind:t.type===`directory`?`folder`:`file`,name:t.name,totalBytes:t.type===`file`?t.size:-1,overwrite:e.status!==(r===`left`?`left_only`:`right_only`)}]});if(m.length!==0){_(!0),h(``);try{await o.addRemoteTransfers(m,`copy`),a()}catch(e){h(n(e)||(e instanceof Error?e.message:`sftp_failed`)),_(!1)}}}return(0,F.jsxs)(p,{labelledBy:`sftp-compare-heading`,onDismiss:a,panelClassName:`flex h-[min(44rem,calc(100dvh-2rem))] w-full max-w-4xl flex-col overflow-hidden rounded-lg`,children:[(0,F.jsxs)(`header`,{className:`border-b border-line/60 px-5 py-4`,children:[(0,F.jsx)(`h2`,{id:`sftp-compare-heading`,className:`text-base font-semibold text-ink`,children:s(`sftp.compare.heading`)}),(0,F.jsxs)(`p`,{className:`mt-1 truncate font-mono text-xs text-ink-muted`,children:[e.alias,`:`,e.path,` ⇄ `,t.alias,`:`,t.path]}),(0,F.jsx)(`p`,{className:`mt-2 text-xs text-ink-muted`,children:s(`sftp.compare.description`)})]}),m===``?null:(0,F.jsx)(`p`,{role:`alert`,className:`border-b border-notice-line bg-notice px-5 py-2 text-sm text-notice-ink`,children:m}),(0,F.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:[g&&c===null?(0,F.jsx)(S,{tone:`loading`,title:s(`sftp.compare.loading`)}):null,!g&&v.length===0?(0,F.jsx)(S,{tone:`empty`,title:s(`sftp.compare.noChanges`)}):null,v.length===0?null:(0,F.jsxs)(`table`,{className:`w-full min-w-[38rem] text-left text-sm`,children:[(0,F.jsx)(`thead`,{className:`sticky top-0 bg-toolbar text-xs text-ink-muted`,children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`w-10 px-3 py-2`,children:(0,F.jsx)(`span`,{className:`sr-only`,children:s(`sftp.selectAll`)})}),(0,F.jsx)(`th`,{className:`px-2 py-2`,children:s(`sftp.name`)}),(0,F.jsx)(`th`,{className:`w-36 px-2 py-2`,children:s(`sftp.compare.status`)}),(0,F.jsx)(`th`,{className:`w-28 px-2 py-2 text-right`,children:e.alias}),(0,F.jsx)(`th`,{className:`w-28 px-2 py-2 text-right`,children:t.alias})]})}),(0,F.jsx)(`tbody`,{children:v.map(e=>(0,F.jsxs)(`tr`,{className:`border-t border-line/40 hover:bg-select-fill/40`,children:[(0,F.jsx)(`td`,{className:`px-3 py-2`,children:(0,F.jsx)(`input`,{type:`checkbox`,checked:u.has(e.relativePath),onChange:()=>y(e.relativePath),className:`size-4 accent-accent`})}),(0,F.jsx)(`td`,{className:`px-2 py-2 font-mono text-ink`,children:e.relativePath}),(0,F.jsx)(`td`,{className:`px-2 py-2 text-xs text-ink-muted`,children:s(`sftp.compare.${e.status}`)}),(0,F.jsx)(`td`,{className:`px-2 py-2 text-right text-xs text-ink-muted`,children:e.left?.type===`file`?O(e.left.size):e.left===void 0?`—`:s(`sftp.type.${e.left.type}`)}),(0,F.jsx)(`td`,{className:`px-2 py-2 text-right text-xs text-ink-muted`,children:e.right?.type===`file`?O(e.right.size):e.right===void 0?`—`:s(`sftp.type.${e.right.type}`)})]},e.relativePath))})]})]}),(0,F.jsxs)(`footer`,{className:`flex flex-wrap justify-end gap-2 border-t border-line/60 px-5 py-4`,children:[(0,F.jsx)(r,{onClick:a,children:s(`sftp.cancel`)}),(0,F.jsx)(r,{disabled:g||u.size===0,onClick:()=>void b(`right`),children:s(`sftp.compare.rightToLeft`)}),(0,F.jsx)(r,{kind:`primary`,disabled:g||u.size===0,onClick:()=>void b(`left`),children:s(`sftp.compare.leftToRight`)})]})]})}var Xe=`application/x-sshc-sftp-tab`;function Ze(e){return Array.from(e.dataTransfer.types??[]).includes(Xe)}function Qe(e){let t=e.currentTarget.getBoundingClientRect();return e.clientXt.id===e.activeId)??e.tabs[0]??tt()}function at(e,t){for(let n of e){let e=n.tabs.find(e=>e.id===t);if(e!==void 0)return{pane:n,tab:e}}return null}function ot(e){return e.flatMap(e=>e.tabs)}function st(e,t){return e.map(e=>e.id===t.id?t:e)}function ct(e,t,n){let r=at(e,t);if(r===null)return e;let i=n(r.tab);return i===r.tab?e:st(e,{...r.pane,tabs:r.pane.tabs.map(e=>e.id===t?i:e)})}function lt(e,t){let n=e.tabs.findIndex(e=>e.id===t);if(n<0)return e;let r=e.tabs.filter(e=>e.id!==t),i=e.activeId===t?r[Math.min(n,r.length-1)]?.id??``:e.activeId;return{...e,tabs:r,activeId:i}}function ut(e){let t=tt();return{...e,tabs:[t],activeId:t.id}}function dt(e){let t=e.filter(e=>e.tabs.length>0);return t.length>0?t:[ut(e[0]??rt())]}function ft(e,t,n){let r=e.find(e=>e.id===t);return r===void 0||r.tabs.length>=8?e:st(e,{...r,tabs:[...r.tabs,n],activeId:n.id})}function pt(e,t){let n=at(e,t);return n===null?e:dt(st(e,lt(n.pane,t)))}function mt(e,t){let n=at(e,t);return n===null||n.pane.activeId===t?e:st(e,{...n.pane,activeId:t})}function ht(e,t,n,r){return ct(e,t,e=>e.alias===n&&e.path===r?e:{...e,alias:n,path:r})}function gt(e,t,n){return ct(e,t,e=>({...e,sort:n}))}function _t(e){return e.length<2}function vt(e,t,n){let r=at(e,t);if(r===null)return e;if(`paneId`in n){let i=e.find(e=>e.id===n.paneId);return i===void 0||i.id===r.pane.id||i.tabs.length>=8?e:dt(e.map(e=>e.id===r.pane.id?lt(e,t):e.id===i.id?{...e,tabs:[...e.tabs,r.tab],activeId:r.tab.id}:e))}if(!_t(e))return e;let i=nt([r.tab]),a=lt(r.pane,t),o=st(e,a.tabs.length===0?ut(a):a);return n.side===`left`?[i,...o]:[...o,i]}function yt(e){return`sftp-tab-${e}`}function bt(e){return`sftp-tabpanel-${e}`}function xt(e,t,n){if(e.alias===``)return t;let r=e.alias===`sshc://local`?n:e.alias;return e.path===``||e.path===`/`?r:`${r}:${e.path.split(`/`).filter(Boolean).pop()??e.path}`}function St({pane:e,label:t,closable:n,movable:r,trailing:a=null,onSelect:o,onClose:s,onAdd:c,onDragStart:l,onDragEnd:f,onMove:p}){let m=i(),h=(0,D.useRef)(null);(0,D.useEffect)(()=>{(h.current?.querySelector(`[role="tab"][aria-selected="true"]`))?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[e.activeId,e.tabs.length]);function g(e,t){e.dataTransfer.setData(Xe,t.id),e.dataTransfer.effectAllowed=`move`,l(t.id)}function _(t,n,i){if(t.shiftKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`)){t.preventDefault(),r(n)&&p(n.id,t.key===`ArrowLeft`?`left`:`right`);return}d(t,i,e.tabs,e=>o(e.id))}return(0,F.jsxs)(`div`,{"data-sftp-pane-tabs":e.id,className:`flex h-11 min-w-0 shrink-0 items-stretch gap-1 rounded-md border border-line/60 bg-toolbar p-1 md:h-9`,children:[(0,F.jsx)(`div`,{ref:h,role:`tablist`,"aria-label":t,className:`flex min-w-0 flex-1 items-stretch gap-1 overflow-x-auto overscroll-x-contain`,children:e.tabs.map((t,i)=>{let a=xt(t,m(`sftp.newTab`),m(`sftp.local.connection`)),c=t.id===e.activeId,l=r(t);return(0,F.jsxs)(`span`,{draggable:l,onDragStart:l?e=>g(e,t):void 0,onDragEnd:l?f:void 0,className:`group relative flex w-44 min-w-24 shrink items-stretch rounded ${c?`bg-card shadow-sm`:`hover:bg-card/50`} ${l?`cursor-grab active:cursor-grabbing`:``}`,children:[(0,F.jsx)(`button`,{type:`button`,role:`tab`,id:yt(t.id),"aria-selected":c,"aria-controls":bt(t.id),"aria-keyshortcuts":`Shift+ArrowLeft Shift+ArrowRight`,tabIndex:c?0:-1,title:a,onClick:()=>o(t.id),onKeyDown:e=>_(e,t,i),className:`min-w-0 flex-1 truncate rounded px-3 text-left text-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent ${c?`font-medium text-ink`:`text-ink-muted`}`,children:a}),n?(0,F.jsx)(`button`,{type:`button`,"aria-label":m(`sftp.closeTab`,{name:a}),onClick:()=>s(t),className:`flex w-9 shrink-0 items-center justify-center rounded text-ink-faint hover:text-danger md:w-7`,children:(0,F.jsx)(u,{name:`close`,className:`size-3`})}):null]},t.id)})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":m(`sftp.newTab`),disabled:e.tabs.length>=8,onClick:c,className:`flex w-9 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-card/50 hover:text-ink disabled:text-ink-faint md:w-7`,children:(0,F.jsx)(u,{name:`plus`,className:`size-4`})}),a]})}var Ct=`sshc.sftp.tabs`,wt=`sshc.sftp.activeTab`,Tt=`sshc.sftp.split`,Et=`sshc.sftp.secondaryTabs`,Dt=`sshc.sftp.secondaryActiveTab`,Ot=`sshc.sftp.splitRatio`;function kt(e){return{key:typeof e.sortKey==`string`&&[`name`,`type`,`size`,`modified`].includes(e.sortKey)?e.sortKey:`name`,direction:e.sortDirection===`descending`?`descending`:`ascending`}}function At(e){try{let t=JSON.parse(window.localStorage.getItem(e)??`[]`);return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.alias==`string`?t.alias:``,r=typeof t.path==`string`&&(n===`sshc://local`?de(t.path):t.path.startsWith(`/`))?t.path:``;return[{id:et(),alias:n,path:r,sort:kt(t)}]}).slice(0,8):[]}catch{return[]}}function jt(e,t){try{let n=Number.parseInt(window.localStorage.getItem(e)??`0`,10);return t[Number.isInteger(n)&&n>=0&&n({alias:e,path:t,sortKey:n.key,sortDirection:n.direction})))}function Ft(e){let t=e?.tabs.findIndex(t=>t.id===e.activeId)??-1;return String(t<0?0:t)}function It(e){try{window.localStorage.setItem(Ct,Pt(e[0])),window.localStorage.setItem(wt,Ft(e[0])),window.localStorage.setItem(Et,Pt(e[1])),window.localStorage.setItem(Dt,Ft(e[1])),window.localStorage.setItem(Tt,String(e.length>1))}catch{}}function Lt(){try{let e=window.localStorage.getItem(Ot);return e===null||e.trim()===``?50:y(Number(e))}catch{return 50}}function Rt(e){try{window.localStorage.setItem(Ot,String(e))}catch{}}function zt(e){let t=(0,D.useRef)(new Map),n=(0,D.useRef)(e);return n.current=e,{forTab:(0,D.useCallback)(e=>{let r=t.current.get(e);if(r!==void 0)return r;let i=t=>n.current(e,t);return t.current.set(e,i),i},[]),forget:(0,D.useCallback)(e=>{t.current.delete(e)},[])}}function Bt({aliases:e,hosts:t,target:n=null,onTargetHandled:r=()=>void 0,onNavigationBlockerChange:a,onNavigateLocation:o,onOpenTerminal:s}){let l=i(),[u,d]=(0,D.useState)(Nt),[f,p]=(0,D.useState)(Lt),[m,h]=(0,D.useState)(()=>u[0]?.id??``),[g,v]=(0,D.useState)(null),[y,x]=(0,D.useState)(!1),[S,C]=(0,D.useState)(0),[w,T]=(0,D.useState)(()=>new Map),[E,O]=(0,D.useState)(null),k=(0,D.useRef)(null),A=_(k),j=(0,D.useRef)(new Map(ot(u).map(e=>[e.id,{alias:e.alias,path:e.path}]))),M=(0,D.useRef)(new Map),N=u.length>1&&!A,P=u[0]??null,I=u[1]??null,ee=u.find(e=>e.id===m)??P;(0,D.useEffect)(()=>{It(u)},[u]),(0,D.useEffect)(()=>{!A||P===null||(h(P.id),x(!1))},[A,P]),(0,D.useEffect)(()=>{g!==null&&at(u,g)===null&&v(null)},[g,u]);let te=(0,D.useCallback)(()=>{let e=[...M.current.values()];a?.(e.length===0?null:t=>e.every(e=>e(t)))},[a]),L=zt((e,t)=>{t===null?M.current.delete(e):M.current.set(e,t),te()}),ne=zt((e,t)=>{T(n=>{if(t===null){if(!n.has(e))return n;let t=new Map(n);return t.delete(e),t}return n.get(e)===t?n:new Map(n).set(e,t)})});function re(e){j.current.delete(e),M.current.delete(e),L.forget(e),ne.forget(e),T(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}function R(e){let t=tt();d(n=>ft(n,e.id,t)),h(e.id)}function z(e){re(e),d(t=>pt(t,e))}function ie(e){let t=w.get(e.id);if(t!==void 0){O({tabId:e.id,path:t});return}z(e.id)}function ae(e,t){d(e=>mt(e,t)),h(e.id)}function B(e,t){let n=at(u,e);if(n===null)return;let r=vt(u,e,t);if(r===u)return;let i=!j.current.has(e);j.current.set(e,{alias:n.tab.alias,path:n.tab.path,connect:i}),d(r),h(at(r,e)?.pane.id??r[0]?.id??``)}function oe(e,t){let n=at(u,e);if(n===null)return;let r=t===`left`?u[u.indexOf(n.pane)-1]:u[u.indexOf(n.pane)+1];r===void 0?u.length===1&&B(e,{side:t}):B(e,{paneId:r.id})}function se(e,t){let n=g;v(null),n!==null&&B(n,t===null?{paneId:e.id}:{side:t})}let ce=e=>{p(e),Rt(e)},V=P===null?null:it(P),le=I===null?null:it(I);(0,D.useEffect)(()=>{if(n===null||V===null||V.alias!==`sshc://local`||N&&le?.alias!==`sshc://local`)return;let t=e.includes(n.alias)?n.alias:``;j.current.set(V.id,{alias:t,path:``}),d(e=>ht(e,V.id,t,``)),P!==null&&h(P.id)},[n,P,V,le?.alias,N,e]);let ue=N&&V!==null&&le!==null&&V.alias!==``&&le.alias!==``&&V.alias!==`sshc://local`&&le.alias!==`sshc://local`;function de(i,a){let c=a>0&&!N,p=N?a===0?le:V:null,m=a===u.length-1,_=i.tabs.length>1||u.length>1,y=g===null||A?null:u.length>1?at(u,g)?.pane.id===i.id?null:`whole`:_t(u)?`halves`:null;return(0,F.jsxs)(D.Fragment,{children:[a>0&&N?(0,F.jsx)(b,{direction:`horizontal`,ratio:f,label:l(`sftp.resizePanes`),onRatioChange:ce}):null,(0,F.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col`,style:{flexBasis:N?`${a===0?f:100-f}%`:`100%`},hidden:c,"aria-label":l(a===0?`sftp.firstPane`:`sftp.secondPane`),onPointerDown:()=>h(i.id),onFocusCapture:()=>h(i.id),children:[(0,F.jsx)(St,{pane:i,label:l(a===0?`sftp.primaryTabs`:`sftp.secondaryTabs`),closable:_,movable:e=>!A&&!w.has(e.id),trailing:m&&N?(0,F.jsxs)(`button`,{type:`button`,"aria-label":l(`sftp.compare.heading`),title:l(`sftp.compare.heading`),disabled:!ue,onClick:()=>x(!0),className:`flex shrink-0 items-center gap-1.5 rounded px-2.5 text-sm text-ink-muted hover:bg-card/50 hover:text-ink disabled:text-ink-faint`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`⇄`}),l(`sftp.compare.action`)]}):null,onSelect:e=>ae(i,e),onClose:ie,onAdd:()=>R(i),onDragStart:v,onDragEnd:()=>v(null),onMove:oe}),(0,F.jsxs)(`div`,{"data-sftp-pane-content":i.id,className:`relative flex min-h-0 min-w-0 flex-1 flex-col pt-2`,children:[i.tabs.map(c=>{let l=c.id===i.activeId,u=j.current.get(c.id),f=l&&c.alias!==`sshc://local`&&(A?a===0:p?.alias===`sshc://local`||ee?.id===i.id);return(0,F.jsx)(`div`,{id:bt(c.id),role:`tabpanel`,"aria-labelledby":yt(c.id),hidden:!l,className:l?`flex min-h-0 min-w-0 flex-1 flex-col`:``,children:(0,F.jsx)(qe,{aliases:e,...t===void 0?{}:{hosts:t},target:f?n:null,initialLocation:u===void 0||u.alias===``?null:u,initialSort:c.sort,showTransfers:!1,counterpart:p?.alias&&p.path?{alias:p.alias,path:p.path}:null,onQueueOpen:()=>C(e=>e+1),...l?{onNavigationBlockerChange:L.forTab(c.id)}:{},onDirtyChange:ne.forTab(c.id),...o===void 0?{}:{onNavigateLocation:o},...s===void 0?{}:{onOpenTerminal:s},...f?{onTargetHandled:r}:{},onLocationChange:(e,t)=>{j.current.delete(c.id),d(n=>ht(n,c.id,e,t))},onSortChange:e=>d(t=>gt(t,c.id,e))})},c.id)}),y===null?null:(0,F.jsx)($e,{placement:y,onDrop:e=>se(i,e)})]})]})]},i.id)}return(0,F.jsxs)(`section`,{ref:k,className:`flex h-full min-h-0 min-w-0 flex-col`,"aria-label":l(`sftp.tabs`),children:[(0,F.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1`,children:u.map(de)}),(0,F.jsx)(Te,{openRequest:S}),E===null?null:(0,F.jsx)(c,{id:`sftp-close-dirty-tab`,heading:l(`sftp.leaveHeading`),body:(0,F.jsx)(`p`,{className:`text-sm text-ink-muted`,children:l(`sftp.leaveBody`,{path:E.path})}),confirmLabel:l(`sftp.leaveDiscard`),cancelLabel:l(`sftp.leaveStay`),onConfirm:()=>{let e=E;O(null),z(e.tabId)},onCancel:()=>O(null)}),y&&ue&&V!==null&&le!==null?(0,F.jsx)(Ye,{left:{alias:V.alias,path:V.path||`/`},right:{alias:le.alias,path:le.path||`/`},onDismiss:()=>x(!1)}):null]})}export{Bt as SFTPWorkspace}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SFTPWorkspace-jSaRifyW.js b/internal/ui/dist/assets/SFTPWorkspace-jSaRifyW.js new file mode 100644 index 000000000..24f145863 --- /dev/null +++ b/internal/ui/dist/assets/SFTPWorkspace-jSaRifyW.js @@ -0,0 +1,4 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MonacoEditor-DkWzB-rB.js","assets/jsx-runtime-BOsSdQ68.js","assets/index-DtC-pXtZ.js","assets/surface-DPFJ-mE2.js","assets/form-zbLY2cuV.js","assets/clipboard-ObSO6ZLv.js","assets/index-BmAKYKBT.css","assets/editor.api-BJ0kNDCq.js","assets/editor-jjEx9u7D.css","assets/reducedMotion-XhcdVu33.js"])))=>i.map(i=>d[i]); +import{a as e,i as t,n,o as r,r as i,t as a}from"./jsx-runtime-BOsSdQ68.js";import{r as o,t as s,y as c}from"./surface-DPFJ-mE2.js";import{_ as l}from"./form-zbLY2cuV.js";import{t as u}from"./clipboard-ObSO6ZLv.js";import{$ as d,B as f,J as p,M as m,R as h,Y as g,a as _,b as v,c as y,i as b,j as x,q as S,r as C,s as w,v as T,x as E,y as D,z as O}from"./index-DtC-pXtZ.js";import{i as k,n as A,r as j,t as M}from"./tableSort-Bd9PEJHh.js";var N=r();function P(e){return e.type===`symlink`?e.targetType??`other`:e.type===`file`||e.type===`directory`?e.type:`other`}function ee(e){return e.type===`file`||e.type===`directory`}var F=`application/x-sshc-sftp-entries`;function I(e){if(e.includes(`\\`))return null;let t=e.replace(/^\/+/,``).split(`/`);return t.length===0||t.some(e=>e===``||e===`.`||e===`..`||/[\u0000-\u001f]/.test(e))?null:t.join(`/`)}function te(e){let t=new Set;for(let n of e){let e=n.relativePath.split(`/`);e.pop();for(let n=1;n<=e.length;n+=1)t.add(e.slice(0,n).join(`/`))}return[...t].sort((e,t)=>e.split(`/`).length-t.split(`/`).length||e.localeCompare(t))}function ne(e){let t=e.slice(-9);return t.length===9?[0,3,6].map(e=>{let n=0;return t[e]===`r`&&(n+=4),t[e+1]===`w`&&(n+=2),t[e+2]!==`-`&&(n+=1),String(n)}).join(``):`600`}var L=a(),re=65536;function R(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(typeof r.result==`string`?r.result:``),r.onerror=()=>n(r.error??Error(`preview_unreadable`)),r.readAsDataURL(e)})}function ie(e){switch(c(e)){case`sftp_not_utf8`:case`sftp_preview_type`:return`sftp.binaryHint`;case`sftp_text_too_large`:case`sftp_preview_too_large`:return`sftp.tooLargeHint`;default:return`sftp.previewUnavailable`}}function z({label:e,children:t}){return(0,L.jsxs)(`div`,{className:`border-t border-hairline py-1.5 first:border-t-0`,children:[(0,L.jsx)(`dt`,{className:`text-[11px] uppercase tracking-wide text-ink-faint`,children:e}),(0,L.jsx)(`dd`,{className:`break-all font-mono text-xs text-ink`,children:t})]})}function ae({alias:e,entries:t,busy:n,onClose:r,onEdit:i,onDownload:a,canDownload:o,onRename:u,returnFocusRef:d}){let f=l(),h=(0,N.useId)(),g=v(T),[_,b]=(0,N.useState)({kind:`idle`}),[x,S]=(0,N.useState)({kind:`idle`}),C=t.length===1?t[0]??null:null,w=C===null?null:P(C),E=C!==null&&w===`file`?C.path:null,D=C!==null&&w===`directory`?C.path:null,O=t.reduce((e,t)=>e+(P(t)===`file`?t.size:0),0),k=C===null?f(`sftp.detailsForCount`,{count:t.length}):f(`sftp.detailsFor`,{name:C.name});(0,N.useEffect)(()=>{if(E===null){b({kind:`idle`});return}let t=!0;return b({kind:`loading`}),(async()=>{try{let n=await R((await m.previewFile(e,E)).blob);if(!t)return;b({kind:`image`,url:n});return}catch(e){if(!t)return;if(c(e)!==`sftp_preview_type`){b({kind:`unavailable`,reason:ie(e)});return}}try{let n=await m.readText(e,E);if(!t)return;b({kind:`text`,contents:n.contents.slice(0,re),truncated:n.contents.length>re})}catch(e){if(!t)return;b({kind:`unavailable`,reason:ie(e)})}})(),()=>{t=!1}},[e,E]),(0,N.useEffect)(()=>{if(D===null){S({kind:`idle`});return}let t=!0;return S({kind:`loading`}),m.directoryStats(e,D).then(e=>{t&&S({kind:`loaded`,stats:e})},()=>{t&&S({kind:`unavailable`})}),()=>{t=!1}},[e,D]);let A=(0,L.jsx)(`dl`,{role:`group`,className:`min-h-0 overflow-auto border-t border-line px-3 py-2 md:border-l md:border-t-0`,"aria-label":f(`sftp.properties`),children:C===null?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(z,{label:f(`sftp.selectedItems`),children:t.length.toLocaleString()}),(0,L.jsx)(z,{label:f(`sftp.totalSize`),children:`${O.toLocaleString()} (${y(O)})`})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(z,{label:f(`sftp.path`),children:C.path}),(0,L.jsx)(z,{label:f(`sftp.type`),children:f(`sftp.type.${C.type}`)}),C.type===`symlink`?(0,L.jsx)(z,{label:f(`sftp.linkTarget`),children:C.targetType===void 0?f(`sftp.brokenLink`,{target:C.linkTarget??``}):C.linkTarget??``}):null,(0,L.jsx)(z,{label:f(`sftp.size`),children:w===`file`?`${C.size.toLocaleString()} (${y(C.size)})`:x.kind===`loading`?f(`sftp.calculating`):x.kind===`loaded`?`${x.stats.truncated?f(`sftp.partialSizePrefix`):``}${x.stats.bytes.toLocaleString()} (${y(x.stats.bytes)})`:f(`sftp.sizeUnavailable`)}),w===`directory`&&x.kind===`loaded`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(z,{label:f(`sftp.containedFiles`),children:x.stats.files.toLocaleString()}),(0,L.jsx)(z,{label:f(`sftp.containedDirectories`),children:Math.max(0,x.stats.directories-1).toLocaleString()})]}):null,(0,L.jsx)(z,{label:f(`sftp.modified`),children:(0,L.jsx)(`time`,{dateTime:C.modifiedAt,children:new Date(C.modifiedAt).toLocaleString()})}),(0,L.jsx)(z,{label:f(`sftp.permissions`),children:`${C.mode} (${ne(C.mode)})`}),(0,L.jsx)(z,{label:f(`sftp.revision`),children:C.revision})]})});return(0,L.jsxs)(p,{labelledBy:h,onDismiss:r,...d===void 0?{}:{returnFocusRef:d},panelClassName:`flex h-[min(46rem,calc(100dvh-2rem))] w-full max-w-4xl flex-col overflow-hidden rounded-lg`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line bg-toolbar px-3 py-2`,children:[(0,L.jsx)(`h2`,{id:h,className:`min-w-0 grow truncate text-sm font-medium`,children:k}),(0,L.jsx)(`button`,{type:`button`,className:`text-xs text-ink-muted hover:text-ink`,onClick:r,children:f(`sftp.close`)})]}),(0,L.jsxs)(`div`,{className:g?`flex min-h-0 flex-1 flex-col overflow-hidden`:`grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_18rem] overflow-hidden`,children:[(0,L.jsx)(`div`,{role:`group`,className:`min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain bg-surface-subtle p-3`,"aria-label":f(`sftp.preview`),children:C===null?(0,L.jsx)(`ul`,{className:`space-y-1 text-xs`,"aria-label":f(`sftp.selectedItems`),children:t.map(e=>(0,L.jsx)(`li`,{className:`break-all font-mono text-ink-muted`,children:e.path},e.path))}):_.kind===`loading`?(0,L.jsx)(`p`,{className:`text-sm text-ink-muted`,children:f(`sftp.previewLoading`)}):_.kind===`image`?(0,L.jsx)(`img`,{src:_.url,alt:C.name,className:`mx-auto max-h-full max-w-full object-contain`}):_.kind===`text`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`pre`,{className:`whitespace-pre-wrap break-all font-mono text-xs text-ink`,children:_.contents}),_.truncated?(0,L.jsx)(`p`,{className:`mt-2 text-xs text-ink-muted`,children:f(`sftp.previewTruncated`)}):null]}):_.kind===`unavailable`?(0,L.jsx)(`p`,{className:`text-sm text-ink-muted`,children:f(_.reason)}):(0,L.jsx)(`p`,{className:`text-sm text-ink-muted`,children:f(`sftp.type.${C.type}`)})}),g?(0,L.jsxs)(`details`,{className:`min-h-0 shrink-0 overflow-auto border-t border-line`,children:[(0,L.jsx)(`summary`,{className:`cursor-pointer px-3 py-3 text-sm text-ink-muted`,children:f(`sftp.properties`)}),(0,L.jsx)(`div`,{className:`max-h-40 overflow-auto`,children:A})]}):A]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-line px-3 py-2`,children:[C!==null&&w===`file`?(0,L.jsx)(s,{disabled:n,onClick:()=>i(C),children:f(`sftp.editFile`)}):null,t.some(o)?(0,L.jsx)(s,{disabled:n,onClick:()=>a(t),children:f(`sftp.download`)}):null,C===null?null:(0,L.jsx)(s,{disabled:n,onClick:()=>u(C),children:f(`sftp.rename`)})]})]})}function oe(e,t){return k(e,(e,n)=>{switch(t.key){case`type`:return A(e.type,n.type);case`size`:return e.size-n.size;case`modified`:return Date.parse(e.modifiedAt)-Date.parse(n.modifiedAt);case`name`:return A(e.name,n.name)}},t.direction)}var se=500,ce=12;function le({entries:e,loadedEntries:t,parentRowVisible:n,busy:r,locked:i=!1,mobileInteraction:a,onActivate:o,onOpenParent:s,onInteract:c,onContextMenu:l,onRenameKey:u,onDeleteKey:d,onEscape:f}){let[p,m]=(0,N.useState)(()=>new Set),[h,g]=(0,N.useState)(null),_=(0,N.useRef)(null),v=(0,N.useRef)(null),y=(0,N.useRef)(new Map),b=(0,N.useRef)(null),x=(0,N.useRef)(null),S=(0,N.useRef)(null),C=(0,N.useRef)(!1),w=t.filter(e=>p.has(e.path)),T=w.length===1?w[0]??null:null,E=e.length>0&&e.every(e=>p.has(e.path)),D=[...n?[`..`]:[],...e.map(e=>e.path)],O=h!==null&&D.includes(h)?h:D[0]??null;(0,N.useEffect)(()=>()=>{S.current!==null&&globalThis.clearTimeout(S.current.timer)},[]),(0,N.useEffect)(()=>{_.current!==null&&(_.current.indeterminate=w.length>0&&!E)},[E,w.length]),(0,N.useEffect)(()=>{b.current=O===null?null:y.current.get(O)??null}),(0,N.useEffect)(()=>{let e=x.current;if(e===null)return;x.current=null;let t=y.current.get(e);t!==void 0&&(g(e),t.focus())},[t]);function k(e){r||i||(c?.(),o(e))}function A(){x.current=`..`,s()}function j(t,n={}){let r=v.current===null?-1:e.findIndex(e=>e.path===v.current),i=e.findIndex(e=>e.path===t.path);if(n.shift===!0&&r>=0&&i>=0){let t=Math.min(r,i),a=Math.max(r,i);m(r=>{let i=n.additive===!0?new Set(r):new Set;for(let n of e.slice(t,a+1))i.add(n.path);return i})}else if(n.additive===!0){ae(t),v.current=t.path;return}else m(new Set([t.path])),v.current=t.path;c?.()}function M(e,t){if(C.current){C.current=!1;return}if(!(r||i)){if(g(e.path),a&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey){p.size>0?ae(e):k(e);return}j(e,{shift:t.shiftKey,additive:t.metaKey||t.ctrlKey})}}function P(e){g(e);let t=y.current.get(e);t?.focus(),t?.scrollIntoView?.({block:`nearest`})}function ee(e,t){t===null?y.current.delete(e):y.current.set(e,t)}function F(e){return(e instanceof Element?e.closest(`[data-row-key]`):null)?.getAttribute(`data-row-key`)??O}function I(t,n){if(D.length===0)return;let r=n===null?-1:D.indexOf(n),i=D.length-1,a=t.key===`Home`?0:t.key===`End`?i:t.key===`ArrowDown`?r<0?0:Math.min(i,r+1):r<0?i:Math.max(0,r-1),o=D[a];if(o===void 0)return;P(o);let s=e.find(e=>e.path===o);s===void 0||t.ctrlKey||t.metaKey||j(s,{shift:t.shiftKey,additive:!1})}function te(t){return e.find(e=>e.path===t)??null}function ne(e){if(r)return;if((e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===`a`){e.preventDefault(),le();return}let t=e.target instanceof HTMLInputElement,n=F(e.target);switch(e.key){case`ArrowDown`:case`ArrowUp`:case`Home`:case`End`:e.preventDefault(),I(e,n);return;case` `:{if(t)return;let r=te(n);if(r===null)return;e.preventDefault(),ae(r);return}case`Enter`:{if(t||r||i)return;if(n===`..`){e.preventDefault(),A();return}let a=te(n);if(a===null)return;e.preventDefault(),k(a);return}case`F2`:if(u===void 0)return;e.preventDefault(),u();return;case`Delete`:if(d===void 0)return;e.preventDefault(),d();return;case`Escape`:if(p.size>0){e.preventDefault(),m(new Set),v.current=null;return}if(f===void 0)return;e.preventDefault(),f();return;default:}}function L(e,t,n){l===void 0||r||i||(p.has(e.path)||(m(new Set([e.path])),v.current=e.path),P(e.path),l(e,t,n))}function re(e,t){l!==void 0&&(e.preventDefault(),L(t,e.clientX,e.clientY))}function R(){S.current!==null&&(globalThis.clearTimeout(S.current.timer),S.current=null)}function ie(e,t){if(l===void 0||e.pointerType===`mouse`||r||i)return;R(),C.current=!1;let{clientX:n,clientY:a}=e,o=globalThis.setTimeout(()=>{S.current=null,C.current=!0,L(t,n,a)},se);S.current={timer:o,x:n,y:a}}function z(e){let t=S.current;t!==null&&(Math.abs(e.clientX-t.x)>ce||Math.abs(e.clientY-t.y)>ce)&&R()}function ae(e){r||(m(t=>{let n=new Set(t);return n.has(e.path)?n.delete(e.path):n.add(e.path),n}),v.current=e.path,c?.())}function oe(){m(t=>{let n=new Set(t);for(let t of e)E?n.delete(t.path):n.add(t.path);return n}),c?.()}function le(){m(t=>{let n=new Set(t);for(let t of e)n.add(t.path);return n}),v.current=e[0]?.path??null,c?.()}function B(){m(t=>{let n=new Set(t);for(let t of e)n.has(t.path)?n.delete(t.path):n.add(t.path);return n}),c?.()}function V(){m(new Set),v.current=null}return{selectedPaths:p,setSelectedPaths:m,selectedEntries:w,selectedEntry:T,allDisplayedSelected:E,rowKeys:D,activeRowKey:O,setFocusedKey:g,focusRow:P,registerRow:ee,pendingFocus:x,selectionAnchor:v,activeRow:b,selectAll:_,activate:k,openParent:A,selectEntry:j,clickEntry:M,toggleSelection:ae,toggleAllDisplayed:oe,selectAllDisplayed:le,invertDisplayedSelection:B,clearSelection:V,handleListKeys:ne,rowContextMenu:re,beginLongPress:ie,trackLongPress:z,cancelLongPress:R}}function B(e){return P(e)===`file`?y(e.size):`—`}function V(e){return P(e)===`directory`?`groups`:`config`}function ue({entry:e}){let t=l();if(e.type!==`symlink`)return(0,L.jsx)(L.Fragment,{children:e.name});let n=e.targetType===void 0?t(`sftp.brokenLink`,{target:e.linkTarget??``}):e.linkTarget??``;return(0,L.jsxs)(L.Fragment,{children:[e.name,(0,L.jsx)(`span`,{className:`font-normal text-ink-muted`,children:` → ${n}`})]})}function de({model:e,entries:t,sort:n,onSort:r,compact:i,mobileInteraction:a,busy:o,locked:s=!1,parentRowVisible:c,draggable:u=()=>!1,onDragStart:f,entryContext:p}){let m=l(),{selectedPaths:h,activeRowKey:g,allDisplayedSelected:_,selectAll:v,registerRow:y,setFocusedKey:b,activate:x,openParent:S,clickEntry:C,toggleSelection:w,toggleAllDisplayed:T,rowContextMenu:E,beginLongPress:D,trackLongPress:O,cancelLongPress:k}=e,A=e=>!a&&u(e);if(i){let e=!a;return(0,L.jsxs)(`ul`,{"aria-label":m(`sftp.entries`),className:`divide-y divide-line/40`,children:[c?(0,L.jsx)(`li`,{"data-row-key":`..`,children:(0,L.jsxs)(`button`,{type:`button`,ref:e=>{y(`..`,e)},tabIndex:g===`..`?0:-1,disabled:o||s,onFocus:()=>b(`..`),onClick:S,className:`flex min-h-11 w-full items-center gap-2 px-2 py-1.5 text-left text-sm hover:bg-hover disabled:text-ink-faint md:min-h-8 md:py-0.5`,children:[(0,L.jsx)(d,{name:`groups`,className:`size-4 text-ink-muted`}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono`,children:`..`}),(0,L.jsx)(`span`,{className:`sr-only`,children:m(`sftp.parentDirectory`)})]})}):null,t.map(t=>(0,L.jsxs)(`li`,{"data-row-key":t.path,className:`flex items-center transition-colors ${h.has(t.path)?`bg-select-fill/75`:``}`,onContextMenu:e=>E(e,t),draggable:A(t),onDragStart:e=>f?.(e,t),children:[(0,L.jsx)(`label`,{className:`flex shrink-0 items-center justify-center ${e?`size-8`:`size-11 md:size-8`}`,children:(0,L.jsx)(`input`,{type:`checkbox`,"aria-label":m(`sftp.selectEntry`,{name:t.name}),checked:h.has(t.path),tabIndex:g===t.path?0:-1,disabled:o,onChange:()=>w(t),className:`size-4 accent-accent`})}),(0,L.jsxs)(`button`,{type:`button`,ref:e=>{y(t.path,e)},"aria-label":t.name,"aria-pressed":h.has(t.path),tabIndex:g===t.path?0:-1,className:`flex min-w-0 grow touch-pan-y select-none items-center gap-2 px-2 text-left hover:bg-hover active:bg-select-fill disabled:text-ink-faint ${e?`min-h-8 py-0.5`:`min-h-12 py-2`}`,onFocus:()=>b(t.path),onClick:e=>C(t,e),onDoubleClick:a?void 0:()=>x(t),disabled:o||s,onPointerDown:e=>D(e,t),onPointerMove:O,onPointerUp:k,onPointerCancel:k,children:[(0,L.jsx)(d,{name:V(t),className:`size-4 shrink-0 text-ink-muted`}),e?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,L.jsx)(`span`,{className:`block truncate font-mono text-sm font-medium leading-4 text-ink`,children:(0,L.jsx)(ue,{entry:t})}),p===void 0?null:(0,L.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-3 text-ink-muted`,children:p(t)})]}),(0,L.jsx)(`span`,{className:`shrink-0 whitespace-nowrap text-[11px] text-ink-muted`,children:B(t)}),(0,L.jsx)(`time`,{className:`hidden shrink-0 whitespace-nowrap text-[11px] text-ink-muted sm:inline`,dateTime:t.modifiedAt,children:new Date(t.modifiedAt).toLocaleDateString()})]}):(0,L.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,L.jsx)(`span`,{className:`block truncate font-mono text-sm font-medium leading-4 text-ink`,children:(0,L.jsx)(ue,{entry:t})}),(0,L.jsxs)(`span`,{className:`mt-0.5 flex min-w-0 gap-2 text-[11px] leading-3 text-ink-muted`,children:[(0,L.jsx)(`span`,{className:`truncate font-mono`,children:p===void 0?t.mode:p(t)}),(0,L.jsx)(`span`,{children:B(t)}),(0,L.jsx)(`time`,{className:`truncate`,dateTime:t.modifiedAt,children:new Date(t.modifiedAt).toLocaleString()})]})]})]})]},t.path))]})}return(0,L.jsxs)(`table`,{className:`w-full min-w-[44rem] text-left text-sm`,children:[(0,L.jsx)(`thead`,{className:`sticky top-0 bg-toolbar/75 text-xs text-ink-muted`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,className:`w-9 px-2 py-1.5 md:py-1`,children:(0,L.jsx)(`input`,{ref:v,type:`checkbox`,"aria-label":m(`sftp.selectAll`),checked:_,onChange:T,className:`size-4 accent-accent`})}),(0,L.jsx)(M,{column:`name`,activeColumn:n.key,direction:n.direction,onSort:r,className:`px-2 py-1.5 md:py-1`,children:m(`sftp.name`)}),(0,L.jsx)(M,{column:`modified`,activeColumn:n.key,direction:n.direction,onSort:r,className:`px-2 py-1.5 md:py-1`,children:m(`sftp.modified`)}),(0,L.jsx)(M,{column:`size`,activeColumn:n.key,direction:n.direction,onSort:r,className:`px-2 py-1.5 text-right md:py-1`,buttonClassName:`justify-end`,children:m(`sftp.size`)}),(0,L.jsx)(M,{column:`type`,activeColumn:n.key,direction:n.direction,onSort:r,className:`w-24 whitespace-nowrap px-2 py-1.5 md:py-1`,children:m(`sftp.type`)}),(0,L.jsx)(`th`,{scope:`col`,className:`w-28 whitespace-nowrap px-2 py-1.5 md:py-1`,children:m(`sftp.permissions`)})]})}),(0,L.jsxs)(`tbody`,{children:[c?(0,L.jsx)(`tr`,{"data-row-key":`..`,className:`border-t border-line/40 hover:bg-hover/60`,children:(0,L.jsx)(`td`,{className:`px-2 py-1 md:py-0.5`,colSpan:6,children:(0,L.jsxs)(`button`,{type:`button`,ref:e=>{y(`..`,e)},tabIndex:g===`..`?0:-1,disabled:o||s,onFocus:()=>b(`..`),onClick:S,className:`flex w-full items-center gap-2 rounded py-0.5 text-left text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:text-ink-faint`,children:[(0,L.jsx)(d,{name:`groups`,className:`size-4 text-ink-muted`}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono`,children:`..`}),(0,L.jsx)(`span`,{className:`sr-only`,children:m(`sftp.parentDirectory`)})]})})}):null,t.map(e=>(0,L.jsxs)(`tr`,{"data-row-key":e.path,"aria-selected":h.has(e.path),onDoubleClick:()=>x(e),onContextMenu:t=>E(t,e),draggable:A(e),onDragStart:t=>f?.(t,e),className:`cursor-default border-t border-line/40 transition-colors ${h.has(e.path)?`bg-select-fill/75`:`hover:bg-hover/55`}`,children:[(0,L.jsx)(`td`,{className:`w-9 px-2 py-1 md:py-0.5`,children:(0,L.jsx)(`input`,{type:`checkbox`,"aria-label":m(`sftp.selectEntry`,{name:e.name}),checked:h.has(e.path),tabIndex:g===e.path?0:-1,disabled:o,onChange:()=>w(e),onDoubleClick:e=>e.stopPropagation(),className:`size-4 accent-accent`})}),(0,L.jsx)(`td`,{className:`max-w-64 px-2 py-1 md:py-0.5`,children:(0,L.jsxs)(`button`,{type:`button`,ref:t=>{y(e.path,t)},"aria-label":e.name,"aria-pressed":h.has(e.path),tabIndex:g===e.path?0:-1,onFocus:()=>b(e.path),onClick:t=>C(e,t),onPointerDown:t=>D(t,e),onPointerMove:O,onPointerUp:k,onPointerCancel:k,className:`flex w-full min-w-0 items-center gap-2 rounded text-left focus:outline-none focus-visible:ring-1 focus-visible:ring-accent`,children:[(0,L.jsx)(d,{name:V(e),className:`size-4 text-ink-muted`}),(0,L.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,L.jsx)(`span`,{className:`block truncate font-mono text-sm font-medium leading-4 text-ink`,children:(0,L.jsx)(ue,{entry:e})}),p===void 0?null:(0,L.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-3 text-ink-muted`,children:p(e)})]})]})}),(0,L.jsx)(`td`,{className:`whitespace-nowrap px-2 py-1 text-xs text-ink-muted md:py-0.5`,children:new Date(e.modifiedAt).toLocaleString()}),(0,L.jsx)(`td`,{className:`px-2 py-1 text-right text-xs text-ink-muted md:py-0.5`,children:B(e)}),(0,L.jsx)(`td`,{className:`w-24 whitespace-nowrap px-2 py-1 text-xs text-ink-muted md:py-0.5`,children:m(`sftp.type.${e.type}`)}),(0,L.jsx)(`td`,{className:`w-28 whitespace-nowrap px-2 py-1 font-mono text-xs text-ink-muted md:py-0.5`,children:e.mode})]},e.path))]})]})}var H=(0,N.lazy)(()=>w(async()=>{let{MonacoEditor:e}=await import(`./MonacoEditor-DkWzB-rB.js`);return{MonacoEditor:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(({MonacoEditor:e})=>({default:e})));function fe({source:e=m,onProblem:t,onSaved:n,onNavigationBlockerChange:r,onDirtyChange:i,onNavigateLocation:a}){let o=l(),[s,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(``),[p,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(null),v=(0,N.useRef)(0),y=s!==null&&d!==s.file.contents;(0,N.useEffect)(()=>(i?.(y?s?.file.entry.path??``:null),()=>i?.(null)),[y,i,s?.file.entry.path]),(0,N.useEffect)(()=>{if(!y){r?.(null);return}r?.(e=>(_(e),!1));let e=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,e),()=>{r?.(null),window.removeEventListener(`beforeunload`,e)}},[y,r]);function b(){v.current+=1,u(null),f(``),h(!1),_(null)}async function x(n,r){if(y){t(o(`sftp.unsavedBlocked`));return}let i=++v.current;h(!0),t(``);try{let t=await e.readText(n,r.path);if(i!==v.current)return;u({alias:n,file:t}),f(t.contents)}catch(e){if(i!==v.current)return;let n=c(e);t(n===`sftp_not_utf8`||n===`sftp_text_too_large`?o(n===`sftp_not_utf8`?`sftp.binaryHint`:`sftp.tooLargeHint`):n||(e instanceof Error?e.message:`sftp_failed`))}finally{i===v.current&&h(!1)}}async function S(){if(s===null)return;let r=v.current,{alias:i,file:a}=s;h(!0),t(``);try{let t=await e.saveText(i,a.entry.path,d,a.revision);if(r!==v.current)return;let o=await n(i,t);if(r!==v.current||!o)return;u({alias:i,file:t}),f(t.contents)}catch(e){if(r!==v.current)return;t(c(e)===`sftp_conflict`?o(`sftp.conflict`):c(e)||`sftp_failed`)}finally{r===v.current&&h(!1)}}function C(){y?t(o(`sftp.unsavedBlocked`)):b()}function w(){if(g===null)return;let e=g;b(),r?.(null),a?.(`${e.pathname}${e.search}`)}return{opened:s?.file??null,contents:d,setContents:f,dirty:y,busy:p,leaving:g,open:x,save:S,close:b,dismiss:C,discardAndLeave:w,stay:()=>_(null)}}function pe({editor:e,busy:t=!1}){let n=l(),r=(0,N.useId)(),{opened:i,contents:a,setContents:o,dirty:c,leaving:u}=e;return(0,L.jsxs)(L.Fragment,{children:[i===null?null:(0,L.jsxs)(p,{labelledBy:`${r}-editor`,onDismiss:e.dismiss,panelClassName:`flex h-[min(52rem,calc(100dvh-2rem))] w-full max-w-6xl flex-col overflow-hidden rounded-lg`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line bg-toolbar px-3 py-2`,children:[(0,L.jsx)(`h2`,{id:`${r}-editor`,className:`min-w-0 grow truncate font-mono text-xs`,children:i.entry.path}),c?(0,L.jsx)(`span`,{className:`text-xs text-notice-ink`,children:n(`sftp.unsaved`)}):null,(0,L.jsx)(s,{disabled:t||e.busy||!c,onClick:()=>void e.save(),children:n(`sftp.save`)}),(0,L.jsx)(`button`,{type:`button`,disabled:c,className:`text-xs text-ink-muted disabled:text-ink-faint`,onClick:e.close,children:n(`sftp.close`)})]}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,L.jsx)(N.Suspense,{fallback:(0,L.jsx)(`div`,{className:`p-4 text-sm text-ink-muted`,children:n(`sftp.editorLoading`)}),children:(0,L.jsx)(H,{path:i.entry.path,value:a,onChange:o,readOnly:e.busy})})})]}),u===null?null:(0,L.jsx)(S,{id:`${r}-leave`,heading:n(`sftp.leaveHeading`),body:(0,L.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`sftp.leaveBody`,{path:i?.entry.path??``})}),confirmLabel:n(`sftp.leaveDiscard`),cancelLabel:n(`sftp.leaveStay`),onConfirm:e.discardAndLeave,onCancel:e.stay})]})}var U=`sshc://local`;function me(e){return e.startsWith(`/`)||/^[A-Za-z]:\//.test(e)}var W=[];function G({aliases:e,hosts:t=W,value:n,disabled:r=!1,compact:i=!1,includeLocal:a=!1,loadRecent:o,onChange:s}){let c=l(),[u,f]=(0,N.useState)(!1),p=(0,N.useRef)(null),m=c(`sftp.local.connection`),h=a?[{id:`engine`,label:m,detail:c(`sftp.local.engine`),current:n===U}]:[];function g(e){s(e),f(!1)}return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{ref:p,type:`button`,"aria-label":c(`sftp.host`),"data-value":n,disabled:r||e.length===0&&!a,onClick:()=>f(!0),title:n===`sshc://local`?m:n||c(`sftp.chooseHost`),className:i?`flex size-11 shrink-0 items-center justify-center rounded-md border border-control-line bg-control text-ink-muted active:bg-select-fill disabled:text-ink-faint`:`flex min-h-9 min-w-0 max-w-full items-center justify-between gap-2 rounded-md border border-control-line bg-control px-3 py-1.5 text-left text-sm disabled:text-ink-faint md:min-h-8 md:py-1`,children:i?(0,L.jsx)(d,{name:n===`sshc://local`?`home`:`terminal`,className:`size-4`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`truncate`,children:n===`sshc://local`?m:n||c(e.length===0&&!a?`sftp.noHosts`:`sftp.chooseHost`)}),(0,L.jsx)(d,{name:`chevronRight`,className:`size-3 rotate-90 text-ink-muted`})]})}),(0,L.jsx)(O,{open:u,heading:c(`sftp.chooseHostHeading`),aliases:e,hosts:t,value:n,local:h,...o===void 0?{}:{loadRecent:o},initialFocus:i?`close`:`search`,returnFocusRef:p,onChoose:g,onChooseLocal:()=>g(U),onClose:()=>f(!1)})]})}function he({busy:e,canBack:t,canForward:n,canHome:r,canRoot:i,onBack:a,onForward:o,onHome:s,onRoot:c}){let u=l();return(0,L.jsxs)(`div`,{role:`group`,"aria-label":u(`sftp.navigation`),className:`flex shrink-0 overflow-hidden rounded-md bg-toolbar/70`,children:[(0,L.jsx)(`button`,{type:`button`,"aria-label":u(`sftp.back`),disabled:e||!t,onClick:a,className:`flex size-9 items-center justify-center text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`←`})}),(0,L.jsx)(`button`,{type:`button`,"aria-label":u(`sftp.forward`),disabled:e||!n,onClick:o,className:`flex size-9 items-center justify-center text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`→`})}),(0,L.jsx)(`button`,{type:`button`,"aria-label":u(`sftp.homeDirectory`),disabled:e||!r,onClick:s,className:`flex size-9 items-center justify-center text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:(0,L.jsx)(d,{name:`home`,className:`size-4`})}),(0,L.jsx)(`button`,{type:`button`,"aria-label":u(`sftp.rootDirectory`),disabled:e||!i,onClick:c,className:`flex size-9 items-center justify-center font-mono text-sm text-ink-muted hover:bg-hover disabled:text-ink-faint md:size-8`,children:`/`})]})}function ge({browser:e,aliases:t,hosts:n,onHostChange:r,onRefresh:i,busy:a,locked:o=!1,mobile:c,labels:f,leading:p,mobileActions:m}){let h=l(),{alias:g,path:_,connected:v}=e,[y,b]=(0,N.useState)(_),[x,S]=(0,N.useState)(!1),C=(0,N.useRef)(null),w=a||o||!v,T=i??(()=>{e.refresh()}),E=e.crumbs,D=E.at(-1);(0,N.useEffect)(()=>{b(_),S(!1)},[g,_]),(0,N.useEffect)(()=>{x&&(C.current?.focus(),C.current?.select())},[x]);function O(){w||e.load(y.trim())}function k(){b(_),S(!1)}async function A(){try{await u.writeText(_),e.setProblem(``)}catch{e.setProblem(h(`copy.refused`))}}return c?(0,L.jsxs)(`div`,{className:`flex min-h-11 shrink-0 items-center gap-1 border-b border-line/50 pb-1`,children:[(0,L.jsx)(G,{aliases:t,...n===void 0?{}:{hosts:n},value:g,disabled:o,onChange:r,compact:!0,includeLocal:!0}),(0,L.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.back`),disabled:a||o||!e.canBack,onClick:()=>void e.back(),className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted active:bg-select-fill disabled:text-ink-faint`,children:`←`}),x?(0,L.jsxs)(`form`,{className:`flex min-w-0 flex-1 items-center gap-1`,onSubmit:e=>{e.preventDefault(),O()},children:[(0,L.jsx)(`input`,{ref:C,"aria-label":f.input,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Escape`&&k()},className:`h-11 min-w-0 w-full rounded border border-control-line bg-control px-2 font-mono text-base`}),(0,L.jsx)(s,{type:`submit`,disabled:w,children:h(`sftp.go`)})]}):(0,L.jsxs)(`button`,{type:`button`,"data-testid":`sftp-current-path`,"data-path":_,"aria-label":f.editPath,title:_,disabled:w,onClick:()=>S(!0),className:`flex h-11 min-w-0 flex-1 items-center gap-1 rounded px-2 text-left active:bg-select-fill disabled:text-ink-faint`,children:[(0,L.jsx)(`span`,{className:`truncate font-mono text-sm font-medium`,children:D?.label??`/`}),(0,L.jsx)(d,{name:`chevronRight`,className:`size-3 shrink-0 rotate-90 text-ink-muted`})]}),x?(0,L.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.cancel`),onClick:k,className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted`,children:(0,L.jsx)(d,{name:`close`,className:`size-4`})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.refreshDirectory`),disabled:w,onClick:T,className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted active:bg-select-fill disabled:text-ink-faint`,children:(0,L.jsx)(d,{name:`sync`,className:`size-4`})}),m]})]}):(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 border-b border-line/50 pb-1.5 md:pb-1`,children:[(0,L.jsx)(G,{aliases:t,...n===void 0?{}:{hosts:n},value:g,disabled:o,onChange:r,includeLocal:!0}),p,(0,L.jsx)(he,{busy:a||o,canBack:e.canBack,canForward:e.canForward,canHome:v,canRoot:v&&!e.atRoot,onBack:()=>void e.back(),onForward:()=>void e.forward(),onHome:()=>void e.goHome(),onRoot:()=>void e.goRoot()}),(0,L.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.refreshDirectory`),title:h(`sftp.refreshDirectory`),disabled:w,onClick:T,className:`flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint md:size-8`,children:(0,L.jsx)(d,{name:`sync`,className:`size-4`})}),x?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`input`,{ref:C,"aria-label":f.input,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),k()):e.key===`Enter`&&(e.preventDefault(),O())},className:`min-w-44 grow rounded-md border border-control-line/70 bg-control px-2 py-1.5 font-mono text-sm outline-none focus:border-accent md:py-1`}),(0,L.jsx)(s,{disabled:w,onClick:O,children:h(`sftp.go`)})]}):(0,L.jsxs)(`div`,{className:`flex min-w-44 grow items-center rounded-md bg-control/60 px-1`,"data-testid":`sftp-current-path`,"data-path":_,children:[(0,L.jsx)(`nav`,{"aria-label":f.path,onClick:e=>{e.target===e.currentTarget&&!w&&S(!0)},title:f.editPath,className:`flex min-w-0 grow cursor-text items-center overflow-x-auto whitespace-nowrap font-mono text-sm`,children:E.map((t,n)=>(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center`,children:[n>0?(0,L.jsx)(d,{name:`chevronRight`,className:`size-3 text-ink-faint`}):null,n===E.length-1?(0,L.jsx)(`span`,{className:`max-w-48 truncate px-1.5 py-1.5 font-medium text-ink md:py-1`,title:t.path,"aria-current":`location`,children:t.label}):(0,L.jsx)(`button`,{type:`button`,disabled:w,onClick:()=>void e.load(t.path),className:`max-w-40 truncate rounded px-1.5 py-1.5 text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint md:py-1`,title:t.path,children:t.label})]},t.path))}),(0,L.jsx)(`button`,{type:`button`,"aria-label":h(`sftp.copyPath`),title:h(`sftp.copyPath`),disabled:!v,onClick:()=>{A()},className:`flex size-8 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:(0,L.jsx)(d,{name:`copy`,className:`size-3.5`})}),(0,L.jsx)(`button`,{type:`button`,"aria-label":f.editPath,title:f.editPath,disabled:w,onClick:()=>S(!0),className:`flex size-8 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:(0,L.jsx)(d,{name:`edit`,className:`size-3.5`})})]})]})}function _e(e){return e<60?`${e}s`:e<3600?`${Math.ceil(e/60)}m`:`${Math.floor(e/3600)}h ${Math.ceil(e%3600/60)}m`}var ve=`sshc.sftp.queueView`,ye=96,be=560,K=224,xe=[1,2,3,4,5,6,7,8],Se=[0,30,300,3600],q=1<<20,J=128;function Ce({label:e,valueBytes:t,min:n,max:r,onCommit:i}){let a=t/q,[o,s]=(0,N.useState)(String(a));(0,N.useEffect)(()=>s(String(a)),[a]);function c(){let e=Number(o);if(!Number.isInteger(e)||er){s(String(a));return}i(e*q)}return(0,L.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,L.jsx)(`span`,{children:e}),(0,L.jsx)(`input`,{type:`number`,inputMode:`numeric`,"aria-label":e,min:n,max:r,step:1,value:o,onChange:e=>s(e.target.value),onBlur:c,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(s(String(a)),e.currentTarget.blur())},className:`w-16 rounded border border-control-line bg-control px-1 py-0.5 text-right text-xs tabular-nums`}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`MiB`})]})}function we({label:e,value:t,min:n,max:r,onCommit:i}){let[a,o]=(0,N.useState)(String(t));(0,N.useEffect)(()=>o(String(t)),[t]);function s(){let e=Number(a);if(!Number.isInteger(e)||er){o(String(t));return}i(e)}return(0,L.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,L.jsx)(`span`,{children:e}),(0,L.jsx)(`input`,{type:`number`,inputMode:`numeric`,"aria-label":e,min:n,max:r,step:1,value:a,onChange:e=>o(e.target.value),onBlur:s,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(o(String(t)),e.currentTarget.blur())},className:`w-14 rounded border border-control-line bg-control px-1 py-0.5 text-right text-xs tabular-nums`})]})}function Te(e){return Math.min(be,Math.max(ye,Math.round(e)))}function Ee(){let e=n(ve,{}),t=typeof e==`object`&&e?e:{};return{collapsed:t.collapsed===void 0||t.collapsed===!0,height:typeof t.height==`number`?Te(t.height):K}}function Y(e){t(ve,e)}function X(e){return e===`failed`?`text-danger`:e===`completed`?`text-live`:e===`needs_overwrite`||e===`reconcile`?`text-notice-ink`:`text-ink-muted`}function De(e){return e.direction===`remote`&&e.status===`reattach`&&e.problem===`sftp_reconciliation_required`}function Oe({openRequest:e=0}){let t=l(),[n,r]=(0,N.useState)(Ee),i=v(T),[a,o]=(0,N.useState)(!1),s=(0,N.useRef)(0);(0,N.useEffect)(()=>{e===0||s.current===e||(s.current=e,r(e=>{let t={...e,collapsed:!1};return Y(t),t}),i&&o(!0))},[e,i]);let u=(0,N.useRef)(null),f=(0,N.useRef)(null),m=(0,N.useId)(),[_,b]=(0,N.useState)(!1),[S,C]=(0,N.useState)(``),w=i?!a:n.collapsed,E=(0,N.useRef)(null),D=(0,N.useRef)(null),O=(0,N.useRef)(null),k=(0,N.useSyncExternalStore)(x.subscribe,x.getSnapshot),A=(0,N.useMemo)(()=>{let e=new Map;for(let t of k)e.set(t.batchId,[...e.get(t.batchId)??[],t]);return[...e.entries()]},[k]),j=k.some(e=>e.allowedActions.includes(`pause`)),M=k.some(e=>e.allowedActions.includes(`resume`)&&e.status!==`needs_overwrite`),P=k.some(e=>e.allowedActions.includes(`cancel`)),ee=k.some(e=>(e.status===`completed`||e.status===`cancelled`)&&e.allowedActions.includes(`remove`)),F=k.some(e=>e.status===`failed`&&e.allowedActions.includes(`remove`)),I=j||M||P||ee||F,te=k.filter(e=>e.status===`queued`),ne=x.getMaxConcurrent(),re=x.getClearCompletedAfter(),R=x.getProcessingStopped(),ie=x.getLargeFileThreshold(),z=x.getLargeFileParallelism(),ae=x.getLargeFileChunkBytes(),oe=k.filter(e=>e.status!==`completed`&&e.status!==`cancelled`&&e.status!==`failed`),se=k.filter(e=>e.status===`running`),ce=oe.reduce((e,t)=>e+Math.max(t.totalBytes,0),0),le=oe.reduce((e,t)=>e+Math.max(t.transferredBytes,0),0),B=ce>0?Math.min(100,Math.round(le/ce*100)):0,V=se.reduce((e,t)=>e+Math.max(t.bytesPerSecond,0),0),ue=n.height,de=be;function H(){b(!1),o(!1)}function fe(e){r(t=>{let n={...t,...e};return Y(n),n})}function pe(e,t=!1){r(n=>{let r={...n,height:e};return t&&Y(r),r})}function U(e){e.preventDefault();let t=e.clientY,n=ue,i=e=>{pe(Math.min(de,Math.max(ye,Math.round(n+(t-e.clientY)))))},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a),r(e=>(Y(e),e))};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,a)}function me(e){e===`Home`?pe(ye,!0):e===`End`?pe(be,!0):e===`ArrowUp`?pe(Te(ue+32),!0):e===`ArrowDown`&&pe(Te(ue-32),!0)}function W(e){G(()=>x.applySettings(e.maxConcurrent??ne,e.clearCompletedAfterSeconds??re,e.processingStopped??R,e.largeFileThresholdBytes??ie,e.largeFileParallelism??z,e.largeFileChunkBytes??ae))}function G(e){C(``),e().catch(async e=>{await x.reconcile().catch(()=>void 0);let n=c(e)||(e instanceof Error?e.message:``);C(t(n===`sftp_transfer_state`?`sftp.manager.controlChanged`:n===`sftp_failed`||n===`sftp_cleanup_pending`?`sftp.manager.cleanupFailed`:`sftp.manager.controlFailed`))})}g({open:_,containerRefs:[E],onDismiss:()=>b(!1),returnFocusRef:O}),h({open:_,menuRef:D,onClose:()=>b(!1)});let he=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,L.jsx)(`span`,{className:i?``:`hidden sm:inline`,children:t(`sftp.manager.concurrency`)}),(0,L.jsx)(`select`,{"aria-label":t(`sftp.manager.concurrency`),value:ne,onChange:e=>W({maxConcurrent:Number(e.target.value)}),className:`rounded border border-control-line bg-control px-1 py-0.5 text-xs`,children:xe.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))})]}),(0,L.jsxs)(`label`,{className:`flex items-center gap-1 text-ink-muted`,children:[(0,L.jsx)(`span`,{className:i?``:`hidden md:inline`,children:t(`sftp.manager.autoClear`)}),(0,L.jsx)(`select`,{"aria-label":t(`sftp.manager.autoClear`),value:Se.includes(re)?re:0,onChange:e=>W({clearCompletedAfterSeconds:Number(e.target.value)}),className:`rounded border border-control-line bg-control px-1 py-0.5 text-xs`,children:Se.map(e=>(0,L.jsx)(`option`,{value:e,children:e===0?t(`sftp.manager.autoClearOff`):_e(e)},e))})]}),(0,L.jsx)(Ce,{label:t(`sftp.manager.largeFileThreshold`),valueBytes:ie,min:16,max:1024,onCommit:e=>W({largeFileThresholdBytes:e})}),(0,L.jsx)(we,{label:t(`sftp.manager.largeFileParallelism`),value:z,min:1,max:J,onCommit:e=>W({largeFileParallelism:e})}),(0,L.jsx)(Ce,{label:t(`sftp.manager.largeFileChunk`),valueBytes:ae,min:8,max:4096,onCommit:e=>W({largeFileChunkBytes:e})})]}),ge=(0,L.jsxs)(`section`,{className:i?`flex min-h-0 flex-1 flex-col text-sm`:`relative mt-3 shrink-0 overflow-visible rounded-md border border-line/60 bg-toolbar/30 text-xs md:mt-2`,"aria-labelledby":m,children:[i||w||k.length===0?null:(0,L.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,"aria-label":t(`sftp.manager.resize`),"aria-valuenow":ue,"aria-valuemin":ye,"aria-valuemax":de,tabIndex:0,onPointerDown:U,onKeyDown:e=>{[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)&&(e.preventDefault(),me(e.key))},className:`group absolute inset-x-0 -top-3 z-10 flex h-6 touch-none cursor-row-resize items-center justify-center focus:outline-none`,children:(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`h-1 w-10 rounded-full bg-control-line transition-colors group-hover:bg-ink-muted group-active:bg-accent group-focus-visible:bg-accent`})}),(0,L.jsxs)(`div`,{className:`relative flex shrink-0 items-center gap-2 px-3 ${i?`min-h-14 border-b border-line py-1`:`min-h-9 flex-wrap py-1.5 md:min-h-8 md:py-1`}`,children:[i?(0,L.jsx)(`h3`,{id:m,className:`min-w-0 flex-1 truncate font-medium`,children:t(`sftp.manager.heading`)}):(0,L.jsxs)(`button`,{type:`button`,"aria-label":t(w?`sftp.manager.expand`:`sftp.manager.collapse`),"aria-expanded":!w,"aria-controls":`${m}-jobs`,onClick:()=>fe({collapsed:!w}),className:`flex min-w-0 items-center gap-1.5 rounded ${w?`after:absolute after:inset-0 after:cursor-pointer after:rounded-md`:``} hover:text-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-accent`,children:[(0,L.jsx)(d,{name:`chevronRight`,className:`size-3 transition-transform ${w?``:`rotate-90`}`}),(0,L.jsx)(`h3`,{id:m,className:`${w?`text-ink-muted`:`text-ink`} truncate font-medium`,children:t(`sftp.manager.heading`)})]}),w?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`min-w-0 grow truncate font-medium text-ink`,children:oe.length>0?t(`sftp.manager.summaryRunning`,{count:oe.length,progress:B,speed:y(V)}):t(`sftp.manager.summaryIdle`,{count:k.length})}),ce>0?(0,L.jsx)(`progress`,{className:`hidden w-28 sm:block`,max:ce,value:le}):null]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,"aria-pressed":R,"aria-label":t(R?`sftp.manager.startProcessing`:`sftp.manager.stopProcessing`),onClick:()=>W({processingStopped:!R}),className:`flex size-9 items-center justify-center rounded md:size-7 ${R?`text-notice-ink`:`text-ink-muted`} hover:bg-select-fill focus:bg-select-fill focus:outline-none`,children:(0,L.jsx)(`span`,{"aria-hidden":`true`,children:R?`▶`:`⏸`})}),i?null:he]}),(0,L.jsxs)(`div`,{ref:E,className:`relative ml-auto`,children:[I?(0,L.jsx)(`button`,{ref:O,type:`button`,"aria-label":t(`sftp.manager.actions`),"aria-haspopup":`menu`,"aria-expanded":_,onClick:()=>b(e=>!e),className:`flex size-8 items-center justify-center rounded text-ink-muted hover:bg-select-fill hover:text-ink focus:bg-select-fill focus:outline-none`,children:(0,L.jsx)(d,{name:`moreHorizontal`,className:`size-4`})}):null,_?(0,L.jsxs)(`div`,{ref:D,role:`menu`,"aria-label":t(`sftp.manager.actions`),className:`absolute right-0 z-20 w-48 rounded-lg border border-control-line bg-card p-1 shadow-lg ${i?`top-full mt-1`:`bottom-full mb-1`}`,children:[j?(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{b(!1),G(()=>x.pauseAll())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.pauseAll`)}):null,M?(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{b(!1),G(()=>x.resumeAll())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.resumeAll`)}):null,P?(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{b(!1),G(()=>x.cancelAll())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm text-danger hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.cancelAll`)}):null,ee?(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{b(!1),G(()=>x.clearFinished())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.transfer.clear`)}):null,F?(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{b(!1),G(()=>x.clearFailed())},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,children:t(`sftp.manager.clearFailed`)}):null]}):null]}),i?(0,L.jsx)(`button`,{ref:f,type:`button`,"aria-label":t(`sftp.manager.close`),onClick:H,className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-select-fill`,children:(0,L.jsx)(d,{name:`close`,className:`size-4`})}):null]}),i?(0,L.jsxs)(`details`,{className:`shrink-0 border-b border-line px-3`,children:[(0,L.jsx)(`summary`,{className:`cursor-pointer py-3 text-sm text-ink-muted`,children:t(`sftp.manager.settings`)}),(0,L.jsx)(`div`,{className:`flex max-h-40 flex-wrap items-center gap-3 overflow-y-auto pb-3`,children:he})]}):null,S===``?null:(0,L.jsxs)(`div`,{role:`alert`,className:`mx-2.5 mb-2 flex items-start gap-2 rounded bg-danger/10 px-2.5 py-2 text-danger`,children:[(0,L.jsx)(`span`,{className:`grow`,children:S}),(0,L.jsx)(`button`,{type:`button`,"aria-label":t(`sftp.manager.dismissError`),onClick:()=>C(``),className:`shrink-0 text-ink-muted hover:text-ink`,children:`×`})]}),i&&k.length===0?(0,L.jsx)(`p`,{className:`p-6 text-center text-ink-muted`,children:t(`sftp.manager.summaryIdle`,{count:0})}):null,w||k.length===0?null:(0,L.jsx)(`div`,{id:`${m}-jobs`,style:i?void 0:{height:ue},className:`space-y-1.5 overflow-auto overscroll-contain px-2.5 pb-2.5 ${i?`min-h-0 flex-1 pt-2`:``}`,children:A.map(([e,n])=>{let r=n[0],i=n.filter(e=>e.status===`failed`).length,a=n.filter(e=>e.status===`completed`).length;return(0,L.jsxs)(`section`,{className:`rounded-md bg-surface-subtle/70 p-2`,"aria-label":r.batchName,children:[(0,L.jsxs)(`div`,{className:`mb-1 flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:r.operation===`delete`?`×`:r.operation===`put`||r.direction===`upload`?`↑`:r.operation===`get`||r.direction===`download`?`↓`:`⇄`}),(0,L.jsx)(`span`,{className:`min-w-0 grow truncate font-medium`,title:r.batchName,children:r.batchName}),(0,L.jsx)(`span`,{className:`text-ink-muted`,children:t(r.batchKind===`folder`?`sftp.manager.folder`:`sftp.manager.file`)}),(0,L.jsxs)(`span`,{className:`tabular-nums text-ink-muted`,children:[a,`/`,n.length]}),i>0?(0,L.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>x.retryFailed(e)),children:t(`sftp.manager.retryFailed`,{count:i})}):null]}),(0,L.jsx)(`ul`,{className:`space-y-1`,"aria-label":t(`sftp.manager.items`),children:n.map(e=>{let n=e.totalBytes>=0?e.totalBytes:Math.max(e.transferredBytes,1),r=e.direction===`upload`&&(e.status===`queued`||e.status===`paused`||e.status===`reattach`||e.status===`needs_overwrite`)&&!x.hasUploadSource(e.id),i=De(e)?`reconcile`:r?`reattach`:e.status;return(0,L.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-2 gap-y-1`,children:[(0,L.jsx)(`span`,{className:`truncate font-mono`,title:`${e.alias}:${e.remotePath}`,children:e.name}),(0,L.jsxs)(`span`,{className:`flex items-center justify-self-end gap-1`,children:[(0,L.jsx)(`progress`,{className:`w-14`,max:Math.max(n,1),value:e.transferredBytes}),(0,L.jsx)(`span`,{className:`tabular-nums text-ink-muted`,children:e.operation===`delete`?`${e.transferredBytes}/${Math.max(e.totalBytes,0)}`:e.totalBytes<0?y(e.transferredBytes):`${y(e.transferredBytes)}/${y(e.totalBytes)}`})]}),(0,L.jsx)(`span`,{className:`tabular-nums text-ink-muted`,children:e.operation===`delete`?t(`sftp.manager.delete`):e.bytesPerSecond>0?`${y(e.bytesPerSecond)}/s`:`—`}),(0,L.jsx)(`span`,{className:`tabular-nums text-ink-muted`,children:e.remainingSeconds>=0&&e.status===`running`?t(`sftp.manager.remaining`,{duration:_e(e.remainingSeconds)}):`—`}),(0,L.jsxs)(`span`,{className:`col-span-2 flex flex-wrap items-center justify-end gap-2 whitespace-nowrap`,children:[(0,L.jsx)(`span`,{className:X(i),children:i===`failed`?e.problem===``?t(`sftp.manager.status.failed`):`${t(`sftp.manager.status.failed`)} · ${e.problem}`:t(R&&i===`queued`?`sftp.manager.status.held`:`sftp.manager.status.${i}`)}),e.status===`queued`&&te.length>1?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,"aria-label":t(`sftp.manager.moveUp`,{name:e.name}),disabled:te[0]?.id===e.id,onClick:()=>G(()=>x.move(e.id,`up`)),className:`flex size-9 items-center justify-center rounded text-accent disabled:text-ink-faint md:size-5`,children:`↑`}),(0,L.jsx)(`button`,{type:`button`,"aria-label":t(`sftp.manager.moveDown`,{name:e.name}),disabled:te[te.length-1]?.id===e.id,onClick:()=>G(()=>x.move(e.id,`down`)),className:`flex size-9 items-center justify-center rounded text-accent disabled:text-ink-faint md:size-5`,children:`↓`})]}):null,!r&&e.allowedActions.includes(`pause`)?(0,L.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>x.pause(e.id)),children:t(`sftp.transfer.pause`)}):null,!r&&e.allowedActions.includes(`resume`)&&e.status!==`needs_overwrite`?(0,L.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>x.resume(e.id)),children:t(`sftp.transfer.resume`)}):null,e.allowedActions.includes(`retry`)?(0,L.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>G(()=>x.retry(e.id)),children:t(`sftp.manager.retry`)}):null,!r&&e.allowedActions.includes(`resume`)&&e.status===`needs_overwrite`?(0,L.jsx)(`button`,{type:`button`,className:`text-notice-ink`,onClick:()=>G(()=>x.overwrite(e.id)),children:t(`sftp.overwrite`)}):null,e.allowedActions.includes(`cancel`)?(0,L.jsx)(`button`,{type:`button`,className:`text-danger`,onClick:()=>G(()=>x.cancel(e.id)),children:t(`sftp.cancel`)}):null,e.allowedActions.includes(`remove`)?(0,L.jsx)(`button`,{type:`button`,className:`text-ink-muted hover:text-ink`,onClick:()=>G(()=>x.remove(e.id)),children:t(`sftp.manager.remove`)}):null]})]},e.id)})})]},e)})})]});return i?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`button`,{ref:u,type:`button`,"aria-label":t(`sftp.manager.expand`),"aria-haspopup":`dialog`,"aria-expanded":a,onClick:()=>o(!0),className:`relative mt-1 flex min-h-11 shrink-0 items-center gap-2 overflow-hidden rounded-md border border-line/60 bg-toolbar/50 px-3 text-left text-xs active:bg-select-fill`,children:[(0,L.jsx)(d,{name:`chevronRight`,className:`size-3 -rotate-90 text-ink-muted`}),(0,L.jsx)(`span`,{className:`shrink-0 font-medium`,children:t(`sftp.manager.heading`)}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-ink-muted`,children:oe.length>0?t(`sftp.manager.summaryRunning`,{count:oe.length,progress:B,speed:y(V)}):t(`sftp.manager.summaryIdle`,{count:k.length})}),ce>0?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute bottom-0 left-0 h-0.5 bg-accent transition-[width]`,style:{width:`${B}%`}}):null]}),(0,L.jsx)(p,{open:a,labelledBy:m,onDismiss:H,closeOnOutside:!0,initialFocusRef:f,returnFocusRef:u,placement:`sheet`,panelClassName:`flex h-[min(36rem,85dvh)] max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-xl`,children:ge})]}):ge}function ke(e){if(e===`/`)return`/`;let t=e.split(`/`).filter(Boolean);return t.pop(),`/${t.join(`/`)}`||`/`}function Ae(e,t){return`${e===`/`?``:e}/${t}`}var je={connect:!0,edit:!0,createEntries:!0,rename:!0,chmod:!0,delete:!0,search:!0,details:!0,browserUpload:!0,download:!0,dragOut:!0,terminal:!0};function Me(e){return{alias:e,local:!1,can:je,list:t=>m.list(e,t),parentOf:ke,join:Ae,isRoot:e=>e===`/`,rootOf:()=>`/`,crumbs(e){let t=e.split(`/`).filter(Boolean);return[{label:`/`,path:`/`},...t.map((e,n)=>({label:e,path:`/${t.slice(0,n+1).join(`/`)}`}))]},acceptsPath:e=>e.startsWith(`/`)}}function Z(e){let t=/^\/\/[^/]+\/[^/]+(?:\/|$)/.exec(e);return t?`${t[0].replace(/\/$/,``)}/`:/^[A-Za-z]:\//.test(e)?e.slice(0,3):`/`}function Q(e){let t=e.replace(/\\/g,`/`),n=Z(t);if(t===n||t===n.replace(/\/$/,``))return e;let r=t.replace(/\/$/,``),i=r.lastIndexOf(`/`);return im.listLocal(e),parentOf:Q,join:$,isRoot:e=>e===Z(e),rootOf:Z,crumbs(e,t){let n=e.replace(/\\/g,`/`),r=Z(n),i=e=>e.path===t?{...e,label:`~`}:e;if(n===r)return[i({label:r,path:r})];let a=n.slice(r.length).split(`/`).filter(Boolean);return[i({label:r,path:r}),...a.map((e,t)=>i({label:e,path:`${r}${a.slice(0,t+1).join(`/`)}`}))]},acceptsPath:e=>e.startsWith(`/`)||/^[A-Za-z]:\//.test(e)};function Pe(e){return e===``?null:e===`sshc://local`?Ne:Me(e)}function Fe({aliases:e,initialLocation:t=null,onLocationChange:n=()=>void 0,onLoaded:r,onReset:i}){let a=l(),[o,s]=(0,N.useState)(``),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(void 0),[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)([]),[v,y]=(0,N.useState)(!1),[b,x]=(0,N.useState)(``),[S,C]=(0,N.useState)(null),[w,T]=(0,N.useState)({paths:[],index:-1}),E=(0,N.useRef)(0),D=(0,N.useRef)(``),O=(0,N.useRef)(!1),k=(0,N.useRef)(n);k.current=n;let A=(0,N.useRef)({alias:o,path:u});A.current={alias:o,path:u};let j=(0,N.useMemo)(()=>Pe(o),[o]);function M(t){return t===`sshc://local`||e.includes(t)}async function P(e=A.current.path,t={}){let n=t.alias??A.current.alias,i=Pe(n),o=++E.current;if(i===null)return y(!1),null;let s=t.refresh===!0,l=t.record??!s;D.current=e,y(!0),C(e),x(``);try{let t=await i.list(e);if(o!==E.current)return null;let a=t.path!==A.current.path||n!==A.current.alias;return d(t.path),p(t.home),h(!0),_(t.entries),k.current(n,t.path),l&&T(e=>{if(e.paths[e.index]===t.path)return e;let n=[...e.paths.slice(0,e.index+1),t.path];return{paths:n,index:n.length-1}}),r?.(t,{refresh:s,changed:a}),t.entries}catch(e){if(o!==E.current)return null;let t=c(e),n=e instanceof Error?e.message:`sftp_failed`;return x(i.local?t||n:t===`sftp_failed`?a(`sftp.connectionFailed`):t||(e instanceof Error?e.message:a(`sftp.connectionFailed`))),null}finally{o===E.current&&(y(!1),C(null))}}async function ee(e,t){let n=++E.current;y(!0),C(e),x(``);try{let e=await t();return n===E.current?e:null}catch(e){return n===E.current&&x(c(e)||(e instanceof Error?e.message:`sftp_failed`)),null}finally{n===E.current&&(y(!1),C(null))}}function F(e){E.current+=1,k.current(e,``),s(e),h(!1),d(``),p(void 0),_([]),T({paths:[],index:-1}),x(``),y(!1),C(null),i?.(),A.current={alias:e,path:``};let t=Pe(e);t!==null&&!t.can.connect&&P(``,{alias:e})}(0,N.useEffect)(()=>{if(t===null||O.current)return;let e=Pe(t.alias);e===null||!M(t.alias)||t.path!==``&&!e.acceptsPath(t.path)||(O.current=!0,E.current+=1,s(t.alias),d(t.path),h(!1),A.current={alias:t.alias,path:t.path},(!e.can.connect||t.connect===!0)&&P(t.path,{alias:t.alias}))},[e,t?.alias,t?.path]);async function I(e){let t=w.index+e,n=w.paths[t];n!==void 0&&await P(n,{record:!1})!==null&&T(e=>e.paths[t]===n?{...e,index:t}:e)}let te=w.index>0,ne=w.index>=0&&w.indexP(A.current.path),retry:()=>P(D.current),refresh:()=>P(A.current.path,{refresh:!0}),back:()=>I(-1),forward:()=>I(1),goHome:()=>P(``),goRoot:()=>P(j===null?`/`:j.rootOf(A.current.path)),openParent:()=>P(j===null?`/`:j.parentOf(A.current.path)),crumbs:j===null||u===``?[]:j.crumbs(u,f)}}function Ie({browser:e,list:t,refreshAfterChange:n,onQueueOpen:r,onInteract:i}){let a=l(),{alias:o,path:s,setProblem:d}=e,f=e.generation,{selectedEntries:p,selectedEntry:h,rowKeys:g,pendingFocus:_,setSelectedPaths:v}=t,[y,b]=(0,N.useState)(!1),[S,C]=(0,N.useState)(null),[w,T]=(0,N.useState)(null),[E,D]=(0,N.useState)(null);function O(e,t=`sftp_failed`){d(c(e)||(e instanceof Error?e.message:t))}function k(e,t){D({label:e,run:async()=>{D(null);try{await t()}catch(e){O(e)}}})}async function A(t){let n=f.current,r=o,i=s;b(!0);try{if(await m.mkdir(r,Ae(i,t)),n!==f.current)return;_.current=Ae(i,t),await e.load(i,{alias:r})}catch(e){if(n!==f.current)return;O(e)}finally{b(!1)}}async function j(t){let n=f.current,r=o,i=s,a=Ae(i,t);b(!0),d(``);try{if(await m.createEmptyFile(r,a),n!==f.current)return;_.current=a,await e.load(i,{alias:r})}catch(e){if(n!==f.current)return;O(e)}finally{b(!1)}}async function M(e,t){let r=f.current,i=o,s=ke(e.path),c=Ae(s,t);b(!0);try{if(await m.rename(i,e.path,c),r!==f.current)return;_.current=c,await n(s,i),k(a(`sftp.renamedTo`,{name:t}),async()=>{await m.rename(i,c,e.path),_.current=e.path,await n(s,i)})}catch(e){if(r!==f.current)return;O(e)}finally{b(!1)}}async function P(t,n,r){if(t.type===`symlink`||t.type===`other`)return;let i=f.current,l=o,u=s,p=ne(t.mode);b(!0);try{if(await m.chmod(l,t.path,n,t.revision,r),i!==f.current)return;let o=(await e.load(u,{alias:l,refresh:!0}))?.find(e=>e.path===t.path);!r&&o!==void 0&&p!==n&&k(a(`sftp.permissionsChanged`,{mode:n}),async()=>{await m.chmod(l,t.path,p,o.revision,!1),await e.load(u,{alias:l,refresh:!0})})}catch(e){if(i!==f.current)return;d(c(e)===`sftp_conflict`?a(`sftp.conflict`):c(e)||`sftp_failed`)}finally{b(!1)}}async function ee(e,t,n){b(!0),d(``);try{await x.addRemoteTransfers(e.map(e=>({sourceAlias:o,sourcePath:e.path,targetAlias:o,targetPath:n(e),kind:e.type===`directory`?`folder`:`file`,name:e.name,totalBytes:e.type===`file`?e.size:-1})),t),v(new Set)}catch(e){O(e)}finally{b(!1)}}async function F(){if(w===null)return;let e=new Set(x.getSnapshot().map(e=>e.id)),t=()=>{T(null),v(new Set),r()};b(!0),d(``);try{await x.addRemoteTransfers(w.map(e=>({sourceAlias:o,sourcePath:e.path,targetAlias:o,targetPath:e.path,kind:e.type===`directory`?`folder`:`file`,name:e.name,totalBytes:-1})),`delete`),t()}catch(n){x.getSnapshot().some(t=>!e.has(t.id)&&t.operation===`delete`)&&t(),O(n,`delete_failed`)}finally{b(!1)}}function I(){if(p.length===0||y)return;let e=new Set(p.map(e=>e.path)),t=g.slice(g.findIndex(t=>e.has(t))+1).find(t=>!e.has(t));_.current=t??g.filter(t=>!e.has(t)).pop()??`..`,i?.(),T(p)}function te(){h===null||y||(i?.(),C({kind:`rename`,entry:h}))}function L(e){i?.(),C(e)}async function re(e){i?.();try{await u.writeText(p.map(t=>e===`name`?t.name:t.path).join(` +`))}catch{d(a(`copy.refused`))}}async function R(){try{await u.writeText(s),d(``)}catch{d(a(`copy.refused`))}}return{acting:y,undo:E,dismissUndo:()=>D(null),inputIntent:S,deleting:w,ask:L,cancelInput:()=>C(null),cancelDelete:()=>{_.current=null,T(null)},deleteSelection:I,renameSelection:te,copySelected:re,copyCurrentPath:R,submit(e){let t=S;t!==null&&(C(null),t.kind===`mkdir`?A(e):t.kind===`createFile`?j(e):t.kind===`rename`?M(t.entry,e):t.kind===`duplicate`?ee([t.entry],`copy`,()=>Ae(ke(t.entry.path),e)):t.kind===`moveTo`?ee(t.entries,`move`,t=>Ae(e,t.name)):P(t.entry,e,t.recursive))},remove:F}}function Le({actions:e,currentPath:t,returnFocusRef:n}){let r=l(),i=(0,N.useId)(),{inputIntent:a,deleting:o}=e;return(0,L.jsxs)(L.Fragment,{children:[o===null?null:(0,L.jsx)(S,{id:`${i}-delete`,heading:o.length===1?r(`sftp.deleteHeading`):r(`sftp.deleteHeadingCount`,{count:o.length}),body:(0,L.jsxs)(`div`,{className:`space-y-2 text-sm text-ink-muted`,children:[o.some(e=>e.type===`directory`)?(0,L.jsx)(`p`,{children:r(`sftp.deleteContentsWarning`)}):null,(0,L.jsx)(`ul`,{className:`max-h-48 space-y-1 overflow-auto`,children:o.map(e=>(0,L.jsx)(`li`,{className:`break-all font-mono`,children:e.path},e.path))})]}),confirmLabel:r(`sftp.delete`),cancelLabel:r(`sftp.cancel`),returnFocusRef:n,onConfirm:()=>void e.remove(),onCancel:e.cancelDelete}),a===null?null:(0,L.jsx)(_,{id:`${i}-input`,heading:r(a.kind===`mkdir`?`sftp.newFolder`:a.kind===`createFile`?`sftp.newFile`:a.kind===`rename`?`sftp.rename`:a.kind===`duplicate`?`sftp.duplicate`:a.kind===`moveTo`?`sftp.moveTo`:a.recursive?`sftp.chmodRecursive`:`sftp.chmod`),label:r(a.kind===`chmod`?`sftp.chmodPrompt`:a.kind===`rename`||a.kind===`duplicate`?`sftp.renamePrompt`:a.kind===`createFile`?`sftp.newFilePrompt`:a.kind===`moveTo`?`sftp.moveToPrompt`:`sftp.mkdirPrompt`),initialValue:a.kind===`mkdir`||a.kind===`createFile`?``:a.kind===`rename`?a.entry.name:a.kind===`duplicate`?`${a.entry.name}.copy`:a.kind===`moveTo`?t:ne(a.entry.mode),inputMode:a.kind===`chmod`?`numeric`:`text`,submitLabel:r(a.kind===`mkdir`?`sftp.newFolder`:a.kind===`createFile`?`sftp.newFile`:a.kind===`rename`?`sftp.rename`:a.kind===`duplicate`?`sftp.duplicate`:a.kind===`moveTo`?`sftp.move`:`sftp.chmod`),cancelLabel:r(`sftp.cancel`),returnFocusRef:n,validate:e=>a.kind===`chmod`?/^0?[0-7]{3}$/.test(e)?``:r(`sftp.chmodInvalid`):a.kind===`moveTo`?e.startsWith(`/`)?``:r(`sftp.pathAbsolute`):e===``?r(`sftp.nameRequired`):e.includes(`/`)?r(`sftp.nameInvalid`):a.kind===`rename`&&e===a.entry.name||a.kind===`duplicate`&&e===a.entry.name?r(`sftp.renameUnchanged`):``,onSubmit:e.submit,onCancel:e.cancelInput})]})}function Re({browser:e,onResults:t}){let{alias:n,path:r,entries:i}=e,[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(!1),d=(0,N.useRef)(null);(0,N.useEffect)(()=>{l&&d.current?.focus()},[l]);let f=a===null?i:a.entries,p=s.trim().toLocaleLowerCase(),h=e=>p===``||a!==null?e:e.filter(e=>e.name.toLocaleLowerCase().includes(p));async function g(i=s,c=a?.root??r){let l=i.trim();if(n===``||l===``||c===``)return;let u=await e.track(c,()=>m.search(n,c,l));u!==null&&(o({root:u.path,query:u.query,entries:u.entries,truncated:u.truncated}),t?.())}function _(){if(a===null)return;let t=a.root;o(null),c(``),e.load(t)}function v(t,n){return a===null?e.load(t,{alias:n}):g(a.query,a.root)}function y(){a===null?e.refresh():g(a.query,a.root)}function b(e,t){return a===null?t(e)===r:a.root===`/`||e===a.root||e.startsWith(`${a.root}/`)}function x(){o(null),c(``),u(!1)}return{search:a,setSearch:o,filter:s,setFilter:c,normalizedFilter:p,listedEntries:f,matches:h,mobileSearchOpen:l,setMobileSearchOpen:u,searchInput:d,runSearch:g,endSearch:_,refreshAfterChange:v,refreshCurrent:y,covers:b,clear:x}}var ze=new Map;function Be(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function Ve(e){let t=Be();return ze.set(t,e),t}function He(e){ze.delete(e)}function Ue(e){return ze.get(e)??null}async function We(e){let t=[],n=new Set,r=async(e,i)=>{let a=i===``?e.name:`${i}/${e.name}`;if(e.isFile&&e.file!==void 0){let n=await new Promise((t,n)=>e.file?.(t,n)),r=I(a);r!==null&&t.push({file:n,relativePath:r});return}if(!e.isDirectory||e.createReader===void 0)return;let o=I(a);o!==null&&n.add(o);let s=e.createReader();for(;;){let e=await new Promise((e,t)=>s.readEntries(e,t));if(e.length===0)break;for(let t of e)await r(t,a)}},i=[...e.items??[]].map(e=>e.webkitGetAsEntry?.()??null);if(i.some(e=>e!==null)){for(let e of i)e!==null&&await r(e,``);return{files:t,directories:[...n]}}return{files:[...e.files].flatMap(e=>{let t=I(e.name);return t===null?[]:[{file:e,relativePath:t}]}),directories:[]}}function Ge(e){return I(e)===e&&!e.includes(`/`)}function Ke(e){return e.filter(ee)}function qe({browser:e,selectedEntries:t,busy:n,counterpart:r=null,onQueueOpen:i}){let a=l(),{alias:o,path:s,connected:u,source:d,setProblem:f}=e,[p,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(null),[v,y]=(0,N.useState)(!1),[b,S]=(0,N.useState)(0),C=(0,N.useRef)(null),w=(0,N.useRef)(null),T=(0,N.useSyncExternalStore)(x.subscribe,x.getSnapshot),E=(0,N.useRef)(new Set),D=d?.local===!0,O=r!==null&&r.alias===`sshc://local`,k=r!==null&&!O&&r.alias!==``;function A(e,t=`sftp_failed`){f(c(e)||(e instanceof Error?e.message:t))}function j(){S(e=>e+1),i?.()}(0,N.useEffect)(()=>{if(!u||s===``)return;let t=T.filter(e=>e.status===`completed`&&!E.current.has(e.id)&&(D?e.operation===`get`&&Q(e.remotePath)===s:(e.direction===`upload`||e.operation===`put`)&&e.alias===o&&ke(e.remotePath)===s));if(t.length!==0){for(let e of t)E.current.add(e.id);e.refresh()}},[T,o,s,u,D]);async function M(t,r=[]){if(o===``||D||t.length===0&&r.length===0||n)return;let i=t.flatMap(e=>{let t=I(e.relativePath);return t===null?[]:[{file:e.file,relativePath:t}]}),l=r.flatMap(e=>{let t=I(e);return t===null?[]:[t]});if(i.length===0&&l.length===0)return;let u=t=>e.source?.join(s,t)??`${s}/${t}`;y(!0),f(``);let d=i.map(e=>({alias:o,remotePath:u(e.relativePath),localName:e.relativePath,file:e.file})),p;try{p=x.reserveUploads(d);let e=[...new Set([...te(i),...l])].sort((e,t)=>e.split(`/`).length-t.split(`/`).length||e.localeCompare(t));for(let t of e)try{await m.mkdir(o,u(t))}catch(e){if(c(e)!==`sftp_exists`)throw e}let t=[...l,...i.map(e=>e.relativePath)].map(e=>e.split(`/`)[0]??e).find(e=>e!==``)??a(`sftp.manager.folder`),n=l.length>0||i.length>1||i.some(e=>e.relativePath.includes(`/`));await x.addUploads(d,{name:n?t:i[0]?.relativePath??t,kind:n?`folder`:`file`},p),p=void 0}catch(e){A(e)}finally{p?.release(),y(!1)}}function ne(e,t){let n=Array.from(e.target.files??[]).flatMap(e=>{let n=I(t(e));return n===null?[]:[{file:e,relativePath:n}]});e.target.value=``,M(n)}async function L(e,t){y(!0);try{await x.addRemoteTransfers(t,e),j(),f(``)}catch(e){A(e)}finally{y(!1)}}async function re(e){if(!(d===null||s===``)){if(D){if(e.alias===`sshc://local`)return;await L(`get`,Ke(e.entries).map(t=>({sourceAlias:e.alias,sourcePath:t.path,targetAlias:e.alias,targetPath:$(s,t.name),name:t.name,kind:t.type===`directory`?`folder`:`file`,totalBytes:t.size})));return}if(e.alias===`sshc://local`){await L(`put`,e.entries.map(e=>({sourceAlias:o,sourcePath:e.path,targetAlias:o,targetPath:d.join(s,e.name),name:e.name,kind:e.type===`directory`?`folder`:`file`,totalBytes:e.size})));return}if(e.alias===o){let t=e.entries.filter(e=>ke(e.path)!==s);t.length>0&&await ce({alias:e.alias,entries:t},`move`);return}_(e)}}async function R(e){if(e.preventDefault(),h(!1),n||o===``||!u)return;let t=typeof e.dataTransfer.getData==`function`?e.dataTransfer.getData(F):``;if(t!==``){let e=Ue(t);if(e===null||!e.entries.every(e=>Ge(e.name))){f(a(`sftp.remoteDropInvalid`));return}await re(e);return}if(D)return;let r=await We(e.dataTransfer);await M(r.files,r.directories)}function ie(e){e.preventDefault(),!(n||!u)&&(D&&!e.dataTransfer.types.includes(`application/x-sshc-sftp-entries`)||h(!0))}function z(e){D&&!e.dataTransfer.types.includes(`application/x-sshc-sftp-entries`)||(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function ae(e){e.currentTarget.contains(e.relatedTarget)||h(!1)}function oe(e,n,r){if(n.type!==`file`&&n.type!==`directory`){e.preventDefault();return}let i=r.has(n.path)?t:[n],a={alias:o,entries:Ke(i).map(e=>({name:e.name,path:e.path,type:e.type,size:e.size}))};e.dataTransfer.effectAllowed=`copyMove`;let s=Ve(a);e.dataTransfer.setData(F,s),e.dataTransfer.setData(`text/plain`,a.entries.map(e=>`${o}:${e.path}`).join(` +`)),e.currentTarget.addEventListener(`dragend`,()=>He(s),{once:!0})}async function se(e){let t=g;_(null),t!==null&&await ce(t,e)}async function ce(e,t){if(!(d===null||o===``||s===``)){f(``);try{await x.addRemoteTransfers(e.entries.map(t=>({sourceAlias:e.alias,sourcePath:t.path,targetAlias:o,targetPath:d.join(s,t.name),kind:t.type===`directory`?`folder`:`file`,name:t.name,totalBytes:t.type===`file`?t.size:-1})),t)}catch(e){A(e)}}}function le(e){return D||O?ee(e):P(e)!==`other`}async function B(e,t=o){let i=e.filter(le);if(n||i.length===0)return;if(f(``),Pe(t)?.local===!0){if(!k||r===null)return;await L(`put`,i.map(e=>({sourceAlias:r.alias,sourcePath:e.path,targetAlias:r.alias,targetPath:`${r.path.replace(/\/$/,``)}/${e.name}`,name:e.name,kind:e.type===`directory`?`folder`:`file`,totalBytes:e.size})));return}let a=(await Promise.allSettled(i.map(e=>{let n=P(e)===`directory`?`folder`:`file`,i=P(e)===`file`?e.size:-1;return O&&r!==null?x.addRemoteTransfers([{sourceAlias:t,sourcePath:e.path,targetAlias:t,targetPath:$(r.path,e.name),name:e.name,kind:n,totalBytes:i}],`get`):x.addDownload(t,e.path,n,i)}))).find(e=>e.status===`rejected`);a?.status===`rejected`&&A(a.reason)}return{dragging:p,sendable:le,dragEnter:ie,dragOver:z,dragLeave:ae,acceptDrop:R,beginDrag:oe,remoteDrop:g,acceptRemoteDrop:se,dismissRemoteDrop:()=>_(null),uploadInput:C,folderUploadInput:w,uploadFromInput:ne,chooseFiles:()=>C.current?.click(),chooseFolder:()=>w.current?.click(),transferOut:B,canTransferOut:!D||k,queuing:v,openQueueRequest:b,openQueue:j}}var Je=[],Ye=224,Xe=40;function Ze({actions:e}){return(0,L.jsx)(L.Fragment,{children:e.map(e=>(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:e.disabled===!0,onClick:e.run,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0 ${e.danger===!0?`text-danger`:``}`,children:e.label},e.key))})}function Qe({aliases:e,hosts:t=Je,target:n=null,initialLocation:r=null,initialSort:i={key:`name`,direction:`ascending`},showTransfers:a=!0,counterpart:c=null,onTargetHandled:u=()=>void 0,onLocationChange:f=()=>void 0,onSortChange:m=()=>void 0,onNavigationBlockerChange:_,onDirtyChange:b,onNavigateLocation:S,onOpenTerminal:C,onQueueOpen:w}){let O=l(),[k,A]=(0,N.useState)(null),[M,F]=(0,N.useState)(null),[I,te]=(0,N.useState)(i),ne=(0,N.useRef)(null),re=D(ne),R=v(T),ie=(0,N.useId)(),z=(0,N.useRef)(0),se=(0,N.useRef)(null),ce=(0,N.useRef)(null),B=(0,N.useRef)(null),V=(0,N.useRef)(new Set),ue=(0,N.useSyncExternalStore)(x.subscribe,x.getSnapshot);g({open:M!==null&&!R,containerRefs:[se],onDismiss:()=>F(null),returnFocusRef:B}),h({open:M!==null&&!R,menuRef:ce,onClose:()=>F(null)});let H=Fe({aliases:e,initialLocation:r,onLocationChange:f,onLoaded:(e,{refresh:t,changed:n})=>{Te.setSelectedPaths(t=>new Set(e.entries.filter(e=>t.has(e.path)).map(e=>e.path))),F(null),J.setSearch(null),n&&Z.dismissUndo(),t||Se.close()},onReset:()=>{Se.close(),A(null),Te.clearSelection(),Te.setFocusedKey(null),J.clear(),F(null),Z.dismissUndo()}}),{alias:U,path:me,connected:W,entries:G,problem:he,setProblem:_e,pendingPath:ve,listingFailed:ye,source:be}=H,K=be?.can,xe=be?.local===!0,Se=fe({onProblem:_e,onSaved:async(e,t)=>await H.load(ke(t.entry.path),{alias:e,refresh:!0})!==null,onNavigationBlockerChange:_,onDirtyChange:b,onNavigateLocation:S}),q=Se.dirty,J=Re({browser:H,onResults:()=>{Te.clearSelection(),Te.setFocusedKey(null),F(null),Z.dismissUndo()}}),Ce=J.matches(oe(J.listedEntries,I)),we=J.search===null&&!H.atRoot,Te=le({entries:Ce,loadedEntries:J.listedEntries,parentRowVisible:we,busy:H.busy||Se.busy,locked:q,mobileInteraction:R,onActivate:e=>{P(e)===`directory`?Be(e.path):K?.details&&A([e])},onOpenParent:()=>{H.openParent()},onInteract:()=>F(null),onContextMenu:(e,t,n)=>{B.current=null,F({kind:`context`,x:t,y:n})},onRenameKey:()=>{K?.rename&&Z.renameSelection()},onDeleteKey:()=>{K?.delete&&Z.deleteSelection()},onEscape:J.search===null?void 0:J.endSearch}),{selectedPaths:Ee,selectedEntries:Y,selectedEntry:X,pendingFocus:De,activeRow:Ae,activate:je,openParent:Me}=Te,Z=Ie({browser:H,list:Te,refreshAfterChange:J.refreshAfterChange,onQueueOpen:()=>Q.openQueue(),onInteract:()=>F(null)}),Q=qe({browser:H,selectedEntries:Y,busy:H.busy||Z.acting||Se.busy,counterpart:c,onQueueOpen:w}),$=H.busy||Z.acting||Se.busy||Q.queuing,[Ne,Pe]=(0,N.useState)(null);function ze(e){te(t=>{let n=j(t.key,t.direction,e);return m(n),n})}function Be(e,t){return F(null),H.load(e,t)}(0,N.useEffect)(()=>{if(!(n===null||n.request===z.current)){if(z.current=n.request,u(n.request),!e.includes(n.alias)||!n.path.startsWith(`/`)||n.path.length>4096||/[\x00\r\n]/u.test(n.path)){_e(O(`sftp.linkTargetInvalid`));return}H.selectHost(n.alias),Be(ke(n.path),{alias:n.alias}).then(async e=>{if(e===null)return;let t=e.find(e=>e.path===n.path);if(n.action===`browse`){t?.type===`directory`&&await Be(t.path,{alias:n.alias});return}if(t===void 0){_e(O(`sftp.linkTargetNotFound`));return}if(n.action===`edit`&&t.type!==`file`){_e(O(`sftp.linkTargetNotFile`));return}Pe({alias:n.alias,action:n.action,entry:t})})}},[n?.request]),(0,N.useEffect)(()=>{Ne===null||$||U!==Ne.alias||(Pe(null),Ne.action===`edit`?Se.open(Ne.alias,Ne.entry):Q.transferOut([Ne.entry],Ne.alias))},[Ne,$,U]),(0,N.useEffect)(()=>{if(!W||q||xe)return;let e=ue.filter(e=>e.direction===`remote`&&e.operation===`delete`&&e.status===`completed`&&e.alias===U&&J.covers(e.remotePath,ke)&&!V.current.has(e.id));if(e.length!==0){for(let t of e)V.current.add(t.id);J.refreshAfterChange(me,U)}},[ue,U,me,W,q,J.search,xe]);function Ve(){Y.length===0||!K?.details||(F(null),A(Y))}function He(e,t){B.current=t,F(t=>t?.kind===e?null:{kind:e})}let Ue=Y.some(Q.sendable),We=O(xe?`sftp.local.upload`:`sftp.download`);function Ge(){let e=[];return X!==null&&P(X)===`directory`&&e.push({key:`open`,label:O(`sftp.openFolder`),disabled:$||q,run:()=>je(X)}),J.search!==null&&X!==null&&e.push({key:`reveal`,label:O(`sftp.revealInFolder`),disabled:$||q,run:()=>{F(null),De.current=X.path,Be(ke(X.path))}}),K?.details&&e.push({key:`details`,label:O(`sftp.details`),disabled:$,run:Ve}),K?.edit&&X!==null&&P(X)===`file`&&e.push({key:`edit`,label:O(`sftp.editFile`),disabled:$||q,run:()=>{F(null),Se.open(U,X)}}),Ue&&Q.canTransferOut&&e.push({key:`download`,label:We,disabled:$,run:()=>{F(null),Q.transferOut(Y)}}),K?.chmod&&X!==null&&(X.type===`file`||X.type===`directory`)&&e.push({key:`chmod`,label:O(`sftp.chmod`),disabled:$,run:()=>Z.ask({kind:`chmod`,entry:X,recursive:!1})}),K?.chmod&&X!==null&&X.type===`directory`&&e.push({key:`chmodRecursive`,label:O(`sftp.chmodRecursive`),disabled:$,run:()=>Z.ask({kind:`chmod`,entry:X,recursive:!0})}),K?.rename&&X!==null&&e.push({key:`rename`,label:O(`sftp.rename`),disabled:$,run:Z.renameSelection}),K?.createEntries&&X!==null&&(X.type===`file`||X.type===`directory`)&&e.push({key:`duplicate`,label:O(`sftp.duplicate`),disabled:$,run:()=>Z.ask({kind:`duplicate`,entry:X})}),K?.rename&&Y.length>0&&Y.every(e=>e.type===`file`||e.type===`directory`)&&e.push({key:`moveTo`,label:O(`sftp.moveTo`),disabled:$,run:()=>Z.ask({kind:`moveTo`,entries:Y})}),e.push({key:`copyName`,label:O(Y.length===1?`sftp.copyName`:`sftp.copyNames`),run:()=>void Z.copySelected(`name`)}),e.push({key:`copyPath`,label:O(Y.length===1?`sftp.copyPath`:`sftp.copyPaths`),run:()=>void Z.copySelected(`path`)}),K?.delete&&e.push({key:`delete`,label:O(`sftp.delete`),danger:!0,disabled:$,run:Z.deleteSelection}),e.push({key:`invert`,label:O(`sftp.invertSelection`),run:Te.invertDisplayedSelection}),e.push({key:`clear`,label:O(`sftp.clearSelection`),run:()=>{F(null),Te.clearSelection()}}),e}function Ke(){return X===null?O(`sftp.selectedActionsCount`,{count:Y.length}):O(`sftp.selectedActions`,{name:X.name})}function Qe(){return[{key:`copyCurrentPath`,label:O(`sftp.copyPath`),disabled:!W,run:()=>{F(null),Z.copyCurrentPath()}},...K?.createEntries?[{key:`newFolder`,label:O(`sftp.newFolder`),disabled:$||!W,run:()=>Z.ask({kind:`mkdir`})},{key:`newFile`,label:O(`sftp.newFile`),disabled:$||!W,run:()=>Z.ask({kind:`createFile`})}]:[],...K?.browserUpload?[{key:`upload`,label:O(`sftp.upload`),disabled:$||!W,run:()=>{F(null),Q.chooseFiles()}},{key:`uploadFolder`,label:O(`sftp.uploadFolder`),disabled:$||!W,run:()=>{F(null),Q.chooseFolder()}}]:[],{key:`forward`,label:O(`sftp.forward`),disabled:$||q||!H.canForward,run:()=>{F(null),H.forward()}},{key:`home`,label:O(`sftp.homeDirectory`),disabled:$||q||!W,run:()=>{Be(``)}},{key:`root`,label:O(`sftp.rootDirectory`),disabled:$||q||!W||H.atRoot,run:()=>{F(null),H.goRoot()}},...K?.terminal&&C!==void 0?[{key:`terminal`,label:O(`sftp.openTerminalHere`),disabled:$||q||!W,run:()=>{F(null),C(U,me)}}]:[],{key:`selectAll`,label:O(`sftp.selectAll`),disabled:$||Ce.length===0,run:Te.selectAllDisplayed},...[`name`,`type`,`size`,`modified`].map(e=>({key:`sort-${e}`,label:`${O(`sftp.${e}`)}${O(I.key===e&&I.direction===`ascending`?`table.sortDescending`:`table.sortAscending`)}`,run:()=>{ze(e),F(null)}}))]}let $e=(0,L.jsx)(`input`,{type:`search`,"aria-label":O(`sftp.filter`),value:J.filter,onChange:e=>J.setFilter(e.target.value),onKeyDown:e=>{e.key!==`Enter`||!K?.search||(e.preventDefault(),J.runSearch())},placeholder:O(`sftp.filterPlaceholder`),className:`h-8 w-full rounded-md border border-control-line/60 bg-control/70 py-1 pl-7 pr-2 text-xs outline-none focus:border-accent md:h-7`}),et=O(xe?`sftp.local.loading`:`sftp.loading`);return(0,L.jsxs)(`section`,{ref:ne,className:`flex h-full min-h-0 min-w-0 flex-col gap-1.5 md:gap-1`,"aria-labelledby":ie,children:[(0,L.jsx)(`h2`,{id:ie,className:`sr-only`,children:O(xe?`sftp.local.heading`:`sftp.heading`)}),(0,L.jsx)(ge,{browser:H,aliases:e,hosts:t,onHostChange:H.selectHost,onRefresh:()=>{!$&&!q&&W&&J.refreshCurrent()},busy:$,locked:q,mobile:R,labels:xe?{path:O(`sftp.local.path`),editPath:O(`sftp.local.editPath`),input:O(`sftp.local.pathInput`)}:{path:O(`sftp.path`),editPath:O(`sftp.editPath`),input:O(`sftp.path`)},leading:K?.terminal&&C!==void 0?(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.openTerminalHere`),title:O(`sftp.openTerminalHere`),disabled:$||q||!W||me===``,onClick:()=>void C(U,me),className:`flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint md:size-8`,children:(0,L.jsx)(d,{name:`terminal`,className:`size-4`})}):null,mobileActions:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.mobile.search`),"aria-expanded":J.mobileSearchOpen,disabled:$||!W,onClick:()=>J.setMobileSearchOpen(e=>!e),className:`flex size-11 shrink-0 items-center justify-center rounded active:bg-select-fill ${J.mobileSearchOpen||J.filter!==``?`text-accent`:`text-ink-muted`}`,children:(0,L.jsx)(d,{name:`search`,className:`size-4`})}),(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.mobile.actions`),"aria-haspopup":`dialog`,"aria-expanded":M?.kind===`folder`,onClick:e=>He(`folder`,e.currentTarget),className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted active:bg-select-fill`,children:(0,L.jsx)(d,{name:`moreHorizontal`,className:`size-4`})})]})}),he===``||ye?null:(0,L.jsx)(o,{tone:`danger`,children:he}),J.search===null?null:(0,L.jsxs)(`p`,{role:`status`,className:`flex items-center gap-3 rounded-md border border-line bg-surface-subtle px-3 py-2 text-sm text-ink-muted`,children:[(0,L.jsx)(`span`,{className:`min-w-0 grow truncate`,children:O(J.search.truncated?`sftp.searchResultsTruncated`:`sftp.searchResults`,{count:J.search.entries.length,query:J.search.query,path:J.search.root})}),(0,L.jsx)(`button`,{type:`button`,disabled:$,onClick:J.endSearch,className:`shrink-0 text-accent disabled:text-ink-faint`,children:O(`sftp.searchEnd`)})]}),Z.undo===null?null:(0,L.jsxs)(`p`,{role:`status`,className:`flex items-center gap-3 rounded-md border border-line bg-surface-subtle px-3 py-2 text-sm text-ink-muted`,children:[(0,L.jsx)(`span`,{className:`min-w-0 grow truncate`,children:Z.undo.label}),(0,L.jsx)(`button`,{type:`button`,disabled:$,onClick:()=>void Z.undo?.run(),className:`shrink-0 text-accent disabled:text-ink-faint`,children:O(`sftp.undo`)}),(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.dismissUndo`),onClick:Z.dismissUndo,className:`flex size-6 shrink-0 items-center justify-center rounded text-ink-muted hover:text-ink`,children:(0,L.jsx)(d,{name:`close`,className:`size-3`})})]}),(0,L.jsx)(`div`,{className:`grid min-h-0 min-w-0 flex-1 grid-cols-1 gap-2`,children:(0,L.jsxs)(`div`,{"aria-label":O(xe?`sftp.local.dropZone`:`sftp.dropZone`),"aria-busy":$,className:`relative flex min-h-0 min-w-0 flex-col rounded-md border bg-card transition-shadow ${Q.dragging?`border-accent ring-1 ring-accent`:`border-line/60`}`,onDragEnter:Q.dragEnter,onDragOver:Q.dragOver,onDragLeave:Q.dragLeave,onDrop:e=>{Q.acceptDrop(e)},children:[(0,L.jsxs)(`div`,{ref:se,hidden:R&&Y.length===0&&!J.mobileSearchOpen,className:R&&Y.length===0&&!J.mobileSearchOpen?`hidden`:`relative flex min-h-10 shrink-0 items-center gap-1 border-b border-line/50 bg-toolbar/45 px-2 py-1 md:min-h-8 md:py-0.5`,children:[Y.length>0&&!(R&&J.mobileSearchOpen)?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.clearSelection`),onClick:Te.clearSelection,className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover hover:text-ink md:size-7`,children:(0,L.jsx)(d,{name:`close`,className:`size-3.5`})}),(0,L.jsx)(`span`,{className:`min-w-0 grow truncate text-xs font-medium text-ink`,children:X===null?O(`sftp.selectedCountSize`,{count:Y.length,size:y(Y.reduce((e,t)=>e+(t.type===`file`?t.size:0),0))}):O(`sftp.selected`,{name:X.name})}),(0,L.jsxs)(`label`,{className:R?`hidden`:`relative min-w-20 max-w-32 grow`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:O(`sftp.filter`)}),(0,L.jsx)(d,{name:`search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-ink-muted`}),$e]}),re||!K?.details?null:(0,L.jsx)(`button`,{type:`button`,disabled:$,onClick:Ve,className:`rounded px-2 py-1 text-xs text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:O(`sftp.details`)}),re&&!xe?null:(0,L.jsx)(`button`,{type:`button`,disabled:$||!Ue||!Q.canTransferOut,title:Q.canTransferOut?void 0:O(`sftp.local.connectRemote`),onClick:()=>void Q.transferOut(Y),className:`rounded px-2 py-1 text-xs text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:We}),re||X===null||!K?.rename?null:(0,L.jsx)(`button`,{type:`button`,disabled:$,onClick:Z.renameSelection,className:`rounded px-2 py-1 text-xs text-ink-muted hover:bg-hover hover:text-ink disabled:text-ink-faint`,children:O(`sftp.rename`)}),re||!K?.delete?null:(0,L.jsx)(`button`,{type:`button`,disabled:$,onClick:Z.deleteSelection,className:`rounded px-2 py-1 text-xs text-danger hover:bg-hover disabled:text-ink-faint`,children:O(`sftp.delete`)}),(0,L.jsx)(`button`,{type:`button`,"aria-label":Ke(),"aria-haspopup":`menu`,"aria-expanded":!R&&M?.kind===`selected`,onClick:e=>He(`selected`,e.currentTarget),className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none md:size-7`,children:(0,L.jsx)(d,{name:`moreHorizontal`,className:`size-4`})})]}):R?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`input`,{ref:J.searchInput,type:`search`,"aria-label":O(`sftp.filter`),value:J.filter,onChange:e=>J.setFilter(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),K?.search&&J.runSearch(),e.currentTarget.blur())},placeholder:O(`sftp.filterPlaceholder`),className:`h-11 min-w-0 flex-1 rounded-md border border-control-line bg-control px-3 text-base`}),K?.search?(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.searchBelow`),disabled:$||!W||J.filter.trim()===``,onClick:()=>{J.searchInput.current?.blur(),J.runSearch()},className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted disabled:text-ink-faint`,children:(0,L.jsx)(d,{name:`search`,className:`size-4`})}):null,(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.close`),onClick:()=>{J.setMobileSearchOpen(!1),J.setFilter(``)},className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted`,children:(0,L.jsx)(d,{name:`close`,className:`size-4`})})]}):(0,L.jsxs)(L.Fragment,{children:[K?.createEntries||K?.browserUpload?(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.createActions`),"aria-haspopup":`menu`,"aria-expanded":!R&&M?.kind===`create`,disabled:$||!W,onClick:e=>He(`create`,e.currentTarget),className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:size-7`,children:(0,L.jsx)(d,{name:`plus`,className:`size-4`})}):null,(0,L.jsxs)(`label`,{className:`relative min-w-24 max-w-52 grow`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:O(`sftp.filter`)}),(0,L.jsx)(d,{name:`search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-ink-muted`}),$e]}),K?.search?(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.searchBelow`),title:O(`sftp.searchBelow`),disabled:$||!W||J.filter.trim()===``,onClick:()=>void J.runSearch(),className:`flex size-10 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:size-7`,children:(0,L.jsx)(d,{name:`search`,className:`size-4`})}):null]}),K?.browserUpload?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`input`,{ref:Q.uploadInput,type:`file`,multiple:!0,className:`hidden`,onChange:e=>Q.uploadFromInput(e,e=>e.name)}),(0,L.jsx)(`input`,{ref:e=>{Q.folderUploadInput.current=e,e?.setAttribute(`webkitdirectory`,``)},type:`file`,multiple:!0,className:`hidden`,onChange:e=>Q.uploadFromInput(e,e=>e.webkitRelativePath??e.name)})]}):null,!R&&M?.kind===`create`?(0,L.jsxs)(`div`,{ref:ce,role:`menu`,"aria-label":O(`sftp.createActions`),className:`absolute left-2 top-full z-20 mt-1 w-52 rounded-lg border border-control-line bg-card p-1 shadow-lg`,children:[K?.createEntries?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>Z.ask({kind:`mkdir`}),className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:O(`sftp.newFolder`)}),(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>Z.ask({kind:`createFile`}),className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:O(`sftp.newFile`)})]}):null,K?.browserUpload?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>{F(null),Q.chooseFiles()},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:O(`sftp.upload`)}),(0,L.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:$,onClick:()=>{F(null),Q.chooseFolder()},className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:O(`sftp.uploadFolder`)})]}):null]}):null,!R&&M?.kind===`selected`&&Y.length>0?(0,L.jsx)(`div`,{ref:ce,role:`menu`,"aria-label":Ke(),className:`absolute right-2 top-full z-20 mt-1 w-52 rounded-lg border border-control-line bg-card p-1 shadow-lg`,children:(0,L.jsx)(Ze,{actions:Ge()})}):null,!R&&M?.kind===`context`&&Y.length>0?(0,L.jsx)(`div`,{ref:ce,role:`menu`,"aria-label":Ke(),style:{left:Math.max(8,Math.min(M.x,window.innerWidth-Ye-8)),top:Math.max(8,Math.min(M.y,window.innerHeight-Ge().length*Xe-16))},className:`fixed z-30 w-56 rounded-lg border border-control-line bg-card p-1 shadow-lg`,children:(0,L.jsx)(Ze,{actions:Ge()})}):null]}),W&&ve!==null?(0,L.jsx)(`div`,{role:`status`,className:`absolute inset-0 z-10 flex items-center justify-center rounded-md bg-card/80 p-4 backdrop-blur-[1px]`,children:(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3 rounded-lg bg-toolbar px-4 py-3 text-sm`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-4 shrink-0 animate-spin rounded-full border-2 border-accent border-t-transparent motion-reduce:animate-none`}),(0,L.jsxs)(`span`,{className:`min-w-0`,children:[(0,L.jsx)(`span`,{className:`block`,children:et}),(0,L.jsx)(`span`,{className:`block truncate font-mono text-xs text-ink-muted`,children:ve||O(`sftp.homeDirectory`)})]})]})}):null,(0,L.jsx)(`div`,{"data-testid":`sftp-file-list`,className:`min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain`,inert:W&&$,onKeyDown:Te.handleListKeys,children:U===``||K===void 0?(0,L.jsx)(E,{tone:`empty`,title:O(`sftp.chooseHost`),detail:O(`sftp.chooseHostHint`)}):!W&&$?(0,L.jsx)(E,{tone:`loading`,title:K.connect?O(`sftp.connecting`,{alias:U}):et}):!W&&he!==``?(0,L.jsx)(E,{tone:`failed`,title:he,action:(0,L.jsx)(s,{onClick:()=>void H.retry(),children:O(`sftp.retry`)})}):!W&&K.connect?(0,L.jsx)(E,{tone:`empty`,title:O(`sftp.readyToConnect`,{alias:U}),detail:O(`sftp.connectHint`),action:(0,L.jsx)(s,{kind:`primary`,onClick:()=>void H.connect(),children:O(`sftp.connect`)})}):!W||$&&G.length===0&&he===``?(0,L.jsx)(E,{tone:`loading`,title:et}):ye?(0,L.jsx)(E,{tone:`failed`,title:he,action:(0,L.jsx)(s,{onClick:()=>void H.retry(),children:O(`sftp.retry`)})}):J.search!==null&&Ce.length===0?(0,L.jsx)(E,{tone:`empty`,title:O(`sftp.searchNoMatches`,{query:J.search.query}),action:(0,L.jsx)(s,{onClick:J.endSearch,children:O(`sftp.searchEnd`)})}):Ce.length===0?(0,L.jsx)(E,{tone:`empty`,title:O(J.normalizedFilter===``?`sftp.emptyDirectory`:`sftp.noFilterMatches`),...J.normalizedFilter===``?{}:{detail:O(`sftp.clearFilterHint`)},action:we?(0,L.jsx)(s,{disabled:$||q,onClick:Me,children:O(`sftp.parentDirectory`)}):void 0}):(0,L.jsx)(de,{model:Te,entries:Ce,sort:I,onSort:ze,compact:re,mobileInteraction:R,busy:$,locked:q,parentRowVisible:we,draggable:e=>K.dragOut&&ee(e),onDragStart:(e,t)=>Q.beginDrag(e,t,Ee),entryContext:J.search===null?void 0:e=>ke(e.path)})}),a?(0,L.jsx)(Oe,{openRequest:Q.openQueueRequest}):null]})}),R&&M!==null?(0,L.jsxs)(p,{labelledBy:`${ie}-mobile-actions`,onDismiss:()=>F(null),closeOnOutside:!0,returnFocusRef:B,placement:`sheet`,panelClassName:`flex max-h-[80dvh] w-full max-w-lg flex-col overflow-hidden rounded-xl`,children:[(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-line px-4 py-1`,children:[(0,L.jsx)(`h3`,{id:`${ie}-mobile-actions`,className:`min-w-0 truncate font-medium`,children:M.kind===`selected`||M.kind===`context`?Ke():O(`sftp.mobile.actions`)}),(0,L.jsx)(`button`,{type:`button`,"aria-label":O(`sftp.close`),onClick:()=>F(null),className:`flex size-11 shrink-0 items-center justify-center rounded text-ink-muted`,children:(0,L.jsx)(d,{name:`close`,className:`size-4`})})]}),(0,L.jsx)(`div`,{role:`menu`,className:`min-h-0 overflow-y-auto overscroll-contain p-2`,children:M.kind===`selected`||M.kind===`context`?(0,L.jsx)(Ze,{actions:Ge()}):(0,L.jsx)(Ze,{actions:Qe()})})]}):null,Q.remoteDrop===null?null:(0,L.jsxs)(p,{labelledBy:`${ie}-remote-drop`,onDismiss:Q.dismissRemoteDrop,panelClassName:`w-full max-w-md rounded-lg p-5`,children:[(0,L.jsx)(`h3`,{id:`${ie}-remote-drop`,className:`text-base font-semibold text-ink`,children:O(`sftp.remoteDropTitle`)}),(0,L.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-ink-muted`,children:O(`sftp.remoteDropDescription`,{count:Q.remoteDrop.entries.length,alias:U})}),(0,L.jsxs)(`div`,{className:`mt-5 flex flex-wrap justify-end gap-2`,children:[(0,L.jsx)(s,{onClick:Q.dismissRemoteDrop,children:O(`sftp.cancel`)}),(0,L.jsx)(s,{onClick:()=>void Q.acceptRemoteDrop(`move`),children:O(`sftp.moveHere`)}),(0,L.jsx)(s,{kind:`primary`,onClick:()=>void Q.acceptRemoteDrop(`copy`),children:O(`sftp.copyHere`)})]})]}),(0,L.jsx)(pe,{editor:Se,busy:H.busy||Z.acting||Q.queuing}),k===null?null:(0,L.jsx)(ae,{alias:U,entries:k,busy:$,returnFocusRef:Ae,onClose:()=>A(null),onEdit:e=>{A(null),Se.open(U,e)},onDownload:e=>{A(null),Q.transferOut(e)},canDownload:Q.sendable,onRename:e=>{A(null),Z.ask({kind:`rename`,entry:e})}}),(0,L.jsx)(Le,{actions:Z,currentPath:me,returnFocusRef:Ae})]})}function $e(e,t){return`${e===`/`?``:e}/${t}`}function et({left:e,right:t,onDismiss:n}){let r=l(),[i,a]=(0,N.useState)(null),[o,u]=(0,N.useState)(new Set),[d,f]=(0,N.useState)(``),[h,g]=(0,N.useState)(!0);(0,N.useEffect)(()=>{let n=!0;return g(!0),m.compareDirectories(e.alias,e.path,t.alias,t.path).then(e=>{n&&(a(e),u(new Set(e.entries.filter(e=>e.status!==`same`).map(e=>e.relativePath))))}).catch(e=>{n&&f(c(e)||`sftp_failed`)}).finally(()=>{n&&g(!1)}),()=>{n=!1}},[e.alias,e.path,t.alias,t.path]);let _=(0,N.useMemo)(()=>i?.entries.filter(e=>e.status!==`same`)??[],[i]);function v(e){u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async function b(r){if(i===null)return;let a=r===`left`?i.leftPath:i.rightPath,s=r===`left`?i.rightPath:i.leftPath,l=r===`left`?e.alias:t.alias,u=r===`left`?t.alias:e.alias,d=_.filter(e=>o.has(e.relativePath)).filter(e=>(r===`left`?e.left:e.right)!==void 0),p=d.flatMap(e=>(r===`left`?e.left:e.right)?.type===`directory`?[e.relativePath]:[]),m=d.flatMap(e=>{let t=r===`left`?e.left:e.right;return t===void 0||p.some(t=>e.relativePath!==t&&e.relativePath.startsWith(`${t}/`))?[]:[{sourceAlias:l,sourcePath:`${a===`/`?``:a}/${e.relativePath}`,targetAlias:u,targetPath:$e(s,e.relativePath),kind:t.type===`directory`?`folder`:`file`,name:t.name,totalBytes:t.type===`file`?t.size:-1,overwrite:e.status!==(r===`left`?`left_only`:`right_only`)}]});if(m.length!==0){g(!0),f(``);try{await x.addRemoteTransfers(m,`copy`),n()}catch(e){f(c(e)||(e instanceof Error?e.message:`sftp_failed`)),g(!1)}}}return(0,L.jsxs)(p,{labelledBy:`sftp-compare-heading`,onDismiss:n,panelClassName:`flex h-[min(44rem,calc(100dvh-2rem))] w-full max-w-4xl flex-col overflow-hidden rounded-lg`,children:[(0,L.jsxs)(`header`,{className:`border-b border-line/60 px-5 py-4`,children:[(0,L.jsx)(`h2`,{id:`sftp-compare-heading`,className:`text-base font-semibold text-ink`,children:r(`sftp.compare.heading`)}),(0,L.jsxs)(`p`,{className:`mt-1 truncate font-mono text-xs text-ink-muted`,children:[e.alias,`:`,e.path,` ⇄ `,t.alias,`:`,t.path]}),(0,L.jsx)(`p`,{className:`mt-2 text-xs text-ink-muted`,children:r(`sftp.compare.description`)})]}),d===``?null:(0,L.jsx)(`p`,{role:`alert`,className:`border-b border-notice-line bg-notice px-5 py-2 text-sm text-notice-ink`,children:d}),(0,L.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:[h&&i===null?(0,L.jsx)(E,{tone:`loading`,title:r(`sftp.compare.loading`)}):null,!h&&_.length===0?(0,L.jsx)(E,{tone:`empty`,title:r(`sftp.compare.noChanges`)}):null,_.length===0?null:(0,L.jsxs)(`table`,{className:`w-full min-w-[38rem] text-left text-sm`,children:[(0,L.jsx)(`thead`,{className:`sticky top-0 bg-toolbar text-xs text-ink-muted`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`w-10 px-3 py-2`,children:(0,L.jsx)(`span`,{className:`sr-only`,children:r(`sftp.selectAll`)})}),(0,L.jsx)(`th`,{className:`px-2 py-2`,children:r(`sftp.name`)}),(0,L.jsx)(`th`,{className:`w-36 px-2 py-2`,children:r(`sftp.compare.status`)}),(0,L.jsx)(`th`,{className:`w-28 px-2 py-2 text-right`,children:e.alias}),(0,L.jsx)(`th`,{className:`w-28 px-2 py-2 text-right`,children:t.alias})]})}),(0,L.jsx)(`tbody`,{children:_.map(e=>(0,L.jsxs)(`tr`,{className:`border-t border-line/40 hover:bg-select-fill/40`,children:[(0,L.jsx)(`td`,{className:`px-3 py-2`,children:(0,L.jsx)(`input`,{type:`checkbox`,checked:o.has(e.relativePath),onChange:()=>v(e.relativePath),className:`size-4 accent-accent`})}),(0,L.jsx)(`td`,{className:`px-2 py-2 font-mono text-ink`,children:e.relativePath}),(0,L.jsx)(`td`,{className:`px-2 py-2 text-xs text-ink-muted`,children:r(`sftp.compare.${e.status}`)}),(0,L.jsx)(`td`,{className:`px-2 py-2 text-right text-xs text-ink-muted`,children:e.left?.type===`file`?y(e.left.size):e.left===void 0?`—`:r(`sftp.type.${e.left.type}`)}),(0,L.jsx)(`td`,{className:`px-2 py-2 text-right text-xs text-ink-muted`,children:e.right?.type===`file`?y(e.right.size):e.right===void 0?`—`:r(`sftp.type.${e.right.type}`)})]},e.relativePath))})]})]}),(0,L.jsxs)(`footer`,{className:`flex flex-wrap justify-end gap-2 border-t border-line/60 px-5 py-4`,children:[(0,L.jsx)(s,{onClick:n,children:r(`sftp.cancel`)}),(0,L.jsx)(s,{disabled:h||o.size===0,onClick:()=>void b(`right`),children:r(`sftp.compare.rightToLeft`)}),(0,L.jsx)(s,{kind:`primary`,disabled:h||o.size===0,onClick:()=>void b(`left`),children:r(`sftp.compare.leftToRight`)})]})]})}var tt=`application/x-sshc-sftp-tab`;function nt(e){return Array.from(e.dataTransfer.types??[]).includes(tt)}function rt(e){let t=e.currentTarget.getBoundingClientRect();return e.clientXt.id===e.activeId)??e.tabs[0]??ot()}function ut(e,t){for(let n of e){let e=n.tabs.find(e=>e.id===t);if(e!==void 0)return{pane:n,tab:e}}return null}function dt(e){return e.flatMap(e=>e.tabs)}function ft(e,t){return e.map(e=>e.id===t.id?t:e)}function pt(e,t,n){let r=ut(e,t);if(r===null)return e;let i=n(r.tab);return i===r.tab?e:ft(e,{...r.pane,tabs:r.pane.tabs.map(e=>e.id===t?i:e)})}function mt(e,t){let n=e.tabs.findIndex(e=>e.id===t);if(n<0)return e;let r=e.tabs.filter(e=>e.id!==t),i=e.activeId===t?r[Math.min(n,r.length-1)]?.id??``:e.activeId;return{...e,tabs:r,activeId:i}}function ht(e){let t=ot();return{...e,tabs:[t],activeId:t.id}}function gt(e){let t=e.filter(e=>e.tabs.length>0);return t.length>0?t:[ht(e[0]??ct())]}function _t(e,t,n){let r=e.find(e=>e.id===t);return r===void 0||r.tabs.length>=8?e:ft(e,{...r,tabs:[...r.tabs,n],activeId:n.id})}function vt(e,t){let n=ut(e,t);return n===null?e:gt(ft(e,mt(n.pane,t)))}function yt(e,t){let n=ut(e,t);return n===null||n.pane.activeId===t?e:ft(e,{...n.pane,activeId:t})}function bt(e,t,n,r){return pt(e,t,e=>e.alias===n&&e.path===r?e:{...e,alias:n,path:r})}function xt(e,t,n){return pt(e,t,e=>({...e,sort:n}))}function St(e){return e.length<2}function Ct(e,t,n){let r=ut(e,t);if(r===null)return e;if(`paneId`in n){let i=e.find(e=>e.id===n.paneId);return i===void 0||i.id===r.pane.id||i.tabs.length>=8?e:gt(e.map(e=>e.id===r.pane.id?mt(e,t):e.id===i.id?{...e,tabs:[...e.tabs,r.tab],activeId:r.tab.id}:e))}if(!St(e))return e;let i=st([r.tab]),a=mt(r.pane,t),o=ft(e,a.tabs.length===0?ht(a):a);return n.side===`left`?[i,...o]:[...o,i]}function wt(e){return`sftp-tab-${e}`}function Tt(e){return`sftp-tabpanel-${e}`}function Et(e,t,n){if(e.alias===``)return t;let r=e.alias===`sshc://local`?n:e.alias;return e.path===``||e.path===`/`?r:`${r}:${e.path.split(`/`).filter(Boolean).pop()??e.path}`}function Dt({pane:e,label:t,closable:n,movable:r,trailing:i=null,onSelect:a,onClose:o,onAdd:s,onDragStart:c,onDragEnd:u,onMove:p}){let m=l(),h=(0,N.useRef)(null);(0,N.useEffect)(()=>{(h.current?.querySelector(`[role="tab"][aria-selected="true"]`))?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[e.activeId,e.tabs.length]);function g(e,t){e.dataTransfer.setData(tt,t.id),e.dataTransfer.effectAllowed=`move`,c(t.id)}function _(t,n,i){if(t.shiftKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`)){t.preventDefault(),r(n)&&p(n.id,t.key===`ArrowLeft`?`left`:`right`);return}f(t,i,e.tabs,e=>a(e.id))}return(0,L.jsxs)(`div`,{"data-sftp-pane-tabs":e.id,className:`flex h-11 min-w-0 shrink-0 items-stretch gap-1 rounded-md border border-line/60 bg-toolbar p-1 md:h-9`,children:[(0,L.jsx)(`div`,{ref:h,role:`tablist`,"aria-label":t,className:`flex min-w-0 flex-1 items-stretch gap-1 overflow-x-auto overscroll-x-contain`,children:e.tabs.map((t,i)=>{let s=Et(t,m(`sftp.newTab`),m(`sftp.local.connection`)),c=t.id===e.activeId,l=r(t);return(0,L.jsxs)(`span`,{draggable:l,onDragStart:l?e=>g(e,t):void 0,onDragEnd:l?u:void 0,className:`group relative flex w-44 min-w-24 shrink items-stretch rounded ${c?`bg-card shadow-sm`:`hover:bg-card/50`} ${l?`cursor-grab active:cursor-grabbing`:``}`,children:[(0,L.jsx)(`button`,{type:`button`,role:`tab`,id:wt(t.id),"aria-selected":c,"aria-controls":Tt(t.id),"aria-keyshortcuts":`Shift+ArrowLeft Shift+ArrowRight`,tabIndex:c?0:-1,title:s,onClick:()=>a(t.id),onKeyDown:e=>_(e,t,i),className:`min-w-0 flex-1 truncate rounded px-3 text-left text-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent ${c?`font-medium text-ink`:`text-ink-muted`}`,children:s}),n?(0,L.jsx)(`button`,{type:`button`,"aria-label":m(`sftp.closeTab`,{name:s}),onClick:()=>o(t),className:`flex w-9 shrink-0 items-center justify-center rounded text-ink-faint hover:text-danger md:w-7`,children:(0,L.jsx)(d,{name:`close`,className:`size-3`})}):null]},t.id)})}),(0,L.jsx)(`button`,{type:`button`,"aria-label":m(`sftp.newTab`),disabled:e.tabs.length>=8,onClick:s,className:`flex w-9 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-card/50 hover:text-ink disabled:text-ink-faint md:w-7`,children:(0,L.jsx)(d,{name:`plus`,className:`size-4`})}),i]})}var Ot=`sshc.sftp.tabs`,kt=`sshc.sftp.activeTab`,At=`sshc.sftp.split`,jt=`sshc.sftp.secondaryTabs`,Mt=`sshc.sftp.secondaryActiveTab`,Nt=`sshc.sftp.splitRatio`;function Pt(e){return{key:typeof e.sortKey==`string`&&[`name`,`type`,`size`,`modified`].includes(e.sortKey)?e.sortKey:`name`,direction:e.sortDirection===`descending`?`descending`:`ascending`}}function Ft(e){let t=n(e,[]);return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.alias==`string`?t.alias:``,r=typeof t.path==`string`&&(n===`sshc://local`?me(t.path):t.path.startsWith(`/`))?t.path:``;return[{id:at(),alias:n,path:r,sort:Pt(t)}]}).slice(0,8):[]}function It(e,t){let n=Number.parseInt(i(e)??`0`,10);return t[Number.isInteger(n)&&n>=0&&n({alias:e,path:t,sortKey:n.key,sortDirection:n.direction})))}function Bt(e){let t=e?.tabs.findIndex(t=>t.id===e.activeId)??-1;return String(t<0?0:t)}function Vt(t){e(Ot,zt(t[0])),e(kt,Bt(t[0])),e(jt,zt(t[1])),e(Mt,Bt(t[1])),e(At,String(t.length>1))}function Ht(){let e=i(Nt);return e===null||e.trim()===``?50:b(Number(e))}function Ut(t){e(Nt,String(t))}function Wt(e){let t=(0,N.useRef)(new Map),n=(0,N.useRef)(e);return n.current=e,{forTab:(0,N.useCallback)(e=>{let r=t.current.get(e);if(r!==void 0)return r;let i=t=>n.current(e,t);return t.current.set(e,i),i},[]),forget:(0,N.useCallback)(e=>{t.current.delete(e)},[])}}function Gt({aliases:e,hosts:t,target:n=null,onTargetHandled:r=()=>void 0,onNavigationBlockerChange:i,onNavigateLocation:a,onOpenTerminal:o}){let s=l(),[c,u]=(0,N.useState)(Rt),[d,f]=(0,N.useState)(Ht),[p,m]=(0,N.useState)(()=>c[0]?.id??``),[h,g]=(0,N.useState)(null),[_,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(0),[x,w]=(0,N.useState)(()=>new Map),[T,E]=(0,N.useState)(null),O=(0,N.useRef)(null),k=D(O),A=(0,N.useRef)(new Map(dt(c).map(e=>[e.id,{alias:e.alias,path:e.path}]))),j=(0,N.useRef)(new Map),M=c.length>1&&!k,P=c[0]??null,ee=c[1]??null,F=c.find(e=>e.id===p)??P;(0,N.useEffect)(()=>{Vt(c)},[c]),(0,N.useEffect)(()=>{!k||P===null||(m(P.id),v(!1))},[k,P]),(0,N.useEffect)(()=>{h!==null&&ut(c,h)===null&&g(null)},[h,c]);let I=(0,N.useCallback)(()=>{let e=[...j.current.values()];i?.(e.length===0?null:t=>e.every(e=>e(t)))},[i]),te=Wt((e,t)=>{t===null?j.current.delete(e):j.current.set(e,t),I()}),ne=Wt((e,t)=>{w(n=>{if(t===null){if(!n.has(e))return n;let t=new Map(n);return t.delete(e),t}return n.get(e)===t?n:new Map(n).set(e,t)})});function re(e){A.current.delete(e),j.current.delete(e),te.forget(e),ne.forget(e),w(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}function R(e){let t=ot();u(n=>_t(n,e.id,t)),m(e.id)}function ie(e){re(e),u(t=>vt(t,e))}function z(e){let t=x.get(e.id);if(t!==void 0){E({tabId:e.id,path:t});return}ie(e.id)}function ae(e,t){u(e=>yt(e,t)),m(e.id)}function oe(e,t){let n=ut(c,e);if(n===null)return;let r=Ct(c,e,t);if(r===c)return;let i=!A.current.has(e);A.current.set(e,{alias:n.tab.alias,path:n.tab.path,connect:i}),u(r),m(ut(r,e)?.pane.id??r[0]?.id??``)}function se(e,t){let n=ut(c,e);if(n===null)return;let r=t===`left`?c[c.indexOf(n.pane)-1]:c[c.indexOf(n.pane)+1];r===void 0?c.length===1&&oe(e,{side:t}):oe(e,{paneId:r.id})}function ce(e,t){let n=h;g(null),n!==null&&oe(n,t===null?{paneId:e.id}:{side:t})}let le=e=>{f(e),Ut(e)},B=P===null?null:lt(P),V=ee===null?null:lt(ee);(0,N.useEffect)(()=>{if(n===null||B===null||B.alias!==`sshc://local`||M&&V?.alias!==`sshc://local`)return;let t=e.includes(n.alias)?n.alias:``;A.current.set(B.id,{alias:t,path:``}),u(e=>bt(e,B.id,t,``)),P!==null&&m(P.id)},[n,P,B,V?.alias,M,e]);let ue=M&&B!==null&&V!==null&&B.alias!==``&&V.alias!==``&&B.alias!==`sshc://local`&&V.alias!==`sshc://local`;function de(i,l){let f=l>0&&!M,p=M?l===0?V:B:null,_=l===c.length-1,y=i.tabs.length>1||c.length>1,S=h===null||k?null:c.length>1?ut(c,h)?.pane.id===i.id?null:`whole`:St(c)?`halves`:null;return(0,L.jsxs)(N.Fragment,{children:[l>0&&M?(0,L.jsx)(C,{direction:`horizontal`,ratio:d,label:s(`sftp.resizePanes`),onRatioChange:le}):null,(0,L.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col`,style:{flexBasis:M?`${l===0?d:100-d}%`:`100%`},hidden:f,"aria-label":s(l===0?`sftp.firstPane`:`sftp.secondPane`),onPointerDown:()=>m(i.id),onFocusCapture:()=>m(i.id),children:[(0,L.jsx)(Dt,{pane:i,label:s(l===0?`sftp.primaryTabs`:`sftp.secondaryTabs`),closable:y,movable:e=>!k&&!x.has(e.id),trailing:_&&M?(0,L.jsxs)(`button`,{type:`button`,"aria-label":s(`sftp.compare.heading`),title:s(`sftp.compare.heading`),disabled:!ue,onClick:()=>v(!0),className:`flex shrink-0 items-center gap-1.5 rounded px-2.5 text-sm text-ink-muted hover:bg-card/50 hover:text-ink disabled:text-ink-faint`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`⇄`}),s(`sftp.compare.action`)]}):null,onSelect:e=>ae(i,e),onClose:z,onAdd:()=>R(i),onDragStart:g,onDragEnd:()=>g(null),onMove:se}),(0,L.jsxs)(`div`,{"data-sftp-pane-content":i.id,className:`relative flex min-h-0 min-w-0 flex-1 flex-col pt-2`,children:[i.tabs.map(s=>{let c=s.id===i.activeId,d=A.current.get(s.id),f=c&&s.alias!==`sshc://local`&&(k?l===0:p?.alias===`sshc://local`||F?.id===i.id);return(0,L.jsx)(`div`,{id:Tt(s.id),role:`tabpanel`,"aria-labelledby":wt(s.id),hidden:!c,className:c?`flex min-h-0 min-w-0 flex-1 flex-col`:``,children:(0,L.jsx)(Qe,{aliases:e,...t===void 0?{}:{hosts:t},target:f?n:null,initialLocation:d===void 0||d.alias===``?null:d,initialSort:s.sort,showTransfers:!1,counterpart:p?.alias&&p.path?{alias:p.alias,path:p.path}:null,onQueueOpen:()=>b(e=>e+1),...c?{onNavigationBlockerChange:te.forTab(s.id)}:{},onDirtyChange:ne.forTab(s.id),...a===void 0?{}:{onNavigateLocation:a},...o===void 0?{}:{onOpenTerminal:o},...f?{onTargetHandled:r}:{},onLocationChange:(e,t)=>{A.current.delete(s.id),u(n=>bt(n,s.id,e,t))},onSortChange:e=>u(t=>xt(t,s.id,e))})},s.id)}),S===null?null:(0,L.jsx)(it,{placement:S,onDrop:e=>ce(i,e)})]})]})]},i.id)}return(0,L.jsxs)(`section`,{ref:O,className:`flex h-full min-h-0 min-w-0 flex-col`,"aria-label":s(`sftp.tabs`),children:[(0,L.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1`,children:c.map(de)}),(0,L.jsx)(Oe,{openRequest:y}),T===null?null:(0,L.jsx)(S,{id:`sftp-close-dirty-tab`,heading:s(`sftp.leaveHeading`),body:(0,L.jsx)(`p`,{className:`text-sm text-ink-muted`,children:s(`sftp.leaveBody`,{path:T.path})}),confirmLabel:s(`sftp.leaveDiscard`),cancelLabel:s(`sftp.leaveStay`),onConfirm:()=>{let e=T;E(null),ie(e.tabId)},onCancel:()=>E(null)}),_&&ue&&B!==null&&V!==null?(0,L.jsx)(et,{left:{alias:B.alias,path:B.path||`/`},right:{alias:V.alias,path:V.path||`/`},onDismiss:()=>v(!1)}):null]})}export{Gt as SFTPWorkspace}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SavePreview-BHSS1r5l.js b/internal/ui/dist/assets/SavePreview-BkzRFZRF.js similarity index 97% rename from internal/ui/dist/assets/SavePreview-BHSS1r5l.js rename to internal/ui/dist/assets/SavePreview-BkzRFZRF.js index a6cb2aba5..459c84a2e 100644 --- a/internal/ui/dist/assets/SavePreview-BHSS1r5l.js +++ b/internal/ui/dist/assets/SavePreview-BkzRFZRF.js @@ -1 +1 @@ -import{t as e}from"./jsx-runtime-QtymfJMM.js";import{r as t}from"./surface-Ck_FblzE.js";import{_ as n}from"./form-C1olpQVF.js";var r=e(),i={complex_external_rule:`notice.complex_external_rule`,duplicate_alias:`notice.duplicate_alias`,proxy_ignored:`notice.proxy_ignored`,wildcard_shadow:`notice.wildcard_shadow`,negated_pattern:`notice.negated_pattern`,unnamed_host_block:`notice.unnamed_host_block`,match_block:`notice.match_block`,dangerous_directive:`notice.dangerous_directive`,unstructured_line:`notice.unstructured_line`,external_file:`notice.external_file`,orphan_metadata:`notice.orphan_metadata`,group_cycle:`notice.group_cycle`,group_member_missing:`notice.group_member_missing`,explained_values_only:`notice.explained_values_only`,match_exec_refused:`notice.match_exec_refused`,match_final_refused:`notice.match_final_refused`,canonicalise_refused:`notice.canonicalise_refused`,unknown_token_refused:`notice.unknown_token_refused`,destination_not_included:`notice.destination_not_included`,include_no_longer_matches:`notice.include_no_longer_matches`,include_not_rewritten:`notice.include_not_rewritten`,include_now_unreached:`notice.include_now_unreached`,group_file_unreached:`notice.group_file_unreached`,group_directory_leftover:`notice.group_directory_leftover`,group_not_declared:`notice.group_not_declared`,group_directory_missing:`notice.group_directory_missing`,group_empty:`notice.group_empty`,generated_region_damaged:`notice.generated_region_damaged`};function a({lines:e}){return(0,r.jsx)(`pre`,{className:`max-h-72 overflow-auto rounded-lg bg-tree p-3 font-mono text-xs leading-5`,children:e.map((e,t)=>(0,r.jsx)(`div`,{className:e.op===`insert`?`text-live`:e.op===`delete`?`text-danger`:`text-ink-muted`,children:`${e.op===`insert`?`+`:e.op===`delete`?`-`:` `} ${e.text}`},`${e.op}-${e.oldLine??0}-${e.newLine??0}-${t}`))})}function o({diff:e}){let t=n();return(0,r.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,r.jsxs)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:[e.path,e.created===!0?t(`preview.newFile`):``]}),e.truncated===!0?(0,r.jsx)(`p`,{className:`text-xs text-notice-ink`,children:t(`preview.tooLarge`)}):null,(0,r.jsx)(a,{lines:e.lines})]})}var s={alias_already_declared:`refusal.alias_already_declared`,directory_not_empty:`refusal.directory_not_empty`,not_a_directory:`refusal.not_a_directory`,group_is_declared:`refusal.group_is_declared`,destination_exists:`refusal.destination_exists`,region_damaged:`refusal.region_damaged`};function c({notices:e}){let t=n();return e.length===0?null:(0,r.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map((e,n)=>(0,r.jsxs)(`li`,{className:`text-xs text-notice-ink`,children:[e.code in i?t(i[e.code]):e.code,e.path===void 0?``:` (${e.path}${e.line===void 0?``:`:${e.line}`})`]},`${e.code}-${e.path??``}-${e.line??0}-${n}`))})}function l({preview:e,conflict:i,problem:l}){let u=n();return(0,r.jsxs)(`section`,{"aria-labelledby":`preview-heading`,className:`flex flex-col gap-3 border-t border-line pt-5`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsx)(`h3`,{id:`preview-heading`,className:`text-sm font-medium text-ink`,children:u(`preview.heading`)}),e===null?null:(0,r.jsx)(`span`,{className:`rounded-full bg-select-fill px-2 py-1 text-xs text-ink-muted`,children:e.diffs.length})]}),l===null?null:(0,r.jsx)(t,{tone:`danger`,children:l.code===`config_syntax_error`?u(`preview.syntaxError`,{path:l.path??u(`preview.theFile`),line:l.line??0,column:l.column??0}):l.code===`config_graph_error`?u(`preview.graphError`):l.code===`config_conflict`?u(`preview.conflictError`):l.code in s?u(s[l.code],{detail:l.detail??``}):u(`preview.rejected`,{code:l.code})}),l?.diagnostics===void 0?null:(0,r.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.diagnostics.map((e,t)=>(0,r.jsx)(`li`,{className:`text-xs text-danger`,children:`${e.severity}: ${e.code} ${e.path??``}${e.line===void 0?``:`:${e.line}`}`},`${e.code}-${t}`))}),i===null?null:(0,r.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:u(`preview.changedOnDisk`)}),(0,r.jsx)(a,{lines:i.externalChange}),(0,r.jsx)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:u(`preview.pendingChange`)}),(0,r.jsx)(a,{lines:i.localChange}),(0,r.jsx)(`p`,{className:`text-xs text-ink-muted`,children:u(`preview.mergeByHand`)})]}),e===null?i===null&&l===null?(0,r.jsx)(`p`,{className:`text-xs text-ink-muted`,children:u(`preview.nothingYet`)}):null:(0,r.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[e.diffs.map(e=>(0,r.jsx)(o,{diff:e},e.path)),(e.effective??[]).map(e=>(0,r.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:u(`preview.explainedFor`,{alias:e.alias})}),(0,r.jsx)(`ul`,{children:e.changes.map(e=>(0,r.jsx)(`li`,{className:`text-xs text-ink-muted`,children:`${e.keyword}: ${e.before.join(`, `)||u(`preview.unset`)} → ${e.after.join(`, `)||u(`preview.unset`)}`},e.keyword))})]},e.alias)),(0,r.jsx)(c,{notices:e.notices??[]})]})]})}export{l as n,c as t}; \ No newline at end of file +import{t as e}from"./jsx-runtime-BOsSdQ68.js";import{r as t}from"./surface-DPFJ-mE2.js";import{_ as n}from"./form-zbLY2cuV.js";var r=e(),i={complex_external_rule:`notice.complex_external_rule`,duplicate_alias:`notice.duplicate_alias`,proxy_ignored:`notice.proxy_ignored`,wildcard_shadow:`notice.wildcard_shadow`,negated_pattern:`notice.negated_pattern`,unnamed_host_block:`notice.unnamed_host_block`,match_block:`notice.match_block`,dangerous_directive:`notice.dangerous_directive`,unstructured_line:`notice.unstructured_line`,external_file:`notice.external_file`,orphan_metadata:`notice.orphan_metadata`,group_cycle:`notice.group_cycle`,group_member_missing:`notice.group_member_missing`,explained_values_only:`notice.explained_values_only`,match_exec_refused:`notice.match_exec_refused`,match_final_refused:`notice.match_final_refused`,canonicalise_refused:`notice.canonicalise_refused`,unknown_token_refused:`notice.unknown_token_refused`,destination_not_included:`notice.destination_not_included`,include_no_longer_matches:`notice.include_no_longer_matches`,include_not_rewritten:`notice.include_not_rewritten`,include_now_unreached:`notice.include_now_unreached`,group_file_unreached:`notice.group_file_unreached`,group_directory_leftover:`notice.group_directory_leftover`,group_not_declared:`notice.group_not_declared`,group_directory_missing:`notice.group_directory_missing`,group_empty:`notice.group_empty`,generated_region_damaged:`notice.generated_region_damaged`};function a({lines:e}){return(0,r.jsx)(`pre`,{className:`max-h-72 overflow-auto rounded-lg bg-tree p-3 font-mono text-xs leading-5`,children:e.map((e,t)=>(0,r.jsx)(`div`,{className:e.op===`insert`?`text-live`:e.op===`delete`?`text-danger`:`text-ink-muted`,children:`${e.op===`insert`?`+`:e.op===`delete`?`-`:` `} ${e.text}`},`${e.op}-${e.oldLine??0}-${e.newLine??0}-${t}`))})}function o({diff:e}){let t=n();return(0,r.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,r.jsxs)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:[e.path,e.created===!0?t(`preview.newFile`):``]}),e.truncated===!0?(0,r.jsx)(`p`,{className:`text-xs text-notice-ink`,children:t(`preview.tooLarge`)}):null,(0,r.jsx)(a,{lines:e.lines})]})}var s={alias_already_declared:`refusal.alias_already_declared`,directory_not_empty:`refusal.directory_not_empty`,not_a_directory:`refusal.not_a_directory`,group_is_declared:`refusal.group_is_declared`,destination_exists:`refusal.destination_exists`,region_damaged:`refusal.region_damaged`};function c({notices:e}){let t=n();return e.length===0?null:(0,r.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map((e,n)=>(0,r.jsxs)(`li`,{className:`text-xs text-notice-ink`,children:[e.code in i?t(i[e.code]):e.code,e.path===void 0?``:` (${e.path}${e.line===void 0?``:`:${e.line}`})`]},`${e.code}-${e.path??``}-${e.line??0}-${n}`))})}function l({preview:e,conflict:i,problem:l}){let u=n();return(0,r.jsxs)(`section`,{"aria-labelledby":`preview-heading`,className:`flex flex-col gap-3 border-t border-line pt-5`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsx)(`h3`,{id:`preview-heading`,className:`text-sm font-medium text-ink`,children:u(`preview.heading`)}),e===null?null:(0,r.jsx)(`span`,{className:`rounded-full bg-select-fill px-2 py-1 text-xs text-ink-muted`,children:e.diffs.length})]}),l===null?null:(0,r.jsx)(t,{tone:`danger`,children:l.code===`config_syntax_error`?u(`preview.syntaxError`,{path:l.path??u(`preview.theFile`),line:l.line??0,column:l.column??0}):l.code===`config_graph_error`?u(`preview.graphError`):l.code===`config_conflict`?u(`preview.conflictError`):l.code in s?u(s[l.code],{detail:l.detail??``}):u(`preview.rejected`,{code:l.code})}),l?.diagnostics===void 0?null:(0,r.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.diagnostics.map((e,t)=>(0,r.jsx)(`li`,{className:`text-xs text-danger`,children:`${e.severity}: ${e.code} ${e.path??``}${e.line===void 0?``:`:${e.line}`}`},`${e.code}-${t}`))}),i===null?null:(0,r.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:u(`preview.changedOnDisk`)}),(0,r.jsx)(a,{lines:i.externalChange}),(0,r.jsx)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:u(`preview.pendingChange`)}),(0,r.jsx)(a,{lines:i.localChange}),(0,r.jsx)(`p`,{className:`text-xs text-ink-muted`,children:u(`preview.mergeByHand`)})]}),e===null?i===null&&l===null?(0,r.jsx)(`p`,{className:`text-xs text-ink-muted`,children:u(`preview.nothingYet`)}):null:(0,r.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[e.diffs.map(e=>(0,r.jsx)(o,{diff:e},e.path)),(e.effective??[]).map(e=>(0,r.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-semibold text-ink-muted`,children:u(`preview.explainedFor`,{alias:e.alias})}),(0,r.jsx)(`ul`,{children:e.changes.map(e=>(0,r.jsx)(`li`,{className:`text-xs text-ink-muted`,children:`${e.keyword}: ${e.before.join(`, `)||u(`preview.unset`)} → ${e.after.join(`, `)||u(`preview.unset`)}`},e.keyword))})]},e.alias)),(0,r.jsx)(c,{notices:e.notices??[]})]})]})}export{l as n,c as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SecretsPanel-DgaGrbjT.js b/internal/ui/dist/assets/SecretsPanel-DgaGrbjT.js new file mode 100644 index 000000000..5216fa9a1 --- /dev/null +++ b/internal/ui/dist/assets/SecretsPanel-DgaGrbjT.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{n,r,t as i,y as a}from"./surface-DPFJ-mE2.js";import{_ as o,f as s,i as c,n as l,s as u}from"./form-zbLY2cuV.js";import{$ as d,J as f,R as p,Y as m,at as h,bt as g,et as _,nt as v,q as y,u as b,x}from"./index-DtC-pXtZ.js";import{t as S}from"./credentials-HxEBLVTm.js";import{n as C,r as w,t as T}from"./page-BaebBDRI.js";var E=g(),D=e(),O=t();function k({kind:e,name:t,api:n,onSaved:s,onClose:d}){let p=o(),[m,h]=(0,D.useState)(t),[g,_]=(0,D.useState)(``),[y,b]=(0,D.useState)(!0),[x,S]=(0,D.useState)(!1),[C,w]=(0,D.useState)(``),T=(0,D.useRef)(null),E=(0,D.useCallback)(()=>{_(``),d()},[d]);(0,D.useEffect)(()=>{let r=!0;return n.revealCredential(e,t).then(e=>{r&&(h(e.name),_(e.secret),b(!1))},e=>{r&&(w(a(e)||p(`secrets.revealFailed`)),b(!1))}),()=>{r=!1}},[n,e,t,p]);async function k(){S(!0);try{let r=await n.updateCredential(e,t,m,g);_(``),s(r),d()}catch(e){let t=a(e);w(t===`credential_already_exists`?p(`secrets.nameExists`):t||p(`secrets.updateFailed`)),S(!1)}}let A=p(e===`password`?`secrets.editPassword`:e===`totp`?`secrets.editTOTP`:`secrets.editPassphrase`),j=p(e===`password`?`secrets.passwordValue`:e===`totp`?`secrets.totpValue`:`secrets.passphraseValue`);return(0,O.jsxs)(f,{labelledBy:`credential-edit-heading`,onDismiss:E,initialFocusRef:T,panelClassName:`flex w-full max-w-lg flex-col gap-4 rounded-lg p-5`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{id:`credential-edit-heading`,className:`text-base font-semibold text-ink`,children:A}),(0,O.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`secrets.editNote`)})]}),C===``?null:(0,O.jsx)(r,{tone:`danger`,children:C}),y?(0,O.jsx)(`p`,{"aria-live":`polite`,className:u,children:p(`secrets.revealing`)}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(l,{label:p(`secrets.credentialName`),children:(0,O.jsx)(`input`,{ref:T,value:m,onChange:e=>h(e.target.value),className:c})}),(0,O.jsx)(v,{label:j,value:g,onChange:_,initialShown:e===`key_passphrase`,disabled:x})]}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,O.jsx)(i,{onClick:E,children:p(`secrets.cancel`)}),(0,O.jsx)(i,{kind:`primary`,disabled:y||x||m===``||g===``,onClick:()=>void k(),children:p(x?`secrets.saving`:`secrets.saveChanges`)})]})]})}var A={...S,...h},j=`[&_button]:min-h-10 md:[&_button]:min-h-0`,M=[{kind:`password`,heading:`secrets.passwordsHeading`,nameLabel:`secrets.newPasswordName`,valueLabel:`secrets.newPasswordValue`,store:`secrets.storePassword`},{kind:`key_passphrase`,heading:`secrets.passphrasesHeading`,nameLabel:`secrets.newPassphraseName`,valueLabel:`secrets.newPassphraseValue`,store:`secrets.storePassphrase`},{kind:`totp`,heading:`secrets.totpHeading`,nameLabel:`secrets.newTOTPName`,valueLabel:`secrets.newTOTPValue`,store:`secrets.storeTOTP`}],N={password:`secrets.passwordsDescription`,key_passphrase:`secrets.passphrasesDescription`,totp:`secrets.totpDescription`};function P(e){return e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function ee({name:e,api:t}){let n=o(),[r,a]=(0,D.useState)(null),[s,c]=(0,D.useState)(0),[l,f]=(0,D.useState)(!1),[p,m]=(0,D.useState)(!1),h=(0,D.useCallback)(async()=>{try{let n=await t.totpCodes(e);a(n),c(n.remainingSeconds),m(!1)}catch{m(!0)}},[t,e]);return(0,D.useEffect)(()=>{h()},[h]),(0,D.useEffect)(()=>{if(r===null)return;let e=window.setInterval(()=>{c(e=>e>1?e-1:(h(),0))},1e3);return()=>window.clearInterval(e)},[r,h]),p?(0,O.jsx)(i,{onClick:()=>void h(),children:n(`secrets.totpRetry`)}):r===null?(0,O.jsx)(`p`,{className:u,children:n(`secrets.totpLoading`)}):(0,O.jsxs)(`div`,{className:`min-w-0 rounded-md bg-surface-subtle px-3 py-2 sm:min-w-72`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`span`,{className:`min-w-0 flex-1 whitespace-nowrap font-mono text-lg font-semibold tracking-wider text-ink`,children:P(r.current)}),(0,O.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-ink-muted`,children:n(`secrets.totpRemaining`,{seconds:s})}),(0,O.jsx)(`button`,{type:`button`,"aria-expanded":l,"aria-label":n(l?`secrets.totpCollapse`:`secrets.totpExpand`,{name:e}),className:`flex size-8 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-select-fill hover:text-ink`,onClick:()=>f(e=>!e),children:(0,O.jsx)(d,{name:`chevronRight`,className:`size-4 transition-transform ${l?`rotate-90`:``}`})})]}),l?(0,O.jsxs)(`div`,{className:`mt-2 grid grid-cols-2 gap-2 border-t border-line pt-2 text-xs`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-ink-faint`,children:n(`secrets.totpPrevious`)}),(0,O.jsx)(`p`,{className:`mt-1 whitespace-nowrap font-mono tracking-wider text-ink-muted`,children:P(r.previous)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-ink-faint`,children:n(`secrets.totpNext`)}),(0,O.jsx)(`p`,{className:`mt-1 whitespace-nowrap font-mono tracking-wider text-ink-muted`,children:P(r.next)})]})]}):null]})}function F(){return{credentials:[],dedicatedKeyPassphrases:[],keyHostUsageComplete:!0}}function I({label:e,values:t,emptyLabel:n,onRemove:r,removeLabel:i,owner:a}){let s=o(),[c,l]=(0,D.useState)(!1);return(0,O.jsxs)(`div`,{className:`rounded-md bg-surface-subtle`,children:[(0,O.jsxs)(`button`,{type:`button`,"aria-expanded":c,"aria-label":s(c?`secrets.usageCollapse`:`secrets.usageExpand`,{label:e,name:a}),className:`flex min-h-10 w-full items-center gap-2 px-3 py-2 text-left text-sm text-ink-muted hover:bg-select-fill hover:text-ink`,onClick:()=>l(e=>!e),children:[(0,O.jsx)(d,{name:`chevronRight`,className:`size-3.5 shrink-0 transition-transform ${c?`rotate-90`:``}`}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1 font-medium`,children:e}),(0,O.jsx)(`span`,{className:`rounded bg-surface px-1.5 py-0.5 font-mono text-xs tabular-nums text-ink-faint`,children:t.length})]}),c?(0,O.jsx)(`div`,{className:`border-t border-line px-3 py-3`,children:t.length===0?(0,O.jsx)(`p`,{className:u,children:n}):(0,O.jsx)(`ul`,{"aria-label":e,className:`flex flex-wrap gap-2`,children:t.map(e=>(0,O.jsxs)(`li`,{className:`flex items-center gap-1 rounded-md bg-tree px-2 py-1 font-mono text-xs text-ink`,children:[(0,O.jsx)(`span`,{children:e}),r===void 0?null:(0,O.jsx)(`button`,{type:`button`,className:`ml-1 text-ink-muted hover:text-danger`,"aria-label":i?.(e)??e,onClick:()=>r(e),children:`×`})]},e))})}):null]})}function L({name:e,edit:t,remove:n}){let r=o(),[i,a]=(0,D.useState)(!1),s=(0,D.useRef)(null),c=(0,D.useRef)(null),l=(0,D.useRef)(null);m({open:i,containerRefs:[s,l],onDismiss:()=>a(!1),returnFocusRef:c}),p({open:i,menuRef:l,onClose:()=>a(!1)}),b({open:i,anchorRef:c,menuRef:l});function u(e){a(!1),e()}return(0,O.jsxs)(`div`,{ref:s,className:`relative shrink-0`,children:[(0,O.jsx)(`button`,{ref:c,type:`button`,"aria-label":r(`secrets.actions`,{name:e}),"aria-haspopup":`menu`,"aria-expanded":i,onClick:()=>a(e=>!e),className:`flex size-9 items-center justify-center rounded-md text-ink-muted hover:bg-select-fill hover:text-ink`,children:(0,O.jsx)(d,{name:`moreHorizontal`,className:`size-5`})}),i?(0,E.createPortal)((0,O.jsxs)(`div`,{ref:l,role:`menu`,className:`fixed z-50 w-56 overflow-y-auto rounded-md border border-line bg-card p-1 shadow-lg`,children:[t===void 0?null:(0,O.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block w-full rounded px-3 py-2 text-left text-sm text-ink hover:bg-select-fill focus:bg-select-fill focus:outline-none`,onClick:()=>u(t.onSelect),children:t.label}),(0,O.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block w-full rounded px-3 py-2 text-left text-sm text-danger hover:bg-select-fill focus:bg-select-fill focus:outline-none`,onClick:()=>u(n.onSelect),children:n.label})]}),document.body):null]})}function R(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function z({api:e=A,onLock:t,kind:f}){let p=o(),[m,h]=(0,D.useState)(null),[g,b]=(0,D.useState)(F),[S,E]=(0,D.useState)({}),[P,z]=(0,D.useState)(``),[B,V]=(0,D.useState)(null),[H,U]=(0,D.useState)(null),W=(0,D.useCallback)(async()=>{try{let t=await e.passwordVault();if(h(t),!t.unlocked){b(F());return}b(await e.credentials())}catch(e){z(a(e)||p(`secrets.failed`))}},[e,p]);(0,D.useEffect)(()=>{W()},[W]);async function G(e,t){try{return await e(),z(``),await W(),!0}catch(e){return z(a(e)===`credential_in_use`?p(`secrets.inUse`):t),!1}}function K(e){return S[e]??{name:``,secret:``}}if(m===null)return P===``?(0,O.jsx)(x,{tone:`loading`,title:p(`secrets.loading`)}):(0,O.jsx)(x,{tone:`failed`,title:P,action:(0,O.jsx)(i,{onClick:()=>void W(),children:p(`shell.bootstrapRetry`)})});if(!m.unlocked)return(0,O.jsx)(_,{exists:m.exists,passwordless:m.passwordless??!1,api:e,onOpen:()=>void W()});let{credentials:q,dedicatedKeyPassphrases:J,keyHostUsageComplete:Y}=g,X=q.filter(e=>e.kind===`password`).length,Z=q.filter(e=>e.kind===`key_passphrase`).length+J.length,Q=q.filter(e=>e.kind===`totp`).length,te=q.reduce((e,t)=>e+t.uses.length,0)+J.length,ne=f===void 0?M:M.filter(e=>e.kind===f),$=f===void 0?null:M.find(e=>e.kind===f)??null;return(0,O.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${j}`,children:[(0,O.jsx)(w,{title:p($===null?`secrets.heading`:$.heading),description:p(f===void 0?`secrets.pageDescription`:N[f]),actions:m.passwordless?null:(0,O.jsx)(i,{onClick:()=>void e.lockVault().then(e=>{h(e),e.unlocked||t?.()}).catch(()=>z(p(`secrets.failed`))),children:p(`secrets.lock`)})}),f===void 0?(0,O.jsx)(C,{className:`sm:grid-cols-2 lg:grid-cols-4`,children:[[p(`secrets.metricPasswords`),X],[p(`secrets.metricPassphrases`),Z],[p(`secrets.metricTOTP`),Q],[p(`secrets.metricAssignments`),te]].map(([e,t])=>(0,O.jsx)(T,{label:String(e),value:t,compact:!0},String(e)))}):null,P===``?null:(0,O.jsx)(r,{tone:`danger`,children:P}),Y?null:(0,O.jsx)(r,{children:p(`secrets.keyHostUsageIncomplete`)}),ne.map(t=>{let r=K(t.kind),a=q.filter(e=>e.kind===t.kind),o=t.kind===`key_passphrase`?J:[];return(0,O.jsxs)(n,{as:`section`,"aria-label":p(t.heading),radius:`md`,children:[(0,O.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(d,{name:t.kind===`key_passphrase`?`keys`:`connections`,className:`h-4 w-4 text-ink-muted`}),(0,O.jsx)(`h3`,{className:s,children:p(t.heading)})]}),(0,O.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:a.length+o.length})]}),a.length===0&&o.length===0?(0,O.jsx)(`p`,{className:`px-4 py-6 text-sm text-ink-muted`,children:p(`secrets.none`)}):(0,O.jsxs)(`ul`,{className:`divide-y divide-line`,children:[a.map(n=>(0,O.jsx)(`li`,{children:(0,O.jsx)(`article`,{"aria-label":n.name,className:`px-4 py-4`,children:(0,O.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,O.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-select-fill text-ink-muted`,children:(0,O.jsx)(d,{name:t.kind===`key_passphrase`?`keys`:`secrets`,className:`h-4 w-4`})}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center`,children:[(0,O.jsx)(`h4`,{className:`min-w-0 flex-1 truncate font-mono text-sm font-semibold text-ink`,children:n.name}),n.kind===`totp`?(0,O.jsx)(ee,{name:n.name,api:e}):null]}),(0,O.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2`,children:[n.kind===`key_passphrase`?(0,O.jsx)(I,{owner:n.name,label:p(`secrets.keys`),values:n.uses,emptyLabel:p(`secrets.noKeys`)}):null,(0,O.jsx)(I,{owner:n.name,label:p(`secrets.assignedHosts`),values:n.hosts,emptyLabel:n.kind===`key_passphrase`&&!Y?p(`secrets.keyHostsUnavailable`):p(`secrets.noAssignedHosts`),...n.kind===`totp`?{onRemove:t=>{G(()=>e.unassignCredential(`totp`,t),p(`secrets.unassignTOTPFailed`))},removeLabel:e=>p(`secrets.unassignTOTP`,{host:e})}:{}})]})]}),(0,O.jsx)(L,{name:n.name,edit:{label:p(`secrets.edit`,{name:n.name}),onSelect:()=>V({kind:t.kind,name:n.name})},remove:{label:p(`secrets.delete`,{name:n.name}),onSelect:()=>U({name:n.name,perform:()=>e.deleteCredential(t.kind,n.name)})}})]})})},n.name)),o.map(t=>(0,O.jsx)(`li`,{children:(0,O.jsx)(`article`,{"aria-label":t.key,className:`px-4 py-4`,children:(0,O.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,O.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-select-fill text-ink-muted`,children:(0,O.jsx)(d,{name:`keys`,className:`h-4 w-4`})}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`h4`,{className:`truncate font-semibold text-ink`,children:R(t.key)}),(0,O.jsx)(`p`,{className:u,children:p(`secrets.dedicated`)}),(0,O.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2`,children:[(0,O.jsx)(I,{owner:t.key,label:p(`secrets.keys`),values:[t.key],emptyLabel:p(`secrets.noKeys`)}),(0,O.jsx)(I,{owner:t.key,label:p(`secrets.assignedHosts`),values:t.hosts,emptyLabel:p(Y?`secrets.noAssignedHosts`:`secrets.keyHostsUnavailable`)})]})]}),(0,O.jsx)(L,{name:t.key,remove:{label:p(`secrets.removeDedicated`,{key:t.key}),onSelect:()=>U({name:R(t.key),perform:()=>e.unassignCredential(`key_passphrase`,t.key)})}})]})})},t.key))]}),t.kind===`totp`?(0,O.jsx)(`div`,{className:`border-t border-line bg-surface-subtle px-4 py-4`,children:(0,O.jsx)(`p`,{className:u,children:p(`secrets.totpAssignInConnection`)})}):null,(0,O.jsxs)(`div`,{className:`grid items-end gap-3 border-t border-line bg-toolbar px-4 py-4 sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,O.jsx)(l,{label:p(t.nameLabel),children:(0,O.jsx)(`input`,{value:r.name,onChange:e=>E({...S,[t.kind]:{...r,name:e.target.value}}),className:c})}),(0,O.jsx)(v,{label:p(t.valueLabel),value:r.secret,onChange:e=>E({...S,[t.kind]:{...r,secret:e}})}),(0,O.jsx)(i,{kind:`primary`,disabled:r.name===``||r.secret===``,onClick:()=>void G(()=>e.storeCredential(t.kind,r.name,r.secret),p(`secrets.storeFailed`)).then(e=>{e&&E(e=>({...e,[t.kind]:{name:``,secret:``}}))}),children:p(t.store)})]})]},t.kind)}),B===null?null:(0,O.jsx)(k,{kind:B.kind,name:B.name,api:e,onSaved:e=>{b(e),z(``),V(null)},onClose:()=>V(null)}),H===null?null:(0,O.jsx)(y,{id:`secrets-delete-heading`,heading:p(`secrets.deleteHeading`,{name:H.name}),body:(0,O.jsx)(`p`,{className:`text-sm text-ink-muted`,children:p(`secrets.deleteBody`)}),confirmLabel:p(`secrets.confirmDelete`),cancelLabel:p(`secrets.deleteCancel`),onCancel:()=>U(null),onConfirm:()=>{U(null),G(H.perform,p(`secrets.deleteFailed`))}})]})}export{z as SecretsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SecretsPanel-DwbwPwGg.js b/internal/ui/dist/assets/SecretsPanel-DwbwPwGg.js deleted file mode 100644 index 8df314559..000000000 --- a/internal/ui/dist/assets/SecretsPanel-DwbwPwGg.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,n as r,r as i,t as a}from"./surface-Ck_FblzE.js";import{_ as o,f as s,i as c,n as l,s as u}from"./form-C1olpQVF.js";import{F as d,J as f,U as p,W as m,Y as h,Z as g,c as _,et as v,mt as y,v as b}from"./index-DJ8h9zNi.js";import{t as x}from"./credentials-Ck0fkrY6.js";import{n as S,r as C,t as w}from"./page-CiAVS9qS.js";var T=y(),E=e(),D=t();function O({kind:e,name:t,api:r,onSaved:s,onClose:d}){let f=o(),[m,h]=(0,E.useState)(t),[_,v]=(0,E.useState)(``),[y,b]=(0,E.useState)(!0),[x,S]=(0,E.useState)(!1),[C,w]=(0,E.useState)(``),T=(0,E.useRef)(null),O=(0,E.useCallback)(()=>{v(``),d()},[d]);(0,E.useEffect)(()=>{let i=!0;return r.revealCredential(e,t).then(e=>{i&&(h(e.name),v(e.secret),b(!1))},e=>{i&&(w(n(e)||f(`secrets.revealFailed`)),b(!1))}),()=>{i=!1}},[r,e,t,f]);async function k(){S(!0);try{let n=await r.updateCredential(e,t,m,_);v(``),s(n),d()}catch(e){let t=n(e);w(t===`credential_already_exists`?f(`secrets.nameExists`):t||f(`secrets.updateFailed`)),S(!1)}}let A=f(e===`password`?`secrets.editPassword`:e===`totp`?`secrets.editTOTP`:`secrets.editPassphrase`),j=f(e===`password`?`secrets.passwordValue`:e===`totp`?`secrets.totpValue`:`secrets.passphraseValue`);return(0,D.jsxs)(p,{labelledBy:`credential-edit-heading`,onDismiss:O,initialFocusRef:T,panelClassName:`flex w-full max-w-lg flex-col gap-4 rounded-lg p-5`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h2`,{id:`credential-edit-heading`,className:`text-base font-semibold text-ink`,children:A}),(0,D.jsx)(`p`,{className:`mt-1 ${u}`,children:f(`secrets.editNote`)})]}),C===``?null:(0,D.jsx)(i,{tone:`danger`,children:C}),y?(0,D.jsx)(`p`,{"aria-live":`polite`,className:u,children:f(`secrets.revealing`)}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(l,{label:f(`secrets.credentialName`),children:(0,D.jsx)(`input`,{ref:T,value:m,onChange:e=>h(e.target.value),className:c})}),(0,D.jsx)(g,{label:j,value:_,onChange:v,initialShown:e===`key_passphrase`,disabled:x})]}),(0,D.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,D.jsx)(a,{onClick:O,children:f(`secrets.cancel`)}),(0,D.jsx)(a,{kind:`primary`,disabled:y||x||m===``||_===``,onClick:()=>void k(),children:f(x?`secrets.saving`:`secrets.saveChanges`)})]})]})}var k={...x,...v},A=`[&_button]:min-h-10 md:[&_button]:min-h-0`,j=[{kind:`password`,heading:`secrets.passwordsHeading`,nameLabel:`secrets.newPasswordName`,valueLabel:`secrets.newPasswordValue`,store:`secrets.storePassword`},{kind:`key_passphrase`,heading:`secrets.passphrasesHeading`,nameLabel:`secrets.newPassphraseName`,valueLabel:`secrets.newPassphraseValue`,store:`secrets.storePassphrase`},{kind:`totp`,heading:`secrets.totpHeading`,nameLabel:`secrets.newTOTPName`,valueLabel:`secrets.newTOTPValue`,store:`secrets.storeTOTP`}],M={password:`secrets.passwordsDescription`,key_passphrase:`secrets.passphrasesDescription`,totp:`secrets.totpDescription`};function N(e){return e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function P({name:e,api:t}){let n=o(),[r,i]=(0,E.useState)(null),[s,c]=(0,E.useState)(0),[l,d]=(0,E.useState)(!1),[p,m]=(0,E.useState)(!1),h=(0,E.useCallback)(async()=>{try{let n=await t.totpCodes(e);i(n),c(n.remainingSeconds),m(!1)}catch{m(!0)}},[t,e]);return(0,E.useEffect)(()=>{h()},[h]),(0,E.useEffect)(()=>{if(r===null)return;let e=window.setInterval(()=>{c(e=>e>1?e-1:(h(),0))},1e3);return()=>window.clearInterval(e)},[r,h]),p?(0,D.jsx)(a,{onClick:()=>void h(),children:n(`secrets.totpRetry`)}):r===null?(0,D.jsx)(`p`,{className:u,children:n(`secrets.totpLoading`)}):(0,D.jsxs)(`div`,{className:`min-w-0 rounded-md bg-surface-subtle px-3 py-2 sm:min-w-72`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,D.jsx)(`span`,{className:`min-w-0 flex-1 whitespace-nowrap font-mono text-lg font-semibold tracking-wider text-ink`,children:N(r.current)}),(0,D.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-ink-muted`,children:n(`secrets.totpRemaining`,{seconds:s})}),(0,D.jsx)(`button`,{type:`button`,"aria-expanded":l,"aria-label":n(l?`secrets.totpCollapse`:`secrets.totpExpand`,{name:e}),className:`flex size-8 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-select-fill hover:text-ink`,onClick:()=>d(e=>!e),children:(0,D.jsx)(f,{name:`chevronRight`,className:`size-4 transition-transform ${l?`rotate-90`:``}`})})]}),l?(0,D.jsxs)(`div`,{className:`mt-2 grid grid-cols-2 gap-2 border-t border-line pt-2 text-xs`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`text-ink-faint`,children:n(`secrets.totpPrevious`)}),(0,D.jsx)(`p`,{className:`mt-1 whitespace-nowrap font-mono tracking-wider text-ink-muted`,children:N(r.previous)})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`text-ink-faint`,children:n(`secrets.totpNext`)}),(0,D.jsx)(`p`,{className:`mt-1 whitespace-nowrap font-mono tracking-wider text-ink-muted`,children:N(r.next)})]})]}):null]})}function F(){return{credentials:[],dedicatedKeyPassphrases:[],keyHostUsageComplete:!0}}function I({label:e,values:t,emptyLabel:n,onRemove:r,removeLabel:i,owner:a}){let s=o(),[c,l]=(0,E.useState)(!1);return(0,D.jsxs)(`div`,{className:`rounded-md bg-surface-subtle`,children:[(0,D.jsxs)(`button`,{type:`button`,"aria-expanded":c,"aria-label":s(c?`secrets.usageCollapse`:`secrets.usageExpand`,{label:e,name:a}),className:`flex min-h-10 w-full items-center gap-2 px-3 py-2 text-left text-sm text-ink-muted hover:bg-select-fill hover:text-ink`,onClick:()=>l(e=>!e),children:[(0,D.jsx)(f,{name:`chevronRight`,className:`size-3.5 shrink-0 transition-transform ${c?`rotate-90`:``}`}),(0,D.jsx)(`span`,{className:`min-w-0 flex-1 font-medium`,children:e}),(0,D.jsx)(`span`,{className:`rounded bg-surface px-1.5 py-0.5 font-mono text-xs tabular-nums text-ink-faint`,children:t.length})]}),c?(0,D.jsx)(`div`,{className:`border-t border-line px-3 py-3`,children:t.length===0?(0,D.jsx)(`p`,{className:u,children:n}):(0,D.jsx)(`ul`,{"aria-label":e,className:`flex flex-wrap gap-2`,children:t.map(e=>(0,D.jsxs)(`li`,{className:`flex items-center gap-1 rounded-md bg-tree px-2 py-1 font-mono text-xs text-ink`,children:[(0,D.jsx)(`span`,{children:e}),r===void 0?null:(0,D.jsx)(`button`,{type:`button`,className:`ml-1 text-ink-muted hover:text-danger`,"aria-label":i?.(e)??e,onClick:()=>r(e),children:`×`})]},e))})}):null]})}function L({name:e,edit:t,remove:n}){let r=o(),[i,a]=(0,E.useState)(!1),s=(0,E.useRef)(null),c=(0,E.useRef)(null),l=(0,E.useRef)(null);m({open:i,containerRefs:[s,l],onDismiss:()=>a(!1),returnFocusRef:c}),d({open:i,menuRef:l,onClose:()=>a(!1)}),_({open:i,anchorRef:c,menuRef:l});function u(e){a(!1),e()}return(0,D.jsxs)(`div`,{ref:s,className:`relative shrink-0`,children:[(0,D.jsx)(`button`,{ref:c,type:`button`,"aria-label":r(`secrets.actions`,{name:e}),"aria-haspopup":`menu`,"aria-expanded":i,onClick:()=>a(e=>!e),className:`flex size-9 items-center justify-center rounded-md text-ink-muted hover:bg-select-fill hover:text-ink`,children:(0,D.jsx)(f,{name:`moreHorizontal`,className:`size-5`})}),i?(0,T.createPortal)((0,D.jsxs)(`div`,{ref:l,role:`menu`,className:`fixed z-50 w-56 overflow-y-auto rounded-md border border-line bg-card p-1 shadow-lg`,children:[t===void 0?null:(0,D.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block w-full rounded px-3 py-2 text-left text-sm text-ink hover:bg-select-fill focus:bg-select-fill focus:outline-none`,onClick:()=>u(t.onSelect),children:t.label}),(0,D.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block w-full rounded px-3 py-2 text-left text-sm text-danger hover:bg-select-fill focus:bg-select-fill focus:outline-none`,onClick:()=>u(n.onSelect),children:n.label})]}),document.body):null]})}function R(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function z({api:e=k,onLock:t,kind:d}){let p=o(),[m,_]=(0,E.useState)(null),[v,y]=(0,E.useState)(F),[x,T]=(0,E.useState)({}),[N,z]=(0,E.useState)(``),[B,V]=(0,E.useState)(null),H=(0,E.useCallback)(async()=>{try{let t=await e.passwordVault();if(_(t),!t.unlocked){y(F());return}y(await e.credentials())}catch(e){z(n(e)||p(`secrets.failed`))}},[e,p]);(0,E.useEffect)(()=>{H()},[H]);async function U(e,t){try{return await e(),z(``),await H(),!0}catch(e){return z(n(e)===`credential_in_use`?p(`secrets.inUse`):t),!1}}function W(e){return x[e]??{name:``,secret:``}}if(m===null)return N===``?(0,D.jsx)(b,{tone:`loading`,title:p(`secrets.loading`)}):(0,D.jsx)(b,{tone:`failed`,title:N,action:(0,D.jsx)(a,{onClick:()=>void H(),children:p(`shell.bootstrapRetry`)})});if(!m.unlocked)return(0,D.jsx)(h,{exists:m.exists,passwordless:m.passwordless??!1,api:e,onOpen:()=>void H()});let{credentials:G,dedicatedKeyPassphrases:K,keyHostUsageComplete:q}=v,J=G.filter(e=>e.kind===`password`).length,Y=G.filter(e=>e.kind===`key_passphrase`).length+K.length,X=G.filter(e=>e.kind===`totp`).length,Z=G.reduce((e,t)=>e+t.uses.length,0)+K.length,Q=d===void 0?j:j.filter(e=>e.kind===d),$=d===void 0?null:j.find(e=>e.kind===d)??null;return(0,D.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${A}`,children:[(0,D.jsx)(C,{title:p($===null?`secrets.heading`:$.heading),description:p(d===void 0?`secrets.pageDescription`:M[d]),actions:m.passwordless?null:(0,D.jsx)(a,{onClick:()=>void e.lockVault().then(e=>{_(e),e.unlocked||t?.()}).catch(()=>z(p(`secrets.failed`))),children:p(`secrets.lock`)})}),d===void 0?(0,D.jsx)(S,{className:`sm:grid-cols-2 lg:grid-cols-4`,children:[[p(`secrets.metricPasswords`),J],[p(`secrets.metricPassphrases`),Y],[p(`secrets.metricTOTP`),X],[p(`secrets.metricAssignments`),Z]].map(([e,t])=>(0,D.jsx)(w,{label:String(e),value:t,compact:!0},String(e)))}):null,N===``?null:(0,D.jsx)(i,{tone:`danger`,children:N}),q?null:(0,D.jsx)(i,{children:p(`secrets.keyHostUsageIncomplete`)}),Q.map(t=>{let n=W(t.kind),i=G.filter(e=>e.kind===t.kind),o=t.kind===`key_passphrase`?K:[];return(0,D.jsxs)(r,{as:`section`,"aria-label":p(t.heading),radius:`md`,children:[(0,D.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(f,{name:t.kind===`key_passphrase`?`keys`:`connections`,className:`h-4 w-4 text-ink-muted`}),(0,D.jsx)(`h3`,{className:s,children:p(t.heading)})]}),(0,D.jsx)(`span`,{className:`rounded-md bg-surface px-2 py-0.5 font-mono text-xs text-ink-muted`,children:i.length+o.length})]}),i.length===0&&o.length===0?(0,D.jsx)(`p`,{className:`px-4 py-6 text-sm text-ink-muted`,children:p(`secrets.none`)}):(0,D.jsxs)(`ul`,{className:`divide-y divide-line`,children:[i.map(n=>(0,D.jsx)(`li`,{children:(0,D.jsx)(`article`,{"aria-label":n.name,className:`px-4 py-4`,children:(0,D.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,D.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-select-fill text-ink-muted`,children:(0,D.jsx)(f,{name:t.kind===`key_passphrase`?`keys`:`secrets`,className:`h-4 w-4`})}),(0,D.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,D.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center`,children:[(0,D.jsx)(`h4`,{className:`min-w-0 flex-1 truncate font-mono text-sm font-semibold text-ink`,children:n.name}),n.kind===`totp`?(0,D.jsx)(P,{name:n.name,api:e}):null]}),(0,D.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2`,children:[n.kind===`key_passphrase`?(0,D.jsx)(I,{owner:n.name,label:p(`secrets.keys`),values:n.uses,emptyLabel:p(`secrets.noKeys`)}):null,(0,D.jsx)(I,{owner:n.name,label:p(`secrets.assignedHosts`),values:n.hosts,emptyLabel:n.kind===`key_passphrase`&&!q?p(`secrets.keyHostsUnavailable`):p(`secrets.noAssignedHosts`),...n.kind===`totp`?{onRemove:t=>{U(()=>e.unassignCredential(`totp`,t),p(`secrets.unassignTOTPFailed`))},removeLabel:e=>p(`secrets.unassignTOTP`,{host:e})}:{}})]})]}),(0,D.jsx)(L,{name:n.name,edit:{label:p(`secrets.edit`,{name:n.name}),onSelect:()=>V({kind:t.kind,name:n.name})},remove:{label:p(`secrets.delete`,{name:n.name}),onSelect:()=>void U(()=>e.deleteCredential(t.kind,n.name),p(`secrets.deleteFailed`))}})]})})},n.name)),o.map(t=>(0,D.jsx)(`li`,{children:(0,D.jsx)(`article`,{"aria-label":t.key,className:`px-4 py-4`,children:(0,D.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,D.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-select-fill text-ink-muted`,children:(0,D.jsx)(f,{name:`keys`,className:`h-4 w-4`})}),(0,D.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,D.jsx)(`h4`,{className:`truncate font-semibold text-ink`,children:R(t.key)}),(0,D.jsx)(`p`,{className:u,children:p(`secrets.dedicated`)}),(0,D.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2`,children:[(0,D.jsx)(I,{owner:t.key,label:p(`secrets.keys`),values:[t.key],emptyLabel:p(`secrets.noKeys`)}),(0,D.jsx)(I,{owner:t.key,label:p(`secrets.assignedHosts`),values:t.hosts,emptyLabel:p(q?`secrets.noAssignedHosts`:`secrets.keyHostsUnavailable`)})]})]}),(0,D.jsx)(L,{name:t.key,remove:{label:p(`secrets.removeDedicated`,{key:t.key}),onSelect:()=>void U(()=>e.unassignCredential(`key_passphrase`,t.key),p(`secrets.deleteFailed`))}})]})})},t.key))]}),t.kind===`totp`?(0,D.jsx)(`div`,{className:`border-t border-line bg-surface-subtle px-4 py-4`,children:(0,D.jsx)(`p`,{className:u,children:p(`secrets.totpAssignInConnection`)})}):null,(0,D.jsxs)(`div`,{className:`grid items-end gap-3 border-t border-line bg-toolbar px-4 py-4 sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,D.jsx)(l,{label:p(t.nameLabel),children:(0,D.jsx)(`input`,{value:n.name,onChange:e=>T({...x,[t.kind]:{...n,name:e.target.value}}),className:c})}),(0,D.jsx)(g,{label:p(t.valueLabel),value:n.secret,onChange:e=>T({...x,[t.kind]:{...n,secret:e}})}),(0,D.jsx)(a,{kind:`primary`,disabled:n.name===``||n.secret===``,onClick:()=>void U(()=>e.storeCredential(t.kind,n.name,n.secret),p(`secrets.storeFailed`)).then(e=>{e&&T(e=>({...e,[t.kind]:{name:``,secret:``}}))}),children:p(t.store)})]})]},t.kind)}),B===null?null:(0,D.jsx)(O,{kind:B.kind,name:B.name,api:e,onSaved:e=>{y(e),z(``),V(null)},onClose:()=>V(null)})]})}export{z as SecretsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SettingsPanel-fF4HOX9H.js b/internal/ui/dist/assets/SettingsPanel-fF4HOX9H.js new file mode 100644 index 000000000..2b28b4bb4 --- /dev/null +++ b/internal/ui/dist/assets/SettingsPanel-fF4HOX9H.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{n,r,t as i,y as a}from"./surface-DPFJ-mE2.js";import{_ as o,i as s,n as c,s as l,t as u}from"./form-zbLY2cuV.js";import{$ as d,C as f,D as p,E as m,O as h,Q as g,T as _,at as v,ct as y,dt as b,ft as x,gt as S,ht as C,k as w,lt as T,nt as E,ot as D,pt as O,q as k,t as A,ut as j,vt as M,w as ee}from"./index-DtC-pXtZ.js";import{t as N}from"./useAsyncOperation-DcaEx5AT.js";import{n as P,r as F,t as I}from"./palettes-B33rdzLR.js";import{n as L,r as R,t as z}from"./fonts-Dday_bgd.js";import{r as B}from"./page-BaebBDRI.js";var V=e(),H=t();function U(){let e=o(),t=M(),n=x(),[r,a]=(0,V.useState)(``),[s,c]=(0,V.useState)(!1),l=n.loading||n.busy||n.error,u=n.presets.find(e=>e.id===n.selected),[d,f]=(0,V.useState)(null),[p,m]=(0,V.useState)(``),[h,g]=(0,V.useState)(``);async function _(t){m(``),g(``);try{await T(t),f(null),m(e(`shortcuts.saved`))}catch{g(e(`shortcuts.saveFailed`))}}async function v(i){g(``),m(``);try{let o=i===`copy`?crypto.randomUUID():n.selected;await b(i===`copy`?[...n.presets,{id:o,name:r.trim(),bindings:t}]:i===`rename`?n.presets.map(e=>e.id===o?{...e,name:r.trim()}:e):n.presets.filter(e=>e.id!==o),i===`delete`?`default`:o),a(``),m(e(`shortcuts.saved`))}catch{g(e(`shortcuts.saveFailed`))}}return(0,H.jsxs)(`div`,{"data-shortcut-editor":!0,children:[(0,H.jsx)(`p`,{className:`mb-4 text-sm text-ink-muted`,children:e(`shortcuts.hint`)}),(0,H.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-end gap-3`,children:[(0,H.jsxs)(`label`,{className:`text-sm`,children:[e(`shortcuts.preset`),(0,H.jsxs)(`select`,{className:`ml-2 rounded border border-line bg-control p-2`,value:n.selected,disabled:l,onChange:t=>{try{j(t.target.value)}catch{g(e(`shortcuts.saveFailed`))}},children:[(0,H.jsx)(`option`,{value:`default`,children:e(`shortcuts.defaultPreset`)}),n.presets.map(e=>(0,H.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,H.jsxs)(`label`,{className:`text-sm`,children:[e(`shortcuts.presetName`),(0,H.jsx)(`input`,{className:`ml-2 rounded border border-line bg-control p-2`,maxLength:80,value:r,onChange:e=>a(e.target.value)})]}),(0,H.jsx)(i,{disabled:l||!r.trim()||n.presets.length>=64,onClick:()=>{v(`copy`)},children:e(`shortcuts.duplicate`)}),(0,H.jsx)(i,{disabled:l||!r.trim()||n.selected==="default",onClick:()=>{v(`rename`)},children:e(`shortcuts.rename`)}),(0,H.jsx)(i,{disabled:l||n.selected==="default",onClick:()=>c(!0),children:e(`shortcuts.delete`)})]}),s&&u!==void 0?(0,H.jsx)(k,{id:`shortcut-preset-delete-heading`,heading:e(`shortcuts.confirmDelete`),body:(0,H.jsx)(`p`,{className:`text-sm text-ink-muted`,children:e(`shortcuts.deleteBody`,{name:u.name})}),confirmLabel:e(`shortcuts.deleteEverywhere`),cancelLabel:e(`shortcuts.cancelDelete`),onCancel:()=>c(!1),onConfirm:()=>{c(!1),v(`delete`)}}):null,n.error?(0,H.jsxs)(`div`,{role:`alert`,children:[(0,H.jsx)(`p`,{children:e(`shortcuts.reloadRequired`)}),(0,H.jsx)(i,{onClick:()=>{y()},children:e(`shortcuts.reload`)})]}):null,n.loading?(0,H.jsx)(`p`,{role:`status`,children:e(`shortcuts.loading`)}):null,(0,H.jsxs)(`fieldset`,{disabled:l,children:[(0,H.jsx)(`ul`,{className:`divide-y divide-line`,children:C.map(n=>(0,H.jsxs)(`li`,{className:`flex flex-wrap items-center gap-3 py-3`,children:[(0,H.jsx)(`span`,{className:`min-w-40 flex-1 text-sm font-medium text-ink`,children:e(`shortcuts.${n}`)}),(0,H.jsx)(`button`,{type:`button`,"aria-label":e(`shortcuts.assign`,{action:e(`shortcuts.${n}`)}),className:`min-h-10 min-w-48 rounded border border-line bg-control px-3 py-2 text-sm text-ink focus-visible:outline-2 focus-visible:outline-accent`,onClick:()=>{f(n),g(``),m(``)},onBlur:()=>f(null),onKeyDown:r=>{if(d!==n)return;if(r.key===`Tab`&&!r.ctrlKey&&!r.altKey&&!r.metaKey){f(null);return}if(r.preventDefault(),r.stopPropagation(),r.key===`Escape`){f(null);return}if(r.repeat||r.nativeEvent.isComposing)return;let i=S(r.nativeEvent);if(i===null)return;let a=C.find(e=>e!==n&&t[e].includes(i));if(a!==void 0){g(e(`shortcuts.conflict`,{action:e(`shortcuts.${a}`)}));return}_({...t,[n]:[i]})},children:d===n?e(`shortcuts.recording`):t[n].join(` / `)||e(`shortcuts.unassigned`)}),(0,H.jsx)(i,{onClick:()=>{_({...t,[n]:[]})},disabled:t[n].length===0,"aria-label":e(`shortcuts.clearAction`,{action:e(`shortcuts.${n}`)}),children:e(`shortcuts.clear`)})]},n))}),(0,H.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-line pt-4`,children:[(0,H.jsx)(`div`,{"aria-live":`polite`,children:h?(0,H.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:h}):p?(0,H.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:p}):null}),(0,H.jsx)(i,{onClick:()=>{_(O)},children:e(`shortcuts.reset`)})]})]})]})}function W({id:e,label:t,icon:n,showHeading:r=!0,children:i}){return(0,H.jsx)(`section`,{id:e,"aria-label":t,className:`scroll-mt-6 border-b border-line last:border-b-0`,children:(0,H.jsxs)(`div`,{className:r?`grid gap-5 px-4 py-6 sm:px-6 lg:grid-cols-[11rem_minmax(0,1fr)] lg:gap-8 lg:py-8`:`px-4 py-6 sm:px-6 lg:px-8 lg:py-8`,children:[r?(0,H.jsxs)(`header`,{className:`flex items-center gap-3 self-start lg:sticky lg:top-6`,children:[(0,H.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-select-fill text-accent`,children:(0,H.jsx)(d,{name:n})}),(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:t})]}):null,(0,H.jsx)(`div`,{className:`min-w-0`,children:i})]})})}function G({children:e,status:t}){return(0,H.jsxs)(`div`,{className:`mt-6 flex min-h-12 flex-wrap items-center justify-between gap-3 border-t border-line pt-4`,children:[(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:t}),(0,H.jsx)(`div`,{className:`shrink-0`,children:e})]})}function K({consoles:e,showHeading:t}){let n=o(),[r,a]=(0,V.useState)(!1),s=e.sessions.filter(e=>e.exited===void 0).length;return(0,H.jsxs)(W,{id:`settings-connections`,label:n(`desktop.closeAllHeading`),icon:`connections`,showHeading:t,children:[(0,H.jsx)(`p`,{className:`max-w-2xl text-sm leading-6 text-ink-muted`,children:n(`desktop.closeAllNote`)}),(0,H.jsx)(G,{status:(0,H.jsxs)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:[(0,H.jsx)(`span`,{className:`mr-2 inline-block h-2 w-2 rounded-full bg-live`}),n(`desktop.openCount`,{count:e.sessions.length})]}),children:(0,H.jsx)(i,{disabled:e.busy||e.sessions.length===0,onClick:()=>s===0?void e.closeAll():a(!0),children:n(`desktop.closeAll`)})}),r?(0,H.jsx)(k,{id:`close-all-consoles-heading`,heading:n(`desktop.closeAllHeading2`,{count:String(s)}),body:(0,H.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`desktop.closeAllBody`)}),confirmLabel:n(`desktop.closeAllConfirm`),cancelLabel:n(`desktop.closeAllCancel`),onCancel:()=>a(!1),onConfirm:()=>{a(!1),e.closeAll()}}):null]})}var q={port:``,vaultAutoLockMode:`idle`,vaultAutoLockValue:`12`,vaultAutoLockUnit:`hours`};function J({api:e,showHeading:t}){let n=o(),[a,l]=(0,V.useState)(q),[u,d]=(0,V.useState)(!1),f=N();(0,V.useEffect)(()=>{let t=!0;return e.engineSettings().then(e=>{t&&l({port:e.port===void 0?``:String(e.port),vaultAutoLockMode:e.vaultAutoLock?.mode===`restart`?`restart`:`idle`,vaultAutoLockValue:e.vaultAutoLock?.mode===`idle`?String(e.vaultAutoLock.value??12):q.vaultAutoLockValue,vaultAutoLockUnit:e.vaultAutoLock?.mode===`idle`?e.vaultAutoLock.unit??`hours`:q.vaultAutoLockUnit})}).catch(()=>void 0).finally(()=>{t&&d(!0)}),()=>{t=!1}},[e]);function p(e){l(t=>({...t,...e})),f.touch()}async function m(){let t=a.port.trim(),r=t===``?void 0:Number(t);if(r!==void 0&&(!Number.isSafeInteger(r)||r<1024||r>65535)){f.fail(n(`engine.portOutOfRange`));return}let i=Number(a.vaultAutoLockValue);if(a.vaultAutoLockMode===`idle`&&(!Number.isSafeInteger(i)||i<1||i>999)){f.fail(n(`engine.vaultAutoLockOutOfRange`));return}await f.run(()=>e.setEngineSettings({...r===void 0?{}:{port:r},vaultAutoLock:a.vaultAutoLockMode===`restart`?{mode:`restart`}:{mode:`idle`,value:i,unit:a.vaultAutoLockUnit}}),{describe:()=>n(`engine.saveFailed`)})}let h=!u||f.busy;return(0,H.jsx)(W,{id:`settings-engine`,label:n(`engine.heading`),icon:`settings`,showHeading:t,children:(0,H.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,H.jsx)(c,{label:n(`engine.portLabel`),hint:n(`engine.portHint`),children:(0,H.jsx)(`input`,{type:`number`,min:1024,max:65535,className:s,value:a.port,placeholder:`54447`,disabled:h,onChange:e=>p({port:e.target.value})})}),(0,H.jsxs)(`div`,{className:`mt-5 border-t border-line pt-5`,children:[(0,H.jsx)(c,{label:n(`engine.vaultAutoLockLabel`),hint:n(`engine.vaultAutoLockHint`),children:(0,H.jsxs)(`select`,{className:s,value:a.vaultAutoLockMode,disabled:h,onChange:e=>p({vaultAutoLockMode:e.target.value}),children:[(0,H.jsx)(`option`,{value:`idle`,children:n(`engine.vaultAutoLockIdle`)}),(0,H.jsx)(`option`,{value:`restart`,children:n(`engine.vaultAutoLockRestart`)})]})}),a.vaultAutoLockMode===`idle`?(0,H.jsxs)(`div`,{className:`mt-4 grid grid-cols-[minmax(0,1fr)_minmax(8rem,0.65fr)] gap-3`,children:[(0,H.jsx)(c,{label:n(`engine.vaultAutoLockValue`),children:(0,H.jsx)(`input`,{type:`number`,min:1,max:999,className:s,value:a.vaultAutoLockValue,disabled:h,onChange:e=>p({vaultAutoLockValue:e.target.value})})}),(0,H.jsx)(c,{label:n(`engine.vaultAutoLockUnit`),children:(0,H.jsxs)(`select`,{className:s,value:a.vaultAutoLockUnit,disabled:h,onChange:e=>p({vaultAutoLockUnit:e.target.value}),children:[(0,H.jsx)(`option`,{value:`minutes`,children:n(`engine.vaultAutoLockMinutes`)}),(0,H.jsx)(`option`,{value:`hours`,children:n(`engine.vaultAutoLockHours`)})]})})]}):(0,H.jsx)(`div`,{className:`mt-4`,children:(0,H.jsx)(r,{children:n(`engine.vaultAutoLockRestartWarning`)})})]}),(0,H.jsx)(G,{status:f.error===``?u?f.saved?(0,H.jsx)(r,{tone:`notice`,children:n(`engine.saved`)}):void 0:(0,H.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:n(`engine.loading`)}):(0,H.jsx)(r,{tone:`danger`,children:f.error}),children:(0,H.jsx)(i,{kind:`primary`,disabled:h,onClick:()=>void m(),children:n(`terminal.startSave`)})})]})})}var Y={current:``,next:``,confirm:``,withoutPassword:!1};function X({api:e,showHeading:t,onVaultChanged:n}){let s=o(),[c,l]=(0,V.useState)(null),[d,f]=(0,V.useState)(Y),p=N(),m=p.fail;(0,V.useEffect)(()=>{let t=!0;return l(null),e.passwordVault().then(e=>{t&&l(e.passwordless??!1)}).catch(()=>{t&&m(s(`secrets.failed`))}),()=>{t=!1}},[e,s,m]);function h(e){f(t=>({...t,...e}))}async function g(){let{current:t,next:r,withoutPassword:i}=d;await p.run(async()=>{let a=await e.changeMasterPassword(c?``:t,i?``:r);l(a.vault.passwordless??!1),n?.(a.vault)},{describe:e=>a(e)===`wrong_passphrase`?s(`secrets.wrongCurrent`):s(`secrets.changeFailed`)}),f(e=>({...Y,withoutPassword:e.withoutPassword}))}let _=[...d.next].length>=4&&d.next===d.confirm,v=c!==null&&!p.busy&&(d.withoutPassword||_);return(0,H.jsx)(W,{id:`settings-password`,label:s(`secrets.changeHeading`),icon:`secrets`,showHeading:t,children:(0,H.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,H.jsx)(`p`,{className:`mb-5 text-sm leading-6 text-ink-muted`,children:s(`secrets.changeNote`)}),(0,H.jsx)(u,{label:s(`lock.withoutPassword`),checked:d.withoutPassword,onChange:e=>h({withoutPassword:e})}),d.withoutPassword?(0,H.jsx)(`p`,{className:`mb-3 text-sm text-ink-muted`,children:s(`lock.withoutPasswordHint`)}):null,(0,H.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[c===!1?(0,H.jsx)(`div`,{className:`sm:col-span-2`,children:(0,H.jsx)(E,{label:s(`secrets.currentMaster`),value:d.current,onChange:e=>h({current:e}),disabled:p.busy})}):null,d.withoutPassword?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(E,{label:s(`secrets.newMaster`),value:d.next,onChange:e=>h({next:e}),disabled:p.busy}),(0,H.jsx)(E,{label:s(`secrets.confirmMaster`),value:d.confirm,onChange:e=>h({confirm:e}),disabled:p.busy})]})]}),!d.withoutPassword&&[...d.next].length>=4&&[...d.next].length<12?(0,H.jsx)(`p`,{className:`mt-3 text-sm text-ink-muted`,children:s(`lock.shortPasswordHint`)}):null,(0,H.jsx)(G,{status:p.error===``?p.saved?(0,H.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:s(`secrets.changedMasterLocally`)}):void 0:(0,H.jsx)(r,{tone:`danger`,children:p.error}),children:(0,H.jsx)(i,{kind:`primary`,disabled:!v,onClick:()=>void g(),children:s(`secrets.change`)})})]})})}function Z({showHeading:e}){let t=o(),[n,a]=(0,V.useState)(()=>f()),l=N(),[u,d]=(0,V.useState)(()=>ee());(0,V.useEffect)(()=>{let e=()=>a(f());return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]);function g(e){d(e),h(e)}async function v(){await l.run(async()=>{let e=await p();if(a(e),e===`granted`&&!w({title:`sshc`,body:t(`terminal.browserNotificationsReady`),tag:`sshc-notification-permission`}))throw Error(t(`terminal.browserNotificationsDeliveryFailed`))},{describe:e=>e instanceof Error&&e.message===t(`terminal.browserNotificationsDeliveryFailed`)?e.message:(a(f()),t(`terminal.browserNotificationsRequestFailed`))})}return(0,H.jsx)(W,{id:`settings-notifications`,label:t(`terminal.browserNotificationsHeading`),icon:`notification`,showHeading:e,children:(0,H.jsxs)(`div`,{className:`grid max-w-2xl gap-5`,children:[(0,H.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:t(n===`granted`?`terminal.browserNotificationsGranted`:n===`denied`?`terminal.browserNotificationsDenied`:n===`unsupported`?`terminal.browserNotificationsUnsupported`:`terminal.browserNotificationsDefault`)}),n==="default"||n===`granted`||l.error!==``?(0,H.jsx)(G,{status:l.error===``?n===`granted`?(0,H.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:t(`terminal.browserNotificationsEnabled`)}):void 0:(0,H.jsx)(r,{tone:`danger`,children:l.error}),children:n==="default"||n===`granted`?(0,H.jsx)(i,{kind:n==="default"?`primary`:`secondary`,disabled:l.busy,onClick:()=>void v(),children:t(n===`granted`?`terminal.browserNotificationsTest`:`terminal.browserNotificationsEnable`)}):null}):null,(0,H.jsxs)(`div`,{className:`grid gap-4 border-t border-line pt-5 sm:grid-cols-2`,children:[(0,H.jsx)(c,{label:t(`terminal.notificationSound`),hint:t(`terminal.notificationSoundHint`),children:(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(`select`,{className:s,value:u.sound,onChange:e=>g({...u,sound:e.target.value}),children:_.map(e=>(0,H.jsx)(`option`,{value:e,children:t(`terminal.notificationSound.${e}`)},e))}),(0,H.jsx)(i,{"aria-label":t(`terminal.notificationPreviewSound`),onClick:()=>m(u),children:t(`terminal.notificationPreview`)})]})}),(0,H.jsx)(c,{label:t(`terminal.notificationVolume`),hint:t(`terminal.notificationVolumeHint`,{volume:String(u.volume)}),children:(0,H.jsx)(`input`,{"aria-label":t(`terminal.notificationVolume`),type:`range`,min:0,max:100,step:5,value:u.volume,onChange:e=>g({...u,volume:Number(e.target.value)}),className:`h-9 w-full accent-accent`})})]})]})})}function Q({palette:e,font:t,background:n,tint:r,fontSize:i}){let a=R(n),o=Number(i),s=Number.isFinite(o)&&o>=8&&o<=32?o:13,c=n!==``&&a!==``,l={color:`var(--ui-term-fg)`,fontFamily:z(t),fontSize:s,...c?{"--ui-term-image":`url("${a}")`,"--ui-term-tint":String(r??55)}:{}};return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-control-line bg-term-bg shadow-sm`,"aria-hidden":`true`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-white/10 bg-black/20 px-3 py-2`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-danger`}),(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-notice-ink`}),(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-live`}),(0,H.jsx)(`span`,{className:`ml-2 font-mono text-[10px] text-white/60`,children:`sshc · preview`})]}),(0,H.jsxs)(`div`,{"data-terminal-preview":``,...e===``?{}:{"data-term-palette":e},...t===``?{}:{"data-term-font":t},...c?{"data-term-background":n}:{},style:l,className:`min-h-40 bg-term-bg p-4 font-mono leading-relaxed`,children:[(0,H.jsxs)(`p`,{children:[(0,H.jsx)(`span`,{style:{color:`var(--ui-term-green)`},children:`workspace`}),` `,(0,H.jsx)(`span`,{style:{color:`var(--ui-term-blue)`},children:`main`})]}),(0,H.jsxs)(`p`,{children:[(0,H.jsx)(`span`,{style:{color:`var(--ui-term-cyan)`},children:`$`}),` ssh example.com`]}),(0,H.jsx)(`p`,{style:{color:`var(--ui-term-bright-black)`},children:`Connected to example.com`}),(0,H.jsxs)(`p`,{children:[(0,H.jsx)(`span`,{style:{color:`var(--ui-term-cyan)`},children:`$`}),` `,(0,H.jsx)(`span`,{className:`inline-block h-[1em] w-[0.5em] translate-y-[0.12em] bg-current`})]})]})]})}var te={startDirectory:``,localShellProfile:``,maxSessions:``,scrollback:``,browserScrollbackLines:``,fontSize:``,verbosity:`0`,reconnect:``,palette:``,font:``,background:``,tint:void 0,copyOnSelect:!0,rightClickPaste:!0,webgl:!0,osc52:!1,jisYenBackslash:!1};function ne(e){let t=e=>e===void 0?``:String(e);return{startDirectory:e.startDirectory??``,localShellProfile:e.localShellProfile??``,maxSessions:t(e.maxSessions),scrollback:t(e.scrollbackBytes),browserScrollbackLines:t(e.browserScrollbackLines),fontSize:t(e.fontSize),verbosity:String(e.verbosity??0),reconnect:t(e.reconnect),palette:e.appearance?.palette??``,font:e.appearance?.font??``,background:e.appearance?.background??``,tint:e.appearance?.backgroundTint,copyOnSelect:e.copyOnSelect??!0,rightClickPaste:e.rightClickPaste??!0,webgl:e.webgl??!0,osc52:e.osc52??!1,jisYenBackslash:e.jisYenBackslash??!1}}function $(e){let t=e.trim();if(t===``)return;let n=Number(t);return Number.isSafeInteger(n)?n:NaN}function re(e){let t=$(e.maxSessions),n=$(e.scrollback),r=$(e.browserScrollbackLines),i=$(e.fontSize);if(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r)||Number.isNaN(i))return null;let a=e.startDirectory.trim();return{...a===``?{}:{startDirectory:a},...t===void 0?{}:{maxSessions:t},...n===void 0?{}:{scrollbackBytes:n},...r===void 0?{}:{browserScrollbackLines:r},...i===void 0?{}:{fontSize:i},...e.verbosity===`0`?{}:{verbosity:Number(e.verbosity)},...e.reconnect===``?{}:{reconnect:Number(e.reconnect)},...e.copyOnSelect?{}:{copyOnSelect:!1},...e.rightClickPaste?{}:{rightClickPaste:!1},...e.webgl?{}:{webgl:!1},...e.osc52?{osc52:!0}:{},...e.jisYenBackslash?{jisYenBackslash:!0}:{},...e.localShellProfile===``?{}:{localShellProfile:e.localShellProfile},...A({palette:e.palette,font:e.font,background:e.background,tint:e.tint})}}function ie(e){let t=a(e);return t===`start_directory_missing`?`terminal.startMissing`:t===`start_directory_not_a_directory`?`terminal.startNotADirectory`:t===`start_directory_unusable`?`terminal.startUnusable`:t===`terminal_limits_out_of_range`||t===`invalid_request`?`terminal.limitsOutOfRange`:`terminal.settingsSaveFailed`}function ae({api:e,showHeading:t,onSettingsChange:n}){let a=o(),[d,f]=(0,V.useState)(te),[p,m]=(0,V.useState)(!1),[h,g]=(0,V.useState)([]),_=N();(0,V.useEffect)(()=>{let t=!0;return e.terminalSettings().then(e=>{t&&f(ne(e))}).catch(()=>void 0).finally(()=>{t&&m(!0)}),e.localShellProfiles!==void 0&&e.localShellProfiles().then(e=>{t&&g(e.profiles)}).catch(()=>void 0),()=>{t=!1}},[e]);function v(e){f(t=>({...t,...e})),_.touch()}async function y(){let t=re(d);if(t===null){_.fail(a(`terminal.limitsOutOfRange`));return}await _.run(async()=>{await e.setTerminalSettings(t);try{await n?.(t)}catch{}},{describe:e=>a(ie(e))})}let b=_.busy;return(0,H.jsx)(W,{id:`settings-terminal`,label:a(`terminal.settingsHeading`),icon:`terminal`,showHeading:t,children:(0,H.jsxs)(`fieldset`,{disabled:!p||b,className:`min-w-0 border-0 p-0 disabled:opacity-70`,children:[(0,H.jsx)(`p`,{className:`mb-5 max-w-3xl text-sm leading-6 text-ink-muted`,children:a(`terminal.settingsStorageHint`)}),(0,H.jsxs)(`div`,{className:`grid gap-8 xl:grid-cols-[minmax(0,1fr)_19rem]`,children:[(0,H.jsxs)(`div`,{className:`grid min-w-0 gap-5 sm:grid-cols-2`,children:[(0,H.jsx)(`div`,{className:`sm:col-span-2`,children:(0,H.jsx)(c,{label:a(`terminal.startLabel`),hint:a(`terminal.startHint`),children:(0,H.jsx)(`input`,{type:`text`,className:s,value:d.startDirectory,spellCheck:!1,placeholder:`~/`,disabled:b,onChange:e=>v({startDirectory:e.target.value})})})}),(0,H.jsx)(`div`,{className:`sm:col-span-2`,children:(0,H.jsx)(c,{label:a(`terminal.localShellProfileLabel`),hint:a(`terminal.localShellProfileHint`),children:(0,H.jsxs)(`select`,{className:s,value:d.localShellProfile,disabled:b||h.length===0,onChange:e=>v({localShellProfile:e.target.value}),children:[(0,H.jsx)(`option`,{value:``,children:a(`terminal.localShellProfileSystem`)}),h.filter(e=>e.id!=="default").map(e=>(0,H.jsxs)(`option`,{value:e.id,children:[e.label,` — `,e.path]},e.id))]})})}),(0,H.jsx)(c,{label:a(`terminal.maxSessionsLabel`),hint:a(`terminal.maxSessionsHint`),children:(0,H.jsx)(`input`,{type:`number`,min:1,max:200,className:s,value:d.maxSessions,placeholder:`50`,disabled:b,onChange:e=>v({maxSessions:e.target.value})})}),(0,H.jsx)(c,{label:a(`terminal.scrollbackLabel`),hint:a(`terminal.scrollbackHint`),children:(0,H.jsx)(`input`,{type:`number`,min:16384,max:4194304,className:s,value:d.scrollback,placeholder:`262144`,disabled:b,onChange:e=>v({scrollback:e.target.value})})}),(0,H.jsx)(c,{label:a(`terminal.browserScrollbackLabel`),hint:a(`terminal.browserScrollbackHint`),children:(0,H.jsx)(`input`,{type:`number`,min:1e3,max:1e5,className:s,value:d.browserScrollbackLines,placeholder:`5000`,disabled:b,onChange:e=>v({browserScrollbackLines:e.target.value})})}),(0,H.jsx)(c,{label:a(`terminal.verbosityLabel`),hint:a(`terminal.verbosityHint`),children:(0,H.jsxs)(`select`,{className:s,value:d.verbosity,disabled:b,onChange:e=>v({verbosity:e.target.value}),children:[(0,H.jsx)(`option`,{value:`0`,children:a(`terminal.verbosityQuiet`)}),(0,H.jsx)(`option`,{value:`1`,children:a(`terminal.verbosityBrief`)}),(0,H.jsx)(`option`,{value:`2`,children:a(`terminal.verbosityDetailed`)}),(0,H.jsx)(`option`,{value:`3`,children:a(`terminal.verbosityFull`)})]})}),(0,H.jsx)(c,{label:a(`terminal.reconnectLabel`),hint:a(`terminal.reconnectHint`),children:(0,H.jsxs)(`select`,{className:s,value:d.reconnect,disabled:b,onChange:e=>v({reconnect:e.target.value}),children:[(0,H.jsx)(`option`,{value:``,children:a(`terminal.reconnectDefault`)}),(0,H.jsx)(`option`,{value:`0`,children:a(`terminal.reconnectNever`)}),(0,H.jsx)(`option`,{value:`1`,children:a(`terminal.reconnectOnce`)}),(0,H.jsx)(`option`,{value:`2`,children:a(`terminal.reconnectTwice`)}),(0,H.jsx)(`option`,{value:`3`,children:a(`terminal.reconnectThrice`)}),(0,H.jsx)(`option`,{value:`5`,children:a(`terminal.reconnectFive`)})]})}),(0,H.jsx)(c,{label:a(`terminal.paletteLabel`),hint:a(`terminal.paletteHint`),children:(0,H.jsx)(F,{choices:I,value:d.palette,onChange:e=>v({palette:e}),unchosen:a(`terminal.paletteFollowsTheme`)})}),(0,H.jsx)(c,{label:a(`terminal.fontLabel`),hint:a(`terminal.fontHint`),children:(0,H.jsx)(F,{choices:L,value:d.font,onChange:e=>v({font:e}),unchosen:a(`terminal.fontFollowsSystem`)})}),(0,H.jsx)(c,{label:a(`terminal.fontSizeLabel`),hint:a(`terminal.fontSizeHint`),children:(0,H.jsx)(`input`,{type:`number`,min:8,max:32,className:s,value:d.fontSize,placeholder:`15 / 13`,disabled:b,onChange:e=>v({fontSize:e.target.value})})}),(0,H.jsx)(`div`,{className:`sm:col-span-2`,children:(0,H.jsx)(c,{label:a(`terminal.backgroundLabel`),hint:a(`terminal.backgroundHint`),interactiveChildren:!0,children:(0,H.jsx)(P,{value:d.background,onChange:e=>v({background:e}),tint:d.tint,onTintChange:e=>v({tint:e}),unchosen:a(`terminal.backgroundNone`)})})}),[[`copyOnSelect`,`terminal.copyOnSelectLabel`,`terminal.copyOnSelectHint`],[`osc52`,`terminal.osc52DefaultLabel`,`terminal.osc52DefaultHint`],[`jisYenBackslash`,`terminal.jisYenBackslashLabel`,`terminal.jisYenBackslashHint`],[`rightClickPaste`,`terminal.rightClickPasteLabel`,`terminal.rightClickPasteHint`],[`webgl`,`terminal.webglLabel`,`terminal.webglHint`]].map(([e,t,n])=>(0,H.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-select-fill p-3`,children:[(0,H.jsx)(u,{label:a(t),checked:d[e],disabled:b,onChange:t=>v({[e]:t})}),(0,H.jsx)(`p`,{className:l,children:a(n)})]},e))]}),(0,H.jsx)(`div`,{className:`self-start xl:sticky xl:top-6`,children:(0,H.jsx)(Q,{palette:d.palette,font:d.font,background:d.background,tint:d.tint,fontSize:d.fontSize})})]}),(0,H.jsx)(G,{status:_.error===``?p?_.saved?(0,H.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:a(`terminal.settingsSaved`)}):void 0:(0,H.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:a(`terminal.settingsLoading`)}):(0,H.jsx)(r,{tone:`danger`,children:_.error}),children:(0,H.jsx)(i,{kind:`primary`,disabled:b,onClick:()=>void y(),children:a(`terminal.startSave`)})})]})})}var oe={...D,...v},se=`[&_button]:min-h-10 [&_a]:inline-flex [&_a]:min-h-10 [&_a]:items-center md:[&_button]:min-h-0 md:[&_a]:min-h-0`;function ce({api:e=oe,page:t=`All`,consoles:r,onVaultChanged:i,onTerminalSettingsChange:a}){let s=o(),c=t===`All`,l=e=>c||t===e,u=c?`settings.heading`:g[t].label,d=c?`settings.pageDescription`:g[t].description;return(0,H.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6 ${se}`,children:[(0,H.jsx)(B,{title:s(u),description:s(d)}),(0,H.jsxs)(n,{radius:`md`,children:[l(`Shortcuts`)?(0,H.jsx)(W,{id:`settings-shortcuts`,label:s(`shortcuts.heading`),icon:`settings`,showHeading:c,children:(0,H.jsx)(U,{})}):null,l(`Engine`)?(0,H.jsx)(J,{api:e,showHeading:c}):null,l(`Terminal`)?(0,H.jsx)(ae,{api:e,showHeading:c,onSettingsChange:a}):null,l(`Notifications`)?(0,H.jsx)(Z,{showHeading:c}):null,r!==void 0&&l(`Connections`)?(0,H.jsx)(K,{consoles:r,showHeading:c}):null,l(`Password`)?(0,H.jsx)(X,{api:e,showHeading:c,onVaultChanged:i}):null]})]})}export{ce as SettingsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SettingsPanel-tyxfeXty.js b/internal/ui/dist/assets/SettingsPanel-tyxfeXty.js deleted file mode 100644 index 21f268b8a..000000000 --- a/internal/ui/dist/assets/SettingsPanel-tyxfeXty.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,n as r,r as i,t as a}from"./surface-Ck_FblzE.js";import{_ as o,i as s,n as c,s as l,t as u}from"./form-C1olpQVF.js";import{C as d,E as f,H as p,J as m,S as h,T as g,Z as _,at as v,b as y,ct as b,dt as x,et as S,it as C,ot as w,pt as T,q as E,rt as D,st as O,t as k,tt as A,ut as j,w as M,x as ee}from"./index-DJ8h9zNi.js";import{n as N,r as P,t as F}from"./palettes--8RhxKto.js";import{n as I,r as L,t as R}from"./fonts-CUObG_Dx.js";import{r as z}from"./page-CiAVS9qS.js";var B=e(),V=t();function H(){let e=o(),t=T(),n=O(),[r,i]=(0,B.useState)(``),[s,c]=(0,B.useState)(null),l=n.loading||n.busy||n.error,[u,d]=(0,B.useState)(null),[f,p]=(0,B.useState)(``),[m,h]=(0,B.useState)(``);async function g(t){p(``),h(``);try{await C(t),d(null),p(e(`shortcuts.saved`))}catch{h(e(`shortcuts.saveFailed`))}}async function _(a){h(``),p(``);try{let o=a===`copy`?crypto.randomUUID():n.selected;await w(a===`copy`?[...n.presets,{id:o,name:r.trim(),bindings:t}]:a===`rename`?n.presets.map(e=>e.id===o?{...e,name:r.trim()}:e):n.presets.filter(e=>e.id!==o),a===`delete`?`default`:o),i(``),p(e(`shortcuts.saved`))}catch{h(e(`shortcuts.saveFailed`))}}return(0,V.jsxs)(`div`,{"data-shortcut-editor":!0,children:[(0,V.jsx)(`p`,{className:`mb-4 text-sm text-ink-muted`,children:e(`shortcuts.hint`)}),(0,V.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-end gap-3`,children:[(0,V.jsxs)(`label`,{className:`text-sm`,children:[e(`shortcuts.preset`),(0,V.jsxs)(`select`,{className:`ml-2 rounded border border-line bg-control p-2`,value:n.selected,disabled:l,onChange:t=>{try{v(t.target.value)}catch{h(e(`shortcuts.saveFailed`))}},children:[(0,V.jsx)(`option`,{value:`default`,children:e(`shortcuts.defaultPreset`)}),n.presets.map(e=>(0,V.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,V.jsxs)(`label`,{className:`text-sm`,children:[e(`shortcuts.presetName`),(0,V.jsx)(`input`,{className:`ml-2 rounded border border-line bg-control p-2`,maxLength:80,value:r,onChange:e=>i(e.target.value)})]}),(0,V.jsx)(a,{disabled:l||!r.trim()||n.presets.length>=64,onClick:()=>{_(`copy`)},children:e(`shortcuts.duplicate`)}),(0,V.jsx)(a,{disabled:l||!r.trim()||n.selected==="default",onClick:()=>{_(`rename`)},children:e(`shortcuts.rename`)}),(0,V.jsx)(a,{disabled:l||n.selected==="default",onClick:()=>c(n.selected),children:e(`shortcuts.delete`)})]}),s===n.selected?(0,V.jsxs)(`div`,{className:`mb-4`,role:`group`,"aria-label":e(`shortcuts.confirmDelete`),children:[(0,V.jsx)(`p`,{children:e(`shortcuts.confirmDelete`)}),(0,V.jsx)(a,{disabled:l,onClick:()=>{c(null),_(`delete`)},children:e(`shortcuts.deleteEverywhere`)}),(0,V.jsx)(a,{onClick:()=>c(null),children:e(`shortcuts.cancelDelete`)})]}):null,n.error?(0,V.jsxs)(`div`,{role:`alert`,children:[(0,V.jsx)(`p`,{children:e(`shortcuts.reloadRequired`)}),(0,V.jsx)(a,{onClick:()=>{D()},children:e(`shortcuts.reload`)})]}):null,n.loading?(0,V.jsx)(`p`,{role:`status`,children:e(`shortcuts.loading`)}):null,(0,V.jsxs)(`fieldset`,{disabled:l,children:[(0,V.jsx)(`ul`,{className:`divide-y divide-line`,children:j.map(n=>(0,V.jsxs)(`li`,{className:`flex flex-wrap items-center gap-3 py-3`,children:[(0,V.jsx)(`span`,{className:`min-w-40 flex-1 text-sm font-medium text-ink`,children:e(`shortcuts.${n}`)}),(0,V.jsx)(`button`,{type:`button`,"aria-label":e(`shortcuts.assign`,{action:e(`shortcuts.${n}`)}),className:`min-h-10 min-w-48 rounded border border-line bg-control px-3 py-2 text-sm text-ink focus-visible:outline-2 focus-visible:outline-accent`,onClick:()=>{d(n),h(``),p(``)},onBlur:()=>d(null),onKeyDown:r=>{if(u!==n)return;if(r.key===`Tab`&&!r.ctrlKey&&!r.altKey&&!r.metaKey){d(null);return}if(r.preventDefault(),r.stopPropagation(),r.key===`Escape`){d(null);return}if(r.repeat||r.nativeEvent.isComposing)return;let i=x(r.nativeEvent);if(i===null)return;let a=j.find(e=>e!==n&&t[e].includes(i));if(a!==void 0){h(e(`shortcuts.conflict`,{action:e(`shortcuts.${a}`)}));return}g({...t,[n]:[i]})},children:u===n?e(`shortcuts.recording`):t[n].join(` / `)||e(`shortcuts.unassigned`)}),(0,V.jsx)(a,{onClick:()=>{g({...t,[n]:[]})},disabled:t[n].length===0,"aria-label":e(`shortcuts.clearAction`,{action:e(`shortcuts.${n}`)}),children:e(`shortcuts.clear`)})]},n))}),(0,V.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-line pt-4`,children:[(0,V.jsx)(`div`,{"aria-live":`polite`,children:m?(0,V.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:m}):f?(0,V.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:f}):null}),(0,V.jsx)(a,{onClick:()=>{g(b)},children:e(`shortcuts.reset`)})]})]})]})}function U({id:e,label:t,icon:n,showHeading:r=!0,children:i}){return(0,V.jsx)(`section`,{id:e,"aria-label":t,className:`scroll-mt-6 border-b border-line last:border-b-0`,children:(0,V.jsxs)(`div`,{className:r?`grid gap-5 px-4 py-6 sm:px-6 lg:grid-cols-[11rem_minmax(0,1fr)] lg:gap-8 lg:py-8`:`px-4 py-6 sm:px-6 lg:px-8 lg:py-8`,children:[r?(0,V.jsxs)(`header`,{className:`flex items-center gap-3 self-start lg:sticky lg:top-6`,children:[(0,V.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-select-fill text-accent`,children:(0,V.jsx)(m,{name:n})}),(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-ink`,children:t})]}):null,(0,V.jsx)(`div`,{className:`min-w-0`,children:i})]})})}function W({children:e,status:t}){return(0,V.jsxs)(`div`,{className:`mt-6 flex min-h-12 flex-wrap items-center justify-between gap-3 border-t border-line pt-4`,children:[(0,V.jsx)(`div`,{className:`min-w-0 flex-1`,children:t}),(0,V.jsx)(`div`,{className:`shrink-0`,children:e})]})}function G({consoles:e,showHeading:t}){let n=o(),[r,i]=(0,B.useState)(!1),s=e.sessions.filter(e=>e.exited===void 0).length;return(0,V.jsxs)(U,{id:`settings-connections`,label:n(`desktop.closeAllHeading`),icon:`connections`,showHeading:t,children:[(0,V.jsx)(`p`,{className:`max-w-2xl text-sm leading-6 text-ink-muted`,children:n(`desktop.closeAllNote`)}),(0,V.jsx)(W,{status:(0,V.jsxs)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:[(0,V.jsx)(`span`,{className:`mr-2 inline-block h-2 w-2 rounded-full bg-live`}),n(`desktop.openCount`,{count:e.sessions.length})]}),children:(0,V.jsx)(a,{disabled:e.busy||e.sessions.length===0,onClick:()=>s===0?void e.closeAll():i(!0),children:n(`desktop.closeAll`)})}),r?(0,V.jsx)(p,{id:`close-all-consoles-heading`,heading:n(`desktop.closeAllHeading2`,{count:String(s)}),body:(0,V.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`desktop.closeAllBody`)}),confirmLabel:n(`desktop.closeAllConfirm`),cancelLabel:n(`desktop.closeAllCancel`),onCancel:()=>i(!1),onConfirm:()=>{i(!1),e.closeAll()}}):null]})}function K(){let[e,t]=(0,B.useState)(!1),[n,r]=(0,B.useState)(``),[i,a]=(0,B.useState)(!1);return{busy:e,error:n,saved:i,touch:()=>a(!1),fail:e=>{r(e),a(!1)},async run(e,n){t(!0),r(``),a(!1);try{return await e(),a(!0),!0}catch(e){return r(n(e)),!1}finally{t(!1)}}}}var q={port:``,vaultAutoLockMode:`idle`,vaultAutoLockValue:`12`,vaultAutoLockUnit:`hours`};function J({api:e,showHeading:t}){let n=o(),[r,l]=(0,B.useState)(q),[u,d]=(0,B.useState)(!1),f=K();(0,B.useEffect)(()=>{let t=!0;return e.engineSettings().then(e=>{t&&l({port:e.port===void 0?``:String(e.port),vaultAutoLockMode:e.vaultAutoLock?.mode===`restart`?`restart`:`idle`,vaultAutoLockValue:e.vaultAutoLock?.mode===`idle`?String(e.vaultAutoLock.value??12):q.vaultAutoLockValue,vaultAutoLockUnit:e.vaultAutoLock?.mode===`idle`?e.vaultAutoLock.unit??`hours`:q.vaultAutoLockUnit})}).catch(()=>void 0).finally(()=>{t&&d(!0)}),()=>{t=!1}},[e]);function p(e){l(t=>({...t,...e})),f.touch()}async function m(){let t=r.port.trim(),i=t===``?void 0:Number(t);if(i!==void 0&&(!Number.isSafeInteger(i)||i<1024||i>65535)){f.fail(n(`engine.portOutOfRange`));return}let a=Number(r.vaultAutoLockValue);if(r.vaultAutoLockMode===`idle`&&(!Number.isSafeInteger(a)||a<1||a>999)){f.fail(n(`engine.vaultAutoLockOutOfRange`));return}await f.run(()=>e.setEngineSettings({...i===void 0?{}:{port:i},vaultAutoLock:r.vaultAutoLockMode===`restart`?{mode:`restart`}:{mode:`idle`,value:a,unit:r.vaultAutoLockUnit}}),()=>n(`engine.saveFailed`))}let h=!u||f.busy;return(0,V.jsx)(U,{id:`settings-engine`,label:n(`engine.heading`),icon:`settings`,showHeading:t,children:(0,V.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,V.jsx)(c,{label:n(`engine.portLabel`),hint:n(`engine.portHint`),children:(0,V.jsx)(`input`,{type:`number`,min:1024,max:65535,className:s,value:r.port,placeholder:`54447`,disabled:h,onChange:e=>p({port:e.target.value})})}),(0,V.jsxs)(`div`,{className:`mt-5 border-t border-line pt-5`,children:[(0,V.jsx)(c,{label:n(`engine.vaultAutoLockLabel`),hint:n(`engine.vaultAutoLockHint`),children:(0,V.jsxs)(`select`,{className:s,value:r.vaultAutoLockMode,disabled:h,onChange:e=>p({vaultAutoLockMode:e.target.value}),children:[(0,V.jsx)(`option`,{value:`idle`,children:n(`engine.vaultAutoLockIdle`)}),(0,V.jsx)(`option`,{value:`restart`,children:n(`engine.vaultAutoLockRestart`)})]})}),r.vaultAutoLockMode===`idle`?(0,V.jsxs)(`div`,{className:`mt-4 grid grid-cols-[minmax(0,1fr)_minmax(8rem,0.65fr)] gap-3`,children:[(0,V.jsx)(c,{label:n(`engine.vaultAutoLockValue`),children:(0,V.jsx)(`input`,{type:`number`,min:1,max:999,className:s,value:r.vaultAutoLockValue,disabled:h,onChange:e=>p({vaultAutoLockValue:e.target.value})})}),(0,V.jsx)(c,{label:n(`engine.vaultAutoLockUnit`),children:(0,V.jsxs)(`select`,{className:s,value:r.vaultAutoLockUnit,disabled:h,onChange:e=>p({vaultAutoLockUnit:e.target.value}),children:[(0,V.jsx)(`option`,{value:`minutes`,children:n(`engine.vaultAutoLockMinutes`)}),(0,V.jsx)(`option`,{value:`hours`,children:n(`engine.vaultAutoLockHours`)})]})})]}):(0,V.jsx)(`div`,{className:`mt-4`,children:(0,V.jsx)(i,{children:n(`engine.vaultAutoLockRestartWarning`)})})]}),(0,V.jsx)(W,{status:f.error===``?u?f.saved?(0,V.jsx)(i,{tone:`notice`,children:n(`engine.saved`)}):void 0:(0,V.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:n(`engine.loading`)}):(0,V.jsx)(i,{tone:`danger`,children:f.error}),children:(0,V.jsx)(a,{kind:`primary`,disabled:h,onClick:()=>void m(),children:n(`terminal.startSave`)})})]})})}var Y={current:``,next:``,confirm:``,withoutPassword:!1};function X({api:e,showHeading:t,onVaultChanged:r}){let s=o(),[c,l]=(0,B.useState)(null),[d,f]=(0,B.useState)(Y),p=K();(0,B.useEffect)(()=>{let t=!0;return l(null),e.passwordVault().then(e=>{t&&l(e.passwordless??!1)}).catch(()=>{t&&p.fail(s(`secrets.failed`))}),()=>{t=!1}},[e,s]);function m(e){f(t=>({...t,...e}))}async function h(){let{current:t,next:i,withoutPassword:a}=d;await p.run(async()=>{let n=await e.changeMasterPassword(c?``:t,a?``:i);l(n.vault.passwordless??!1),r?.(n.vault)},e=>n(e)===`wrong_passphrase`?s(`secrets.wrongCurrent`):s(`secrets.changeFailed`)),f(e=>({...Y,withoutPassword:e.withoutPassword}))}let g=[...d.next].length>=4&&d.next===d.confirm,v=c!==null&&!p.busy&&(d.withoutPassword||g);return(0,V.jsx)(U,{id:`settings-password`,label:s(`secrets.changeHeading`),icon:`secrets`,showHeading:t,children:(0,V.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,V.jsx)(`p`,{className:`mb-5 text-sm leading-6 text-ink-muted`,children:s(`secrets.changeNote`)}),(0,V.jsx)(u,{label:s(`lock.withoutPassword`),checked:d.withoutPassword,onChange:e=>m({withoutPassword:e})}),d.withoutPassword?(0,V.jsx)(`p`,{className:`mb-3 text-sm text-ink-muted`,children:s(`lock.withoutPasswordHint`)}):null,(0,V.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[c===!1?(0,V.jsx)(`div`,{className:`sm:col-span-2`,children:(0,V.jsx)(_,{label:s(`secrets.currentMaster`),value:d.current,onChange:e=>m({current:e}),disabled:p.busy})}):null,d.withoutPassword?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_,{label:s(`secrets.newMaster`),value:d.next,onChange:e=>m({next:e}),disabled:p.busy}),(0,V.jsx)(_,{label:s(`secrets.confirmMaster`),value:d.confirm,onChange:e=>m({confirm:e}),disabled:p.busy})]})]}),!d.withoutPassword&&[...d.next].length>=4&&[...d.next].length<12?(0,V.jsx)(`p`,{className:`mt-3 text-sm text-ink-muted`,children:s(`lock.shortPasswordHint`)}):null,(0,V.jsx)(W,{status:p.error===``?p.saved?(0,V.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:s(`secrets.changedMasterLocally`)}):void 0:(0,V.jsx)(i,{tone:`danger`,children:p.error}),children:(0,V.jsx)(a,{kind:`primary`,disabled:!v,onClick:()=>void h(),children:s(`secrets.change`)})})]})})}function Z({showHeading:e}){let t=o(),[n,r]=(0,B.useState)(()=>y()),[l,u]=(0,B.useState)(!1),[p,m]=(0,B.useState)(``),[_,v]=(0,B.useState)(()=>ee());(0,B.useEffect)(()=>{let e=()=>r(y());return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]);function b(e){v(e),g(e)}async function x(){u(!0),m(``);try{let e=await M();r(e),e===`granted`&&(f({title:`sshc`,body:t(`terminal.browserNotificationsReady`),tag:`sshc-notification-permission`})||m(t(`terminal.browserNotificationsDeliveryFailed`)))}catch{r(y()),m(t(`terminal.browserNotificationsRequestFailed`))}finally{u(!1)}}return(0,V.jsx)(U,{id:`settings-notifications`,label:t(`terminal.browserNotificationsHeading`),icon:`notification`,showHeading:e,children:(0,V.jsxs)(`div`,{className:`grid max-w-2xl gap-5`,children:[(0,V.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:t(n===`granted`?`terminal.browserNotificationsGranted`:n===`denied`?`terminal.browserNotificationsDenied`:n===`unsupported`?`terminal.browserNotificationsUnsupported`:`terminal.browserNotificationsDefault`)}),n==="default"||n===`granted`||p!==``?(0,V.jsx)(W,{status:p===``?n===`granted`?(0,V.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:t(`terminal.browserNotificationsEnabled`)}):void 0:(0,V.jsx)(i,{tone:`danger`,children:p}),children:n==="default"||n===`granted`?(0,V.jsx)(a,{kind:n==="default"?`primary`:`secondary`,disabled:l,onClick:()=>void x(),children:t(n===`granted`?`terminal.browserNotificationsTest`:`terminal.browserNotificationsEnable`)}):null}):null,(0,V.jsxs)(`div`,{className:`grid gap-4 border-t border-line pt-5 sm:grid-cols-2`,children:[(0,V.jsx)(c,{label:t(`terminal.notificationSound`),hint:t(`terminal.notificationSoundHint`),children:(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(`select`,{className:s,value:_.sound,onChange:e=>b({..._,sound:e.target.value}),children:h.map(e=>(0,V.jsx)(`option`,{value:e,children:t(`terminal.notificationSound.${e}`)},e))}),(0,V.jsx)(a,{"aria-label":t(`terminal.notificationPreviewSound`),onClick:()=>d(_),children:t(`terminal.notificationPreview`)})]})}),(0,V.jsx)(c,{label:t(`terminal.notificationVolume`),hint:t(`terminal.notificationVolumeHint`,{volume:String(_.volume)}),children:(0,V.jsx)(`input`,{"aria-label":t(`terminal.notificationVolume`),type:`range`,min:0,max:100,step:5,value:_.volume,onChange:e=>b({..._,volume:Number(e.target.value)}),className:`h-9 w-full accent-accent`})})]})]})})}function Q({palette:e,font:t,background:n,tint:r,fontSize:i}){let a=L(n),o=Number(i),s=Number.isFinite(o)&&o>=8&&o<=32?o:13,c=n!==``&&a!==``,l={color:`var(--ui-term-fg)`,fontFamily:R(t),fontSize:s,...c?{"--ui-term-image":`url("${a}")`,"--ui-term-tint":String(r??55)}:{}};return(0,V.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-control-line bg-term-bg shadow-sm`,"aria-hidden":`true`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-white/10 bg-black/20 px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-danger`}),(0,V.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-notice-ink`}),(0,V.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-live`}),(0,V.jsx)(`span`,{className:`ml-2 font-mono text-[10px] text-white/60`,children:`sshc · preview`})]}),(0,V.jsxs)(`div`,{"data-terminal-preview":``,...e===``?{}:{"data-term-palette":e},...t===``?{}:{"data-term-font":t},...c?{"data-term-background":n}:{},style:l,className:`min-h-40 bg-term-bg p-4 font-mono leading-relaxed`,children:[(0,V.jsxs)(`p`,{children:[(0,V.jsx)(`span`,{style:{color:`var(--ui-term-green)`},children:`workspace`}),` `,(0,V.jsx)(`span`,{style:{color:`var(--ui-term-blue)`},children:`main`})]}),(0,V.jsxs)(`p`,{children:[(0,V.jsx)(`span`,{style:{color:`var(--ui-term-cyan)`},children:`$`}),` ssh example.com`]}),(0,V.jsx)(`p`,{style:{color:`var(--ui-term-bright-black)`},children:`Connected to example.com`}),(0,V.jsxs)(`p`,{children:[(0,V.jsx)(`span`,{style:{color:`var(--ui-term-cyan)`},children:`$`}),` `,(0,V.jsx)(`span`,{className:`inline-block h-[1em] w-[0.5em] translate-y-[0.12em] bg-current`})]})]})]})}var te={startDirectory:``,localShellProfile:``,maxSessions:``,scrollback:``,browserScrollbackLines:``,fontSize:``,verbosity:`0`,reconnect:``,palette:``,font:``,background:``,tint:void 0,copyOnSelect:!0,rightClickPaste:!0,webgl:!0,osc52:!1,jisYenBackslash:!1};function ne(e){let t=e=>e===void 0?``:String(e);return{startDirectory:e.startDirectory??``,localShellProfile:e.localShellProfile??``,maxSessions:t(e.maxSessions),scrollback:t(e.scrollbackBytes),browserScrollbackLines:t(e.browserScrollbackLines),fontSize:t(e.fontSize),verbosity:String(e.verbosity??0),reconnect:t(e.reconnect),palette:e.appearance?.palette??``,font:e.appearance?.font??``,background:e.appearance?.background??``,tint:e.appearance?.backgroundTint,copyOnSelect:e.copyOnSelect??!0,rightClickPaste:e.rightClickPaste??!0,webgl:e.webgl??!0,osc52:e.osc52??!1,jisYenBackslash:e.jisYenBackslash??!1}}function $(e){let t=e.trim();if(t===``)return;let n=Number(t);return Number.isSafeInteger(n)?n:NaN}function re(e){let t=$(e.maxSessions),n=$(e.scrollback),r=$(e.browserScrollbackLines),i=$(e.fontSize);if(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r)||Number.isNaN(i))return null;let a=e.startDirectory.trim();return{...a===``?{}:{startDirectory:a},...t===void 0?{}:{maxSessions:t},...n===void 0?{}:{scrollbackBytes:n},...r===void 0?{}:{browserScrollbackLines:r},...i===void 0?{}:{fontSize:i},...e.verbosity===`0`?{}:{verbosity:Number(e.verbosity)},...e.reconnect===``?{}:{reconnect:Number(e.reconnect)},...e.copyOnSelect?{}:{copyOnSelect:!1},...e.rightClickPaste?{}:{rightClickPaste:!1},...e.webgl?{}:{webgl:!1},...e.osc52?{osc52:!0}:{},...e.jisYenBackslash?{jisYenBackslash:!0}:{},...e.localShellProfile===``?{}:{localShellProfile:e.localShellProfile},...k({palette:e.palette,font:e.font,background:e.background,tint:e.tint})}}function ie(e){let t=n(e);return t===`start_directory_missing`?`terminal.startMissing`:t===`start_directory_not_a_directory`?`terminal.startNotADirectory`:t===`start_directory_unusable`?`terminal.startUnusable`:t===`terminal_limits_out_of_range`||t===`invalid_request`?`terminal.limitsOutOfRange`:`terminal.settingsSaveFailed`}function ae({api:e,showHeading:t,onSettingsChange:n}){let r=o(),[d,f]=(0,B.useState)(te),[p,m]=(0,B.useState)(!1),[h,g]=(0,B.useState)([]),_=K();(0,B.useEffect)(()=>{let t=!0;return e.terminalSettings().then(e=>{t&&f(ne(e))}).catch(()=>void 0).finally(()=>{t&&m(!0)}),e.localShellProfiles!==void 0&&e.localShellProfiles().then(e=>{t&&g(e.profiles)}).catch(()=>void 0),()=>{t=!1}},[e]);function v(e){f(t=>({...t,...e})),_.touch()}async function y(){let t=re(d);if(t===null){_.fail(r(`terminal.limitsOutOfRange`));return}await _.run(async()=>{await e.setTerminalSettings(t);try{await n?.(t)}catch{}},e=>r(ie(e)))}let b=_.busy;return(0,V.jsx)(U,{id:`settings-terminal`,label:r(`terminal.settingsHeading`),icon:`terminal`,showHeading:t,children:(0,V.jsxs)(`fieldset`,{disabled:!p||b,className:`min-w-0 border-0 p-0 disabled:opacity-70`,children:[(0,V.jsx)(`p`,{className:`mb-5 max-w-3xl text-sm leading-6 text-ink-muted`,children:r(`terminal.settingsStorageHint`)}),(0,V.jsxs)(`div`,{className:`grid gap-8 xl:grid-cols-[minmax(0,1fr)_19rem]`,children:[(0,V.jsxs)(`div`,{className:`grid min-w-0 gap-5 sm:grid-cols-2`,children:[(0,V.jsx)(`div`,{className:`sm:col-span-2`,children:(0,V.jsx)(c,{label:r(`terminal.startLabel`),hint:r(`terminal.startHint`),children:(0,V.jsx)(`input`,{type:`text`,className:s,value:d.startDirectory,spellCheck:!1,placeholder:`~/`,disabled:b,onChange:e=>v({startDirectory:e.target.value})})})}),(0,V.jsx)(`div`,{className:`sm:col-span-2`,children:(0,V.jsx)(c,{label:r(`terminal.localShellProfileLabel`),hint:r(`terminal.localShellProfileHint`),children:(0,V.jsxs)(`select`,{className:s,value:d.localShellProfile,disabled:b||h.length===0,onChange:e=>v({localShellProfile:e.target.value}),children:[(0,V.jsx)(`option`,{value:``,children:r(`terminal.localShellProfileSystem`)}),h.filter(e=>e.id!=="default").map(e=>(0,V.jsxs)(`option`,{value:e.id,children:[e.label,` — `,e.path]},e.id))]})})}),(0,V.jsx)(c,{label:r(`terminal.maxSessionsLabel`),hint:r(`terminal.maxSessionsHint`),children:(0,V.jsx)(`input`,{type:`number`,min:1,max:200,className:s,value:d.maxSessions,placeholder:`50`,disabled:b,onChange:e=>v({maxSessions:e.target.value})})}),(0,V.jsx)(c,{label:r(`terminal.scrollbackLabel`),hint:r(`terminal.scrollbackHint`),children:(0,V.jsx)(`input`,{type:`number`,min:16384,max:4194304,className:s,value:d.scrollback,placeholder:`262144`,disabled:b,onChange:e=>v({scrollback:e.target.value})})}),(0,V.jsx)(c,{label:r(`terminal.browserScrollbackLabel`),hint:r(`terminal.browserScrollbackHint`),children:(0,V.jsx)(`input`,{type:`number`,min:1e3,max:1e5,className:s,value:d.browserScrollbackLines,placeholder:`5000`,disabled:b,onChange:e=>v({browserScrollbackLines:e.target.value})})}),(0,V.jsx)(c,{label:r(`terminal.verbosityLabel`),hint:r(`terminal.verbosityHint`),children:(0,V.jsxs)(`select`,{className:s,value:d.verbosity,disabled:b,onChange:e=>v({verbosity:e.target.value}),children:[(0,V.jsx)(`option`,{value:`0`,children:r(`terminal.verbosityQuiet`)}),(0,V.jsx)(`option`,{value:`1`,children:r(`terminal.verbosityBrief`)}),(0,V.jsx)(`option`,{value:`2`,children:r(`terminal.verbosityDetailed`)}),(0,V.jsx)(`option`,{value:`3`,children:r(`terminal.verbosityFull`)})]})}),(0,V.jsx)(c,{label:r(`terminal.reconnectLabel`),hint:r(`terminal.reconnectHint`),children:(0,V.jsxs)(`select`,{className:s,value:d.reconnect,disabled:b,onChange:e=>v({reconnect:e.target.value}),children:[(0,V.jsx)(`option`,{value:``,children:r(`terminal.reconnectDefault`)}),(0,V.jsx)(`option`,{value:`0`,children:r(`terminal.reconnectNever`)}),(0,V.jsx)(`option`,{value:`1`,children:r(`terminal.reconnectOnce`)}),(0,V.jsx)(`option`,{value:`2`,children:r(`terminal.reconnectTwice`)}),(0,V.jsx)(`option`,{value:`3`,children:r(`terminal.reconnectThrice`)}),(0,V.jsx)(`option`,{value:`5`,children:r(`terminal.reconnectFive`)})]})}),(0,V.jsx)(c,{label:r(`terminal.paletteLabel`),hint:r(`terminal.paletteHint`),children:(0,V.jsx)(P,{choices:F,value:d.palette,onChange:e=>v({palette:e}),unchosen:r(`terminal.paletteFollowsTheme`)})}),(0,V.jsx)(c,{label:r(`terminal.fontLabel`),hint:r(`terminal.fontHint`),children:(0,V.jsx)(P,{choices:I,value:d.font,onChange:e=>v({font:e}),unchosen:r(`terminal.fontFollowsSystem`)})}),(0,V.jsx)(c,{label:r(`terminal.fontSizeLabel`),hint:r(`terminal.fontSizeHint`),children:(0,V.jsx)(`input`,{type:`number`,min:8,max:32,className:s,value:d.fontSize,placeholder:`15 / 13`,disabled:b,onChange:e=>v({fontSize:e.target.value})})}),(0,V.jsx)(`div`,{className:`sm:col-span-2`,children:(0,V.jsx)(c,{label:r(`terminal.backgroundLabel`),hint:r(`terminal.backgroundHint`),interactiveChildren:!0,children:(0,V.jsx)(N,{value:d.background,onChange:e=>v({background:e}),tint:d.tint,onTintChange:e=>v({tint:e}),unchosen:r(`terminal.backgroundNone`)})})}),[[`copyOnSelect`,`terminal.copyOnSelectLabel`,`terminal.copyOnSelectHint`],[`osc52`,`terminal.osc52DefaultLabel`,`terminal.osc52DefaultHint`],[`jisYenBackslash`,`terminal.jisYenBackslashLabel`,`terminal.jisYenBackslashHint`],[`rightClickPaste`,`terminal.rightClickPasteLabel`,`terminal.rightClickPasteHint`],[`webgl`,`terminal.webglLabel`,`terminal.webglHint`]].map(([e,t,n])=>(0,V.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-select-fill p-3`,children:[(0,V.jsx)(u,{label:r(t),checked:d[e],disabled:b,onChange:t=>v({[e]:t})}),(0,V.jsx)(`p`,{className:l,children:r(n)})]},e))]}),(0,V.jsx)(`div`,{className:`self-start xl:sticky xl:top-6`,children:(0,V.jsx)(Q,{palette:d.palette,font:d.font,background:d.background,tint:d.tint,fontSize:d.fontSize})})]}),(0,V.jsx)(W,{status:_.error===``?p?_.saved?(0,V.jsx)(`p`,{role:`status`,className:`text-sm text-live`,children:r(`terminal.settingsSaved`)}):void 0:(0,V.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:r(`terminal.settingsLoading`)}):(0,V.jsx)(i,{tone:`danger`,children:_.error}),children:(0,V.jsx)(a,{kind:`primary`,disabled:b,onClick:()=>void y(),children:r(`terminal.startSave`)})})]})})}var oe={...A,...S},se=`[&_button]:min-h-10 [&_a]:inline-flex [&_a]:min-h-10 [&_a]:items-center md:[&_button]:min-h-0 md:[&_a]:min-h-0`;function ce({api:e=oe,page:t=`All`,consoles:n,onVaultChanged:i,onTerminalSettingsChange:a}){let s=o(),c=t===`All`,l=e=>c||t===e,u=c?`settings.heading`:E[t].label,d=c?`settings.pageDescription`:E[t].description;return(0,V.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6 ${se}`,children:[(0,V.jsx)(z,{title:s(u),description:s(d)}),(0,V.jsxs)(r,{radius:`md`,children:[l(`Shortcuts`)?(0,V.jsx)(U,{id:`settings-shortcuts`,label:s(`shortcuts.heading`),icon:`settings`,showHeading:c,children:(0,V.jsx)(H,{})}):null,l(`Engine`)?(0,V.jsx)(J,{api:e,showHeading:c}):null,l(`Terminal`)?(0,V.jsx)(ae,{api:e,showHeading:c,onSettingsChange:a}):null,l(`Notifications`)?(0,V.jsx)(Z,{showHeading:c}):null,n!==void 0&&l(`Connections`)?(0,V.jsx)(G,{consoles:n,showHeading:c}):null,l(`Password`)?(0,V.jsx)(X,{api:e,showHeading:c,onVaultChanged:i}):null]})]})}export{ce as SettingsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SnippetsPanel-DGx5bdAa.js b/internal/ui/dist/assets/SnippetsPanel-DGx5bdAa.js deleted file mode 100644 index 2765d2feb..000000000 --- a/internal/ui/dist/assets/SnippetsPanel-DGx5bdAa.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,t as r}from"./surface-Ck_FblzE.js";import{_ as i}from"./form-C1olpQVF.js";import{Q as a,y as o}from"./index-DJ8h9zNi.js";var s=e(),c=t();function l(e){return[...new Set([...e.matchAll(/\{\{([A-Za-z_][A-Za-z0-9_]{0,63})\}\}/g)].map(e=>e[1]??``).filter(Boolean))]}function u(e,t){let n=new Map(t.map(e=>[e.name,e]));return l(e).map(e=>n.get(e)??{name:e,type:`string`,required:!0})}function d(e){switch(e){case`string`:return`snippets.variableType.string`;case`integer`:return`snippets.variableType.integer`;case`boolean`:return`snippets.variableType.boolean`;case`secret`:return`snippets.variableType.secret`;default:return`snippets.variableType.unknown`}}function f(e){switch(e){case`running`:return`snippets.status.running`;case`completed`:return`snippets.status.completed`;case`cancelled`:return`snippets.status.cancelled`;case`queued`:return`snippets.status.queued`;case`succeeded`:return`snippets.status.succeeded`;case`failed`:return`snippets.status.failed`;default:return`snippets.status.unknown`}}var p={name:``,description:``,command:``,variables:[]};function m({aliases:e,selectedSnippetId:t=null}){let l=i(),[m,h]=(0,s.useState)([]),[g,_]=(0,s.useState)(null),[v,y]=(0,s.useState)(p),[b,x]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[w,T]=(0,s.useState)(null),[E,D]=(0,s.useState)(null),[O,k]=(0,s.useState)(e[0]??``),[A,j]=(0,s.useState)(``),[M,N]=(0,s.useState)(!1),P=(0,s.useMemo)(()=>m.find(e=>e.id===g)??null,[m,g]);async function F(){let e=await o.library();h(e.snippets)}(0,s.useEffect)(()=>{F().catch(e=>j(n(e)||`snippet_failed`))},[]),(0,s.useEffect)(()=>{if(t===null)return;let e=m.find(e=>e.id===t);e!==void 0&&g!==e.id&&I(e)},[g,t,m]),(0,s.useEffect)(()=>{if(E?.status!==`running`)return;let e=window.setInterval(()=>{o.job(E.id).then(D).catch(()=>void 0)},600);return()=>window.clearInterval(e)},[E]);function I(e){_(e?.id??null),y(e===null?p:{name:e.name,description:e.description??``,command:e.command,variables:e.variables}),C({}),T(null),D(null),j(``)}async function L(){N(!0),j(``);try{let e={...v,variables:u(v.command,v.variables)},t=g===null?await o.create(e):await o.update(g,e);await F(),I(t)}catch(e){j(n(e)||`snippet_failed`)}finally{N(!1)}}async function R(){if(!(g===null||b.length===0)){N(!0),j(``),D(null);try{T(await o.preview(g,b,S))}catch(e){j(n(e)||`snippet_failed`)}finally{N(!1)}}}async function z(){if(w!==null){N(!0),j(``);try{D(await o.start(w,b,S)),T(null)}catch(e){j(n(e)||`snippet_failed`)}finally{N(!1)}}}function B(e,t){y({...v,variables:u(v.command,v.variables).map(n=>n.name===e?{...n,...t}:n)}),T(null)}async function V(){if(P!==null){N(!0),j(``);try{await o.remove(P.id),I(null),await F()}catch(e){j(n(e)||`snippet_failed`)}finally{N(!1)}}}async function H(e){if(O!==``){N(!0),j(``);try{await o.setStartup(O,e,e===``?{}:S),await F()}catch(e){j(n(e)||`snippet_failed`)}finally{N(!1)}}}return(0,c.jsxs)(`section`,{className:`grid min-h-full min-w-0 content-start gap-4 xl:grid-cols-[16rem_minmax(0,1fr)_minmax(0,0.8fr)]`,"aria-labelledby":`snippets-heading`,children:[(0,c.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,c.jsxs)(`div`,{className:`flex items-center`,children:[(0,c.jsx)(`h2`,{id:`snippets-heading`,className:`grow font-medium`,children:l(`snippets.heading`)}),(0,c.jsx)(r,{onClick:()=>I(null),children:l(`snippets.new`)})]}),(0,c.jsxs)(`select`,{"aria-label":l(`snippets.heading`),value:g??``,onChange:e=>I(m.find(t=>t.id===e.target.value)??null),className:`w-full rounded border border-control-line bg-control px-3 py-2 text-sm xl:hidden`,children:[(0,c.jsx)(`option`,{value:``,children:l(`snippets.new`)}),m.map(e=>(0,c.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,c.jsxs)(`div`,{className:`hidden flex-col gap-1 xl:flex`,children:[m.map(e=>(0,c.jsxs)(`button`,{type:`button`,onClick:()=>I(e),className:`rounded-md px-3 py-2 text-left text-sm ${g===e.id?`bg-select-fill`:`hover:bg-select-fill`}`,children:[(0,c.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,c.jsx)(`code`,{className:`block truncate text-xs text-ink-muted`,children:e.command})]},e.id)),m.length===0?(0,c.jsx)(`p`,{className:`text-sm text-ink-muted`,children:l(`snippets.empty`)}):null]})]}),(0,c.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-line bg-card p-4`,children:[A===``?null:(0,c.jsx)(`p`,{role:`alert`,className:`rounded bg-notice px-3 py-2 text-sm text-notice-ink`,children:A}),(0,c.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[l(`snippets.name`),(0,c.jsx)(`input`,{value:v.name,onChange:e=>y({...v,name:e.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]}),(0,c.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[l(`snippets.description`),(0,c.jsx)(`input`,{value:v.description,onChange:e=>y({...v,description:e.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]}),(0,c.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[l(`snippets.command`),(0,c.jsx)(`textarea`,{rows:7,value:v.command,onChange:e=>{y({...v,command:e.target.value}),T(null)},className:`mt-1 block w-full rounded border border-control-line bg-control p-2 font-mono text-sm`})]}),(0,c.jsx)(`p`,{className:`text-xs text-ink-muted`,children:l(`snippets.variableHint`)}),u(v.command,v.variables).map(e=>(0,c.jsxs)(`div`,{className:`grid min-w-0 grid-cols-1 gap-2 sm:grid-cols-[8rem_minmax(0,1fr)]`,children:[(0,c.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[(0,c.jsx)(`code`,{children:`{{${e.name}}}`}),(0,c.jsx)(`select`,{"aria-label":l(`snippets.variableType`),value:e.type,onChange:t=>B(e.name,{type:t.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[`string`,`integer`,`boolean`,`secret`].map(e=>(0,c.jsx)(`option`,{value:e,children:l(d(e))},e))})]}),e.type===`secret`?(0,c.jsxs)(`div`,{className:`text-xs text-ink-muted`,children:[l(`snippets.value`),(0,c.jsx)(a,{label:`${e.name} · ${l(`snippets.value`)}`,value:S[e.name]??``,onChange:t=>{C({...S,[e.name]:t}),T(null)},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]}):(0,c.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[l(`snippets.value`),e.type===`boolean`?(0,c.jsxs)(`select`,{value:S[e.name]??``,onChange:t=>{C({...S,[e.name]:t.target.value}),T(null)},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[(0,c.jsx)(`option`,{value:``}),(0,c.jsx)(`option`,{value:`true`,children:`true`}),(0,c.jsx)(`option`,{value:`false`,children:`false`})]}):(0,c.jsx)(`input`,{type:e.type===`integer`?`number`:`text`,value:S[e.name]??``,onChange:t=>{C({...S,[e.name]:t.target.value}),T(null)},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]})]},e.name)),(0,c.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,c.jsx)(r,{kind:`primary`,disabled:M||v.name.trim()===``||v.command===``,onClick:()=>void L(),children:l(`snippets.save`)}),P===null?null:(0,c.jsx)(r,{disabled:M,onClick:()=>void V(),children:l(`snippets.delete`)})]})]}),(0,c.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,c.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-4`,children:[(0,c.jsx)(`h3`,{className:`text-sm font-medium`,children:l(`snippets.targets`)}),(0,c.jsx)(`div`,{className:`mt-2 grid max-h-40 grid-cols-1 gap-1 overflow-auto sm:grid-cols-2`,children:e.map(e=>(0,c.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 break-all text-sm`,children:[(0,c.jsx)(`input`,{type:`checkbox`,checked:b.includes(e),onChange:t=>{x(t.target.checked?[...b,e]:b.filter(t=>t!==e)),T(null)}}),e]},e))}),(0,c.jsx)(r,{className:`mt-3`,disabled:M||g===null||b.length===0,onClick:()=>void R(),children:l(`snippets.preview`)})]}),w===null?null:(0,c.jsxs)(`section`,{className:`min-w-0 rounded-lg border border-notice-line bg-notice p-4`,children:[(0,c.jsx)(`h3`,{className:`text-sm font-medium`,children:l(`snippets.confirm`)}),w.targets.map(e=>(0,c.jsxs)(`div`,{className:`mt-2`,children:[(0,c.jsxs)(`p`,{className:`text-xs font-medium`,children:[e.target.alias,` · `,e.target.user,`@`,e.target.hostName,`:`,e.target.port]}),(e.target.route??[]).map((e,t)=>(0,c.jsxs)(`p`,{className:`mt-1 break-all text-xs text-notice-ink`,children:[t+1,`. `,e.user,`@`,e.hostName,`:`,e.port,e.proxyCommand===``?``:` · ProxyCommand: ${e.proxyCommand}`]},`${e.alias}-${t}`)),(0,c.jsx)(`pre`,{className:`mt-1 overflow-auto rounded bg-code-bg p-2 text-code-fg text-xs`,children:e.command})]},e.targetId)),(0,c.jsx)(r,{kind:`primary`,className:`mt-3`,disabled:M,onClick:()=>void z(),children:l(`snippets.run`)})]}),E===null?null:(0,c.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-4`,children:[(0,c.jsxs)(`div`,{className:`flex items-center`,children:[(0,c.jsxs)(`h3`,{className:`grow text-sm font-medium`,children:[l(`snippets.results`),` · `,l(f(E.status))]}),E.status===`running`?(0,c.jsx)(r,{onClick:()=>void o.cancel(E.id).then(D),children:l(`snippets.cancel`)}):null]}),E.results.map(e=>(0,c.jsxs)(`div`,{className:`mt-3`,children:[(0,c.jsxs)(`p`,{className:`text-xs font-medium`,children:[e.alias,` · `,l(f(e.status)),e.exitCode===void 0?``:` (${e.exitCode})`]}),e.stdout?(0,c.jsx)(`pre`,{className:`mt-1 max-h-40 overflow-auto rounded bg-code-bg p-2 text-code-fg text-xs`,children:e.stdout}):null,e.stderr?(0,c.jsx)(`pre`,{className:`mt-1 max-h-40 overflow-auto rounded bg-danger/10 p-2 text-xs text-danger`,children:e.stderr}):null]},e.targetId))]}),(0,c.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-4`,children:[(0,c.jsx)(`h3`,{className:`text-sm font-medium`,children:l(`snippets.startup`)}),(0,c.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:l(`snippets.startupHint`)}),(0,c.jsx)(`select`,{value:O,onChange:e=>k(e.target.value),className:`mt-2 w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:e.map(e=>(0,c.jsx)(`option`,{children:e},e))}),(0,c.jsx)(r,{className:`mt-2`,disabled:M||g===null||O===``,onClick:()=>g===null?void 0:void H(g),children:l(`snippets.setStartup`)}),(0,c.jsx)(`button`,{disabled:M||O===``,className:`ml-2 text-xs text-ink-muted disabled:opacity-50`,onClick:()=>void H(``),children:l(`snippets.clearStartup`)})]})]})]})}export{m as SnippetsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SnippetsPanel-DhbUOOt2.js b/internal/ui/dist/assets/SnippetsPanel-DhbUOOt2.js new file mode 100644 index 000000000..2fc53f8e5 --- /dev/null +++ b/internal/ui/dist/assets/SnippetsPanel-DhbUOOt2.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{r as n,t as r,y as i}from"./surface-DPFJ-mE2.js";import{_ as a}from"./form-zbLY2cuV.js";import{S as o,q as s,rt as c,yt as l}from"./index-DtC-pXtZ.js";var u=e(),d=t(),f=600;function p(e){return[...new Set([...e.matchAll(/\{\{([A-Za-z_][A-Za-z0-9_]{0,63})\}\}/g)].map(e=>e[1]??``).filter(Boolean))]}function m(e,t){let n=new Map(t.map(e=>[e.name,e]));return p(e).map(e=>n.get(e)??{name:e,type:`string`,required:!0})}function h(e){switch(e){case`string`:return`snippets.variableType.string`;case`integer`:return`snippets.variableType.integer`;case`boolean`:return`snippets.variableType.boolean`;case`secret`:return`snippets.variableType.secret`;default:return`snippets.variableType.unknown`}}function g(e){switch(e){case`running`:return`snippets.status.running`;case`completed`:return`snippets.status.completed`;case`cancelled`:return`snippets.status.cancelled`;case`queued`:return`snippets.status.queued`;case`succeeded`:return`snippets.status.succeeded`;case`failed`:return`snippets.status.failed`;default:return`snippets.status.unknown`}}var _={name:``,description:``,command:``,variables:[]};function v({aliases:e,selectedSnippetId:t=null}){let p=a(),[v,y]=(0,u.useState)([]),[b,x]=(0,u.useState)(null),[S,C]=(0,u.useState)(_),[w,T]=(0,u.useState)([]),[E,D]=(0,u.useState)({}),[O,k]=(0,u.useState)(null),[A,j]=(0,u.useState)(null),[M,N]=(0,u.useState)(e[0]??``),[P,F]=(0,u.useState)(``),[I,L]=(0,u.useState)(!1),[R,z]=(0,u.useState)(!1),B=(0,u.useMemo)(()=>v.find(e=>e.id===b)??null,[v,b]);async function V(){let e=await o.library();y(e.snippets)}(0,u.useEffect)(()=>{V().catch(e=>F(i(e)||`snippet_failed`))},[]),(0,u.useEffect)(()=>{if(t===null)return;let e=v.find(e=>e.id===t);e!==void 0&&b!==e.id&&H(e)},[b,t,v]),l(async()=>{A!==null&&j(await o.job(A.id))},{intervalMs:f,enabled:A?.status===`running`,whileHidden:!0});function H(e){x(e?.id??null),C(e===null?_:{name:e.name,description:e.description??``,command:e.command,variables:e.variables}),D({}),k(null),j(null),F(``)}async function U(){L(!0),F(``);try{let e={...S,variables:m(S.command,S.variables)},t=b===null?await o.create(e):await o.update(b,e);await V(),H(t)}catch(e){F(i(e)||`snippet_failed`)}finally{L(!1)}}async function W(){if(!(b===null||w.length===0)){L(!0),F(``),j(null);try{k(await o.preview(b,w,E))}catch(e){F(i(e)||`snippet_failed`)}finally{L(!1)}}}async function G(){if(O!==null){L(!0),F(``);try{j(await o.start(O,w,E)),k(null)}catch(e){F(i(e)||`snippet_failed`)}finally{L(!1)}}}function K(e,t){C({...S,variables:m(S.command,S.variables).map(n=>n.name===e?{...n,...t}:n)}),k(null)}async function q(){if(B!==null){L(!0),F(``);try{await o.remove(B.id),H(null),await V()}catch(e){F(i(e)||`snippet_failed`)}finally{L(!1)}}}async function J(e){if(M!==``){L(!0),F(``);try{await o.setStartup(M,e,e===``?{}:E),await V()}catch(e){F(i(e)||`snippet_failed`)}finally{L(!1)}}}return(0,d.jsxs)(`section`,{className:`grid min-h-full min-w-0 content-start gap-4 xl:grid-cols-[16rem_minmax(0,1fr)_minmax(0,0.8fr)]`,"aria-labelledby":`snippets-heading`,children:[(0,d.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,d.jsxs)(`div`,{className:`flex items-center`,children:[(0,d.jsx)(`h2`,{id:`snippets-heading`,className:`grow font-medium`,children:p(`snippets.heading`)}),(0,d.jsx)(r,{onClick:()=>H(null),children:p(`snippets.new`)})]}),(0,d.jsxs)(`select`,{"aria-label":p(`snippets.heading`),value:b??``,onChange:e=>H(v.find(t=>t.id===e.target.value)??null),className:`w-full rounded border border-control-line bg-control px-3 py-2 text-sm xl:hidden`,children:[(0,d.jsx)(`option`,{value:``,children:p(`snippets.new`)}),v.map(e=>(0,d.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,d.jsxs)(`div`,{className:`hidden flex-col gap-1 xl:flex`,children:[v.map(e=>(0,d.jsxs)(`button`,{type:`button`,onClick:()=>H(e),className:`rounded-md px-3 py-2 text-left text-sm ${b===e.id?`bg-select-fill`:`hover:bg-select-fill`}`,children:[(0,d.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,d.jsx)(`code`,{className:`block truncate text-xs text-ink-muted`,children:e.command})]},e.id)),v.length===0?(0,d.jsx)(`p`,{className:`text-sm text-ink-muted`,children:p(`snippets.empty`)}):null]})]}),(0,d.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-line bg-card p-4`,children:[P===``?null:(0,d.jsx)(n,{tone:`danger`,children:P}),(0,d.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[p(`snippets.name`),(0,d.jsx)(`input`,{value:S.name,onChange:e=>C({...S,name:e.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]}),(0,d.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[p(`snippets.description`),(0,d.jsx)(`input`,{value:S.description,onChange:e=>C({...S,description:e.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]}),(0,d.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[p(`snippets.command`),(0,d.jsx)(`textarea`,{rows:7,value:S.command,onChange:e=>{C({...S,command:e.target.value}),k(null)},className:`mt-1 block w-full rounded border border-control-line bg-control p-2 font-mono text-sm`})]}),(0,d.jsx)(`p`,{className:`text-xs text-ink-muted`,children:p(`snippets.variableHint`)}),m(S.command,S.variables).map(e=>(0,d.jsxs)(`div`,{className:`grid min-w-0 grid-cols-1 gap-2 sm:grid-cols-[8rem_minmax(0,1fr)]`,children:[(0,d.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[(0,d.jsx)(`code`,{children:`{{${e.name}}}`}),(0,d.jsx)(`select`,{"aria-label":p(`snippets.variableType`),value:e.type,onChange:t=>K(e.name,{type:t.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[`string`,`integer`,`boolean`,`secret`].map(e=>(0,d.jsx)(`option`,{value:e,children:p(h(e))},e))})]}),e.type===`secret`?(0,d.jsxs)(`div`,{className:`text-xs text-ink-muted`,children:[p(`snippets.value`),(0,d.jsx)(c,{label:`${e.name} · ${p(`snippets.value`)}`,value:E[e.name]??``,onChange:t=>{D({...E,[e.name]:t}),k(null)},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]}):(0,d.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[p(`snippets.value`),e.type===`boolean`?(0,d.jsxs)(`select`,{value:E[e.name]??``,onChange:t=>{D({...E,[e.name]:t.target.value}),k(null)},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[(0,d.jsx)(`option`,{value:``}),(0,d.jsx)(`option`,{value:`true`,children:`true`}),(0,d.jsx)(`option`,{value:`false`,children:`false`})]}):(0,d.jsx)(`input`,{type:e.type===`integer`?`number`:`text`,value:E[e.name]??``,onChange:t=>{D({...E,[e.name]:t.target.value}),k(null)},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]})]},e.name)),(0,d.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,d.jsx)(r,{kind:`primary`,disabled:I||S.name.trim()===``||S.command===``,onClick:()=>void U(),children:p(`snippets.save`)}),B===null?null:(0,d.jsx)(r,{disabled:I,onClick:()=>z(!0),children:p(`snippets.delete`)})]})]}),(0,d.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,d.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-4`,children:[(0,d.jsx)(`h3`,{className:`text-sm font-medium`,children:p(`snippets.targets`)}),(0,d.jsx)(`div`,{className:`mt-2 grid max-h-40 grid-cols-1 gap-1 overflow-auto sm:grid-cols-2`,children:e.map(e=>(0,d.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 break-all text-sm`,children:[(0,d.jsx)(`input`,{type:`checkbox`,checked:w.includes(e),onChange:t=>{T(t.target.checked?[...w,e]:w.filter(t=>t!==e)),k(null)}}),e]},e))}),(0,d.jsx)(r,{className:`mt-3`,disabled:I||b===null||w.length===0,onClick:()=>void W(),children:p(`snippets.preview`)})]}),O===null?null:(0,d.jsxs)(`section`,{className:`min-w-0 rounded-lg border border-notice-line bg-notice p-4`,children:[(0,d.jsx)(`h3`,{className:`text-sm font-medium`,children:p(`snippets.confirm`)}),O.targets.map(e=>(0,d.jsxs)(`div`,{className:`mt-2`,children:[(0,d.jsxs)(`p`,{className:`text-xs font-medium`,children:[e.target.alias,` · `,e.target.user,`@`,e.target.hostName,`:`,e.target.port]}),(e.target.route??[]).map((e,t)=>(0,d.jsxs)(`p`,{className:`mt-1 break-all text-xs text-notice-ink`,children:[t+1,`. `,e.user,`@`,e.hostName,`:`,e.port,e.proxyCommand===``?``:` · ProxyCommand: ${e.proxyCommand}`]},`${e.alias}-${t}`)),(0,d.jsx)(`pre`,{className:`mt-1 overflow-auto rounded bg-code-bg p-2 text-code-fg text-xs`,children:e.command})]},e.targetId)),(0,d.jsx)(r,{kind:`primary`,className:`mt-3`,disabled:I,onClick:()=>void G(),children:p(`snippets.run`)})]}),A===null?null:(0,d.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center`,children:[(0,d.jsxs)(`h3`,{className:`grow text-sm font-medium`,children:[p(`snippets.results`),` · `,p(g(A.status))]}),A.status===`running`?(0,d.jsx)(r,{onClick:()=>void o.cancel(A.id).then(j),children:p(`snippets.cancel`)}):null]}),A.results.map(e=>(0,d.jsxs)(`div`,{className:`mt-3`,children:[(0,d.jsxs)(`p`,{className:`text-xs font-medium`,children:[e.alias,` · `,p(g(e.status)),e.exitCode===void 0?``:` (${e.exitCode})`]}),e.stdout?(0,d.jsx)(`pre`,{className:`mt-1 max-h-40 overflow-auto rounded bg-code-bg p-2 text-code-fg text-xs`,children:e.stdout}):null,e.stderr?(0,d.jsx)(`pre`,{className:`mt-1 max-h-40 overflow-auto rounded bg-danger/10 p-2 text-xs text-danger`,children:e.stderr}):null]},e.targetId))]}),(0,d.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-4`,children:[(0,d.jsx)(`h3`,{className:`text-sm font-medium`,children:p(`snippets.startup`)}),(0,d.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:p(`snippets.startupHint`)}),(0,d.jsx)(`select`,{value:M,onChange:e=>N(e.target.value),className:`mt-2 w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:e.map(e=>(0,d.jsx)(`option`,{children:e},e))}),(0,d.jsx)(r,{className:`mt-2`,disabled:I||b===null||M===``,onClick:()=>b===null?void 0:void J(b),children:p(`snippets.setStartup`)}),(0,d.jsx)(`button`,{disabled:I||M===``,className:`ml-2 text-xs text-ink-muted disabled:opacity-50`,onClick:()=>void J(``),children:p(`snippets.clearStartup`)})]})]}),R&&B!==null?(0,d.jsx)(s,{id:`snippet-delete-heading`,heading:p(`snippets.deleteHeading`,{name:B.name}),body:(0,d.jsx)(`p`,{className:`text-sm text-ink-muted`,children:p(`snippets.deleteBody`)}),confirmLabel:p(`snippets.confirmDelete`),cancelLabel:p(`snippets.deleteCancel`),onCancel:()=>z(!1),onConfirm:()=>{z(!1),q()}}):null]})}export{v as SnippetsPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SyncPanel-9DIuhm2Y.js b/internal/ui/dist/assets/SyncPanel-9DIuhm2Y.js deleted file mode 100644 index c6b5ca314..000000000 --- a/internal/ui/dist/assets/SyncPanel-9DIuhm2Y.js +++ /dev/null @@ -1,3 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,n as r,r as i,t as a}from"./surface-Ck_FblzE.js";import{_ as o,f as s,g as c,i as l,n as u,s as d,t as f}from"./form-C1olpQVF.js";import{J as p,Q as m,U as h,Z as g,et as _,p as v,v as y}from"./index-DJ8h9zNi.js";import{r as b}from"./page-CiAVS9qS.js";var x=e(),S=t();function C(e,t){let n=[`B`,`kB`,`MB`,`GB`,`TB`],r=e,i=0;for(;r>=1e3&&i{let e=g.trim().toLocaleLowerCase();return(s?.candidates??[]).filter(t=>e===``||t.path.toLocaleLowerCase().includes(e))},[g,s]),A=(s?.candidates??[]).reduce((e,t)=>e+(v[t.path]??t.ignored?1:0),0),j=(s?.candidates??[]).some(e=>(v[e.path]??e.ignored)&&(e.path===`config`||e.path.startsWith(`connections/`)||e.path.startsWith(`keys/`)));return(0,S.jsxs)(`details`,{className:`group overflow-hidden rounded-md border border-control-line bg-card`,onToggle:e=>{e.currentTarget.open&&E()},children:[(0,S.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 bg-toolbar px-4 py-3 marker:hidden hover:bg-select-fill`,children:[(0,S.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3 text-sm font-medium text-ink`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex size-5 shrink-0 items-center justify-center text-base text-ink-muted transition-transform group-open:rotate-90`,children:`›`}),o(`sync.exclusions.heading`)]}),(0,S.jsx)(`span`,{className:d,children:m?o(`sync.exclusions.summary`,{included:(s?.candidates.length??0)-A,ignored:A}):o(`sync.exclusions.open`)})]}),(0,S.jsx)(`div`,{className:`flex flex-col gap-4 border-t border-line p-4`,children:b&&!m?(0,S.jsx)(`p`,{role:`status`,className:d,children:o(`sync.exclusions.loading`)}):w===``?s===null?null:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:o(`sync.exclusions.hint`)}),s.usingDefaults?(0,S.jsx)(`p`,{className:`mt-1 ${d}`,children:o(`sync.exclusions.defaults`)}):null]}),(0,S.jsx)(`input`,{type:`search`,value:g,onChange:e=>_(e.target.value),className:l,placeholder:o(`sync.exclusions.search`)}),(0,S.jsx)(`div`,{className:`max-h-64 overflow-auto rounded-md border border-hairline`,children:k.length===0?(0,S.jsx)(`p`,{className:`px-3 py-4 text-sm text-ink-muted`,children:o(`sync.exclusions.empty`)}):k.map(e=>{let t=v[e.path]??e.ignored;return(0,S.jsxs)(`label`,{className:`flex min-h-10 items-center gap-3 border-t border-hairline px-3 py-2 first:border-t-0 hover:bg-select-fill`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:!t,onChange:()=>{let n=!t;y(t=>({...t,[e.path]:n})),p(t=>O(t,`${n?``:`!`}${D(e.path)}`))}}),(0,S.jsx)(`span`,{className:`min-w-0 break-all font-mono text-xs text-ink`,children:e.path})]},e.path)})}),j?(0,S.jsx)(i,{tone:`danger`,children:o(`sync.exclusions.sensitiveWarning`)}):null,(0,S.jsxs)(`details`,{className:`rounded-md border border-hairline bg-surface-subtle`,children:[(0,S.jsx)(`summary`,{className:`cursor-pointer px-3 py-2 text-sm font-medium text-ink`,children:o(`sync.exclusions.advanced`)}),(0,S.jsxs)(`div`,{className:`border-t border-hairline p-3`,children:[(0,S.jsx)(`textarea`,{value:f,onChange:e=>p(e.target.value),rows:12,spellCheck:!1,className:`${l} min-h-52 resize-y font-mono text-xs`,"aria-label":o(`sync.exclusions.rules`)}),(0,S.jsx)(`p`,{className:`mt-2 ${d}`,children:o(`sync.exclusions.syntax`)})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,S.jsx)(a,{kind:`primary`,disabled:b||f===s.document,onClick:()=>{C(!0),T(``),e.saveSyncExclusions(f).then(e=>{u(e),p(e.document),y({}),r?.(e)}).catch(e=>{T(n(e)===`sync_ignore_invalid`?o(`sync.exclusions.invalid`):o(`sync.exclusions.saveFailed`))}).finally(()=>C(!1))},children:o(`sync.exclusions.save`)}),(0,S.jsx)(`span`,{className:d,children:o(`sync.exclusions.shared`)})]})]}):(0,S.jsx)(i,{tone:`danger`,children:w})})]})}var A={endpoint:``,bucket:``,path:``,region:``,accessKeyId:``,secretAccessKey:``,direction:`both`,setupCheck:null,ownKey:``,chooseOwn:!1,confirmHistoryLoss:!1,editingSettings:!1,settingsOpen:!1};function j(){let[e,t]=(0,x.useState)(A);function n(e,n){t(t=>({...t,[e]:n}))}(0,x.useEffect)(()=>{t(e=>e.setupCheck===null?e:{...e,setupCheck:null})},[e.endpoint,e.bucket,e.path,e.region,e.accessKeyId,e.secretAccessKey]);function r(e){t(t=>({...t,endpoint:e.endpoint??``,bucket:e.bucket??``,path:e.path??``,region:e.region??``,direction:e.direction,accessKeyId:``,secretAccessKey:``,setupCheck:null,editingSettings:!0,settingsOpen:!0}))}let i={endpoint:e.endpoint,bucket:e.bucket,path:e.path,region:e.region,accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,reuseCredentials:!1};return{...e,setupInput:i,editSettings:r,setEndpoint:e=>n(`endpoint`,e),setBucket:e=>n(`bucket`,e),setPath:e=>n(`path`,e),setRegion:e=>n(`region`,e),setAccessKeyId:e=>n(`accessKeyId`,e),setSecretAccessKey:e=>n(`secretAccessKey`,e),setDirection:e=>n(`direction`,e),setSetupCheck:e=>n(`setupCheck`,e),setOwnKey:e=>n(`ownKey`,e),setChooseOwn:e=>n(`chooseOwn`,e),setConfirmHistoryLoss:e=>n(`confirmHistoryLoss`,e),setEditingSettings:e=>n(`editingSettings`,e),setSettingsOpen:e=>n(`settingsOpen`,e)}}function ee(e,t){let[n,r]=(0,x.useState)({phase:`idle`}),[i,a]=(0,x.useState)({phase:`idle`}),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)(``),m=(0,x.useRef)(!1);return{bucketState:n,historyState:i,selectedHistoryKey:o,bucketHistoryExpanded:c,pushDraft:u,pushMessage:f,refreshBucket:(0,x.useCallback)(async()=>{r({phase:`loading`});try{r({phase:`ready`,value:await e.syncBucketStatus()})}catch{r({phase:`error`,message:t(`sync.bucketStatusFailed`)})}},[e,t]),refreshHistory:(0,x.useCallback)(async()=>{a({phase:`loading`});try{let t=await e.syncHistory();a({phase:`ready`,value:t}),s(e=>e!==null&&t.revisions.some(t=>t.key===e)?e:null)}catch{a({phase:`error`,message:t(`sync.historyFailed`)})}},[e,t]),refreshPushDraft:(0,x.useCallback)(async()=>{try{let t=await e.syncPushDraft();d(t),m.current||p(t.message)}catch{d(null)}},[e]),resetBucket:(0,x.useCallback)(()=>r({phase:`idle`}),[]),resetHistory:(0,x.useCallback)(()=>a({phase:`idle`}),[]),resetPush:(0,x.useCallback)(()=>{d(null),p(``),m.current=!1},[]),selectHistory:e=>s(e),toggleBucketHistory:()=>l(e=>!e),editPushMessage:e=>{m.current=!0,p(e)},acceptPushMessage:()=>{m.current=!1}}}function te(e,t){let[r,i]=(0,x.useState)(null),[a,o]=(0,x.useState)(``),[s,c]=(0,x.useState)(``),[l,u]=(0,x.useState)(``),[d,f]=(0,x.useState)(!1),p=(0,x.useCallback)(()=>{c(``),u(``)},[]);async function m(r,i,a,s,l){p(),o(``),f(!0);try{i(await r())}catch(r){let i=n(r);if(l!==void 0&&await l(i))return;let o=t[i];u(i),c(s?.(i)||(o===void 0?a:e(o)))}finally{f(!1)}}return{resultView:r,notice:a,error:s,errorCode:l,busy:d,execute:m,clearError:p,showNotice:o,showResult:i}}var M={preview:null,historyKey:void 0,acceptRemoteHead:!1,acceptedRemovals:!1,resolve:void 0};function ne(){let[e,t]=(0,x.useState)(M);return{...e,prepare:(e,n)=>t(t=>({...t,resolve:e,historyKey:n,acceptRemoteHead:!1})),prepareRemoteHead:()=>t(e=>({...e,resolve:`remote`,historyKey:void 0,acceptRemoteHead:!0})),show:e=>t(t=>({...t,preview:e,acceptedRemovals:!1})),replace:e=>t(t=>({...t,preview:e})),close:()=>t(e=>({...e,preview:null})),acceptRemovals:e=>t(t=>({...t,acceptedRemovals:e}))}}function re({busy:e,keyConfigured:t,message:n,t:r,onMessageChange:o,onClose:c,onSubmit:d}){let[p,m]=(0,x.useState)(!1);return(0,S.jsxs)(h,{labelledBy:`sync-force-push-heading`,onDismiss:()=>{e||c()},placement:`sheet`,panelClassName:`flex max-h-[90vh] w-full max-w-lg flex-col overflow-auto rounded-lg`,children:[(0,S.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,S.jsx)(`h3`,{id:`sync-force-push-heading`,className:s,children:r(`sync.forceHeading`)}),(0,S.jsx)(a,{onClick:c,disabled:e,children:r(`sync.dialogClose`)})]}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,S.jsx)(i,{tone:`danger`,children:r(`sync.forceHint`)}),(0,S.jsx)(u,{label:r(`sync.commitMessage`),children:(0,S.jsx)(`input`,{value:n,maxLength:240,onChange:e=>o(e.target.value),className:l})}),(0,S.jsx)(f,{label:r(`sync.forceConfirm`),checked:p,onChange:m,tone:`danger`}),(0,S.jsx)(a,{kind:`danger`,disabled:e||!p||!t||n.trim()===``,onClick:d,className:`self-start`,children:r(`sync.forcePush`)})]})]})}function N({preview:e,acceptRemoteHead:t,acceptedRemovals:n,busy:r,direction:o,t:c,onAcceptRemovals:l,onApply:u,onClose:m,onResolve:g}){let _=e.conflicts.length>0;return(0,S.jsxs)(h,{labelledBy:`sync-pull-preview-heading`,onDismiss:()=>{r||m()},placement:`sheet`,panelClassName:`max-h-[90vh] w-full max-w-2xl overflow-auto rounded-lg`,children:[(0,S.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-line bg-toolbar px-4 py-3`,children:[(0,S.jsx)(p,{name:`config`,className:`h-4 w-4 text-ink-muted`}),(0,S.jsx)(`h3`,{id:`sync-pull-preview-heading`,className:`${s} flex-1`,children:c(t?`sync.remoteHeadPreviewHeading`:`sync.previewHeading`)}),(0,S.jsx)(a,{disabled:r,onClick:m,children:c(`sync.dialogClose`)})]}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-4`,children:[t?(0,S.jsx)(i,{tone:`notice`,children:c(`sync.remoteHeadPreview`,{at:e.summary.createdAt,origin:e.origin??`—`})}):null,_?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`text-sm text-notice-ink`,children:c(`sync.conflictExplain`)}),(0,S.jsx)(`ul`,{className:`flex flex-col gap-2 text-xs text-notice-ink`,children:e.conflicts.map(e=>{let t=e.baseMode!==e.localMode||e.baseMode!==e.remoteMode;return(0,S.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,S.jsx)(`span`,{className:`font-mono`,children:e.path}),t?(0,S.jsx)(`span`,{className:`text-ink-muted`,children:c(`sync.conflictPermissions`,{base:e.baseMode??`—`,local:e.localMode??`—`,remote:e.remoteMode??`—`})}):null]},e.path)})}),(0,S.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,S.jsx)(a,{disabled:r,onClick:()=>g(`local`),children:c(`sync.keepMine`)}),(0,S.jsx)(a,{disabled:r,onClick:()=>g(`remote`),children:c(`sync.takeTheirs`)})]})]}):null,e.written.length===0?null:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:d,children:c(`sync.wouldWrite`,{count:e.written.length})}),(0,S.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-xs text-ink-muted`,children:e.written.map(e=>(0,S.jsx)(`li`,{children:e},e))})]}),e.removed.length===0?null:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:d,children:c(`sync.wouldRemove`,{count:e.removed.length})}),(0,S.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-xs text-danger`,children:e.removed.map(e=>(0,S.jsx)(`li`,{children:e},e))}),(0,S.jsx)(f,{label:c(`sync.confirmOverwrite`),checked:n,onChange:l,tone:`notice`,className:`rounded border border-notice-line bg-notice p-3`})]}),(0,S.jsx)(a,{kind:`primary`,disabled:r||_||o===`push`||e.removed.length>0&&!n,onClick:u,className:`self-start`,children:c(t?`sync.remoteHeadApply`:`sync.apply`)})]})]})}function P({busy:e,direction:t,historyDiff:n,historyState:r,keyConfigured:o,locale:c,selectedKey:l,t:u,onPreview:f,onRefresh:p,onSelect:m}){let h=r.phase===`ready`&&l!==null?r.value.revisions.find(e=>e.key===l):void 0;return(0,S.jsxs)(`section`,{"aria-labelledby":`sync-history-heading`,className:`flex flex-col gap-3 rounded-lg border border-line bg-surface-subtle p-4 lg:col-span-2`,children:[(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h4`,{id:`sync-history-heading`,className:s,children:u(`sync.historyHeading`)}),(0,S.jsx)(`p`,{className:`mt-1 ${d}`,children:u(`sync.historyHint`)})]}),(0,S.jsx)(a,{disabled:e||!o||r.phase===`loading`,onClick:p,children:u(`sync.historyRefresh`)})]}),r.phase===`idle`?(0,S.jsx)(`p`,{className:d,children:u(`sync.historyNeedsKey`)}):r.phase===`loading`?(0,S.jsx)(`p`,{role:`status`,className:d,children:u(`sync.historyLoading`)}):r.phase===`error`?(0,S.jsx)(i,{tone:`danger`,children:r.message}):(0,S.jsxs)(`div`,{className:`border-t border-line pt-3`,children:[(0,S.jsx)(`p`,{className:d,children:u(`sync.historySummary`,{count:r.value.revisions.length,size:C(r.value.downloadedBytes,c)})}),r.value.historyTruncated||r.value.downloadTruncated?(0,S.jsx)(`p`,{className:`mt-1 text-xs text-notice-ink`,children:u(`sync.historyTruncated`)}):null,r.value.skipped>0?(0,S.jsx)(`p`,{className:`mt-1 text-xs text-notice-ink`,children:u(`sync.historySkipped`,{count:r.value.skipped})}):null,(0,S.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-[minmax(0,1.1fr)_minmax(18rem,0.9fr)]`,children:[(0,S.jsx)(`ol`,{className:`max-h-80 space-y-2 overflow-auto pr-1`,"aria-label":u(`sync.historyTimeline`),children:r.value.revisions.map(t=>(0,S.jsxs)(`li`,{className:`relative border-l-2 border-line pl-4`,children:[(0,S.jsx)(`span`,{className:`absolute -left-[5px] top-4 h-2 w-2 rounded-full bg-accent`}),(0,S.jsxs)(`button`,{type:`button`,disabled:e,onClick:()=>m(t.key),className:`w-full rounded border px-3 py-2 text-left ${l===t.key?`border-accent bg-select-fill`:`border-hairline bg-surface hover:border-line`}`,children:[(0,S.jsxs)(`span`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,S.jsx)(`span`,{className:`font-mono text-xs font-semibold text-ink`,children:t.revision.slice(0,12)}),(0,S.jsx)(`span`,{className:`rounded-full bg-toolbar px-2 py-0.5 text-[11px] font-medium text-ink-muted`,children:u(`sync.historyRelation.${t.relation}`)})]}),(0,S.jsx)(`span`,{className:`mt-1 block text-xs text-ink-muted`,children:u(`sync.historyRevisionMeta`,{at:t.createdAt,count:t.fileCount,origin:t.origin.slice(0,8)})}),(0,S.jsx)(`span`,{className:`mt-1 block text-sm font-medium text-ink`,children:t.message}),t.parentRevision===void 0?null:(0,S.jsx)(`span`,{className:`mt-1 block font-mono text-[11px] text-ink-muted`,children:u(`sync.historyParent`,{revision:t.parentRevision.slice(0,12)})})]})]},t.key))}),(0,S.jsx)(`div`,{className:`min-w-0 rounded border border-line bg-surface p-3`,children:h===void 0?(0,S.jsx)(`p`,{className:d,children:u(`sync.historySelect`)}):(0,S.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:u(`sync.historySelected`)}),(0,S.jsx)(`p`,{className:`mt-1 break-all font-mono text-xs text-ink`,children:h.key})]}),n===null?(0,S.jsx)(`p`,{role:`status`,className:d,children:u(e?`sync.historyDiffLoading`:`sync.historyDiffEmpty`)}):(0,S.jsx)(`div`,{className:`grid gap-2 text-xs sm:grid-cols-3 lg:grid-cols-1 xl:grid-cols-3`,children:[[`added`,n.added,`text-success`],[`modified`,n.modified,`text-notice-ink`],[`removed`,n.removed,`text-danger`]].map(([e,t,n])=>(0,S.jsxs)(`div`,{className:`min-w-0 rounded bg-toolbar p-2`,children:[(0,S.jsx)(`p`,{className:`font-medium ${n}`,children:u(`sync.historyDiff.${e}`,{count:t.length})}),(0,S.jsx)(`ul`,{className:`mt-1 max-h-24 space-y-0.5 overflow-auto font-mono text-[11px] text-ink-muted`,children:t.map(e=>(0,S.jsx)(`li`,{className:`break-all`,children:e},e))})]},e))}),(0,S.jsx)(`p`,{className:d,children:u(`sync.historyRestoreHint`)}),(0,S.jsx)(a,{kind:`primary`,disabled:e||t===`push`,onClick:()=>f(h.key),className:`self-start`,children:u(`sync.historyRestorePreview`)})]})})]})]})]})}var F=5;function I({bucketState:e,locale:t,busy:n,historyExpanded:r,onToggleHistory:i,onRefresh:c}){let l=o(),u=e.phase===`ready`?e.value.history:[],f=r?u:u.slice(0,F);return(0,S.jsxs)(`section`,{"aria-labelledby":`sync-bucket-state-heading`,className:`flex flex-col gap-3 rounded-lg border border-line bg-surface-subtle p-4 lg:col-span-2`,children:[(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h4`,{id:`sync-bucket-state-heading`,className:s,children:l(`sync.bucketStateHeading`)}),(0,S.jsx)(`p`,{className:`mt-1 ${d}`,children:l(`sync.bucketStateHint`)})]}),(0,S.jsx)(a,{disabled:n||e.phase===`loading`,onClick:c,children:l(`sync.bucketRefresh`)})]}),e.phase===`idle`?(0,S.jsx)(y,{tone:`empty`,title:l(`sync.bucketNotConfigured`)}):e.phase===`loading`?(0,S.jsx)(y,{tone:`loading`,title:l(`sync.bucketLoading`)}):e.phase===`error`?(0,S.jsx)(y,{tone:`failed`,title:e.message,action:(0,S.jsx)(a,{onClick:c,children:l(`sync.bucketRefresh`)})}):(0,S.jsxs)(`div`,{className:`grid gap-3 border-t border-line pt-3 lg:grid-cols-2`,children:[(0,S.jsxs)(`div`,{className:`rounded border border-line bg-surface p-3`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:l(`sync.bucketLive`)}),e.value.live===void 0?(0,S.jsx)(`p`,{className:`mt-2 text-sm text-ink-muted`,children:l(`sync.bucketLiveEmpty`)}):(0,S.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,S.jsx)(`p`,{className:d,children:l(`sync.bucketObjectMeta`,{size:C(e.value.live.size,t),at:e.value.live.lastModified??`—`})}),(0,S.jsx)(`p`,{className:`text-sm font-medium ${e.value.localIsLive?`text-success`:`text-notice-ink`}`,children:l(e.value.localIsLive?`sync.bucketLocalCurrent`:`sync.bucketLocalBehind`)}),(0,S.jsxs)(`details`,{className:`mt-1 text-xs text-ink-muted`,children:[(0,S.jsx)(`summary`,{className:`cursor-pointer`,children:l(`sync.bucketObjectName`)}),(0,S.jsx)(`p`,{className:`mt-1 break-all font-mono text-ink`,children:e.value.live.key})]})]})]}),(0,S.jsxs)(`div`,{className:`rounded border border-line bg-surface p-3`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:l(`sync.bucketHistory`,{count:e.value.history.length})}),e.value.historyTruncated?(0,S.jsx)(`p`,{className:`mt-2 text-xs text-notice-ink`,children:l(`sync.bucketHistoryTruncated`)}):null,e.value.history.length===0?(0,S.jsx)(`p`,{className:`mt-2 text-sm text-ink-muted`,children:l(`sync.bucketHistoryEmpty`)}):(0,S.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,S.jsx)(`p`,{className:d,children:l(`sync.bucketHistoryShowing`,{shown:f.length,count:e.value.history.length})}),(0,S.jsx)(`ul`,{className:`max-h-64 space-y-2 overflow-auto pr-1`,children:f.map(e=>(0,S.jsxs)(`li`,{className:`rounded border border-hairline px-2 py-1.5`,children:[(0,S.jsx)(`p`,{className:d,children:l(`sync.bucketObjectMeta`,{size:C(e.size,t),at:e.lastModified??`—`})}),(0,S.jsxs)(`details`,{className:`mt-1 text-xs text-ink-muted`,children:[(0,S.jsx)(`summary`,{className:`cursor-pointer`,children:l(`sync.bucketObjectName`)}),(0,S.jsx)(`p`,{className:`mt-1 break-all font-mono text-ink`,children:e.key})]})]},e.key))}),e.value.history.length<=F?null:(0,S.jsx)(a,{onClick:i,className:`self-start`,children:l(r?`sync.bucketHistoryCollapse`:`sync.bucketHistoryExpand`)})]})]}),(0,S.jsx)(`p`,{className:`lg:col-span-2 ${d}`,children:l(`sync.bucketCheckedAt`,{at:e.value.checkedAt})})]})]})}function L({message:e,code:t}){return e===``?null:(0,S.jsx)(i,{tone:`danger`,children:(0,S.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,S.jsx)(`span`,{children:e}),t===``?null:(0,S.jsxs)(`code`,{className:`text-xs text-ink-muted`,children:[`Code: `,t]})]})})}var ie={sync_not_configured:`sync.notConfigured`,wrong_master_password:`sync.wrongMaster`,wrong_passphrase:`sync.wrongKey`,sync_key_missing:`sync.keyMissing`,passphrase_too_short:`sync.keyTooShort`,bucket_authentication_failed:`sync.bucketAuthenticationFailed`,bucket_access_denied:`sync.bucketAccessDenied`,bucket_rate_limited:`sync.bucketRateLimited`,bucket_unavailable:`sync.bucketUnavailable`,bucket_refused:`sync.unreachable`,bucket_timeout:`sync.bucketTimeout`,bucket_dns_failed:`sync.bucketDNSFailed`,bucket_tls_failed:`sync.bucketTLSFailed`,bucket_unreachable:`sync.bucketUnreachable`,sync_failed:`sync.failed`,sync_internal_failed:`sync.internalFailed`,snapshot_download_incomplete:`sync.snapshotDownloadIncomplete`,snapshot_cost_refused:`sync.snapshotCostRefused`,snapshot_schema_unsupported:`sync.snapshotSchemaUnsupported`,snapshot_rejected:`sync.snapshotRejected`,snapshot_too_large:`sync.snapshotTooLarge`,sync_no_snapshot:`sync.noSnapshot`,endpoint_must_have_no_path:`sync.endpointPath`,sync_remote_moved:`sync.remoteMoved`,sync_remote_deleted:`sync.remoteDeleted`,sync_key_recovery_required:`sync.keyRecoveryRequired`,sync_key_recovery_target_change:`sync.keyRecoveryTargetChange`,sync_history_key_loss_confirmation_required:`sync.keyHistoryLossConfirm`,preview_stale:`sync.previewStale`,sync_nothing_to_push:`sync.noLocalChanges`,sync_commit_message_invalid:`sync.commitMessageInvalid`,sync_ignore_invalid:`sync.exclusions.invalid`,sync_setup_target_changed:`sync.setup.changed`,sync_setup_target_incomplete:`sync.setup.incomplete`,sync_local_changed:`sync.localChanged`,sync_workspace_busy:`sync.workspaceBusy`};function ae({status:e,busy:t,remoteHeadBlocked:n,onToggleAuto:c,onSyncNow:l,onPreviewRemoteHead:u,onPreview:p,onForcePush:m}){let h=o();return(0,S.jsxs)(r,{as:`section`,radius:`md`,children:[(0,S.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h3`,{className:s,children:h(`sync.overviewHeading`)}),(0,S.jsx)(`p`,{className:`mt-1 ${d}`,children:e.synced?h(`sync.lastSynced`,{at:e.lastSyncedAt??``,count:e.fileCount??0}):h(`sync.neverSynced`)})]}),(0,S.jsx)(`span`,{className:`rounded-full bg-select-fill px-2 py-1 text-xs font-medium text-accent`,children:h(`sync.direction.${e.direction}`)})]}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,S.jsx)(f,{label:h(`sync.autoEnable`),hint:h(`sync.autoHint.${e.direction}`),checked:e.auto.enabled,disabled:t||!e.keyConfigured,onChange:c}),n?(0,S.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,S.jsx)(i,{tone:`danger`,children:h(e.direction===`pull`?`sync.autoBlockedRemoteMovedPull`:`sync.autoBlockedRemoteMoved`)}),(0,S.jsx)(`p`,{className:d,children:h(`sync.remoteHeadReviewHint`)})]}):e.auto.phase===`failed`?(0,S.jsx)(L,{message:h(e.auto.detail===`wrong_passphrase`?`sync.autoFailedWrongKey`:e.auto.detail===`snapshot_schema_unsupported`?`sync.autoFailedSchema`:ie[e.auto.detail??``]??`sync.autoFailedLast`),code:e.auto.detail??`sync_failed`}):(0,S.jsx)(`p`,{role:`status`,className:d,children:e.auto.phase===`blocked`?h(e.auto.detail===`conflicts`?`sync.autoBlockedConflicts`:e.auto.detail===`remote_deleted`?`sync.autoBlockedRemoteDeleted`:`sync.autoBlockedRemovals`):e.auto.at===void 0?h(`sync.autoIdle`):h(`sync.autoLastRan`,{at:e.auto.at})}),(0,S.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,S.jsx)(a,{kind:`primary`,disabled:t||!e.keyConfigured,onClick:n?u:l,children:h(n?`sync.remoteHeadReview`:`sync.autoNow.${e.direction}`)}),e.direction===`push`||n?null:(0,S.jsx)(a,{disabled:t||!e.keyConfigured,onClick:p,children:h(`sync.checkRemoteChanges`)}),e.direction===`push`?null:(0,S.jsx)(a,{disabled:t||!e.keyConfigured,onClick:u,children:h(`sync.forcePull`)}),e.direction===`pull`?null:(0,S.jsx)(a,{kind:`danger`,disabled:t||!e.keyConfigured,onClick:m,children:h(`sync.forcePushShort`)})]})]})]})}function oe({status:e,busy:t,form:n,onSave:r}){let i=o(),{chooseOwn:c,setChooseOwn:l,ownKey:u,setOwnKey:d,confirmHistoryLoss:h,setConfirmHistoryLoss:g}=n;return(0,S.jsxs)(`section`,{"aria-labelledby":`sync-key-heading`,className:`overflow-hidden rounded-md border border-line bg-card`,children:[(0,S.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(p,{name:`sync`,className:`h-4 w-4 text-ink-muted`}),(0,S.jsx)(`h3`,{id:`sync-key-heading`,className:s,children:i(`sync.key`)})]}),(0,S.jsx)(`span`,{className:`rounded-full px-2 py-1 text-xs font-medium ${e.keyConfigured?`bg-select-fill text-accent`:`bg-notice text-notice-ink`}`,children:e.keyConfigured?i(`sync.keyReady`):i(`sync.keyNeeded`)})]}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,S.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:i(`sync.keyHint`)}),(0,S.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:i(e.keyConfigured?`sync.keySet`:`sync.keyMissing`)}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line pt-3`,children:[(0,S.jsx)(f,{label:i(`sync.keyChooseOwn`),checked:c,onChange:l}),c?(0,S.jsx)(m,{label:i(`sync.keyOwnValue`),value:u,onChange:d}):null,e.keyConfigured?(0,S.jsx)(f,{label:i(`sync.keyHistoryLossConfirm`),checked:h,onChange:g,tone:`danger`}):null,(0,S.jsx)(a,{kind:`primary`,disabled:t||c&&u===``||e.keyConfigured&&!h,onClick:r,className:`self-start`,children:e.keyConfigured?i(`sync.keyReplace`):i(`sync.keyCreate`)})]})]})]})}function R({label:e,children:t,hint:n,interactiveChildren:r=!1}){let i=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`w-full shrink-0 text-sm text-ink-muted sm:w-32`,children:e}),(0,S.jsx)(`span`,{className:`flex min-w-0 flex-1 justify-start sm:ml-auto sm:justify-end`,children:t})]});return(0,S.jsxs)(`div`,{className:`border-t border-hairline first:border-t-0`,children:[r?(0,S.jsx)(`div`,{className:`flex flex-col items-stretch gap-2 px-3 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2`,children:i}):(0,S.jsx)(`label`,{className:`flex flex-col items-stretch gap-2 px-3 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2`,children:i}),n===void 0?null:(0,S.jsx)(`p`,{className:`px-3 pb-3 sm:pb-2 ${d}`,children:n})]})}function se({status:e,busy:t,form:n,onCheckSetup:r,onCompleteSetup:c,onSaveKey:u}){let h=o(),{endpoint:g,bucket:_,path:v,region:y,accessKeyId:b,secretAccessKey:x,direction:C,setupCheck:w,ownKey:T,chooseOwn:E,editingSettings:D,settingsOpen:O,editSettings:k,setEndpoint:A,setBucket:j,setPath:ee,setRegion:te,setAccessKeyId:M,setSecretAccessKey:ne,setDirection:re,setOwnKey:N,setChooseOwn:P,setEditingSettings:F,setSettingsOpen:I}=n;return(0,S.jsxs)(`details`,{open:!e.configured||O,onToggle:t=>{e.configured&&I(t.currentTarget.open)},className:e.configured?`group overflow-hidden rounded-md border border-control-line bg-card`:`group`,children:[e.configured?(0,S.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-3 bg-toolbar px-4 py-3 text-sm font-medium text-ink marker:hidden hover:bg-select-fill`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex size-5 shrink-0 items-center justify-center text-base text-ink-muted transition-transform group-open:rotate-90`,children:`›`}),(0,S.jsx)(`span`,{children:h(`sync.manageSettings`)})]}):null,(0,S.jsxs)(`div`,{className:e.configured?`flex flex-col gap-4 border-t border-line bg-surface-subtle p-4`:`flex flex-col gap-6`,children:[(0,S.jsx)(`p`,{className:`rounded-md bg-toolbar px-4 py-3 ${d}`,children:h(`sync.warning`)}),(0,S.jsxs)(`section`,{className:`overflow-hidden rounded-md border border-line bg-card`,children:[(0,S.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(p,{name:`remoteKeys`,className:`h-4 w-4 text-ink-muted`}),(0,S.jsx)(`h3`,{className:s,children:h(`sync.bucketHeading`)})]}),e.configured?(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,S.jsxs)(`p`,{className:`font-mono text-xs text-ink-muted`,children:[[e.endpoint,e.bucket,e.path].filter(e=>e!==``&&e!==void 0).join(`/`),e.region!==void 0&&e.region!==``?` (${e.region})`:``]}),D?null:(0,S.jsx)(a,{onClick:()=>k(e),children:h(`sync.editSettings`)})]}):(0,S.jsx)(`p`,{className:`text-xs text-ink-muted`,children:h(`sync.notConfigured`)})]}),!e.configured||D?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`px-1 py-2 sm:px-3`,children:[(0,S.jsx)(R,{label:h(`sync.endpoint`),hint:h(`sync.endpointHint`),children:(0,S.jsx)(`input`,{value:g,onChange:e=>A(e.target.value),placeholder:`https://.r2.cloudflarestorage.com`,className:l})}),(0,S.jsx)(R,{label:h(`sync.bucket`),children:(0,S.jsx)(`input`,{value:_,onChange:e=>j(e.target.value),className:l})}),(0,S.jsx)(R,{label:h(`sync.path`),hint:h(`sync.pathHint`),children:(0,S.jsx)(`input`,{value:v,onChange:e=>ee(e.target.value),className:l})}),(0,S.jsx)(R,{label:h(`sync.region`),hint:h(`sync.regionHint`),children:(0,S.jsx)(`input`,{value:y,onChange:e=>te(e.target.value),className:l})}),(0,S.jsx)(R,{label:h(`sync.accessKeyId`),children:(0,S.jsx)(`input`,{value:b,onChange:e=>M(e.target.value),className:l})}),(0,S.jsx)(R,{label:h(`sync.secretAccessKey`),hint:h(`sync.credentialsNote`),interactiveChildren:!0,children:(0,S.jsx)(m,{label:h(`sync.secretAccessKey`),value:x,onChange:ne})}),(0,S.jsx)(R,{label:h(`sync.direction`),hint:h(`sync.direction.${C}.hint`),children:(0,S.jsxs)(`select`,{value:C,onChange:e=>re(e.target.value),className:l,children:[(0,S.jsx)(`option`,{value:`both`,children:h(`sync.role.main`)}),(0,S.jsx)(`option`,{value:`pull`,children:h(`sync.role.receive`)}),(0,S.jsx)(`optgroup`,{label:h(`sync.role.advanced`),children:(0,S.jsx)(`option`,{value:`push`,children:h(`sync.role.send`)})})]})})]}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line bg-toolbar px-4 py-3`,children:[w===null?null:(0,S.jsxs)(i,{tone:w.state===`incomplete`?`danger`:`notice`,children:[h(`sync.setup.${w.state}`),w.state===`incomplete`?` ${h(`sync.setup.useAnotherPath`)}`:``]}),w===null||w.state===`incomplete`?null:(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-line bg-surface p-3`,children:[(0,S.jsx)(`p`,{className:`text-sm text-ink`,children:w.state===`existing`?h(`sync.setup.existingKey`):h(`sync.setup.emptyKey`)}),w.state===`empty`?(0,S.jsx)(f,{label:h(`sync.keyChooseOwn`),checked:E,onChange:P}):null,w.state===`existing`||E?(0,S.jsx)(m,{label:h(`sync.keyOwnValue`),value:T,onChange:N}):null,(0,S.jsx)(a,{kind:`primary`,disabled:t||w.state===`existing`&&T===``||E&&T===``,onClick:c,children:h(`sync.setup.save`)})]}),(0,S.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,S.jsx)(a,{disabled:t||g===``||_===``||b===``||x===``,onClick:r,children:h(`sync.setup.check`)}),e.configured?(0,S.jsx)(a,{disabled:t,onClick:()=>F(!1),children:h(`sync.cancelSettings`)}):null]})]})]}):null]}),e.configured?(0,S.jsx)(oe,{status:e,busy:t,form:n,onSave:u}):null]})]})}function ce({status:e,busy:t,pushDraft:n,pushMessage:i,onMessageChange:c,onPush:u,onPreview:f}){let p=o(),m=n===null?null:n.added+n.modified+n.removed;return(0,S.jsxs)(r,{as:`section`,"aria-labelledby":`sync-transfer-heading`,radius:`md`,className:`flex flex-col gap-3 p-4`,children:[(0,S.jsx)(`h3`,{id:`sync-transfer-heading`,className:s,children:p(`sync.transferHeading`)}),(0,S.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:p(`sync.transferHint.${e.direction}`)}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-1 border-t border-line pt-3 text-sm text-ink`,children:[(0,S.jsx)(`label`,{htmlFor:`sync-commit-message`,className:`font-medium`,children:p(`sync.commitMessage`)}),(0,S.jsx)(`input`,{id:`sync-commit-message`,"aria-describedby":`sync-commit-message-hint`,value:i,maxLength:240,onChange:e=>c(e.target.value),className:l,placeholder:p(`sync.commitMessagePlaceholder`)}),(0,S.jsx)(`span`,{id:`sync-commit-message-hint`,className:d,children:n===null?p(`sync.commitMessageHint`):m===0?p(`sync.noLocalChanges`):p(`sync.commitMessageChanges`,{added:n.added,modified:n.modified,removed:n.removed})})]}),(0,S.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-t border-line pt-3`,children:[(0,S.jsx)(a,{kind:`primary`,disabled:t||!e.keyConfigured||i.trim()===``||m===null||m===0,onClick:u,children:p(`sync.push`)}),(0,S.jsx)(a,{disabled:t||!e.keyConfigured,onClick:f,children:p(`sync.preview`)})]})]})}function le({master:e,busy:t,onMasterChange:n,onUnlock:i}){let s=o();return(0,S.jsxs)(r,{as:`section`,radius:`md`,className:`grid md:grid-cols-[minmax(0,0.9fr)_minmax(18rem,1.1fr)]`,children:[(0,S.jsxs)(`div`,{className:`flex flex-col justify-between gap-8 bg-toolbar p-6 md:p-8`,children:[(0,S.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-md bg-select-fill text-accent`,children:(0,S.jsx)(p,{name:`sync`,className:`h-6 w-6`})}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h3`,{className:`text-lg font-semibold text-ink`,children:s(`sync.bucketHeading`)}),(0,S.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-ink-muted`,children:s(`sync.sealed`)})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-col justify-center gap-4 p-6 md:p-8`,children:[(0,S.jsx)(g,{label:s(`secrets.master`),value:e,onChange:n}),(0,S.jsx)(a,{kind:`primary`,disabled:t||e===``,onClick:i,className:`self-start`,children:s(`secrets.unlock`)})]})]})}var ue={...v,..._},z=`[&_button]:min-h-10 md:[&_button]:min-h-0`;function de(){let e=o();return(0,S.jsx)(`ol`,{"aria-label":e(`sync.flowHeading`),className:`grid overflow-hidden rounded-md border border-line bg-toolbar sm:grid-cols-3`,children:[`sync.flowBucket`,`sync.flowKey`,`sync.flowOperate`].map((t,n)=>(0,S.jsxs)(`li`,{className:`flex items-center gap-3 border-b border-hairline px-4 py-3 last:border-b-0 sm:border-b-0 sm:border-r sm:last:border-r-0`,children:[(0,S.jsx)(`span`,{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-select-fill font-mono text-xs font-semibold text-accent`,children:n+1}),(0,S.jsx)(`span`,{className:`text-sm text-ink`,children:e(t)})]},t))})}function B({api:e=ue}){let{locale:t,t:n}=c(),[r,o]=(0,x.useState)({phase:`loading`}),s=j(),[l,u]=(0,x.useState)(``),[f,p]=(0,x.useState)(``),{bucketState:m,historyState:h,selectedHistoryKey:g,bucketHistoryExpanded:_,pushDraft:v,pushMessage:C,refreshBucket:w,refreshHistory:T,refreshPushDraft:D,resetBucket:O,resetHistory:A,resetPush:M,selectHistory:F,toggleBucketHistory:oe,editPushMessage:R,acceptPushMessage:B}=ee(e,n),[fe,V]=(0,x.useState)(null),[pe,H]=(0,x.useState)(!1),{resultView:U,notice:me,error:he,errorCode:ge,busy:W,execute:_e,clearError:ve,showNotice:G,showResult:K}=te(n,ie),q=ne(),{preview:J,historyKey:Y,acceptRemoteHead:ye,acceptedRemovals:be,resolve:xe}=q,X=(0,x.useCallback)(async()=>{o({phase:`loading`});try{let t=await e.syncStatus();o({phase:`ready`,value:t}),t.configured?w():O(),t.configured&&t.keyConfigured?T():A(),t.configured&&t.direction!==`pull`?D():M(),t.direction===`pull`&&t.auto.phase===`blocked`&&t.auto.detail===`remote_moved`&&ve()}catch{o({phase:`error`,message:n(`sync.statusFailed`)})}},[e,w,T,D,O,A,M,n,ve]);(0,x.useEffect)(()=>{X()},[X]);let Se=r.phase===`ready`&&r.value.configured&&!r.value.locked;(0,x.useEffect)(()=>{if(!Se)return;let e=window.setInterval(()=>{document.visibilityState!==`hidden`&&w()},3e4);return()=>window.clearInterval(e)},[w,Se]);async function Z(e,t,n,i){await _e(e,t,n,i,async e=>e!==`sync_remote_moved`||r.phase!==`ready`||r.value.direction!==`pull`?!1:(await X(),!0))}async function Q(t,r){q.prepare(t,r),await Z(()=>e.pullSnapshot(!1,t,r),e=>{q.show(e),K({kind:`preview`,result:e}),G(e.written.length+e.removed.length+e.conflicts.length===0?n(`sync.alreadyMatches`):``)},n(`sync.pullFailed`))}async function Ce(){q.prepareRemoteHead(),await Z(()=>e.pullSnapshot(!1,`remote`,void 0,void 0,!0),e=>{q.show(e),K({kind:`preview`,result:e}),G(e.written.length+e.removed.length===0?n(`sync.alreadyMatches`):``)},n(`sync.pullFailed`))}async function we(t){F(t),V(null),await Z(()=>e.diffSyncHistory(t),e=>V(e),n(`sync.historyDiffFailed`))}if(r.phase===`loading`)return(0,S.jsx)(y,{tone:`loading`,title:n(`sync.loading`)});if(r.phase===`error`)return(0,S.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${z}`,children:[(0,S.jsx)(b,{title:n(`sync.heading`),description:n(`sync.pageDescription`)}),(0,S.jsx)(i,{tone:`danger`,children:r.message}),(0,S.jsx)(a,{onClick:()=>void X(),className:`self-start`,children:n(`shell.bootstrapRetry`)})]});let $=r.value;if($.locked)return(0,S.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${z}`,children:[(0,S.jsx)(b,{title:n(`sync.heading`),description:n(`sync.pageDescription`)}),(0,S.jsx)(L,{message:he,code:ge}),(0,S.jsx)(le,{master:l,busy:W,onMasterChange:u,onUnlock:()=>void Z(()=>e.unlockVault(l),()=>{u(``),X()},n(`sync.unlockFailed`),e=>e===`vault_missing`?n(`sync.noVault`):``)})]});let Te=$.auto.phase===`blocked`&&$.auto.detail===`remote_moved`;function Ee(e,t){o({phase:`ready`,value:e.status}),q.close(),K({kind:`push`,result:e.result}),G(n(t)),B(),D(),w(),T()}return(0,S.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${z}`,children:[(0,S.jsx)(b,{title:n(`sync.heading`),description:n(`sync.pageDescription`)}),$.configured?null:(0,S.jsx)(de,{}),(0,S.jsx)(L,{message:he,code:ge}),me===``?null:(0,S.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:me}),f===``?null:(0,S.jsxs)(i,{tone:`notice`,children:[(0,S.jsx)(`span`,{className:`block`,children:n(`sync.keyShownOnce`)}),(0,S.jsx)(`output`,{className:`mt-2 block select-all break-all font-mono text-sm`,children:f})]}),$.configured?(0,S.jsx)(ae,{status:$,busy:W,remoteHeadBlocked:Te,onToggleAuto:t=>void Z(()=>e.setAutoSync(t),e=>o({phase:`ready`,value:e}),n(`sync.autoFailed`)),onSyncNow:()=>void Z(()=>e.syncNow(),e=>o({phase:`ready`,value:e}),n(`sync.autoNowFailed`)),onPreviewRemoteHead:()=>void Ce(),onPreview:()=>void Q(void 0),onForcePush:()=>H(!0)}):null,$.configured?(0,S.jsx)(k,{api:e,onSaved:()=>{D()}}):null,(0,S.jsx)(se,{status:$,busy:W,form:s,onCheckSetup:()=>void Z(()=>e.checkSyncSetup(s.setupInput),e=>{s.setSetupCheck(e),s.setOwnKey(``),s.setChooseOwn(!1)},n(`sync.configureFailed`)),onCompleteSetup:()=>{let{setupCheck:t,chooseOwn:r,ownKey:i}=s;t!==null&&Z(()=>e.completeSyncSetup({...s.setupInput,direction:s.direction,expectedState:t.state,...t.etag===void 0?{}:{expectedETag:t.etag},historyPresent:t.historyPresent,reuseKey:!1,key:t.state===`existing`||r?i:``}),e=>{o({phase:`ready`,value:e.status}),p(e.generatedKey??``),s.setOwnKey(``),s.setAccessKeyId(``),s.setSecretAccessKey(``),s.setSetupCheck(null),s.setEditingSettings(!1),s.setSettingsOpen(!1),G(e.generatedKey===void 0?n(`sync.setup.saved`):n(`sync.keyShownOnce`))},n(`sync.configureFailed`))},onSaveKey:()=>{let{chooseOwn:t,ownKey:r}=s;Z(()=>$.keyConfigured?e.setSyncKey(t?r:void 0,!0):e.setSyncKey(t?r:void 0),e=>{p(t?``:e.key),s.setOwnKey(``),s.setConfirmHistoryLoss(!1),G(n(`sync.keySaved`)),X()},n(`sync.keyFailed`))}}),$.configured&&$.direction!==`pull`?(0,S.jsx)(ce,{status:$,busy:W,pushDraft:v,pushMessage:C,onMessageChange:R,onPush:()=>void Z(()=>e.pushSnapshot(C.trim()),e=>Ee(e,`sync.pushed`),n(`sync.pushFailed`)),onPreview:()=>void Q(void 0)}):null,$.configured?(0,S.jsxs)(`details`,{className:`group overflow-hidden rounded-md border border-control-line bg-card`,children:[(0,S.jsxs)(`summary`,{className:`flex cursor-pointer list-none flex-wrap items-center justify-between gap-3 bg-toolbar px-4 py-3 marker:hidden hover:bg-select-fill`,children:[(0,S.jsxs)(`span`,{className:`flex items-center gap-3 text-sm font-medium text-ink`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex size-5 shrink-0 items-center justify-center text-base text-ink-muted transition-transform group-open:rotate-90`,children:`›`}),n(`sync.detailsHeading`)]}),(0,S.jsx)(`span`,{className:d,children:$.synced?n(`sync.lastSynced`,{at:$.lastSyncedAt??``,count:$.fileCount??0}):n(`sync.neverSynced`)})]}),(0,S.jsxs)(`div`,{className:`grid gap-4 border-t border-line bg-surface-subtle p-4 lg:grid-cols-2`,children:[(0,S.jsx)(I,{bucketState:m,locale:t,busy:W,historyExpanded:_,onToggleHistory:oe,onRefresh:()=>void w()}),(0,S.jsx)(P,{busy:W,direction:$.direction,historyDiff:fe,historyState:h,keyConfigured:$.keyConfigured,locale:t,selectedKey:g,t:n,onPreview:e=>void Q(void 0,e),onRefresh:()=>void T(),onSelect:e=>void we(e)})]})]}):null,pe?(0,S.jsx)(re,{busy:W,keyConfigured:$.keyConfigured,message:C,t:n,onMessageChange:R,onClose:()=>H(!1),onSubmit:()=>void Z(()=>e.forcePushSnapshot(C.trim()),e=>{Ee(e,`sync.forcePushed`),H(!1)},n(`sync.forceFailed`))}):null,U===null?$.lastOperation===void 0?null:(0,S.jsx)(E,{view:{kind:`previous`,operation:$.lastOperation}}):(0,S.jsx)(E,{view:U}),J===null?null:(0,S.jsx)(N,{preview:J,acceptRemoteHead:ye,acceptedRemovals:be,busy:W,direction:$.direction,t:n,onAcceptRemovals:q.acceptRemovals,onClose:q.close,onResolve:e=>void Q(e,Y),onApply:()=>void Z(()=>ye?e.pullSnapshot(!0,xe,Y,J,!0):e.pullSnapshot(!0,xe,Y,J),e=>{q.replace(e),K({kind:`apply`,result:e}),G(n(`sync.applied`)),X()},n(`sync.applyFailed`))})]})}export{B as SyncPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/SyncPanel-z52FlWen.js b/internal/ui/dist/assets/SyncPanel-z52FlWen.js new file mode 100644 index 000000000..b6234c209 --- /dev/null +++ b/internal/ui/dist/assets/SyncPanel-z52FlWen.js @@ -0,0 +1,3 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{n,r,t as i,y as a}from"./surface-DPFJ-mE2.js";import{_ as o,f as s,g as c,i as l,n as u,s as d,t as f}from"./form-zbLY2cuV.js";import{$ as p,J as m,at as h,c as g,g as _,l as v,nt as y,rt as b,x,yt as S}from"./index-DtC-pXtZ.js";import{t as C}from"./useAsyncOperation-DcaEx5AT.js";import{r as w}from"./page-BaebBDRI.js";var T=e(),E=t();function D(e,t){return g(e,{decimal:!0,locale:t})}function O({summary:e}){let{locale:t,t:n}=c();return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`font-medium text-ink`,children:n(`sync.result.filesSource`,{count:new Intl.NumberFormat(t).format(e.fileCount),size:D(e.sourceBytes,t)})}),(0,E.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`sync.result.encrypted`,{size:D(e.snapshotBytes,t)})})]})}function k({view:e}){let{locale:t,t:r}=c(),i,a,o,s=0,l=0,u=0,d=0,f=0,m=0;e.kind===`previous`?(i=e.operation.summary,a=e.operation.completedAt,o=e.operation.kind,s=e.operation.objectCount??0,l=e.operation.uploadedBytes??0,u=e.operation.downloadedBytes??0,d=e.operation.written??0,f=e.operation.removed??0):e.kind===`push`?(i=e.result.summary,a=e.result.completedAt,o=`push`,s=e.result.objectCount,l=e.result.uploadedBytes):(i=e.result.summary,a=e.result.completedAt,o=e.kind,u=e.result.downloadedBytes,d=e.result.written.length,f=e.result.removed.length,m=e.result.conflicts.length);let h=e.kind===`previous`?r(`sync.result.previousTitle`):r(o===`push`?`sync.result.pushTitle`:o===`preview`?`sync.result.previewTitle`:`sync.result.applyTitle`);return(0,E.jsxs)(n,{as:`section`,"aria-label":h,radius:`md`,children:[(0,E.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(p,{name:`sync`,className:`h-4 w-4 text-ink-muted`}),(0,E.jsx)(`h4`,{className:`text-sm font-semibold text-ink`,children:h})]}),(0,E.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-live`})]}),(0,E.jsxs)(`div`,{className:`grid gap-4 px-4 py-4 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[o===`push`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(O,{summary:i}),(0,E.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`sync.result.uploaded`,{size:D(l,t),count:new Intl.NumberFormat(t).format(s)})}),(0,E.jsx)(`p`,{className:`text-xs text-ink-muted`,children:r(`sync.result.created`,{at:v(i.createdAt,t)})})]}):o===`preview`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`font-medium text-ink`,children:r(`sync.result.previewDownload`,{downloaded:D(u,t),source:D(i.sourceBytes,t)})}),(0,E.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`sync.result.snapshotAt`,{at:v(i.createdAt,t)})}),(0,E.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`sync.result.changes`,{written:d,removed:f,conflicts:m})})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`font-medium text-ink`,children:r(`sync.result.appliedSnapshot`,{at:v(i.createdAt,t)})}),(0,E.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`sync.result.changes`,{written:d,removed:f,conflicts:m})}),(0,E.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`sync.result.applyDownload`,{size:D(u,t)})})]}),(0,E.jsx)(`p`,{className:`text-xs text-ink-muted`,children:r(`sync.result.completed`,{at:v(a,t)})})]}),(0,E.jsx)(`span`,{className:`rounded-lg bg-select-fill px-3 py-2 font-mono text-xs text-ink-muted`,children:D(i.snapshotBytes,t)})]})]})}function A(e){return`/${e.replace(/([\\*?\[\]#!])/g,`\\$1`)}`}function j(e,t){return e===``?`${t}\n`:`${e}${e.endsWith(` +`)?``:` +`}${t}\n`}function ee({api:e,initial:t,onSaved:n}){let{t:o}=c(),[s,u]=(0,T.useState)(t??null),[f,p]=(0,T.useState)(t?.document??``),[m,h]=(0,T.useState)(t!==void 0),[g,_]=(0,T.useState)(``),[v,y]=(0,T.useState)({}),b=C();async function x(){m||b.busy||await b.run(()=>e.syncExclusions(),{apply:e=>{u(e),p(e.document),h(!0)},describe:()=>o(`sync.exclusions.loadFailed`)})}let S=(0,T.useMemo)(()=>{let e=g.trim().toLocaleLowerCase();return(s?.candidates??[]).filter(t=>e===``||t.path.toLocaleLowerCase().includes(e))},[g,s]),w=(s?.candidates??[]).reduce((e,t)=>e+(v[t.path]??t.ignored?1:0),0),D=(s?.candidates??[]).some(e=>(v[e.path]??e.ignored)&&(e.path===`config`||e.path.startsWith(`connections/`)||e.path.startsWith(`keys/`)));return(0,E.jsxs)(`details`,{className:`group overflow-hidden rounded-md border border-control-line bg-card`,onToggle:e=>{e.currentTarget.open&&x()},children:[(0,E.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 bg-toolbar px-4 py-3 marker:hidden hover:bg-select-fill`,children:[(0,E.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3 text-sm font-medium text-ink`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex size-5 shrink-0 items-center justify-center text-base text-ink-muted transition-transform group-open:rotate-90`,children:`›`}),o(`sync.exclusions.heading`)]}),(0,E.jsx)(`span`,{className:d,children:m?o(`sync.exclusions.summary`,{included:(s?.candidates.length??0)-w,ignored:w}):o(`sync.exclusions.open`)})]}),(0,E.jsx)(`div`,{className:`flex flex-col gap-4 border-t border-line p-4`,children:b.busy&&!m?(0,E.jsx)(`p`,{role:`status`,className:d,children:o(`sync.exclusions.loading`)}):b.error===``?s===null?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:o(`sync.exclusions.hint`)}),s.usingDefaults?(0,E.jsx)(`p`,{className:`mt-1 ${d}`,children:o(`sync.exclusions.defaults`)}):null]}),(0,E.jsx)(`input`,{type:`search`,value:g,onChange:e=>_(e.target.value),className:l,placeholder:o(`sync.exclusions.search`)}),(0,E.jsx)(`div`,{className:`max-h-64 overflow-auto rounded-md border border-hairline`,children:S.length===0?(0,E.jsx)(`p`,{className:`px-3 py-4 text-sm text-ink-muted`,children:o(`sync.exclusions.empty`)}):S.map(e=>{let t=v[e.path]??e.ignored;return(0,E.jsxs)(`label`,{className:`flex min-h-10 items-center gap-3 border-t border-hairline px-3 py-2 first:border-t-0 hover:bg-select-fill`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:!t,onChange:()=>{let n=!t;y(t=>({...t,[e.path]:n})),p(t=>j(t,`${n?``:`!`}${A(e.path)}`))}}),(0,E.jsx)(`span`,{className:`min-w-0 break-all font-mono text-xs text-ink`,children:e.path})]},e.path)})}),D?(0,E.jsx)(r,{tone:`danger`,children:o(`sync.exclusions.sensitiveWarning`)}):null,(0,E.jsxs)(`details`,{className:`rounded-md border border-hairline bg-surface-subtle`,children:[(0,E.jsx)(`summary`,{className:`cursor-pointer px-3 py-2 text-sm font-medium text-ink`,children:o(`sync.exclusions.advanced`)}),(0,E.jsxs)(`div`,{className:`border-t border-hairline p-3`,children:[(0,E.jsx)(`textarea`,{value:f,onChange:e=>p(e.target.value),rows:12,spellCheck:!1,className:`${l} min-h-52 resize-y font-mono text-xs`,"aria-label":o(`sync.exclusions.rules`)}),(0,E.jsx)(`p`,{className:`mt-2 ${d}`,children:o(`sync.exclusions.syntax`)})]})]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,E.jsx)(i,{kind:`primary`,disabled:b.busy||f===s.document,onClick:()=>{b.run(()=>e.saveSyncExclusions(f),{apply:e=>{u(e),p(e.document),y({}),n?.(e)},describe:e=>a(e)===`sync_ignore_invalid`?o(`sync.exclusions.invalid`):o(`sync.exclusions.saveFailed`)})},children:o(`sync.exclusions.save`)}),(0,E.jsx)(`span`,{className:d,children:o(`sync.exclusions.shared`)})]})]}):(0,E.jsx)(r,{tone:`danger`,children:b.error})})]})}var M={endpoint:``,bucket:``,path:``,region:``,accessKeyId:``,secretAccessKey:``,direction:`both`,setupCheck:null,ownKey:``,chooseOwn:!1,confirmHistoryLoss:!1,editingSettings:!1,settingsOpen:!1};function te(){let[e,t]=(0,T.useState)(M);function n(e,n){t(t=>({...t,[e]:n}))}(0,T.useEffect)(()=>{t(e=>e.setupCheck===null?e:{...e,setupCheck:null})},[e.endpoint,e.bucket,e.path,e.region,e.accessKeyId,e.secretAccessKey]);function r(e){t(t=>({...t,endpoint:e.endpoint??``,bucket:e.bucket??``,path:e.path??``,region:e.region??``,direction:e.direction,accessKeyId:``,secretAccessKey:``,setupCheck:null,editingSettings:!0,settingsOpen:!0}))}let i={endpoint:e.endpoint,bucket:e.bucket,path:e.path,region:e.region,accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,reuseCredentials:!1};return{...e,setupInput:i,editSettings:r,setEndpoint:e=>n(`endpoint`,e),setBucket:e=>n(`bucket`,e),setPath:e=>n(`path`,e),setRegion:e=>n(`region`,e),setAccessKeyId:e=>n(`accessKeyId`,e),setSecretAccessKey:e=>n(`secretAccessKey`,e),setDirection:e=>n(`direction`,e),setSetupCheck:e=>n(`setupCheck`,e),setOwnKey:e=>n(`ownKey`,e),setChooseOwn:e=>n(`chooseOwn`,e),setConfirmHistoryLoss:e=>n(`confirmHistoryLoss`,e),setEditingSettings:e=>n(`editingSettings`,e),setSettingsOpen:e=>n(`settingsOpen`,e)}}function ne(e,t){let[n,r]=(0,T.useState)({phase:`idle`}),[i,a]=(0,T.useState)({phase:`idle`}),[o,s]=(0,T.useState)(null),[c,l]=(0,T.useState)(!1),[u,d]=(0,T.useState)(null),[f,p]=(0,T.useState)(``),m=(0,T.useRef)(!1);return{bucketState:n,historyState:i,selectedHistoryKey:o,bucketHistoryExpanded:c,pushDraft:u,pushMessage:f,refreshBucket:(0,T.useCallback)(async()=>{r({phase:`loading`});try{r({phase:`ready`,value:await e.syncBucketStatus()})}catch{r({phase:`error`,message:t(`sync.bucketStatusFailed`)})}},[e,t]),refreshHistory:(0,T.useCallback)(async()=>{a({phase:`loading`});try{let t=await e.syncHistory();a({phase:`ready`,value:t}),s(e=>e!==null&&t.revisions.some(t=>t.key===e)?e:null)}catch{a({phase:`error`,message:t(`sync.historyFailed`)})}},[e,t]),refreshPushDraft:(0,T.useCallback)(async()=>{try{let t=await e.syncPushDraft();d(t),m.current||p(t.message)}catch{d(null)}},[e]),resetBucket:(0,T.useCallback)(()=>r({phase:`idle`}),[]),resetHistory:(0,T.useCallback)(()=>a({phase:`idle`}),[]),resetPush:(0,T.useCallback)(()=>{d(null),p(``),m.current=!1},[]),selectHistory:e=>s(e),toggleBucketHistory:()=>l(e=>!e),editPushMessage:e=>{m.current=!0,p(e)},acceptPushMessage:()=>{m.current=!1}}}function re(e,t){let[n,r]=(0,T.useState)(null),[i,o]=(0,T.useState)(``),[s,c]=(0,T.useState)(``),[l,u]=(0,T.useState)(``),[d,f]=(0,T.useState)(!1),p=(0,T.useCallback)(()=>{c(``),u(``)},[]);async function m(n,r,i,s,l){p(),o(``),f(!0);try{r(await n())}catch(n){let r=a(n);if(l!==void 0&&await l(r))return;let o=t[r];u(r),c(s?.(r)||(o===void 0?i:e(o)))}finally{f(!1)}}return{resultView:n,notice:i,error:s,errorCode:l,busy:d,execute:m,clearError:p,showNotice:o,showResult:r}}var N={preview:null,historyKey:void 0,acceptRemoteHead:!1,acceptedRemovals:!1,resolve:void 0};function ie(){let[e,t]=(0,T.useState)(N);return{...e,prepare:(e,n)=>t(t=>({...t,resolve:e,historyKey:n,acceptRemoteHead:!1})),prepareRemoteHead:()=>t(e=>({...e,resolve:`remote`,historyKey:void 0,acceptRemoteHead:!0})),show:e=>t(t=>({...t,preview:e,acceptedRemovals:!1})),replace:e=>t(t=>({...t,preview:e})),close:()=>t(e=>({...e,preview:null})),acceptRemovals:e=>t(t=>({...t,acceptedRemovals:e}))}}function ae({busy:e,keyConfigured:t,message:n,t:a,onMessageChange:o,onClose:c,onSubmit:d}){let[p,h]=(0,T.useState)(!1);return(0,E.jsxs)(m,{labelledBy:`sync-force-push-heading`,onDismiss:()=>{e||c()},placement:`sheet`,panelClassName:`flex max-h-[90vh] w-full max-w-lg flex-col overflow-auto rounded-lg`,children:[(0,E.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,E.jsx)(`h3`,{id:`sync-force-push-heading`,className:s,children:a(`sync.forceHeading`)}),(0,E.jsx)(i,{onClick:c,disabled:e,children:a(`sync.dialogClose`)})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,E.jsx)(r,{tone:`danger`,children:a(`sync.forceHint`)}),(0,E.jsx)(u,{label:a(`sync.commitMessage`),children:(0,E.jsx)(`input`,{value:n,maxLength:240,onChange:e=>o(e.target.value),className:l})}),(0,E.jsx)(f,{label:a(`sync.forceConfirm`),checked:p,onChange:h,tone:`danger`}),(0,E.jsx)(i,{kind:`danger`,disabled:e||!p||!t||n.trim()===``,onClick:d,className:`self-start`,children:a(`sync.forcePush`)})]})]})}function oe({preview:e,acceptRemoteHead:t,acceptedRemovals:n,busy:a,direction:o,t:c,onAcceptRemovals:l,onApply:u,onClose:h,onResolve:g}){let _=e.conflicts.length>0;return(0,E.jsxs)(m,{labelledBy:`sync-pull-preview-heading`,onDismiss:()=>{a||h()},placement:`sheet`,panelClassName:`max-h-[90vh] w-full max-w-2xl overflow-auto rounded-lg`,children:[(0,E.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-line bg-toolbar px-4 py-3`,children:[(0,E.jsx)(p,{name:`config`,className:`h-4 w-4 text-ink-muted`}),(0,E.jsx)(`h3`,{id:`sync-pull-preview-heading`,className:`${s} flex-1`,children:c(t?`sync.remoteHeadPreviewHeading`:`sync.previewHeading`)}),(0,E.jsx)(i,{disabled:a,onClick:h,children:c(`sync.dialogClose`)})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-4`,children:[t?(0,E.jsx)(r,{tone:`notice`,children:c(`sync.remoteHeadPreview`,{at:e.summary.createdAt,origin:e.origin??`—`})}):null,_?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`text-sm text-notice-ink`,children:c(`sync.conflictExplain`)}),(0,E.jsx)(`ul`,{className:`flex flex-col gap-2 text-xs text-notice-ink`,children:e.conflicts.map(e=>{let t=e.baseMode!==e.localMode||e.baseMode!==e.remoteMode;return(0,E.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,E.jsx)(`span`,{className:`font-mono`,children:e.path}),t?(0,E.jsx)(`span`,{className:`text-ink-muted`,children:c(`sync.conflictPermissions`,{base:e.baseMode??`—`,local:e.localMode??`—`,remote:e.remoteMode??`—`})}):null]},e.path)})}),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(i,{disabled:a,onClick:()=>g(`local`),children:c(`sync.keepMine`)}),(0,E.jsx)(i,{disabled:a,onClick:()=>g(`remote`),children:c(`sync.takeTheirs`)})]})]}):null,e.written.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:d,children:c(`sync.wouldWrite`,{count:e.written.length})}),(0,E.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-xs text-ink-muted`,children:e.written.map(e=>(0,E.jsx)(`li`,{children:e},e))})]}),e.removed.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:d,children:c(`sync.wouldRemove`,{count:e.removed.length})}),(0,E.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-xs text-danger`,children:e.removed.map(e=>(0,E.jsx)(`li`,{children:e},e))}),(0,E.jsx)(f,{label:c(`sync.confirmOverwrite`),checked:n,onChange:l,tone:`notice`,className:`rounded border border-notice-line bg-notice p-3`})]}),(0,E.jsx)(i,{kind:`primary`,disabled:a||_||o===`push`||e.removed.length>0&&!n,onClick:u,className:`self-start`,children:c(t?`sync.remoteHeadApply`:`sync.apply`)})]})]})}function se({busy:e,direction:t,historyDiff:n,historyState:a,keyConfigured:o,locale:c,selectedKey:l,t:u,onPreview:f,onRefresh:p,onSelect:m}){let h=a.phase===`ready`&&l!==null?a.value.revisions.find(e=>e.key===l):void 0;return(0,E.jsxs)(`section`,{"aria-labelledby":`sync-history-heading`,className:`flex flex-col gap-3 rounded-lg border border-line bg-surface-subtle p-4 lg:col-span-2`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{id:`sync-history-heading`,className:s,children:u(`sync.historyHeading`)}),(0,E.jsx)(`p`,{className:`mt-1 ${d}`,children:u(`sync.historyHint`)})]}),(0,E.jsx)(i,{disabled:e||!o||a.phase===`loading`,onClick:p,children:u(`sync.historyRefresh`)})]}),a.phase===`idle`?(0,E.jsx)(`p`,{className:d,children:u(`sync.historyNeedsKey`)}):a.phase===`loading`?(0,E.jsx)(`p`,{role:`status`,className:d,children:u(`sync.historyLoading`)}):a.phase===`error`?(0,E.jsx)(r,{tone:`danger`,children:a.message}):(0,E.jsxs)(`div`,{className:`border-t border-line pt-3`,children:[(0,E.jsx)(`p`,{className:d,children:u(`sync.historySummary`,{count:a.value.revisions.length,size:D(a.value.downloadedBytes,c)})}),a.value.historyTruncated||a.value.downloadTruncated?(0,E.jsx)(`p`,{className:`mt-1 text-xs text-notice-ink`,children:u(`sync.historyTruncated`)}):null,a.value.skipped>0?(0,E.jsx)(`p`,{className:`mt-1 text-xs text-notice-ink`,children:u(`sync.historySkipped`,{count:a.value.skipped})}):null,(0,E.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-[minmax(0,1.1fr)_minmax(18rem,0.9fr)]`,children:[(0,E.jsx)(`ol`,{className:`max-h-80 space-y-2 overflow-auto pr-1`,"aria-label":u(`sync.historyTimeline`),children:a.value.revisions.map(t=>(0,E.jsxs)(`li`,{className:`relative border-l-2 border-line pl-4`,children:[(0,E.jsx)(`span`,{className:`absolute -left-[5px] top-4 h-2 w-2 rounded-full bg-accent`}),(0,E.jsxs)(`button`,{type:`button`,disabled:e,onClick:()=>m(t.key),className:`w-full rounded border px-3 py-2 text-left ${l===t.key?`border-accent bg-select-fill`:`border-hairline bg-surface hover:border-line`}`,children:[(0,E.jsxs)(`span`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsx)(`span`,{className:`font-mono text-xs font-semibold text-ink`,children:t.revision.slice(0,12)}),(0,E.jsx)(`span`,{className:`rounded-full bg-toolbar px-2 py-0.5 text-[11px] font-medium text-ink-muted`,children:u(`sync.historyRelation.${t.relation}`)})]}),(0,E.jsx)(`span`,{className:`mt-1 block text-xs text-ink-muted`,children:u(`sync.historyRevisionMeta`,{at:t.createdAt,count:t.fileCount,origin:t.origin.slice(0,8)})}),(0,E.jsx)(`span`,{className:`mt-1 block text-sm font-medium text-ink`,children:t.message}),t.parentRevision===void 0?null:(0,E.jsx)(`span`,{className:`mt-1 block font-mono text-[11px] text-ink-muted`,children:u(`sync.historyParent`,{revision:t.parentRevision.slice(0,12)})})]})]},t.key))}),(0,E.jsx)(`div`,{className:`min-w-0 rounded border border-line bg-surface p-3`,children:h===void 0?(0,E.jsx)(`p`,{className:d,children:u(`sync.historySelect`)}):(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:u(`sync.historySelected`)}),(0,E.jsx)(`p`,{className:`mt-1 break-all font-mono text-xs text-ink`,children:h.key})]}),n===null?(0,E.jsx)(`p`,{role:`status`,className:d,children:u(e?`sync.historyDiffLoading`:`sync.historyDiffEmpty`)}):(0,E.jsx)(`div`,{className:`grid gap-2 text-xs sm:grid-cols-3 lg:grid-cols-1 xl:grid-cols-3`,children:[[`added`,n.added,`text-success`],[`modified`,n.modified,`text-notice-ink`],[`removed`,n.removed,`text-danger`]].map(([e,t,n])=>(0,E.jsxs)(`div`,{className:`min-w-0 rounded bg-toolbar p-2`,children:[(0,E.jsx)(`p`,{className:`font-medium ${n}`,children:u(`sync.historyDiff.${e}`,{count:t.length})}),(0,E.jsx)(`ul`,{className:`mt-1 max-h-24 space-y-0.5 overflow-auto font-mono text-[11px] text-ink-muted`,children:t.map(e=>(0,E.jsx)(`li`,{className:`break-all`,children:e},e))})]},e))}),(0,E.jsx)(`p`,{className:d,children:u(`sync.historyRestoreHint`)}),(0,E.jsx)(i,{kind:`primary`,disabled:e||t===`push`,onClick:()=>f(h.key),className:`self-start`,children:u(`sync.historyRestorePreview`)})]})})]})]})]})}var P=5;function ce({bucketState:e,locale:t,busy:n,historyExpanded:r,onToggleHistory:a,onRefresh:c}){let l=o(),u=e.phase===`ready`?e.value.history:[],f=r?u:u.slice(0,P);return(0,E.jsxs)(`section`,{"aria-labelledby":`sync-bucket-state-heading`,className:`flex flex-col gap-3 rounded-lg border border-line bg-surface-subtle p-4 lg:col-span-2`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{id:`sync-bucket-state-heading`,className:s,children:l(`sync.bucketStateHeading`)}),(0,E.jsx)(`p`,{className:`mt-1 ${d}`,children:l(`sync.bucketStateHint`)})]}),(0,E.jsx)(i,{disabled:n||e.phase===`loading`,onClick:c,children:l(`sync.bucketRefresh`)})]}),e.phase===`idle`?(0,E.jsx)(x,{tone:`empty`,title:l(`sync.bucketNotConfigured`)}):e.phase===`loading`?(0,E.jsx)(x,{tone:`loading`,title:l(`sync.bucketLoading`)}):e.phase===`error`?(0,E.jsx)(x,{tone:`failed`,title:e.message,action:(0,E.jsx)(i,{onClick:c,children:l(`sync.bucketRefresh`)})}):(0,E.jsxs)(`div`,{className:`grid gap-3 border-t border-line pt-3 lg:grid-cols-2`,children:[(0,E.jsxs)(`div`,{className:`rounded border border-line bg-surface p-3`,children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:l(`sync.bucketLive`)}),e.value.live===void 0?(0,E.jsx)(`p`,{className:`mt-2 text-sm text-ink-muted`,children:l(`sync.bucketLiveEmpty`)}):(0,E.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,E.jsx)(`p`,{className:d,children:l(`sync.bucketObjectMeta`,{size:D(e.value.live.size,t),at:e.value.live.lastModified??`—`})}),(0,E.jsx)(`p`,{className:`text-sm font-medium ${e.value.localIsLive?`text-success`:`text-notice-ink`}`,children:l(e.value.localIsLive?`sync.bucketLocalCurrent`:`sync.bucketLocalBehind`)}),(0,E.jsxs)(`details`,{className:`mt-1 text-xs text-ink-muted`,children:[(0,E.jsx)(`summary`,{className:`cursor-pointer`,children:l(`sync.bucketObjectName`)}),(0,E.jsx)(`p`,{className:`mt-1 break-all font-mono text-ink`,children:e.value.live.key})]})]})]}),(0,E.jsxs)(`div`,{className:`rounded border border-line bg-surface p-3`,children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-ink-muted`,children:l(`sync.bucketHistory`,{count:e.value.history.length})}),e.value.historyTruncated?(0,E.jsx)(`p`,{className:`mt-2 text-xs text-notice-ink`,children:l(`sync.bucketHistoryTruncated`)}):null,e.value.history.length===0?(0,E.jsx)(`p`,{className:`mt-2 text-sm text-ink-muted`,children:l(`sync.bucketHistoryEmpty`)}):(0,E.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,E.jsx)(`p`,{className:d,children:l(`sync.bucketHistoryShowing`,{shown:f.length,count:e.value.history.length})}),(0,E.jsx)(`ul`,{className:`max-h-64 space-y-2 overflow-auto pr-1`,children:f.map(e=>(0,E.jsxs)(`li`,{className:`rounded border border-hairline px-2 py-1.5`,children:[(0,E.jsx)(`p`,{className:d,children:l(`sync.bucketObjectMeta`,{size:D(e.size,t),at:e.lastModified??`—`})}),(0,E.jsxs)(`details`,{className:`mt-1 text-xs text-ink-muted`,children:[(0,E.jsx)(`summary`,{className:`cursor-pointer`,children:l(`sync.bucketObjectName`)}),(0,E.jsx)(`p`,{className:`mt-1 break-all font-mono text-ink`,children:e.key})]})]},e.key))}),e.value.history.length<=P?null:(0,E.jsx)(i,{onClick:a,className:`self-start`,children:l(r?`sync.bucketHistoryCollapse`:`sync.bucketHistoryExpand`)})]})]}),(0,E.jsx)(`p`,{className:`lg:col-span-2 ${d}`,children:l(`sync.bucketCheckedAt`,{at:e.value.checkedAt})})]})]})}function F({message:e,code:t}){return e===``?null:(0,E.jsx)(r,{tone:`danger`,children:(0,E.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,E.jsx)(`span`,{children:e}),t===``?null:(0,E.jsxs)(`code`,{className:`text-xs text-ink-muted`,children:[`Code: `,t]})]})})}var I={sync_not_configured:`sync.notConfigured`,wrong_master_password:`sync.wrongMaster`,wrong_passphrase:`sync.wrongKey`,sync_key_missing:`sync.keyMissing`,passphrase_too_short:`sync.keyTooShort`,bucket_authentication_failed:`sync.bucketAuthenticationFailed`,bucket_access_denied:`sync.bucketAccessDenied`,bucket_rate_limited:`sync.bucketRateLimited`,bucket_unavailable:`sync.bucketUnavailable`,bucket_refused:`sync.unreachable`,bucket_timeout:`sync.bucketTimeout`,bucket_dns_failed:`sync.bucketDNSFailed`,bucket_tls_failed:`sync.bucketTLSFailed`,bucket_unreachable:`sync.bucketUnreachable`,sync_failed:`sync.failed`,sync_internal_failed:`sync.internalFailed`,snapshot_download_incomplete:`sync.snapshotDownloadIncomplete`,snapshot_cost_refused:`sync.snapshotCostRefused`,snapshot_schema_unsupported:`sync.snapshotSchemaUnsupported`,snapshot_rejected:`sync.snapshotRejected`,snapshot_too_large:`sync.snapshotTooLarge`,sync_no_snapshot:`sync.noSnapshot`,endpoint_must_have_no_path:`sync.endpointPath`,sync_remote_moved:`sync.remoteMoved`,sync_remote_deleted:`sync.remoteDeleted`,sync_key_recovery_required:`sync.keyRecoveryRequired`,sync_key_recovery_target_change:`sync.keyRecoveryTargetChange`,sync_history_key_loss_confirmation_required:`sync.keyHistoryLossConfirm`,preview_stale:`sync.previewStale`,sync_nothing_to_push:`sync.noLocalChanges`,sync_commit_message_invalid:`sync.commitMessageInvalid`,sync_ignore_invalid:`sync.exclusions.invalid`,sync_setup_target_changed:`sync.setup.changed`,sync_setup_target_incomplete:`sync.setup.incomplete`,sync_local_changed:`sync.localChanged`,sync_workspace_busy:`sync.workspaceBusy`};function le({status:e,busy:t,remoteHeadBlocked:a,onToggleAuto:c,onSyncNow:l,onPreviewRemoteHead:u,onPreview:p,onForcePush:m}){let h=o();return(0,E.jsxs)(n,{as:`section`,radius:`md`,children:[(0,E.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{className:s,children:h(`sync.overviewHeading`)}),(0,E.jsx)(`p`,{className:`mt-1 ${d}`,children:e.synced?h(`sync.lastSynced`,{at:e.lastSyncedAt??``,count:e.fileCount??0}):h(`sync.neverSynced`)})]}),(0,E.jsx)(`span`,{className:`rounded-full bg-select-fill px-2 py-1 text-xs font-medium text-accent`,children:h(`sync.direction.${e.direction}`)})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,E.jsx)(f,{label:h(`sync.autoEnable`),hint:h(`sync.autoHint.${e.direction}`),checked:e.auto.enabled,disabled:t||!e.keyConfigured,onChange:c}),a?(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,E.jsx)(r,{tone:`danger`,children:h(e.direction===`pull`?`sync.autoBlockedRemoteMovedPull`:`sync.autoBlockedRemoteMoved`)}),(0,E.jsx)(`p`,{className:d,children:h(`sync.remoteHeadReviewHint`)})]}):e.auto.phase===`failed`?(0,E.jsx)(F,{message:h(e.auto.detail===`wrong_passphrase`?`sync.autoFailedWrongKey`:e.auto.detail===`snapshot_schema_unsupported`?`sync.autoFailedSchema`:I[e.auto.detail??``]??`sync.autoFailedLast`),code:e.auto.detail??`sync_failed`}):(0,E.jsx)(`p`,{role:`status`,className:d,children:e.auto.phase===`blocked`?h(e.auto.detail===`conflicts`?`sync.autoBlockedConflicts`:e.auto.detail===`remote_deleted`?`sync.autoBlockedRemoteDeleted`:`sync.autoBlockedRemovals`):e.auto.at===void 0?h(`sync.autoIdle`):h(`sync.autoLastRan`,{at:e.auto.at})}),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(i,{kind:`primary`,disabled:t||!e.keyConfigured,onClick:a?u:l,children:h(a?`sync.remoteHeadReview`:`sync.autoNow.${e.direction}`)}),e.direction===`push`||a?null:(0,E.jsx)(i,{disabled:t||!e.keyConfigured,onClick:p,children:h(`sync.checkRemoteChanges`)}),e.direction===`push`?null:(0,E.jsx)(i,{disabled:t||!e.keyConfigured,onClick:u,children:h(`sync.forcePull`)}),e.direction===`pull`?null:(0,E.jsx)(i,{kind:`danger`,disabled:t||!e.keyConfigured,onClick:m,children:h(`sync.forcePushShort`)})]})]})]})}function L({status:e,busy:t,form:n,onSave:r}){let a=o(),{chooseOwn:c,setChooseOwn:l,ownKey:u,setOwnKey:d,confirmHistoryLoss:m,setConfirmHistoryLoss:h}=n;return(0,E.jsxs)(`section`,{"aria-labelledby":`sync-key-heading`,className:`overflow-hidden rounded-md border border-line bg-card`,children:[(0,E.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(p,{name:`sync`,className:`h-4 w-4 text-ink-muted`}),(0,E.jsx)(`h3`,{id:`sync-key-heading`,className:s,children:a(`sync.key`)})]}),(0,E.jsx)(`span`,{className:`rounded-full px-2 py-1 text-xs font-medium ${e.keyConfigured?`bg-select-fill text-accent`:`bg-notice text-notice-ink`}`,children:e.keyConfigured?a(`sync.keyReady`):a(`sync.keyNeeded`)})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,E.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:a(`sync.keyHint`)}),(0,E.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:a(e.keyConfigured?`sync.keySet`:`sync.keyMissing`)}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line pt-3`,children:[(0,E.jsx)(f,{label:a(`sync.keyChooseOwn`),checked:c,onChange:l}),c?(0,E.jsx)(b,{label:a(`sync.keyOwnValue`),value:u,onChange:d}):null,e.keyConfigured?(0,E.jsx)(f,{label:a(`sync.keyHistoryLossConfirm`),checked:m,onChange:h,tone:`danger`}):null,(0,E.jsx)(i,{kind:`primary`,disabled:t||c&&u===``||e.keyConfigured&&!m,onClick:r,className:`self-start`,children:e.keyConfigured?a(`sync.keyReplace`):a(`sync.keyCreate`)})]})]})]})}function R({label:e,children:t,hint:n,interactiveChildren:r=!1}){let i=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`span`,{className:`w-full shrink-0 text-sm text-ink-muted sm:w-32`,children:e}),(0,E.jsx)(`span`,{className:`flex min-w-0 flex-1 justify-start sm:ml-auto sm:justify-end`,children:t})]});return(0,E.jsxs)(`div`,{className:`border-t border-hairline first:border-t-0`,children:[r?(0,E.jsx)(`div`,{className:`flex flex-col items-stretch gap-2 px-3 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2`,children:i}):(0,E.jsx)(`label`,{className:`flex flex-col items-stretch gap-2 px-3 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2`,children:i}),n===void 0?null:(0,E.jsx)(`p`,{className:`px-3 pb-3 sm:pb-2 ${d}`,children:n})]})}function ue({status:e,busy:t,form:n,onCheckSetup:a,onCompleteSetup:c,onSaveKey:u}){let m=o(),{endpoint:h,bucket:g,path:_,region:v,accessKeyId:y,secretAccessKey:x,direction:S,setupCheck:C,ownKey:w,chooseOwn:T,editingSettings:D,settingsOpen:O,editSettings:k,setEndpoint:A,setBucket:j,setPath:ee,setRegion:M,setAccessKeyId:te,setSecretAccessKey:ne,setDirection:re,setOwnKey:N,setChooseOwn:ie,setEditingSettings:ae,setSettingsOpen:oe}=n;return(0,E.jsxs)(`details`,{open:!e.configured||O,onToggle:t=>{e.configured&&oe(t.currentTarget.open)},className:e.configured?`group overflow-hidden rounded-md border border-control-line bg-card`:`group`,children:[e.configured?(0,E.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-3 bg-toolbar px-4 py-3 text-sm font-medium text-ink marker:hidden hover:bg-select-fill`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex size-5 shrink-0 items-center justify-center text-base text-ink-muted transition-transform group-open:rotate-90`,children:`›`}),(0,E.jsx)(`span`,{children:m(`sync.manageSettings`)})]}):null,(0,E.jsxs)(`div`,{className:e.configured?`flex flex-col gap-4 border-t border-line bg-surface-subtle p-4`:`flex flex-col gap-6`,children:[(0,E.jsx)(`p`,{className:`rounded-md bg-toolbar px-4 py-3 ${d}`,children:m(`sync.warning`)}),(0,E.jsxs)(`section`,{className:`overflow-hidden rounded-md border border-line bg-card`,children:[(0,E.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(p,{name:`remoteKeys`,className:`h-4 w-4 text-ink-muted`}),(0,E.jsx)(`h3`,{className:s,children:m(`sync.bucketHeading`)})]}),e.configured?(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,E.jsxs)(`p`,{className:`font-mono text-xs text-ink-muted`,children:[[e.endpoint,e.bucket,e.path].filter(e=>e!==``&&e!==void 0).join(`/`),e.region!==void 0&&e.region!==``?` (${e.region})`:``]}),D?null:(0,E.jsx)(i,{onClick:()=>k(e),children:m(`sync.editSettings`)})]}):(0,E.jsx)(`p`,{className:`text-xs text-ink-muted`,children:m(`sync.notConfigured`)})]}),!e.configured||D?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`px-1 py-2 sm:px-3`,children:[(0,E.jsx)(R,{label:m(`sync.endpoint`),hint:m(`sync.endpointHint`),children:(0,E.jsx)(`input`,{value:h,onChange:e=>A(e.target.value),placeholder:`https://.r2.cloudflarestorage.com`,className:l})}),(0,E.jsx)(R,{label:m(`sync.bucket`),children:(0,E.jsx)(`input`,{value:g,onChange:e=>j(e.target.value),className:l})}),(0,E.jsx)(R,{label:m(`sync.path`),hint:m(`sync.pathHint`),children:(0,E.jsx)(`input`,{value:_,onChange:e=>ee(e.target.value),className:l})}),(0,E.jsx)(R,{label:m(`sync.region`),hint:m(`sync.regionHint`),children:(0,E.jsx)(`input`,{value:v,onChange:e=>M(e.target.value),className:l})}),(0,E.jsx)(R,{label:m(`sync.accessKeyId`),children:(0,E.jsx)(`input`,{value:y,onChange:e=>te(e.target.value),className:l})}),(0,E.jsx)(R,{label:m(`sync.secretAccessKey`),hint:m(`sync.credentialsNote`),interactiveChildren:!0,children:(0,E.jsx)(b,{label:m(`sync.secretAccessKey`),value:x,onChange:ne})}),(0,E.jsx)(R,{label:m(`sync.direction`),hint:m(`sync.direction.${S}.hint`),children:(0,E.jsxs)(`select`,{value:S,onChange:e=>re(e.target.value),className:l,children:[(0,E.jsx)(`option`,{value:`both`,children:m(`sync.role.main`)}),(0,E.jsx)(`option`,{value:`pull`,children:m(`sync.role.receive`)}),(0,E.jsx)(`optgroup`,{label:m(`sync.role.advanced`),children:(0,E.jsx)(`option`,{value:`push`,children:m(`sync.role.send`)})})]})})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line bg-toolbar px-4 py-3`,children:[C===null?null:(0,E.jsxs)(r,{tone:C.state===`incomplete`?`danger`:`notice`,children:[m(`sync.setup.${C.state}`),C.state===`incomplete`?` ${m(`sync.setup.useAnotherPath`)}`:``]}),C===null||C.state===`incomplete`?null:(0,E.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-line bg-surface p-3`,children:[(0,E.jsx)(`p`,{className:`text-sm text-ink`,children:C.state===`existing`?m(`sync.setup.existingKey`):m(`sync.setup.emptyKey`)}),C.state===`empty`?(0,E.jsx)(f,{label:m(`sync.keyChooseOwn`),checked:T,onChange:ie}):null,C.state===`existing`||T?(0,E.jsx)(b,{label:m(`sync.keyOwnValue`),value:w,onChange:N}):null,(0,E.jsx)(i,{kind:`primary`,disabled:t||C.state===`existing`&&w===``||T&&w===``,onClick:c,children:m(`sync.setup.save`)})]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(i,{disabled:t||h===``||g===``||y===``||x===``,onClick:a,children:m(`sync.setup.check`)}),e.configured?(0,E.jsx)(i,{disabled:t,onClick:()=>ae(!1),children:m(`sync.cancelSettings`)}):null]})]})]}):null]}),e.configured?(0,E.jsx)(L,{status:e,busy:t,form:n,onSave:u}):null]})]})}function de({status:e,busy:t,pushDraft:r,pushMessage:a,onMessageChange:c,onPush:u,onPreview:f}){let p=o(),m=r===null?null:r.added+r.modified+r.removed;return(0,E.jsxs)(n,{as:`section`,"aria-labelledby":`sync-transfer-heading`,radius:`md`,className:`flex flex-col gap-3 p-4`,children:[(0,E.jsx)(`h3`,{id:`sync-transfer-heading`,className:s,children:p(`sync.transferHeading`)}),(0,E.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:p(`sync.transferHint.${e.direction}`)}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-1 border-t border-line pt-3 text-sm text-ink`,children:[(0,E.jsx)(`label`,{htmlFor:`sync-commit-message`,className:`font-medium`,children:p(`sync.commitMessage`)}),(0,E.jsx)(`input`,{id:`sync-commit-message`,"aria-describedby":`sync-commit-message-hint`,value:a,maxLength:240,onChange:e=>c(e.target.value),className:l,placeholder:p(`sync.commitMessagePlaceholder`)}),(0,E.jsx)(`span`,{id:`sync-commit-message-hint`,className:d,children:r===null?p(`sync.commitMessageHint`):m===0?p(`sync.noLocalChanges`):p(`sync.commitMessageChanges`,{added:r.added,modified:r.modified,removed:r.removed})})]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-t border-line pt-3`,children:[(0,E.jsx)(i,{kind:`primary`,disabled:t||!e.keyConfigured||a.trim()===``||m===null||m===0,onClick:u,children:p(`sync.push`)}),(0,E.jsx)(i,{disabled:t||!e.keyConfigured,onClick:f,children:p(`sync.preview`)})]})]})}function fe({master:e,busy:t,onMasterChange:r,onUnlock:a}){let s=o();return(0,E.jsxs)(n,{as:`section`,radius:`md`,className:`grid md:grid-cols-[minmax(0,0.9fr)_minmax(18rem,1.1fr)]`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col justify-between gap-8 bg-toolbar p-6 md:p-8`,children:[(0,E.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-md bg-select-fill text-accent`,children:(0,E.jsx)(p,{name:`sync`,className:`h-6 w-6`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{className:`text-lg font-semibold text-ink`,children:s(`sync.bucketHeading`)}),(0,E.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-ink-muted`,children:s(`sync.sealed`)})]})]}),(0,E.jsxs)(`div`,{className:`flex flex-col justify-center gap-4 p-6 md:p-8`,children:[(0,E.jsx)(y,{label:s(`secrets.master`),value:e,onChange:r}),(0,E.jsx)(i,{kind:`primary`,disabled:t||e===``,onClick:a,className:`self-start`,children:s(`secrets.unlock`)})]})]})}var pe=3e4,me={..._,...h},z=`[&_button]:min-h-10 md:[&_button]:min-h-0`;function he(){let e=o();return(0,E.jsx)(`ol`,{"aria-label":e(`sync.flowHeading`),className:`grid overflow-hidden rounded-md border border-line bg-toolbar sm:grid-cols-3`,children:[`sync.flowBucket`,`sync.flowKey`,`sync.flowOperate`].map((t,n)=>(0,E.jsxs)(`li`,{className:`flex items-center gap-3 border-b border-hairline px-4 py-3 last:border-b-0 sm:border-b-0 sm:border-r sm:last:border-r-0`,children:[(0,E.jsx)(`span`,{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-select-fill font-mono text-xs font-semibold text-accent`,children:n+1}),(0,E.jsx)(`span`,{className:`text-sm text-ink`,children:e(t)})]},t))})}function B({api:e=me}){let{locale:t,t:n}=c(),[a,o]=(0,T.useState)({phase:`loading`}),s=te(),[l,u]=(0,T.useState)(``),[f,p]=(0,T.useState)(``),{bucketState:m,historyState:h,selectedHistoryKey:g,bucketHistoryExpanded:_,pushDraft:v,pushMessage:y,refreshBucket:b,refreshHistory:C,refreshPushDraft:D,resetBucket:O,resetHistory:A,resetPush:j,selectHistory:M,toggleBucketHistory:N,editPushMessage:P,acceptPushMessage:L}=ne(e,n),[R,B]=(0,T.useState)(null),[ge,V]=(0,T.useState)(!1),{resultView:H,notice:U,error:_e,errorCode:ve,busy:W,execute:ye,clearError:be,showNotice:G,showResult:K}=re(n,I),q=ie(),{preview:J,historyKey:Y,acceptRemoteHead:xe,acceptedRemovals:Se,resolve:Ce}=q,X=(0,T.useCallback)(async()=>{o({phase:`loading`});try{let t=await e.syncStatus();o({phase:`ready`,value:t}),t.configured?b():O(),t.configured&&t.keyConfigured?C():A(),t.configured&&t.direction!==`pull`?D():j(),t.direction===`pull`&&t.auto.phase===`blocked`&&t.auto.detail===`remote_moved`&&be()}catch{o({phase:`error`,message:n(`sync.statusFailed`)})}},[e,b,C,D,O,A,j,n,be]);(0,T.useEffect)(()=>{X()},[X]),S(b,{intervalMs:pe,enabled:a.phase===`ready`&&a.value.configured&&!a.value.locked});async function Z(e,t,n,r){await ye(e,t,n,r,async e=>e!==`sync_remote_moved`||a.phase!==`ready`||a.value.direction!==`pull`?!1:(await X(),!0))}async function Q(t,r){q.prepare(t,r),await Z(()=>e.pullSnapshot(!1,t,r),e=>{q.show(e),K({kind:`preview`,result:e}),G(e.written.length+e.removed.length+e.conflicts.length===0?n(`sync.alreadyMatches`):``)},n(`sync.pullFailed`))}async function we(){q.prepareRemoteHead(),await Z(()=>e.pullSnapshot(!1,`remote`,void 0,void 0,!0),e=>{q.show(e),K({kind:`preview`,result:e}),G(e.written.length+e.removed.length===0?n(`sync.alreadyMatches`):``)},n(`sync.pullFailed`))}async function Te(t){M(t),B(null),await Z(()=>e.diffSyncHistory(t),e=>B(e),n(`sync.historyDiffFailed`))}if(a.phase===`loading`)return(0,E.jsx)(x,{tone:`loading`,title:n(`sync.loading`)});if(a.phase===`error`)return(0,E.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${z}`,children:[(0,E.jsx)(w,{title:n(`sync.heading`),description:n(`sync.pageDescription`)}),(0,E.jsx)(r,{tone:`danger`,children:a.message}),(0,E.jsx)(i,{onClick:()=>void X(),className:`self-start`,children:n(`shell.bootstrapRetry`)})]});let $=a.value;if($.locked)return(0,E.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${z}`,children:[(0,E.jsx)(w,{title:n(`sync.heading`),description:n(`sync.pageDescription`)}),(0,E.jsx)(F,{message:_e,code:ve}),(0,E.jsx)(fe,{master:l,busy:W,onMasterChange:u,onUnlock:()=>void Z(()=>e.unlockVault(l),()=>{u(``),X()},n(`sync.unlockFailed`),e=>e===`vault_missing`?n(`sync.noVault`):``)})]});let Ee=$.auto.phase===`blocked`&&$.auto.detail===`remote_moved`;function De(e,t){o({phase:`ready`,value:e.status}),q.close(),K({kind:`push`,result:e.result}),G(n(t)),L(),D(),b(),C()}return(0,E.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 ${z}`,children:[(0,E.jsx)(w,{title:n(`sync.heading`),description:n(`sync.pageDescription`)}),$.configured?null:(0,E.jsx)(he,{}),(0,E.jsx)(F,{message:_e,code:ve}),U===``?null:(0,E.jsx)(`p`,{role:`status`,className:`text-sm text-ink-muted`,children:U}),f===``?null:(0,E.jsxs)(r,{tone:`notice`,children:[(0,E.jsx)(`span`,{className:`block`,children:n(`sync.keyShownOnce`)}),(0,E.jsx)(`output`,{className:`mt-2 block select-all break-all font-mono text-sm`,children:f})]}),$.configured?(0,E.jsx)(le,{status:$,busy:W,remoteHeadBlocked:Ee,onToggleAuto:t=>void Z(()=>e.setAutoSync(t),e=>o({phase:`ready`,value:e}),n(`sync.autoFailed`)),onSyncNow:()=>void Z(()=>e.syncNow(),e=>o({phase:`ready`,value:e}),n(`sync.autoNowFailed`)),onPreviewRemoteHead:()=>void we(),onPreview:()=>void Q(void 0),onForcePush:()=>V(!0)}):null,$.configured?(0,E.jsx)(ee,{api:e,onSaved:()=>{D()}}):null,(0,E.jsx)(ue,{status:$,busy:W,form:s,onCheckSetup:()=>void Z(()=>e.checkSyncSetup(s.setupInput),e=>{s.setSetupCheck(e),s.setOwnKey(``),s.setChooseOwn(!1)},n(`sync.configureFailed`)),onCompleteSetup:()=>{let{setupCheck:t,chooseOwn:r,ownKey:i}=s;t!==null&&Z(()=>e.completeSyncSetup({...s.setupInput,direction:s.direction,expectedState:t.state,...t.etag===void 0?{}:{expectedETag:t.etag},historyPresent:t.historyPresent,reuseKey:!1,key:t.state===`existing`||r?i:``}),e=>{o({phase:`ready`,value:e.status}),p(e.generatedKey??``),s.setOwnKey(``),s.setAccessKeyId(``),s.setSecretAccessKey(``),s.setSetupCheck(null),s.setEditingSettings(!1),s.setSettingsOpen(!1),G(e.generatedKey===void 0?n(`sync.setup.saved`):n(`sync.keyShownOnce`))},n(`sync.configureFailed`))},onSaveKey:()=>{let{chooseOwn:t,ownKey:r}=s;Z(()=>$.keyConfigured?e.setSyncKey(t?r:void 0,!0):e.setSyncKey(t?r:void 0),e=>{p(t?``:e.key),s.setOwnKey(``),s.setConfirmHistoryLoss(!1),G(n(`sync.keySaved`)),X()},n(`sync.keyFailed`))}}),$.configured&&$.direction!==`pull`?(0,E.jsx)(de,{status:$,busy:W,pushDraft:v,pushMessage:y,onMessageChange:P,onPush:()=>void Z(()=>e.pushSnapshot(y.trim()),e=>De(e,`sync.pushed`),n(`sync.pushFailed`)),onPreview:()=>void Q(void 0)}):null,$.configured?(0,E.jsxs)(`details`,{className:`group overflow-hidden rounded-md border border-control-line bg-card`,children:[(0,E.jsxs)(`summary`,{className:`flex cursor-pointer list-none flex-wrap items-center justify-between gap-3 bg-toolbar px-4 py-3 marker:hidden hover:bg-select-fill`,children:[(0,E.jsxs)(`span`,{className:`flex items-center gap-3 text-sm font-medium text-ink`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex size-5 shrink-0 items-center justify-center text-base text-ink-muted transition-transform group-open:rotate-90`,children:`›`}),n(`sync.detailsHeading`)]}),(0,E.jsx)(`span`,{className:d,children:$.synced?n(`sync.lastSynced`,{at:$.lastSyncedAt??``,count:$.fileCount??0}):n(`sync.neverSynced`)})]}),(0,E.jsxs)(`div`,{className:`grid gap-4 border-t border-line bg-surface-subtle p-4 lg:grid-cols-2`,children:[(0,E.jsx)(ce,{bucketState:m,locale:t,busy:W,historyExpanded:_,onToggleHistory:N,onRefresh:()=>void b()}),(0,E.jsx)(se,{busy:W,direction:$.direction,historyDiff:R,historyState:h,keyConfigured:$.keyConfigured,locale:t,selectedKey:g,t:n,onPreview:e=>void Q(void 0,e),onRefresh:()=>void C(),onSelect:e=>void Te(e)})]})]}):null,ge?(0,E.jsx)(ae,{busy:W,keyConfigured:$.keyConfigured,message:y,t:n,onMessageChange:P,onClose:()=>V(!1),onSubmit:()=>void Z(()=>e.forcePushSnapshot(y.trim()),e=>{De(e,`sync.forcePushed`),V(!1)},n(`sync.forceFailed`))}):null,H===null?$.lastOperation===void 0?null:(0,E.jsx)(k,{view:{kind:`previous`,operation:$.lastOperation}}):(0,E.jsx)(k,{view:H}),J===null?null:(0,E.jsx)(oe,{preview:J,acceptRemoteHead:xe,acceptedRemovals:Se,busy:W,direction:$.direction,t:n,onAcceptRemovals:q.acceptRemovals,onClose:q.close,onResolve:e=>void Q(e,Y),onApply:()=>void Z(()=>xe?e.pullSnapshot(!0,Ce,Y,J,!0):e.pullSnapshot(!0,Ce,Y,J),e=>{q.replace(e),K({kind:`apply`,result:e}),G(n(`sync.applied`)),X()},n(`sync.applyFailed`))})]})}export{B as SyncPanel}; \ No newline at end of file diff --git a/internal/ui/dist/assets/TerminalView-UxyIAgy5.js b/internal/ui/dist/assets/TerminalView-DZqn0XNz.js similarity index 75% rename from internal/ui/dist/assets/TerminalView-UxyIAgy5.js rename to internal/ui/dist/assets/TerminalView-DZqn0XNz.js index 108ee1aa1..fff40e590 100644 --- a/internal/ui/dist/assets/TerminalView-UxyIAgy5.js +++ b/internal/ui/dist/assets/TerminalView-DZqn0XNz.js @@ -1,11 +1,11 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,h as r,n as i,r as a,t as o}from"./surface-Ck_FblzE.js";import{_ as s,i as c,n as l,s as u,t as d}from"./form-C1olpQVF.js";import{t as f}from"./clipboard-ObSO6ZLv.js";import{$ as p,B as m,E as h,F as g,J as _,M as v,N as ee,P as y,Q as te,R as ne,U as re,V as ie,W as b,_ as ae,ft as x,h as oe,j as S,lt as C,m as se,mt as w,nt as T,o as E,s as ce,y as le,z as ue}from"./index-DJ8h9zNi.js";import{r as de,t as D}from"./fonts-CUObG_Dx.js";import{r as fe,t as pe}from"./reducedMotion-XhcdVu33.js";var O=e(),me=2,he=1,ge=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(me,Math.floor(u/e.css.cell.width)),rows:Math.max(he,Math.floor(l/e.css.cell.height))}}},_e=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Se.isErrorNoTelemetry(e)?new Se(e.message+` +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{_ as n,n as r,r as i,t as a,y as o}from"./surface-DPFJ-mE2.js";import{_ as s,i as c,n as l,s as u,t as d}from"./form-zbLY2cuV.js";import{t as f}from"./clipboard-ObSO6ZLv.js";import{$ as p,F as m,G as h,I as g,J as _,K as v,L as y,P as ee,R as b,S as te,U as ne,W as x,Y as S,_ as re,_t as C,b as ie,bt as w,it as ae,k as oe,mt as T,o as E,rt as se,s as ce,st as le,v as ue}from"./index-DtC-pXtZ.js";import{r as de,t as fe}from"./fonts-Dday_bgd.js";import{r as pe,t as me}from"./reducedMotion-XhcdVu33.js";var D=e(),he=2,ge=1,_e=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(he,Math.floor(u/e.css.cell.width)),rows:Math.max(ge,Math.floor(l/e.css.cell.height))}}},ve=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Ce.isErrorNoTelemetry(e)?new Ce(e.message+` `+e.stack):Error(e.message+` -`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function ve(e){be(e)||_e.onUnexpectedError(e)}var ye=`Canceled`;function be(e){return e instanceof xe||e instanceof Error&&e.name===ye&&e.message===ye}var xe=class extends Error{constructor(){super(ye),this.name=this.message}},Se=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}};function Ce(e,t,n=0,r=e.length){let i=n,a=r;for(;i{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Te||={});function Ee(e,t){return(n,r)=>t(e(n),e(r))}var De=(e,t)=>e-t,Oe=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||Te.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};Oe.empty=new Oe(e=>{});function ke(e,t){let n=Object.create(null);for(let r of e){let e=t(r),i=n[e];i||=n[e]=[],i.push(r)}return n}var Ae=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){return this.map.get(e)||new Set}};function je(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var Me;(e=>{function t(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);tt.source!==null&&!this.getRootParent(t,e).isSingleton).flatMap(([e])=>e)}computeLeakingDisposables(e=10,t){let n;if(t)n=t;else{let e=new Map,t=[...this.livingDisposables.values()].filter(t=>t.source!==null&&!this.getRootParent(t,e).isSingleton);if(t.length===0)return;let r=new Set(t.map(e=>e.value));if(n=t.filter(e=>!(e.parent&&r.has(e.parent))),n.length===0)throw Error(`There are cyclic diposable chains!`)}if(!n)return;function r(e){function t(e,t){for(;e.length>0&&t.some(t=>typeof t==`string`?t===e[0]:e[0].match(t));)e.shift()}let n=e.source.split(` -`).map(e=>e.trim().replace(`at `,``)).filter(e=>e!==``);return t(n,[`Error`,/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),n.reverse()}let i=new Ae;for(let e of n){let t=r(e);for(let n=0;n<=t.length;n++)i.add(t.slice(0,n).join(` -`),e)}n.sort(Ee(e=>e.idx,De));let a=``,o=0;for(let t of n.slice(0,e)){o++;let e=r(t),s=[];for(let t=0;t{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function ye(e){xe(e)||ve.onUnexpectedError(e)}var be=`Canceled`;function xe(e){return e instanceof Se||e instanceof Error&&e.name===be&&e.message===be}var Se=class extends Error{constructor(){super(be),this.name=this.message}},Ce=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}};function we(e,t,n=0,r=e.length){let i=n,a=r;for(;i{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ee||={});function De(e,t){return(n,r)=>t(e(n),e(r))}var Oe=(e,t)=>e-t,ke=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||Ee.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};ke.empty=new ke(e=>{});function Ae(e,t){let n=Object.create(null);for(let r of e){let e=t(r),i=n[e];i||=n[e]=[],i.push(r)}return n}var je=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){return this.map.get(e)||new Set}};function Me(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var Ne;(e=>{function t(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);tt.source!==null&&!this.getRootParent(t,e).isSingleton).flatMap(([e])=>e)}computeLeakingDisposables(e=10,t){let n;if(t)n=t;else{let e=new Map,t=[...this.livingDisposables.values()].filter(t=>t.source!==null&&!this.getRootParent(t,e).isSingleton);if(t.length===0)return;let r=new Set(t.map(e=>e.value));if(n=t.filter(e=>!(e.parent&&r.has(e.parent))),n.length===0)throw Error(`There are cyclic diposable chains!`)}if(!n)return;function r(e){function t(e,t){for(;e.length>0&&t.some(t=>typeof t==`string`?t===e[0]:e[0].match(t));)e.shift()}let n=e.source.split(` +`).map(e=>e.trim().replace(`at `,``)).filter(e=>e!==``);return t(n,[`Error`,/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),n.reverse()}let i=new je;for(let e of n){let t=r(e);for(let n=0;n<=t.length;n++)i.add(t.slice(0,n).join(` +`),e)}n.sort(De(e=>e.idx,Oe));let a=``,o=0;for(let t of n.slice(0,e)){o++;let e=r(t),s=[];for(let t=0;tr(e)[t]),e=>e);delete o[e[t]];for(let[e,t]of Object.entries(o))s.unshift(` - stacktraces of ${t.length} other leaks continue with ${e}`);s.unshift(a)}a+=` @@ -19,17 +19,17 @@ ${s.join(` ... and ${n.length-e} more leaking disposables -`),{leaks:n,details:a}}};Pe.idx=0;function Fe(e){return Ne?.trackDisposable(e),e}function Ie(e){Ne?.markAsDisposed(e)}function Le(e,t){Ne?.setParent(e,t)}function Re(e){if(Me.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function ze(...e){return Be(()=>Re(e))}function Be(e){let t=Fe({dispose:je(()=>{Ie(t),e()})});return t}var Ve=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,Fe(this)}dispose(){this._isDisposed||(Ie(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Re(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return Le(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),Le(e,null))}};Ve.DISABLE_DISPOSED_WARNING=!1;var He=Ve,Ue=class{constructor(){this._store=new He,Fe(this),Le(this._store,this)}dispose(){Ie(this),this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}};Ue.None=Object.freeze({dispose(){}});var We=class{constructor(){this._isDisposed=!1,Fe(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Le(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Ie(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Le(e,null),e}},Ge=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};Ge.Undefined=new Ge(void 0);var Ke=globalThis.performance&&typeof globalThis.performance.now==`function`,qe=class e{static create(t){return new e(t)}constructor(e){this._now=Ke&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}},Je;(e=>{e.None=()=>Ue.None;function t(e,t){return d(e,()=>{},0,void 0,!0,void 0,t)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(e,t,n){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=r;function i(e,t,n){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=i;function a(e,t,n){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=a;function o(e){return e}e.signal=o;function s(...e){return(t,n=null,r)=>u(ze(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=s;function c(e,t,n,i){let a=n;return r(e,e=>(a=t(a,e),a),i)}e.reduce=c;function l(e,t){let n,r=new st({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function u(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function d(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new st({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=0,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=d;function f(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)}e.accumulate=f;function p(e,t=(e,t)=>e===t,n){let r=!0,i;return a(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=p;function m(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=m;function h(e,t=!1,n=[],r){let i=n.slice(),a=e(e=>{i?i.push(e):s.fire(e)});r&&r.add(a);let o=()=>{i?.forEach(e=>s.fire(e)),i=null},s=new st({onWillAddFirstListener(){a||(a=e(e=>s.fire(e)),r&&r.add(a))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){a&&a.dispose(),a=null}});return r&&r.add(s),s.event}e.buffer=h;function g(e,t){return(n,r,i)=>{let a=t(new v);return e(function(e){let t=a.evaluate(e);t!==_&&n.call(r,t)},void 0,i)}}e.chain=g;let _=Symbol(`HaltChainable`);class v{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:_),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:_}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===_)break;return e}}function ee(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new st({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=ee;function y(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new st({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=y;function te(e){return new Promise(t=>n(e)(t))}e.toPromise=te;function ne(e){let t=new st;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event}e.fromPromise=ne;function re(e,t){return e(e=>t.fire(e))}e.forward=re;function ie(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=ie;class b{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new st(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ae(e,t){return new b(e,t).emitter.event}e.fromObservable=ae;function x(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return r instanceof He?r.add(s):Array.isArray(r)&&r.push(s),s}}e.fromObservableLight=x})(Je||={});var Ye=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new qe,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};Ye.all=new Set,Ye._idPool=0;var Xe=Ye,Ze=-1,Qe=class e{constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Be(...e){return Ve(()=>ze(e))}function Ve(e){let t=Ie({dispose:Me(()=>{Le(t),e()})});return t}var He=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,Ie(this)}dispose(){this._isDisposed||(Le(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ze(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return Re(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),Re(e,null))}};He.DISABLE_DISPOSED_WARNING=!1;var Ue=He,We=class{constructor(){this._store=new Ue,Ie(this),Re(this._store,this)}dispose(){Le(this),this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}};We.None=Object.freeze({dispose(){}});var Ge=class{constructor(){this._isDisposed=!1,Ie(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Re(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Le(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Re(e,null),e}},Ke=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};Ke.Undefined=new Ke(void 0);var qe=globalThis.performance&&typeof globalThis.performance.now==`function`,Je=class e{static create(t){return new e(t)}constructor(e){this._now=qe&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}},Ye;(e=>{e.None=()=>We.None;function t(e,t){return d(e,()=>{},0,void 0,!0,void 0,t)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(e,t,n){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=r;function i(e,t,n){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=i;function a(e,t,n){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=a;function o(e){return e}e.signal=o;function s(...e){return(t,n=null,r)=>u(Be(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=s;function c(e,t,n,i){let a=n;return r(e,e=>(a=t(a,e),a),i)}e.reduce=c;function l(e,t){let n,r=new ct({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function u(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function d(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new ct({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=0,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=d;function f(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)}e.accumulate=f;function p(e,t=(e,t)=>e===t,n){let r=!0,i;return a(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=p;function m(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=m;function h(e,t=!1,n=[],r){let i=n.slice(),a=e(e=>{i?i.push(e):s.fire(e)});r&&r.add(a);let o=()=>{i?.forEach(e=>s.fire(e)),i=null},s=new ct({onWillAddFirstListener(){a||(a=e(e=>s.fire(e)),r&&r.add(a))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){a&&a.dispose(),a=null}});return r&&r.add(s),s.event}e.buffer=h;function g(e,t){return(n,r,i)=>{let a=t(new v);return e(function(e){let t=a.evaluate(e);t!==_&&n.call(r,t)},void 0,i)}}e.chain=g;let _=Symbol(`HaltChainable`);class v{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:_),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:_}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===_)break;return e}}function y(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new ct({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=y;function ee(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new ct({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=ee;function b(e){return new Promise(t=>n(e)(t))}e.toPromise=b;function te(e){let t=new ct;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event}e.fromPromise=te;function ne(e,t){return e(e=>t.fire(e))}e.forward=ne;function x(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=x;class S{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new ct(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function re(e,t){return new S(e,t).emitter.event}e.fromObservable=re;function C(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return r instanceof Ue?r.add(s):Array.isArray(r)&&r.push(s),s}}e.fromObservableLight=C})(Ye||={});var Xe=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new Je,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};Xe.all=new Set,Xe._idPool=0;var Ze=Xe,Qe=-1,$e=class e{constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t0||this._options?.leakWarningThreshold?new $e(e?.onListenerError??ve,this._options?.leakWarningThreshold??Ze):void 0,this._perfMon=this._options?._profName?new Xe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new nt(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||ve)(n),Ue.None}if(this._disposed)return Ue.None;t&&(e=e.bind(t));let r=new it(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=et.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof it?(this._deliveryQueue??=new ct,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Be(()=>{ot?.unregister(a),i?.(),this._removeListener(r)});if(n instanceof He?n.add(a):Array.isArray(n)&&n.push(a),ot){let e=Error().stack.split(` +`))}},nt=class extends Error{constructor(e,t){super(e),this.name=`ListenerLeakError`,this.stack=t}},rt=class extends Error{constructor(e,t){super(e),this.name=`ListenerRefusalError`,this.stack=t}},it=0,at=class{constructor(e){this.value=e,this.id=it++}},ot=2,st,ct=class{constructor(e){this._size=0,this._options=e,this._leakageMon=Qe>0||this._options?.leakWarningThreshold?new et(e?.onListenerError??ye,this._options?.leakWarningThreshold??Qe):void 0,this._perfMon=this._options?._profName?new Ze(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new rt(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||ye)(n),We.None}if(this._disposed)return We.None;t&&(e=e.bind(t));let r=new at(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=tt.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof at?(this._deliveryQueue??=new lt,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Ve(()=>{st?.unregister(a),i?.(),this._removeListener(r)});if(n instanceof Ue?n.add(a):Array.isArray(n)&&n.push(a),st){let e=Error().stack.split(` `).slice(2,3).join(` -`).trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);ot.register(a,t?.[2]??e,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*at<=t.length){let e=0;for(let n=0;n0}},ct=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},lt=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),ut;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof dt?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Je.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:lt})})(ut||={});var dt=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?lt:(this._emitter||=new st,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},ft=`en`,pt=!1,mt=!1,ht=ft,gt,_t=globalThis,vt;typeof _t.vscode<`u`&&typeof _t.vscode.process<`u`?vt=_t.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(vt=process);var yt=typeof vt?.versions?.electron==`string`&&vt?.type===`renderer`;if(typeof vt==`object`){vt.platform,vt.platform,pt=vt.platform===`linux`,pt&&vt.env.SNAP&&vt.env.SNAP_REVISION,vt.env.CI||vt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ht=ft;let e=vt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,ht=t.resolvedLanguage||ft,t.languagePack?.translationsConfigFile}catch{}}else typeof navigator==`object`&&!yt?(gt=navigator.userAgent,gt.indexOf(`Windows`),gt.indexOf(`Macintosh`),(gt.indexOf(`Macintosh`)>=0||gt.indexOf(`iPad`)>=0||gt.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,pt=gt.indexOf(`Linux`)>=0,gt?.indexOf(`Mobi`),mt=!0,ht=globalThis._VSCODE_NLS_LANGUAGE||ft,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);mt&&typeof _t.importScripts==`function`&&_t.origin;var bt=gt,xt=ht,St;(e=>{function t(){return xt}e.value=t;function n(){return xt.length===2?xt===`en`:xt.length>=3&&xt[0]===`e`&&xt[1]===`n`&&xt[2]===`-`}e.isDefaultVariant=n;function r(){return xt===`en`}e.isDefault=r})(St||={});var Ct=typeof _t.postMessage==`function`&&!_t.importScripts;(()=>{if(Ct){let e=[];_t.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{let r=++t;e.push({id:r,callback:n}),_t.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var wt=!!(bt&&bt.indexOf(`Chrome`)>=0);bt&&bt.indexOf(`Firefox`),!wt&&bt&&bt.indexOf(`Safari`),bt&&bt.indexOf(`Edg/`),bt&&bt.indexOf(`Android`);function Tt(e,t=0,n){let r=setTimeout(()=>{e(),n&&i.dispose()},t),i=Be(()=>{clearTimeout(r),n?.deleteAndLeak(i)});return n?.add(i),i}(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var Et;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Et||={});var Dt=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new st,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Dt.EMPTY=Dt.fromArray([]);var Ot=class extends Ue{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new We),this._linesCacheDisposables=this._register(new We),this._register(Be(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=ze(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=Tt(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let n=[],r=[0],i=this._terminal.buffer.active.getLine(e);for(;i;){let a=this._terminal.buffer.active.getLine(e+1),o=a?a.isWrapped:!1,s=i.translateToString(!o&&t);if(o&&a){let e=i.getCell(i.length-1);e&&e.getCode()===0&&e.getWidth()===1&&a.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(n.push(s),o)r.push(r[r.length-1]+s.length);else break;e++,i=a}return[n.join(``),r]}},kt=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},At=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,n,r){if(!e||e.length===0){this._terminal.clearSelection();return}if(n>this._terminal.cols)throw Error(`Invalid col: ${n} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let i={startRow:t,startCol:n},a=this._findInLine(e,i,r);if(!a)for(let n=t+1;n=0&&(o.startRow=n,s=this._findInLine(e,o,t,!0),!s);n--);}if(!s&&i!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let n=this._terminal.buffer.active.baseY+this._terminal.rows-1;n>=i&&(o.startRow=n,s=this._findInLine(e,o,t,!0),!s);n--);return s}_isWholeWord(e,t,n){return(e===0||` ~!@#$%^&*()+\`-=[]{}|\\;:"',./<>?`.includes(t[e-1]))&&(e+n.length===t.length||` ~!@#$%^&*()+\`-=[]{}|\\;:"',./<>?`.includes(t[e+n.length]))}_findInLine(e,t,n={},r=!1){let i=t.startRow,a=t.startCol;if(this._terminal.buffer.active.getLine(i)?.isWrapped){if(r){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,n)}let o=this._lineCache.getLineFromCache(i);o||(o=this._lineCache.translateBufferLineToStringWithWrap(i,!0),this._lineCache.setLineInCache(i,o));let[s,c]=o,l=this._bufferColsToStringOffset(i,a),u=e,d=s;n.regex||(u=n.caseSensitive?e:e.toLowerCase(),d=n.caseSensitive?s:s.toLowerCase());let f=-1;if(n.regex){let t=RegExp(u,n.caseSensitive?`g`:`gi`),i;if(r)for(;i=t.exec(d.slice(0,l));)f=t.lastIndex-i[0].length,e=i[0],t.lastIndex-=e.length-1;else i=t.exec(d.slice(l)),i&&i[0].length>0&&(f=l+(t.lastIndex-i[0].length),e=i[0])}else r?l-u.length>=0&&(f=d.lastIndexOf(u,l-u.length)):f=d.indexOf(u,l);if(f>=0){if(n.wholeWord&&!this._isWholeWord(f,d,e))return;let t=0;for(;t=c[t+1];)t++;let r=t;for(;r=c[r+1];)r++;let a=f-c[t],o=f+e.length-c[r],s=this._stringLengthToBufferSize(i+t,a),l=this._stringLengthToBufferSize(i+r,o)-s+this._terminal.cols*(r-t);return{term:e,col:s,row:i+t,size:l}}}_stringLengthToBufferSize(e,t){let n=this._terminal.buffer.active.getLine(e);if(!n)return 0;for(let e=0;e1&&(t-=i.length-1);let a=n.getCell(e+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let n=e,r=0,i=this._terminal.buffer.active.getLine(n);for(;t>0&&i;){for(let e=0;ethis.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let n of e){let e=this._createResultDecorations(n,t,!1);if(e)for(let t of e)this._storeDecoration(t,n)}}createActiveDecoration(e,t){let n=this._createResultDecorations(e,t,!0);if(n)return{decorations:n,match:e,dispose(){Re(n)}}}clearHighlightDecorations(){Re(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,n){e.classList.contains(`xterm-find-result-decoration`)||(e.classList.add(`xterm-find-result-decoration`),t&&(e.style.outline=`1px solid ${t}`)),n&&e.classList.add(`xterm-find-active-result-decoration`)}_createResultDecorations(e,t,n){let r=[],i=e.col,a=e.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;a>0;){let e=Math.min(this._terminal.cols-i,a);r.push([o,i,e]),i=0,a-=e,o++}let s=[];for(let e of r){let r=this._terminal.registerMarker(e[0]),i=this._terminal.registerDecoration({marker:r,x:e[1],width:e[2],backgroundColor:n?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:n?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:`center`}});if(i){let e=[];e.push(r),e.push(i.onRender(e=>this._applyStyles(e,n?t.activeMatchBorder:t.matchBorder,!1))),e.push(i.onDispose(()=>Re(e))),s.push(i)}}return s.length===0?void 0:s}},Mt=class extends Ue{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new st)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&=(this._selectedDecoration.dispose(),void 0)}findResultIndex(e){for(let t=0;tthis._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(Be(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=Tt(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,n){if(!this._terminal||!this._engine)throw Error(`Cannot use addon until it has been loaded`);this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findNextAndSelect(e,t,n);return this._fireResults(t),this._state.cachedSearchTerm=e,r}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw Error(`Cannot use addon until it has been loaded`);if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let n=[],r,i=this._engine.find(e,0,0,t);for(;i&&(r?.row!==i.row||r?.col!==i.col)&&!(n.length>=this._highlightLimit);)r=i,n.push(r),i=this._engine.find(e,r.col+r.term.length>=this._terminal.cols?r.row+1:r.row,r.col+r.term.length>=this._terminal.cols?0:r.col+1,t);this._resultTracker.updateResults(n,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(n,t.decorations)}_findNextAndSelect(e,t,n){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,n?.noScroll)}findPrevious(e,t,n){if(!this._terminal||!this._engine)throw Error(`Cannot use addon until it has been loaded`);this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findPreviousAndSelect(e,t,n);return this._fireResults(t),this._state.cachedSearchTerm=e,r}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,n){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,n?.noScroll)}_selectResult(e,t,n){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!n&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row{for(var n in t)Pt(e,n,{get:t[n],enumerable:!0})},k=(e,t,n,r)=>{for(var i=r>1?void 0:r?Ft(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Pt(t,n,i),i},A=(e,t)=>(n,r)=>t(n,r,e),Lt=`Terminal input`,Rt={get:()=>Lt,set:e=>Lt=e},zt=`Too much output to announce, navigate to rows manually to read`,Bt={get:()=>zt,set:e=>zt=e};function Vt(e){return e.replace(/\r?\n/g,`\r`)}function Ht(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function Ut(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function Wt(e,t,n,r){e.stopPropagation(),e.clipboardData&&Gt(e.clipboardData.getData(`text/plain`),t,n,r)}function Gt(e,t,n,r){e=Vt(e),e=Ht(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function Kt(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function qt(e,t,n,r,i){Kt(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function Jt(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Yt(e,t=0,n=e.length){let r=``;for(let i=t;i65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var Xt=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Zt=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Qt=``,$t=` `,en=class e{constructor(){this.fg=0,this.bg=0,this.extended=new tn}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},tn=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},nn=class e extends en{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new tn,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Jt(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},rn=`di$target`,an=`di$dependencies`,on=new Map;function sn(e){return e[an]||[]}function cn(e){if(on.has(e))return on.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);ln(t,e,r)};return t._id=e,on.set(e,t),t}function ln(e,t,n){t[rn]===t?t[an].push({id:e,index:n}):(t[an]=[{id:e,index:n}],t[rn]=t)}var un=cn(`BufferService`),dn=cn(`CoreMouseService`),fn=cn(`CoreService`),pn=cn(`CharsetService`),mn=cn(`InstantiationService`),hn=cn(`LogService`),gn=cn(`OptionsService`),_n=cn(`OscLinkService`),vn=cn(`UnicodeService`),yn=cn(`DecorationService`),bn=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new nn,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;ti?i.activate(e,t,a):xn(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};bn=k([A(0,un),A(1,gn),A(2,_n)],bn);function xn(e,t){if(confirm(`Do you want to navigate to ${t}? +`).trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);st.register(a,t?.[2]??e,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*ot<=t.length){let e=0;for(let n=0;n0}},lt=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},ut=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),dt;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof ft?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ye.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ut})})(dt||={});var ft=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ut:(this._emitter||=new ct,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},pt=`en`,mt=!1,ht=!1,gt=pt,_t,vt=globalThis,yt;typeof vt.vscode<`u`&&typeof vt.vscode.process<`u`?yt=vt.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(yt=process);var bt=typeof yt?.versions?.electron==`string`&&yt?.type===`renderer`;if(typeof yt==`object`){yt.platform,yt.platform,mt=yt.platform===`linux`,mt&&yt.env.SNAP&&yt.env.SNAP_REVISION,yt.env.CI||yt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,gt=pt;let e=yt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,gt=t.resolvedLanguage||pt,t.languagePack?.translationsConfigFile}catch{}}else typeof navigator==`object`&&!bt?(_t=navigator.userAgent,_t.indexOf(`Windows`),_t.indexOf(`Macintosh`),(_t.indexOf(`Macintosh`)>=0||_t.indexOf(`iPad`)>=0||_t.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,mt=_t.indexOf(`Linux`)>=0,_t?.indexOf(`Mobi`),ht=!0,gt=globalThis._VSCODE_NLS_LANGUAGE||pt,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);ht&&typeof vt.importScripts==`function`&&vt.origin;var xt=_t,St=gt,Ct;(e=>{function t(){return St}e.value=t;function n(){return St.length===2?St===`en`:St.length>=3&&St[0]===`e`&&St[1]===`n`&&St[2]===`-`}e.isDefaultVariant=n;function r(){return St===`en`}e.isDefault=r})(Ct||={});var wt=typeof vt.postMessage==`function`&&!vt.importScripts;(()=>{if(wt){let e=[];vt.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{let r=++t;e.push({id:r,callback:n}),vt.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var Tt=!!(xt&&xt.indexOf(`Chrome`)>=0);xt&&xt.indexOf(`Firefox`),!Tt&&xt&&xt.indexOf(`Safari`),xt&&xt.indexOf(`Edg/`),xt&&xt.indexOf(`Android`);function Et(e,t=0,n){let r=setTimeout(()=>{e(),n&&i.dispose()},t),i=Ve(()=>{clearTimeout(r),n?.deleteAndLeak(i)});return n?.add(i),i}(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var Dt;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Dt||={});var Ot=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new ct,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Ot.EMPTY=Ot.fromArray([]);var kt=class extends We{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new Ge),this._linesCacheDisposables=this._register(new Ge),this._register(Ve(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=Be(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=Et(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let n=[],r=[0],i=this._terminal.buffer.active.getLine(e);for(;i;){let a=this._terminal.buffer.active.getLine(e+1),o=a?a.isWrapped:!1,s=i.translateToString(!o&&t);if(o&&a){let e=i.getCell(i.length-1);e&&e.getCode()===0&&e.getWidth()===1&&a.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(n.push(s),o)r.push(r[r.length-1]+s.length);else break;e++,i=a}return[n.join(``),r]}},At=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},jt=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,n,r){if(!e||e.length===0){this._terminal.clearSelection();return}if(n>this._terminal.cols)throw Error(`Invalid col: ${n} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let i={startRow:t,startCol:n},a=this._findInLine(e,i,r);if(!a)for(let n=t+1;n=0&&(o.startRow=n,s=this._findInLine(e,o,t,!0),!s);n--);}if(!s&&i!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let n=this._terminal.buffer.active.baseY+this._terminal.rows-1;n>=i&&(o.startRow=n,s=this._findInLine(e,o,t,!0),!s);n--);return s}_isWholeWord(e,t,n){return(e===0||` ~!@#$%^&*()+\`-=[]{}|\\;:"',./<>?`.includes(t[e-1]))&&(e+n.length===t.length||` ~!@#$%^&*()+\`-=[]{}|\\;:"',./<>?`.includes(t[e+n.length]))}_findInLine(e,t,n={},r=!1){let i=t.startRow,a=t.startCol;if(this._terminal.buffer.active.getLine(i)?.isWrapped){if(r){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,n)}let o=this._lineCache.getLineFromCache(i);o||(o=this._lineCache.translateBufferLineToStringWithWrap(i,!0),this._lineCache.setLineInCache(i,o));let[s,c]=o,l=this._bufferColsToStringOffset(i,a),u=e,d=s;n.regex||(u=n.caseSensitive?e:e.toLowerCase(),d=n.caseSensitive?s:s.toLowerCase());let f=-1;if(n.regex){let t=RegExp(u,n.caseSensitive?`g`:`gi`),i;if(r)for(;i=t.exec(d.slice(0,l));)f=t.lastIndex-i[0].length,e=i[0],t.lastIndex-=e.length-1;else i=t.exec(d.slice(l)),i&&i[0].length>0&&(f=l+(t.lastIndex-i[0].length),e=i[0])}else r?l-u.length>=0&&(f=d.lastIndexOf(u,l-u.length)):f=d.indexOf(u,l);if(f>=0){if(n.wholeWord&&!this._isWholeWord(f,d,e))return;let t=0;for(;t=c[t+1];)t++;let r=t;for(;r=c[r+1];)r++;let a=f-c[t],o=f+e.length-c[r],s=this._stringLengthToBufferSize(i+t,a),l=this._stringLengthToBufferSize(i+r,o)-s+this._terminal.cols*(r-t);return{term:e,col:s,row:i+t,size:l}}}_stringLengthToBufferSize(e,t){let n=this._terminal.buffer.active.getLine(e);if(!n)return 0;for(let e=0;e1&&(t-=i.length-1);let a=n.getCell(e+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let n=e,r=0,i=this._terminal.buffer.active.getLine(n);for(;t>0&&i;){for(let e=0;ethis.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let n of e){let e=this._createResultDecorations(n,t,!1);if(e)for(let t of e)this._storeDecoration(t,n)}}createActiveDecoration(e,t){let n=this._createResultDecorations(e,t,!0);if(n)return{decorations:n,match:e,dispose(){ze(n)}}}clearHighlightDecorations(){ze(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,n){e.classList.contains(`xterm-find-result-decoration`)||(e.classList.add(`xterm-find-result-decoration`),t&&(e.style.outline=`1px solid ${t}`)),n&&e.classList.add(`xterm-find-active-result-decoration`)}_createResultDecorations(e,t,n){let r=[],i=e.col,a=e.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;a>0;){let e=Math.min(this._terminal.cols-i,a);r.push([o,i,e]),i=0,a-=e,o++}let s=[];for(let e of r){let r=this._terminal.registerMarker(e[0]),i=this._terminal.registerDecoration({marker:r,x:e[1],width:e[2],backgroundColor:n?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:n?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:`center`}});if(i){let e=[];e.push(r),e.push(i.onRender(e=>this._applyStyles(e,n?t.activeMatchBorder:t.matchBorder,!1))),e.push(i.onDispose(()=>ze(e))),s.push(i)}}return s.length===0?void 0:s}},Nt=class extends We{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ct)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&=(this._selectedDecoration.dispose(),void 0)}findResultIndex(e){for(let t=0;tthis._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(Ve(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=Et(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,n){if(!this._terminal||!this._engine)throw Error(`Cannot use addon until it has been loaded`);this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findNextAndSelect(e,t,n);return this._fireResults(t),this._state.cachedSearchTerm=e,r}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw Error(`Cannot use addon until it has been loaded`);if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let n=[],r,i=this._engine.find(e,0,0,t);for(;i&&(r?.row!==i.row||r?.col!==i.col)&&!(n.length>=this._highlightLimit);)r=i,n.push(r),i=this._engine.find(e,r.col+r.term.length>=this._terminal.cols?r.row+1:r.row,r.col+r.term.length>=this._terminal.cols?0:r.col+1,t);this._resultTracker.updateResults(n,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(n,t.decorations)}_findNextAndSelect(e,t,n){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,n?.noScroll)}findPrevious(e,t,n){if(!this._terminal||!this._engine)throw Error(`Cannot use addon until it has been loaded`);this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findPreviousAndSelect(e,t,n);return this._fireResults(t),this._state.cachedSearchTerm=e,r}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,n){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,n?.noScroll)}_selectResult(e,t,n){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!n&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row{for(var n in t)Ft(e,n,{get:t[n],enumerable:!0})},O=(e,t,n,r)=>{for(var i=r>1?void 0:r?It(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ft(t,n,i),i},k=(e,t)=>(n,r)=>t(n,r,e),Rt=`Terminal input`,zt={get:()=>Rt,set:e=>Rt=e},Bt=`Too much output to announce, navigate to rows manually to read`,Vt={get:()=>Bt,set:e=>Bt=e};function Ht(e){return e.replace(/\r?\n/g,`\r`)}function Ut(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function Wt(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function Gt(e,t,n,r){e.stopPropagation(),e.clipboardData&&Kt(e.clipboardData.getData(`text/plain`),t,n,r)}function Kt(e,t,n,r){e=Ht(e),e=Ut(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function qt(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function Jt(e,t,n,r,i){qt(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function Yt(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Xt(e,t=0,n=e.length){let r=``;for(let i=t;i65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var Zt=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Qt=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},$t=``,en=` `,tn=class e{constructor(){this.fg=0,this.bg=0,this.extended=new nn}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},nn=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},rn=class e extends tn{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new nn,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Yt(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},an=`di$target`,on=`di$dependencies`,sn=new Map;function cn(e){return e[on]||[]}function A(e){if(sn.has(e))return sn.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);ln(t,e,r)};return t._id=e,sn.set(e,t),t}function ln(e,t,n){t[an]===t?t[on].push({id:e,index:n}):(t[on]=[{id:e,index:n}],t[an]=t)}var un=A(`BufferService`),dn=A(`CoreMouseService`),fn=A(`CoreService`),pn=A(`CharsetService`),mn=A(`InstantiationService`),hn=A(`LogService`),gn=A(`OptionsService`),_n=A(`OscLinkService`),vn=A(`UnicodeService`),yn=A(`DecorationService`),bn=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new rn,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;ti?i.activate(e,t,a):xn(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};bn=O([k(0,un),k(1,gn),k(2,_n)],bn);function xn(e,t){if(confirm(`Do you want to navigate to ${t}? -WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Sn=cn(`CharSizeService`),Cn=cn(`CoreBrowserService`),wn=cn(`MouseService`),Tn=cn(`RenderService`),En=cn(`SelectionService`),Dn=cn(`CharacterJoinerService`),On=cn(`ThemeService`),kn=cn(`LinkProviderService`),An=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?In.isErrorNoTelemetry(e)?new In(e.message+` +WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Sn=A(`CharSizeService`),Cn=A(`CoreBrowserService`),wn=A(`MouseService`),Tn=A(`RenderService`),En=A(`SelectionService`),Dn=A(`CharacterJoinerService`),On=A(`ThemeService`),kn=A(`LinkProviderService`),An=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?In.isErrorNoTelemetry(e)?new In(e.message+` `+e.stack):Error(e.message+` -`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function jn(e){Nn(e)||An.onUnexpectedError(e)}var Mn=`Canceled`;function Nn(e){return e instanceof Pn||e instanceof Error&&e.name===Mn&&e.message===Mn}var Pn=class extends Error{constructor(){super(Mn),this.name=this.message}};function Fn(e){return Error(e?`Illegal argument: ${e}`:`Illegal argument`)}var In=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}},Ln=class e extends Error{constructor(t){super(t||`An unexpected bug occurred.`),Object.setPrototypeOf(this,e.prototype)}};function Rn(e,t,n=0,r=e.length){let i=n,a=r;for(;i{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Vn||={});function Hn(e,t){return(n,r)=>t(e(n),e(r))}var Un=(e,t)=>e-t,Wn=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||Vn.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};Wn.empty=new Wn(e=>{});function Gn(e,t){let n=Object.create(null);for(let r of e){let e=t(r),i=n[e];i||=n[e]=[],i.push(r)}return n}var Kn=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){return this.map.get(e)||new Set}};function qn(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var Jn;(e=>{function t(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);tt.source!==null&&!this.getRootParent(t,e).isSingleton).flatMap(([e])=>e)}computeLeakingDisposables(e=10,t){let n;if(t)n=t;else{let e=new Map,t=[...this.livingDisposables.values()].filter(t=>t.source!==null&&!this.getRootParent(t,e).isSingleton);if(t.length===0)return;let r=new Set(t.map(e=>e.value));if(n=t.filter(e=>!(e.parent&&r.has(e.parent))),n.length===0)throw Error(`There are cyclic diposable chains!`)}if(!n)return;function r(e){function t(e,t){for(;e.length>0&&t.some(t=>typeof t==`string`?t===e[0]:e[0].match(t));)e.shift()}let n=e.source.split(` +`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function jn(e){Nn(e)||An.onUnexpectedError(e)}var Mn=`Canceled`;function Nn(e){return e instanceof Pn||e instanceof Error&&e.name===Mn&&e.message===Mn}var Pn=class extends Error{constructor(){super(Mn),this.name=this.message}};function Fn(e){return Error(e?`Illegal argument: ${e}`:`Illegal argument`)}var In=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}},Ln=class e extends Error{constructor(t){super(t||`An unexpected bug occurred.`),Object.setPrototypeOf(this,e.prototype)}};function Rn(e,t,n=0,r=e.length){let i=n,a=r;for(;i{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Vn||={});function Hn(e,t){return(n,r)=>t(e(n),e(r))}var Un=(e,t)=>e-t,Wn=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||Vn.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};Wn.empty=new Wn(e=>{});function Gn(e,t){let n=Object.create(null);for(let r of e){let e=t(r),i=n[e];i||=n[e]=[],i.push(r)}return n}var Kn=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){return this.map.get(e)||new Set}};function qn(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var Jn;(e=>{function t(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);tt.source!==null&&!this.getRootParent(t,e).isSingleton).flatMap(([e])=>e)}computeLeakingDisposables(e=10,t){let n;if(t)n=t;else{let e=new Map,t=[...this.livingDisposables.values()].filter(t=>t.source!==null&&!this.getRootParent(t,e).isSingleton);if(t.length===0)return;let r=new Set(t.map(e=>e.value));if(n=t.filter(e=>!(e.parent&&r.has(e.parent))),n.length===0)throw Error(`There are cyclic diposable chains!`)}if(!n)return;function r(e){function t(e,t){for(;e.length>0&&t.some(t=>typeof t==`string`?t===e[0]:e[0].match(t));)e.shift()}let n=e.source.split(` `).map(e=>e.trim().replace(`at `,``)).filter(e=>e!==``);return t(n,[`Error`,/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),n.reverse()}let i=new Kn;for(let e of n){let t=r(e);for(let n=0;n<=t.length;n++)i.add(t.slice(0,n).join(` `),e)}n.sort(Hn(e=>e.idx,Un));let a=``,o=0;for(let t of n.slice(0,e)){o++;let e=r(t),s=[];for(let t=0;t1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function nr(...e){return j(()=>tr(e))}function j(e){let t=Zn({dispose:qn(()=>{Qn(t),e()})});return t}var rr=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,Zn(this)}dispose(){this._isDisposed||(Qn(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{tr(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return $n(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),$n(e,null))}};rr.DISABLE_DISPOSED_WARNING=!1;var ir=rr,M=class{constructor(){this._store=new ir,Zn(this),$n(this._store,this)}dispose(){Qn(this),this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}};M.None=Object.freeze({dispose(){}});var ar=class{constructor(){this._isDisposed=!1,Zn(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&$n(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Qn(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&$n(e,null),e}},or=typeof window==`object`?window:globalThis,sr=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};sr.Undefined=new sr(void 0);var N=sr,cr=class{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let e=this._first;for(;e!==N.Undefined;){let t=e.next;e.prev=N.Undefined,e.next=N.Undefined,e=t}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new N(e);if(this._first===N.Undefined)this._first=n,this._last=n;else if(t){let e=this._last;this._last=n,n.prev=e,e.next=n}else{let e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==N.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==N.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==N.Undefined&&e.next!==N.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===N.Undefined&&e.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):e.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):e.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);--this._size}*[Symbol.iterator](){let e=this._first;for(;e!==N.Undefined;)yield e.element,e=e.next}},lr=globalThis.performance&&typeof globalThis.performance.now==`function`,ur=class e{static create(t){return new e(t)}constructor(e){this._now=lr&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}},dr;(e=>{e.None=()=>M.None;function t(e,t){return d(e,()=>{},0,void 0,!0,void 0,t)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(e,t,n){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=r;function i(e,t,n){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=i;function a(e,t,n){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=a;function o(e){return e}e.signal=o;function s(...e){return(t,n=null,r)=>u(nr(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=s;function c(e,t,n,i){let a=n;return r(e,e=>(a=t(a,e),a),i)}e.reduce=c;function l(e,t){let n,r=new P({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function u(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function d(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new P({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=0,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=d;function f(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)}e.accumulate=f;function p(e,t=(e,t)=>e===t,n){let r=!0,i;return a(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=p;function m(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=m;function h(e,t=!1,n=[],r){let i=n.slice(),a=e(e=>{i?i.push(e):s.fire(e)});r&&r.add(a);let o=()=>{i?.forEach(e=>s.fire(e)),i=null},s=new P({onWillAddFirstListener(){a||(a=e(e=>s.fire(e)),r&&r.add(a))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){a&&a.dispose(),a=null}});return r&&r.add(s),s.event}e.buffer=h;function g(e,t){return(n,r,i)=>{let a=t(new v);return e(function(e){let t=a.evaluate(e);t!==_&&n.call(r,t)},void 0,i)}}e.chain=g;let _=Symbol(`HaltChainable`);class v{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:_),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:_}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===_)break;return e}}function ee(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new P({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=ee;function y(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new P({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=y;function te(e){return new Promise(t=>n(e)(t))}e.toPromise=te;function ne(e){let t=new P;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event}e.fromPromise=ne;function re(e,t){return e(e=>t.fire(e))}e.forward=re;function ie(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=ie;class b{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new P(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ae(e,t){return new b(e,t).emitter.event}e.fromObservable=ae;function x(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return r instanceof ir?r.add(s):Array.isArray(r)&&r.push(s),s}}e.fromObservableLight=x})(dr||={});var fr=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new ur,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};fr.all=new Set,fr._idPool=0;var pr=fr,mr=-1,hr=class e{constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function nr(...e){return j(()=>tr(e))}function j(e){let t=Zn({dispose:qn(()=>{Qn(t),e()})});return t}var rr=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,Zn(this)}dispose(){this._isDisposed||(Qn(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{tr(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return $n(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),$n(e,null))}};rr.DISABLE_DISPOSED_WARNING=!1;var ir=rr,M=class{constructor(){this._store=new ir,Zn(this),$n(this._store,this)}dispose(){Qn(this),this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}};M.None=Object.freeze({dispose(){}});var ar=class{constructor(){this._isDisposed=!1,Zn(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&$n(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Qn(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&$n(e,null),e}},or=typeof window==`object`?window:globalThis,sr=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};sr.Undefined=new sr(void 0);var N=sr,cr=class{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let e=this._first;for(;e!==N.Undefined;){let t=e.next;e.prev=N.Undefined,e.next=N.Undefined,e=t}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new N(e);if(this._first===N.Undefined)this._first=n,this._last=n;else if(t){let e=this._last;this._last=n,n.prev=e,e.next=n}else{let e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==N.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==N.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==N.Undefined&&e.next!==N.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===N.Undefined&&e.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):e.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):e.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);--this._size}*[Symbol.iterator](){let e=this._first;for(;e!==N.Undefined;)yield e.element,e=e.next}},lr=globalThis.performance&&typeof globalThis.performance.now==`function`,ur=class e{static create(t){return new e(t)}constructor(e){this._now=lr&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}},dr;(e=>{e.None=()=>M.None;function t(e,t){return d(e,()=>{},0,void 0,!0,void 0,t)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(e,t,n){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=r;function i(e,t,n){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=i;function a(e,t,n){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=a;function o(e){return e}e.signal=o;function s(...e){return(t,n=null,r)=>u(nr(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=s;function c(e,t,n,i){let a=n;return r(e,e=>(a=t(a,e),a),i)}e.reduce=c;function l(e,t){let n,r=new P({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function u(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function d(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new P({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=0,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=d;function f(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)}e.accumulate=f;function p(e,t=(e,t)=>e===t,n){let r=!0,i;return a(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=p;function m(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=m;function h(e,t=!1,n=[],r){let i=n.slice(),a=e(e=>{i?i.push(e):s.fire(e)});r&&r.add(a);let o=()=>{i?.forEach(e=>s.fire(e)),i=null},s=new P({onWillAddFirstListener(){a||(a=e(e=>s.fire(e)),r&&r.add(a))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){a&&a.dispose(),a=null}});return r&&r.add(s),s.event}e.buffer=h;function g(e,t){return(n,r,i)=>{let a=t(new v);return e(function(e){let t=a.evaluate(e);t!==_&&n.call(r,t)},void 0,i)}}e.chain=g;let _=Symbol(`HaltChainable`);class v{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:_),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:_}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===_)break;return e}}function y(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new P({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=y;function ee(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new P({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=ee;function b(e){return new Promise(t=>n(e)(t))}e.toPromise=b;function te(e){let t=new P;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event}e.fromPromise=te;function ne(e,t){return e(e=>t.fire(e))}e.forward=ne;function x(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=x;class S{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new P(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function re(e,t){return new S(e,t).emitter.event}e.fromObservable=re;function C(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return r instanceof ir?r.add(s):Array.isArray(r)&&r.push(s),s}}e.fromObservableLight=C})(dr||={});var fr=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new ur,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};fr.all=new Set,fr._idPool=0;var pr=fr,mr=-1,hr=class e{constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t0||this._options?.leakWarningThreshold?new gr(e?.onListenerError??jn,this._options?.leakWarningThreshold??mr):void 0,this._perfMon=this._options?._profName?new pr(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new yr(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||jn)(n),M.None}if(this._disposed)return M.None;t&&(e=e.bind(t));let r=new xr(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=_r.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof xr?(this._deliveryQueue??=new wr,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=j(()=>{Cr?.unregister(a),i?.(),this._removeListener(r)});if(n instanceof ir?n.add(a):Array.isArray(n)&&n.push(a),Cr){let e=Error().stack.split(` `).slice(2,3).join(` -`).trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);Cr.register(a,t?.[2]??e,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*Sr<=t.length){let e=0;for(let n=0;n0}},wr=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Tr=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new P,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new P,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};Tr.INSTANCE=new Tr;var Er=Tr;function Dr(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}Er.INSTANCE.onDidChangeZoomLevel;function Or(e){return Er.INSTANCE.getZoomFactor(e)}Er.INSTANCE.onDidChangeFullscreen;var kr=typeof navigator==`object`?navigator.userAgent:``,Ar=kr.indexOf(`Firefox`)>=0,jr=kr.indexOf(`AppleWebKit`)>=0,Mr=kr.indexOf(`Chrome`)>=0,Nr=!Mr&&kr.indexOf(`Safari`)>=0;kr.indexOf(`Electron/`),kr.indexOf(`Android`);var Pr=!1;if(typeof or.matchMedia==`function`){let e=or.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=or.matchMedia(`(display-mode: fullscreen)`);Pr=e.matches,Dr(or,e,({matches:e})=>{Pr&&t.matches||(Pr=e)})}function Fr(){return Pr}var Ir=`en`,Lr=!1,Rr=!1,zr=!1,Br=!1,Vr=!1,Hr=Ir,Ur,Wr=globalThis,Gr;typeof Wr.vscode<`u`&&typeof Wr.vscode.process<`u`?Gr=Wr.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(Gr=process);var Kr=typeof Gr?.versions?.electron==`string`&&Gr?.type===`renderer`;if(typeof Gr==`object`){Lr=Gr.platform===`win32`,Rr=Gr.platform===`darwin`,zr=Gr.platform===`linux`,zr&&Gr.env.SNAP&&Gr.env.SNAP_REVISION,Gr.env.CI||Gr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Hr=Ir;let e=Gr.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,Hr=t.resolvedLanguage||Ir,t.languagePack?.translationsConfigFile}catch{}Br=!0}else typeof navigator==`object`&&!Kr?(Ur=navigator.userAgent,Lr=Ur.indexOf(`Windows`)>=0,Rr=Ur.indexOf(`Macintosh`)>=0,(Ur.indexOf(`Macintosh`)>=0||Ur.indexOf(`iPad`)>=0||Ur.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,zr=Ur.indexOf(`Linux`)>=0,Ur?.indexOf(`Mobi`),Vr=!0,Hr=globalThis._VSCODE_NLS_LANGUAGE||Ir,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var qr=Lr,Jr=Rr,Yr=zr,Xr=Br;Vr&&typeof Wr.importScripts==`function`&&Wr.origin;var Zr=Ur,Qr=Hr,$r;(e=>{function t(){return Qr}e.value=t;function n(){return Qr.length===2?Qr===`en`:Qr.length>=3&&Qr[0]===`e`&&Qr[1]===`n`&&Qr[2]===`-`}e.isDefaultVariant=n;function r(){return Qr===`en`}e.isDefault=r})($r||={});var ei=typeof Wr.postMessage==`function`&&!Wr.importScripts;(()=>{if(ei){let e=[];Wr.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{let r=++t;e.push({id:r,callback:n}),Wr.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var ti=!!(Zr&&Zr.indexOf(`Chrome`)>=0);Zr&&Zr.indexOf(`Firefox`),!ti&&Zr&&Zr.indexOf(`Safari`),Zr&&Zr.indexOf(`Edg/`),Zr&&Zr.indexOf(`Android`);var ni=typeof navigator==`object`?navigator:{};Xr||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||ni&&ni.clipboard&&ni.clipboard.writeText,Xr||ni&&ni.clipboard&&ni.clipboard.readText,Xr||Fr()||ni.keyboard,`ontouchstart`in or||ni.maxTouchPoints,or.PointerEvent&&(`ontouchstart`in or||navigator.maxTouchPoints);var ri=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},ii=new ri,ai=new ri,oi=new ri,si=Array(230),ci;(e=>{function t(e){return ii.keyCodeToStr(e)}e.toString=t;function n(e){return ii.strToKeyCode(e)}e.fromString=n;function r(e){return ai.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return oi.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return ai.strToKeyCode(e)||oi.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return ii.keyCodeToStr(e)}e.toElectronAccelerator=o})(ci||={});var li=class e{constructor(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}equals(t){return t instanceof e&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){return`K${this.ctrlKey?`1`:`0`}${this.shiftKey?`1`:`0`}${this.altKey?`1`:`0`}${this.metaKey?`1`:`0`}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new ui([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},ui=class{constructor(e){if(e.length===0)throw Fn(`chords`);this.chords=e}getHashCode(){let e=``;for(let t=0,n=this.chords.length;t{function t(t){return t===e.None||t===e.Cancelled||t instanceof wi?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:dr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Si})})(Ci||={});var wi=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Si:(this._emitter||=new P,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},Ti=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e==`function`&&typeof t==`number`&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Ln(`Calling 'cancelAndSet' on a disposed TimeoutTimer`);this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Ln(`Calling 'setIfNotSet' on a disposed TimeoutTimer`);this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},Ei=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new Ln(`Calling 'cancelAndSet' on a disposed IntervalTimer`);this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=j(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var Di;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Di||={});var Oi=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new P,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Oi.EMPTY=Oi.fromArray([]);function ki(e){return 55296<=e&&e<=56319}function Ai(e){return 56320<=e&&e<=57343}function ji(e,t){return(e-55296<<10)+(t-56320)+65536}function Mi(e){return Ni(e,0)}function Ni(e,t){switch(typeof e){case`object`:return e===null?Pi(349,t):Array.isArray(e)?Li(e,t):Ri(e,t);case`string`:return Ii(e,t);case`boolean`:return Fi(e,t);case`number`:return Pi(e,t);case`undefined`:return Pi(937,t);default:return Pi(617,t)}}function Pi(e,t){return(t<<5)-t+e|0}function Fi(e,t){return Pi(e?433:863,t)}function Ii(e,t){t=Pi(149417,t);for(let n=0,r=e.length;nNi(t,e),t)}function Ri(e,t){return t=Pi(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=Ii(n,t),Ni(e[n],t)),t)}function zi(e,t,n=32){let r=n-t,i=~((1<>>r)>>>0}function Bi(e,t=0,n=e.byteLength,r=0){for(let i=0;ie.toString(16).padStart(2,`0`)).join(``):Vi((e>>>0).toString(16),t/4)}var Ui=class e{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,r=this._buffLen,i=this._leftoverHighSurrogate,a,o;for(i===0?(a=e.charCodeAt(0),o=0):(a=i,o=-1,i=0);;){let s=a;if(ki(a))if(o+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Hi(this._h0)+Hi(this._h1)+Hi(this._h2)+Hi(this._h3)+Hi(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Bi(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Bi(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let e=0;e<64;e+=4)t.setUint32(e,n.getUint32(e,!1),!1);for(let e=64;e<320;e+=4)t.setUint32(e,zi(t.getUint32(e-12,!1)^t.getUint32(e-32,!1)^t.getUint32(e-56,!1)^t.getUint32(e-64,!1),1),!1);let r=this._h0,i=this._h1,a=this._h2,o=this._h3,s=this._h4,c,l,u;for(let e=0;e<80;e++)e<20?(c=i&a|~i&o,l=1518500249):e<40?(c=i^a^o,l=1859775393):e<60?(c=i&a|i&o|a&o,l=2400959708):(c=i^a^o,l=3395469782),u=zi(r,5)+c+s+l+t.getUint32(e*4,!1)&4294967295,s=o,o=a,a=zi(i,30),i=r,r=u;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+s&4294967295}};Ui._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:Wi,getWindow:Gi,getDocument:Ki,getWindows:qi,getWindowsCount:Ji,getWindowId:Yi,getWindowById:Xi,hasWindow:Zi,onDidRegisterWindow:Qi,onWillUnregisterWindow:$i,onDidUnregisterWindow:ea}=function(){let e=new Map,t={window:or,disposables:new ir};e.set(or.vscodeWindowId,t);let n=new P,r=new P,i=new P;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return M.None;let a=new ir,o={window:t,disposables:a.add(new ir)};return e.set(t.vscodeWindowId,o),a.add(j(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(F(t,I.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:or},getDocument(e){return Gi(e).document}}}(),ta=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function F(e,t,n,r){return new ta(e,t,n,r)}function na(e,t){return function(n){return t(new bi(e,n))}}function ra(e){return function(t){return e(new gi(t))}}var ia=function(e,t,n,r){let i=n;return t===`click`||t===`mousedown`||t===`contextmenu`?i=na(Gi(e),n):(t===`keydown`||t===`keypress`||t===`keyup`)&&(i=ra(n)),F(e,t,i,r)},aa,oa=class extends Ei{constructor(e){super(),this.defaultTarget=e&&Gi(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},sa=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){jn(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,r=new Map,i=i=>{n.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),r.set(i,!0);a.length>0;)a.sort(sa.sort),a.shift().execute();r.set(i,!1)};aa=(t,r,a=0)=>{let o=Yi(t),s=new sa(r,a),c=e.get(o);return c||(c=[],e.set(o,c)),c.push(s),n.get(o)||(n.set(o,!0),t.requestAnimationFrame(()=>i(o))),s}})();var ca=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};ca.None=new ca(0,0);function la(e){let t=e.getBoundingClientRect(),n=Gi(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=Mi(n),a=r.get(i);if(a)a.users+=1;else{let o=new P,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(j(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var I={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:jr?`webkitAnimationStart`:`animationstart`,ANIMATION_END:jr?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:jr?`webkitAnimationIteration`:`animationiteration`},ua=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function da(e,t,n,...r){let i=ua.exec(t);if(!i)throw Error(`Bad use of emmet`);let a=i[1]||`div`,o;return o=e===`http://www.w3.org/1999/xhtml`?document.createElement(a):document.createElementNS(e,a),i[3]&&(o.id=i[3]),i[4]&&(o.className=i[4].replace(/\./g,` `).trim()),n&&Object.entries(n).forEach(([e,t])=>{typeof t>`u`||(/^on\w+$/.test(e)?o[e]=t:e===`selected`?t&&o.setAttribute(e,`true`):o.setAttribute(e,t))}),o.append(...r),o}function fa(e,t,...n){return da(`http://www.w3.org/1999/xhtml`,e,t,...n)}fa.SVG=function(e,t,...n){return da(`http://www.w3.org/2000/svg`,e,t,...n)};var pa=class{constructor(e){this.domNode=e,this._maxWidth=``,this._width=``,this._height=``,this._top=``,this._left=``,this._bottom=``,this._right=``,this._paddingTop=``,this._paddingLeft=``,this._paddingBottom=``,this._paddingRight=``,this._fontFamily=``,this._fontWeight=``,this._fontSize=``,this._fontStyle=``,this._fontFeatureSettings=``,this._fontVariationSettings=``,this._textDecoration=``,this._lineHeight=``,this._letterSpacing=``,this._className=``,this._display=``,this._position=``,this._visibility=``,this._color=``,this._backgroundColor=``,this._layerHint=!1,this._contain=`none`,this._boxShadow=``}setMaxWidth(e){let t=ma(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=ma(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=ma(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=ma(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=ma(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=ma(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=ma(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=ma(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=ma(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=ma(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=ma(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=ma(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=ma(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=ma(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?`translate3d(0px, 0px, 0px)`:``)}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function ma(e){return typeof e==`number`?`${e}px`:e}function ha(e){return new pa(e)}var ga=class{constructor(){this._hooks=new ir,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let a=e;try{e.setPointerCapture(t),this._hooks.add(j(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=Gi(e)}this._hooks.add(F(a,I.POINTER_MOVE,e=>{if(e.buttons!==n){this.stopMonitoring(!0);return}e.preventDefault(),this._pointerMoveCallback(e)})),this._hooks.add(F(a,I.POINTER_UP,e=>this.stopMonitoring(!0)))}};function _a(e,t,n){let r=null,i=null;if(typeof n.value==`function`?(r=`value`,i=n.value,i.length!==0&&console.warn(`Memoize should only be used in functions with zero parameters`)):typeof n.get==`function`&&(r=`get`,i=n.get),!i)throw Error(`not supported`);let a=`$memoize$${t}`;n[r]=function(...e){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[a]}}var va;(e=>(e.Tap=`-xterm-gesturetap`,e.Change=`-xterm-gesturechange`,e.Start=`-xterm-gesturestart`,e.End=`-xterm-gesturesend`,e.Contextmenu=`-xterm-gesturecontextmenu`))(va||={});var ya=class e extends M{constructor(){super(),this.dispatched=!1,this.targets=new cr,this.ignoreTargets=new cr,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(dr.runAndSubscribe(Qi,({window:e,disposables:t})=>{t.add(F(e.document,`touchstart`,e=>this.onTouchStart(e),{passive:!1})),t.add(F(e.document,`touchend`,t=>this.onTouchEnd(e,t))),t.add(F(e.document,`touchmove`,e=>this.onTouchMove(e),{passive:!1}))},{window:or,disposables:this._store}))}static addTarget(t){return e.isTouchDevice()?(e.INSTANCE||=er(new e),j(e.INSTANCE.targets.push(t))):M.None}static ignoreTarget(t){return e.isTouchDevice()?(e.INSTANCE||=er(new e),j(e.INSTANCE.ignoreTargets.push(t))):M.None}static isTouchDevice(){return`ontouchstart`in or||navigator.maxTouchPoints>0}dispose(){this.handle&&=(this.handle.dispose(),null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&=(this.handle.dispose(),null);for(let n=0,r=e.targetTouches.length;n=e.HOLD_DELAY&&Math.abs(s.initialPageX-Bn(s.rollingPageX))<30&&Math.abs(s.initialPageY-Bn(s.rollingPageY))<30){let e=this.newGestureEvent(va.Contextmenu,s.initialTarget);e.pageX=Bn(s.rollingPageX),e.pageY=Bn(s.rollingPageY),this.dispatchEvent(e)}else if(i===1){let e=Bn(s.rollingPageX),n=Bn(s.rollingPageY),i=Bn(s.rollingTimestamps)-s.rollingTimestamps[0],a=e-s.rollingPageX[0],o=n-s.rollingPageY[0],c=[...this.targets].filter(e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget));this.inertia(t,c,r,Math.abs(a)/i,a>0?1:-1,e,Math.abs(o)/i,o>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(va.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&=(n.preventDefault(),n.stopPropagation(),!1)}newGestureEvent(e,t){let n=document.createEvent(`CustomEvent`);return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(t){if(t.type===va.Tap){let n=new Date().getTime(),r=0;r=n-this._lastSetTapCountTime>e.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=n,t.tapCount=r}else(t.type===va.Change||t.type===va.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let e of this.ignoreTargets)if(e.contains(t.initialTarget))return;let e=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let r=0,i=t.initialTarget;for(;i&&i!==n;)r++,i=i.parentElement;e.push([r,n])}e.sort((e,t)=>e[0]-t[0]);for(let[n,r]of e)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,r,i,a,o,s,c,l){this.handle=aa(t,()=>{let u=Date.now(),d=u-r,f=0,p=0,m=!0;i+=e.SCROLL_FRICTION*d,s+=e.SCROLL_FRICTION*d,i>0&&(m=!1,f=a*i*d),s>0&&(m=!1,p=c*s*d);let h=this.newGestureEvent(va.Change);h.translationX=f,h.translationY=p,n.forEach(e=>e.dispatchEvent(h)),m||this.inertia(t,n,u,i,a,o+f,s,c,l+p)})}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n3&&(i.rollingPageX.shift(),i.rollingPageY.shift(),i.rollingTimestamps.shift()),i.rollingPageX.push(r.pageX),i.rollingPageY.push(r.pageY),i.rollingTimestamps.push(t)}this.dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}};ya.SCROLL_FRICTION=-.005,ya.HOLD_DELAY=700,ya.CLEAR_TAP_COUNT_TIME=400,k([_a],ya,`isTouchDevice`,1);var ba=ya,xa=class extends M{onclick(e,t){this._register(F(e,I.CLICK,n=>t(new bi(Gi(e),n))))}onmousedown(e,t){this._register(F(e,I.MOUSE_DOWN,n=>t(new bi(Gi(e),n))))}onmouseover(e,t){this._register(F(e,I.MOUSE_OVER,n=>t(new bi(Gi(e),n))))}onmouseleave(e,t){this._register(F(e,I.MOUSE_LEAVE,n=>t(new bi(Gi(e),n))))}onkeydown(e,t){this._register(F(e,I.KEY_DOWN,e=>t(new gi(e))))}onkeyup(e,t){this._register(F(e,I.KEY_UP,e=>t(new gi(e))))}oninput(e,t){this._register(F(e,I.INPUT,t))}onblur(e,t){this._register(F(e,I.BLUR,t))}onfocus(e,t){this._register(F(e,I.FOCUS,t))}onchange(e,t){this._register(F(e,I.CHANGE,t))}ignoreGesture(e){return ba.ignoreTarget(e)}},Sa=11,Ca=class extends xa{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement(`div`),this.bgDomNode.className=`arrow-background`,this.bgDomNode.style.position=`absolute`,this.bgDomNode.style.width=e.bgWidth+`px`,this.bgDomNode.style.height=e.bgHeight+`px`,typeof e.top<`u`&&(this.bgDomNode.style.top=`0px`),typeof e.left<`u`&&(this.bgDomNode.style.left=`0px`),typeof e.bottom<`u`&&(this.bgDomNode.style.bottom=`0px`),typeof e.right<`u`&&(this.bgDomNode.style.right=`0px`),this.domNode=document.createElement(`div`),this.domNode.className=e.className,this.domNode.style.position=`absolute`,this.domNode.style.width=Sa+`px`,this.domNode.style.height=Sa+`px`,typeof e.top<`u`&&(this.domNode.style.top=e.top+`px`),typeof e.left<`u`&&(this.domNode.style.left=e.left+`px`),typeof e.bottom<`u`&&(this.domNode.style.bottom=e.bottom+`px`),typeof e.right<`u`&&(this.domNode.style.right=e.right+`px`),this._pointerMoveMonitor=this._register(new ga),this._register(ia(this.bgDomNode,I.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(ia(this.domNode,I.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new oa),this._pointerdownScheduleRepeatTimer=this._register(new Ti)}_arrowPointerDown(e){!e.target||!(e.target instanceof Element)||(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Gi(e))},200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault())}},wa=class e{constructor(e,t,n,r,i,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,n|=0,r|=0,i|=0,a|=0,o|=0),this.rawScrollLeft=r,this.rawScrollTop=o,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),o+i>a&&(o=a-i),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(t,n){return new e(this._forceIntegerValues,typeof t.width<`u`?t.width:this.width,typeof t.scrollWidth<`u`?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<`u`?t.height:this.height,typeof t.scrollHeight<`u`?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new e(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<`u`?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<`u`?t.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}},Ta=class extends M{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new wa(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>`u`?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>`u`?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;r=t?new ka(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let t=this._state.withScrollPosition(e);this._smoothScrolling=ka.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},Ea=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function Da(e,t){let n=t-e;return function(t){return e+n*ja(t)}}function Oa(e,t,n){return function(r){return r2.5*n){let r,i;return e{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?` fade`:``)))}},Na=140,Pa=class extends xa{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Ma(e.visibility,`visible scrollbar `+e.extraScrollbarClassName,`invisible scrollbar `+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new ga),this._shouldRender=!0,this.domNode=ha(document.createElement(`div`)),this.domNode.setAttribute(`role`,`presentation`),this.domNode.setAttribute(`aria-hidden`,`true`),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition(`absolute`),this._register(F(this.domNode.domNode,I.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new Ca(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=ha(document.createElement(`div`)),this.slider.setClassName(`slider`),this.slider.setPosition(`absolute`),this.slider.setTop(e),this.slider.setLeft(t),typeof n==`number`&&this.slider.setWidth(n),typeof r==`number`&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain(`strict`),this.domNode.domNode.appendChild(this.slider.domNode),this._register(F(this.slider.domNode,I.POINTER_DOWN,e=>{e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))})),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX==`number`&&typeof e.offsetY==`number`)t=e.offsetX,n=e.offsetY;else{let r=la(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName(`active`,!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let i=this._sliderOrthogonalPointerPosition(e),a=Math.abs(i-n);if(qr&&a>Na){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let o=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(o))},()=>{this.slider.toggleClassName(`active`,!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},Fa=class e{constructor(e,t,n,r,i,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize===t?!1:(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize===t?!1:(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition===t?!1:(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,r,i){let a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=r>0&&r>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*o/r))),l=(o-c)/(r-n),u=i*l;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(c),computedSliderRatio:l,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),t){let r=Math.abs(e.deltaX),i=Math.abs(e.deltaY),a=Math.abs(t.deltaX),o=Math.abs(t.deltaY),s=Math.max(Math.min(r,a),1),c=Math.max(Math.min(i,o),1),l=Math.max(r,a),u=Math.max(i,o);l%s===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};Ha.INSTANCE=new Ha;var Ua=Ha,Wa=class extends xa{constructor(e,t,n){super(),this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new P),this.onWillScroll=this._onWillScroll.event,this._options=Ka(t),this._scrollable=n,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let r={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new La(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new Ia(this._scrollable,this._options,r)),this._domNode=document.createElement(`div`),this._domNode.className=`xterm-scrollable-element `+this._options.className,this._domNode.setAttribute(`role`,`presentation`),this._domNode.style.position=`relative`,this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=ha(document.createElement(`div`)),this._leftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=ha(document.createElement(`div`)),this._topShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=ha(document.createElement(`div`)),this._topLeftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onmouseleave(this._listenOnDomNode,e=>this._onMouseLeave(e)),this._hideTimeout=this._register(new Ti),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=tr(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Jr&&(this._options.className+=` mac`),this._domNode.className=`xterm-scrollable-element `+this._options.className}updateOptions(e){typeof e.handleMouseWheel<`u`&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<`u`&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<`u`&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<`u`&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<`u`&&(this._options.horizontal=e.horizontal),typeof e.vertical<`u`&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<`u`&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<`u`&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<`u`&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new xi(e))}_setListeningToMouseWheel(e){this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=tr(this._mouseWheelToDispose),e)&&this._mouseWheelToDispose.push(F(this._listenOnDomNode,I.MOUSE_WHEEL,e=>{this._onMouseWheel(new xi(e))},{passive:!1}))}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=Ua.INSTANCE;Ba&&t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+r===0?i=r=0:Math.abs(r)>=Math.abs(i)?i=0:r=0),this._options.flipAxes&&([r,i]=[i,r]);let a=!Jr&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,r*=this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),s={};if(r){let e=za*r,t=o.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(s,t)}if(i){let e=za*i,t=o.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(s,t)}s=this._scrollable.validateScrollPosition(s),(o.scrollLeft!==s.scrollLeft||o.scrollTop!==s.scrollTop)&&(Ba&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(s):this._scrollable.setScrollPositionNow(s),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?` left`:``,i=t?` top`:``,a=n||t?` top-left-corner`:``;this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${i}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Ra)}},Ga=class extends Wa{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function Ka(e){let t={lazyRender:typeof e.lazyRender<`u`&&e.lazyRender,className:typeof e.className<`u`?e.className:``,useShadows:typeof e.useShadows<`u`?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<`u`?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<`u`&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<`u`&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<`u`&&e.alwaysConsumeMouseWheel,scrollYToX:typeof e.scrollYToX<`u`&&e.scrollYToX,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<`u`?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<`u`?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<`u`?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<`u`?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<`u`?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<`u`?e.listenOnDomNode:null,horizontal:typeof e.horizontal<`u`?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<`u`?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<`u`&&e.horizontalHasArrows,vertical:typeof e.vertical<`u`?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<`u`?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<`u`&&e.verticalHasArrows,verticalSliderSize:typeof e.verticalSliderSize<`u`?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<`u`&&e.scrollByPage};return t.horizontalSliderSize=typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<`u`?e.verticalSliderSize:t.verticalScrollbarSize,Jr&&(t.className+=` mac`),t}var qa=class extends M{constructor(e,t,n,r,i,a,o,s){super(),this._bufferService=n,this._optionsService=o,this._renderService=s,this._onRequestScrollLines=this._register(new P),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let c=this._register(new Ta({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:e=>aa(r.window,e)}));this._register(this._optionsService.onSpecificOptionChange(`smoothScrollDuration`,()=>{c.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new Ga(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},c)),this._register(this._optionsService.onMultipleOptionChange([`scrollSensitivity`,`fastScrollSensitivity`,`overviewRuler`],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(e=>{this._scrollableElement.updateOptions({handleMouseWheel:!(e&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(dr.runAndSubscribe(a.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=a.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(j(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement(`style`),t.appendChild(this._styleElement),this._register(j(()=>this._styleElement.remove())),this._register(dr.runAndSubscribe(a.onChangeColors,()=>{this._styleElement.textContent=[`.xterm .xterm-scrollable-element > .scrollbar > .slider {`,` background: ${a.colors.scrollbarSliderBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider:hover {`,` background: ${a.colors.scrollbarSliderHoverBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider.active {`,` background: ${a.colors.scrollbarSliderActiveBackground.css};`,`}`].join(` -`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};qa=k([A(2,un),A(3,Cn),A(4,dn),A(5,On),A(6,gn),A(7,Tn)],qa);var Ja=class extends M{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement(`div`),this._container.classList.add(`xterm-decoration-container`),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this._register(j(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement(`div`);t.classList.add(`xterm-decoration`),t.classList.toggle(`xterm-decoration-top-layer`,e?.options?.layer===`top`),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display=`none`),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=`none`,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?`none`:`block`,this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||`left`)===`right`?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:``:t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:``}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};Ja=k([A(1,un),A(2,Cn),A(3,yn),A(4,Tn)],Ja);var Ya=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||`full`]&&t<=e.endBufferLine+this._linePadding[n||`full`]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},Xa={full:0,left:0,center:0,right:0},Za={full:0,left:0,center:0,right:0},Qa={full:0,left:0,center:0,right:0},$a=class extends M{constructor(e,t,n,r,i,a,o,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._themeService=o,this._coreBrowserService=s,this._colorZoneStore=new Ya,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-decoration-overview-ruler`),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(j(()=>this._canvas?.remove()));let c=this._canvas.getContext(`2d`);if(c)this._ctx=c;else throw Error(`Ctx cannot be null`);this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?`none`:`block`})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange(`overviewRuler`,()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Za.full=this._canvas.width,Za.left=e,Za.center=t,Za.right=e,this._refreshDrawHeightConstants(),Qa.full=1,Qa.left=1,Qa.center=1+Za.left,Qa.right=1+Za.left+Za.center}_refreshDrawHeightConstants(){Xa.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);Xa.left=t,Xa.center=t,Xa.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!==`full`&&this._renderColorZone(t);for(let t of e)t.position===`full`&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Qa[e.position||`full`],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Xa[e.position||`full`]/2),Za[e.position||`full`],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Xa[e.position||`full`]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};$a=k([A(2,un),A(3,yn),A(4,Tn),A(5,gn),A(6,On),A(7,Cn)],$a);var L;(e=>(e.NUL=`\0`,e.SOH=``,e.STX=``,e.ETX=``,e.EOT=``,e.ENQ=``,e.ACK=``,e.BEL=`\x07`,e.BS=`\b`,e.HT=` `,e.LF=` -`,e.VT=`\v`,e.FF=`\f`,e.CR=`\r`,e.SO=``,e.SI=``,e.DLE=``,e.DC1=``,e.DC2=``,e.DC3=``,e.DC4=``,e.NAK=``,e.SYN=``,e.ETB=``,e.CAN=``,e.EM=``,e.SUB=``,e.ESC=`\x1B`,e.FS=``,e.GS=``,e.RS=``,e.US=``,e.SP=` `,e.DEL=``))(L||={});var eo;(e=>(e.PAD=`€`,e.HOP=``,e.BPH=`‚`,e.NBH=`ƒ`,e.IND=`„`,e.NEL=`…`,e.SSA=`†`,e.ESA=`‡`,e.HTS=`ˆ`,e.HTJ=`‰`,e.VTS=`Š`,e.PLD=`‹`,e.PLU=`Œ`,e.RI=``,e.SS2=`Ž`,e.SS3=``,e.DCS=``,e.PU1=`‘`,e.PU2=`’`,e.STS=`“`,e.CCH=`”`,e.MW=`•`,e.SPA=`–`,e.EPA=`—`,e.SOS=`˜`,e.SGCI=`™`,e.SCI=`š`,e.CSI=`›`,e.ST=`œ`,e.OSC=``,e.PM=`ž`,e.APC=`Ÿ`))(eo||={});var to;(e=>e.ST=`${L.ESC}\\`)(to||={});var no=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=``}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent=``,this._dataAlreadySent=``,this._compositionView.classList.add(`active`)}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove(`active`),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let t;e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,``);this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.lengththis.updateCompositionElements(!0),0)}}};no=k([A(2,un),A(3,gn),A(4,fn),A(5,Tn)],no);var R=0,z=0,B=0,V=0,ro={css:`#00000000`,rgba:0},H;(e=>{function t(e,t,n,r){return r===void 0?`#${oo(e)}${oo(t)}${oo(n)}`:`#${oo(e)}${oo(t)}${oo(n)}${oo(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(H||={});var U;(e=>{function t(e,t){if(V=(t.rgba&255)/255,V===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return R=a+Math.round((n-a)*V),z=o+Math.round((r-o)*V),B=s+Math.round((i-s)*V),{css:H.toCss(R,z,B),rgba:H.toRgba(R,z,B)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=ao.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return H.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[R,z,B]=ao.toChannels(t),{css:H.toCss(R,z,B),rgba:t}}e.opaque=i;function a(e,t){return V=Math.round(t*255),[R,z,B]=ao.toChannels(e.rgba),{css:H.toCss(R,z,B,V),rgba:H.toRgba(R,z,B,V)}}e.opacity=a;function o(e,t){return V=e.rgba&255,a(e,V*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(U||={});var W;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return R=parseInt(e.slice(1,2).repeat(2),16),z=parseInt(e.slice(2,3).repeat(2),16),B=parseInt(e.slice(3,4).repeat(2),16),H.toColor(R,z,B);case 5:return R=parseInt(e.slice(1,2).repeat(2),16),z=parseInt(e.slice(2,3).repeat(2),16),B=parseInt(e.slice(3,4).repeat(2),16),V=parseInt(e.slice(4,5).repeat(2),16),H.toColor(R,z,B,V);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return R=parseInt(r[1]),z=parseInt(r[2]),B=parseInt(r[3]),V=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),H.toColor(R,z,B,V);if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[R,z,B,V]=t.getImageData(0,0,1,1).data,V!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:H.toRgba(R,z,B,V),css:e}}e.toColor=r})(W||={});var io;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(io||={});var ao;(e=>{function t(e,t){if(V=(t&255)/255,V===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return R=a+Math.round((n-a)*V),z=o+Math.round((r-o)*V),B=s+Math.round((i-s)*V),H.toRgba(R,z,B)}e.blend=t;function n(e,t,n){let a=io.relativeLuminance(e>>8),o=io.relativeLuminance(t>>8);if(so(a,o)>8));if(sso(a,io.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=so(a,io.relativeLuminance(s>>8));if(cso(a,io.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=so(io.relativeLuminance2(o,s,c),io.relativeLuminance2(r,i,a));for(;l0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=so(io.relativeLuminance2(o,s,c),io.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=so(io.relativeLuminance2(o,s,c),io.relativeLuminance2(r,i,a));for(;l>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(ao||={});function oo(e){let t=e.toString(16);return t.length<2?`0`+t:t}function so(e,t){return e1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t=ae,w=S,T=this._workCell;if(f.length>0&&S===f[0][0]&&se){let r=f.shift(),i=this._isCellInSelection(r[0],t);for(v=r[0]+1;v=r[1],se?(C=!0,T=new co(this._workCell,e.translateToString(!0,r[0],r[1]),r[1]-r[0]),w=r[1]-1,m=T.getWidth()):ae=r[1]}let E=this._isCellInSelection(S,t),ce=n&&S===a,le=oe&&S>=l&&S<=u,ue=!1;this._decorationService.forEachDecorationAtCell(S,t,void 0,e=>{ue=!0});let de=T.getChars()||$t;if(de===` `&&(T.isUnderline()||T.isOverline())&&(de=`\xA0`),b=m*s-c.get(de,T.isBold(),T.isItalic()),!h)h=this._document.createElement(`span`);else if(g&&(E&&ie||!E&&!ie&&T.bg===ee)&&(E&&ie&&p.selectionForeground||T.fg===y)&&T.extended.ext===te&&le===ne&&b===re&&!ce&&!C&&!ue&&se){T.isInvisible()?_+=$t:_+=de,g++;continue}else g&&(h.textContent=_),h=this._document.createElement(`span`),g=0,_=``;if(ee=T.bg,y=T.fg,te=T.extended.ext,ne=le,re=b,ie=E,C&&a>=S&&a<=w&&(a=S),!this._coreService.isCursorHidden&&ce&&this._coreService.isCursorInitialized){if(x.push(`xterm-cursor`),this._coreBrowserService.isFocused)o&&x.push(`xterm-cursor-blink`),x.push(r===`bar`?`xterm-cursor-bar`:r===`underline`?`xterm-cursor-underline`:`xterm-cursor-block`);else if(i)switch(i){case`outline`:x.push(`xterm-cursor-outline`);break;case`block`:x.push(`xterm-cursor-block`);break;case`bar`:x.push(`xterm-cursor-bar`);break;case`underline`:x.push(`xterm-cursor-underline`);break;default:break}}if(T.isBold()&&x.push(`xterm-bold`),T.isItalic()&&x.push(`xterm-italic`),T.isDim()&&x.push(`xterm-dim`),_=T.isInvisible()?$t:T.getChars()||$t,T.isUnderline()&&(x.push(`xterm-underline-${T.extended.underlineStyle}`),_===` `&&(_=`\xA0`),!T.isUnderlineColorDefault()))if(T.isUnderlineColorRGB())h.style.textDecorationColor=`rgb(${en.toColorRGB(T.getUnderlineColor()).join(`,`)})`;else{let e=T.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&T.isBold()&&e<8&&(e+=8),h.style.textDecorationColor=p.ansi[e].css}T.isOverline()&&(x.push(`xterm-overline`),_===` `&&(_=`\xA0`)),T.isStrikethrough()&&x.push(`xterm-strikethrough`),le&&(h.style.textDecoration=`underline`);let D=T.getFgColor(),fe=T.getFgColorMode(),pe=T.getBgColor(),O=T.getBgColorMode(),me=!!T.isInverse();if(me){let e=D;D=pe,pe=e;let t=fe;fe=O,O=t}let he,ge,_e=!1;this._decorationService.forEachDecorationAtCell(S,t,void 0,e=>{e.options.layer!==`top`&&_e||(e.backgroundColorRGB&&(O=50331648,pe=e.backgroundColorRGB.rgba>>8&16777215,he=e.backgroundColorRGB),e.foregroundColorRGB&&(fe=50331648,D=e.foregroundColorRGB.rgba>>8&16777215,ge=e.foregroundColorRGB),_e=e.options.layer===`top`)}),!_e&&E&&(he=this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque,pe=he.rgba>>8&16777215,O=50331648,_e=!0,p.selectionForeground&&(fe=50331648,D=p.selectionForeground.rgba>>8&16777215,ge=p.selectionForeground)),_e&&x.push(`xterm-decoration-top`);let ve;switch(O){case 16777216:case 33554432:ve=p.ansi[pe],x.push(`xterm-bg-${pe}`);break;case 50331648:ve=H.toColor(pe>>16,pe>>8&255,pe&255),this._addStyle(h,`background-color:#${_o((pe>>>0).toString(16),`0`,6)}`);break;default:me?(ve=p.foreground,x.push(`xterm-bg-257`)):ve=p.background}switch(he||T.isDim()&&(he=U.multiplyOpacity(ve,.5)),fe){case 16777216:case 33554432:T.isBold()&&D<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(D+=8),this._applyMinimumContrast(h,ve,p.ansi[D],T,he,void 0)||x.push(`xterm-fg-${D}`);break;case 50331648:let e=H.toColor(D>>16&255,D>>8&255,D&255);this._applyMinimumContrast(h,ve,e,T,he,ge)||this._addStyle(h,`color:#${_o(D.toString(16),`0`,6)}`);break;default:this._applyMinimumContrast(h,ve,p.foreground,T,he,ge)||me&&x.push(`xterm-fg-257`)}x.length&&=(h.className=x.join(` `),0),!ce&&!C&&!ue&&se?g++:h.textContent=_,b!==this.defaultSpacing&&(h.style.letterSpacing=`${b}px`),d.push(h),S=w}return h&&g&&(h.textContent=_),d}_applyMinimumContrast(e,t,n,r,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||po(r.getCode()))return!1;let o=this._getContrastCache(r),s;if(!i&&!a&&(s=o.getColor(t.rgba,n.rgba)),s===void 0){let e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=U.ensureContrastRatio(i||t,a||n,e),o.setColor((i||t).rgba,(a||n).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(`style`,`${e.getAttribute(`style`)||``}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t=n[0]&&e=n[0]}};go=k([A(1,Dn),A(2,gn),A(3,Cn),A(4,fn),A(5,yn),A(6,On)],go);function _o(e,t,n){for(;e.length0&&(this._flat[r]=t),t}let i=e;t&&(i+=`B`),n&&(i+=`I`);let a=this._holey.get(i);if(a===void 0){let r=0;t&&(r|=1),n&&(r|=2),a=this._measure(e,r),a>0&&this._holey.set(i,a)}return a}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},yo=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);if(s>=e.rows||c<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n=this.startCol&&t=this.startCol):!1}};function bo(){return new yo}var xo=`xterm-dom-renderer-owner-`,So=`xterm-rows`,Co=`xterm-fg-`,wo=`xterm-bg-`,To=`xterm-focus`,Eo=`xterm-selection`,Do=1,Oo=class extends M{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=a,this._linkifier2=o,this._charSizeService=c,this._optionsService=l,this._bufferService=u,this._coreService=d,this._coreBrowserService=f,this._themeService=p,this._terminalClass=Do++,this._rowElements=[],this._selectionRenderModel=bo(),this.onRequestRedraw=this._register(new P).event,this._rowContainer=this._document.createElement(`div`),this._rowContainer.classList.add(So),this._rowContainer.style.lineHeight=`normal`,this._rowContainer.setAttribute(`aria-hidden`,`true`),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement(`div`),this._selectionContainer.classList.add(Eo),this._selectionContainer.setAttribute(`aria-hidden`,`true`),this.dimensions=mo(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(e=>this._injectCss(e))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(go,document),this._element.classList.add(xo+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(e=>this._handleLinkHover(e))),this._register(this._linkifier2.onHideLinkUnderline(e=>this._handleLinkLeave(e))),this._register(j(()=>{this._element.classList.remove(xo+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new vo(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=`hidden`;this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${So} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${So} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${So} .xterm-dim { color: ${U.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${So}.${To} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${So}.${To} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${So}.${To} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Eo} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Eo} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Eo} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,r]of e.ansi.entries())t+=`${this._terminalSelector} .${Co}${n} { color: ${r.css}; }${this._terminalSelector} .${Co}${n}.xterm-dim { color: ${U.multiplyOpacity(r,.5).css}; }${this._terminalSelector} .${wo}${n} { background-color: ${r.css}; }`;t+=`${this._terminalSelector} .${Co}257 { color: ${U.opaque(e.background).css}; }${this._terminalSelector} .${Co}257.xterm-dim { color: ${U.multiplyOpacity(U.opaque(e.background),.5).css}; }${this._terminalSelector} .${wo}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get(`W`,!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){let e=this._document.createElement(`div`);this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(To),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(To),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(n){let n=e[0]>t[0];s.appendChild(this._createSelectionElement(a,n?t[0]:e[0],n?e[0]:t[0],o-a+1))}else{let n=r===a?e[0]:0,c=a===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,n,c));let l=o-a-1;if(s.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,l)),a!==o){let e=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement(`div`),a=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(n-t);return a+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-a),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${a}px`,i.style.width=`${o}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let c=e;c<=t;c++){let e=c+n.ydisp,t=this._rowElements[c],l=n.lines.get(e);if(!t||!l)break;t.replaceChildren(...this._rowFactory.createRow(l,e,e===r,o,s,i,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${xo}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,a){n<0&&(e=0),r<0&&(t=0);let o=this._bufferService.rows-1;n=Math.max(Math.min(n,o),0),r=Math.max(Math.min(r,o),0),i=Math.min(i,this._bufferService.cols);let s=this._bufferService.buffer,c=s.ybase+s.y,l=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=n;o<=r;++o){let p=o+s.ydisp,m=this._rowElements[o],h=s.lines.get(p);if(!m||!h)break;m.replaceChildren(...this._rowFactory.createRow(h,p,p===c,d,f,l,u,this.dimensions.css.cell.width,this._widthCache,a?o===n?e:0:-1,a?(o===r?t:i)-1:-1))}}};Oo=k([A(7,mn),A(8,Sn),A(9,gn),A(10,un),A(11,fn),A(12,Cn),A(13,On)],Oo);var ko=class extends M{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new P),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Mo(this._optionsService))}catch{this._measureStrategy=this._register(new jo(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange([`fontFamily`,`fontSize`],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};ko=k([A(2,gn)],ko);var Ao=class extends M{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},jo=class extends Ao{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement(`span`),this._measureElement.classList.add(`xterm-char-measure-element`),this._measureElement.textContent=`W`.repeat(32),this._measureElement.setAttribute(`aria-hidden`,`true`),this._measureElement.style.whiteSpace=`pre`,this._measureElement.style.fontKerning=`none`,this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},Mo=class extends Ao{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(`2d`);let t=this._ctx.measureText(`W`);if(!(`width`in t&&`fontBoundingBoxAscent`in t&&`fontBoundingBoxDescent`in t))throw Error(`Required font metrics not supported`)}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText(`W`);return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},No=class extends M{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new Po(this._window)),this._onDprChange=this._register(new P),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new P),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(e=>this._screenDprMonitor.setWindow(e))),this._register(dr.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(F(this._textarea,`focus`,()=>this._isFocused=!0)),this._register(F(this._textarea,`blur`,()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},Po=class extends M{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new ar),this._onDprChange=this._register(new P),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(j(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=F(this._parentWindow,`resize`,()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},Fo=class extends M{constructor(){super(),this.linkProviders=[],this._register(j(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Io(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),a=parseInt(i.getPropertyValue(`padding-left`)),o=parseInt(i.getPropertyValue(`padding-top`));return[t.clientX-r.left-a,t.clientY-r.top-o]}function Lo(e,t,n,r,i,a,o,s,c){if(!a)return;let l=Io(e,t,n);if(l)return l[0]=Math.ceil((l[0]+(c?o/2:0))/o),l[1]=Math.ceil(l[1]/s),l[0]=Math.min(Math.max(l[0],1),r+ +!!c),l[1]=Math.min(Math.max(l[1],1),i),l}var Ro=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return Lo(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=Io(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};Ro=k([A(0,Tn),A(1,Sn)],Ro);var zo=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t),!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},Bo={};It(Bo,{getSafariVersion:()=>qo,isChromeOS:()=>$o,isFirefox:()=>Wo,isIpad:()=>Yo,isIphone:()=>Xo,isLegacyEdge:()=>Go,isLinux:()=>Qo,isMac:()=>Jo,isNode:()=>Vo,isSafari:()=>Ko,isWindows:()=>Zo});var Vo=typeof process<`u`&&`title`in process,Ho=Vo?`node`:navigator.userAgent,Uo=Vo?`node`:navigator.platform,Wo=Ho.includes(`Firefox`),Go=Ho.includes(`Edge`),Ko=/^((?!chrome|android).)*safari/i.test(Ho);function qo(){if(!Ko)return 0;let e=Ho.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Jo=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].includes(Uo),Yo=Uo===`iPad`,Xo=Uo===`iPhone`,Zo=[`Windows`,`Win16`,`Win32`,`WinCE`].includes(Uo),Qo=Uo.indexOf(`Linux`)>=0,$o=/\bCrOS\b/.test(Ho),es=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._ii){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},ts=class extends es{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},ns=class extends es{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},rs=!Vo&&`requestIdleCallback`in window?ns:ts,is=class{constructor(){this._queue=new rs}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},as=class extends M{constructor(e,t,n,r,i,a,o,s,c){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=r,this._coreService=i,this._coreBrowserService=s,this._renderer=this._register(new ar),this._pausedResizeTask=new is,this._observerDisposable=this._register(new ar),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new P),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new P),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new P),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new P),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new zo((e,t)=>this._renderRows(e,t),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new os(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(j(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(o.onResize(()=>this._fullRefresh())),this._register(o.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(a.onDecorationRegistered(()=>this._fullRefresh())),this._register(a.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange([`customGlyphs`,`drawBoldTextInBrightColors`,`letterSpacing`,`lineHeight`,`fontFamily`,`fontSize`,`fontWeight`,`fontWeightBold`,`minimumContrastRatio`,`rescaleOverlappingGlyphs`],()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange([`cursorBlink`,`cursorStyle`],()=>this.refreshRows(o.buffer.y,o.buffer.y,!0))),this._register(c.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(e=>this._registerIntersectionObserver(e,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if(`IntersectionObserver`in e){let n=new e.IntersectionObserver(e=>this._handleIntersectionChange(e[e.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=j(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&=(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(e=>this.refreshRows(e.start,e.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};as=k([A(2,gn),A(3,Sn),A(4,fn),A(5,yn),A(6,un),A(7,Cn),A(8,On)],as);var os=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function ss(e,t,n,r){let i=n.buffer.x,a=n.buffer.y;if(!n.buffer.hasScrollback)return us(i,a,e,t,n,r)+ds(a,t,n,r)+fs(i,a,e,t,n,r);let o;if(a===t)return o=i>e?`D`:`C`,ys(Math.abs(i-e),vs(o,r));o=a>t?`D`:`C`;let s=Math.abs(a-t);return ys(ls(a>t?e:i,n)+(s-1)*n.cols+1+cs(a>t?i:e,n),vs(o,r))}function cs(e,t){return e-1}function ls(e,t){return t.cols-e}function us(e,t,n,r,i,a){return ds(t,r,i,a).length===0?``:ys(_s(e,t,e,t-ms(t,i),!1,i).length,vs(`D`,a))}function ds(e,t,n,r){let i=e-ms(e,n),a=t-ms(t,n);return ys(Math.abs(i-a)-ps(e,t,n),vs(gs(e,t),r))}function fs(e,t,n,r,i,a){let o;o=ds(t,r,i,a).length>0?r-ms(r,i):t;let s=r,c=hs(e,t,n,r,i,a);return ys(_s(e,o,n,s,c===`C`,i).length,vs(c,a))}function ps(e,t,n){let r=0,i=e-ms(e,n),a=t-ms(t,n);for(let o=0;o=0&&e0?r-ms(r,i):t,e=n&&ot?`A`:`B`}function _s(e,t,n,r,i,a){let o=e,s=t,c=``;for(;(o!==n||s!==r)&&s>=0&&sa.cols-1?(c+=a.buffer.translateBufferLineToString(s,!1,e,o),o=0,e=0,s++):!i&&o<0&&(c+=a.buffer.translateBufferLineToString(s,!1,0,e+1),o=a.cols-1,e=o,s--);return c+a.buffer.translateBufferLineToString(s,!1,e,o)}function vs(e,t){let n=t?`O`:`[`;return L.ESC+n+e}function ys(e,t){e=Math.floor(e);let n=``;for(let r=0;rthis._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function xs(e,t){if(e.start.y>e.end.y)throw Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Ss=50,Cs=15,ws=50,Ts=500,Es=RegExp(`\xA0`,`g`),Ds=class extends M{constructor(e,t,n,r,i,a,o,s,c){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=a,this._optionsService=o,this._renderService=s,this._coreBrowserService=c,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new nn,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new P),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new P),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new P),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new P),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(e=>this._handleTrim(e)),this._register(this._bufferService.buffers.onBufferActivate(e=>this._handleBufferActivate(e))),this.enable(),this._model=new bs(this._bufferService),this._activeSelectionMode=0,this._register(j(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(e=>{e.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return``;let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return``;let i=e[0]e.replace(Es,` `)).join(Zo?`\r +`).trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);Cr.register(a,t?.[2]??e,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*Sr<=t.length){let e=0;for(let n=0;n0}},wr=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Tr=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new P,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new P,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};Tr.INSTANCE=new Tr;var Er=Tr;function Dr(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}Er.INSTANCE.onDidChangeZoomLevel;function Or(e){return Er.INSTANCE.getZoomFactor(e)}Er.INSTANCE.onDidChangeFullscreen;var kr=typeof navigator==`object`?navigator.userAgent:``,Ar=kr.indexOf(`Firefox`)>=0,jr=kr.indexOf(`AppleWebKit`)>=0,Mr=kr.indexOf(`Chrome`)>=0,Nr=!Mr&&kr.indexOf(`Safari`)>=0;kr.indexOf(`Electron/`),kr.indexOf(`Android`);var Pr=!1;if(typeof or.matchMedia==`function`){let e=or.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=or.matchMedia(`(display-mode: fullscreen)`);Pr=e.matches,Dr(or,e,({matches:e})=>{Pr&&t.matches||(Pr=e)})}function Fr(){return Pr}var Ir=`en`,Lr=!1,Rr=!1,zr=!1,Br=!1,Vr=!1,Hr=Ir,Ur,Wr=globalThis,Gr;typeof Wr.vscode<`u`&&typeof Wr.vscode.process<`u`?Gr=Wr.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(Gr=process);var Kr=typeof Gr?.versions?.electron==`string`&&Gr?.type===`renderer`;if(typeof Gr==`object`){Lr=Gr.platform===`win32`,Rr=Gr.platform===`darwin`,zr=Gr.platform===`linux`,zr&&Gr.env.SNAP&&Gr.env.SNAP_REVISION,Gr.env.CI||Gr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Hr=Ir;let e=Gr.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,Hr=t.resolvedLanguage||Ir,t.languagePack?.translationsConfigFile}catch{}Br=!0}else typeof navigator==`object`&&!Kr?(Ur=navigator.userAgent,Lr=Ur.indexOf(`Windows`)>=0,Rr=Ur.indexOf(`Macintosh`)>=0,(Ur.indexOf(`Macintosh`)>=0||Ur.indexOf(`iPad`)>=0||Ur.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,zr=Ur.indexOf(`Linux`)>=0,Ur?.indexOf(`Mobi`),Vr=!0,Hr=globalThis._VSCODE_NLS_LANGUAGE||Ir,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var qr=Lr,Jr=Rr,Yr=zr,Xr=Br;Vr&&typeof Wr.importScripts==`function`&&Wr.origin;var Zr=Ur,Qr=Hr,$r;(e=>{function t(){return Qr}e.value=t;function n(){return Qr.length===2?Qr===`en`:Qr.length>=3&&Qr[0]===`e`&&Qr[1]===`n`&&Qr[2]===`-`}e.isDefaultVariant=n;function r(){return Qr===`en`}e.isDefault=r})($r||={});var ei=typeof Wr.postMessage==`function`&&!Wr.importScripts;(()=>{if(ei){let e=[];Wr.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{let r=++t;e.push({id:r,callback:n}),Wr.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var ti=!!(Zr&&Zr.indexOf(`Chrome`)>=0);Zr&&Zr.indexOf(`Firefox`),!ti&&Zr&&Zr.indexOf(`Safari`),Zr&&Zr.indexOf(`Edg/`),Zr&&Zr.indexOf(`Android`);var ni=typeof navigator==`object`?navigator:{};Xr||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||ni&&ni.clipboard&&ni.clipboard.writeText,Xr||ni&&ni.clipboard&&ni.clipboard.readText,Xr||Fr()||ni.keyboard,`ontouchstart`in or||ni.maxTouchPoints,or.PointerEvent&&(`ontouchstart`in or||navigator.maxTouchPoints);var ri=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},ii=new ri,ai=new ri,oi=new ri,si=Array(230),ci;(e=>{function t(e){return ii.keyCodeToStr(e)}e.toString=t;function n(e){return ii.strToKeyCode(e)}e.fromString=n;function r(e){return ai.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return oi.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return ai.strToKeyCode(e)||oi.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return ii.keyCodeToStr(e)}e.toElectronAccelerator=o})(ci||={});var li=class e{constructor(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}equals(t){return t instanceof e&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){return`K${this.ctrlKey?`1`:`0`}${this.shiftKey?`1`:`0`}${this.altKey?`1`:`0`}${this.metaKey?`1`:`0`}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new ui([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},ui=class{constructor(e){if(e.length===0)throw Fn(`chords`);this.chords=e}getHashCode(){let e=``;for(let t=0,n=this.chords.length;t{function t(t){return t===e.None||t===e.Cancelled||t instanceof wi?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:dr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Si})})(Ci||={});var wi=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Si:(this._emitter||=new P,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},Ti=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e==`function`&&typeof t==`number`&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Ln(`Calling 'cancelAndSet' on a disposed TimeoutTimer`);this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Ln(`Calling 'setIfNotSet' on a disposed TimeoutTimer`);this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},Ei=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new Ln(`Calling 'cancelAndSet' on a disposed IntervalTimer`);this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=j(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var Di;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Di||={});var Oi=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new P,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Oi.EMPTY=Oi.fromArray([]);function ki(e){return 55296<=e&&e<=56319}function Ai(e){return 56320<=e&&e<=57343}function ji(e,t){return(e-55296<<10)+(t-56320)+65536}function Mi(e){return Ni(e,0)}function Ni(e,t){switch(typeof e){case`object`:return e===null?Pi(349,t):Array.isArray(e)?Li(e,t):Ri(e,t);case`string`:return Ii(e,t);case`boolean`:return Fi(e,t);case`number`:return Pi(e,t);case`undefined`:return Pi(937,t);default:return Pi(617,t)}}function Pi(e,t){return(t<<5)-t+e|0}function Fi(e,t){return Pi(e?433:863,t)}function Ii(e,t){t=Pi(149417,t);for(let n=0,r=e.length;nNi(t,e),t)}function Ri(e,t){return t=Pi(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=Ii(n,t),Ni(e[n],t)),t)}function zi(e,t,n=32){let r=n-t,i=~((1<>>r)>>>0}function Bi(e,t=0,n=e.byteLength,r=0){for(let i=0;ie.toString(16).padStart(2,`0`)).join(``):Vi((e>>>0).toString(16),t/4)}var Ui=class e{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,r=this._buffLen,i=this._leftoverHighSurrogate,a,o;for(i===0?(a=e.charCodeAt(0),o=0):(a=i,o=-1,i=0);;){let s=a;if(ki(a))if(o+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Hi(this._h0)+Hi(this._h1)+Hi(this._h2)+Hi(this._h3)+Hi(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Bi(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Bi(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let e=0;e<64;e+=4)t.setUint32(e,n.getUint32(e,!1),!1);for(let e=64;e<320;e+=4)t.setUint32(e,zi(t.getUint32(e-12,!1)^t.getUint32(e-32,!1)^t.getUint32(e-56,!1)^t.getUint32(e-64,!1),1),!1);let r=this._h0,i=this._h1,a=this._h2,o=this._h3,s=this._h4,c,l,u;for(let e=0;e<80;e++)e<20?(c=i&a|~i&o,l=1518500249):e<40?(c=i^a^o,l=1859775393):e<60?(c=i&a|i&o|a&o,l=2400959708):(c=i^a^o,l=3395469782),u=zi(r,5)+c+s+l+t.getUint32(e*4,!1)&4294967295,s=o,o=a,a=zi(i,30),i=r,r=u;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+s&4294967295}};Ui._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:Wi,getWindow:Gi,getDocument:Ki,getWindows:qi,getWindowsCount:Ji,getWindowId:Yi,getWindowById:Xi,hasWindow:Zi,onDidRegisterWindow:Qi,onWillUnregisterWindow:$i,onDidUnregisterWindow:ea}=function(){let e=new Map,t={window:or,disposables:new ir};e.set(or.vscodeWindowId,t);let n=new P,r=new P,i=new P;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return M.None;let a=new ir,o={window:t,disposables:a.add(new ir)};return e.set(t.vscodeWindowId,o),a.add(j(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(F(t,I.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:or},getDocument(e){return Gi(e).document}}}(),ta=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function F(e,t,n,r){return new ta(e,t,n,r)}function na(e,t){return function(n){return t(new bi(e,n))}}function ra(e){return function(t){return e(new gi(t))}}var ia=function(e,t,n,r){let i=n;return t===`click`||t===`mousedown`||t===`contextmenu`?i=na(Gi(e),n):(t===`keydown`||t===`keypress`||t===`keyup`)&&(i=ra(n)),F(e,t,i,r)},aa,oa=class extends Ei{constructor(e){super(),this.defaultTarget=e&&Gi(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},sa=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){jn(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,r=new Map,i=i=>{n.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),r.set(i,!0);a.length>0;)a.sort(sa.sort),a.shift().execute();r.set(i,!1)};aa=(t,r,a=0)=>{let o=Yi(t),s=new sa(r,a),c=e.get(o);return c||(c=[],e.set(o,c)),c.push(s),n.get(o)||(n.set(o,!0),t.requestAnimationFrame(()=>i(o))),s}})();var ca=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};ca.None=new ca(0,0);function la(e){let t=e.getBoundingClientRect(),n=Gi(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=Mi(n),a=r.get(i);if(a)a.users+=1;else{let o=new P,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(j(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var I={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:jr?`webkitAnimationStart`:`animationstart`,ANIMATION_END:jr?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:jr?`webkitAnimationIteration`:`animationiteration`},ua=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function da(e,t,n,...r){let i=ua.exec(t);if(!i)throw Error(`Bad use of emmet`);let a=i[1]||`div`,o;return o=e===`http://www.w3.org/1999/xhtml`?document.createElement(a):document.createElementNS(e,a),i[3]&&(o.id=i[3]),i[4]&&(o.className=i[4].replace(/\./g,` `).trim()),n&&Object.entries(n).forEach(([e,t])=>{typeof t>`u`||(/^on\w+$/.test(e)?o[e]=t:e===`selected`?t&&o.setAttribute(e,`true`):o.setAttribute(e,t))}),o.append(...r),o}function fa(e,t,...n){return da(`http://www.w3.org/1999/xhtml`,e,t,...n)}fa.SVG=function(e,t,...n){return da(`http://www.w3.org/2000/svg`,e,t,...n)};var pa=class{constructor(e){this.domNode=e,this._maxWidth=``,this._width=``,this._height=``,this._top=``,this._left=``,this._bottom=``,this._right=``,this._paddingTop=``,this._paddingLeft=``,this._paddingBottom=``,this._paddingRight=``,this._fontFamily=``,this._fontWeight=``,this._fontSize=``,this._fontStyle=``,this._fontFeatureSettings=``,this._fontVariationSettings=``,this._textDecoration=``,this._lineHeight=``,this._letterSpacing=``,this._className=``,this._display=``,this._position=``,this._visibility=``,this._color=``,this._backgroundColor=``,this._layerHint=!1,this._contain=`none`,this._boxShadow=``}setMaxWidth(e){let t=ma(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=ma(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=ma(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=ma(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=ma(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=ma(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=ma(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=ma(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=ma(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=ma(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=ma(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=ma(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=ma(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=ma(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?`translate3d(0px, 0px, 0px)`:``)}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function ma(e){return typeof e==`number`?`${e}px`:e}function ha(e){return new pa(e)}var ga=class{constructor(){this._hooks=new ir,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let a=e;try{e.setPointerCapture(t),this._hooks.add(j(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=Gi(e)}this._hooks.add(F(a,I.POINTER_MOVE,e=>{if(e.buttons!==n){this.stopMonitoring(!0);return}e.preventDefault(),this._pointerMoveCallback(e)})),this._hooks.add(F(a,I.POINTER_UP,e=>this.stopMonitoring(!0)))}};function _a(e,t,n){let r=null,i=null;if(typeof n.value==`function`?(r=`value`,i=n.value,i.length!==0&&console.warn(`Memoize should only be used in functions with zero parameters`)):typeof n.get==`function`&&(r=`get`,i=n.get),!i)throw Error(`not supported`);let a=`$memoize$${t}`;n[r]=function(...e){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[a]}}var va;(e=>(e.Tap=`-xterm-gesturetap`,e.Change=`-xterm-gesturechange`,e.Start=`-xterm-gesturestart`,e.End=`-xterm-gesturesend`,e.Contextmenu=`-xterm-gesturecontextmenu`))(va||={});var ya=class e extends M{constructor(){super(),this.dispatched=!1,this.targets=new cr,this.ignoreTargets=new cr,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(dr.runAndSubscribe(Qi,({window:e,disposables:t})=>{t.add(F(e.document,`touchstart`,e=>this.onTouchStart(e),{passive:!1})),t.add(F(e.document,`touchend`,t=>this.onTouchEnd(e,t))),t.add(F(e.document,`touchmove`,e=>this.onTouchMove(e),{passive:!1}))},{window:or,disposables:this._store}))}static addTarget(t){return e.isTouchDevice()?(e.INSTANCE||=er(new e),j(e.INSTANCE.targets.push(t))):M.None}static ignoreTarget(t){return e.isTouchDevice()?(e.INSTANCE||=er(new e),j(e.INSTANCE.ignoreTargets.push(t))):M.None}static isTouchDevice(){return`ontouchstart`in or||navigator.maxTouchPoints>0}dispose(){this.handle&&=(this.handle.dispose(),null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&=(this.handle.dispose(),null);for(let n=0,r=e.targetTouches.length;n=e.HOLD_DELAY&&Math.abs(s.initialPageX-Bn(s.rollingPageX))<30&&Math.abs(s.initialPageY-Bn(s.rollingPageY))<30){let e=this.newGestureEvent(va.Contextmenu,s.initialTarget);e.pageX=Bn(s.rollingPageX),e.pageY=Bn(s.rollingPageY),this.dispatchEvent(e)}else if(i===1){let e=Bn(s.rollingPageX),n=Bn(s.rollingPageY),i=Bn(s.rollingTimestamps)-s.rollingTimestamps[0],a=e-s.rollingPageX[0],o=n-s.rollingPageY[0],c=[...this.targets].filter(e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget));this.inertia(t,c,r,Math.abs(a)/i,a>0?1:-1,e,Math.abs(o)/i,o>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(va.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&=(n.preventDefault(),n.stopPropagation(),!1)}newGestureEvent(e,t){let n=document.createEvent(`CustomEvent`);return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(t){if(t.type===va.Tap){let n=new Date().getTime(),r=0;r=n-this._lastSetTapCountTime>e.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=n,t.tapCount=r}else(t.type===va.Change||t.type===va.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let e of this.ignoreTargets)if(e.contains(t.initialTarget))return;let e=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let r=0,i=t.initialTarget;for(;i&&i!==n;)r++,i=i.parentElement;e.push([r,n])}e.sort((e,t)=>e[0]-t[0]);for(let[n,r]of e)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,r,i,a,o,s,c,l){this.handle=aa(t,()=>{let u=Date.now(),d=u-r,f=0,p=0,m=!0;i+=e.SCROLL_FRICTION*d,s+=e.SCROLL_FRICTION*d,i>0&&(m=!1,f=a*i*d),s>0&&(m=!1,p=c*s*d);let h=this.newGestureEvent(va.Change);h.translationX=f,h.translationY=p,n.forEach(e=>e.dispatchEvent(h)),m||this.inertia(t,n,u,i,a,o+f,s,c,l+p)})}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n3&&(i.rollingPageX.shift(),i.rollingPageY.shift(),i.rollingTimestamps.shift()),i.rollingPageX.push(r.pageX),i.rollingPageY.push(r.pageY),i.rollingTimestamps.push(t)}this.dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}};ya.SCROLL_FRICTION=-.005,ya.HOLD_DELAY=700,ya.CLEAR_TAP_COUNT_TIME=400,O([_a],ya,`isTouchDevice`,1);var ba=ya,xa=class extends M{onclick(e,t){this._register(F(e,I.CLICK,n=>t(new bi(Gi(e),n))))}onmousedown(e,t){this._register(F(e,I.MOUSE_DOWN,n=>t(new bi(Gi(e),n))))}onmouseover(e,t){this._register(F(e,I.MOUSE_OVER,n=>t(new bi(Gi(e),n))))}onmouseleave(e,t){this._register(F(e,I.MOUSE_LEAVE,n=>t(new bi(Gi(e),n))))}onkeydown(e,t){this._register(F(e,I.KEY_DOWN,e=>t(new gi(e))))}onkeyup(e,t){this._register(F(e,I.KEY_UP,e=>t(new gi(e))))}oninput(e,t){this._register(F(e,I.INPUT,t))}onblur(e,t){this._register(F(e,I.BLUR,t))}onfocus(e,t){this._register(F(e,I.FOCUS,t))}onchange(e,t){this._register(F(e,I.CHANGE,t))}ignoreGesture(e){return ba.ignoreTarget(e)}},Sa=11,Ca=class extends xa{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement(`div`),this.bgDomNode.className=`arrow-background`,this.bgDomNode.style.position=`absolute`,this.bgDomNode.style.width=e.bgWidth+`px`,this.bgDomNode.style.height=e.bgHeight+`px`,typeof e.top<`u`&&(this.bgDomNode.style.top=`0px`),typeof e.left<`u`&&(this.bgDomNode.style.left=`0px`),typeof e.bottom<`u`&&(this.bgDomNode.style.bottom=`0px`),typeof e.right<`u`&&(this.bgDomNode.style.right=`0px`),this.domNode=document.createElement(`div`),this.domNode.className=e.className,this.domNode.style.position=`absolute`,this.domNode.style.width=Sa+`px`,this.domNode.style.height=Sa+`px`,typeof e.top<`u`&&(this.domNode.style.top=e.top+`px`),typeof e.left<`u`&&(this.domNode.style.left=e.left+`px`),typeof e.bottom<`u`&&(this.domNode.style.bottom=e.bottom+`px`),typeof e.right<`u`&&(this.domNode.style.right=e.right+`px`),this._pointerMoveMonitor=this._register(new ga),this._register(ia(this.bgDomNode,I.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(ia(this.domNode,I.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new oa),this._pointerdownScheduleRepeatTimer=this._register(new Ti)}_arrowPointerDown(e){!e.target||!(e.target instanceof Element)||(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Gi(e))},200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault())}},wa=class e{constructor(e,t,n,r,i,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,n|=0,r|=0,i|=0,a|=0,o|=0),this.rawScrollLeft=r,this.rawScrollTop=o,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),o+i>a&&(o=a-i),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(t,n){return new e(this._forceIntegerValues,typeof t.width<`u`?t.width:this.width,typeof t.scrollWidth<`u`?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<`u`?t.height:this.height,typeof t.scrollHeight<`u`?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new e(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<`u`?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<`u`?t.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}},Ta=class extends M{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new wa(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>`u`?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>`u`?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;r=t?new ka(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let t=this._state.withScrollPosition(e);this._smoothScrolling=ka.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},Ea=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function Da(e,t){let n=t-e;return function(t){return e+n*ja(t)}}function Oa(e,t,n){return function(r){return r2.5*n){let r,i;return e{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?` fade`:``)))}},Na=140,Pa=class extends xa{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Ma(e.visibility,`visible scrollbar `+e.extraScrollbarClassName,`invisible scrollbar `+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new ga),this._shouldRender=!0,this.domNode=ha(document.createElement(`div`)),this.domNode.setAttribute(`role`,`presentation`),this.domNode.setAttribute(`aria-hidden`,`true`),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition(`absolute`),this._register(F(this.domNode.domNode,I.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new Ca(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=ha(document.createElement(`div`)),this.slider.setClassName(`slider`),this.slider.setPosition(`absolute`),this.slider.setTop(e),this.slider.setLeft(t),typeof n==`number`&&this.slider.setWidth(n),typeof r==`number`&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain(`strict`),this.domNode.domNode.appendChild(this.slider.domNode),this._register(F(this.slider.domNode,I.POINTER_DOWN,e=>{e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))})),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX==`number`&&typeof e.offsetY==`number`)t=e.offsetX,n=e.offsetY;else{let r=la(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName(`active`,!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let i=this._sliderOrthogonalPointerPosition(e),a=Math.abs(i-n);if(qr&&a>Na){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let o=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(o))},()=>{this.slider.toggleClassName(`active`,!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},Fa=class e{constructor(e,t,n,r,i,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize===t?!1:(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize===t?!1:(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition===t?!1:(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,r,i){let a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=r>0&&r>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*o/r))),l=(o-c)/(r-n),u=i*l;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(c),computedSliderRatio:l,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),t){let r=Math.abs(e.deltaX),i=Math.abs(e.deltaY),a=Math.abs(t.deltaX),o=Math.abs(t.deltaY),s=Math.max(Math.min(r,a),1),c=Math.max(Math.min(i,o),1),l=Math.max(r,a),u=Math.max(i,o);l%s===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};Ha.INSTANCE=new Ha;var Ua=Ha,Wa=class extends xa{constructor(e,t,n){super(),this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new P),this.onWillScroll=this._onWillScroll.event,this._options=Ka(t),this._scrollable=n,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let r={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new La(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new Ia(this._scrollable,this._options,r)),this._domNode=document.createElement(`div`),this._domNode.className=`xterm-scrollable-element `+this._options.className,this._domNode.setAttribute(`role`,`presentation`),this._domNode.style.position=`relative`,this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=ha(document.createElement(`div`)),this._leftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=ha(document.createElement(`div`)),this._topShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=ha(document.createElement(`div`)),this._topLeftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onmouseleave(this._listenOnDomNode,e=>this._onMouseLeave(e)),this._hideTimeout=this._register(new Ti),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=tr(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Jr&&(this._options.className+=` mac`),this._domNode.className=`xterm-scrollable-element `+this._options.className}updateOptions(e){typeof e.handleMouseWheel<`u`&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<`u`&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<`u`&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<`u`&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<`u`&&(this._options.horizontal=e.horizontal),typeof e.vertical<`u`&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<`u`&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<`u`&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<`u`&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new xi(e))}_setListeningToMouseWheel(e){this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=tr(this._mouseWheelToDispose),e)&&this._mouseWheelToDispose.push(F(this._listenOnDomNode,I.MOUSE_WHEEL,e=>{this._onMouseWheel(new xi(e))},{passive:!1}))}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=Ua.INSTANCE;Ba&&t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+r===0?i=r=0:Math.abs(r)>=Math.abs(i)?i=0:r=0),this._options.flipAxes&&([r,i]=[i,r]);let a=!Jr&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,r*=this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),s={};if(r){let e=za*r,t=o.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(s,t)}if(i){let e=za*i,t=o.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(s,t)}s=this._scrollable.validateScrollPosition(s),(o.scrollLeft!==s.scrollLeft||o.scrollTop!==s.scrollTop)&&(Ba&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(s):this._scrollable.setScrollPositionNow(s),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?` left`:``,i=t?` top`:``,a=n||t?` top-left-corner`:``;this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${i}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Ra)}},Ga=class extends Wa{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function Ka(e){let t={lazyRender:typeof e.lazyRender<`u`&&e.lazyRender,className:typeof e.className<`u`?e.className:``,useShadows:typeof e.useShadows<`u`?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<`u`?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<`u`&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<`u`&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<`u`&&e.alwaysConsumeMouseWheel,scrollYToX:typeof e.scrollYToX<`u`&&e.scrollYToX,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<`u`?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<`u`?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<`u`?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<`u`?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<`u`?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<`u`?e.listenOnDomNode:null,horizontal:typeof e.horizontal<`u`?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<`u`?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<`u`&&e.horizontalHasArrows,vertical:typeof e.vertical<`u`?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<`u`?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<`u`&&e.verticalHasArrows,verticalSliderSize:typeof e.verticalSliderSize<`u`?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<`u`&&e.scrollByPage};return t.horizontalSliderSize=typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<`u`?e.verticalSliderSize:t.verticalScrollbarSize,Jr&&(t.className+=` mac`),t}var qa=class extends M{constructor(e,t,n,r,i,a,o,s){super(),this._bufferService=n,this._optionsService=o,this._renderService=s,this._onRequestScrollLines=this._register(new P),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let c=this._register(new Ta({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:e=>aa(r.window,e)}));this._register(this._optionsService.onSpecificOptionChange(`smoothScrollDuration`,()=>{c.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new Ga(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},c)),this._register(this._optionsService.onMultipleOptionChange([`scrollSensitivity`,`fastScrollSensitivity`,`overviewRuler`],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(e=>{this._scrollableElement.updateOptions({handleMouseWheel:!(e&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(dr.runAndSubscribe(a.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=a.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(j(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement(`style`),t.appendChild(this._styleElement),this._register(j(()=>this._styleElement.remove())),this._register(dr.runAndSubscribe(a.onChangeColors,()=>{this._styleElement.textContent=[`.xterm .xterm-scrollable-element > .scrollbar > .slider {`,` background: ${a.colors.scrollbarSliderBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider:hover {`,` background: ${a.colors.scrollbarSliderHoverBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider.active {`,` background: ${a.colors.scrollbarSliderActiveBackground.css};`,`}`].join(` +`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};qa=O([k(2,un),k(3,Cn),k(4,dn),k(5,On),k(6,gn),k(7,Tn)],qa);var Ja=class extends M{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement(`div`),this._container.classList.add(`xterm-decoration-container`),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this._register(j(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement(`div`);t.classList.add(`xterm-decoration`),t.classList.toggle(`xterm-decoration-top-layer`,e?.options?.layer===`top`),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display=`none`),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=`none`,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?`none`:`block`,this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||`left`)===`right`?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:``:t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:``}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};Ja=O([k(1,un),k(2,Cn),k(3,yn),k(4,Tn)],Ja);var Ya=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||`full`]&&t<=e.endBufferLine+this._linePadding[n||`full`]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},Xa={full:0,left:0,center:0,right:0},Za={full:0,left:0,center:0,right:0},Qa={full:0,left:0,center:0,right:0},$a=class extends M{constructor(e,t,n,r,i,a,o,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._themeService=o,this._coreBrowserService=s,this._colorZoneStore=new Ya,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-decoration-overview-ruler`),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(j(()=>this._canvas?.remove()));let c=this._canvas.getContext(`2d`);if(c)this._ctx=c;else throw Error(`Ctx cannot be null`);this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?`none`:`block`})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange(`overviewRuler`,()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Za.full=this._canvas.width,Za.left=e,Za.center=t,Za.right=e,this._refreshDrawHeightConstants(),Qa.full=1,Qa.left=1,Qa.center=1+Za.left,Qa.right=1+Za.left+Za.center}_refreshDrawHeightConstants(){Xa.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);Xa.left=t,Xa.center=t,Xa.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Xa.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!==`full`&&this._renderColorZone(t);for(let t of e)t.position===`full`&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Qa[e.position||`full`],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Xa[e.position||`full`]/2),Za[e.position||`full`],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Xa[e.position||`full`]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};$a=O([k(2,un),k(3,yn),k(4,Tn),k(5,gn),k(6,On),k(7,Cn)],$a);var L;(e=>(e.NUL=`\0`,e.SOH=``,e.STX=``,e.ETX=``,e.EOT=``,e.ENQ=``,e.ACK=``,e.BEL=`\x07`,e.BS=`\b`,e.HT=` `,e.LF=` +`,e.VT=`\v`,e.FF=`\f`,e.CR=`\r`,e.SO=``,e.SI=``,e.DLE=``,e.DC1=``,e.DC2=``,e.DC3=``,e.DC4=``,e.NAK=``,e.SYN=``,e.ETB=``,e.CAN=``,e.EM=``,e.SUB=``,e.ESC=`\x1B`,e.FS=``,e.GS=``,e.RS=``,e.US=``,e.SP=` `,e.DEL=``))(L||={});var eo;(e=>(e.PAD=`€`,e.HOP=``,e.BPH=`‚`,e.NBH=`ƒ`,e.IND=`„`,e.NEL=`…`,e.SSA=`†`,e.ESA=`‡`,e.HTS=`ˆ`,e.HTJ=`‰`,e.VTS=`Š`,e.PLD=`‹`,e.PLU=`Œ`,e.RI=``,e.SS2=`Ž`,e.SS3=``,e.DCS=``,e.PU1=`‘`,e.PU2=`’`,e.STS=`“`,e.CCH=`”`,e.MW=`•`,e.SPA=`–`,e.EPA=`—`,e.SOS=`˜`,e.SGCI=`™`,e.SCI=`š`,e.CSI=`›`,e.ST=`œ`,e.OSC=``,e.PM=`ž`,e.APC=`Ÿ`))(eo||={});var to;(e=>e.ST=`${L.ESC}\\`)(to||={});var no=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=``}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent=``,this._dataAlreadySent=``,this._compositionView.classList.add(`active`)}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove(`active`),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let t;e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,``);this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.lengththis.updateCompositionElements(!0),0)}}};no=O([k(2,un),k(3,gn),k(4,fn),k(5,Tn)],no);var R=0,z=0,B=0,V=0,ro={css:`#00000000`,rgba:0},H;(e=>{function t(e,t,n,r){return r===void 0?`#${oo(e)}${oo(t)}${oo(n)}`:`#${oo(e)}${oo(t)}${oo(n)}${oo(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(H||={});var U;(e=>{function t(e,t){if(V=(t.rgba&255)/255,V===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return R=a+Math.round((n-a)*V),z=o+Math.round((r-o)*V),B=s+Math.round((i-s)*V),{css:H.toCss(R,z,B),rgba:H.toRgba(R,z,B)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=ao.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return H.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[R,z,B]=ao.toChannels(t),{css:H.toCss(R,z,B),rgba:t}}e.opaque=i;function a(e,t){return V=Math.round(t*255),[R,z,B]=ao.toChannels(e.rgba),{css:H.toCss(R,z,B,V),rgba:H.toRgba(R,z,B,V)}}e.opacity=a;function o(e,t){return V=e.rgba&255,a(e,V*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(U||={});var W;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return R=parseInt(e.slice(1,2).repeat(2),16),z=parseInt(e.slice(2,3).repeat(2),16),B=parseInt(e.slice(3,4).repeat(2),16),H.toColor(R,z,B);case 5:return R=parseInt(e.slice(1,2).repeat(2),16),z=parseInt(e.slice(2,3).repeat(2),16),B=parseInt(e.slice(3,4).repeat(2),16),V=parseInt(e.slice(4,5).repeat(2),16),H.toColor(R,z,B,V);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return R=parseInt(r[1]),z=parseInt(r[2]),B=parseInt(r[3]),V=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),H.toColor(R,z,B,V);if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[R,z,B,V]=t.getImageData(0,0,1,1).data,V!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:H.toRgba(R,z,B,V),css:e}}e.toColor=r})(W||={});var io;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(io||={});var ao;(e=>{function t(e,t){if(V=(t&255)/255,V===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return R=a+Math.round((n-a)*V),z=o+Math.round((r-o)*V),B=s+Math.round((i-s)*V),H.toRgba(R,z,B)}e.blend=t;function n(e,t,n){let a=io.relativeLuminance(e>>8),o=io.relativeLuminance(t>>8);if(so(a,o)>8));if(sso(a,io.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=so(a,io.relativeLuminance(s>>8));if(cso(a,io.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=so(io.relativeLuminance2(o,s,c),io.relativeLuminance2(r,i,a));for(;l0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=so(io.relativeLuminance2(o,s,c),io.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=so(io.relativeLuminance2(o,s,c),io.relativeLuminance2(r,i,a));for(;l>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(ao||={});function oo(e){let t=e.toString(16);return t.length<2?`0`+t:t}function so(e,t){return e1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t=re,T=w,E=this._workCell;if(f.length>0&&w===f[0][0]&&oe){let r=f.shift(),i=this._isCellInSelection(r[0],t);for(v=r[0]+1;v=r[1],oe?(ae=!0,E=new co(this._workCell,e.translateToString(!0,r[0],r[1]),r[1]-r[0]),T=r[1]-1,m=E.getWidth()):re=r[1]}let se=this._isCellInSelection(w,t),ce=n&&w===a,le=ie&&w>=l&&w<=u,ue=!1;this._decorationService.forEachDecorationAtCell(w,t,void 0,e=>{ue=!0});let de=E.getChars()||en;if(de===` `&&(E.isUnderline()||E.isOverline())&&(de=`\xA0`),S=m*s-c.get(de,E.isBold(),E.isItalic()),!h)h=this._document.createElement(`span`);else if(g&&(se&&x||!se&&!x&&E.bg===y)&&(se&&x&&p.selectionForeground||E.fg===ee)&&E.extended.ext===b&&le===te&&S===ne&&!ce&&!ae&&!ue&&oe){E.isInvisible()?_+=en:_+=de,g++;continue}else g&&(h.textContent=_),h=this._document.createElement(`span`),g=0,_=``;if(y=E.bg,ee=E.fg,b=E.extended.ext,te=le,ne=S,x=se,ae&&a>=w&&a<=T&&(a=w),!this._coreService.isCursorHidden&&ce&&this._coreService.isCursorInitialized){if(C.push(`xterm-cursor`),this._coreBrowserService.isFocused)o&&C.push(`xterm-cursor-blink`),C.push(r===`bar`?`xterm-cursor-bar`:r===`underline`?`xterm-cursor-underline`:`xterm-cursor-block`);else if(i)switch(i){case`outline`:C.push(`xterm-cursor-outline`);break;case`block`:C.push(`xterm-cursor-block`);break;case`bar`:C.push(`xterm-cursor-bar`);break;case`underline`:C.push(`xterm-cursor-underline`);break;default:break}}if(E.isBold()&&C.push(`xterm-bold`),E.isItalic()&&C.push(`xterm-italic`),E.isDim()&&C.push(`xterm-dim`),_=E.isInvisible()?en:E.getChars()||en,E.isUnderline()&&(C.push(`xterm-underline-${E.extended.underlineStyle}`),_===` `&&(_=`\xA0`),!E.isUnderlineColorDefault()))if(E.isUnderlineColorRGB())h.style.textDecorationColor=`rgb(${tn.toColorRGB(E.getUnderlineColor()).join(`,`)})`;else{let e=E.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&E.isBold()&&e<8&&(e+=8),h.style.textDecorationColor=p.ansi[e].css}E.isOverline()&&(C.push(`xterm-overline`),_===` `&&(_=`\xA0`)),E.isStrikethrough()&&C.push(`xterm-strikethrough`),le&&(h.style.textDecoration=`underline`);let fe=E.getFgColor(),pe=E.getFgColorMode(),me=E.getBgColor(),D=E.getBgColorMode(),he=!!E.isInverse();if(he){let e=fe;fe=me,me=e;let t=pe;pe=D,D=t}let ge,_e,ve=!1;this._decorationService.forEachDecorationAtCell(w,t,void 0,e=>{e.options.layer!==`top`&&ve||(e.backgroundColorRGB&&(D=50331648,me=e.backgroundColorRGB.rgba>>8&16777215,ge=e.backgroundColorRGB),e.foregroundColorRGB&&(pe=50331648,fe=e.foregroundColorRGB.rgba>>8&16777215,_e=e.foregroundColorRGB),ve=e.options.layer===`top`)}),!ve&&se&&(ge=this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque,me=ge.rgba>>8&16777215,D=50331648,ve=!0,p.selectionForeground&&(pe=50331648,fe=p.selectionForeground.rgba>>8&16777215,_e=p.selectionForeground)),ve&&C.push(`xterm-decoration-top`);let ye;switch(D){case 16777216:case 33554432:ye=p.ansi[me],C.push(`xterm-bg-${me}`);break;case 50331648:ye=H.toColor(me>>16,me>>8&255,me&255),this._addStyle(h,`background-color:#${_o((me>>>0).toString(16),`0`,6)}`);break;default:he?(ye=p.foreground,C.push(`xterm-bg-257`)):ye=p.background}switch(ge||E.isDim()&&(ge=U.multiplyOpacity(ye,.5)),pe){case 16777216:case 33554432:E.isBold()&&fe<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(fe+=8),this._applyMinimumContrast(h,ye,p.ansi[fe],E,ge,void 0)||C.push(`xterm-fg-${fe}`);break;case 50331648:let e=H.toColor(fe>>16&255,fe>>8&255,fe&255);this._applyMinimumContrast(h,ye,e,E,ge,_e)||this._addStyle(h,`color:#${_o(fe.toString(16),`0`,6)}`);break;default:this._applyMinimumContrast(h,ye,p.foreground,E,ge,_e)||he&&C.push(`xterm-fg-257`)}C.length&&=(h.className=C.join(` `),0),!ce&&!ae&&!ue&&oe?g++:h.textContent=_,S!==this.defaultSpacing&&(h.style.letterSpacing=`${S}px`),d.push(h),w=T}return h&&g&&(h.textContent=_),d}_applyMinimumContrast(e,t,n,r,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||po(r.getCode()))return!1;let o=this._getContrastCache(r),s;if(!i&&!a&&(s=o.getColor(t.rgba,n.rgba)),s===void 0){let e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=U.ensureContrastRatio(i||t,a||n,e),o.setColor((i||t).rgba,(a||n).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(`style`,`${e.getAttribute(`style`)||``}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t=n[0]&&e=n[0]}};go=O([k(1,Dn),k(2,gn),k(3,Cn),k(4,fn),k(5,yn),k(6,On)],go);function _o(e,t,n){for(;e.length0&&(this._flat[r]=t),t}let i=e;t&&(i+=`B`),n&&(i+=`I`);let a=this._holey.get(i);if(a===void 0){let r=0;t&&(r|=1),n&&(r|=2),a=this._measure(e,r),a>0&&this._holey.set(i,a)}return a}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},yo=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);if(s>=e.rows||c<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n=this.startCol&&t=this.startCol):!1}};function bo(){return new yo}var xo=`xterm-dom-renderer-owner-`,So=`xterm-rows`,Co=`xterm-fg-`,wo=`xterm-bg-`,To=`xterm-focus`,Eo=`xterm-selection`,Do=1,Oo=class extends M{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=a,this._linkifier2=o,this._charSizeService=c,this._optionsService=l,this._bufferService=u,this._coreService=d,this._coreBrowserService=f,this._themeService=p,this._terminalClass=Do++,this._rowElements=[],this._selectionRenderModel=bo(),this.onRequestRedraw=this._register(new P).event,this._rowContainer=this._document.createElement(`div`),this._rowContainer.classList.add(So),this._rowContainer.style.lineHeight=`normal`,this._rowContainer.setAttribute(`aria-hidden`,`true`),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement(`div`),this._selectionContainer.classList.add(Eo),this._selectionContainer.setAttribute(`aria-hidden`,`true`),this.dimensions=mo(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(e=>this._injectCss(e))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(go,document),this._element.classList.add(xo+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(e=>this._handleLinkHover(e))),this._register(this._linkifier2.onHideLinkUnderline(e=>this._handleLinkLeave(e))),this._register(j(()=>{this._element.classList.remove(xo+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new vo(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=`hidden`;this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${So} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${So} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${So} .xterm-dim { color: ${U.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${So}.${To} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${So}.${To} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${So}.${To} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${So} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Eo} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Eo} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Eo} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,r]of e.ansi.entries())t+=`${this._terminalSelector} .${Co}${n} { color: ${r.css}; }${this._terminalSelector} .${Co}${n}.xterm-dim { color: ${U.multiplyOpacity(r,.5).css}; }${this._terminalSelector} .${wo}${n} { background-color: ${r.css}; }`;t+=`${this._terminalSelector} .${Co}257 { color: ${U.opaque(e.background).css}; }${this._terminalSelector} .${Co}257.xterm-dim { color: ${U.multiplyOpacity(U.opaque(e.background),.5).css}; }${this._terminalSelector} .${wo}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get(`W`,!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){let e=this._document.createElement(`div`);this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(To),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(To),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(n){let n=e[0]>t[0];s.appendChild(this._createSelectionElement(a,n?t[0]:e[0],n?e[0]:t[0],o-a+1))}else{let n=r===a?e[0]:0,c=a===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,n,c));let l=o-a-1;if(s.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,l)),a!==o){let e=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement(`div`),a=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(n-t);return a+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-a),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${a}px`,i.style.width=`${o}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let c=e;c<=t;c++){let e=c+n.ydisp,t=this._rowElements[c],l=n.lines.get(e);if(!t||!l)break;t.replaceChildren(...this._rowFactory.createRow(l,e,e===r,o,s,i,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${xo}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,a){n<0&&(e=0),r<0&&(t=0);let o=this._bufferService.rows-1;n=Math.max(Math.min(n,o),0),r=Math.max(Math.min(r,o),0),i=Math.min(i,this._bufferService.cols);let s=this._bufferService.buffer,c=s.ybase+s.y,l=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=n;o<=r;++o){let p=o+s.ydisp,m=this._rowElements[o],h=s.lines.get(p);if(!m||!h)break;m.replaceChildren(...this._rowFactory.createRow(h,p,p===c,d,f,l,u,this.dimensions.css.cell.width,this._widthCache,a?o===n?e:0:-1,a?(o===r?t:i)-1:-1))}}};Oo=O([k(7,mn),k(8,Sn),k(9,gn),k(10,un),k(11,fn),k(12,Cn),k(13,On)],Oo);var ko=class extends M{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new P),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Mo(this._optionsService))}catch{this._measureStrategy=this._register(new jo(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange([`fontFamily`,`fontSize`],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};ko=O([k(2,gn)],ko);var Ao=class extends M{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},jo=class extends Ao{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement(`span`),this._measureElement.classList.add(`xterm-char-measure-element`),this._measureElement.textContent=`W`.repeat(32),this._measureElement.setAttribute(`aria-hidden`,`true`),this._measureElement.style.whiteSpace=`pre`,this._measureElement.style.fontKerning=`none`,this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},Mo=class extends Ao{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(`2d`);let t=this._ctx.measureText(`W`);if(!(`width`in t&&`fontBoundingBoxAscent`in t&&`fontBoundingBoxDescent`in t))throw Error(`Required font metrics not supported`)}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText(`W`);return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},No=class extends M{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new Po(this._window)),this._onDprChange=this._register(new P),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new P),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(e=>this._screenDprMonitor.setWindow(e))),this._register(dr.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(F(this._textarea,`focus`,()=>this._isFocused=!0)),this._register(F(this._textarea,`blur`,()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},Po=class extends M{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new ar),this._onDprChange=this._register(new P),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(j(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=F(this._parentWindow,`resize`,()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},Fo=class extends M{constructor(){super(),this.linkProviders=[],this._register(j(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Io(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),a=parseInt(i.getPropertyValue(`padding-left`)),o=parseInt(i.getPropertyValue(`padding-top`));return[t.clientX-r.left-a,t.clientY-r.top-o]}function Lo(e,t,n,r,i,a,o,s,c){if(!a)return;let l=Io(e,t,n);if(l)return l[0]=Math.ceil((l[0]+(c?o/2:0))/o),l[1]=Math.ceil(l[1]/s),l[0]=Math.min(Math.max(l[0],1),r+ +!!c),l[1]=Math.min(Math.max(l[1],1),i),l}var Ro=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return Lo(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=Io(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};Ro=O([k(0,Tn),k(1,Sn)],Ro);var zo=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t),!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},Bo={};Lt(Bo,{getSafariVersion:()=>qo,isChromeOS:()=>$o,isFirefox:()=>Wo,isIpad:()=>Yo,isIphone:()=>Xo,isLegacyEdge:()=>Go,isLinux:()=>Qo,isMac:()=>Jo,isNode:()=>Vo,isSafari:()=>Ko,isWindows:()=>Zo});var Vo=typeof process<`u`&&`title`in process,Ho=Vo?`node`:navigator.userAgent,Uo=Vo?`node`:navigator.platform,Wo=Ho.includes(`Firefox`),Go=Ho.includes(`Edge`),Ko=/^((?!chrome|android).)*safari/i.test(Ho);function qo(){if(!Ko)return 0;let e=Ho.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Jo=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].includes(Uo),Yo=Uo===`iPad`,Xo=Uo===`iPhone`,Zo=[`Windows`,`Win16`,`Win32`,`WinCE`].includes(Uo),Qo=Uo.indexOf(`Linux`)>=0,$o=/\bCrOS\b/.test(Ho),es=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._ii){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},ts=class extends es{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},ns=class extends es{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},rs=!Vo&&`requestIdleCallback`in window?ns:ts,is=class{constructor(){this._queue=new rs}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},as=class extends M{constructor(e,t,n,r,i,a,o,s,c){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=r,this._coreService=i,this._coreBrowserService=s,this._renderer=this._register(new ar),this._pausedResizeTask=new is,this._observerDisposable=this._register(new ar),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new P),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new P),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new P),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new P),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new zo((e,t)=>this._renderRows(e,t),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new os(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(j(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(o.onResize(()=>this._fullRefresh())),this._register(o.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(a.onDecorationRegistered(()=>this._fullRefresh())),this._register(a.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange([`customGlyphs`,`drawBoldTextInBrightColors`,`letterSpacing`,`lineHeight`,`fontFamily`,`fontSize`,`fontWeight`,`fontWeightBold`,`minimumContrastRatio`,`rescaleOverlappingGlyphs`],()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange([`cursorBlink`,`cursorStyle`],()=>this.refreshRows(o.buffer.y,o.buffer.y,!0))),this._register(c.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(e=>this._registerIntersectionObserver(e,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if(`IntersectionObserver`in e){let n=new e.IntersectionObserver(e=>this._handleIntersectionChange(e[e.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=j(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&=(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(e=>this.refreshRows(e.start,e.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};as=O([k(2,gn),k(3,Sn),k(4,fn),k(5,yn),k(6,un),k(7,Cn),k(8,On)],as);var os=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function ss(e,t,n,r){let i=n.buffer.x,a=n.buffer.y;if(!n.buffer.hasScrollback)return us(i,a,e,t,n,r)+ds(a,t,n,r)+fs(i,a,e,t,n,r);let o;if(a===t)return o=i>e?`D`:`C`,ys(Math.abs(i-e),vs(o,r));o=a>t?`D`:`C`;let s=Math.abs(a-t);return ys(ls(a>t?e:i,n)+(s-1)*n.cols+1+cs(a>t?i:e,n),vs(o,r))}function cs(e,t){return e-1}function ls(e,t){return t.cols-e}function us(e,t,n,r,i,a){return ds(t,r,i,a).length===0?``:ys(_s(e,t,e,t-ms(t,i),!1,i).length,vs(`D`,a))}function ds(e,t,n,r){let i=e-ms(e,n),a=t-ms(t,n);return ys(Math.abs(i-a)-ps(e,t,n),vs(gs(e,t),r))}function fs(e,t,n,r,i,a){let o;o=ds(t,r,i,a).length>0?r-ms(r,i):t;let s=r,c=hs(e,t,n,r,i,a);return ys(_s(e,o,n,s,c===`C`,i).length,vs(c,a))}function ps(e,t,n){let r=0,i=e-ms(e,n),a=t-ms(t,n);for(let o=0;o=0&&e0?r-ms(r,i):t,e=n&&ot?`A`:`B`}function _s(e,t,n,r,i,a){let o=e,s=t,c=``;for(;(o!==n||s!==r)&&s>=0&&sa.cols-1?(c+=a.buffer.translateBufferLineToString(s,!1,e,o),o=0,e=0,s++):!i&&o<0&&(c+=a.buffer.translateBufferLineToString(s,!1,0,e+1),o=a.cols-1,e=o,s--);return c+a.buffer.translateBufferLineToString(s,!1,e,o)}function vs(e,t){let n=t?`O`:`[`;return L.ESC+n+e}function ys(e,t){e=Math.floor(e);let n=``;for(let r=0;rthis._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function xs(e,t){if(e.start.y>e.end.y)throw Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Ss=50,Cs=15,ws=50,Ts=500,Es=RegExp(`\xA0`,`g`),Ds=class extends M{constructor(e,t,n,r,i,a,o,s,c){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=a,this._optionsService=o,this._renderService=s,this._coreBrowserService=c,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new rn,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new P),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new P),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new P),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new P),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(e=>this._handleTrim(e)),this._register(this._bufferService.buffers.onBufferActivate(e=>this._handleBufferActivate(e))),this.enable(),this._model=new bs(this._bufferService),this._activeSelectionMode=0,this._register(j(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(e=>{e.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return``;let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return``;let i=e[0]e.replace(Es,` `)).join(Zo?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),Qo&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]=t[0]&&e[0]=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=xs(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=Io(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-Ss),Ss),t/=Ss,t/Math.abs(t)+Math.round(t*(Cs-1)))}shouldForceSelection(e){return Jo?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(`mouseup`,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),ws)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(`mouseup`,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Jo&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&tthis._handleTrim(e))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,a=i.lines.get(e[1]);if(!a)return;let o=i.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(a,e[0]),c=s,l=e[0]-s,u=0,d=0,f=0,p=0;if(o.charAt(s)===` `){for(;s>0&&o.charAt(s-1)===` `;)s--;for(;c1&&(p+=r-1,c+=r-1);t>0&&s>0&&!this._isCharWordSeparator(a.loadCell(t-1,this._workCell));){a.loadCell(t-1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,t--):e>1&&(f+=e-1,s-=e-1),s--,t--}for(;n1&&(p+=e-1,c+=e-1),c++,n++}}c++;let m=s+l-u+f,h=Math.min(this._bufferService.cols,c-s+u+d-f-p);if(!(!t&&o.slice(s,c).trim()===``)){if(n&&m===0&&a.getCodePoint(0)!==32){let t=i.lines.get(e[1]-1);if(t&&a.isWrapped&&t.getCodePoint(this._bufferService.cols-1)!==32){let t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){let e=this._bufferService.cols-t.start;m-=e,h+=e}}}if(r&&m+h===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let t=i.lines.get(e[1]+1);if(t?.isWrapped&&t.getCodePoint(0)!==32){let t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(h+=t.length)}}return{start:m,length:h}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=xs(n,this._bufferService.cols)}};Ds=k([A(3,un),A(4,fn),A(5,wn),A(6,gn),A(7,Tn),A(8,Cn)],Ds);var Os=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},ks=class{constructor(){this._color=new Os,this._css=new Os}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},G=Object.freeze((()=>{let e=[W.toColor(`#2e3436`),W.toColor(`#cc0000`),W.toColor(`#4e9a06`),W.toColor(`#c4a000`),W.toColor(`#3465a4`),W.toColor(`#75507b`),W.toColor(`#06989a`),W.toColor(`#d3d7cf`),W.toColor(`#555753`),W.toColor(`#ef2929`),W.toColor(`#8ae234`),W.toColor(`#fce94f`),W.toColor(`#729fcf`),W.toColor(`#ad7fa8`),W.toColor(`#34e2e2`),W.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:H.toCss(r,i,a),rgba:H.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:H.toCss(n,n,n),rgba:H.toRgba(n,n,n)})}return e})()),As=W.toColor(`#ffffff`),js=W.toColor(`#000000`),Ms=W.toColor(`#ffffff`),Ns=js,Ps={css:`rgba(255, 255, 255, 0.3)`,rgba:4294967117},Fs=As,Is=class extends M{constructor(e){super(),this._optionsService=e,this._contrastCache=new ks,this._halfContrastCache=new ks,this._onChangeColors=this._register(new P),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:As,background:js,cursor:Ms,cursorAccent:Ns,selectionForeground:void 0,selectionBackgroundTransparent:Ps,selectionBackgroundOpaque:U.blend(js,Ps),selectionInactiveBackgroundTransparent:Ps,selectionInactiveBackgroundOpaque:U.blend(js,Ps),scrollbarSliderBackground:U.opacity(As,.2),scrollbarSliderHoverBackground:U.opacity(As,.4),scrollbarSliderActiveBackground:U.opacity(As,.5),overviewRulerBorder:As,ansi:G.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange(`minimumContrastRatio`,()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange(`theme`,()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=K(e.foreground,As),t.background=K(e.background,js),t.cursor=U.blend(t.background,K(e.cursor,Ms)),t.cursorAccent=U.blend(t.background,K(e.cursorAccent,Ns)),t.selectionBackgroundTransparent=K(e.selectionBackground,Ps),t.selectionBackgroundOpaque=U.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=K(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=U.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?K(e.selectionForeground,ro):void 0,t.selectionForeground===ro&&(t.selectionForeground=void 0),U.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=U.opacity(t.selectionBackgroundTransparent,.3)),U.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=U.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=K(e.scrollbarSliderBackground,U.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=K(e.scrollbarSliderHoverBackground,U.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=K(e.scrollbarSliderActiveBackground,U.opacity(t.foreground,.5)),t.overviewRulerBorder=K(e.overviewRulerBorder,Fs),t.ansi=G.slice(),t.ansi[0]=K(e.black,G[0]),t.ansi[1]=K(e.red,G[1]),t.ansi[2]=K(e.green,G[2]),t.ansi[3]=K(e.yellow,G[3]),t.ansi[4]=K(e.blue,G[4]),t.ansi[5]=K(e.magenta,G[5]),t.ansi[6]=K(e.cyan,G[6]),t.ansi[7]=K(e.white,G[7]),t.ansi[8]=K(e.brightBlack,G[8]),t.ansi[9]=K(e.brightRed,G[9]),t.ansi[10]=K(e.brightGreen,G[10]),t.ansi[11]=K(e.brightYellow,G[11]),t.ansi[12]=K(e.brightBlue,G[12]),t.ansi[13]=K(e.brightMagenta,G[13]),t.ansi[14]=K(e.brightCyan,G[14]),t.ansi[15]=K(e.brightWhite,G[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;re.index-t.index),r=[];for(let t of n){let n=this._services.get(t.id);if(!n)throw Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id._id}.`);r.push(n)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},zs={trace:0,debug:1,info:2,warn:3,error:4,off:5},Bs=`xterm.js: `,Vs=class extends M{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),Hs=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=zs[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;tthis._length)for(let t=this._length;t=e;t--)this._array[this._getCyclicIndex(t+n.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;tthis._maxLength){let e=this._length+n.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw Error(`start argument out of range`);if(e+n<0)throw Error(`Cannot shift elements in list beyond index 0`);if(n>0){for(let r=t-1;r>=0;r--)this.set(e+r+n,this.get(e+r));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r>22,t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._data[e*q+1]=t[0],t[1].length>1?(this._combined[e]=t[1],this._data[e*q+0]=e|2097152|t[2]<<22):this._data[e*q+0]=t[1].charCodeAt(0)|t[2]<<22}getWidth(e){return this._data[e*q+0]>>22}hasWidth(e){return this._data[e*q+0]&12582912}getFg(e){return this._data[e*q+1]}getBg(e){return this._data[e*q+2]}hasContent(e){return this._data[e*q+0]&4194303}getCodePoint(e){let t=this._data[e*q+0];return t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):t&2097151}isCombined(e){return this._data[e*q+0]&2097152}getString(e){let t=this._data[e*q+0];return t&2097152?this._combined[e]:t&2097151?Jt(t&2097151):``}isProtected(e){return this._data[e*q+2]&536870912}loadCell(e,t){return Ws=e*q,t.content=this._data[Ws+0],t.fg=this._data[Ws+1],t.bg=this._data[Ws+2],t.content&2097152&&(t.combinedData=this._combined[e]),t.bg&268435456&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){t.content&2097152&&(this._combined[e]=t.combinedData),t.bg&268435456&&(this._extendedAttrs[e]=t.extended),this._data[e*q+0]=t.content,this._data[e*q+1]=t.fg,this._data[e*q+2]=t.bg}setCellFromCodepoint(e,t,n,r){r.bg&268435456&&(this._extendedAttrs[e]=r.extended),this._data[e*q+0]=t|n<<22,this._data[e*q+1]=r.fg,this._data[e*q+2]=r.bg}addCodepointToCell(e,t,n){let r=this._data[e*q+0];r&2097152?this._combined[e]+=Jt(t):r&2097151?(this._combined[e]=Jt(r&2097151)+Jt(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[e*q+0]=r}insertCells(e,t,n){if(e%=this.length,e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t=0;--n)this.setCell(e+t+n,this.loadCell(e+n,r));for(let r=0;rthis.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n=e&&delete this._combined[r]}let r=Object.keys(this._extendedAttrs);for(let t=0;t=e&&delete this._extendedAttrs[n]}}return this.length=e,n*4*Gs=0;--e)if(this._data[e*q+0]&4194303)return e+(this._data[e*q+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*q+0]&4194303||this._data[e*q+2]&50331648)return e+(this._data[e*q+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){let a=e._data;if(i)for(let i=r-1;i>=0;i--){for(let e=0;e=t&&(this._combined[i-t+n]=e._combined[i])}}translateToString(e,t,n,r){t??=0,n??=this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let i=``;for(;t>22||1}return r&&r.push(t),i}};function qs(e,t,n,r,i,a){let o=[];for(let s=0;s=s&&r0&&(e>d||u[e].getTrimmedLength()===0);e--)h++;h>0&&(o.push(s+u.length-h),o.push(h)),s+=u.length-1}return o}function Js(e,t){let n=[],r=0,i=t[r],a=0;for(let o=0;oZs(e,r,t)).reduce((e,t)=>e+t),a=0,o=0,s=0;for(;sc&&(a-=c,o++);let l=e[o].getWidth(a-1)===2;l&&a--;let u=l?n-1:n;r.push(u),s+=u}return r}function Zs(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var Qs=class e{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=e._nextId++,this._onDispose=this.register(new P),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),tr(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}};Qs._nextId=1;var $s=Qs,Y={},ec=Y.B;Y[0]={"`":`◆`,a:`▒`,b:`␉`,c:`␌`,d:`␍`,e:`␊`,f:`°`,g:`±`,h:`␤`,i:`␋`,j:`┘`,k:`┐`,l:`┌`,m:`└`,n:`┼`,o:`⎺`,p:`⎻`,q:`─`,r:`⎼`,s:`⎽`,t:`├`,u:`┤`,v:`┴`,w:`┬`,x:`│`,y:`≤`,z:`≥`,"{":`π`,"|":`≠`,"}":`£`,"~":`·`},Y.A={"#":`£`},Y.B=void 0,Y[4]={"#":`£`,"@":`¾`,"[":`ij`,"\\":`½`,"]":`|`,"{":`¨`,"|":`f`,"}":`¼`,"~":`´`},Y.C=Y[5]={"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},Y.R={"#":`£`,"@":`à`,"[":`°`,"\\":`ç`,"]":`§`,"{":`é`,"|":`ù`,"}":`è`,"~":`¨`},Y.Q={"@":`à`,"[":`â`,"\\":`ç`,"]":`ê`,"^":`î`,"`":`ô`,"{":`é`,"|":`ù`,"}":`è`,"~":`û`},Y.K={"@":`§`,"[":`Ä`,"\\":`Ö`,"]":`Ü`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`ß`},Y.Y={"#":`£`,"@":`§`,"[":`°`,"\\":`ç`,"]":`é`,"`":`ù`,"{":`à`,"|":`ò`,"}":`è`,"~":`ì`},Y.E=Y[6]={"@":`Ä`,"[":`Æ`,"\\":`Ø`,"]":`Å`,"^":`Ü`,"`":`ä`,"{":`æ`,"|":`ø`,"}":`å`,"~":`ü`},Y.Z={"#":`£`,"@":`§`,"[":`¡`,"\\":`Ñ`,"]":`¿`,"{":`°`,"|":`ñ`,"}":`ç`},Y.H=Y[7]={"@":`É`,"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},Y[`=`]={"#":`ù`,"@":`à`,"[":`é`,"\\":`ç`,"]":`ê`,"^":`î`,_:`è`,"`":`ô`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`û`};var tc=4294967295,nc=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=J.clone(),this.savedCharset=ec,this.markers=[],this._nullCell=nn.fromCharData([0,Qt,1,0]),this._whitespaceCell=nn.fromCharData([0,$t,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new rs,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Us(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new tn),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new tn),this._whitespaceCell}getBlankLine(e,t){return new Ks(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&etc?tc:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=J);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Us(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(J),r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ks(e,n)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend===`conpty`&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=qs(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(J),n);if(r.length>0){let n=Js(this.lines,r);Ys(this.lines,n.layout),this._reflowLargerAdjustViewport(e,t,n.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(J),i=n;for(;i-->0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;o--){let s=this.lines.get(o);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let c=[s];for(;s.isWrapped&&o>0;)s=this.lines.get(--o),c.unshift(s);if(!n){let e=this.ybase+this.y;if(e>=o&&e0&&(i.push({start:o+c.length+a,newLines:p}),a+=p.length),c.push(...p);let m=u.length-1,h=u[m];h===0&&(m--,h=u[m]);let g=c.length-d-1,_=l;for(;g>=0;){let e=Math.min(_,h);if(c[m]===void 0)break;c[m].copyCellsFrom(c[g],_-e,h-e,e,!0),h-=e,h===0&&(m--,h=u[m]),_-=e,_===0&&(g--,_=Zs(c,Math.max(g,0),this._cols))}for(let t=0;t0;)this.ybase===0?this.y0){let e=[],t=[];for(let e=0;e=0;l--)if(s&&s.start>r+c){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(l--,s.newLines[e]);l++,e.push({index:r+1,amount:s.newLines.length}),c+=s.newLines.length,s=i[++o]}else this.lines.set(l,t[r--]);let l=0;for(let t=e.length-1;t>=0;t--)e[t].index+=l,this.lines.onInsertEmitter.fire(e[t]),l+=e[t].amount;let u=Math.max(0,n+a-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):``}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+10;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e??=this.x;!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t{t.line-=e,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(e=>{t.line>=e.index&&(t.line+=e.amount)})),t.register(this.lines.onDelete(e=>{t.line>=e.index&&t.linee.index&&(t.line-=e.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},rc=class extends M{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new P),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange(`scrollback`,()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange(`tabStopWidth`,()=>this.setupTabStops()))}reset(){this._normal=new nc(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new nc(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},ic=2,ac=1,oc=class extends M{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new P),this.onResize=this._onResize.event,this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,ic),this.rows=Math.max(e.rawOptions.rows||0,ac),this.buffers=this._register(new rc(e,this)),this._register(this.buffers.onBufferActivate(e=>{this._onScroll.fire(e.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,a=n.ybase+n.scrollBottom;if(n.scrollTop===0){let e=n.lines.isFull;a===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(a+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let e=a-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(a,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};oc=k([A(0,gn)],oc);var sc={cols:80,rows:24,cursorBlink:!1,cursorStyle:`block`,cursorWidth:1,cursorInactiveStyle:`outline`,customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:`alt`,fastScrollSensitivity:5,fontFamily:`monospace`,fontSize:15,fontWeight:`normal`,fontWeightBold:`bold`,ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:`info`,logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Jo,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:` ()[]{}',"\``,altClickMovesCursor:!0,convertEol:!1,termName:`xterm`,cancelEvents:!1,overviewRuler:{}},cc=[`normal`,`bold`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],lc=class extends M{constructor(e){super(),this._onOptionChange=this._register(new P),this.onOptionChange=this._onOptionChange.event;let t={...sc};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(e){console.error(e)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(j(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=e=>{if(!(e in sc))throw Error(`No option with key "${e}"`);return this.rawOptions[e]},t=(e,t)=>{if(!(e in sc))throw Error(`No option with key "${e}"`);t=this._sanitizeAndValidateOption(e,t),this.rawOptions[e]!==t&&(this.rawOptions[e]=t,this._onOptionChange.fire(e))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case`cursorStyle`:if(t||=sc[e],!uc(t))throw Error(`"${t}" is not a valid value for ${e}`);break;case`wordSeparator`:t||=sc[e];break;case`fontWeight`:case`fontWeightBold`:if(typeof t==`number`&&1<=t&&t<=1e3)break;t=cc.includes(t)?t:sc[e];break;case`cursorWidth`:t=Math.floor(t);case`lineHeight`:case`tabStopWidth`:if(t<1)throw Error(`${e} cannot be less than 1, value: ${t}`);break;case`minimumContrastRatio`:t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case`scrollback`:if(t=Math.min(t,4294967295),t<0)throw Error(`${e} cannot be less than 0, value: ${t}`);break;case`fastScrollSensitivity`:case`scrollSensitivity`:if(t<=0)throw Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case`rows`:case`cols`:if(!t&&t!==0)throw Error(`${e} must be numeric, value: ${t}`);break;case`windowsPty`:t??={};break}return t}};function uc(e){return e===`block`||e===`underline`||e===`bar`}function dc(e,t=5){if(typeof e!=`object`)return e;let n=Array.isArray(e)?[]:{};for(let r in e)n[r]=t<=1?e[r]:e[r]&&dc(e[r],t-1);return n}var fc=Object.freeze({insertMode:!1}),pc=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),mc=class extends M{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new P),this.onData=this._onData.event,this._onUserInput=this._register(new P),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new P),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new P),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=dc(fc),this.decPrivateModes=dc(pc)}reset(){this.modes=dc(fc),this.decPrivateModes=dc(pc)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace(`sending data (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace(`sending binary (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onBinary.fire(e))}};mc=k([A(0,un),A(1,hn),A(2,gn)],mc);var hc={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function gc(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var _c=String.fromCharCode,vc={DEFAULT:e=>{let t=[gc(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?``:`\x1B[M${_c(t[0])}${_c(t[1])}${_c(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${gc(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${gc(e,!0)};${e.x};${e.y}${t}`}},yc=class extends M{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol=``,this._activeEncoding=``,this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new P),this.onProtocolChange=this._onProtocolChange.event;for(let e of Object.keys(hc))this.addProtocol(e,hc[e]);for(let e of Object.keys(vc))this.addEncoding(e,vc[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol=`NONE`,this.activeEncoding=`DEFAULT`,this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding===`SGR_PIXELS`))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding===`DEFAULT`?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};yc=k([A(0,un),A(1,fn),A(2,gn)],yc);var bc=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],xc=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],X;function Sc(e,t){let n=0,r=t.length-1,i;if(et[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=wc.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return wc.createPropertyValue(0,n,r)}},wc=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new P,this.onChange=this._onChange.event;let e=new Cc;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return(e&1)!=0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},Tc=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Ec(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var Dc=2147483647,Oc=256,kc=class e{constructor(e=32,t=32){if(this.maxLength=e,this.maxSubParamsLength=t,t>Oc)throw Error(`maxSubParamsLength must not be greater than 256`);this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new e;if(!t.length)return n;for(let e=+!!Array.isArray(t[0]);e>8,r=this._subParamsIdx[t]&255;r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>Dc?Dc:e}addSubParam(e){if(this._digitIsSub=!0,this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParams[this._subParamsLength++]=e>Dc?Dc:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(this._subParamsIdx[e]&255)-(this._subParamsIdx[e]>>8)>0}getSubParams(e){let t=this._subParamsIdx[e]>>8,n=this._subParamsIdx[e]&255;return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){let e={};for(let t=0;t>8,r=this._subParamsIdx[t]&255;r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[t-1];n[t-1]=~r?Math.min(r*10+e,Dc):e}},Ac=[],jc=class{constructor(){this._state=0,this._active=Ac,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Ac}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Ac,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Ac,!this._active.length)this._handlerFb(this._id,`START`);else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,`PUT`,Yt(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,`END`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Ac,this._id=-1,this._state=0}}},Mc=class{constructor(e){this._handler=e,this._data=``,this._hitLimit=!1}start(){this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=Yt(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(e=>(this._data=``,this._hitLimit=!1,e));return this._data=``,this._hitLimit=!1,t}},Nc=[],Pc=class{constructor(){this._handlers=Object.create(null),this._active=Nc,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Nc}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Nc,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Nc,!this._active.length)this._handlerFb(this._ident,`HOOK`,t);else for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,`PUT`,Yt(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,`UNHOOK`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Nc,this._ident=0}},Fc=new kc;Fc.addParam(0);var Ic=class{constructor(e){this._handler=e,this._data=``,this._params=Fc,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Fc,this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=Yt(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(e=>(this._params=Fc,this._data=``,this._hitLimit=!1,e));return this._params=Fc,this._data=``,this._hitLimit=!1,t}},Lc=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;it),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let a=n(0,14),o;for(o in e.setDefault(1,0),e.addMany(r,0,2,0),a)e.addMany([24,26,153,154],o,3,0),e.addMany(n(128,144),o,3,0),e.addMany(n(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Rc,0,2,0),e.add(Rc,8,5,8),e.add(Rc,6,0,6),e.add(Rc,11,0,11),e.add(Rc,13,13,13),e}(),Bc=class extends M{constructor(e=zc){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new kc,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(j(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new jc),this._dcsParser=this._register(new Pc),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:`\\`},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw Error(`only one byte as prefix supported`);if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw Error(`prefix must be in range 0x3c .. 0x3f`)}if(e.intermediates){if(e.intermediates.length>2)throw Error(`only two bytes as intermediates are supported`);for(let t=0;tr||r>47)throw Error(`intermediate must be in range 0x20 .. 0x2f`);n<<=8,n|=r}}if(e.final.length!==1)throw Error(`final must be a single byte`);let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join(``)}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r=0,i=0,a=0,o;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,Error(`improper continuation due to previous async handler, giving up parsing`);let t=this._parseStack.handlers,i=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](this._params),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 4:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],o=this._dcsParser.unhook(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],o=this._oscParser.end(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let n=a;n>4){case 2:for(let i=n+1;;++i){if(i>=t||(r=e[i])<32||r>126&&r=t||(r=e[i])<32||r>126&&r=t||(r=e[i])<32||r>126&&r=t||(r=e[i])<32||r>126&&r=0&&(o=a[s](this._params),o!==!0);s--)if(o instanceof Promise)return this._preserveStack(3,a,s,i,n),o;s<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++n47&&r<60);n--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let c=this._escHandlers[this._collect<<8|r],l=c?c.length-1:-1;for(;l>=0&&(o=c[l](),o!==!0);l--)if(o instanceof Promise)return this._preserveStack(4,c,l,i,n),o;l<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let i=n+1;;++i)if(i>=t||(r=e[i])===24||r===26||r===27||r>127&&r=t||(r=e[i])<32||r>127&&r>4:i>>8}return n}}function Wc(e,t){let n=e.toString(16),r=n.length<2?`0`+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function Gc(e,t=16){let[n,r,i]=e;return`rgb:${Wc(n,t)}/${Wc(r,t)}/${Wc(i,t)}`}var Kc={"(":0,")":1,"*":2,"+":3,"-":1,".":2},qc=131072,Jc=10;function Yc(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Xc=5e3,Zc=0,Qc=class extends M{constructor(e,t,n,r,i,a,o,s,c=new Bc){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=a,this._coreMouseService=o,this._unicodeService=s,this._parser=c,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new Xt,this._utf8Decoder=new Zt,this._windowTitle=``,this._iconName=``,this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=J.clone(),this._eraseAttrDataInternal=J.clone(),this._onRequestBell=this._register(new P),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new P),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new P),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new P),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new P),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new P),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new P),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new P),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new P),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new P),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new P),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new P),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new $c(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._parser.setCsiHandlerFallback((e,t)=>{this._logService.debug(`Unknown CSI code: `,{identifier:this._parser.identToString(e),params:t.toArray()})}),this._parser.setEscHandlerFallback(e=>{this._logService.debug(`Unknown ESC code: `,{identifier:this._parser.identToString(e)})}),this._parser.setExecuteHandlerFallback(e=>{this._logService.debug(`Unknown EXECUTE code: `,{code:e})}),this._parser.setOscHandlerFallback((e,t,n)=>{this._logService.debug(`Unknown OSC code: `,{identifier:e,action:t,data:n})}),this._parser.setDcsHandlerFallback((e,t,n)=>{t===`HOOK`&&(n=n.toArray()),this._logService.debug(`Unknown DCS code: `,{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setPrintHandler((e,t,n)=>this.print(e,t,n)),this._parser.registerCsiHandler({final:`@`},e=>this.insertChars(e)),this._parser.registerCsiHandler({intermediates:` `,final:`@`},e=>this.scrollLeft(e)),this._parser.registerCsiHandler({final:`A`},e=>this.cursorUp(e)),this._parser.registerCsiHandler({intermediates:` `,final:`A`},e=>this.scrollRight(e)),this._parser.registerCsiHandler({final:`B`},e=>this.cursorDown(e)),this._parser.registerCsiHandler({final:`C`},e=>this.cursorForward(e)),this._parser.registerCsiHandler({final:`D`},e=>this.cursorBackward(e)),this._parser.registerCsiHandler({final:`E`},e=>this.cursorNextLine(e)),this._parser.registerCsiHandler({final:`F`},e=>this.cursorPrecedingLine(e)),this._parser.registerCsiHandler({final:`G`},e=>this.cursorCharAbsolute(e)),this._parser.registerCsiHandler({final:`H`},e=>this.cursorPosition(e)),this._parser.registerCsiHandler({final:`I`},e=>this.cursorForwardTab(e)),this._parser.registerCsiHandler({final:`J`},e=>this.eraseInDisplay(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`J`},e=>this.eraseInDisplay(e,!0)),this._parser.registerCsiHandler({final:`K`},e=>this.eraseInLine(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`K`},e=>this.eraseInLine(e,!0)),this._parser.registerCsiHandler({final:`L`},e=>this.insertLines(e)),this._parser.registerCsiHandler({final:`M`},e=>this.deleteLines(e)),this._parser.registerCsiHandler({final:`P`},e=>this.deleteChars(e)),this._parser.registerCsiHandler({final:`S`},e=>this.scrollUp(e)),this._parser.registerCsiHandler({final:`T`},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:`X`},e=>this.eraseChars(e)),this._parser.registerCsiHandler({final:`Z`},e=>this.cursorBackwardTab(e)),this._parser.registerCsiHandler({final:"`"},e=>this.charPosAbsolute(e)),this._parser.registerCsiHandler({final:`a`},e=>this.hPositionRelative(e)),this._parser.registerCsiHandler({final:`b`},e=>this.repeatPrecedingCharacter(e)),this._parser.registerCsiHandler({final:`c`},e=>this.sendDeviceAttributesPrimary(e)),this._parser.registerCsiHandler({prefix:`>`,final:`c`},e=>this.sendDeviceAttributesSecondary(e)),this._parser.registerCsiHandler({final:`d`},e=>this.linePosAbsolute(e)),this._parser.registerCsiHandler({final:`e`},e=>this.vPositionRelative(e)),this._parser.registerCsiHandler({final:`f`},e=>this.hVPosition(e)),this._parser.registerCsiHandler({final:`g`},e=>this.tabClear(e)),this._parser.registerCsiHandler({final:`h`},e=>this.setMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`h`},e=>this.setModePrivate(e)),this._parser.registerCsiHandler({final:`l`},e=>this.resetMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`l`},e=>this.resetModePrivate(e)),this._parser.registerCsiHandler({final:`m`},e=>this.charAttributes(e)),this._parser.registerCsiHandler({final:`n`},e=>this.deviceStatus(e)),this._parser.registerCsiHandler({prefix:`?`,final:`n`},e=>this.deviceStatusPrivate(e)),this._parser.registerCsiHandler({intermediates:`!`,final:`p`},e=>this.softReset(e)),this._parser.registerCsiHandler({intermediates:` `,final:`q`},e=>this.setCursorStyle(e)),this._parser.registerCsiHandler({final:`r`},e=>this.setScrollRegion(e)),this._parser.registerCsiHandler({final:`s`},e=>this.saveCursor(e)),this._parser.registerCsiHandler({final:`t`},e=>this.windowOptions(e)),this._parser.registerCsiHandler({final:`u`},e=>this.restoreCursor(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`}`},e=>this.insertColumns(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`~`},e=>this.deleteColumns(e)),this._parser.registerCsiHandler({intermediates:`"`,final:`q`},e=>this.selectProtected(e)),this._parser.registerCsiHandler({intermediates:`$`,final:`p`},e=>this.requestMode(e,!0)),this._parser.registerCsiHandler({prefix:`?`,intermediates:`$`,final:`p`},e=>this.requestMode(e,!1)),this._parser.setExecuteHandler(L.BEL,()=>this.bell()),this._parser.setExecuteHandler(L.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(L.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(L.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(L.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(L.BS,()=>this.backspace()),this._parser.setExecuteHandler(L.HT,()=>this.tab()),this._parser.setExecuteHandler(L.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(L.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(eo.IND,()=>this.index()),this._parser.setExecuteHandler(eo.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(eo.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Mc(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new Mc(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new Mc(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new Mc(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new Mc(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new Mc(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new Mc(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new Mc(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new Mc(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new Mc(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new Mc(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new Mc(e=>this.restoreCursorColor(e))),this._parser.registerEscHandler({final:`7`},()=>this.saveCursor()),this._parser.registerEscHandler({final:`8`},()=>this.restoreCursor()),this._parser.registerEscHandler({final:`D`},()=>this.index()),this._parser.registerEscHandler({final:`E`},()=>this.nextLine()),this._parser.registerEscHandler({final:`H`},()=>this.tabSet()),this._parser.registerEscHandler({final:`M`},()=>this.reverseIndex()),this._parser.registerEscHandler({final:`=`},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:`>`},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:`c`},()=>this.fullReset()),this._parser.registerEscHandler({final:`n`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`o`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`|`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`}`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`~`},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:`%`,final:`@`},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:`%`,final:`G`},()=>this.selectDefaultCharset());for(let e in Y)this._parser.registerEscHandler({intermediates:`(`,final:e},()=>this.selectCharset(`(`+e)),this._parser.registerEscHandler({intermediates:`)`,final:e},()=>this.selectCharset(`)`+e)),this._parser.registerEscHandler({intermediates:`*`,final:e},()=>this.selectCharset(`*`+e)),this._parser.registerEscHandler({intermediates:`+`,final:e},()=>this.selectCharset(`+`+e)),this._parser.registerEscHandler({intermediates:`-`,final:e},()=>this.selectCharset(`-`+e)),this._parser.registerEscHandler({intermediates:`.`,final:e},()=>this.selectCharset(`.`+e)),this._parser.registerEscHandler({intermediates:`/`,final:e},()=>this.selectCharset(`/`+e));this._parser.registerEscHandler({intermediates:`#`,final:`8`},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(e=>(this._logService.error(`Parsing error: `,e),e)),this._parser.registerDcsHandler({intermediates:`$`,final:`q`},new Ic((e,t)=>this.requestStatusString(e,t)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((e,t)=>setTimeout(()=>t(`#SLOW_TIMEOUT`),Xc))]).catch(e=>{if(e!==`#SLOW_TIMEOUT`)throw e;console.warn(`async parser handler taking longer than ${Xc} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,a=0,o=this._parseStack.paused;if(o){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>qc&&(a=this._parseStack.position+qc)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e==`string`?` "${e}"`:` "${Array.prototype.map.call(e,e=>String.fromCharCode(e)).join(``)}"`}`),this._logService.logLevel===0&&this._logService.trace(`parsing data (codes)`,typeof e==`string`?e.split(``).map(e=>e.charCodeAt(0)):e),this._parseBuffer.lengthqc)for(let t=a;t0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let f=this._parser.precedingJoinState;for(let p=t;ps){if(c){let e=d,t=this._activeBuffer.x-m;for(this._activeBuffer.x=m,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),m>0&&d instanceof Ks&&d.copyCellsFrom(e,t,0,m,!1);t=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(l&&(d.insertCells(this._activeBuffer.x,i-m,this._activeBuffer.getNullCell(u)),d.getWidth(s-1)===2&&d.setCellFromCodepoint(s-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,r,i,u),i>0)for(;--i;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=f,this._activeBuffer.x0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final===`t`&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,e=>!Yc(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Ic(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Mc(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(a.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+n)?.getTrimmedLength(););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let c=s;for(let e=1;e0||(this._is(`xterm`)||this._is(`rxvt-unicode`)||this._is(`screen`)?this._coreService.triggerDataEvent(L.ESC+`[?1;2c`):this._is(`linux`)&&this._coreService.triggerDataEvent(L.ESC+`[?6c`)),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is(`xterm`)?this._coreService.triggerDataEvent(L.ESC+`[>0;276;0c`):this._is(`rxvt-unicode`)?this._coreService.triggerDataEvent(L.ESC+`[>85;95;0c`):this._is(`linux`)?this._coreService.triggerDataEvent(e.params[0]+`c`):this._is(`screen`)&&this._coreService.triggerDataEvent(L.ESC+`[>83;40003;0c`)),!0}_is(e){return(this._optionsService.rawOptions.termName+``).indexOf(e)===0}setMode(e){for(let t=0;t(e[e.NOT_RECOGNIZED=0]=`NOT_RECOGNIZED`,e[e.SET=1]=`SET`,e[e.RESET=2]=`RESET`,e[e.PERMANENTLY_SET=3]=`PERMANENTLY_SET`,e[e.PERMANENTLY_RESET=4]=`PERMANENTLY_RESET`))(n||={});let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:a}=this._coreMouseService,o=this._coreService,{buffers:s,cols:c}=this._bufferService,{active:l,alt:u}=s,d=this._optionsService.rawOptions,f=(e,n)=>(o.triggerDataEvent(`${L.ESC}[${t?``:`?`}${e};${n}$y`),!0),p=e=>e?1:2,m=e.params[0];return t?m===2?f(m,4):m===4?f(m,p(o.modes.insertMode)):m===12?f(m,3):m===20?f(m,p(d.convertEol)):f(m,0):m===1?f(m,p(r.applicationCursorKeys)):m===3?f(m,d.windowOptions.setWinLines?c===80?2:+(c===132):0):m===6?f(m,p(r.origin)):m===7?f(m,p(r.wraparound)):m===8?f(m,3):m===9?f(m,p(i===`X10`)):m===12?f(m,p(d.cursorBlink)):m===25?f(m,p(!o.isCursorHidden)):m===45?f(m,p(r.reverseWraparound)):m===66?f(m,p(r.applicationKeypad)):m===67?f(m,4):m===1e3?f(m,p(i===`VT200`)):m===1002?f(m,p(i===`DRAG`)):m===1003?f(m,p(i===`ANY`)):m===1004?f(m,p(r.sendFocus)):m===1005?f(m,4):m===1006?f(m,p(a===`SGR`)):m===1015?f(m,4):m===1016?f(m,p(a===`SGR_PIXELS`)):m===1048?f(m,1):m===47||m===1047||m===1049?f(m,p(l===u)):m===2004?f(m,p(r.bracketedPasteMode)):m===2026?f(m,p(r.synchronizedOutput)):f(m,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=en.fromColorRGB([n,r,i])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,a=0;do{if(r[a+i]=e.params[t+a],e.hasSubParams(t+a)){let n=e.getSubParams(t+a),o=0;do r[1]===5&&(i=1),r[a+o+1+i]=n[o];while(++o=2||r[1]===2&&a+i>=5)break;r[1]&&(i=1)}while(++a+t5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=J.fg,e.bg=J.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=n-90|16777224):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=n-100|16777224):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=J.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=J.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):n===100?(r.fg&=-67108864,r.fg|=J.fg&16777215,r.bg&=-67108864,r.bg|=J.bg&16777215):this._logService.debug(`Unknown SGR attribute: %d.`,n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${L.ESC}[0n`);break;case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${L.ESC}[${e};${t}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${L.ESC}[?${e};${t}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=J.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle=`block`;break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle=`underline`;break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle=`bar`;break}let e=t%2==1;this._coreService.decPrivateModes.cursorBlink=e}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Yc(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${L.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Jc&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Jc&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(`;`);for(;n.length>1;){let e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){let n=parseInt(e);if(el(n))if(r===`?`)t.push({type:0,index:n});else{let e=Uc(r);e&&t.push({type:1,index:n,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(`;`);if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):!n.trim()&&this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(`:`),r,i=n.findIndex(e=>e.startsWith(`id=`));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(`;`);for(let e=0;e=this._specialColors.length);++e,++t)if(n[e]===`?`)this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=Uc(n[e]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(`;`);for(let e=0;e=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=J.clone(),this._eraseAttrDataInternal=J.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new nn;e.content=4194373,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t(this._coreService.triggerDataEvent(`${L.ESC}${e}${L.ESC}\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e===`"q`?`P1$r${+!!this._curAttrData.isProtected()}"q`:e===`"p`?`P1$r61;1"p`:e===`r`?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e===`m`?`P1$r0m`:e===` q`?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-+!!i.cursorBlink} q`:`P0$r`)}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},$c=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){ethis.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Zc=e,e=t,t=Zc),ethis.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};$c=k([A(0,un)],$c);function el(e){return 0<=e&&e<256}var tl=5e7,nl=12,rl=50,il=class extends M{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new P),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>tl)throw Error(`write data discarded, use flow control to avoid losing data`);if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let e=this._writeBuffer[this._bufferOffset],r=this._action(e,t);if(r){r.catch(e=>(queueMicrotask(()=>{throw e}),Promise.resolve(!1))).then(e=>performance.now()-n>=nl?setTimeout(()=>this._innerWrite(0,e)):this._innerWrite(n,e));return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,performance.now()-n>=nl)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>rl&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},al=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(r,n)),this._dataByLinkId.set(r.id,r),r.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let a=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(o,a)),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(e=>e.line!==t)){let e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(n,e))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};al=k([A(0,un)],al);var ol=!1,sl=class extends M{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new ar),this._onBinary=this._register(new P),this.onBinary=this._onBinary.event,this._onData=this._register(new P),this.onData=this._onData.event,this._onLineFeed=this._register(new P),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new P),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new P),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new P),this._instantiationService=new Rs,this.optionsService=this._register(new lc(e)),this._instantiationService.setService(gn,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(oc)),this._instantiationService.setService(un,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Vs)),this._instantiationService.setService(hn,this._logService),this.coreService=this._register(this._instantiationService.createInstance(mc)),this._instantiationService.setService(fn,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(yc)),this._instantiationService.setService(dn,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(wc)),this._instantiationService.setService(vn,this.unicodeService),this._charsetService=this._instantiationService.createInstance(Tc),this._instantiationService.setService(pn,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(al),this._instantiationService.setService(_n,this._oscLinkService),this._inputHandler=this._register(new Qc(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(dr.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(dr.forward(this._bufferService.onResize,this._onResize)),this._register(dr.forward(this.coreService.onData,this._onData)),this._register(dr.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange([`windowsMode`,`windowsPty`],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new il((e,t)=>this._inputHandler.parse(e,t))),this._register(dr.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new P),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!ol&&(this._logService.warn(`writeSync is unreliable and will be removed soon.`),ol=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,ic),t=Math.max(t,ac),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend===`conpty`&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Ec.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:`H`},()=>(Ec(this._bufferService),!1))),this._windowsWrappingHeuristics.value=j(()=>{for(let t of e)t.dispose()})}}},cl={48:[`0`,`)`],49:[`1`,`!`],50:[`2`,`@`],51:[`3`,`#`],52:[`4`,`$`],53:[`5`,`%`],54:[`6`,`^`],55:[`7`,`&`],56:[`8`,`*`],57:[`9`,`(`],186:[`;`,`:`],187:[`=`,`+`],188:[`,`,`<`],189:[`-`,`_`],190:[`.`,`>`],191:[`/`,`?`],192:["`",`~`],219:[`[`,`{`],220:[`\\`,`|`],221:[`]`,`}`],222:[`'`,`"`]};function ll(e,t,n,r){let i={type:0,cancel:!1,key:void 0},a=!!e.shiftKey|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key===`UIKeyInputUpArrow`?t?i.key=L.ESC+`OA`:i.key=L.ESC+`[A`:e.key===`UIKeyInputLeftArrow`?t?i.key=L.ESC+`OD`:i.key=L.ESC+`[D`:e.key===`UIKeyInputRightArrow`?t?i.key=L.ESC+`OC`:i.key=L.ESC+`[C`:e.key===`UIKeyInputDownArrow`&&(t?i.key=L.ESC+`OB`:i.key=L.ESC+`[B`);break;case 8:i.key=e.ctrlKey?`\b`:L.DEL,e.altKey&&(i.key=L.ESC+i.key);break;case 9:if(e.shiftKey){i.key=L.ESC+`[Z`;break}i.key=L.HT,i.cancel=!0;break;case 13:i.key=e.altKey?L.ESC+L.CR:L.CR,i.cancel=!0;break;case 27:i.key=L.ESC,e.altKey&&(i.key=L.ESC+L.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`D`:t?i.key=L.ESC+`OD`:i.key=L.ESC+`[D`;break;case 39:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`C`:t?i.key=L.ESC+`OC`:i.key=L.ESC+`[C`;break;case 38:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`A`:t?i.key=L.ESC+`OA`:i.key=L.ESC+`[A`;break;case 40:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`B`:t?i.key=L.ESC+`OB`:i.key=L.ESC+`[B`;break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=L.ESC+`[2~`);break;case 46:a?i.key=L.ESC+`[3;`+(a+1)+`~`:i.key=L.ESC+`[3~`;break;case 36:a?i.key=L.ESC+`[1;`+(a+1)+`H`:t?i.key=L.ESC+`OH`:i.key=L.ESC+`[H`;break;case 35:a?i.key=L.ESC+`[1;`+(a+1)+`F`:t?i.key=L.ESC+`OF`:i.key=L.ESC+`[F`;break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=L.ESC+`[5;`+(a+1)+`~`:i.key=L.ESC+`[5~`;break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=L.ESC+`[6;`+(a+1)+`~`:i.key=L.ESC+`[6~`;break;case 112:a?i.key=L.ESC+`[1;`+(a+1)+`P`:i.key=L.ESC+`OP`;break;case 113:a?i.key=L.ESC+`[1;`+(a+1)+`Q`:i.key=L.ESC+`OQ`;break;case 114:a?i.key=L.ESC+`[1;`+(a+1)+`R`:i.key=L.ESC+`OR`;break;case 115:a?i.key=L.ESC+`[1;`+(a+1)+`S`:i.key=L.ESC+`OS`;break;case 116:a?i.key=L.ESC+`[15;`+(a+1)+`~`:i.key=L.ESC+`[15~`;break;case 117:a?i.key=L.ESC+`[17;`+(a+1)+`~`:i.key=L.ESC+`[17~`;break;case 118:a?i.key=L.ESC+`[18;`+(a+1)+`~`:i.key=L.ESC+`[18~`;break;case 119:a?i.key=L.ESC+`[19;`+(a+1)+`~`:i.key=L.ESC+`[19~`;break;case 120:a?i.key=L.ESC+`[20;`+(a+1)+`~`:i.key=L.ESC+`[20~`;break;case 121:a?i.key=L.ESC+`[21;`+(a+1)+`~`:i.key=L.ESC+`[21~`;break;case 122:a?i.key=L.ESC+`[23;`+(a+1)+`~`:i.key=L.ESC+`[23~`;break;case 123:a?i.key=L.ESC+`[24;`+(a+1)+`~`:i.key=L.ESC+`[24~`;break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=L.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=L.DEL:e.keyCode===219?i.key=L.ESC:e.keyCode===220?i.key=L.FS:e.keyCode===221&&(i.key=L.GS);else if((!n||r)&&e.altKey&&!e.metaKey){let t=cl[e.keyCode]?.[+!!e.shiftKey];if(t)i.key=L.ESC+t;else if(e.keyCode>=65&&e.keyCode<=90){let t=e.ctrlKey?e.keyCode-64:e.keyCode+32,n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),i.key=L.ESC+n}else if(e.keyCode===32)i.key=L.ESC+(e.ctrlKey?L.NUL:` `);else if(e.key===`Dead`&&e.code.startsWith(`Key`)){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),i.key=L.ESC+t,i.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key===`_`&&(i.key=L.US),e.key===`@`&&(i.key=L.NUL));break}return i}var Z=0,ul=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new rs,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new rs,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((e,t)=>this._getKey(e)-this._getKey(t)),t=0,n=0,r=Array(this._array.length+this._insertedValues.length);for(let i=0;i=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Z=this._search(t),Z===-1)||this._getKey(this._array[Z])!==t)return!1;do if(this._array[Z]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Z),!0;while(++Ze-t),t=0,n=Array(this._array.length-e.length),r=0;for(let i=0;i0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Z=this._search(e),!(Z<0||Z>=this._array.length)&&this._getKey(this._array[Z])===e))do yield this._array[Z];while(++Z=this._array.length)&&this._getKey(this._array[Z])===e))do t(this._array[Z]);while(++Z=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},dl=0,fl=0,pl=class extends M{constructor(){super(),this._decorations=new ul(e=>e?.marker.line),this._onDecorationRegistered=this._register(new P),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new P),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(j(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new ml(e);if(t){let e=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(let a of this._decorations.getKeyIterator(t))r=a.options.x??0,i=r+(a.options.width??1),e>=r&&e{dl=t.options.x??0,fl=dl+(t.options.width??1),e>=dl&&e=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},t)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},_l=20,vl=class extends M{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``;let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=i.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let e=0;ethis._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new gl(this._renderRows.bind(this))),!this._terminal.element)throw Error(`Cannot enable accessibility before Terminal.open`);this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this._register(this._terminal.onResize(e=>this._handleResize(e.rows))),this._register(this._terminal.onRender(e=>this._refreshRows(e.start,e.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(e=>this._handleChar(e))),this._register(this._terminal.onLineFeed(()=>this._handleChar(` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),Qo&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]=t[0]&&e[0]=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=xs(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=Io(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-Ss),Ss),t/=Ss,t/Math.abs(t)+Math.round(t*(Cs-1)))}shouldForceSelection(e){return Jo?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(`mouseup`,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),ws)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(`mouseup`,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Jo&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&tthis._handleTrim(e))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,a=i.lines.get(e[1]);if(!a)return;let o=i.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(a,e[0]),c=s,l=e[0]-s,u=0,d=0,f=0,p=0;if(o.charAt(s)===` `){for(;s>0&&o.charAt(s-1)===` `;)s--;for(;c1&&(p+=r-1,c+=r-1);t>0&&s>0&&!this._isCharWordSeparator(a.loadCell(t-1,this._workCell));){a.loadCell(t-1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,t--):e>1&&(f+=e-1,s-=e-1),s--,t--}for(;n1&&(p+=e-1,c+=e-1),c++,n++}}c++;let m=s+l-u+f,h=Math.min(this._bufferService.cols,c-s+u+d-f-p);if(!(!t&&o.slice(s,c).trim()===``)){if(n&&m===0&&a.getCodePoint(0)!==32){let t=i.lines.get(e[1]-1);if(t&&a.isWrapped&&t.getCodePoint(this._bufferService.cols-1)!==32){let t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){let e=this._bufferService.cols-t.start;m-=e,h+=e}}}if(r&&m+h===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let t=i.lines.get(e[1]+1);if(t?.isWrapped&&t.getCodePoint(0)!==32){let t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(h+=t.length)}}return{start:m,length:h}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=xs(n,this._bufferService.cols)}};Ds=O([k(3,un),k(4,fn),k(5,wn),k(6,gn),k(7,Tn),k(8,Cn)],Ds);var Os=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},ks=class{constructor(){this._color=new Os,this._css=new Os}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},G=Object.freeze((()=>{let e=[W.toColor(`#2e3436`),W.toColor(`#cc0000`),W.toColor(`#4e9a06`),W.toColor(`#c4a000`),W.toColor(`#3465a4`),W.toColor(`#75507b`),W.toColor(`#06989a`),W.toColor(`#d3d7cf`),W.toColor(`#555753`),W.toColor(`#ef2929`),W.toColor(`#8ae234`),W.toColor(`#fce94f`),W.toColor(`#729fcf`),W.toColor(`#ad7fa8`),W.toColor(`#34e2e2`),W.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:H.toCss(r,i,a),rgba:H.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:H.toCss(n,n,n),rgba:H.toRgba(n,n,n)})}return e})()),As=W.toColor(`#ffffff`),js=W.toColor(`#000000`),Ms=W.toColor(`#ffffff`),Ns=js,Ps={css:`rgba(255, 255, 255, 0.3)`,rgba:4294967117},Fs=As,Is=class extends M{constructor(e){super(),this._optionsService=e,this._contrastCache=new ks,this._halfContrastCache=new ks,this._onChangeColors=this._register(new P),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:As,background:js,cursor:Ms,cursorAccent:Ns,selectionForeground:void 0,selectionBackgroundTransparent:Ps,selectionBackgroundOpaque:U.blend(js,Ps),selectionInactiveBackgroundTransparent:Ps,selectionInactiveBackgroundOpaque:U.blend(js,Ps),scrollbarSliderBackground:U.opacity(As,.2),scrollbarSliderHoverBackground:U.opacity(As,.4),scrollbarSliderActiveBackground:U.opacity(As,.5),overviewRulerBorder:As,ansi:G.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange(`minimumContrastRatio`,()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange(`theme`,()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=K(e.foreground,As),t.background=K(e.background,js),t.cursor=U.blend(t.background,K(e.cursor,Ms)),t.cursorAccent=U.blend(t.background,K(e.cursorAccent,Ns)),t.selectionBackgroundTransparent=K(e.selectionBackground,Ps),t.selectionBackgroundOpaque=U.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=K(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=U.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?K(e.selectionForeground,ro):void 0,t.selectionForeground===ro&&(t.selectionForeground=void 0),U.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=U.opacity(t.selectionBackgroundTransparent,.3)),U.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=U.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=K(e.scrollbarSliderBackground,U.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=K(e.scrollbarSliderHoverBackground,U.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=K(e.scrollbarSliderActiveBackground,U.opacity(t.foreground,.5)),t.overviewRulerBorder=K(e.overviewRulerBorder,Fs),t.ansi=G.slice(),t.ansi[0]=K(e.black,G[0]),t.ansi[1]=K(e.red,G[1]),t.ansi[2]=K(e.green,G[2]),t.ansi[3]=K(e.yellow,G[3]),t.ansi[4]=K(e.blue,G[4]),t.ansi[5]=K(e.magenta,G[5]),t.ansi[6]=K(e.cyan,G[6]),t.ansi[7]=K(e.white,G[7]),t.ansi[8]=K(e.brightBlack,G[8]),t.ansi[9]=K(e.brightRed,G[9]),t.ansi[10]=K(e.brightGreen,G[10]),t.ansi[11]=K(e.brightYellow,G[11]),t.ansi[12]=K(e.brightBlue,G[12]),t.ansi[13]=K(e.brightMagenta,G[13]),t.ansi[14]=K(e.brightCyan,G[14]),t.ansi[15]=K(e.brightWhite,G[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;re.index-t.index),r=[];for(let t of n){let n=this._services.get(t.id);if(!n)throw Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id._id}.`);r.push(n)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},zs={trace:0,debug:1,info:2,warn:3,error:4,off:5},Bs=`xterm.js: `,Vs=class extends M{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),Hs=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=zs[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;tthis._length)for(let t=this._length;t=e;t--)this._array[this._getCyclicIndex(t+n.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;tthis._maxLength){let e=this._length+n.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw Error(`start argument out of range`);if(e+n<0)throw Error(`Cannot shift elements in list beyond index 0`);if(n>0){for(let r=t-1;r>=0;r--)this.set(e+r+n,this.get(e+r));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r>22,t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._data[e*q+1]=t[0],t[1].length>1?(this._combined[e]=t[1],this._data[e*q+0]=e|2097152|t[2]<<22):this._data[e*q+0]=t[1].charCodeAt(0)|t[2]<<22}getWidth(e){return this._data[e*q+0]>>22}hasWidth(e){return this._data[e*q+0]&12582912}getFg(e){return this._data[e*q+1]}getBg(e){return this._data[e*q+2]}hasContent(e){return this._data[e*q+0]&4194303}getCodePoint(e){let t=this._data[e*q+0];return t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):t&2097151}isCombined(e){return this._data[e*q+0]&2097152}getString(e){let t=this._data[e*q+0];return t&2097152?this._combined[e]:t&2097151?Yt(t&2097151):``}isProtected(e){return this._data[e*q+2]&536870912}loadCell(e,t){return Ws=e*q,t.content=this._data[Ws+0],t.fg=this._data[Ws+1],t.bg=this._data[Ws+2],t.content&2097152&&(t.combinedData=this._combined[e]),t.bg&268435456&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){t.content&2097152&&(this._combined[e]=t.combinedData),t.bg&268435456&&(this._extendedAttrs[e]=t.extended),this._data[e*q+0]=t.content,this._data[e*q+1]=t.fg,this._data[e*q+2]=t.bg}setCellFromCodepoint(e,t,n,r){r.bg&268435456&&(this._extendedAttrs[e]=r.extended),this._data[e*q+0]=t|n<<22,this._data[e*q+1]=r.fg,this._data[e*q+2]=r.bg}addCodepointToCell(e,t,n){let r=this._data[e*q+0];r&2097152?this._combined[e]+=Yt(t):r&2097151?(this._combined[e]=Yt(r&2097151)+Yt(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[e*q+0]=r}insertCells(e,t,n){if(e%=this.length,e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t=0;--n)this.setCell(e+t+n,this.loadCell(e+n,r));for(let r=0;rthis.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n=e&&delete this._combined[r]}let r=Object.keys(this._extendedAttrs);for(let t=0;t=e&&delete this._extendedAttrs[n]}}return this.length=e,n*4*Gs=0;--e)if(this._data[e*q+0]&4194303)return e+(this._data[e*q+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*q+0]&4194303||this._data[e*q+2]&50331648)return e+(this._data[e*q+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){let a=e._data;if(i)for(let i=r-1;i>=0;i--){for(let e=0;e=t&&(this._combined[i-t+n]=e._combined[i])}}translateToString(e,t,n,r){t??=0,n??=this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let i=``;for(;t>22||1}return r&&r.push(t),i}};function qs(e,t,n,r,i,a){let o=[];for(let s=0;s=s&&r0&&(e>d||u[e].getTrimmedLength()===0);e--)h++;h>0&&(o.push(s+u.length-h),o.push(h)),s+=u.length-1}return o}function Js(e,t){let n=[],r=0,i=t[r],a=0;for(let o=0;oZs(e,r,t)).reduce((e,t)=>e+t),a=0,o=0,s=0;for(;sc&&(a-=c,o++);let l=e[o].getWidth(a-1)===2;l&&a--;let u=l?n-1:n;r.push(u),s+=u}return r}function Zs(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var Qs=class e{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=e._nextId++,this._onDispose=this.register(new P),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),tr(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}};Qs._nextId=1;var $s=Qs,Y={},ec=Y.B;Y[0]={"`":`◆`,a:`▒`,b:`␉`,c:`␌`,d:`␍`,e:`␊`,f:`°`,g:`±`,h:`␤`,i:`␋`,j:`┘`,k:`┐`,l:`┌`,m:`└`,n:`┼`,o:`⎺`,p:`⎻`,q:`─`,r:`⎼`,s:`⎽`,t:`├`,u:`┤`,v:`┴`,w:`┬`,x:`│`,y:`≤`,z:`≥`,"{":`π`,"|":`≠`,"}":`£`,"~":`·`},Y.A={"#":`£`},Y.B=void 0,Y[4]={"#":`£`,"@":`¾`,"[":`ij`,"\\":`½`,"]":`|`,"{":`¨`,"|":`f`,"}":`¼`,"~":`´`},Y.C=Y[5]={"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},Y.R={"#":`£`,"@":`à`,"[":`°`,"\\":`ç`,"]":`§`,"{":`é`,"|":`ù`,"}":`è`,"~":`¨`},Y.Q={"@":`à`,"[":`â`,"\\":`ç`,"]":`ê`,"^":`î`,"`":`ô`,"{":`é`,"|":`ù`,"}":`è`,"~":`û`},Y.K={"@":`§`,"[":`Ä`,"\\":`Ö`,"]":`Ü`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`ß`},Y.Y={"#":`£`,"@":`§`,"[":`°`,"\\":`ç`,"]":`é`,"`":`ù`,"{":`à`,"|":`ò`,"}":`è`,"~":`ì`},Y.E=Y[6]={"@":`Ä`,"[":`Æ`,"\\":`Ø`,"]":`Å`,"^":`Ü`,"`":`ä`,"{":`æ`,"|":`ø`,"}":`å`,"~":`ü`},Y.Z={"#":`£`,"@":`§`,"[":`¡`,"\\":`Ñ`,"]":`¿`,"{":`°`,"|":`ñ`,"}":`ç`},Y.H=Y[7]={"@":`É`,"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},Y[`=`]={"#":`ù`,"@":`à`,"[":`é`,"\\":`ç`,"]":`ê`,"^":`î`,_:`è`,"`":`ô`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`û`};var tc=4294967295,nc=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=J.clone(),this.savedCharset=ec,this.markers=[],this._nullCell=rn.fromCharData([0,$t,1,0]),this._whitespaceCell=rn.fromCharData([0,en,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new rs,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Us(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new nn),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new nn),this._whitespaceCell}getBlankLine(e,t){return new Ks(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&etc?tc:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=J);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Us(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(J),r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ks(e,n)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend===`conpty`&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=qs(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(J),n);if(r.length>0){let n=Js(this.lines,r);Ys(this.lines,n.layout),this._reflowLargerAdjustViewport(e,t,n.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(J),i=n;for(;i-->0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;o--){let s=this.lines.get(o);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let c=[s];for(;s.isWrapped&&o>0;)s=this.lines.get(--o),c.unshift(s);if(!n){let e=this.ybase+this.y;if(e>=o&&e0&&(i.push({start:o+c.length+a,newLines:p}),a+=p.length),c.push(...p);let m=u.length-1,h=u[m];h===0&&(m--,h=u[m]);let g=c.length-d-1,_=l;for(;g>=0;){let e=Math.min(_,h);if(c[m]===void 0)break;c[m].copyCellsFrom(c[g],_-e,h-e,e,!0),h-=e,h===0&&(m--,h=u[m]),_-=e,_===0&&(g--,_=Zs(c,Math.max(g,0),this._cols))}for(let t=0;t0;)this.ybase===0?this.y0){let e=[],t=[];for(let e=0;e=0;l--)if(s&&s.start>r+c){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(l--,s.newLines[e]);l++,e.push({index:r+1,amount:s.newLines.length}),c+=s.newLines.length,s=i[++o]}else this.lines.set(l,t[r--]);let l=0;for(let t=e.length-1;t>=0;t--)e[t].index+=l,this.lines.onInsertEmitter.fire(e[t]),l+=e[t].amount;let u=Math.max(0,n+a-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):``}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+10;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e??=this.x;!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t{t.line-=e,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(e=>{t.line>=e.index&&(t.line+=e.amount)})),t.register(this.lines.onDelete(e=>{t.line>=e.index&&t.linee.index&&(t.line-=e.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},rc=class extends M{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new P),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange(`scrollback`,()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange(`tabStopWidth`,()=>this.setupTabStops()))}reset(){this._normal=new nc(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new nc(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},ic=2,ac=1,oc=class extends M{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new P),this.onResize=this._onResize.event,this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,ic),this.rows=Math.max(e.rawOptions.rows||0,ac),this.buffers=this._register(new rc(e,this)),this._register(this.buffers.onBufferActivate(e=>{this._onScroll.fire(e.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,a=n.ybase+n.scrollBottom;if(n.scrollTop===0){let e=n.lines.isFull;a===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(a+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let e=a-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(a,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};oc=O([k(0,gn)],oc);var sc={cols:80,rows:24,cursorBlink:!1,cursorStyle:`block`,cursorWidth:1,cursorInactiveStyle:`outline`,customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:`alt`,fastScrollSensitivity:5,fontFamily:`monospace`,fontSize:15,fontWeight:`normal`,fontWeightBold:`bold`,ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:`info`,logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Jo,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:` ()[]{}',"\``,altClickMovesCursor:!0,convertEol:!1,termName:`xterm`,cancelEvents:!1,overviewRuler:{}},cc=[`normal`,`bold`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],lc=class extends M{constructor(e){super(),this._onOptionChange=this._register(new P),this.onOptionChange=this._onOptionChange.event;let t={...sc};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(e){console.error(e)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(j(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=e=>{if(!(e in sc))throw Error(`No option with key "${e}"`);return this.rawOptions[e]},t=(e,t)=>{if(!(e in sc))throw Error(`No option with key "${e}"`);t=this._sanitizeAndValidateOption(e,t),this.rawOptions[e]!==t&&(this.rawOptions[e]=t,this._onOptionChange.fire(e))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case`cursorStyle`:if(t||=sc[e],!uc(t))throw Error(`"${t}" is not a valid value for ${e}`);break;case`wordSeparator`:t||=sc[e];break;case`fontWeight`:case`fontWeightBold`:if(typeof t==`number`&&1<=t&&t<=1e3)break;t=cc.includes(t)?t:sc[e];break;case`cursorWidth`:t=Math.floor(t);case`lineHeight`:case`tabStopWidth`:if(t<1)throw Error(`${e} cannot be less than 1, value: ${t}`);break;case`minimumContrastRatio`:t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case`scrollback`:if(t=Math.min(t,4294967295),t<0)throw Error(`${e} cannot be less than 0, value: ${t}`);break;case`fastScrollSensitivity`:case`scrollSensitivity`:if(t<=0)throw Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case`rows`:case`cols`:if(!t&&t!==0)throw Error(`${e} must be numeric, value: ${t}`);break;case`windowsPty`:t??={};break}return t}};function uc(e){return e===`block`||e===`underline`||e===`bar`}function dc(e,t=5){if(typeof e!=`object`)return e;let n=Array.isArray(e)?[]:{};for(let r in e)n[r]=t<=1?e[r]:e[r]&&dc(e[r],t-1);return n}var fc=Object.freeze({insertMode:!1}),pc=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),mc=class extends M{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new P),this.onData=this._onData.event,this._onUserInput=this._register(new P),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new P),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new P),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=dc(fc),this.decPrivateModes=dc(pc)}reset(){this.modes=dc(fc),this.decPrivateModes=dc(pc)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace(`sending data (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace(`sending binary (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onBinary.fire(e))}};mc=O([k(0,un),k(1,hn),k(2,gn)],mc);var hc={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function gc(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var _c=String.fromCharCode,vc={DEFAULT:e=>{let t=[gc(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?``:`\x1B[M${_c(t[0])}${_c(t[1])}${_c(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${gc(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${gc(e,!0)};${e.x};${e.y}${t}`}},yc=class extends M{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol=``,this._activeEncoding=``,this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new P),this.onProtocolChange=this._onProtocolChange.event;for(let e of Object.keys(hc))this.addProtocol(e,hc[e]);for(let e of Object.keys(vc))this.addEncoding(e,vc[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol=`NONE`,this.activeEncoding=`DEFAULT`,this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding===`SGR_PIXELS`))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding===`DEFAULT`?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};yc=O([k(0,un),k(1,fn),k(2,gn)],yc);var bc=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],xc=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],X;function Sc(e,t){let n=0,r=t.length-1,i;if(et[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=wc.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return wc.createPropertyValue(0,n,r)}},wc=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new P,this.onChange=this._onChange.event;let e=new Cc;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return(e&1)!=0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},Tc=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Ec(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var Dc=2147483647,Oc=256,kc=class e{constructor(e=32,t=32){if(this.maxLength=e,this.maxSubParamsLength=t,t>Oc)throw Error(`maxSubParamsLength must not be greater than 256`);this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new e;if(!t.length)return n;for(let e=+!!Array.isArray(t[0]);e>8,r=this._subParamsIdx[t]&255;r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>Dc?Dc:e}addSubParam(e){if(this._digitIsSub=!0,this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParams[this._subParamsLength++]=e>Dc?Dc:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(this._subParamsIdx[e]&255)-(this._subParamsIdx[e]>>8)>0}getSubParams(e){let t=this._subParamsIdx[e]>>8,n=this._subParamsIdx[e]&255;return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){let e={};for(let t=0;t>8,r=this._subParamsIdx[t]&255;r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[t-1];n[t-1]=~r?Math.min(r*10+e,Dc):e}},Ac=[],jc=class{constructor(){this._state=0,this._active=Ac,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Ac}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Ac,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Ac,!this._active.length)this._handlerFb(this._id,`START`);else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,`PUT`,Xt(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,`END`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Ac,this._id=-1,this._state=0}}},Mc=class{constructor(e){this._handler=e,this._data=``,this._hitLimit=!1}start(){this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=Xt(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(e=>(this._data=``,this._hitLimit=!1,e));return this._data=``,this._hitLimit=!1,t}},Nc=[],Pc=class{constructor(){this._handlers=Object.create(null),this._active=Nc,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Nc}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Nc,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Nc,!this._active.length)this._handlerFb(this._ident,`HOOK`,t);else for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,`PUT`,Xt(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,`UNHOOK`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Nc,this._ident=0}},Fc=new kc;Fc.addParam(0);var Ic=class{constructor(e){this._handler=e,this._data=``,this._params=Fc,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Fc,this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=Xt(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(e=>(this._params=Fc,this._data=``,this._hitLimit=!1,e));return this._params=Fc,this._data=``,this._hitLimit=!1,t}},Lc=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;it),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let a=n(0,14),o;for(o in e.setDefault(1,0),e.addMany(r,0,2,0),a)e.addMany([24,26,153,154],o,3,0),e.addMany(n(128,144),o,3,0),e.addMany(n(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Rc,0,2,0),e.add(Rc,8,5,8),e.add(Rc,6,0,6),e.add(Rc,11,0,11),e.add(Rc,13,13,13),e}(),Bc=class extends M{constructor(e=zc){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new kc,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(j(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new jc),this._dcsParser=this._register(new Pc),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:`\\`},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw Error(`only one byte as prefix supported`);if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw Error(`prefix must be in range 0x3c .. 0x3f`)}if(e.intermediates){if(e.intermediates.length>2)throw Error(`only two bytes as intermediates are supported`);for(let t=0;tr||r>47)throw Error(`intermediate must be in range 0x20 .. 0x2f`);n<<=8,n|=r}}if(e.final.length!==1)throw Error(`final must be a single byte`);let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join(``)}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r=0,i=0,a=0,o;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,Error(`improper continuation due to previous async handler, giving up parsing`);let t=this._parseStack.handlers,i=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](this._params),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 4:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],o=this._dcsParser.unhook(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],o=this._oscParser.end(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let n=a;n>4){case 2:for(let i=n+1;;++i){if(i>=t||(r=e[i])<32||r>126&&r=t||(r=e[i])<32||r>126&&r=t||(r=e[i])<32||r>126&&r=t||(r=e[i])<32||r>126&&r=0&&(o=a[s](this._params),o!==!0);s--)if(o instanceof Promise)return this._preserveStack(3,a,s,i,n),o;s<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++n47&&r<60);n--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let c=this._escHandlers[this._collect<<8|r],l=c?c.length-1:-1;for(;l>=0&&(o=c[l](),o!==!0);l--)if(o instanceof Promise)return this._preserveStack(4,c,l,i,n),o;l<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let i=n+1;;++i)if(i>=t||(r=e[i])===24||r===26||r===27||r>127&&r=t||(r=e[i])<32||r>127&&r>4:i>>8}return n}}function Wc(e,t){let n=e.toString(16),r=n.length<2?`0`+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function Gc(e,t=16){let[n,r,i]=e;return`rgb:${Wc(n,t)}/${Wc(r,t)}/${Wc(i,t)}`}var Kc={"(":0,")":1,"*":2,"+":3,"-":1,".":2},qc=131072,Jc=10;function Yc(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Xc=5e3,Zc=0,Qc=class extends M{constructor(e,t,n,r,i,a,o,s,c=new Bc){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=a,this._coreMouseService=o,this._unicodeService=s,this._parser=c,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new Zt,this._utf8Decoder=new Qt,this._windowTitle=``,this._iconName=``,this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=J.clone(),this._eraseAttrDataInternal=J.clone(),this._onRequestBell=this._register(new P),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new P),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new P),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new P),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new P),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new P),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new P),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new P),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new P),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new P),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new P),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new P),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new P),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new $c(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._parser.setCsiHandlerFallback((e,t)=>{this._logService.debug(`Unknown CSI code: `,{identifier:this._parser.identToString(e),params:t.toArray()})}),this._parser.setEscHandlerFallback(e=>{this._logService.debug(`Unknown ESC code: `,{identifier:this._parser.identToString(e)})}),this._parser.setExecuteHandlerFallback(e=>{this._logService.debug(`Unknown EXECUTE code: `,{code:e})}),this._parser.setOscHandlerFallback((e,t,n)=>{this._logService.debug(`Unknown OSC code: `,{identifier:e,action:t,data:n})}),this._parser.setDcsHandlerFallback((e,t,n)=>{t===`HOOK`&&(n=n.toArray()),this._logService.debug(`Unknown DCS code: `,{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setPrintHandler((e,t,n)=>this.print(e,t,n)),this._parser.registerCsiHandler({final:`@`},e=>this.insertChars(e)),this._parser.registerCsiHandler({intermediates:` `,final:`@`},e=>this.scrollLeft(e)),this._parser.registerCsiHandler({final:`A`},e=>this.cursorUp(e)),this._parser.registerCsiHandler({intermediates:` `,final:`A`},e=>this.scrollRight(e)),this._parser.registerCsiHandler({final:`B`},e=>this.cursorDown(e)),this._parser.registerCsiHandler({final:`C`},e=>this.cursorForward(e)),this._parser.registerCsiHandler({final:`D`},e=>this.cursorBackward(e)),this._parser.registerCsiHandler({final:`E`},e=>this.cursorNextLine(e)),this._parser.registerCsiHandler({final:`F`},e=>this.cursorPrecedingLine(e)),this._parser.registerCsiHandler({final:`G`},e=>this.cursorCharAbsolute(e)),this._parser.registerCsiHandler({final:`H`},e=>this.cursorPosition(e)),this._parser.registerCsiHandler({final:`I`},e=>this.cursorForwardTab(e)),this._parser.registerCsiHandler({final:`J`},e=>this.eraseInDisplay(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`J`},e=>this.eraseInDisplay(e,!0)),this._parser.registerCsiHandler({final:`K`},e=>this.eraseInLine(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`K`},e=>this.eraseInLine(e,!0)),this._parser.registerCsiHandler({final:`L`},e=>this.insertLines(e)),this._parser.registerCsiHandler({final:`M`},e=>this.deleteLines(e)),this._parser.registerCsiHandler({final:`P`},e=>this.deleteChars(e)),this._parser.registerCsiHandler({final:`S`},e=>this.scrollUp(e)),this._parser.registerCsiHandler({final:`T`},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:`X`},e=>this.eraseChars(e)),this._parser.registerCsiHandler({final:`Z`},e=>this.cursorBackwardTab(e)),this._parser.registerCsiHandler({final:"`"},e=>this.charPosAbsolute(e)),this._parser.registerCsiHandler({final:`a`},e=>this.hPositionRelative(e)),this._parser.registerCsiHandler({final:`b`},e=>this.repeatPrecedingCharacter(e)),this._parser.registerCsiHandler({final:`c`},e=>this.sendDeviceAttributesPrimary(e)),this._parser.registerCsiHandler({prefix:`>`,final:`c`},e=>this.sendDeviceAttributesSecondary(e)),this._parser.registerCsiHandler({final:`d`},e=>this.linePosAbsolute(e)),this._parser.registerCsiHandler({final:`e`},e=>this.vPositionRelative(e)),this._parser.registerCsiHandler({final:`f`},e=>this.hVPosition(e)),this._parser.registerCsiHandler({final:`g`},e=>this.tabClear(e)),this._parser.registerCsiHandler({final:`h`},e=>this.setMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`h`},e=>this.setModePrivate(e)),this._parser.registerCsiHandler({final:`l`},e=>this.resetMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`l`},e=>this.resetModePrivate(e)),this._parser.registerCsiHandler({final:`m`},e=>this.charAttributes(e)),this._parser.registerCsiHandler({final:`n`},e=>this.deviceStatus(e)),this._parser.registerCsiHandler({prefix:`?`,final:`n`},e=>this.deviceStatusPrivate(e)),this._parser.registerCsiHandler({intermediates:`!`,final:`p`},e=>this.softReset(e)),this._parser.registerCsiHandler({intermediates:` `,final:`q`},e=>this.setCursorStyle(e)),this._parser.registerCsiHandler({final:`r`},e=>this.setScrollRegion(e)),this._parser.registerCsiHandler({final:`s`},e=>this.saveCursor(e)),this._parser.registerCsiHandler({final:`t`},e=>this.windowOptions(e)),this._parser.registerCsiHandler({final:`u`},e=>this.restoreCursor(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`}`},e=>this.insertColumns(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`~`},e=>this.deleteColumns(e)),this._parser.registerCsiHandler({intermediates:`"`,final:`q`},e=>this.selectProtected(e)),this._parser.registerCsiHandler({intermediates:`$`,final:`p`},e=>this.requestMode(e,!0)),this._parser.registerCsiHandler({prefix:`?`,intermediates:`$`,final:`p`},e=>this.requestMode(e,!1)),this._parser.setExecuteHandler(L.BEL,()=>this.bell()),this._parser.setExecuteHandler(L.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(L.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(L.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(L.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(L.BS,()=>this.backspace()),this._parser.setExecuteHandler(L.HT,()=>this.tab()),this._parser.setExecuteHandler(L.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(L.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(eo.IND,()=>this.index()),this._parser.setExecuteHandler(eo.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(eo.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Mc(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new Mc(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new Mc(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new Mc(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new Mc(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new Mc(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new Mc(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new Mc(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new Mc(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new Mc(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new Mc(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new Mc(e=>this.restoreCursorColor(e))),this._parser.registerEscHandler({final:`7`},()=>this.saveCursor()),this._parser.registerEscHandler({final:`8`},()=>this.restoreCursor()),this._parser.registerEscHandler({final:`D`},()=>this.index()),this._parser.registerEscHandler({final:`E`},()=>this.nextLine()),this._parser.registerEscHandler({final:`H`},()=>this.tabSet()),this._parser.registerEscHandler({final:`M`},()=>this.reverseIndex()),this._parser.registerEscHandler({final:`=`},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:`>`},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:`c`},()=>this.fullReset()),this._parser.registerEscHandler({final:`n`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`o`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`|`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`}`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`~`},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:`%`,final:`@`},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:`%`,final:`G`},()=>this.selectDefaultCharset());for(let e in Y)this._parser.registerEscHandler({intermediates:`(`,final:e},()=>this.selectCharset(`(`+e)),this._parser.registerEscHandler({intermediates:`)`,final:e},()=>this.selectCharset(`)`+e)),this._parser.registerEscHandler({intermediates:`*`,final:e},()=>this.selectCharset(`*`+e)),this._parser.registerEscHandler({intermediates:`+`,final:e},()=>this.selectCharset(`+`+e)),this._parser.registerEscHandler({intermediates:`-`,final:e},()=>this.selectCharset(`-`+e)),this._parser.registerEscHandler({intermediates:`.`,final:e},()=>this.selectCharset(`.`+e)),this._parser.registerEscHandler({intermediates:`/`,final:e},()=>this.selectCharset(`/`+e));this._parser.registerEscHandler({intermediates:`#`,final:`8`},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(e=>(this._logService.error(`Parsing error: `,e),e)),this._parser.registerDcsHandler({intermediates:`$`,final:`q`},new Ic((e,t)=>this.requestStatusString(e,t)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((e,t)=>setTimeout(()=>t(`#SLOW_TIMEOUT`),Xc))]).catch(e=>{if(e!==`#SLOW_TIMEOUT`)throw e;console.warn(`async parser handler taking longer than ${Xc} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,a=0,o=this._parseStack.paused;if(o){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>qc&&(a=this._parseStack.position+qc)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e==`string`?` "${e}"`:` "${Array.prototype.map.call(e,e=>String.fromCharCode(e)).join(``)}"`}`),this._logService.logLevel===0&&this._logService.trace(`parsing data (codes)`,typeof e==`string`?e.split(``).map(e=>e.charCodeAt(0)):e),this._parseBuffer.lengthqc)for(let t=a;t0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let f=this._parser.precedingJoinState;for(let p=t;ps){if(c){let e=d,t=this._activeBuffer.x-m;for(this._activeBuffer.x=m,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),m>0&&d instanceof Ks&&d.copyCellsFrom(e,t,0,m,!1);t=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(l&&(d.insertCells(this._activeBuffer.x,i-m,this._activeBuffer.getNullCell(u)),d.getWidth(s-1)===2&&d.setCellFromCodepoint(s-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,r,i,u),i>0)for(;--i;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=f,this._activeBuffer.x0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final===`t`&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,e=>!Yc(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Ic(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Mc(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(a.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+n)?.getTrimmedLength(););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let c=s;for(let e=1;e0||(this._is(`xterm`)||this._is(`rxvt-unicode`)||this._is(`screen`)?this._coreService.triggerDataEvent(L.ESC+`[?1;2c`):this._is(`linux`)&&this._coreService.triggerDataEvent(L.ESC+`[?6c`)),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is(`xterm`)?this._coreService.triggerDataEvent(L.ESC+`[>0;276;0c`):this._is(`rxvt-unicode`)?this._coreService.triggerDataEvent(L.ESC+`[>85;95;0c`):this._is(`linux`)?this._coreService.triggerDataEvent(e.params[0]+`c`):this._is(`screen`)&&this._coreService.triggerDataEvent(L.ESC+`[>83;40003;0c`)),!0}_is(e){return(this._optionsService.rawOptions.termName+``).indexOf(e)===0}setMode(e){for(let t=0;t(e[e.NOT_RECOGNIZED=0]=`NOT_RECOGNIZED`,e[e.SET=1]=`SET`,e[e.RESET=2]=`RESET`,e[e.PERMANENTLY_SET=3]=`PERMANENTLY_SET`,e[e.PERMANENTLY_RESET=4]=`PERMANENTLY_RESET`))(n||={});let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:a}=this._coreMouseService,o=this._coreService,{buffers:s,cols:c}=this._bufferService,{active:l,alt:u}=s,d=this._optionsService.rawOptions,f=(e,n)=>(o.triggerDataEvent(`${L.ESC}[${t?``:`?`}${e};${n}$y`),!0),p=e=>e?1:2,m=e.params[0];return t?m===2?f(m,4):m===4?f(m,p(o.modes.insertMode)):m===12?f(m,3):m===20?f(m,p(d.convertEol)):f(m,0):m===1?f(m,p(r.applicationCursorKeys)):m===3?f(m,d.windowOptions.setWinLines?c===80?2:+(c===132):0):m===6?f(m,p(r.origin)):m===7?f(m,p(r.wraparound)):m===8?f(m,3):m===9?f(m,p(i===`X10`)):m===12?f(m,p(d.cursorBlink)):m===25?f(m,p(!o.isCursorHidden)):m===45?f(m,p(r.reverseWraparound)):m===66?f(m,p(r.applicationKeypad)):m===67?f(m,4):m===1e3?f(m,p(i===`VT200`)):m===1002?f(m,p(i===`DRAG`)):m===1003?f(m,p(i===`ANY`)):m===1004?f(m,p(r.sendFocus)):m===1005?f(m,4):m===1006?f(m,p(a===`SGR`)):m===1015?f(m,4):m===1016?f(m,p(a===`SGR_PIXELS`)):m===1048?f(m,1):m===47||m===1047||m===1049?f(m,p(l===u)):m===2004?f(m,p(r.bracketedPasteMode)):m===2026?f(m,p(r.synchronizedOutput)):f(m,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=tn.fromColorRGB([n,r,i])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,a=0;do{if(r[a+i]=e.params[t+a],e.hasSubParams(t+a)){let n=e.getSubParams(t+a),o=0;do r[1]===5&&(i=1),r[a+o+1+i]=n[o];while(++o=2||r[1]===2&&a+i>=5)break;r[1]&&(i=1)}while(++a+t5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=J.fg,e.bg=J.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=n-90|16777224):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=n-100|16777224):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=J.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=J.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):n===100?(r.fg&=-67108864,r.fg|=J.fg&16777215,r.bg&=-67108864,r.bg|=J.bg&16777215):this._logService.debug(`Unknown SGR attribute: %d.`,n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${L.ESC}[0n`);break;case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${L.ESC}[${e};${t}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${L.ESC}[?${e};${t}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=J.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle=`block`;break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle=`underline`;break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle=`bar`;break}let e=t%2==1;this._coreService.decPrivateModes.cursorBlink=e}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Yc(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${L.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Jc&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Jc&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(`;`);for(;n.length>1;){let e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){let n=parseInt(e);if(el(n))if(r===`?`)t.push({type:0,index:n});else{let e=Uc(r);e&&t.push({type:1,index:n,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(`;`);if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):!n.trim()&&this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(`:`),r,i=n.findIndex(e=>e.startsWith(`id=`));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(`;`);for(let e=0;e=this._specialColors.length);++e,++t)if(n[e]===`?`)this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=Uc(n[e]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(`;`);for(let e=0;e=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=J.clone(),this._eraseAttrDataInternal=J.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new rn;e.content=4194373,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t(this._coreService.triggerDataEvent(`${L.ESC}${e}${L.ESC}\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e===`"q`?`P1$r${+!!this._curAttrData.isProtected()}"q`:e===`"p`?`P1$r61;1"p`:e===`r`?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e===`m`?`P1$r0m`:e===` q`?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-+!!i.cursorBlink} q`:`P0$r`)}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},$c=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){ethis.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Zc=e,e=t,t=Zc),ethis.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};$c=O([k(0,un)],$c);function el(e){return 0<=e&&e<256}var tl=5e7,nl=12,rl=50,il=class extends M{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new P),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>tl)throw Error(`write data discarded, use flow control to avoid losing data`);if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let e=this._writeBuffer[this._bufferOffset],r=this._action(e,t);if(r){r.catch(e=>(queueMicrotask(()=>{throw e}),Promise.resolve(!1))).then(e=>performance.now()-n>=nl?setTimeout(()=>this._innerWrite(0,e)):this._innerWrite(n,e));return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,performance.now()-n>=nl)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>rl&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},al=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(r,n)),this._dataByLinkId.set(r.id,r),r.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let a=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(o,a)),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(e=>e.line!==t)){let e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(n,e))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};al=O([k(0,un)],al);var ol=!1,sl=class extends M{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new ar),this._onBinary=this._register(new P),this.onBinary=this._onBinary.event,this._onData=this._register(new P),this.onData=this._onData.event,this._onLineFeed=this._register(new P),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new P),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new P),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new P),this._instantiationService=new Rs,this.optionsService=this._register(new lc(e)),this._instantiationService.setService(gn,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(oc)),this._instantiationService.setService(un,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Vs)),this._instantiationService.setService(hn,this._logService),this.coreService=this._register(this._instantiationService.createInstance(mc)),this._instantiationService.setService(fn,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(yc)),this._instantiationService.setService(dn,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(wc)),this._instantiationService.setService(vn,this.unicodeService),this._charsetService=this._instantiationService.createInstance(Tc),this._instantiationService.setService(pn,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(al),this._instantiationService.setService(_n,this._oscLinkService),this._inputHandler=this._register(new Qc(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(dr.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(dr.forward(this._bufferService.onResize,this._onResize)),this._register(dr.forward(this.coreService.onData,this._onData)),this._register(dr.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange([`windowsMode`,`windowsPty`],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new il((e,t)=>this._inputHandler.parse(e,t))),this._register(dr.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new P),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!ol&&(this._logService.warn(`writeSync is unreliable and will be removed soon.`),ol=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,ic),t=Math.max(t,ac),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend===`conpty`&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Ec.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:`H`},()=>(Ec(this._bufferService),!1))),this._windowsWrappingHeuristics.value=j(()=>{for(let t of e)t.dispose()})}}},cl={48:[`0`,`)`],49:[`1`,`!`],50:[`2`,`@`],51:[`3`,`#`],52:[`4`,`$`],53:[`5`,`%`],54:[`6`,`^`],55:[`7`,`&`],56:[`8`,`*`],57:[`9`,`(`],186:[`;`,`:`],187:[`=`,`+`],188:[`,`,`<`],189:[`-`,`_`],190:[`.`,`>`],191:[`/`,`?`],192:["`",`~`],219:[`[`,`{`],220:[`\\`,`|`],221:[`]`,`}`],222:[`'`,`"`]};function ll(e,t,n,r){let i={type:0,cancel:!1,key:void 0},a=!!e.shiftKey|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key===`UIKeyInputUpArrow`?t?i.key=L.ESC+`OA`:i.key=L.ESC+`[A`:e.key===`UIKeyInputLeftArrow`?t?i.key=L.ESC+`OD`:i.key=L.ESC+`[D`:e.key===`UIKeyInputRightArrow`?t?i.key=L.ESC+`OC`:i.key=L.ESC+`[C`:e.key===`UIKeyInputDownArrow`&&(t?i.key=L.ESC+`OB`:i.key=L.ESC+`[B`);break;case 8:i.key=e.ctrlKey?`\b`:L.DEL,e.altKey&&(i.key=L.ESC+i.key);break;case 9:if(e.shiftKey){i.key=L.ESC+`[Z`;break}i.key=L.HT,i.cancel=!0;break;case 13:i.key=e.altKey?L.ESC+L.CR:L.CR,i.cancel=!0;break;case 27:i.key=L.ESC,e.altKey&&(i.key=L.ESC+L.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`D`:t?i.key=L.ESC+`OD`:i.key=L.ESC+`[D`;break;case 39:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`C`:t?i.key=L.ESC+`OC`:i.key=L.ESC+`[C`;break;case 38:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`A`:t?i.key=L.ESC+`OA`:i.key=L.ESC+`[A`;break;case 40:if(e.metaKey)break;a?i.key=L.ESC+`[1;`+(a+1)+`B`:t?i.key=L.ESC+`OB`:i.key=L.ESC+`[B`;break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=L.ESC+`[2~`);break;case 46:a?i.key=L.ESC+`[3;`+(a+1)+`~`:i.key=L.ESC+`[3~`;break;case 36:a?i.key=L.ESC+`[1;`+(a+1)+`H`:t?i.key=L.ESC+`OH`:i.key=L.ESC+`[H`;break;case 35:a?i.key=L.ESC+`[1;`+(a+1)+`F`:t?i.key=L.ESC+`OF`:i.key=L.ESC+`[F`;break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=L.ESC+`[5;`+(a+1)+`~`:i.key=L.ESC+`[5~`;break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=L.ESC+`[6;`+(a+1)+`~`:i.key=L.ESC+`[6~`;break;case 112:a?i.key=L.ESC+`[1;`+(a+1)+`P`:i.key=L.ESC+`OP`;break;case 113:a?i.key=L.ESC+`[1;`+(a+1)+`Q`:i.key=L.ESC+`OQ`;break;case 114:a?i.key=L.ESC+`[1;`+(a+1)+`R`:i.key=L.ESC+`OR`;break;case 115:a?i.key=L.ESC+`[1;`+(a+1)+`S`:i.key=L.ESC+`OS`;break;case 116:a?i.key=L.ESC+`[15;`+(a+1)+`~`:i.key=L.ESC+`[15~`;break;case 117:a?i.key=L.ESC+`[17;`+(a+1)+`~`:i.key=L.ESC+`[17~`;break;case 118:a?i.key=L.ESC+`[18;`+(a+1)+`~`:i.key=L.ESC+`[18~`;break;case 119:a?i.key=L.ESC+`[19;`+(a+1)+`~`:i.key=L.ESC+`[19~`;break;case 120:a?i.key=L.ESC+`[20;`+(a+1)+`~`:i.key=L.ESC+`[20~`;break;case 121:a?i.key=L.ESC+`[21;`+(a+1)+`~`:i.key=L.ESC+`[21~`;break;case 122:a?i.key=L.ESC+`[23;`+(a+1)+`~`:i.key=L.ESC+`[23~`;break;case 123:a?i.key=L.ESC+`[24;`+(a+1)+`~`:i.key=L.ESC+`[24~`;break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=L.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=L.DEL:e.keyCode===219?i.key=L.ESC:e.keyCode===220?i.key=L.FS:e.keyCode===221&&(i.key=L.GS);else if((!n||r)&&e.altKey&&!e.metaKey){let t=cl[e.keyCode]?.[+!!e.shiftKey];if(t)i.key=L.ESC+t;else if(e.keyCode>=65&&e.keyCode<=90){let t=e.ctrlKey?e.keyCode-64:e.keyCode+32,n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),i.key=L.ESC+n}else if(e.keyCode===32)i.key=L.ESC+(e.ctrlKey?L.NUL:` `);else if(e.key===`Dead`&&e.code.startsWith(`Key`)){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),i.key=L.ESC+t,i.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key===`_`&&(i.key=L.US),e.key===`@`&&(i.key=L.NUL));break}return i}var Z=0,ul=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new rs,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new rs,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((e,t)=>this._getKey(e)-this._getKey(t)),t=0,n=0,r=Array(this._array.length+this._insertedValues.length);for(let i=0;i=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Z=this._search(t),Z===-1)||this._getKey(this._array[Z])!==t)return!1;do if(this._array[Z]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Z),!0;while(++Ze-t),t=0,n=Array(this._array.length-e.length),r=0;for(let i=0;i0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Z=this._search(e),!(Z<0||Z>=this._array.length)&&this._getKey(this._array[Z])===e))do yield this._array[Z];while(++Z=this._array.length)&&this._getKey(this._array[Z])===e))do t(this._array[Z]);while(++Z=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},dl=0,fl=0,pl=class extends M{constructor(){super(),this._decorations=new ul(e=>e?.marker.line),this._onDecorationRegistered=this._register(new P),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new P),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(j(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new ml(e);if(t){let e=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(let a of this._decorations.getKeyIterator(t))r=a.options.x??0,i=r+(a.options.width??1),e>=r&&e{dl=t.options.x??0,fl=dl+(t.options.width??1),e>=dl&&e=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},t)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},_l=20,vl=class extends M{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``;let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=i.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let e=0;ethis._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new gl(this._renderRows.bind(this))),!this._terminal.element)throw Error(`Cannot enable accessibility before Terminal.open`);this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this._register(this._terminal.onResize(e=>this._handleResize(e.rows))),this._register(this._terminal.onRender(e=>this._refreshRows(e.start,e.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(e=>this._handleChar(e))),this._register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(F(i,`selectionchange`,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(j(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===_l+1&&(this._liveRegion.textContent+=Bt.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(!(!a||!o)){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;ee;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e{tr(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(F(this._element,`mouseleave`,()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(F(this._element,`mousemove`,this._handleMouseMove.bind(this))),this._register(F(this._element,`mousedown`,this._handleMouseDown.bind(this))),this._register(F(this._element,`mouseup`,this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,t=>{if(this._isMouseOut)return;let i=t?.map(e=>({link:e}));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;re?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;tthis._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;ethis._linkAtPosition(e.link,t));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&bl(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,tr(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};yl=k([A(1,wn),A(2,Tn),A(3,un),A(4,kn)],yl);function bl(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var xl=class extends sl{constructor(e={}){super(e),this._linkifier=this._register(new ar),this.browser=Bo,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ar),this._onCursorMove=this._register(new P),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new P),this.onKey=this._onKey.event,this._onRender=this._register(new P),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new P),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new P),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new P),this.onBell=this._onBell.event,this._onFocus=this._register(new P),this._onBlur=this._register(new P),this._onA11yCharEmitter=this._register(new P),this._onA11yTabEmitter=this._register(new P),this._onWillOpen=this._register(new P),this._setup(),this._decorationService=this._instantiationService.createInstance(pl),this._instantiationService.setService(yn,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Fo),this._instantiationService.setService(kn,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(bn)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(dr.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(dr.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(dr.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(dr.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(j(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n=``;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=U.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${L.ESC}]${n};${Gc(r)}${to.ST}`);break;case 1:if(e===`ansi`)this._themeService.modifyColors(e=>e.ansi[t.index]=H.toColor(...t.color));else{let n=e;this._themeService.modifyColors(e=>e[n]=H.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(vl,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(L.ESC+`[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(L.ESC+`[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this._register(F(this.element,`copy`,e=>{this.hasSelection()&&Ut(e,this._selectionService)}));let e=e=>Wt(e,this.textarea,this.coreService,this.optionsService);this._register(F(this.textarea,`paste`,e)),this._register(F(this.element,`paste`,e)),Wo?this._register(F(this.element,`mousedown`,e=>{e.button===2&&qt(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(F(this.element,`contextmenu`,e=>{qt(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Qo&&this._register(F(this.element,`auxclick`,e=>{e.button===1&&Kt(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(F(this.textarea,`keyup`,e=>this._keyUp(e),!0)),this._register(F(this.textarea,`keydown`,e=>this._keyDown(e),!0)),this._register(F(this.textarea,`keypress`,e=>this._keyPress(e),!0)),this._register(F(this.textarea,`compositionstart`,()=>this._compositionHelper.compositionstart())),this._register(F(this.textarea,`compositionupdate`,e=>this._compositionHelper.compositionupdate(e))),this._register(F(this.textarea,`compositionend`,()=>this._compositionHelper.compositionend())),this._register(F(this.textarea,`input`,e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(`div`),this.element.dir=`ltr`,this.element.classList.add(`terminal`),this.element.classList.add(`xterm`),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this._register(F(this.screenElement,`mousemove`,e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement(`textarea`);this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,Rt.get()),$o||this.textarea.setAttribute(`aria-multiline`,`false`),this.textarea.setAttribute(`autocorrect`,`off`),this.textarea.setAttribute(`autocapitalize`,`off`),this.textarea.setAttribute(`spellcheck`,`false`),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange(`disableStdin`,()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(No,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<`u`?window.document:null)),this._instantiationService.setService(Cn,this._coreBrowserService),this._register(F(this.textarea,`focus`,e=>this._handleTextAreaFocus(e))),this._register(F(this.textarea,`blur`,()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(ko,this._document,this._helperContainer),this._instantiationService.setService(Sn,this._charSizeService),this._themeService=this._instantiationService.createInstance(Is),this._instantiationService.setService(On,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(lo),this._instantiationService.setService(Dn,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(as,this.rows,this.screenElement)),this._instantiationService.setService(Tn,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(no,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Ro),this._instantiationService.setService(wn,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(yl,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(qa,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Ds,this.element,this.screenElement,r)),this._instantiationService.setService(En,this._selectionService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(dr.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(Ja,this.screenElement)),this._register(F(this.element,`mousedown`,e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(vl,this)),this._register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance($a,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`overviewRuler`,e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance($a,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Oo,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(t){let n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=t.buttons&1?0:t.buttons&4?1:t.buttons&2?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(e._customWheelEventHandler&&e._customWheelEventHandler(t)===!1)return!1;let n=t.deltaY;if(n===0||e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;i=n<0?0:1,r=4;break;default:return!1}return i===void 0||r===void 0||r>4?!1:e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.removeEventListener(`mousemove`,r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this._register(this.coreMouseService.onProtocolChange(e=>{e?(this.optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this.coreMouseService.explainEvents(e)),this.element.classList.add(`enable-mouse-events`),this._selectionService.disable()):(this._logService.debug(`Unbinding from mouse events.`),this.element.classList.remove(`enable-mouse-events`),this._selectionService.enable()),e&8?r.mousemove||=(t.addEventListener(`mousemove`,i.mousemove),i.mousemove):(t.removeEventListener(`mousemove`,r.mousemove),r.mousemove=null),e&16?r.wheel||=(t.addEventListener(`wheel`,i.wheel,{passive:!1}),i.wheel):(t.removeEventListener(`wheel`,r.wheel),r.wheel=null),e&2?r.mouseup||=i.mouseup:(this._document.removeEventListener(`mouseup`,r.mouseup),r.mouseup=null),e&4?r.mousedrag||=i.mousedrag:(this._document.removeEventListener(`mousemove`,r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(F(t,`mousedown`,e=>{if(e.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(e)))return n(e),r.mouseup&&this._document.addEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.addEventListener(`mousemove`,r.mousedrag),this.cancel(e)})),this._register(F(t,`wheel`,t=>{if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(t)===!1)return!1;if(!this.buffer.hasScrollback){if(t.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(t,!0);let n=L.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(t.deltaY<0?`A`:`B`);return this.coreService.triggerDataEvent(n,!0),this.cancel(t,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(`column-select`):this.element.classList.remove(`column-select`)}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Gt(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key===`Dead`||e.key===`AltGraph`)&&(this._unprocessedDeadKey=!0);let n=ll(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===L.ETX||n.key===L.CR)&&(this.textarea.value=``),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Sl(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new nn)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},Tl=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new wl(t)}getNullCell(){return new nn}},El=class extends M{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new P),this.onBufferChange=this._onBufferChange.event,this._normal=new Tl(this._core.buffers.normal,`normal`),this._alternate=new Tl(this._core.buffers.alt,`alternate`),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error(`Active buffer is neither normal nor alternate`)}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Dl=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Ol=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},kl=[`cols`,`rows`],Al=0,jl=class extends M{constructor(e){super(),this._core=this._register(new xl(e)),this._addonManager=this._register(new Cl),this._publicOptions={...this._core.options};let t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(let e in this._core.options){let r={get:t.bind(this,e),set:n.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(kl.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error(`You must set the allowProposedApi option to true to use proposed API`)}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||=new Dl(this._core),this._parser}get unicode(){return this._checkProposedApi(),new Ol(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||=this._register(new El(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t=`none`;switch(this._core.coreMouseService.activeProtocol){case`X10`:t=`x10`;break;case`VT200`:t=`vt200`;break;case`DRAG`:t=`drag`;break;case`ANY`:t=`any`;break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r -`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Rt.get()},set promptLabel(e){Rt.set(e)},get tooMuchOutput(){return Bt.get()},set tooMuchOutput(e){Bt.set(e)}}}_verifyIntegers(...e){for(Al of e)if(Al===1/0||isNaN(Al)||Al%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(Al of e)if(Al&&(Al===1/0||isNaN(Al)||Al%1!=0||Al<0))throw Error(`This API only accepts positive integers`)}};function Q(e,t){return e.getPropertyValue(`--ui-term-${t}`).trim()}function Ml(e=document.documentElement,t=!1){let n=getComputedStyle(e);return{background:t?`#00000000`:Q(n,`bg`),foreground:Q(n,`fg`),cursor:Q(n,`cursor`),cursorAccent:Q(n,`bg`),selectionBackground:Q(n,`selection`),black:Q(n,`black`),red:Q(n,`red`),green:Q(n,`green`),yellow:Q(n,`yellow`),blue:Q(n,`blue`),magenta:Q(n,`magenta`),cyan:Q(n,`cyan`),white:Q(n,`white`),brightBlack:Q(n,`bright-black`),brightRed:Q(n,`bright-red`),brightGreen:Q(n,`bright-green`),brightYellow:Q(n,`bright-yellow`),brightBlue:Q(n,`bright-blue`),brightMagenta:Q(n,`bright-magenta`),brightCyan:Q(n,`bright-cyan`),brightWhite:Q(n,`bright-white`)}}function Nl(e,t){return e===229&&!t}function Pl({container:e,textarea:t}){let n=!1,r=()=>{n=!0},i=()=>{n=!1},a=e=>{Nl(e.keyCode,n)&&e.stopPropagation()};return t.addEventListener(`compositionstart`,r,!0),t.addEventListener(`compositionend`,i,!0),e.addEventListener(`keydown`,a,!0),()=>{t.removeEventListener(`compositionstart`,r,!0),t.removeEventListener(`compositionend`,i,!0),e.removeEventListener(`keydown`,a,!0)}}var Fl=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/g;function Il(e,t=200,n=65536){if(t<=0||n<=0)return``;let r=Math.max(0,e.length-t),i=[];for(let t=r;t0?i[i.length-1]+=r:i.push(r)}for(;i.at(-1)===``;)i.pop();let a=i.join(` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===_l+1&&(this._liveRegion.textContent+=Vt.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(!(!a||!o)){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;ee;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e{tr(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(F(this._element,`mouseleave`,()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(F(this._element,`mousemove`,this._handleMouseMove.bind(this))),this._register(F(this._element,`mousedown`,this._handleMouseDown.bind(this))),this._register(F(this._element,`mouseup`,this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,t=>{if(this._isMouseOut)return;let i=t?.map(e=>({link:e}));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;re?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;tthis._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;ethis._linkAtPosition(e.link,t));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&bl(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,tr(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};yl=O([k(1,wn),k(2,Tn),k(3,un),k(4,kn)],yl);function bl(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var xl=class extends sl{constructor(e={}){super(e),this._linkifier=this._register(new ar),this.browser=Bo,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ar),this._onCursorMove=this._register(new P),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new P),this.onKey=this._onKey.event,this._onRender=this._register(new P),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new P),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new P),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new P),this.onBell=this._onBell.event,this._onFocus=this._register(new P),this._onBlur=this._register(new P),this._onA11yCharEmitter=this._register(new P),this._onA11yTabEmitter=this._register(new P),this._onWillOpen=this._register(new P),this._setup(),this._decorationService=this._instantiationService.createInstance(pl),this._instantiationService.setService(yn,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Fo),this._instantiationService.setService(kn,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(bn)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(dr.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(dr.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(dr.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(dr.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(j(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n=``;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=U.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${L.ESC}]${n};${Gc(r)}${to.ST}`);break;case 1:if(e===`ansi`)this._themeService.modifyColors(e=>e.ansi[t.index]=H.toColor(...t.color));else{let n=e;this._themeService.modifyColors(e=>e[n]=H.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(vl,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(L.ESC+`[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(L.ESC+`[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this._register(F(this.element,`copy`,e=>{this.hasSelection()&&Wt(e,this._selectionService)}));let e=e=>Gt(e,this.textarea,this.coreService,this.optionsService);this._register(F(this.textarea,`paste`,e)),this._register(F(this.element,`paste`,e)),Wo?this._register(F(this.element,`mousedown`,e=>{e.button===2&&Jt(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(F(this.element,`contextmenu`,e=>{Jt(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Qo&&this._register(F(this.element,`auxclick`,e=>{e.button===1&&qt(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(F(this.textarea,`keyup`,e=>this._keyUp(e),!0)),this._register(F(this.textarea,`keydown`,e=>this._keyDown(e),!0)),this._register(F(this.textarea,`keypress`,e=>this._keyPress(e),!0)),this._register(F(this.textarea,`compositionstart`,()=>this._compositionHelper.compositionstart())),this._register(F(this.textarea,`compositionupdate`,e=>this._compositionHelper.compositionupdate(e))),this._register(F(this.textarea,`compositionend`,()=>this._compositionHelper.compositionend())),this._register(F(this.textarea,`input`,e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(`div`),this.element.dir=`ltr`,this.element.classList.add(`terminal`),this.element.classList.add(`xterm`),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this._register(F(this.screenElement,`mousemove`,e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement(`textarea`);this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,zt.get()),$o||this.textarea.setAttribute(`aria-multiline`,`false`),this.textarea.setAttribute(`autocorrect`,`off`),this.textarea.setAttribute(`autocapitalize`,`off`),this.textarea.setAttribute(`spellcheck`,`false`),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange(`disableStdin`,()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(No,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<`u`?window.document:null)),this._instantiationService.setService(Cn,this._coreBrowserService),this._register(F(this.textarea,`focus`,e=>this._handleTextAreaFocus(e))),this._register(F(this.textarea,`blur`,()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(ko,this._document,this._helperContainer),this._instantiationService.setService(Sn,this._charSizeService),this._themeService=this._instantiationService.createInstance(Is),this._instantiationService.setService(On,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(lo),this._instantiationService.setService(Dn,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(as,this.rows,this.screenElement)),this._instantiationService.setService(Tn,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(no,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Ro),this._instantiationService.setService(wn,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(yl,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(qa,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Ds,this.element,this.screenElement,r)),this._instantiationService.setService(En,this._selectionService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(dr.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(Ja,this.screenElement)),this._register(F(this.element,`mousedown`,e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(vl,this)),this._register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance($a,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`overviewRuler`,e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance($a,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Oo,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(t){let n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=t.buttons&1?0:t.buttons&4?1:t.buttons&2?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(e._customWheelEventHandler&&e._customWheelEventHandler(t)===!1)return!1;let n=t.deltaY;if(n===0||e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;i=n<0?0:1,r=4;break;default:return!1}return i===void 0||r===void 0||r>4?!1:e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.removeEventListener(`mousemove`,r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this._register(this.coreMouseService.onProtocolChange(e=>{e?(this.optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this.coreMouseService.explainEvents(e)),this.element.classList.add(`enable-mouse-events`),this._selectionService.disable()):(this._logService.debug(`Unbinding from mouse events.`),this.element.classList.remove(`enable-mouse-events`),this._selectionService.enable()),e&8?r.mousemove||=(t.addEventListener(`mousemove`,i.mousemove),i.mousemove):(t.removeEventListener(`mousemove`,r.mousemove),r.mousemove=null),e&16?r.wheel||=(t.addEventListener(`wheel`,i.wheel,{passive:!1}),i.wheel):(t.removeEventListener(`wheel`,r.wheel),r.wheel=null),e&2?r.mouseup||=i.mouseup:(this._document.removeEventListener(`mouseup`,r.mouseup),r.mouseup=null),e&4?r.mousedrag||=i.mousedrag:(this._document.removeEventListener(`mousemove`,r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(F(t,`mousedown`,e=>{if(e.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(e)))return n(e),r.mouseup&&this._document.addEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.addEventListener(`mousemove`,r.mousedrag),this.cancel(e)})),this._register(F(t,`wheel`,t=>{if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(t)===!1)return!1;if(!this.buffer.hasScrollback){if(t.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(t,!0);let n=L.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(t.deltaY<0?`A`:`B`);return this.coreService.triggerDataEvent(n,!0),this.cancel(t,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(`column-select`):this.element.classList.remove(`column-select`)}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Kt(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key===`Dead`||e.key===`AltGraph`)&&(this._unprocessedDeadKey=!0);let n=ll(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===L.ETX||n.key===L.CR)&&(this.textarea.value=``),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Sl(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new rn)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},Tl=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new wl(t)}getNullCell(){return new rn}},El=class extends M{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new P),this.onBufferChange=this._onBufferChange.event,this._normal=new Tl(this._core.buffers.normal,`normal`),this._alternate=new Tl(this._core.buffers.alt,`alternate`),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error(`Active buffer is neither normal nor alternate`)}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Dl=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Ol=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},kl=[`cols`,`rows`],Al=0,jl=class extends M{constructor(e){super(),this._core=this._register(new xl(e)),this._addonManager=this._register(new Cl),this._publicOptions={...this._core.options};let t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(let e in this._core.options){let r={get:t.bind(this,e),set:n.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(kl.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error(`You must set the allowProposedApi option to true to use proposed API`)}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||=new Dl(this._core),this._parser}get unicode(){return this._checkProposedApi(),new Ol(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||=this._register(new El(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t=`none`;switch(this._core.coreMouseService.activeProtocol){case`X10`:t=`x10`;break;case`VT200`:t=`vt200`;break;case`DRAG`:t=`drag`;break;case`ANY`:t=`any`;break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r +`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return zt.get()},set promptLabel(e){zt.set(e)},get tooMuchOutput(){return Vt.get()},set tooMuchOutput(e){Vt.set(e)}}}_verifyIntegers(...e){for(Al of e)if(Al===1/0||isNaN(Al)||Al%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(Al of e)if(Al&&(Al===1/0||isNaN(Al)||Al%1!=0||Al<0))throw Error(`This API only accepts positive integers`)}};function Q(e,t){return e.getPropertyValue(`--ui-term-${t}`).trim()}function Ml(e=document.documentElement,t=!1){let n=getComputedStyle(e);return{background:t?`#00000000`:Q(n,`bg`),foreground:Q(n,`fg`),cursor:Q(n,`cursor`),cursorAccent:Q(n,`bg`),selectionBackground:Q(n,`selection`),black:Q(n,`black`),red:Q(n,`red`),green:Q(n,`green`),yellow:Q(n,`yellow`),blue:Q(n,`blue`),magenta:Q(n,`magenta`),cyan:Q(n,`cyan`),white:Q(n,`white`),brightBlack:Q(n,`bright-black`),brightRed:Q(n,`bright-red`),brightGreen:Q(n,`bright-green`),brightYellow:Q(n,`bright-yellow`),brightBlue:Q(n,`bright-blue`),brightMagenta:Q(n,`bright-magenta`),brightCyan:Q(n,`bright-cyan`),brightWhite:Q(n,`bright-white`)}}function Nl(e,t){return e===229&&!t}function Pl({container:e,textarea:t}){let n=!1,r=()=>{n=!0},i=()=>{n=!1},a=e=>{Nl(e.keyCode,n)&&e.stopPropagation()};return t.addEventListener(`compositionstart`,r,!0),t.addEventListener(`compositionend`,i,!0),e.addEventListener(`keydown`,a,!0),()=>{t.removeEventListener(`compositionstart`,r,!0),t.removeEventListener(`compositionend`,i,!0),e.removeEventListener(`keydown`,a,!0)}}var Fl=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/g;function Il(e,t=200,n=65536){if(t<=0||n<=0)return``;let r=Math.max(0,e.length-t),i=[];for(let t=r;t0?i[i.length-1]+=r:i.push(r)}for(;i.at(-1)===``;)i.pop();let a=i.join(` `);return a.length<=n?a:a.slice(a.length-n)}function Ll(e,t,n){let r=[];for(let i=0;i{let e=t.getBoundingClientRect(),n=r?.getBoundingClientRect();return[e.width,e.height,n?.width,n?.height].join(`:`)},a=i(),o=null,s=new ResizeObserver(()=>{o!==null||i()===a||(o=window.requestAnimationFrame(()=>{o=null,i()!==a&&(n(),a=i())}))});return s.observe(t),r!==null&&s.observe(r),()=>{s.disconnect(),o!==null&&window.cancelAnimationFrame(o)}}function Bl(e,t){return t<=0?0:e/t}function Vl(e){let t=Rl(e),n=e.element?.querySelector(`.xterm-rows`)??null;if(t===null||e.rows<=0)return null;let r=t.getBoundingClientRect();if(r.width<=0||r.height<=0)return null;let i=getComputedStyle(n??t),a=n===null?e.options:void 0;return{rect:r,cellHeight:Bl(r.height,e.rows),font:{family:a?.fontFamily??i.fontFamily,size:a?.fontSize===void 0?i.fontSize:`${a.fontSize}px`,weight:a?.fontWeight===void 0?i.fontWeight:String(a.fontWeight),letterSpacing:a?.letterSpacing===void 0?i.letterSpacing:`${a.letterSpacing}px`}}}function Hl(e){let t=e.textarea,n=Vl(e);if(t===void 0||n===null||e.cols<=0)return;let r=e.buffer.active;t.style.top=`${Math.max(0,Math.min(e.rows-1,r.cursorY))*n.cellHeight}px`,t.style.left=`${Math.max(0,Math.min(e.cols-1,r.cursorX))*n.rect.width/e.cols}px`}function Ul(e,t){return Bl((Rl(e)??t).getBoundingClientRect().height,e.rows)}var Wl=`sshc-select-overlay`,Gl=8,Kl=400;function ql(e){let t=e.ownerDocument.getSelection();return t===null||t.isCollapsed?!1:e.contains(t.anchorNode)}function Jl(e,t){let n=e.ownerDocument.createElement(`pre`);n.className=`${Wl} absolute m-0 select-text overflow-hidden whitespace-pre text-transparent`,n.setAttribute(`aria-hidden`,`true`),n.dir=`ltr`,n.style.zIndex=`6`,e.appendChild(n);let r=``,i=()=>{if(t.rows<=0||t.cols<=0)return;let i=Vl(t),a=e.getBoundingClientRect(),o=i===null?r:`${i.rect.left-a.left} ${i.rect.top-a.top} ${i.rect.width} ${i.rect.height}`,s=o!==r,c=ql(n);s&&c&&n.ownerDocument.getSelection()?.removeAllRanges(),(s||!c)&&(n.textContent=Ll(t.buffer.active,t.rows,t.cols)),!(i===null||!s)&&(r=o,n.style.left=`${i.rect.left-a.left}px`,n.style.top=`${i.rect.top-a.top}px`,n.style.width=`${i.rect.width}px`,n.style.height=`${i.rect.height}px`,n.style.lineHeight=`${i.cellHeight}px`,n.style.fontFamily=i.font.family,n.style.fontSize=i.font.size,n.style.fontWeight=i.font.weight,n.style.letterSpacing=i.font.letterSpacing,n.style.fontKerning=`none`)},a=0,o=0,s=0,c=!1,l=!1,u=!1,d=e=>{let t=e.touches[0];l=e.touches.length===1&&t!==void 0,a=Date.now(),o=t?.clientX??0,s=t?.clientY??0,c=!1,u=ql(n)},f=e=>{let t=e.touches[0];e.touches.length!==1&&(l=!1),t!==void 0&&Math.hypot((t.clientX??0)-o,t.clientY-s)>Gl&&(c=!0)},p=()=>{let e=l&&!c&&Date.now()-a{l=!1},h=e=>e.preventDefault();e.addEventListener(`touchstart`,d,{passive:!0}),e.addEventListener(`touchmove`,f,{passive:!0}),e.addEventListener(`touchend`,p,{passive:!0}),e.addEventListener(`touchcancel`,m,{passive:!0}),e.addEventListener(`mousedown`,h);let g=t.onRender(i);return i(),()=>{g.dispose(),e.removeEventListener(`touchstart`,d),e.removeEventListener(`touchmove`,f),e.removeEventListener(`touchend`,p),e.removeEventListener(`touchcancel`,m),e.removeEventListener(`mousedown`,h),n.remove()}}function Yl(e){return e(`(hover: none) and (pointer: coarse)`).matches}function Xl(e,t,n={}){let r=n.now??(()=>performance.now()),i=n.requestFrame??(e=>requestAnimationFrame(e)),a=n.cancelFrame??(e=>cancelAnimationFrame(e)),o=n.canScroll??(()=>!0),s=0,c=0,l=0,u=0,d=!1,f=null,p=()=>{f!==null&&a(f),f=null,d=!1,u=0,l=0},m=n=>{let r=t();if(r<=0)return 0;l+=n/r;let i=Math.trunc(l);return i!==0&&(l-=i,e.scrollLines(i)),i},h=()=>{if(f=null,!o()||n.reducedMotion?.()===!0){p();return}let e=r(),t=e-c;if(t>100||t<0){p();return}c=e,m(u*t),u*=Math.exp(-t/180),Math.abs(u)>=.02&&(f=i(h))};return{start(e){p(),d=o(),s=e,c=r()},move(e){if(!d||!o())return p(),0;let t=r(),n=t-c,i=s-e;if(n>0){let e=Math.max(-3,Math.min(3,i/Math.max(8,n)));u=n>100||u*e<=0?e:u*.4+e*.6}return s=e,c=t,m(i)},end(){if(d){if(d=!1,!o()||n.reducedMotion?.()===!0||r()-c>80||Math.abs(u)<.1){p();return}c=r(),f=i(h)}},cancel:p}}function Zl(e,t,n,r){let i=Xl(t,n,{...r,canScroll:()=>!r.selectionHeld()}),a=e=>e.touches.length===1?e.touches[0]??null:null,o=e=>{let t=a(e);t===null?i.cancel():i.start(t.clientY)},s=e=>{let t=a(e);t===null?i.cancel():i.move(t.clientY)},c=()=>i.end(),l=()=>{r.selectionHeld()&&i.cancel()};return e.addEventListener(`touchstart`,o,{passive:!0}),e.addEventListener(`touchmove`,s,{passive:!0}),e.addEventListener(`touchend`,c,{passive:!0}),e.addEventListener(`touchcancel`,i.cancel,{passive:!0}),e.ownerDocument.addEventListener(`selectionchange`,l),()=>{e.removeEventListener(`touchstart`,o),e.removeEventListener(`touchmove`,s),e.removeEventListener(`touchend`,c),e.removeEventListener(`touchcancel`,i.cancel),e.ownerDocument.removeEventListener(`selectionchange`,l),i.cancel()}}var $=t(),Ql={Esc:`\x1B`,Tab:` `,"↑":`\x1B[A`,"↓":`\x1B[B`,"→":`\x1B[C`,"←":`\x1B[D`};function $l(e,t,n){if(e.length!==1)return e;let r=e;if(t){let t=e.toLowerCase().charCodeAt(0);t>=97&&t<=122&&(r=String.fromCharCode(t-96))}return n?`\x1B`+r:r}function eu(e,t,n){let r=Ql[e];return r===void 0?$l(e,t,n):n?`\x1B`+r:r}var tu=[`Esc`,`Tab`,`←`,`↑`,`↓`,`→`],nu=[`|`,`-`,`~`,`/`],ru=`min-h-11 min-w-0 rounded border border-control-line font-mono text-sm text-ink active:bg-select-fill focus-visible:outline-2 focus-visible:outline-accent`;function iu(e){e.preventDefault()}function au({modifiers:e,onToggle:t,onKey:n}){let r=s(),i=ae(oe),[a,o]=(0,O.useState)(!1),c=(0,O.useRef)(null);if(b({open:i&&a,containerRefs:[c],onDismiss:()=>o(!1)}),!i)return null;let l=e=>{n(e),o(!1)};return(0,$.jsxs)(`div`,{ref:c,"aria-label":r(`terminal.keyBar`),className:`relative grid shrink-0 grid-cols-8 border-t border-line bg-toolbar px-1`,children:[(0,$.jsx)(`button`,{type:`button`,"data-touch-compact":!0,"aria-pressed":e.ctrl,onPointerDown:iu,onMouseDown:iu,onClick:()=>t(`ctrl`),className:`${ru} ${e.ctrl?`bg-select-fill`:`bg-card`}`,children:`Ctrl`}),tu.map(e=>(0,$.jsx)(`button`,{type:`button`,"data-touch-compact":!0,onPointerDown:iu,onMouseDown:iu,onClick:()=>l(e),className:`${ru} bg-card`,children:e},e)),(0,$.jsx)(`button`,{type:`button`,"data-touch-compact":!0,"aria-label":r(`terminal.extraKeys`),title:r(`terminal.extraKeys`),"aria-expanded":a,onPointerDown:iu,onMouseDown:iu,onClick:()=>o(e=>!e),className:`${ru} ${a||e.alt?`bg-select-fill`:`bg-card`}`,children:e.alt?`Alt`:`…`}),a?(0,$.jsxs)(`div`,{className:`absolute inset-x-1 bottom-full z-30 mb-1 grid grid-cols-5 gap-1 rounded border border-line bg-toolbar p-1 shadow-lg`,children:[(0,$.jsx)(`button`,{type:`button`,"aria-pressed":e.alt,onPointerDown:iu,onMouseDown:iu,onClick:()=>{t(`alt`),o(!1)},className:`${ru} ${e.alt?`bg-select-fill`:`bg-card`}`,children:`Alt`}),nu.map(e=>(0,$.jsx)(`button`,{type:`button`,onPointerDown:iu,onMouseDown:iu,onClick:()=>l(e),className:`${ru} bg-card`,children:e},e))]}):null]})}var ou=64*1024;function su(e,t=window.location){return`${t.protocol===`https:`?`wss:`:`ws:`}//${t.host}/terminal/stream?ticket=${encodeURIComponent(e)}`}function cu(e,t){let n=new WebSocket(su(e));n.binaryType=`arraybuffer`;let r=new TextEncoder,i=!1,a=[];n.addEventListener(`open`,()=>{let e=a??[];a=null;for(let t of e)n.send(t)});let o=e=>{if(a!==null){a.push(e);return}n.readyState===WebSocket.OPEN&&n.send(e)};n.addEventListener(`message`,e=>{if(e.data instanceof ArrayBuffer){t.onOutput(new Uint8Array(e.data));return}if(typeof e.data==`string`)try{let n=JSON.parse(e.data),r=n.replay;if(lu(r)){t.onReplay(r);return}let a=n.exit;if(a===void 0)return;i=!0,t.onExit({code:a.code,signal:a.signal})}catch{return}});let s=()=>{i||(i=!0,t.onClose())};return n.addEventListener(`close`,s),n.addEventListener(`error`,s),{send(e){let t=r.encode(e);for(let e=0;e=0&&t.start<=t.next&&t.next<=t.end}function uu(e,t){let n=e.replace(/\r?\n/g,`\r`);return t?`\u001b[200~${n}\u001b[201~`:n}function du({container:e,terminal:t,paste:n=e=>t.paste(e),clipboard:r,coarsePointer:i=()=>!1,settings:a,refuse:o,enhancedKey:s,sendEnhancedKey:c}){let l=!0,u=()=>{if(!t.hasSelection())return;let e=t.getSelection();e!==``&&r.writeText(e).catch(o)},d=()=>{r.readText().then(e=>{l&&e!==``&&n(e)}).catch(()=>{l&&o()})};t.attachCustomKeyEventHandler(e=>{if(e.type!==`keydown`)return!0;if(C(e,`copy`)&&t.hasSelection())return e.preventDefault(),u(),!1;if(C(e,`paste`))return!e.altKey&&(e.metaKey&&!e.ctrlKey&&!e.shiftKey||e.ctrlKey&&!e.metaKey)&&e.key.toLowerCase()===`v`||(e.preventDefault(),e.repeat||d()),!1;let n=s?.(e)??null;return n===null?!0:(c?.(n),!1)});let f=t.onSelectionChange(()=>{a().copyOnSelect&&u()}),p=e=>{let t=e.clipboardData?.getData(`text/plain`);t!==void 0&&(e.preventDefault(),e.stopImmediatePropagation(),t!==``&&n(t))},m=e=>{i()||a().rightClickPaste&&(e.preventDefault(),d())};return e.addEventListener(`paste`,p,{capture:!0}),e.addEventListener(`contextmenu`,m),()=>{l=!1,f.dispose(),e.removeEventListener(`paste`,p,{capture:!0}),e.removeEventListener(`contextmenu`,m)}}var fu=256*1024,pu=/^[A-Za-z0-9+/]*={0,2}$/;function mu(e,t=fu){let n=e.indexOf(`;`);if(n<0)return null;let r=e.slice(0,n),i=e.slice(n+1);if(r!==``&&r!==`c`||i===`?`||i.length>Math.ceil(t/3)*4||!pu.test(i)||i.length%4==1)return null;let a=(4-i.length%4)%4;try{let e=atob(i+`=`.repeat(a));if(e.length>t)return null;let n=Uint8Array.from(e,e=>e.charCodeAt(0));return new TextDecoder().decode(n)}catch{return null}}function hu({parser:e,enabled:t,writeText:n,copied:r,refused:i}){let a=e.registerOscHandler(52,e=>{if(!t())return!0;let a=mu(e);return a===null||n(a).then(r).catch(i),!0});return()=>a.dispose()}var gu=64,_u={ArrowUp:{final:`A`},ArrowDown:{final:`B`},ArrowRight:{final:`C`},ArrowLeft:{final:`D`},Home:{final:`H`},End:{final:`F`},Insert:{final:`~`,prefix:2},Delete:{final:`~`,prefix:3},PageUp:{final:`~`,prefix:5},PageDown:{final:`~`,prefix:6},Enter:{code:13},Tab:{code:9},Backspace:{code:127},Escape:{code:27}};function vu(e){return 1+ +!!e.shiftKey+(e.altKey?2:0)+(e.ctrlKey?4:0)}function yu(e,t){return!t||e.type!==`keydown`||e.isComposing||e.code!==`IntlYen`||e.ctrlKey||e.altKey||e.metaKey?null:e.shiftKey?`|`:`\\`}function bu(e,t){let n=e[0]??t;return typeof n==`number`&&Number.isSafeInteger(n)&&n>=0?n:null}function xu(e){let t=0,n=[],r=[e.registerCsiHandler({prefix:`>`,final:`u`},e=>{let r=bu(e,0);return r===null?!0:(n.length===gu&&n.shift(),n.push(t),t=r,!0)}),e.registerCsiHandler({prefix:`=`,final:`u`},e=>{let n=bu(e,0);return n!==null&&(t=n),!0}),e.registerCsiHandler({prefix:`<`,final:`u`},e=>{let r=Math.max(1,bu(e,1)??1),i=Math.min(r,n.length);for(let e=0;ei&&(t=0),!0})];return{encode(e){if(t===0||e.type!==`keydown`||e.isComposing||e.metaKey)return null;let n=_u[e.key];if(n===void 0){if(!(e.ctrlKey||e.altKey)||e.key.length!==1)return null;let t=e.key.codePointAt(0);return t===void 0?null:`\u001b[${t};${vu(e)}u`}if(!e.shiftKey&&!e.altKey&&!e.ctrlKey)return null;let r=vu(e);return n.code===void 0?`\u001b[${n.prefix??1};${r}${n.final}`:`\u001b[${n.code};${r}u`},reset(){t=0,n.length=0},dispose(){for(let e of r)e.dispose()}}}function Su(e,{remote:t,open:n,select:r}){return e.registerLinkProvider({provideLinks:(i,a)=>{let o=S(e.buffer.active.getLine(i-1)?.translateToString(!0)??``,t);a(o.length===0?void 0:o.map(e=>({text:e.text,range:{start:{x:e.start+1,y:i},end:{x:e.end,y:i}},activate:t=>{if(e.kind===`url`&&ee(t)){n(e.target);return}r(e,t)}})))}})}var Cu=w();function wu(e){if(!v(e))return!1;let t=new URL(e),n=window.open(t.href,`_blank`,`noopener,noreferrer`);return n!==null&&(n.opener=null),n!==null}function Tu({selection:e,onClose:t,onRemotePath:n}){let r=s(),i=(0,O.useRef)(null);b({open:!0,containerRefs:[i],onDismiss:t});function a(){f.writeText(e.link.target).finally(t)}function o(){e.link.kind===`url`&&(wu(e.link.target),t())}function c(r){e.link.kind!==`remote-path`||n===void 0||(n(e.link.target,r),t())}return(0,Cu.createPortal)((0,$.jsxs)(`div`,{ref:i,role:`dialog`,"aria-label":r(`terminal.linkActions`),style:{left:Math.min(e.x,Math.max(8,window.innerWidth-260)),top:Math.min(e.y,Math.max(8,window.innerHeight-220))},className:`fixed z-[80] w-64 rounded-md border border-control-line bg-card p-2 shadow-2xl`,children:[(0,$.jsx)(`p`,{className:`truncate px-2 py-1 font-mono text-xs text-ink-muted`,title:e.link.target,children:e.link.target}),(0,$.jsxs)(`div`,{className:`mt-1 grid gap-1`,children:[e.link.kind===`url`?(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:o,children:r(`terminal.linkOpenBrowser`)}):n===void 0?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:()=>c(`browse`),children:r(`terminal.linkBrowseSFTP`)}),(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:()=>c(`edit`),children:r(`terminal.linkEditSFTP`)}),(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:()=>c(`download`),children:r(`terminal.linkDownloadSFTP`)})]}),(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:a,children:r(`terminal.linkCopy`)})]})]}),document.body)}function Eu({session:e,onClose:t,initialCommand:r=``,returnFocusRef:i}){let a=s(),o=(0,O.useRef)(null),[c,l]=(0,O.useState)([]),[u,d]=(0,O.useState)(``),[p,m]=(0,O.useState)({}),[h,g]=(0,O.useState)(null),[_,v]=(0,O.useState)(!0),[ee,y]=(0,O.useState)(``),[ne,re]=(0,O.useState)(!1),[ie,ae]=(0,O.useState)(``),[x,oe]=(0,O.useState)(!1),S=(0,O.useMemo)(()=>c.find(e=>e.id===u)??null,[u,c]);(0,O.useEffect)(()=>{let e=!0;return le.library().then(t=>{e&&(l(t.snippets),d(t.snippets[0]?.id??``))}).catch(t=>e&&y(n(t)||`snippet_failed`)).finally(()=>e&&v(!1)),()=>{e=!1}},[]),b({open:!0,containerRefs:[o],onDismiss:t,...i===void 0?{}:{returnFocusRef:i}}),(0,O.useEffect)(()=>{g(null)},[e.id,e.startedAt,e.state]);function C(e=p){m(e),g(null),y(``)}async function se(){let e=ie.trim(),t=r;if(!(e===``||t.trim()===``||_)){v(!0),y(``);try{let n=await le.create({name:e,command:t,description:``,variables:[]});l(e=>[n,...e]),d(n.id),re(!1),ae(``),oe(!0)}catch(e){y(n(e)||`snippet_failed`)}finally{v(!1)}}}async function w(){if(!(S===null||_)){v(!0),y(``);try{let t={snippetId:S.id,inputs:p,targets:[{targetId:e.id,sessionId:e.id}]},n=await E.preview({...t,issueAction:!1}),r=n.targets.find(t=>t.sessionId===e.id)??n.targets[0];if(r===void 0||r.command===``)throw Error(`invalid_response`);g({command:r.command,preview:n,request:t})}catch(e){y(n(e)||(e instanceof Error?e.message:`terminal_command_failed`)),g(null)}finally{v(!1)}}}async function T(){if(h===null)return;let e=h;v(!0);try{await f.writeText(await ce()),t()}catch(t){n(t)===`terminal_command_preview_changed`?await D(t,e):y(a(`terminal.clipboardRefused`))}finally{v(!1)}}async function ce(){if(h===null)throw Error(`invalid_response`);let t=await E.preview({...h.request,revealCommand:!0,issueAction:!1,expectedReviewEvidence:h.preview.reviewEvidence}),n=t.targets.find(t=>t.sessionId===e.id)??t.targets[0];if(n===void 0||n.command===``)throw Error(`invalid_response`);return n.command}async function ue(){if(h===null)return;let e=h;v(!0),y(``);try{let n=await E.preview({...e.request,issueAction:!0,submit:!1,expectedReviewEvidence:e.preview.reviewEvidence});await E.dispatch(n,e.request,!1),t()}catch(t){await D(t,e)}finally{v(!1)}}async function de(){if(h===null)return;let e=h;v(!0),y(``);try{let n=await E.preview({...e.request,issueAction:!0,submit:!0,expectedReviewEvidence:e.preview.reviewEvidence});await E.dispatch(n,e.request,!0),t()}catch(t){await D(t,e)}finally{v(!1)}}async function D(t,r){let i=n(t);if(i!==`terminal_command_preview_changed`){y(i===`terminal_command_insert_unsafe`?a(`terminal.quickCommandInsertUnsafe`):i||`terminal_command_failed`);return}try{let t=await E.preview({...r.request,issueAction:!1}),n=t.targets.find(t=>t.sessionId===e.id)??t.targets[0];if(n===void 0||n.command===``)throw Error(`invalid_response`);g({command:n.command,preview:t,request:r.request}),y(a(`terminal.quickCommandChanged`))}catch(e){g(null),y(n(e)||`terminal_command_failed`)}}return(0,$.jsxs)(`div`,{ref:o,role:`dialog`,"aria-label":a(`terminal.quickCommands`),className:`absolute right-2 top-11 z-30 flex max-h-[min(32rem,75vh)] w-[min(24rem,calc(100vw-1rem))] flex-col gap-3 overflow-auto rounded-md border border-control-line bg-card p-3 shadow-2xl`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`h3`,{className:`grow text-sm font-semibold`,children:a(`terminal.quickCommands`)}),(0,$.jsx)(`button`,{type:`button`,"aria-label":a(`terminal.quickCommandsClose`),className:`rounded px-2 text-ink-muted hover:bg-select-fill`,onClick:t,children:`×`})]}),ee===``?null:(0,$.jsx)(`p`,{role:`alert`,className:`rounded bg-notice px-2 py-1.5 text-xs text-notice-ink`,children:ee}),x?(0,$.jsx)(`p`,{role:`status`,className:`rounded bg-notice px-2 py-1.5 text-xs text-notice-ink`,children:a(`terminal.quickCommandSaved`)}):null,r.trim()===``?null:ne?(0,$.jsxs)(`div`,{className:`grid gap-2 rounded border border-line p-2`,children:[(0,$.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[a(`terminal.quickCommandName`),(0,$.jsx)(`input`,{autoFocus:!0,value:ie,onChange:e=>ae(e.target.value),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`})]}),(0,$.jsx)(`pre`,{className:`max-h-24 overflow-auto whitespace-pre-wrap rounded bg-code-bg p-2 text-xs text-code-fg`,children:r}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,disabled:_||ie.trim()===``,onClick:()=>void se(),className:`min-h-8 rounded bg-accent px-3 py-1 text-sm font-medium text-accent-contrast disabled:opacity-50`,children:a(`terminal.quickCommandSave`)}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>re(!1),className:`min-h-8 rounded border border-control-line px-3 py-1 text-sm hover:bg-select-fill`,children:a(`snippets.cancel`)})]})]}):(0,$.jsx)(`button`,{type:`button`,className:`min-h-8 self-start rounded border border-control-line px-3 py-1 text-sm hover:bg-select-fill`,onClick:()=>re(!0),children:a(`terminal.quickCommandSaveSelection`)}),_&&c.length===0?(0,$.jsx)(`p`,{className:`text-xs text-ink-muted`,children:a(`palette.loading`)}):c.length===0?(0,$.jsx)(`p`,{className:`text-xs text-ink-muted`,children:a(`snippets.empty`)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[a(`workspace.savedSnippet`),(0,$.jsx)(`select`,{value:u,onChange:e=>{d(e.target.value),C({})},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`,children:c.map(e=>(0,$.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),S?.description?(0,$.jsx)(`p`,{className:`text-xs text-ink-muted`,children:S.description}):null,S?.variables.map(e=>(0,$.jsxs)(`div`,{className:`text-xs text-ink-muted`,children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`code`,{children:`{{${e.name}}}`}),e.description?` · ${e.description}`:``]}),e.type===`boolean`?(0,$.jsxs)(`select`,{"aria-label":e.name,value:p[e.name]??``,onChange:t=>C({...p,[e.name]:t.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`,children:[(0,$.jsx)(`option`,{value:``,children:e.default===void 0?``:`${a(`workspace.useDefault`)} (${e.default})`}),(0,$.jsx)(`option`,{value:`true`,children:`true`}),(0,$.jsx)(`option`,{value:`false`,children:`false`})]}):e.type===`secret`?(0,$.jsx)(te,{label:e.name,value:p[e.name]??``,placeholder:e.default===void 0?``:`${a(`workspace.useDefault`)}: ${e.default}`,onChange:t=>C({...p,[e.name]:t}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`}):(0,$.jsx)(`input`,{type:e.type===`integer`?`number`:`text`,"aria-label":e.name,value:p[e.name]??``,placeholder:e.default===void 0?``:`${a(`workspace.useDefault`)}: ${e.default}`,onChange:t=>C({...p,[e.name]:t.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`})]},e.name)),h===null?(0,$.jsx)(`button`,{type:`button`,disabled:_||S===null,onClick:()=>void w(),className:`min-h-8 self-start rounded border border-control-line bg-control px-3 py-1 text-sm font-medium hover:bg-select-fill disabled:opacity-50`,children:a(`snippets.preview`)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`pre`,{className:`max-h-32 overflow-auto whitespace-pre-wrap rounded bg-code-bg p-2 text-xs text-code-fg`,children:h.command}),(0,$.jsx)(`p`,{className:`text-[11px] leading-4 text-ink-muted`,children:a(`terminal.quickCommandContextWarning`)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,disabled:_,onClick:()=>void ue(),className:`min-h-8 rounded border border-control-line bg-control px-3 py-1 text-sm hover:bg-select-fill disabled:opacity-50`,children:a(`terminal.quickCommandInsert`)}),(0,$.jsx)(`button`,{type:`button`,disabled:_,onClick:()=>void de(),className:`min-h-8 rounded bg-accent px-3 py-1 text-sm font-medium text-accent-contrast disabled:opacity-50`,children:a(`terminal.quickCommandRun`)}),(0,$.jsx)(`button`,{type:`button`,disabled:_,onClick:()=>void T(),className:`min-h-8 rounded border border-control-line px-3 py-1 text-sm hover:bg-select-fill disabled:opacity-50`,children:a(`terminal.quickCommandCopy`)})]})]})]})]})}function Du({osc52Enabled:e,onQuickCommands:t,onPortForwarding:n,onOpenRemoteDirectory:r,onCopyContext:i,onToggleOsc52:a,onClose:o,triggerRef:c}){let l=s(),u=(0,O.useRef)(null);b({open:!0,containerRefs:c===void 0?[u]:[u,c],onDismiss:o,...c===void 0?{}:{returnFocusRef:c}}),g({open:!0,menuRef:u,onClose:o});let d=e=>()=>{e(),o()};return(0,$.jsxs)(`div`,{ref:u,role:`menu`,"aria-label":l(`terminal.moreActions`),className:`absolute right-2 top-[calc(100%-0.25rem)] z-40 w-64 rounded-md border border-control-line bg-card p-1.5 shadow-2xl`,children:[(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,onClick:d(t),children:l(`terminal.quickCommands`)}),n===void 0?null:(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,onClick:d(n),children:l(`terminal.portForwarding`)}),r===void 0?null:(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,onClick:d(r),children:l(`terminal.openDirectoryInSFTP`)}),(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,title:l(`terminal.copyContextHint`),onClick:d(i),children:l(`terminal.copyContext`)}),(0,$.jsxs)(`button`,{type:`button`,role:`menuitemcheckbox`,"aria-checked":e,className:`flex min-h-10 w-full items-center justify-between gap-3 rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,title:l(`terminal.osc52Hint`),onClick:d(a),children:[(0,$.jsx)(`span`,{children:`OSC 52`}),(0,$.jsx)(`span`,{"aria-hidden":`true`,className:e?`text-live`:`text-ink-faint`,children:e?`✓`:`—`})]})]})}function Ou({session:e,api:t=T,saveApi:n=se,onChanged:r,onClose:f}){let p=s(),[m,h]=(0,O.useState)(e.forwards??[]),[g,_]=(0,O.useState)(`local`),[v,ee]=(0,O.useState)(``),[y,te]=(0,O.useState)(``),[ne,ie]=(0,O.useState)(!1),[b,ae]=(0,O.useState)(!1),[x,oe]=(0,O.useState)(``),[S,C]=(0,O.useState)(``),[w,E]=(0,O.useState)(``);(0,O.useEffect)(()=>h(e.forwards??[]),[e.forwards]);let ce=e.state===`connected`,le=e.alias!==void 0&&e.alias!==``,ue=v===``||Pu(v)?``:p(`conn.forwardInvalidPort`),de=g===`dynamic`||y===``||Fu(y)?``:p(`conn.forwardInvalidDestination`),D=ce&&Pu(v)&&(g===`dynamic`||Fu(y)),fe=(0,O.useMemo)(()=>e.alias??e.title,[e.alias,e.title]);async function pe(){if(D){ae(!0),E(``),C(``);try{let i=(await t.startTerminalForward(e.id,{kind:g,listenPort:Number(v),...g===`local`?{destination:y}:{}})).sessions.find(t=>t.id===e.id);if(h(i?.forwards??[]),ne)try{await ku(g,v,y,e,n)}catch{E(p(`terminal.forwardSaveFailed`)),C(p(`terminal.forwardStarted`)),ee(``),te(``),await r?.();return}C(p(ne?`terminal.forwardStartedAndSaved`:`terminal.forwardStarted`)),ee(``),te(``),await r?.()}catch(e){E(Nu(p,e))}finally{ae(!1)}}}async function me(n){if(n.id!==``){oe(n.id),E(``),C(``);try{let i=(await t.stopTerminalForward(e.id,n.id)).sessions.find(t=>t.id===e.id);h(i?.forwards??[]),C(p(`terminal.forwardStopped`)),await r?.()}catch(e){E(Nu(p,e))}finally{oe(``)}}}return(0,$.jsxs)(re,{labelledBy:`terminal-forward-heading`,onDismiss:()=>{!b&&x===``&&f()},panelClassName:`flex max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-lg`,children:[(0,$.jsxs)(`header`,{className:`flex items-start gap-3 border-b border-line px-4 py-4 sm:px-5`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,$.jsx)(`h2`,{id:`terminal-forward-heading`,className:`text-base font-semibold text-ink`,children:p(`terminal.portForwarding`)}),(0,$.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`terminal.forwardDescription`,{title:fe})})]}),(0,$.jsx)(o,{disabled:b||x!==``,onClick:f,children:p(`terminal.forwardClose`)})]}),(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-5 overflow-y-auto p-4 sm:p-5`,children:[w===``?null:(0,$.jsx)(a,{tone:`danger`,children:w}),S===``?null:(0,$.jsx)(a,{children:S}),e.state===`reconnecting`?(0,$.jsx)(a,{children:p(`terminal.forwardPausedReconnect`)}):null,(0,$.jsxs)(`section`,{"aria-labelledby":`terminal-forward-active`,className:`flex flex-col gap-2`,children:[(0,$.jsx)(`h3`,{id:`terminal-forward-active`,className:`text-sm font-medium text-ink`,children:p(`terminal.forwardActive`)}),m.length===0?(0,$.jsx)(`p`,{className:u,children:p(`terminal.forwardNone`)}):(0,$.jsx)(i,{tone:`subtle`,children:m.map(e=>(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-hairline px-3 py-3 first:border-t-0 sm:flex-row sm:items-center`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`size-2 rounded-full ${e.problem===``?`bg-live`:`bg-danger`}`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:Au(p,e)}),(0,$.jsx)(`span`,{className:`rounded bg-tree px-1.5 py-0.5 text-[10px] text-ink-muted`,children:p(e.temporary?`terminal.forwardTemporary`:`terminal.forwardSaved`)})]}),(0,$.jsx)(`p`,{className:`mt-1 break-all font-mono text-xs text-ink-muted`,children:ju(e)}),e.temporary||e.kind===`agent`?null:(0,$.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`terminal.forwardSavedStopHint`)}),e.problem===``?null:(0,$.jsx)(`p`,{role:`alert`,className:`mt-1 break-all text-xs text-danger`,children:e.problem}),e.problem===``?null:(0,$.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`terminal.forwardRetryHint`)})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[e.kind===`agent`?null:(0,$.jsx)(o,{onClick:()=>void Mu(e,C,E,p),children:p(`terminal.forwardCopy`)}),e.kind===`agent`||e.id===``||e.problem!==``?null:(0,$.jsx)(o,{kind:`danger`,disabled:x!==``,onClick:()=>void me(e),children:x===e.id?p(`terminal.forwardStopping`):p(`terminal.forwardStop`)})]})]},e.id||`${e.kind}-${e.listen}-${e.to}`))})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`terminal-forward-new`,className:`flex flex-col gap-3 border-t border-line pt-4`,children:[(0,$.jsx)(`h3`,{id:`terminal-forward-new`,className:`text-sm font-medium text-ink`,children:p(`terminal.forwardNew`)}),(0,$.jsx)(a,{children:p(`conn.forwardLoopbackOnly`)}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(l,{label:p(`conn.forwardType`),children:(0,$.jsxs)(`select`,{className:c,value:g,disabled:!ce||b,onChange:e=>_(e.currentTarget.value),children:[(0,$.jsx)(`option`,{value:`local`,children:p(`conn.forwardLocal`)}),(0,$.jsx)(`option`,{value:`dynamic`,children:p(`conn.forwardDynamic`)})]})}),(0,$.jsx)(l,{label:p(`conn.forwardListenPort`),error:ue,children:(0,$.jsx)(`input`,{autoFocus:!0,inputMode:`numeric`,className:c,value:v,disabled:!ce||b,onChange:e=>ee(e.currentTarget.value)})}),g===`local`?(0,$.jsx)(`div`,{className:`sm:col-span-2`,children:(0,$.jsx)(l,{label:p(`conn.forwardDestination`),error:de,children:(0,$.jsx)(`input`,{"aria-label":p(`conn.forwardDestination`),className:c,placeholder:`127.0.0.1:5432`,value:y,disabled:!ce||b,onChange:e=>te(e.currentTarget.value)})})}):null]}),(0,$.jsx)(`p`,{className:u,children:p(g===`local`?`conn.forwardDestinationHint`:`conn.forwardDynamicHint`)}),(0,$.jsx)(d,{label:p(`terminal.forwardSaveConnection`),hint:p(le?`terminal.forwardSaveHint`:`terminal.forwardSaveUnavailable`),checked:ne,disabled:!le||b,onChange:ie}),ce?null:(0,$.jsx)(a,{children:p(`terminal.forwardNeedsConnection`)}),(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(o,{kind:`primary`,disabled:!D||b,onClick:()=>void pe(),children:p(b?`terminal.forwardStarting`:`terminal.forwardStart`)})})]})]})]})}async function ku(e,t,n,r,i){if(r.alias===void 0||r.alias===``)throw Error(`connection_not_saved`);let a=(await i.overview()).hosts.filter(e=>e.identity.alias===r.alias);if(a.length!==1)throw Error(`connection_not_unique`);let o=a[0]?.identity;if(o===void 0)throw Error(`connection_not_found`);let s=await i.host(o.path,o.alias);await i.save({kind:`host_fields`,path:o.path,alias:o.alias,base:s.file.contents,fields:[{action:`add`,keyword:e===`local`?`LocalForward`:`DynamicForward`,values:e===`local`?[t,n]:[t]}]})}function Au(e,t){return t.kind===`dynamic`?e(`conn.forwardDynamic`):t.kind===`agent`?e(`terminal.forwardAgentLabel`):e(`conn.forwardLocal`)}function ju(e){return e.kind===`dynamic`?`socks5://${e.listen}`:e.kind===`agent`?e.listen:`${e.listen} → ${e.to}`}async function Mu(e,t,n,r){try{await f.writeText(e.kind===`dynamic`?`socks5://${e.listen}`:e.listen),n(``),t(r(`terminal.forwardCopied`))}catch{t(``),n(r(`terminal.forwardCopyFailed`))}}function Nu(e,t){if(t instanceof r){if(t.code===`terminal_forward_bind_failed`&&t.problem?.detail)return e(`terminal.forwardBindFailed`,{detail:t.problem.detail});if(t.code===`terminal_forward_unavailable`)return e(`terminal.forwardUnavailable`);if(t.code===`invalid_terminal_forward`||t.code===`invalid_request`)return e(`terminal.forwardInvalid`)}return e(`terminal.forwardFailed`)}function Pu(e){let t=Number(e);return/^\d+$/.test(e)&&Number.isInteger(t)&&t>0&&t<=65535}function Fu(e){let t=/^\[[^\]]+\]:(\d+)$/.exec(e);if(t!==null)return Pu(t[1]??``);let n=e.lastIndexOf(`:`);return n<=0||e.slice(0,n).includes(`:`)?!1:Pu(e.slice(n+1))}function Iu(){if(typeof navigator<`u`&&/\bjsdom\b/iu.test(navigator.userAgent)||typeof WebGLRenderingContext>`u`&&typeof WebGL2RenderingContext>`u`)return!1;try{let e=document.createElement(`canvas`);return e.getContext(`webgl2`)!==null||e.getContext(`webgl`)!==null}catch{return!1}}async function Lu(e,{enabled:t=!0,backgroundImage:n=!1,supported:r=Iu,load:i=async()=>{let{WebglAddon:e}=await ce(async()=>{let{WebglAddon:e}=await import(`./addon-webgl-Dl1uOhWx.js`);return{WebglAddon:e}},[]);return new e}}={}){if(!t||n||!r())return null;let a;try{a=await i(),e.loadAddon(a)}catch{return null}let o=a.onContextLoss(()=>{o.dispose(),a.dispose()});return{dispose(){o.dispose(),a.dispose()}}}function Ru(e){try{let t=new URL(e);if(t.protocol!==`file:`||t.username!==``||t.password!==``||t.search!==``||t.hash!==``)return null;let n=decodeURIComponent(t.pathname);return!n.startsWith(`/`)||n.includes(`\0`)||n.includes(`\r`)||n.includes(` -`)?null:n}catch{return null}}function zu(e,t){return e.registerOscHandler(7,e=>{let n=Ru(e);return n===null?!1:(t(n),!0)})}function Bu(e,t){let n=t.now??Date.now,r=null;return e.registerOscHandler(133,e=>{let[i,a=``]=e.split(`;`,2);if(i===`C`)return r=n(),t.onCommandStarted?.(),!0;if(i===`D`){if(r!==null){let e=a===``?NaN:Number(a);t.onCommandCompleted?.({durationMilliseconds:Math.max(0,n()-r),exitCode:Number.isInteger(e)?e:null})}return r=null,!0}return i===`A`||i===`B`})}function Vu(e,t){let n=new Set,r=Bu(e.parser,{onCommandStarted:()=>{let t=e.registerMarker(),r=e.registerDecoration({marker:t,width:1,layer:`top`});r!==void 0&&(n.add(r),r.onRender(e=>e.classList.add(`sshc-command-marker`)),r.onDispose(()=>n.delete(r)))},onCommandCompleted:t});return{dispose(){r.dispose();for(let e of n)e.dispose()}}}function Hu(e,t){let n=e.fontSize!==t.fontSize;return e.cursorBlink=t.cursorBlink,e.fontSize=t.fontSize,e.scrollback=t.scrollback,{refit:n}}function Uu(e,t){if(!t.regex||e===``)return!0;try{return new RegExp(e,t.caseSensitive?`g`:`gi`),!0}catch{return!1}}var Wu={index:-1,total:0};function Gu({shortcutActive:e,region:t}){let n=(0,O.useRef)(null),[r,i]=(0,O.useState)(!1),[a,o]=(0,O.useState)(``),[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[p,m]=(0,O.useState)(Wu),h=(0,O.useRef)(``);h.current=a;let g=(0,O.useRef)({caseSensitive:!1,regex:!1});g.current={caseSensitive:s,regex:l};let _=(0,O.useRef)(()=>{}),v=(0,O.useRef)(()=>{}),ee=(0,O.useRef)(()=>{});(0,O.useEffect)(()=>{let r=r=>{(e??t.current?.contains(document.activeElement))&&(!C(r,`terminalSearch`)||x(r)||(r.preventDefault(),r.stopImmediatePropagation(),r.repeat||(i(!0),n.current?.focus(),n.current?.select())))};return window.addEventListener(`keydown`,r,!0),()=>window.removeEventListener(`keydown`,r,!0)},[e,t]),(0,O.useEffect)(()=>{r?v.current():ee.current()},[r,a,s,l]);let y=(0,O.useCallback)((e,t,n)=>{let r=t.onDidChangeResults(e=>{m({index:e.resultIndex,total:e.resultCount})}),i=e=>{let t=getComputedStyle(n),r=t.getPropertyValue(`--ui-term-yellow`).trim(),i=t.getPropertyValue(`--ui-term-bright-yellow`).trim();return{...g.current,incremental:e,decorations:{matchBackground:r,matchBorder:i,matchOverviewRuler:i,activeMatchBackground:i,activeMatchBorder:r,activeMatchColorOverviewRuler:r}}},a=()=>{t.clearDecorations(),e.clearSelection(),m(Wu)},o=(e,n)=>{let r=h.current;if(!Uu(r,g.current)){a(),f(!0);return}if(f(!1),r===``){a();return}e===1?t.findNext(r,i(n)):t.findPrevious(r,i(!1))};return _.current=e=>o(e,!1),v.current=()=>o(1,!0),ee.current=()=>{a(),f(!1)},()=>{r.dispose(),_.current=()=>{},v.current=()=>{},ee.current=()=>{}}},[]);return{input:n,open:r,query:a,setQuery:o,caseSensitive:s,setCaseSensitive:c,regex:l,setRegex:u,invalid:d,result:p,step:(0,O.useCallback)(e=>_.current(e),[]),toggle:(0,O.useCallback)(()=>i(e=>!e),[]),close:(0,O.useCallback)(()=>i(!1),[]),bind:y,hasFocus:(0,O.useCallback)(()=>n.current?.parentElement?.contains(document.activeElement)===!0,[])}}function Ku({search:e,mobile:t}){let n=s();return(0,$.jsxs)(`div`,{className:`absolute inset-x-2 top-2 z-20 items-center gap-1.5 rounded-lg border border-line bg-toolbar/95 p-1.5 shadow-lg backdrop-blur ${t?`grid grid-cols-6`:`left-auto flex w-[34rem]`}`,children:[(0,$.jsx)(`input`,{ref:e.input,autoFocus:!0,"aria-label":n(`terminal.searchInput`),value:e.query,onChange:t=>e.setQuery(t.target.value),onKeyDown:t=>{t.key===`Escape`?e.close():t.key===`Enter`&&e.step(t.shiftKey?-1:1)},className:`min-w-0 flex-1 rounded border border-control-line bg-control px-2 py-1 ${t?`col-span-6 min-h-11 text-base`:`text-xs`}`,placeholder:n(`terminal.searchPlaceholder`)}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchCaseSensitive`),"aria-pressed":e.caseSensitive,className:`rounded border px-1.5 py-1 text-xs ${e.caseSensitive?`border-accent bg-accent/10 text-accent`:`border-control-line text-ink-muted`}`,onClick:()=>e.setCaseSensitive(e=>!e),children:`Aa`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchRegex`),"aria-pressed":e.regex,className:`rounded border px-1.5 py-1 font-mono text-xs ${e.regex?`border-accent bg-accent/10 text-accent`:`border-control-line text-ink-muted`}`,onClick:()=>e.setRegex(e=>!e),children:`.*`}),(0,$.jsx)(`span`,{role:`status`,className:`${t?`min-w-0`:`w-14`} text-center text-[11px] ${e.invalid?`text-danger`:`text-ink-muted`}`,children:e.invalid?n(`terminal.searchInvalidRegex`):e.result.total===0?n(`terminal.searchNoResults`):`${e.result.index+1}/${e.result.total}`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchPrevious`),className:`rounded border border-control-line px-2 py-0.5 text-sm`,onClick:()=>e.step(-1),children:`↑`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchNext`),className:`rounded border border-control-line px-2 py-0.5 text-sm`,onClick:()=>e.step(1),children:`↓`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchClose`),className:`rounded px-2 py-0.5 text-sm`,onClick:e.close,children:`×`})]})}var qu=`shrink-0 border-b border-notice-line bg-notice px-3 py-1.5 text-xs text-notice-ink`;function Ju({session:e,problem:t,link:n,onLinkNow:r,onLinkStop:i,onStopReconnect:a,onReconnect:o}){let c=s(),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[p,m]=(0,O.useState)(!1);async function h(){if(!(a===void 0||p)){m(!0);try{await a()}finally{m(!1)}}}async function g(){if(!(o===void 0||l)){u(!0),f(!1);try{if(await o()){r();return}f(!0)}finally{u(!1)}}}return(0,$.jsxs)($.Fragment,{children:[t===``?null:(0,$.jsx)(`p`,{role:`status`,className:qu,children:t}),d?(0,$.jsx)(`p`,{role:`status`,className:qu,children:c(`terminal.manualReconnectFailed`)}):null,e.state===`reconnecting`?(0,$.jsxs)(`div`,{role:`status`,className:`flex flex-wrap items-center gap-2 ${qu}`,children:[(0,$.jsx)(`p`,{className:`min-w-0 grow`,children:c(`terminal.reconnectingAttempt`,{attempt:String(e.reconnect?.attempt??1),limit:String(e.reconnect?.limit??1)})}),a===void 0?null:(0,$.jsx)(`button`,{type:`button`,disabled:p,onClick:()=>void h(),className:`min-h-8 shrink-0 rounded border border-notice-line px-3 py-1 font-medium text-notice-ink hover:bg-select-fill disabled:opacity-50`,children:c(`terminal.stopReconnect`)})]}):null,e.problem===``?null:(0,$.jsx)(`p`,{role:`alert`,className:qu,children:c(ie(e.problem))}),n.phase===`live`?null:(0,$.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 ${qu}`,children:[(0,$.jsx)(`p`,{className:`min-w-0 grow`,children:n.phase===`connecting`?n.attempt===1?c(`terminal.linkConnecting`):c(`terminal.linkRetrying`,{attempt:String(n.attempt)}):n.phase===`waiting`?c(`terminal.linkWaiting`,{seconds:String(n.seconds),attempt:String(n.attempt)}):n.gone?c(`terminal.linkGone`):c(`terminal.linkStopped`)}),n.phase===`stopped`&&n.gone?null:(0,$.jsx)(`button`,{type:`button`,disabled:n.phase===`connecting`,onClick:r,className:`shrink-0 rounded border border-notice-line px-2 py-0.5 text-notice-ink disabled:opacity-50`,children:c(`terminal.linkNow`)}),n.phase===`stopped`?null:(0,$.jsx)(`button`,{type:`button`,onClick:i,className:`shrink-0 rounded border border-notice-line px-2 py-0.5 text-notice-ink`,children:c(`terminal.linkStop`)})]}),e.exited===void 0?null:(0,$.jsxs)(`div`,{role:`status`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b border-line bg-card px-3 py-1.5 text-xs text-ink-muted`,children:[(0,$.jsx)(`p`,{className:`min-w-0 grow`,children:e.exited.signal===``?c(`terminal.exitedWithCode`,{code:String(e.exited.code)}):c(`terminal.exitedWithSignal`,{signal:e.exited.signal})}),e.kind!==`ssh`||e.alias===void 0||o===void 0?null:(0,$.jsx)(`button`,{type:`button`,disabled:l,onClick:()=>void g(),className:`min-h-8 shrink-0 rounded border border-control-line bg-control px-3 py-1 font-medium text-ink hover:bg-select-fill disabled:opacity-50`,children:c(l?`terminal.manualReconnecting`:`terminal.manualReconnect`)})]})]})}var Yu=4096,Xu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/u;function Zu(e){if(e===``)return 0;let t=1;for(let n=0;n{let e=t.getBoundingClientRect(),n=r?.getBoundingClientRect();return[e.width,e.height,n?.width,n?.height].join(`:`)},a=i(),o=null,s=new ResizeObserver(()=>{o!==null||i()===a||(o=window.requestAnimationFrame(()=>{o=null,i()!==a&&(n(),a=i())}))});return s.observe(t),r!==null&&s.observe(r),()=>{s.disconnect(),o!==null&&window.cancelAnimationFrame(o)}}function Bl(e,t){return t<=0?0:e/t}function Vl(e){let t=Rl(e),n=e.element?.querySelector(`.xterm-rows`)??null;if(t===null||e.rows<=0)return null;let r=t.getBoundingClientRect();if(r.width<=0||r.height<=0)return null;let i=getComputedStyle(n??t),a=n===null?e.options:void 0;return{rect:r,cellHeight:Bl(r.height,e.rows),font:{family:a?.fontFamily??i.fontFamily,size:a?.fontSize===void 0?i.fontSize:`${a.fontSize}px`,weight:a?.fontWeight===void 0?i.fontWeight:String(a.fontWeight),letterSpacing:a?.letterSpacing===void 0?i.letterSpacing:`${a.letterSpacing}px`}}}function Hl(e){let t=e.textarea,n=Vl(e);if(t===void 0||n===null||e.cols<=0)return;let r=e.buffer.active;t.style.top=`${Math.max(0,Math.min(e.rows-1,r.cursorY))*n.cellHeight}px`,t.style.left=`${Math.max(0,Math.min(e.cols-1,r.cursorX))*n.rect.width/e.cols}px`}function Ul(e,t){return Bl((Rl(e)??t).getBoundingClientRect().height,e.rows)}var Wl=`sshc-select-overlay`,Gl=8,Kl=400;function ql(e){let t=e.ownerDocument.getSelection();return t===null||t.isCollapsed?!1:e.contains(t.anchorNode)}function Jl(e,t){let n=e.ownerDocument.createElement(`pre`);n.className=`${Wl} absolute m-0 select-text overflow-hidden whitespace-pre text-transparent`,n.setAttribute(`aria-hidden`,`true`),n.dir=`ltr`,n.style.zIndex=`6`,e.appendChild(n);let r=``,i=()=>{if(t.rows<=0||t.cols<=0)return;let i=Vl(t),a=e.getBoundingClientRect(),o=i===null?r:`${i.rect.left-a.left} ${i.rect.top-a.top} ${i.rect.width} ${i.rect.height}`,s=o!==r,c=ql(n);s&&c&&n.ownerDocument.getSelection()?.removeAllRanges(),(s||!c)&&(n.textContent=Ll(t.buffer.active,t.rows,t.cols)),!(i===null||!s)&&(r=o,n.style.left=`${i.rect.left-a.left}px`,n.style.top=`${i.rect.top-a.top}px`,n.style.width=`${i.rect.width}px`,n.style.height=`${i.rect.height}px`,n.style.lineHeight=`${i.cellHeight}px`,n.style.fontFamily=i.font.family,n.style.fontSize=i.font.size,n.style.fontWeight=i.font.weight,n.style.letterSpacing=i.font.letterSpacing,n.style.fontKerning=`none`)},a=0,o=0,s=0,c=!1,l=!1,u=!1,d=e=>{let t=e.touches[0];l=e.touches.length===1&&t!==void 0,a=Date.now(),o=t?.clientX??0,s=t?.clientY??0,c=!1,u=ql(n)},f=e=>{let t=e.touches[0];e.touches.length!==1&&(l=!1),t!==void 0&&Math.hypot((t.clientX??0)-o,t.clientY-s)>Gl&&(c=!0)},p=()=>{let e=l&&!c&&Date.now()-a{l=!1},h=e=>e.preventDefault();e.addEventListener(`touchstart`,d,{passive:!0}),e.addEventListener(`touchmove`,f,{passive:!0}),e.addEventListener(`touchend`,p,{passive:!0}),e.addEventListener(`touchcancel`,m,{passive:!0}),e.addEventListener(`mousedown`,h);let g=t.onRender(i);return i(),()=>{g.dispose(),e.removeEventListener(`touchstart`,d),e.removeEventListener(`touchmove`,f),e.removeEventListener(`touchend`,p),e.removeEventListener(`touchcancel`,m),e.removeEventListener(`mousedown`,h),n.remove()}}function Yl(e){return e(`(hover: none) and (pointer: coarse)`).matches}function Xl(e,t,n={}){let r=n.now??(()=>performance.now()),i=n.requestFrame??(e=>requestAnimationFrame(e)),a=n.cancelFrame??(e=>cancelAnimationFrame(e)),o=n.canScroll??(()=>!0),s=0,c=0,l=0,u=0,d=!1,f=null,p=()=>{f!==null&&a(f),f=null,d=!1,u=0,l=0},m=n=>{let r=t();if(r<=0)return 0;l+=n/r;let i=Math.trunc(l);return i!==0&&(l-=i,e.scrollLines(i)),i},h=()=>{if(f=null,!o()||n.reducedMotion?.()===!0){p();return}let e=r(),t=e-c;if(t>100||t<0){p();return}c=e,m(u*t),u*=Math.exp(-t/180),Math.abs(u)>=.02&&(f=i(h))};return{start(e){p(),d=o(),s=e,c=r()},move(e){if(!d||!o())return p(),0;let t=r(),n=t-c,i=s-e;if(n>0){let e=Math.max(-3,Math.min(3,i/Math.max(8,n)));u=n>100||u*e<=0?e:u*.4+e*.6}return s=e,c=t,m(i)},end(){if(d){if(d=!1,!o()||n.reducedMotion?.()===!0||r()-c>80||Math.abs(u)<.1){p();return}c=r(),f=i(h)}},cancel:p}}function Zl(e,t,n,r){let i=Xl(t,n,{...r,canScroll:()=>!r.selectionHeld()}),a=e=>e.touches.length===1?e.touches[0]??null:null,o=e=>{let t=a(e);t===null?i.cancel():i.start(t.clientY)},s=e=>{let t=a(e);t===null?i.cancel():i.move(t.clientY)},c=()=>i.end(),l=()=>{r.selectionHeld()&&i.cancel()};return e.addEventListener(`touchstart`,o,{passive:!0}),e.addEventListener(`touchmove`,s,{passive:!0}),e.addEventListener(`touchend`,c,{passive:!0}),e.addEventListener(`touchcancel`,i.cancel,{passive:!0}),e.ownerDocument.addEventListener(`selectionchange`,l),()=>{e.removeEventListener(`touchstart`,o),e.removeEventListener(`touchmove`,s),e.removeEventListener(`touchend`,c),e.removeEventListener(`touchcancel`,i.cancel),e.ownerDocument.removeEventListener(`selectionchange`,l),i.cancel()}}var $=t(),Ql={Esc:`\x1B`,Tab:` `,"↑":`\x1B[A`,"↓":`\x1B[B`,"→":`\x1B[C`,"←":`\x1B[D`};function $l(e,t,n){if(e.length!==1)return e;let r=e;if(t){let t=e.toLowerCase().charCodeAt(0);t>=97&&t<=122&&(r=String.fromCharCode(t-96))}return n?`\x1B`+r:r}function eu(e,t,n){let r=Ql[e];return r===void 0?$l(e,t,n):n?`\x1B`+r:r}var tu=[`Esc`,`Tab`,`←`,`↑`,`↓`,`→`],nu=[`|`,`-`,`~`,`/`],ru=`min-h-11 min-w-0 rounded border border-control-line font-mono text-sm text-ink active:bg-select-fill focus-visible:outline-2 focus-visible:outline-accent`;function iu(e){e.preventDefault()}function au({modifiers:e,onToggle:t,onKey:n}){let r=s(),i=ie(ue),[a,o]=(0,D.useState)(!1),c=(0,D.useRef)(null);if(S({open:i&&a,containerRefs:[c],onDismiss:()=>o(!1)}),!i)return null;let l=e=>{n(e),o(!1)};return(0,$.jsxs)(`div`,{ref:c,"aria-label":r(`terminal.keyBar`),className:`relative grid shrink-0 grid-cols-8 border-t border-line bg-toolbar px-1`,children:[(0,$.jsx)(`button`,{type:`button`,"data-touch-compact":!0,"aria-pressed":e.ctrl,onPointerDown:iu,onMouseDown:iu,onClick:()=>t(`ctrl`),className:`${ru} ${e.ctrl?`bg-select-fill`:`bg-card`}`,children:`Ctrl`}),tu.map(e=>(0,$.jsx)(`button`,{type:`button`,"data-touch-compact":!0,onPointerDown:iu,onMouseDown:iu,onClick:()=>l(e),className:`${ru} bg-card`,children:e},e)),(0,$.jsx)(`button`,{type:`button`,"data-touch-compact":!0,"aria-label":r(`terminal.extraKeys`),title:r(`terminal.extraKeys`),"aria-expanded":a,onPointerDown:iu,onMouseDown:iu,onClick:()=>o(e=>!e),className:`${ru} ${a||e.alt?`bg-select-fill`:`bg-card`}`,children:e.alt?`Alt`:`…`}),a?(0,$.jsxs)(`div`,{className:`absolute inset-x-1 bottom-full z-30 mb-1 grid grid-cols-5 gap-1 rounded border border-line bg-toolbar p-1 shadow-lg`,children:[(0,$.jsx)(`button`,{type:`button`,"aria-pressed":e.alt,onPointerDown:iu,onMouseDown:iu,onClick:()=>{t(`alt`),o(!1)},className:`${ru} ${e.alt?`bg-select-fill`:`bg-card`}`,children:`Alt`}),nu.map(e=>(0,$.jsx)(`button`,{type:`button`,onPointerDown:iu,onMouseDown:iu,onClick:()=>l(e),className:`${ru} bg-card`,children:e},e))]}):null]})}var ou=64*1024;function su(e,t=window.location){return`${t.protocol===`https:`?`wss:`:`ws:`}//${t.host}/terminal/stream?ticket=${encodeURIComponent(e)}`}function cu(e,t){let n=new WebSocket(su(e));n.binaryType=`arraybuffer`;let r=new TextEncoder,i=!1,a=[];n.addEventListener(`open`,()=>{let e=a??[];a=null;for(let t of e)n.send(t)});let o=e=>{if(a!==null){a.push(e);return}n.readyState===WebSocket.OPEN&&n.send(e)};n.addEventListener(`message`,e=>{if(e.data instanceof ArrayBuffer){t.onOutput(new Uint8Array(e.data));return}if(typeof e.data==`string`)try{let n=JSON.parse(e.data),r=n.replay;if(lu(r)){t.onReplay(r);return}let a=n.exit;if(a===void 0)return;i=!0,t.onExit({code:a.code,signal:a.signal})}catch{return}});let s=()=>{i||(i=!0,t.onClose())};return n.addEventListener(`close`,s),n.addEventListener(`error`,s),{send(e){let t=r.encode(e);for(let e=0;e=0&&t.start<=t.next&&t.next<=t.end}function uu(e,t){let n=e.replace(/\r?\n/g,`\r`);return t?`\u001b[200~${n}\u001b[201~`:n}function du({container:e,terminal:t,paste:n=e=>t.paste(e),clipboard:r,coarsePointer:i=()=>!1,settings:a,refuse:o,enhancedKey:s,sendEnhancedKey:c}){let l=!0,u=()=>{if(!t.hasSelection())return;let e=t.getSelection();e!==``&&r.writeText(e).catch(o)},d=()=>{r.readText().then(e=>{l&&e!==``&&n(e)}).catch(()=>{l&&o()})};t.attachCustomKeyEventHandler(e=>{if(e.type!==`keydown`)return!0;if(T(e,`copy`)&&t.hasSelection())return e.preventDefault(),u(),!1;if(T(e,`paste`))return!e.altKey&&(e.metaKey&&!e.ctrlKey&&!e.shiftKey||e.ctrlKey&&!e.metaKey)&&e.key.toLowerCase()===`v`||(e.preventDefault(),e.repeat||d()),!1;let n=s?.(e)??null;return n===null?!0:(c?.(n),!1)});let f=t.onSelectionChange(()=>{a().copyOnSelect&&u()}),p=e=>{let t=e.clipboardData?.getData(`text/plain`);t!==void 0&&(e.preventDefault(),e.stopImmediatePropagation(),t!==``&&n(t))},m=e=>{i()||a().rightClickPaste&&(e.preventDefault(),d())};return e.addEventListener(`paste`,p,{capture:!0}),e.addEventListener(`contextmenu`,m),()=>{l=!1,f.dispose(),e.removeEventListener(`paste`,p,{capture:!0}),e.removeEventListener(`contextmenu`,m)}}var fu=256*1024,pu=/^[A-Za-z0-9+/]*={0,2}$/;function mu(e,t=fu){let n=e.indexOf(`;`);if(n<0)return null;let r=e.slice(0,n),i=e.slice(n+1);if(r!==``&&r!==`c`||i===`?`||i.length>Math.ceil(t/3)*4||!pu.test(i)||i.length%4==1)return null;let a=(4-i.length%4)%4;try{let e=atob(i+`=`.repeat(a));if(e.length>t)return null;let n=Uint8Array.from(e,e=>e.charCodeAt(0));return new TextDecoder().decode(n)}catch{return null}}function hu({parser:e,enabled:t,writeText:n,copied:r,refused:i}){let a=e.registerOscHandler(52,e=>{if(!t())return!0;let a=mu(e);return a===null||n(a).then(r).catch(i),!0});return()=>a.dispose()}var gu=64,_u={ArrowUp:{final:`A`},ArrowDown:{final:`B`},ArrowRight:{final:`C`},ArrowLeft:{final:`D`},Home:{final:`H`},End:{final:`F`},Insert:{final:`~`,prefix:2},Delete:{final:`~`,prefix:3},PageUp:{final:`~`,prefix:5},PageDown:{final:`~`,prefix:6},Enter:{code:13},Tab:{code:9},Backspace:{code:127},Escape:{code:27}};function vu(e){return 1+ +!!e.shiftKey+(e.altKey?2:0)+(e.ctrlKey?4:0)}function yu(e,t){return!t||e.type!==`keydown`||e.isComposing||e.code!==`IntlYen`||e.ctrlKey||e.altKey||e.metaKey?null:e.shiftKey?`|`:`\\`}function bu(e,t){let n=e[0]??t;return typeof n==`number`&&Number.isSafeInteger(n)&&n>=0?n:null}function xu(e){let t=0,n=[],r=[e.registerCsiHandler({prefix:`>`,final:`u`},e=>{let r=bu(e,0);return r===null?!0:(n.length===gu&&n.shift(),n.push(t),t=r,!0)}),e.registerCsiHandler({prefix:`=`,final:`u`},e=>{let n=bu(e,0);return n!==null&&(t=n),!0}),e.registerCsiHandler({prefix:`<`,final:`u`},e=>{let r=Math.max(1,bu(e,1)??1),i=Math.min(r,n.length);for(let e=0;ei&&(t=0),!0})];return{encode(e){if(t===0||e.type!==`keydown`||e.isComposing||e.metaKey)return null;let n=_u[e.key];if(n===void 0){if(!(e.ctrlKey||e.altKey)||e.key.length!==1)return null;let t=e.key.codePointAt(0);return t===void 0?null:`\u001b[${t};${vu(e)}u`}if(!e.shiftKey&&!e.altKey&&!e.ctrlKey)return null;let r=vu(e);return n.code===void 0?`\u001b[${n.prefix??1};${r}${n.final}`:`\u001b[${n.code};${r}u`},reset(){t=0,n.length=0},dispose(){for(let e of r)e.dispose()}}}function Su(e,{remote:t,open:n,select:r}){return e.registerLinkProvider({provideLinks:(i,a)=>{let o=ee(e.buffer.active.getLine(i-1)?.translateToString(!0)??``,t);a(o.length===0?void 0:o.map(e=>({text:e.text,range:{start:{x:e.start+1,y:i},end:{x:e.end,y:i}},activate:t=>{if(e.kind===`url`&&g(t)){n(e.target);return}r(e,t)}})))}})}var Cu=w();function wu(e){if(!m(e))return!1;let t=new URL(e),n=window.open(t.href,`_blank`,`noopener,noreferrer`);return n!==null&&(n.opener=null),n!==null}function Tu({selection:e,onClose:t,onRemotePath:n}){let r=s(),i=(0,D.useRef)(null);S({open:!0,containerRefs:[i],onDismiss:t});function a(){f.writeText(e.link.target).finally(t)}function o(){e.link.kind===`url`&&(wu(e.link.target),t())}function c(r){e.link.kind!==`remote-path`||n===void 0||(n(e.link.target,r),t())}return(0,Cu.createPortal)((0,$.jsxs)(`div`,{ref:i,role:`dialog`,"aria-label":r(`terminal.linkActions`),style:{left:Math.min(e.x,Math.max(8,window.innerWidth-260)),top:Math.min(e.y,Math.max(8,window.innerHeight-220))},className:`fixed z-[80] w-64 rounded-md border border-control-line bg-card p-2 shadow-2xl`,children:[(0,$.jsx)(`p`,{className:`truncate px-2 py-1 font-mono text-xs text-ink-muted`,title:e.link.target,children:e.link.target}),(0,$.jsxs)(`div`,{className:`mt-1 grid gap-1`,children:[e.link.kind===`url`?(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:o,children:r(`terminal.linkOpenBrowser`)}):n===void 0?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:()=>c(`browse`),children:r(`terminal.linkBrowseSFTP`)}),(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:()=>c(`edit`),children:r(`terminal.linkEditSFTP`)}),(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:()=>c(`download`),children:r(`terminal.linkDownloadSFTP`)})]}),(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-left text-sm hover:bg-select-fill`,onClick:a,children:r(`terminal.linkCopy`)})]})]}),document.body)}function Eu({session:e,onClose:t,initialCommand:n=``,returnFocusRef:r}){let a=s(),c=(0,D.useRef)(null),[l,u]=(0,D.useState)([]),[d,p]=(0,D.useState)(``),[m,h]=(0,D.useState)({}),[g,_]=(0,D.useState)(null),[v,y]=(0,D.useState)(!0),[ee,b]=(0,D.useState)(``),[ne,x]=(0,D.useState)(!1),[re,C]=(0,D.useState)(``),[ie,w]=(0,D.useState)(!1),ae=(0,D.useMemo)(()=>l.find(e=>e.id===d)??null,[d,l]);(0,D.useEffect)(()=>{let e=!0;return te.library().then(t=>{e&&(u(t.snippets),p(t.snippets[0]?.id??``))}).catch(t=>e&&b(o(t)||`snippet_failed`)).finally(()=>e&&y(!1)),()=>{e=!1}},[]),S({open:!0,containerRefs:[c],onDismiss:t,...r===void 0?{}:{returnFocusRef:r}}),(0,D.useEffect)(()=>{_(null)},[e.id,e.startedAt,e.state]);function oe(e=m){h(e),_(null),b(``)}async function T(){let e=re.trim(),t=n;if(!(e===``||t.trim()===``||v)){y(!0),b(``);try{let n=await te.create({name:e,command:t,description:``,variables:[]});u(e=>[n,...e]),p(n.id),x(!1),C(``),w(!0)}catch(e){b(o(e)||`snippet_failed`)}finally{y(!1)}}}async function ce(){if(!(ae===null||v)){y(!0),b(``);try{let t={snippetId:ae.id,inputs:m,targets:[{targetId:e.id,sessionId:e.id}]},n=await E.preview({...t,issueAction:!1}),r=n.targets.find(t=>t.sessionId===e.id)??n.targets[0];if(r===void 0||r.command===``)throw Error(`invalid_response`);_({command:r.command,preview:n,request:t})}catch(e){b(o(e)||(e instanceof Error?e.message:`terminal_command_failed`)),_(null)}finally{y(!1)}}}async function le(){if(g===null)return;let e=g;y(!0);try{await f.writeText(await ue()),t()}catch(t){o(t)===`terminal_command_preview_changed`?await pe(t,e):b(a(`terminal.clipboardRefused`))}finally{y(!1)}}async function ue(){if(g===null)throw Error(`invalid_response`);let t=await E.preview({...g.request,revealCommand:!0,issueAction:!1,expectedReviewEvidence:g.preview.reviewEvidence}),n=t.targets.find(t=>t.sessionId===e.id)??t.targets[0];if(n===void 0||n.command===``)throw Error(`invalid_response`);return n.command}async function de(){if(g===null)return;let e=g;y(!0),b(``);try{let n=await E.preview({...e.request,issueAction:!0,submit:!1,expectedReviewEvidence:e.preview.reviewEvidence});await E.dispatch(n,e.request,!1),t()}catch(t){await pe(t,e)}finally{y(!1)}}async function fe(){if(g===null)return;let e=g;y(!0),b(``);try{let n=await E.preview({...e.request,issueAction:!0,submit:!0,expectedReviewEvidence:e.preview.reviewEvidence});await E.dispatch(n,e.request,!0),t()}catch(t){await pe(t,e)}finally{y(!1)}}async function pe(t,n){let r=o(t);if(r!==`terminal_command_preview_changed`){b(r===`terminal_command_insert_unsafe`?a(`terminal.quickCommandInsertUnsafe`):r||`terminal_command_failed`);return}try{let t=await E.preview({...n.request,issueAction:!1}),r=t.targets.find(t=>t.sessionId===e.id)??t.targets[0];if(r===void 0||r.command===``)throw Error(`invalid_response`);_({command:r.command,preview:t,request:n.request}),b(a(`terminal.quickCommandChanged`))}catch(e){_(null),b(o(e)||`terminal_command_failed`)}}return(0,$.jsxs)(`div`,{ref:c,role:`dialog`,"aria-label":a(`terminal.quickCommands`),className:`absolute right-2 top-11 z-30 flex max-h-[min(32rem,75vh)] w-[min(24rem,calc(100vw-1rem))] flex-col gap-3 overflow-auto rounded-md border border-control-line bg-card p-3 shadow-2xl`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`h3`,{className:`grow text-sm font-semibold`,children:a(`terminal.quickCommands`)}),(0,$.jsx)(`button`,{type:`button`,"aria-label":a(`terminal.quickCommandsClose`),className:`rounded px-2 text-ink-muted hover:bg-select-fill`,onClick:t,children:`×`})]}),ee===``?null:(0,$.jsx)(i,{tone:`danger`,compact:!0,children:ee}),ie?(0,$.jsx)(`p`,{role:`status`,className:`rounded bg-notice px-2 py-1.5 text-xs text-notice-ink`,children:a(`terminal.quickCommandSaved`)}):null,n.trim()===``?null:ne?(0,$.jsxs)(`div`,{className:`grid gap-2 rounded border border-line p-2`,children:[(0,$.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[a(`terminal.quickCommandName`),(0,$.jsx)(`input`,{autoFocus:!0,value:re,onChange:e=>C(e.target.value),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`})]}),(0,$.jsx)(`pre`,{className:`max-h-24 overflow-auto whitespace-pre-wrap rounded bg-code-bg p-2 text-xs text-code-fg`,children:n}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,disabled:v||re.trim()===``,onClick:()=>void T(),className:`min-h-8 rounded bg-accent px-3 py-1 text-sm font-medium text-accent-contrast disabled:opacity-50`,children:a(`terminal.quickCommandSave`)}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>x(!1),className:`min-h-8 rounded border border-control-line px-3 py-1 text-sm hover:bg-select-fill`,children:a(`snippets.cancel`)})]})]}):(0,$.jsx)(`button`,{type:`button`,className:`min-h-8 self-start rounded border border-control-line px-3 py-1 text-sm hover:bg-select-fill`,onClick:()=>x(!0),children:a(`terminal.quickCommandSaveSelection`)}),v&&l.length===0?(0,$.jsx)(`p`,{className:`text-xs text-ink-muted`,children:a(`palette.loading`)}):l.length===0?(0,$.jsx)(`p`,{className:`text-xs text-ink-muted`,children:a(`snippets.empty`)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[a(`workspace.savedSnippet`),(0,$.jsx)(`select`,{value:d,onChange:e=>{p(e.target.value),oe({})},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`,children:l.map(e=>(0,$.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),ae?.description?(0,$.jsx)(`p`,{className:`text-xs text-ink-muted`,children:ae.description}):null,ae?.variables.map(e=>(0,$.jsxs)(`div`,{className:`text-xs text-ink-muted`,children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`code`,{children:`{{${e.name}}}`}),e.description?` · ${e.description}`:``]}),e.type===`boolean`?(0,$.jsxs)(`select`,{"aria-label":e.name,value:m[e.name]??``,onChange:t=>oe({...m,[e.name]:t.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`,children:[(0,$.jsx)(`option`,{value:``,children:e.default===void 0?``:`${a(`workspace.useDefault`)} (${e.default})`}),(0,$.jsx)(`option`,{value:`true`,children:`true`}),(0,$.jsx)(`option`,{value:`false`,children:`false`})]}):e.type===`secret`?(0,$.jsx)(se,{label:e.name,value:m[e.name]??``,placeholder:e.default===void 0?``:`${a(`workspace.useDefault`)}: ${e.default}`,onChange:t=>oe({...m,[e.name]:t}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`}):(0,$.jsx)(`input`,{type:e.type===`integer`?`number`:`text`,"aria-label":e.name,value:m[e.name]??``,placeholder:e.default===void 0?``:`${a(`workspace.useDefault`)}: ${e.default}`,onChange:t=>oe({...m,[e.name]:t.target.value}),className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm text-ink`})]},e.name)),g===null?(0,$.jsx)(`button`,{type:`button`,disabled:v||ae===null,onClick:()=>void ce(),className:`min-h-8 self-start rounded border border-control-line bg-control px-3 py-1 text-sm font-medium hover:bg-select-fill disabled:opacity-50`,children:a(`snippets.preview`)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`pre`,{className:`max-h-32 overflow-auto whitespace-pre-wrap rounded bg-code-bg p-2 text-xs text-code-fg`,children:g.command}),(0,$.jsx)(`p`,{className:`text-[11px] leading-4 text-ink-muted`,children:a(`terminal.quickCommandContextWarning`)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,disabled:v,onClick:()=>void de(),className:`min-h-8 rounded border border-control-line bg-control px-3 py-1 text-sm hover:bg-select-fill disabled:opacity-50`,children:a(`terminal.quickCommandInsert`)}),(0,$.jsx)(`button`,{type:`button`,disabled:v,onClick:()=>void fe(),className:`min-h-8 rounded bg-accent px-3 py-1 text-sm font-medium text-accent-contrast disabled:opacity-50`,children:a(`terminal.quickCommandRun`)}),(0,$.jsx)(`button`,{type:`button`,disabled:v,onClick:()=>void le(),className:`min-h-8 rounded border border-control-line px-3 py-1 text-sm hover:bg-select-fill disabled:opacity-50`,children:a(`terminal.quickCommandCopy`)})]})]})]})]})}function Du({osc52Enabled:e,onQuickCommands:t,onPortForwarding:n,onOpenRemoteDirectory:r,onCopyContext:i,onToggleOsc52:a,onClose:o,triggerRef:c}){let l=s(),u=(0,D.useRef)(null);S({open:!0,containerRefs:c===void 0?[u]:[u,c],onDismiss:o,...c===void 0?{}:{returnFocusRef:c}}),b({open:!0,menuRef:u,onClose:o});let d=e=>()=>{e(),o()};return(0,$.jsxs)(`div`,{ref:u,role:`menu`,"aria-label":l(`terminal.moreActions`),className:`absolute right-2 top-[calc(100%-0.25rem)] z-40 w-64 rounded-md border border-control-line bg-card p-1.5 shadow-2xl`,children:[(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,onClick:d(t),children:l(`terminal.quickCommands`)}),n===void 0?null:(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,onClick:d(n),children:l(`terminal.portForwarding`)}),r===void 0?null:(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,onClick:d(r),children:l(`terminal.openDirectoryInSFTP`)}),(0,$.jsx)(`button`,{type:`button`,role:`menuitem`,className:`block min-h-10 w-full rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,title:l(`terminal.copyContextHint`),onClick:d(i),children:l(`terminal.copyContext`)}),(0,$.jsxs)(`button`,{type:`button`,role:`menuitemcheckbox`,"aria-checked":e,className:`flex min-h-10 w-full items-center justify-between gap-3 rounded px-2.5 py-2 text-left text-sm hover:bg-select-fill focus:bg-select-fill focus:outline-none md:min-h-0`,title:l(`terminal.osc52Hint`),onClick:d(a),children:[(0,$.jsx)(`span`,{children:`OSC 52`}),(0,$.jsx)(`span`,{"aria-hidden":`true`,className:e?`text-live`:`text-ink-faint`,children:e?`✓`:`—`})]})]})}function Ou({session:e,api:t=le,saveApi:n=re,onChanged:o,onClose:f}){let p=s(),[m,h]=(0,D.useState)(e.forwards??[]),[g,v]=(0,D.useState)(`local`),[y,ee]=(0,D.useState)(``),[b,te]=(0,D.useState)(``),[ne,x]=(0,D.useState)(!1),[S,C]=(0,D.useState)(!1),[ie,w]=(0,D.useState)(``),[ae,oe]=(0,D.useState)(``),[T,E]=(0,D.useState)(``);(0,D.useEffect)(()=>h(e.forwards??[]),[e.forwards]);let se=e.state===`connected`,ce=e.alias!==void 0&&e.alias!==``,ue=y===``||Pu(y)?``:p(`conn.forwardInvalidPort`),de=g===`dynamic`||b===``||Fu(b)?``:p(`conn.forwardInvalidDestination`),fe=se&&Pu(y)&&(g===`dynamic`||Fu(b)),pe=(0,D.useMemo)(()=>e.alias??e.title,[e.alias,e.title]);async function me(){if(fe){C(!0),E(``),oe(``);try{let r=(await t.startTerminalForward(e.id,{kind:g,listenPort:Number(y),...g===`local`?{destination:b}:{}})).sessions.find(t=>t.id===e.id);if(h(r?.forwards??[]),ne)try{await ku(g,y,b,e,n)}catch{E(p(`terminal.forwardSaveFailed`)),oe(p(`terminal.forwardStarted`)),ee(``),te(``),await o?.();return}oe(p(ne?`terminal.forwardStartedAndSaved`:`terminal.forwardStarted`)),ee(``),te(``),await o?.()}catch(e){E(Nu(p,e))}finally{C(!1)}}}async function he(n){if(n.id!==``){w(n.id),E(``),oe(``);try{let r=(await t.stopTerminalForward(e.id,n.id)).sessions.find(t=>t.id===e.id);h(r?.forwards??[]),oe(p(`terminal.forwardStopped`)),await o?.()}catch(e){E(Nu(p,e))}finally{w(``)}}}return(0,$.jsxs)(_,{labelledBy:`terminal-forward-heading`,onDismiss:()=>{!S&&ie===``&&f()},panelClassName:`flex max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-lg`,children:[(0,$.jsxs)(`header`,{className:`flex items-start gap-3 border-b border-line px-4 py-4 sm:px-5`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,$.jsx)(`h2`,{id:`terminal-forward-heading`,className:`text-base font-semibold text-ink`,children:p(`terminal.portForwarding`)}),(0,$.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`terminal.forwardDescription`,{title:pe})})]}),(0,$.jsx)(a,{disabled:S||ie!==``,onClick:f,children:p(`terminal.forwardClose`)})]}),(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-5 overflow-y-auto p-4 sm:p-5`,children:[T===``?null:(0,$.jsx)(i,{tone:`danger`,children:T}),ae===``?null:(0,$.jsx)(i,{children:ae}),e.state===`reconnecting`?(0,$.jsx)(i,{children:p(`terminal.forwardPausedReconnect`)}):null,(0,$.jsxs)(`section`,{"aria-labelledby":`terminal-forward-active`,className:`flex flex-col gap-2`,children:[(0,$.jsx)(`h3`,{id:`terminal-forward-active`,className:`text-sm font-medium text-ink`,children:p(`terminal.forwardActive`)}),m.length===0?(0,$.jsx)(`p`,{className:u,children:p(`terminal.forwardNone`)}):(0,$.jsx)(r,{tone:`subtle`,children:m.map(e=>(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-hairline px-3 py-3 first:border-t-0 sm:flex-row sm:items-center`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`size-2 rounded-full ${e.problem===``?`bg-live`:`bg-danger`}`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:Au(p,e)}),(0,$.jsx)(`span`,{className:`rounded bg-tree px-1.5 py-0.5 text-[10px] text-ink-muted`,children:p(e.temporary?`terminal.forwardTemporary`:`terminal.forwardSaved`)})]}),(0,$.jsx)(`p`,{className:`mt-1 break-all font-mono text-xs text-ink-muted`,children:ju(e)}),e.temporary||e.kind===`agent`?null:(0,$.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`terminal.forwardSavedStopHint`)}),e.problem===``?null:(0,$.jsx)(`p`,{role:`alert`,className:`mt-1 break-all text-xs text-danger`,children:e.problem}),e.problem===``?null:(0,$.jsx)(`p`,{className:`mt-1 ${u}`,children:p(`terminal.forwardRetryHint`)})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[e.kind===`agent`?null:(0,$.jsx)(a,{onClick:()=>void Mu(e,oe,E,p),children:p(`terminal.forwardCopy`)}),e.kind===`agent`||e.id===``||e.problem!==``?null:(0,$.jsx)(a,{kind:`danger`,disabled:ie!==``,onClick:()=>void he(e),children:ie===e.id?p(`terminal.forwardStopping`):p(`terminal.forwardStop`)})]})]},e.id||`${e.kind}-${e.listen}-${e.to}`))})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`terminal-forward-new`,className:`flex flex-col gap-3 border-t border-line pt-4`,children:[(0,$.jsx)(`h3`,{id:`terminal-forward-new`,className:`text-sm font-medium text-ink`,children:p(`terminal.forwardNew`)}),(0,$.jsx)(i,{children:p(`conn.forwardLoopbackOnly`)}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(l,{label:p(`conn.forwardType`),children:(0,$.jsxs)(`select`,{className:c,value:g,disabled:!se||S,onChange:e=>v(e.currentTarget.value),children:[(0,$.jsx)(`option`,{value:`local`,children:p(`conn.forwardLocal`)}),(0,$.jsx)(`option`,{value:`dynamic`,children:p(`conn.forwardDynamic`)})]})}),(0,$.jsx)(l,{label:p(`conn.forwardListenPort`),error:ue,children:(0,$.jsx)(`input`,{autoFocus:!0,inputMode:`numeric`,className:c,value:y,disabled:!se||S,onChange:e=>ee(e.currentTarget.value)})}),g===`local`?(0,$.jsx)(`div`,{className:`sm:col-span-2`,children:(0,$.jsx)(l,{label:p(`conn.forwardDestination`),error:de,children:(0,$.jsx)(`input`,{"aria-label":p(`conn.forwardDestination`),className:c,placeholder:`127.0.0.1:5432`,value:b,disabled:!se||S,onChange:e=>te(e.currentTarget.value)})})}):null]}),(0,$.jsx)(`p`,{className:u,children:p(g===`local`?`conn.forwardDestinationHint`:`conn.forwardDynamicHint`)}),(0,$.jsx)(d,{label:p(`terminal.forwardSaveConnection`),hint:p(ce?`terminal.forwardSaveHint`:`terminal.forwardSaveUnavailable`),checked:ne,disabled:!ce||S,onChange:x}),se?null:(0,$.jsx)(i,{children:p(`terminal.forwardNeedsConnection`)}),(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(a,{kind:`primary`,disabled:!fe||S,onClick:()=>void me(),children:p(S?`terminal.forwardStarting`:`terminal.forwardStart`)})})]})]})]})}async function ku(e,t,n,r,i){if(r.alias===void 0||r.alias===``)throw Error(`connection_not_saved`);let a=(await i.overview()).hosts.filter(e=>e.identity.alias===r.alias);if(a.length!==1)throw Error(`connection_not_unique`);let o=a[0]?.identity;if(o===void 0)throw Error(`connection_not_found`);let s=await i.host(o.path,o.alias);await i.save({kind:`host_fields`,path:o.path,alias:o.alias,base:s.file.contents,fields:[{action:`add`,keyword:e===`local`?`LocalForward`:`DynamicForward`,values:e===`local`?[t,n]:[t]}]})}function Au(e,t){return t.kind===`dynamic`?e(`conn.forwardDynamic`):t.kind===`agent`?e(`terminal.forwardAgentLabel`):e(`conn.forwardLocal`)}function ju(e){return e.kind===`dynamic`?`socks5://${e.listen}`:e.kind===`agent`?e.listen:`${e.listen} → ${e.to}`}async function Mu(e,t,n,r){try{await f.writeText(e.kind===`dynamic`?`socks5://${e.listen}`:e.listen),n(``),t(r(`terminal.forwardCopied`))}catch{t(``),n(r(`terminal.forwardCopyFailed`))}}function Nu(e,t){if(t instanceof n){if(t.code===`terminal_forward_bind_failed`&&t.problem?.detail)return e(`terminal.forwardBindFailed`,{detail:t.problem.detail});if(t.code===`terminal_forward_unavailable`)return e(`terminal.forwardUnavailable`);if(t.code===`invalid_terminal_forward`||t.code===`invalid_request`)return e(`terminal.forwardInvalid`)}return e(`terminal.forwardFailed`)}function Pu(e){let t=Number(e);return/^\d+$/.test(e)&&Number.isInteger(t)&&t>0&&t<=65535}function Fu(e){let t=/^\[[^\]]+\]:(\d+)$/.exec(e);if(t!==null)return Pu(t[1]??``);let n=e.lastIndexOf(`:`);return n<=0||e.slice(0,n).includes(`:`)?!1:Pu(e.slice(n+1))}function Iu(){if(typeof navigator<`u`&&/\bjsdom\b/iu.test(navigator.userAgent)||typeof WebGLRenderingContext>`u`&&typeof WebGL2RenderingContext>`u`)return!1;try{let e=document.createElement(`canvas`);return e.getContext(`webgl2`)!==null||e.getContext(`webgl`)!==null}catch{return!1}}async function Lu(e,{enabled:t=!0,backgroundImage:n=!1,supported:r=Iu,load:i=async()=>{let{WebglAddon:e}=await ce(async()=>{let{WebglAddon:e}=await import(`./addon-webgl-Dl1uOhWx.js`);return{WebglAddon:e}},[]);return new e}}={}){if(!t||n||!r())return null;let a;try{a=await i(),e.loadAddon(a)}catch{return null}let o=a.onContextLoss(()=>{o.dispose(),a.dispose()});return{dispose(){o.dispose(),a.dispose()}}}function Ru(e){try{let t=new URL(e);if(t.protocol!==`file:`||t.username!==``||t.password!==``||t.search!==``||t.hash!==``)return null;let n=decodeURIComponent(t.pathname);return!n.startsWith(`/`)||n.includes(`\0`)||n.includes(`\r`)||n.includes(` +`)?null:n}catch{return null}}function zu(e,t){return e.registerOscHandler(7,e=>{let n=Ru(e);return n===null?!1:(t(n),!0)})}function Bu(e,t){let n=t.now??Date.now,r=null;return e.registerOscHandler(133,e=>{let[i,a=``]=e.split(`;`,2);if(i===`C`)return r=n(),t.onCommandStarted?.(),!0;if(i===`D`){if(r!==null){let e=a===``?NaN:Number(a);t.onCommandCompleted?.({durationMilliseconds:Math.max(0,n()-r),exitCode:Number.isInteger(e)?e:null})}return r=null,!0}return i===`A`||i===`B`})}function Vu(e,t){let n=new Set,r=Bu(e.parser,{onCommandStarted:()=>{let t=e.registerMarker(),r=e.registerDecoration({marker:t,width:1,layer:`top`});r!==void 0&&(n.add(r),r.onRender(e=>e.classList.add(`sshc-command-marker`)),r.onDispose(()=>n.delete(r)))},onCommandCompleted:t});return{dispose(){r.dispose();for(let e of n)e.dispose()}}}function Hu(e,t){let n=e.fontSize!==t.fontSize;return e.cursorBlink=t.cursorBlink,e.fontSize=t.fontSize,e.scrollback=t.scrollback,{refit:n}}function Uu(e,t){if(!t.regex||e===``)return!0;try{return new RegExp(e,t.caseSensitive?`g`:`gi`),!0}catch{return!1}}var Wu={index:-1,total:0};function Gu({shortcutActive:e,region:t}){let n=(0,D.useRef)(null),[r,i]=(0,D.useState)(!1),[a,o]=(0,D.useState)(``),[s,c]=(0,D.useState)(!1),[l,u]=(0,D.useState)(!1),[d,f]=(0,D.useState)(!1),[p,m]=(0,D.useState)(Wu),h=(0,D.useRef)(``);h.current=a;let g=(0,D.useRef)({caseSensitive:!1,regex:!1});g.current={caseSensitive:s,regex:l};let _=(0,D.useRef)(()=>{}),v=(0,D.useRef)(()=>{}),y=(0,D.useRef)(()=>{});(0,D.useEffect)(()=>{let r=r=>{(e??t.current?.contains(document.activeElement))&&(!T(r,`terminalSearch`)||C(r)||(r.preventDefault(),r.stopImmediatePropagation(),r.repeat||(i(!0),n.current?.focus(),n.current?.select())))};return window.addEventListener(`keydown`,r,!0),()=>window.removeEventListener(`keydown`,r,!0)},[e,t]),(0,D.useEffect)(()=>{r?v.current():y.current()},[r,a,s,l]);let ee=(0,D.useCallback)((e,t,n)=>{let r=t.onDidChangeResults(e=>{m({index:e.resultIndex,total:e.resultCount})}),i=e=>{let t=getComputedStyle(n),r=t.getPropertyValue(`--ui-term-yellow`).trim(),i=t.getPropertyValue(`--ui-term-bright-yellow`).trim();return{...g.current,incremental:e,decorations:{matchBackground:r,matchBorder:i,matchOverviewRuler:i,activeMatchBackground:i,activeMatchBorder:r,activeMatchColorOverviewRuler:r}}},a=()=>{t.clearDecorations(),e.clearSelection(),m(Wu)},o=(e,n)=>{let r=h.current;if(!Uu(r,g.current)){a(),f(!0);return}if(f(!1),r===``){a();return}e===1?t.findNext(r,i(n)):t.findPrevious(r,i(!1))};return _.current=e=>o(e,!1),v.current=()=>o(1,!0),y.current=()=>{a(),f(!1)},()=>{r.dispose(),_.current=()=>{},v.current=()=>{},y.current=()=>{}}},[]);return{input:n,open:r,query:a,setQuery:o,caseSensitive:s,setCaseSensitive:c,regex:l,setRegex:u,invalid:d,result:p,step:(0,D.useCallback)(e=>_.current(e),[]),toggle:(0,D.useCallback)(()=>i(e=>!e),[]),close:(0,D.useCallback)(()=>i(!1),[]),bind:ee,hasFocus:(0,D.useCallback)(()=>n.current?.parentElement?.contains(document.activeElement)===!0,[])}}function Ku({search:e,mobile:t}){let n=s();return(0,$.jsxs)(`div`,{className:`absolute inset-x-2 top-2 z-20 items-center gap-1.5 rounded-lg border border-line bg-toolbar/95 p-1.5 shadow-lg backdrop-blur ${t?`grid grid-cols-6`:`left-auto flex w-[34rem]`}`,children:[(0,$.jsx)(`input`,{ref:e.input,autoFocus:!0,"aria-label":n(`terminal.searchInput`),value:e.query,onChange:t=>e.setQuery(t.target.value),onKeyDown:t=>{t.key===`Escape`?e.close():t.key===`Enter`&&e.step(t.shiftKey?-1:1)},className:`min-w-0 flex-1 rounded border border-control-line bg-control px-2 py-1 ${t?`col-span-6 min-h-11 text-base`:`text-xs`}`,placeholder:n(`terminal.searchPlaceholder`)}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchCaseSensitive`),"aria-pressed":e.caseSensitive,className:`rounded border px-1.5 py-1 text-xs ${e.caseSensitive?`border-accent bg-accent/10 text-accent`:`border-control-line text-ink-muted`}`,onClick:()=>e.setCaseSensitive(e=>!e),children:`Aa`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchRegex`),"aria-pressed":e.regex,className:`rounded border px-1.5 py-1 font-mono text-xs ${e.regex?`border-accent bg-accent/10 text-accent`:`border-control-line text-ink-muted`}`,onClick:()=>e.setRegex(e=>!e),children:`.*`}),(0,$.jsx)(`span`,{role:`status`,className:`${t?`min-w-0`:`w-14`} text-center text-[11px] ${e.invalid?`text-danger`:`text-ink-muted`}`,children:e.invalid?n(`terminal.searchInvalidRegex`):e.result.total===0?n(`terminal.searchNoResults`):`${e.result.index+1}/${e.result.total}`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchPrevious`),className:`rounded border border-control-line px-2 py-0.5 text-sm`,onClick:()=>e.step(-1),children:`↑`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchNext`),className:`rounded border border-control-line px-2 py-0.5 text-sm`,onClick:()=>e.step(1),children:`↓`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":n(`terminal.searchClose`),className:`rounded px-2 py-0.5 text-sm`,onClick:e.close,children:`×`})]})}var qu=`shrink-0 border-b border-notice-line bg-notice px-3 py-1.5 text-xs text-notice-ink`;function Ju({session:e,problem:t,link:n,onLinkNow:r,onLinkStop:i,onStopReconnect:a,onReconnect:o}){let c=s(),[l,u]=(0,D.useState)(!1),[d,f]=(0,D.useState)(!1),[p,m]=(0,D.useState)(!1);async function h(){if(!(a===void 0||p)){m(!0);try{await a()}finally{m(!1)}}}async function g(){if(!(o===void 0||l)){u(!0),f(!1);try{if(await o()){r();return}f(!0)}finally{u(!1)}}}return(0,$.jsxs)($.Fragment,{children:[t===``?null:(0,$.jsx)(`p`,{role:`status`,className:qu,children:t}),d?(0,$.jsx)(`p`,{role:`status`,className:qu,children:c(`terminal.manualReconnectFailed`)}):null,e.state===`reconnecting`?(0,$.jsxs)(`div`,{role:`status`,className:`flex flex-wrap items-center gap-2 ${qu}`,children:[(0,$.jsx)(`p`,{className:`min-w-0 grow`,children:c(`terminal.reconnectingAttempt`,{attempt:String(e.reconnect?.attempt??1),limit:String(e.reconnect?.limit??1)})}),a===void 0?null:(0,$.jsx)(`button`,{type:`button`,disabled:p,onClick:()=>void h(),className:`min-h-8 shrink-0 rounded border border-notice-line px-3 py-1 font-medium text-notice-ink hover:bg-select-fill disabled:opacity-50`,children:c(`terminal.stopReconnect`)})]}):null,e.problem===``?null:(0,$.jsx)(`p`,{role:`alert`,className:qu,children:c(v(e.problem))}),n.phase===`live`?null:(0,$.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 ${qu}`,children:[(0,$.jsx)(`p`,{className:`min-w-0 grow`,children:n.phase===`connecting`?n.attempt===1?c(`terminal.linkConnecting`):c(`terminal.linkRetrying`,{attempt:String(n.attempt)}):n.phase===`waiting`?c(`terminal.linkWaiting`,{seconds:String(n.seconds),attempt:String(n.attempt)}):n.gone?c(`terminal.linkGone`):c(`terminal.linkStopped`)}),n.phase===`stopped`&&n.gone?null:(0,$.jsx)(`button`,{type:`button`,disabled:n.phase===`connecting`,onClick:r,className:`shrink-0 rounded border border-notice-line px-2 py-0.5 text-notice-ink disabled:opacity-50`,children:c(`terminal.linkNow`)}),n.phase===`stopped`?null:(0,$.jsx)(`button`,{type:`button`,onClick:i,className:`shrink-0 rounded border border-notice-line px-2 py-0.5 text-notice-ink`,children:c(`terminal.linkStop`)})]}),e.exited===void 0?null:(0,$.jsxs)(`div`,{role:`status`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b border-line bg-card px-3 py-1.5 text-xs text-ink-muted`,children:[(0,$.jsx)(`p`,{className:`min-w-0 grow`,children:e.exited.signal===``?c(`terminal.exitedWithCode`,{code:String(e.exited.code)}):c(`terminal.exitedWithSignal`,{signal:e.exited.signal})}),e.kind!==`ssh`||e.alias===void 0||o===void 0?null:(0,$.jsx)(`button`,{type:`button`,disabled:l,onClick:()=>void g(),className:`min-h-8 shrink-0 rounded border border-control-line bg-control px-3 py-1 font-medium text-ink hover:bg-select-fill disabled:opacity-50`,children:c(l?`terminal.manualReconnecting`:`terminal.manualReconnect`)})]})]})}var Yu=4096,Xu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/u;function Zu(e){if(e===``)return 0;let t=1;for(let n=0;n0,risks:n,lineCount:Zu(e),endsWithLineBreak:e.endsWith(`\r`)||e.endsWith(` `),preview:r,previewTruncated:i}}function td(e){return e.endsWith(`\r `)?e.slice(0,-2):e.endsWith(`\r`)||e.endsWith(` -`)?e.slice(0,-1):e}function nd({target:e,text:t,onCancel:n,onPaste:r}){let i=s(),[a,c]=(0,O.useState)(t),l=ed(a),u=(0,O.useRef)(null),d=(0,O.useId)(),f=(0,O.useId)();return(0,$.jsxs)(re,{labelledBy:d,describedBy:f,onDismiss:n,initialFocusRef:u,panelClassName:`flex max-h-[90dvh] overflow-y-auto w-full max-w-2xl flex-col gap-3 rounded-lg p-4`,children:[(0,$.jsx)(`h2`,{id:d,className:`text-base font-semibold text-ink`,children:i(`terminal.pasteHeading`,{target:e})}),(0,$.jsx)(`p`,{id:f,className:`text-sm text-ink-muted`,children:i(`terminal.pasteDescription`,{lines:String(l.lineCount)})}),(0,$.jsxs)(`ul`,{className:`list-disc space-y-1 pl-5 text-sm text-notice-ink`,children:[l.risks.includes(`line-break`)?(0,$.jsx)(`li`,{children:i(`terminal.pasteRiskLineBreak`)}):null,l.risks.includes(`control-character`)?(0,$.jsx)(`li`,{children:i(`terminal.pasteRiskControl`)}):null]}),(0,$.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm text-ink`,children:[i(`terminal.pasteEdit`),(0,$.jsx)(`textarea`,{value:a,onChange:e=>c(e.target.value),rows:6,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`w-full resize-y rounded border border-control-line bg-control p-3 font-mono text-xs focus:border-accent focus:outline-none`})]}),(0,$.jsxs)(`details`,{className:`group overflow-hidden rounded border border-control-line bg-control`,children:[(0,$.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 px-3 py-2 text-sm text-ink-muted hover:text-ink focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent [&::-webkit-details-marker]:hidden`,children:[(0,$.jsx)(_,{name:`chevronRight`,className:`size-3.5 shrink-0 transition-transform group-open:rotate-90`}),(0,$.jsx)(`span`,{children:i(`terminal.pastePreview`)})]}),(0,$.jsx)(`pre`,{"aria-label":i(`terminal.pastePreview`),className:`max-h-64 overflow-auto whitespace-pre-wrap break-all border-t border-control-line p-3 font-mono text-xs text-ink`,children:l.preview}),l.previewTruncated?(0,$.jsx)(`p`,{className:`border-t border-control-line px-3 py-2 text-xs text-ink-muted`,children:i(`terminal.pastePreviewTruncated`)}):null]}),(0,$.jsx)(`p`,{className:`text-xs font-medium text-notice-ink`,children:i(`terminal.pasteNotSent`)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,$.jsx)(o,{ref:u,onClick:n,children:i(`terminal.pasteCancel`)}),l.endsWithLineBreak?(0,$.jsx)(o,{kind:`primary`,onClick:()=>r(td(a)),children:i(`terminal.pasteWithoutFinalLineBreak`)}):null,(0,$.jsx)(o,{kind:`danger`,onClick:()=>r(a),children:i(`terminal.pasteSend`)})]})]})}var rd=[1,2,4,8,15],id=1e4;function ad({session:e,searchShortcutActive:t,api:r=T,onExit:i,onReconnect:a,onStopReconnect:o,copyOnSelect:c=!0,fontSize:l,rightClickPaste:u=!0,webgl:d=!0,palette:g,font:v,background:te,tint:re,onOpenRemotePath:ie,osc52Enabled:b=!1,scrollbackLines:x=5e3,onOsc52Change:S,onForwardsChanged:C,jisYenBackslash:se=!1}){let w=s(),{resolved:E}=p(),ce=ae(fe),le=ae(oe),me=(0,O.useRef)(ce);me.current=ce;let he=(0,O.useRef)(null),_e=(0,O.useRef)(null),ve=de(te??``),ye=(te??``)!==``,be=ve!==``,xe=(0,O.useRef)(null),Se=(0,O.useRef)(null),Ce=(0,O.useRef)({copyOnSelect:c,rightClickPaste:u});Ce.current={copyOnSelect:c,rightClickPaste:u};let[we,Te]=(0,O.useState)(``),[Ee,De]=(0,O.useState)({phase:`connecting`,attempt:1}),Oe=Gu({shortcutActive:t,region:_e}),ke=(0,O.useRef)(()=>{}),[Ae,je]=(0,O.useState)(b),Me=(0,O.useRef)(b);Me.current=Ae;let Ne=(0,O.useRef)(se);Ne.current=se;let[Pe,Fe]=(0,O.useState)(``),[Ie,Le]=(0,O.useState)(null),Re=(0,O.useRef)(()=>{}),[ze,Be]=(0,O.useState)(``),[Ve,He]=(0,O.useState)(!1),[Ue,We]=(0,O.useState)(``),[Ge,Ke]=(0,O.useState)(!1),qe=(0,O.useRef)(null),[Je,Ye]=(0,O.useState)(!1),[Xe,Ze]=(0,O.useState)(null),Qe=(0,O.useRef)({now:()=>{},stop:()=>{}}),[$e,et]=(0,O.useState)({ctrl:!1,alt:!1}),tt=(0,O.useRef)($e);tt.current=$e;let nt=(0,O.useRef)(()=>{}),rt=(0,O.useRef)(()=>{});(0,O.useEffect)(()=>{je(b),Be(``),Le(null)},[b,e.id,e.state]),(0,O.useEffect)(()=>{if(Pe===``)return;let e=window.setTimeout(()=>Fe(``),2500);return()=>window.clearTimeout(e)},[Pe]),(0,O.useEffect)(()=>{let t=he.current;if(t===null)return;let a=Yl(e=>window.matchMedia(e)),o;o=new jl({allowProposedApi:!0,allowTransparency:ye,cols:80,rows:24,convertEol:!1,cursorBlink:e.state!==`exited`&&pe(ce),fontFamily:D(v??``),fontSize:l??(window.matchMedia(`(max-width: 767px)`).matches?15:13),theme:Ml(t,be),scrollback:x,linkHandler:{activate:(e,t,n)=>{let r=y(t,(o.buffer.active.getLine(n.start.y-1)?.translateToString(!0)??``).slice(n.start.x-1,n.end.x),n.start.x-1,n.end.x);if(r!==null){if(ee(e)){wu(r.target);return}Ze({link:r,x:e.clientX+8,y:e.clientY+8})}}}});let s=new ge,c=new Nt({highlightLimit:1e3});o.loadAddon(s),o.loadAddon(c),o.open(t);let u=null,p=!1;Lu(o,{enabled:d,backgroundImage:ye}).then(e=>{p?e?.dispose():u=e}),Se.current=o;let m=Oe.bind(o,c,t);ke.current=()=>{let e=Il(o.buffer.active);if(e===``){Fe(w(`terminal.copyContextEmpty`));return}f.writeText(e).then(()=>Fe(w(`terminal.copyContextDone`))).catch(()=>Te(w(`terminal.clipboardRefused`)))};let g=xu(o.parser),_=hu({parser:o.parser,enabled:()=>Me.current,writeText:e=>f.writeText(e),copied:()=>Fe(w(`terminal.osc52Copied`)),refused:()=>Te(w(`terminal.clipboardRefused`))}),te=zu(o.parser,Be),re=Vu(o,({durationMilliseconds:t})=>{t<3e4||!document.hidden||h({title:`sshc`,body:w(`terminal.longCommandCompleted`,{subject:ne(e),seconds:String(Math.round(t/1e3))}),tag:`sshc-command-${e.id}`})}),ie=Su(o,{remote:e.kind===`ssh`,open:wu,select:(e,t)=>Ze({link:e,x:t.clientX+8,y:t.clientY+8})}),b=null,ae=!0,oe=!1,S=0,C=0,se,T=new TextDecoder,E,le=``,ue=()=>{let e=`${o.cols}x${o.rows}`;b===null||o.cols===0||o.rows===0||e===le||(le=e,b.resize(o.cols,o.rows))},de=()=>{if(!(t.clientWidth===0||t.clientHeight===0)){try{s.fit(),a&&Hl(o)}catch{return}ue(),o.refresh(0,Math.max(0,o.rows-1))}},fe=de;fe(),xe.current=de;let O=Zl(t,o,()=>Ul(o,t),{selectionHeld:()=>ql(t),reducedMotion:()=>me.current}),_e=a?Pl({container:t,textarea:o.textarea??t}):()=>{},ve=a?Jl(t,o):()=>{};rt.current=e=>b?.send(e),nt.current=e=>{let{ctrl:t,alt:n}=tt.current,r=eu(e,t,n);b?.send(r),(t||n)&&et({ctrl:!1,alt:!1})},o.onData(e=>{let{ctrl:t,alt:n}=tt.current,r=$l(e,t,n);rt.current(r),(t||n)&&et({ctrl:!1,alt:!1})});let we=()=>{clearInterval(se),oe=!1,S+=1,De({phase:`connecting`,attempt:S}),r.terminalStreamTicket(e.id,E).then(t=>{!ae||oe||(le=``,C=Date.now(),b=cu(t.streamTicket,{onReplay:e=>{E=e.start,e.truncated&&(T=new TextDecoder,o.write(``),Fe(w(`terminal.replayTruncated`)))},onOutput:e=>{Le(null),o.write(T.decode(e,{stream:!0})),E=(E??0)+e.byteLength},onExit:()=>{o.options.cursorBlink=!1,oe=!0,Le(null),De({phase:`live`}),i?.()},onClose:()=>{b=null,Le(null),Ee()}}),De({phase:`live`}),!a&&e.state!==`exited`&&!Oe.hasFocus()&&o.focus(),ue())}).catch(e=>{if(!(!ae||oe)){if(n(e)===`terminal_session_not_found`){De({phase:`stopped`,gone:!0});return}Ee()}})},Ee=()=>{if(!ae||oe)return;C!==0&&Date.now()-C>id&&(S=1);let e=rd[Math.min(S-1,rd.length-1)]??1,t=S+1;De({phase:`waiting`,attempt:t,seconds:e}),se=setInterval(()=>{if(--e,e>0){De({phase:`waiting`,attempt:t,seconds:e});return}we()},1e3)};Qe.current={now:we,stop:()=>{oe=!0,clearInterval(se),De({phase:`stopped`,gone:!1})}},we(),Re.current=e=>b?.send(uu(e,o.modes.bracketedPasteMode));let Ae=du({container:t,terminal:o,paste:t=>{if(ed(t).requiresConfirmation){Le({sessionID:e.id,raw:t});return}Re.current(t)},clipboard:f,coarsePointer:()=>a,settings:()=>Ce.current,refuse:()=>Te(w(`terminal.clipboardRefused`)),enhancedKey:e=>yu(e,Ne.current)??g.encode(e),sendEnhancedKey:e=>b?.send(e)}),je=zl(o,t,fe);return()=>{ae=!1,p=!0,clearInterval(se),je(),O(),_e(),ve(),Ae(),_(),te.dispose(),re.dispose(),g.dispose(),ie.dispose(),u?.dispose(),m(),b?.close(),o.dispose(),Se.current=null,rt.current=()=>{},Re.current=()=>{},ke.current=()=>{}}},[e.id,r,ye,d]),(0,O.useEffect)(()=>{Se.current===null||he.current===null||(Se.current.options.theme=Ml(he.current,be))},[E,g,be]),(0,O.useEffect)(()=>{Se.current!==null&&(Se.current.options.fontFamily=D(v??``),xe.current?.())},[v]),(0,O.useEffect)(()=>{Se.current!==null&&Hu(Se.current.options,{cursorBlink:e.state!==`exited`&&pe(ce),fontSize:l??(window.matchMedia(`(max-width: 767px)`).matches?15:13),scrollback:x}).refit&&xe.current?.()},[l,ce,x,e.state]);let it=e.state===`connecting`||e.state===`reconnecting`?m(w,e):e.state===`connected`?w(`terminal.connected`):w(`terminal.exitedWith`,{code:String(e.exited?.code??0)}),at=ne(e),ot=ue(e),st=e.kind===`ssh`?e.alias:void 0;return(0,$.jsxs)(`section`,{ref:_e,"aria-label":w(`terminal.screenLabel`,{title:at}),className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,$.jsxs)(`div`,{className:`relative flex shrink-0 items-center gap-2 border-b border-line bg-toolbar px-2 ${le?`py-0`:`h-8`}`,children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${e.state===`exited`?`bg-ink-faint`:e.state===`reconnecting`||e.state===`connecting`||Ee.phase!==`live`?`bg-notice-ink`:`bg-live`}`}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 md:flex md:items-center md:gap-2`,children:[(0,$.jsx)(`div`,{className:`flex min-w-0 items-center gap-2 md:shrink-0`,children:(0,$.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-xs font-semibold text-ink md:max-w-48 md:flex-none`,children:at})}),(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-[11px] text-ink-muted md:flex-1`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:ot}),(0,$.jsx)(`span`,{role:`status`,className:`shrink-0`,children:it})]})]}),(0,$.jsx)(`button`,{type:`button`,"aria-label":w(`terminal.search`),title:w(`terminal.search`),className:`flex shrink-0 items-center justify-center rounded border border-control-line text-xs text-ink-muted hover:bg-select-fill active:bg-select-fill focus:bg-select-fill focus:outline-none ${le?`size-11`:`size-6`}`,onClick:Oe.toggle,children:(0,$.jsx)(_,{name:`search`,className:`size-3.5`})}),(0,$.jsx)(`button`,{ref:qe,type:`button`,"aria-label":w(`terminal.moreActions`),"aria-expanded":Ge,className:`flex shrink-0 items-center justify-center rounded border border-control-line text-ink-muted hover:bg-select-fill active:bg-select-fill focus:bg-select-fill focus:outline-none ${le?`size-11`:`size-6`}`,onClick:()=>Ke(e=>!e),children:(0,$.jsx)(_,{name:`moreHorizontal`,className:`size-3.5`})}),Ge?(0,$.jsx)(Du,{triggerRef:qe,osc52Enabled:Ae,onQuickCommands:()=>{We(Se.current?.getSelection()??``),He(!0)},onPortForwarding:e.kind===`ssh`?()=>Ye(!0):void 0,onOpenRemoteDirectory:e.kind===`ssh`&&e.alias!==void 0&&ze!==``&&ie!==void 0?()=>ie(e.alias,ze,`browse`):void 0,onCopyContext:()=>ke.current(),onToggleOsc52:async()=>{let e=!Ae;try{await S?.(e),je(e),Fe(w(e?`terminal.osc52Enabled`:`terminal.osc52Disabled`))}catch{Fe(w(`terminal.settingsSaveFailed`))}},onClose:()=>Ke(!1)}):null]}),(0,$.jsx)(Ju,{session:e,problem:we,link:Ee,onLinkNow:()=>Qe.current.now(),onLinkStop:()=>Qe.current.stop(),...o===void 0?{}:{onStopReconnect:o},...a===void 0?{}:{onReconnect:a}}),(0,$.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-clip bg-term-bg`,children:[(0,$.jsx)(`div`,{ref:he,"data-terminal-host":``,...g===void 0||g===``?{}:{"data-term-palette":g},...v===void 0||v===``?{}:{"data-term-font":v},...be?{"data-term-background":te??``}:{},style:be?{"--ui-term-image":`url("${ve}")`,"--ui-term-tint":String(re??55)}:void 0,className:`absolute inset-0 bg-term-bg`}),Oe.open?(0,$.jsx)(Ku,{search:Oe,mobile:le}):null,Pe===``?null:(0,$.jsx)(`p`,{role:`status`,className:`absolute bottom-3 right-3 z-20 max-w-[min(24rem,calc(100%-1.5rem))] rounded border border-line bg-toolbar/95 px-3 py-2 text-xs text-ink shadow-lg`,children:Pe})]}),Ve?(0,$.jsx)(Eu,{session:e,initialCommand:Ue,returnFocusRef:qe,onClose:()=>He(!1)}):null,Je?(0,$.jsx)(Ou,{session:e,...C===void 0?{}:{onChanged:C},onClose:()=>Ye(!1)}):null,Xe===null?null:(0,$.jsx)(Tu,{selection:Xe,onClose:()=>Ze(null),...st!==void 0&&ie!==void 0?{onRemotePath:(e,t)=>ie(st,e,t)}:{}}),Ie===null||Ie.sessionID!==e.id?null:(0,$.jsx)(nd,{target:e.alias??e.title,text:Ie.raw,onCancel:()=>Le(null),onPaste:e=>{Le(null),Re.current(e)}}),(0,$.jsx)(au,{modifiers:$e,onToggle:e=>et(t=>({...t,[e]:!t[e]})),onKey:e=>nt.current(e)})]})}export{ad as TerminalView}; \ No newline at end of file +`)?e.slice(0,-1):e}function nd({target:e,text:t,onCancel:n,onPaste:r}){let i=s(),[o,c]=(0,D.useState)(t),l=ed(o),u=(0,D.useRef)(null),d=(0,D.useId)(),f=(0,D.useId)();return(0,$.jsxs)(_,{labelledBy:d,describedBy:f,onDismiss:n,initialFocusRef:u,panelClassName:`flex max-h-[90dvh] overflow-y-auto w-full max-w-2xl flex-col gap-3 rounded-lg p-4`,children:[(0,$.jsx)(`h2`,{id:d,className:`text-base font-semibold text-ink`,children:i(`terminal.pasteHeading`,{target:e})}),(0,$.jsx)(`p`,{id:f,className:`text-sm text-ink-muted`,children:i(`terminal.pasteDescription`,{lines:String(l.lineCount)})}),(0,$.jsxs)(`ul`,{className:`list-disc space-y-1 pl-5 text-sm text-notice-ink`,children:[l.risks.includes(`line-break`)?(0,$.jsx)(`li`,{children:i(`terminal.pasteRiskLineBreak`)}):null,l.risks.includes(`control-character`)?(0,$.jsx)(`li`,{children:i(`terminal.pasteRiskControl`)}):null]}),(0,$.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm text-ink`,children:[i(`terminal.pasteEdit`),(0,$.jsx)(`textarea`,{value:o,onChange:e=>c(e.target.value),rows:6,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`w-full resize-y rounded border border-control-line bg-control p-3 font-mono text-xs focus:border-accent focus:outline-none`})]}),(0,$.jsxs)(`details`,{className:`group overflow-hidden rounded border border-control-line bg-control`,children:[(0,$.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 px-3 py-2 text-sm text-ink-muted hover:text-ink focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent [&::-webkit-details-marker]:hidden`,children:[(0,$.jsx)(p,{name:`chevronRight`,className:`size-3.5 shrink-0 transition-transform group-open:rotate-90`}),(0,$.jsx)(`span`,{children:i(`terminal.pastePreview`)})]}),(0,$.jsx)(`pre`,{"aria-label":i(`terminal.pastePreview`),className:`max-h-64 overflow-auto whitespace-pre-wrap break-all border-t border-control-line p-3 font-mono text-xs text-ink`,children:l.preview}),l.previewTruncated?(0,$.jsx)(`p`,{className:`border-t border-control-line px-3 py-2 text-xs text-ink-muted`,children:i(`terminal.pastePreviewTruncated`)}):null]}),(0,$.jsx)(`p`,{className:`text-xs font-medium text-notice-ink`,children:i(`terminal.pasteNotSent`)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,$.jsx)(a,{ref:u,onClick:n,children:i(`terminal.pasteCancel`)}),l.endsWithLineBreak?(0,$.jsx)(a,{kind:`primary`,onClick:()=>r(td(o)),children:i(`terminal.pasteWithoutFinalLineBreak`)}):null,(0,$.jsx)(a,{kind:`danger`,onClick:()=>r(o),children:i(`terminal.pasteSend`)})]})]})}var rd=[1,2,4,8,15],id=1e4;function ad({session:e,searchShortcutActive:t,api:n=le,onExit:r,onReconnect:i,onStopReconnect:a,copyOnSelect:c=!0,fontSize:l,rightClickPaste:u=!0,webgl:d=!0,palette:m,font:_,background:v,tint:ee,onOpenRemotePath:b,osc52Enabled:te=!1,scrollbackLines:S=5e3,onOsc52Change:re,onForwardsChanged:C,jisYenBackslash:w=!1}){let T=s(),{resolved:E}=ae(),se=ie(pe),ce=ie(ue),he=(0,D.useRef)(se);he.current=se;let ge=(0,D.useRef)(null),ve=(0,D.useRef)(null),ye=de(v??``),be=(v??``)!==``,xe=ye!==``,Se=(0,D.useRef)(null),Ce=(0,D.useRef)(null),we=(0,D.useRef)({copyOnSelect:c,rightClickPaste:u});we.current={copyOnSelect:c,rightClickPaste:u};let[Te,Ee]=(0,D.useState)(``),[De,Oe]=(0,D.useState)({phase:`connecting`,attempt:1}),ke=Gu({shortcutActive:t,region:ve}),Ae=(0,D.useRef)(()=>{}),[je,Me]=(0,D.useState)(te),Ne=(0,D.useRef)(te);Ne.current=je;let Pe=(0,D.useRef)(w);Pe.current=w;let[Fe,Ie]=(0,D.useState)(``),[Le,Re]=(0,D.useState)(null),ze=(0,D.useRef)(()=>{}),[Be,Ve]=(0,D.useState)(``),[He,Ue]=(0,D.useState)(!1),[We,Ge]=(0,D.useState)(``),[Ke,qe]=(0,D.useState)(!1),Je=(0,D.useRef)(null),[Ye,Xe]=(0,D.useState)(!1),[Ze,Qe]=(0,D.useState)(null),$e=(0,D.useRef)({now:()=>{},stop:()=>{}}),[et,tt]=(0,D.useState)({ctrl:!1,alt:!1}),nt=(0,D.useRef)(et);nt.current=et;let rt=(0,D.useRef)(()=>{}),it=(0,D.useRef)(()=>{});(0,D.useEffect)(()=>{Me(te),Ve(``),Re(null)},[te,e.id,e.state]),(0,D.useEffect)(()=>{if(Fe===``)return;let e=window.setTimeout(()=>Ie(``),2500);return()=>window.clearTimeout(e)},[Fe]),(0,D.useEffect)(()=>{let t=ge.current;if(t===null)return;let i=Yl(e=>window.matchMedia(e)),a;a=new jl({allowProposedApi:!0,allowTransparency:be,cols:80,rows:24,convertEol:!1,cursorBlink:e.state!==`exited`&&me(se),fontFamily:fe(_??``),fontSize:l??(window.matchMedia(`(max-width: 767px)`).matches?15:13),theme:Ml(t,xe),scrollback:S,linkHandler:{activate:(e,t,n)=>{let r=y(t,(a.buffer.active.getLine(n.start.y-1)?.translateToString(!0)??``).slice(n.start.x-1,n.end.x),n.start.x-1,n.end.x);if(r!==null){if(g(e)){wu(r.target);return}Qe({link:r,x:e.clientX+8,y:e.clientY+8})}}}});let s=new _e,c=new Pt({highlightLimit:1e3});a.loadAddon(s),a.loadAddon(c),a.open(t);let u=null,p=!1;Lu(a,{enabled:d,backgroundImage:be}).then(e=>{p?e?.dispose():u=e}),Ce.current=a;let m=ke.bind(a,c,t);Ae.current=()=>{let e=Il(a.buffer.active);if(e===``){Ie(T(`terminal.copyContextEmpty`));return}f.writeText(e).then(()=>Ie(T(`terminal.copyContextDone`))).catch(()=>Ee(T(`terminal.clipboardRefused`)))};let h=xu(a.parser),v=hu({parser:a.parser,enabled:()=>Ne.current,writeText:e=>f.writeText(e),copied:()=>Ie(T(`terminal.osc52Copied`)),refused:()=>Ee(T(`terminal.clipboardRefused`))}),ee=zu(a.parser,Ve),b=Vu(a,({durationMilliseconds:t})=>{t<3e4||!document.hidden||oe({title:`sshc`,body:T(`terminal.longCommandCompleted`,{subject:ne(e),seconds:String(Math.round(t/1e3))}),tag:`sshc-command-${e.id}`})}),te=Su(a,{remote:e.kind===`ssh`,open:wu,select:(e,t)=>Qe({link:e,x:t.clientX+8,y:t.clientY+8})}),x=null,re=!0,C=!1,ie=0,w=0,ae,E=new TextDecoder,ce,le=``,ue=()=>{let e=`${a.cols}x${a.rows}`;x===null||a.cols===0||a.rows===0||e===le||(le=e,x.resize(a.cols,a.rows))},de=()=>{if(!(t.clientWidth===0||t.clientHeight===0)){try{s.fit(),i&&Hl(a)}catch{return}ue(),a.refresh(0,Math.max(0,a.rows-1))}},pe=de;pe(),Se.current=de;let D=Zl(t,a,()=>Ul(a,t),{selectionHeld:()=>ql(t),reducedMotion:()=>he.current}),ve=i?Pl({container:t,textarea:a.textarea??t}):()=>{},ye=i?Jl(t,a):()=>{};it.current=e=>x?.send(e),rt.current=e=>{let{ctrl:t,alt:n}=nt.current,r=eu(e,t,n);x?.send(r),(t||n)&&tt({ctrl:!1,alt:!1})},a.onData(e=>{let{ctrl:t,alt:n}=nt.current,r=$l(e,t,n);it.current(r),(t||n)&&tt({ctrl:!1,alt:!1})});let Te=()=>{clearInterval(ae),C=!1,ie+=1,Oe({phase:`connecting`,attempt:ie}),n.terminalStreamTicket(e.id,ce).then(t=>{!re||C||(le=``,w=Date.now(),x=cu(t.streamTicket,{onReplay:e=>{ce=e.start,e.truncated&&(E=new TextDecoder,a.write(``),Ie(T(`terminal.replayTruncated`)))},onOutput:e=>{Re(null),a.write(E.decode(e,{stream:!0})),ce=(ce??0)+e.byteLength},onExit:()=>{a.options.cursorBlink=!1,C=!0,Re(null),Oe({phase:`live`}),r?.()},onClose:()=>{x=null,Re(null),De()}}),Oe({phase:`live`}),!i&&e.state!==`exited`&&!ke.hasFocus()&&a.focus(),ue())}).catch(e=>{if(!(!re||C)){if(o(e)===`terminal_session_not_found`){Oe({phase:`stopped`,gone:!0});return}De()}})},De=()=>{if(!re||C)return;w!==0&&Date.now()-w>id&&(ie=1);let e=rd[Math.min(ie-1,rd.length-1)]??1,t=ie+1;Oe({phase:`waiting`,attempt:t,seconds:e}),ae=setInterval(()=>{if(--e,e>0){Oe({phase:`waiting`,attempt:t,seconds:e});return}Te()},1e3)};$e.current={now:Te,stop:()=>{C=!0,clearInterval(ae),Oe({phase:`stopped`,gone:!1})}},Te(),ze.current=e=>x?.send(uu(e,a.modes.bracketedPasteMode));let je=du({container:t,terminal:a,paste:t=>{if(ed(t).requiresConfirmation){Re({sessionID:e.id,raw:t});return}ze.current(t)},clipboard:f,coarsePointer:()=>i,settings:()=>we.current,refuse:()=>Ee(T(`terminal.clipboardRefused`)),enhancedKey:e=>yu(e,Pe.current)??h.encode(e),sendEnhancedKey:e=>x?.send(e)}),Me=zl(a,t,pe);return()=>{re=!1,p=!0,clearInterval(ae),Me(),D(),ve(),ye(),je(),v(),ee.dispose(),b.dispose(),h.dispose(),te.dispose(),u?.dispose(),m(),x?.close(),a.dispose(),Ce.current=null,it.current=()=>{},ze.current=()=>{},Ae.current=()=>{}}},[e.id,n,be,d]),(0,D.useEffect)(()=>{Ce.current===null||ge.current===null||(Ce.current.options.theme=Ml(ge.current,xe))},[E,m,xe]),(0,D.useEffect)(()=>{Ce.current!==null&&(Ce.current.options.fontFamily=fe(_??``),Se.current?.())},[_]),(0,D.useEffect)(()=>{Ce.current!==null&&Hu(Ce.current.options,{cursorBlink:e.state!==`exited`&&me(se),fontSize:l??(window.matchMedia(`(max-width: 767px)`).matches?15:13),scrollback:S}).refit&&Se.current?.()},[l,se,S,e.state]);let at=e.state===`connecting`||e.state===`reconnecting`?h(T,e):e.state===`connected`?T(`terminal.connected`):T(`terminal.exitedWith`,{code:String(e.exited?.code??0)}),ot=ne(e),st=x(e),ct=e.kind===`ssh`?e.alias:void 0;return(0,$.jsxs)(`section`,{ref:ve,"aria-label":T(`terminal.screenLabel`,{title:ot}),className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,$.jsxs)(`div`,{className:`relative flex shrink-0 items-center gap-2 border-b border-line bg-toolbar px-2 ${ce?`py-0`:`h-8`}`,children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${e.state===`exited`?`bg-ink-faint`:e.state===`reconnecting`||e.state===`connecting`||De.phase!==`live`?`bg-notice-ink`:`bg-live`}`}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 md:flex md:items-center md:gap-2`,children:[(0,$.jsx)(`div`,{className:`flex min-w-0 items-center gap-2 md:shrink-0`,children:(0,$.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-xs font-semibold text-ink md:max-w-48 md:flex-none`,children:ot})}),(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-[11px] text-ink-muted md:flex-1`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:st}),(0,$.jsx)(`span`,{role:`status`,className:`shrink-0`,children:at})]})]}),(0,$.jsx)(`button`,{type:`button`,"aria-label":T(`terminal.search`),title:T(`terminal.search`),className:`flex shrink-0 items-center justify-center rounded border border-control-line text-xs text-ink-muted hover:bg-select-fill active:bg-select-fill focus:bg-select-fill focus:outline-none ${ce?`size-11`:`size-6`}`,onClick:ke.toggle,children:(0,$.jsx)(p,{name:`search`,className:`size-3.5`})}),(0,$.jsx)(`button`,{ref:Je,type:`button`,"aria-label":T(`terminal.moreActions`),"aria-expanded":Ke,className:`flex shrink-0 items-center justify-center rounded border border-control-line text-ink-muted hover:bg-select-fill active:bg-select-fill focus:bg-select-fill focus:outline-none ${ce?`size-11`:`size-6`}`,onClick:()=>qe(e=>!e),children:(0,$.jsx)(p,{name:`moreHorizontal`,className:`size-3.5`})}),Ke?(0,$.jsx)(Du,{triggerRef:Je,osc52Enabled:je,onQuickCommands:()=>{Ge(Ce.current?.getSelection()??``),Ue(!0)},onPortForwarding:e.kind===`ssh`?()=>Xe(!0):void 0,onOpenRemoteDirectory:e.kind===`ssh`&&e.alias!==void 0&&Be!==``&&b!==void 0?()=>b(e.alias,Be,`browse`):void 0,onCopyContext:()=>Ae.current(),onToggleOsc52:async()=>{let e=!je;try{await re?.(e),Me(e),Ie(T(e?`terminal.osc52Enabled`:`terminal.osc52Disabled`))}catch{Ie(T(`terminal.settingsSaveFailed`))}},onClose:()=>qe(!1)}):null]}),(0,$.jsx)(Ju,{session:e,problem:Te,link:De,onLinkNow:()=>$e.current.now(),onLinkStop:()=>$e.current.stop(),...a===void 0?{}:{onStopReconnect:a},...i===void 0?{}:{onReconnect:i}}),(0,$.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-clip bg-term-bg`,children:[(0,$.jsx)(`div`,{ref:ge,"data-terminal-host":``,...m===void 0||m===``?{}:{"data-term-palette":m},..._===void 0||_===``?{}:{"data-term-font":_},...xe?{"data-term-background":v??``}:{},style:xe?{"--ui-term-image":`url("${ye}")`,"--ui-term-tint":String(ee??55)}:void 0,className:`absolute inset-0 bg-term-bg`}),ke.open?(0,$.jsx)(Ku,{search:ke,mobile:ce}):null,Fe===``?null:(0,$.jsx)(`p`,{role:`status`,className:`absolute bottom-3 right-3 z-20 max-w-[min(24rem,calc(100%-1.5rem))] rounded border border-line bg-toolbar/95 px-3 py-2 text-xs text-ink shadow-lg`,children:Fe})]}),He?(0,$.jsx)(Eu,{session:e,initialCommand:We,returnFocusRef:Je,onClose:()=>Ue(!1)}):null,Ye?(0,$.jsx)(Ou,{session:e,...C===void 0?{}:{onChanged:C},onClose:()=>Xe(!1)}):null,Ze===null?null:(0,$.jsx)(Tu,{selection:Ze,onClose:()=>Qe(null),...ct!==void 0&&b!==void 0?{onRemotePath:(e,t)=>b(ct,e,t)}:{}}),Le===null||Le.sessionID!==e.id?null:(0,$.jsx)(nd,{target:e.alias??e.title,text:Le.raw,onCancel:()=>Re(null),onPaste:e=>{Re(null),ze.current(e)}}),(0,$.jsx)(au,{modifiers:et,onToggle:e=>tt(t=>({...t,[e]:!t[e]})),onKey:e=>rt.current(e)})]})}export{ad as TerminalView}; \ No newline at end of file diff --git a/internal/ui/dist/assets/api-DomXbahF.js b/internal/ui/dist/assets/api-DomXbahF.js deleted file mode 100644 index 7362cbe32..000000000 --- a/internal/ui/dist/assets/api-DomXbahF.js +++ /dev/null @@ -1 +0,0 @@ -import{S as e,d as t,g as n,u as r}from"./surface-Ck_FblzE.js";var i=`private_key.reveal`,a=`trash.purge`;function o(e){return e.items.filter(e=>e.kind===`private_key`)}function s(t){return e(`KeyInventoryResponse`,t)}function c(t){return e(`AgentIdentitiesResponse`,t)}function l(t){return e(`KeyAlgorithmsResponse`,t)}function u(t){return e(`RevealPrivateKeyResponse`,t)}function d(t){return e(`RegisterKeyResponse`,t)}function f(t){return e(`PublicKeyResponse`,t)}function p(t){return e(`RelocateKeyResponse`,t)}function m(t){return e(`TrashListResponse`,t)}function h(t){return e(`RestoreTrashResponse`,t)}var g={async inventory(){return s(await n.read(`/api/v1/keys`))},async algorithms(){return l(await n.read(`/api/v1/keys/algorithms`))},generate:e=>n.mutate(`/api/v1/keys`,{method:`POST`,headers:t,body:JSON.stringify({algorithm:e.algorithm,bits:e.bits??0,fileName:e.fileName,group:e.group,comment:e.comment,passphrase:e.passphrase,unencrypted:e.unencrypted})}),hardwareCommand:e=>n.mutate(`/api/v1/keys/hardware-command`,{method:`POST`,headers:t,body:JSON.stringify(e)}),changePassphrase:(e,r)=>n.mutate(`/api/v1/keys/${encodeURIComponent(e)}/passphrase`,{method:`POST`,headers:t,body:JSON.stringify(r)}),async reveal(e){let t=await r(i,e);return u(await n.mutate(`/api/v1/keys/${encodeURIComponent(e)}/reveal`,{method:`POST`,headers:{"X-SSHC-Action":t}}))},async publicKey(e){return f(await n.read(`/api/v1/keys/${encodeURIComponent(e)}/public`))},async relocate(e,r){let i=await n.send(`/api/v1/keys/${encodeURIComponent(e)}/location`,{method:`POST`,headers:t,body:JSON.stringify(r)});if(!i.ok&&i.status!==409)throw Error(`api_mutation_failed`);return p(await i.json())},async registerWithAgent(e,r){return d(await n.mutate(`/api/v1/keys/${encodeURIComponent(e)}/agent`,{method:`POST`,headers:t,body:JSON.stringify(r)}))},async deregisterFromAgent(e){return c(await n.mutate(`/api/v1/keys/${encodeURIComponent(e)}/agent`,{method:`DELETE`}))},trash:e=>n.mutate(`/api/v1/keys/${encodeURIComponent(e)}/trash`,{method:`POST`}),async listTrash(){return m(await n.read(`/api/v1/trash`))},async restore(e){let t=await n.send(`/api/v1/trash/${encodeURIComponent(e)}/restore`,{method:`POST`});if(!t.ok&&t.status!==409)throw Error(`api_mutation_failed`);return h(await t.json())},async purge(e){let t=await r(a,e);return n.mutate(`/api/v1/trash/${encodeURIComponent(e)}`,{method:`DELETE`,headers:{"X-SSHC-Action":t}})}};export{o as n,g as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/api-ic2UgGYC.js b/internal/ui/dist/assets/api-ic2UgGYC.js new file mode 100644 index 000000000..0c8ce069c --- /dev/null +++ b/internal/ui/dist/assets/api-ic2UgGYC.js @@ -0,0 +1 @@ +import{d as e,m as t,u as n,v as r,w as i}from"./surface-DPFJ-mE2.js";var a=`private_key.reveal`,o=`trash.purge`;function s(e){return e.items.filter(e=>e.kind===`private_key`)}function c(e){return i(`KeyInventoryResponse`,e)}function l(e){return i(`AgentIdentitiesResponse`,e)}function u(e){return i(`KeyAlgorithmsResponse`,e)}function d(e){return i(`RevealPrivateKeyResponse`,e)}function f(e){return i(`RegisterKeyResponse`,e)}function p(e){return i(`PublicKeyResponse`,e)}function m(e){return i(`RelocateKeyResponse`,e)}function h(e){return i(`TrashListResponse`,e)}function g(e){return i(`RestoreTrashResponse`,e)}var _={async inventory(){return c(await r.read(`/api/v1/keys`))},async algorithms(){return u(await r.read(`/api/v1/keys/algorithms`))},generate:e=>t(`/api/v1/keys`,{algorithm:e.algorithm,bits:e.bits??0,fileName:e.fileName,group:e.group,comment:e.comment,passphrase:e.passphrase,unencrypted:e.unencrypted}),hardwareCommand:e=>t(`/api/v1/keys/hardware-command`,e),changePassphrase:(e,n)=>t(`/api/v1/keys/${encodeURIComponent(e)}/passphrase`,n),async reveal(e){let t=await n(a,e);return d(await r.mutate(`/api/v1/keys/${encodeURIComponent(e)}/reveal`,{method:`POST`,headers:{"X-SSHC-Action":t}}))},async publicKey(e){return p(await r.read(`/api/v1/keys/${encodeURIComponent(e)}/public`))},async relocate(t,n){let i=await r.send(`/api/v1/keys/${encodeURIComponent(t)}/location`,{method:`POST`,headers:e,body:JSON.stringify(n)});if(!i.ok&&i.status!==409)throw Error(`api_mutation_failed`);return m(await i.json())},async registerWithAgent(e,n){return f(await t(`/api/v1/keys/${encodeURIComponent(e)}/agent`,n))},async deregisterFromAgent(e){return l(await r.mutate(`/api/v1/keys/${encodeURIComponent(e)}/agent`,{method:`DELETE`}))},trash:e=>r.mutate(`/api/v1/keys/${encodeURIComponent(e)}/trash`,{method:`POST`}),async listTrash(){return h(await r.read(`/api/v1/trash`))},async restore(e){let t=await r.send(`/api/v1/trash/${encodeURIComponent(e)}/restore`,{method:`POST`});if(!t.ok&&t.status!==409)throw Error(`api_mutation_failed`);return g(await t.json())},async purge(e){let t=await n(o,e);return r.mutate(`/api/v1/trash/${encodeURIComponent(e)}`,{method:`DELETE`,headers:{"X-SSHC-Action":t}})}};export{s as n,_ as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/credentials-Ck0fkrY6.js b/internal/ui/dist/assets/credentials-Ck0fkrY6.js deleted file mode 100644 index 8e9004b72..000000000 --- a/internal/ui/dist/assets/credentials-Ck0fkrY6.js +++ /dev/null @@ -1 +0,0 @@ -import{S as e,d as t,g as n,u as r}from"./surface-Ck_FblzE.js";var i=`credential.reveal`;function a(e,t){return`/api/v1/credentials/${e}/${encodeURIComponent(t)}`}function o(t){return e(`CredentialList`,t)}function s(t){return e(`RevealCredentialResponse`,t)}function c(t){return e(`TOTPCodeSet`,t)}var l={async credentials(){return o(await n.read(`/api/v1/credentials`))},async storeCredential(e,t,r){return o(await n.mutate(a(e,t),{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({secret:r})}))},async revealCredential(e,t){let o=await r(i,`${e}\n${t}`);return s(await n.mutate(`${a(e,t)}/reveal`,{method:`POST`,headers:{"X-SSHC-Action":o}}))},async totpCodes(e){let t=await r(i,`totp\n${e}`);return c(await n.mutate(`${a(`totp`,e)}/codes`,{method:`POST`,headers:{"X-SSHC-Action":t}}))},async updateCredential(e,r,i,s){return o(await n.mutate(a(e,r),{method:`PATCH`,headers:t,body:JSON.stringify({name:i,secret:s})}))},async deleteCredential(e,t){return o(await n.mutate(a(e,t),{method:`DELETE`}))},async assignCredential(e,t,r){return o(await n.mutate(`/api/v1/credentials/${e}/assign`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({subject:t,name:r})}))},async unassignCredential(e,t){return o(await n.mutate(`/api/v1/credentials/${e}/assign/${encodeURIComponent(t)}`,{method:`DELETE`}))}};export{l as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/credentials-HxEBLVTm.js b/internal/ui/dist/assets/credentials-HxEBLVTm.js new file mode 100644 index 000000000..a816b5281 --- /dev/null +++ b/internal/ui/dist/assets/credentials-HxEBLVTm.js @@ -0,0 +1 @@ +import{f as e,h as t,u as n,v as r,w as i}from"./surface-DPFJ-mE2.js";var a=`credential.reveal`;function o(e,t){return`/api/v1/credentials/${e}/${encodeURIComponent(t)}`}function s(e){return i(`CredentialList`,e)}function c(e){return i(`RevealCredentialResponse`,e)}function l(e){return i(`TOTPCodeSet`,e)}var u={async credentials(){return s(await r.read(`/api/v1/credentials`))},async storeCredential(e,n,r){return s(await t(o(e,n),{secret:r}))},async revealCredential(e,t){let i=await n(a,`${e}\n${t}`);return c(await r.mutate(`${o(e,t)}/reveal`,{method:`POST`,headers:{"X-SSHC-Action":i}}))},async totpCodes(e){let t=await n(a,`totp\n${e}`);return l(await r.mutate(`${o(`totp`,e)}/codes`,{method:`POST`,headers:{"X-SSHC-Action":t}}))},async updateCredential(t,n,r,i){return s(await e(o(t,n),{name:r,secret:i}))},async deleteCredential(e,t){return s(await r.mutate(o(e,t),{method:`DELETE`}))},async assignCredential(e,n,r){return s(await t(`/api/v1/credentials/${e}/assign`,{subject:n,name:r}))},async unassignCredential(e,t){return s(await r.mutate(`/api/v1/credentials/${e}/assign/${encodeURIComponent(t)}`,{method:`DELETE`}))}};export{u as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/diagnostics-C7nSnivf.js b/internal/ui/dist/assets/diagnostics-C7nSnivf.js new file mode 100644 index 000000000..2c8962c43 --- /dev/null +++ b/internal/ui/dist/assets/diagnostics-C7nSnivf.js @@ -0,0 +1 @@ +import{m as e,p as t,u as n,w as r}from"./surface-DPFJ-mE2.js";var i=`diagnostics.reachability`,a=`diagnostics.authentication`;function o(e){return r(`ConfigCheckResponse`,e)}function s(e){return r(`EffectiveResponse`,e)}function c(e){return r(`ReachabilityResponse`,e)}function l(e){return r(`AuthenticationResponse`,e)}var u={async configCheck(){return o(await t(`/api/v1/diagnostics/config`))},async effective(t){return s(await e(`/api/v1/diagnostics/effective`,{alias:t}))},async reachability(t){let r=await n(i,t);return c(await e(`/api/v1/diagnostics/reachability`,{alias:t},r))},async authentication(t,r){let i=await n(a,t);return l(await e(`/api/v1/diagnostics/authentication`,{alias:t,acknowledgeExecutable:r},i))}};export{u as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/diagnostics-Clvm8IB7.js b/internal/ui/dist/assets/diagnostics-Clvm8IB7.js deleted file mode 100644 index 9c1e27af7..000000000 --- a/internal/ui/dist/assets/diagnostics-Clvm8IB7.js +++ /dev/null @@ -1 +0,0 @@ -import{S as e,f as t,p as n,u as r}from"./surface-Ck_FblzE.js";var i=`diagnostics.reachability`,a=`diagnostics.authentication`;function o(t){return e(`ConfigCheckResponse`,t)}function s(t){return e(`EffectiveResponse`,t)}function c(t){return e(`ReachabilityResponse`,t)}function l(t){return e(`AuthenticationResponse`,t)}var u={async configCheck(){return o(await t(`/api/v1/diagnostics/config`))},async effective(e){return s(await n(`/api/v1/diagnostics/effective`,{alias:e}))},async reachability(e){let t=await r(i,e);return c(await n(`/api/v1/diagnostics/reachability`,{alias:e},t))},async authentication(e,t){let i=await r(a,e);return l(await n(`/api/v1/diagnostics/authentication`,{alias:e,acknowledgeExecutable:t},i))}};export{u as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/editor.api-BUrKrayv.js b/internal/ui/dist/assets/editor.api-BJ0kNDCq.js similarity index 99% rename from internal/ui/dist/assets/editor.api-BUrKrayv.js rename to internal/ui/dist/assets/editor.api-BJ0kNDCq.js index a20378656..dc47aa2bd 100644 --- a/internal/ui/dist/assets/editor.api-BUrKrayv.js +++ b/internal/ui/dist/assets/editor.api-BJ0kNDCq.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-DJ8h9zNi.js";function t(e){if(e.length===0)throw Error(`Invalid tail call`);return[e.slice(0,e.length-1),e[e.length-1]]}function n(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;rn(e[r],t))}function a(e,t){let n=0,r=e-1;for(;n<=r;){let e=(n+r)/2|0,i=t(e);if(i<0)n=e+1;else if(i>0)r=e-1;else return e}return-(n+1)}function o(e,t,n){if(e|=0,e>=t.length)throw TypeError(`invalid index`);let r=t[Math.floor(t.length*Math.random())],i=[],a=[],s=[];for(let e of t){let t=n(e,r);t<0?i.push(e):t>0?a.push(e):s.push(e)}return e!!e)}function f(e){let t=0;for(let n=0;n0}function h(e,t=e=>e){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function g(e,t){let n=typeof t==`number`?e:0;typeof t==`number`?n=e:(n=0,t=e);let r=[];if(n<=t)for(let e=n;et;e--)r.push(e);return r}function _(e,t,n){let r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function v(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function y(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function b(e,t){for(let n of t)e.push(n)}function x(e,t){let n=[];for(let r of e){let e=t(r);e!==void 0&&n.push(e)}return n}function S(e){return Array.isArray(e)?e:[e]}function C(e,t,n){let r=ee(e,t),i=e.length,a=n.length;e.length=i+a;for(let t=i-1;t>=r;t--)e[t+a]=e[t];for(let t=0;t0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(te||={});function ne(e,t){return(n,r)=>t(e(n),e(r))}function re(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(!te.isNeitherLessOrGreaterThan(e))return e}return te.neitherLessOrGreaterThan}}var ie=(e,t)=>e-t,ae=(e,t)=>ie(+!!e,+!!t);function oe(e){return(t,n)=>-e(t,n)}function se(e){return(t,n)=>t===void 0?n===void 0?te.neitherLessOrGreaterThan:te.lessThan:n===void 0?te.greaterThan:e(t,n)}var ce=class{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||te.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}},ue=class e{constructor(e){this._indexMap=e}static createSortPermutation(t,n){let r=Array.from(t.keys()).sort((e,r)=>n(t[e],t[r]));return new e(r)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let t=this._indexMap.slice();for(let e=0;ee+t,0)}var fe=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?we.isErrorNoTelemetry(e)?new we(e.message+` +import{s as e}from"./index-DtC-pXtZ.js";function t(e){if(e.length===0)throw Error(`Invalid tail call`);return[e.slice(0,e.length-1),e[e.length-1]]}function n(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;rn(e[r],t))}function a(e,t){let n=0,r=e-1;for(;n<=r;){let e=(n+r)/2|0,i=t(e);if(i<0)n=e+1;else if(i>0)r=e-1;else return e}return-(n+1)}function o(e,t,n){if(e|=0,e>=t.length)throw TypeError(`invalid index`);let r=t[Math.floor(t.length*Math.random())],i=[],a=[],s=[];for(let e of t){let t=n(e,r);t<0?i.push(e):t>0?a.push(e):s.push(e)}return e!!e)}function f(e){let t=0;for(let n=0;n0}function h(e,t=e=>e){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function g(e,t){let n=typeof t==`number`?e:0;typeof t==`number`?n=e:(n=0,t=e);let r=[];if(n<=t)for(let e=n;et;e--)r.push(e);return r}function _(e,t,n){let r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function v(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function y(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function b(e,t){for(let n of t)e.push(n)}function x(e,t){let n=[];for(let r of e){let e=t(r);e!==void 0&&n.push(e)}return n}function S(e){return Array.isArray(e)?e:[e]}function C(e,t,n){let r=ee(e,t),i=e.length,a=n.length;e.length=i+a;for(let t=i-1;t>=r;t--)e[t+a]=e[t];for(let t=0;t0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(te||={});function ne(e,t){return(n,r)=>t(e(n),e(r))}function re(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(!te.isNeitherLessOrGreaterThan(e))return e}return te.neitherLessOrGreaterThan}}var ie=(e,t)=>e-t,ae=(e,t)=>ie(+!!e,+!!t);function oe(e){return(t,n)=>-e(t,n)}function se(e){return(t,n)=>t===void 0?n===void 0?te.neitherLessOrGreaterThan:te.lessThan:n===void 0?te.greaterThan:e(t,n)}var ce=class{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||te.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}},ue=class e{constructor(e){this._indexMap=e}static createSortPermutation(t,n){let r=Array.from(t.keys()).sort((e,r)=>n(t[e],t[r]));return new e(r)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let t=this._indexMap.slice();for(let e=0;ee+t,0)}var fe=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?we.isErrorNoTelemetry(e)?new we(e.message+` `+e.stack):Error(e.message+` diff --git a/internal/ui/dist/assets/fonts-CUObG_Dx.js b/internal/ui/dist/assets/fonts-Dday_bgd.js similarity index 87% rename from internal/ui/dist/assets/fonts-CUObG_Dx.js rename to internal/ui/dist/assets/fonts-Dday_bgd.js index 3758a274d..8f58bd45f 100644 --- a/internal/ui/dist/assets/fonts-CUObG_Dx.js +++ b/internal/ui/dist/assets/fonts-Dday_bgd.js @@ -1 +1 @@ -import{n as e}from"./jsx-runtime-QtymfJMM.js";import{g as t}from"./surface-Ck_FblzE.js";var n=e();async function r(e){let n=await t.send(`/api/v1/terminal/backgrounds/${encodeURIComponent(e)}`,{method:`GET`});if(!n.ok)throw Error(`background_unreadable`);let r=await n.blob();return await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>typeof n.result==`string`?e(n.result):t(Error(`background_unreadable`)),n.onerror=()=>t(Error(`background_unreadable`)),n.readAsDataURL(r)})}function i(e){let[t,i]=(0,n.useState)(``);return(0,n.useEffect)(()=>{if(e===``){i(``);return}let t=!0;return r(e).then(e=>{t&&i(e)}).catch(()=>void 0),()=>{t=!1}},[e]),t}var a=[{name:`jetbrains-mono`,label:`JetBrains Mono`,stack:`"JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Roboto Mono", "Droid Sans Mono", monospace`}];function o(e){return a.find(t=>t.name===e)??null}function s(e){return o(e)?.stack??`ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Roboto Mono", "Droid Sans Mono", monospace`}export{a as n,i as r,s as t}; \ No newline at end of file +import{o as e}from"./jsx-runtime-BOsSdQ68.js";import{v as t}from"./surface-DPFJ-mE2.js";var n=e();async function r(e){let n=await t.send(`/api/v1/terminal/backgrounds/${encodeURIComponent(e)}`,{method:`GET`});if(!n.ok)throw Error(`background_unreadable`);let r=await n.blob();return await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>typeof n.result==`string`?e(n.result):t(Error(`background_unreadable`)),n.onerror=()=>t(Error(`background_unreadable`)),n.readAsDataURL(r)})}function i(e){let[t,i]=(0,n.useState)(``);return(0,n.useEffect)(()=>{if(e===``){i(``);return}let t=!0;return r(e).then(e=>{t&&i(e)}).catch(()=>void 0),()=>{t=!1}},[e]),t}var a=[{name:`jetbrains-mono`,label:`JetBrains Mono`,stack:`"JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Roboto Mono", "Droid Sans Mono", monospace`}];function o(e){return a.find(t=>t.name===e)??null}function s(e){return o(e)?.stack??`ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Roboto Mono", "Droid Sans Mono", monospace`}export{a as n,i as r,s as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/form-C1olpQVF.js b/internal/ui/dist/assets/form-C1olpQVF.js deleted file mode 100644 index 2d829eb30..000000000 --- a/internal/ui/dist/assets/form-C1olpQVF.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";var n=e(),r={en:{"shortcuts.heading":`Keyboard shortcuts`,"shortcuts.description":`Share shortcut presets and choose one for this browser.`,"shortcuts.confirmDelete":`Delete this preset on all synced devices?`,"shortcuts.deleteEverywhere":`Delete everywhere`,"shortcuts.cancelDelete":`Cancel`,"shortcuts.preset":`Preset for this browser`,"shortcuts.defaultPreset":`Default`,"shortcuts.presetName":`Preset name`,"shortcuts.duplicate":`Save a copy`,"shortcuts.rename":`Rename`,"shortcuts.delete":`Delete preset`,"shortcuts.reloadRequired":`Could not save or load presets. Reload to get the latest version before editing.`,"shortcuts.reload":`Reload`,"shortcuts.loading":`Loading presets…`,"shortcuts.hint":`Click a binding, then press a key with Ctrl, Alt or Meta (Command), or a function key. Escape cancels; Tab moves to the next control. Preset contents sync between devices; the selected preset stays in this browser. Editing Default creates your own preset. Deleting a selected preset restores defaults. Browser or OS shortcuts may take priority. Copy, paste and terminal search apply inside the terminal.`,"shortcuts.palette":`Command search`,"shortcuts.terminalSearch":`Terminal search`,"shortcuts.copy":`Copy selection`,"shortcuts.paste":`Paste`,"shortcuts.nextSession":`Next connection`,"shortcuts.previousSession":`Previous connection`,"shortcuts.home":`Open Home`,"shortcuts.sftp":`Open SFTP`,"shortcuts.assign":`Assign shortcut: {action}`,"shortcuts.clearAction":`Clear shortcut: {action}`,"shortcuts.clear":`Clear`,"shortcuts.recording":`Press keys… (Esc to cancel)`,"shortcuts.unassigned":`Unassigned`,"shortcuts.reset":`Restore defaults`,"shortcuts.saved":`Shortcuts saved.`,"shortcuts.saveFailed":`Could not save. Reload the presets and check the connection and browser storage permissions.`,"shortcuts.conflict":`Already assigned to {action}. Clear that binding first.`,"shell.title":`sshc`,"shell.starting":`Starting secure local session…`,"shell.vaultChecking":`Checking that the vault is still unlocked before restoring protected content…`,"shell.vaultCheckRetrying":`The vault state could not be confirmed. Protected content remains hidden while sshc retries.`,"shell.active":`Local session active · {version}`,"shell.bootstrapFailed":`Secure local session could not be started. Run sshc in a terminal to enrol this browser again.`,"shell.bootstrapRetry":`Try again`,"shell.sessionEndedHeading":`Session ended`,"shell.sessionEnded":`Reload to recover the local session automatically. If this browser is no longer enrolled, run sshc in a terminal once.`,"shell.sessionReload":`Reload session`,"shell.pageNotFound":`Page not found`,"shell.pageNotFoundDescription":`No sshc section exists at this URL.`,"shell.goHome":`Go to Home`,"shell.primaryNavigation":`Primary`,"shell.navigationToggle":`Navigation`,"shell.navigationResize":`Resize navigation`,"shell.sessions":`Sessions`,"shell.navStart":`Start`,"shell.navConnections":`Connection files`,"shell.navKeysHosts":`Keys and hosts`,"shell.navVault":`Vault`,"shell.navMaintenance":`Maintenance`,"menu.open":`Open {section}`,"menu.displaySettings":`Preferences`,"menu.theme":`Theme`,"menu.language":`Language`,"shell.inspectorShowNamed":`Show {label}`,"shell.inspectorHideNamed":`Hide {label}`,"shell.inspectorAttention":`Needs attention`,"palette.open":`Search everything`,"palette.heading":`Search sessions, hosts, files, snippets and settings`,"palette.placeholder":`Search sessions, hosts, files, snippets and settings`,"palette.results":`Search results`,"palette.loading":`Loading searchable items…`,"palette.empty":`No matching items`,"palette.hint":`↑↓ Select · Enter Open · Esc Close`,"palette.connectHost":`Connect to {alias}`,"palette.openHostSettings":`Open connection settings for {alias}`,"palette.openSection":`Open section`,"palette.kind.session":`Session`,"palette.kind.host":`Host`,"palette.kind.file":`File`,"palette.kind.snippet":`Snippet`,"palette.kind.setting":`Setting`,"palette.kind.command":`Action`,"palette.newConnection":`Create a connection`,"palette.newConnectionDetail":`Open the new connection form`,"palette.openRemoteFiles":`Open remote files`,"palette.openRemoteFilesDetail":`Browse a host over SFTP`,"palette.openLocalShell":`Open a local shell`,"palette.openLocalShellDetail":`Start a terminal on this machine`,"palette.lockVault":`Lock the vault`,"palette.lockVaultDetail":`Require the master password again`,"table.sortAscending":`, sort ascending`,"table.sortDescending":`, sort descending`,"section.files":`SFTP`,"section.snippets":`Snippets`,"sftp.heading":`Remote files`,"sftp.tabs":`Remote file tabs`,"sftp.primaryTabs":`Left pane tabs`,"sftp.secondaryTabs":`Right pane tabs`,"sftp.newTab":`New tab`,"sftp.closeTab":`Close the {name} tab`,"sftp.resizePanes":`Resize the panes`,"sftp.dropTabLeft":`Open in a new left pane`,"sftp.dropTabRight":`Open in a new right pane`,"sftp.dropTabHere":`Move to this pane`,"sftp.firstPane":`First remote pane`,"sftp.secondPane":`Second remote pane`,"sftp.local.heading":`Local files`,"sftp.local.connection":`Local`,"sftp.local.engine":`sshc engine`,"sftp.local.path":`Local folder path`,"sftp.local.editPath":`Edit local path`,"sftp.local.pathInput":`Engine filesystem path`,"sftp.local.upload":`Upload selection`,"sftp.local.loading":`Reading the local directory…`,"sftp.local.dropZone":`Local file list and drop zone`,"sftp.local.connectRemote":`Connect the remote pane to upload files.`,"sftp.host":`Host`,"sftp.noHosts":`No saved hosts`,"sftp.chooseHost":`Select a host`,"sftp.chooseHostHint":`Choose Local or a saved SSH host. Connect after choosing an SSH host.`,"sftp.connect":`Connect`,"sftp.connecting":`Connecting to {alias}…`,"sftp.readyToConnect":`{alias} is disconnected`,"sftp.connectHint":`SFTP does not connect just because you opened the screen or restored a saved tab.`,"sftp.loading":`Reading the remote directory…`,"sftp.retry":`Try again`,"sftp.emptyDirectory":`This directory is empty.`,"sftp.noFilterMatches":`Nothing here matches the filter.`,"sftp.clearFilterHint":`Clear the filter to see every entry again.`,"sftp.undo":`Undo`,"sftp.dismissUndo":`Dismiss undo notification`,"sftp.renamedTo":`Renamed to {name}.`,"sftp.permissionsChanged":`Permissions set to {mode}.`,"sftp.leaveHeading":`Leave without saving?`,"sftp.leaveBody":`{path} has changes that are not written to the server.`,"sftp.leaveDiscard":`Discard and leave`,"sftp.leaveStay":`Keep editing`,"sftp.chooseHostHeading":`Choose a connection`,"sftp.closeHostPicker":`Close host picker`,"sftp.searchHosts":`Search connections`,"sftp.searchHostsPlaceholder":`Search aliases, groups, hosts or users`,"sftp.hostViews":`Host list view`,"sftp.recentHosts":`Recent`,"sftp.hostGroups":`Groups`,"sftp.ungroupedHosts":`No group`,"sftp.noHostMatches":`No host matches this search.`,"sftp.hostNoDetails":`SSH host`,"sftp.hostCurrent":`Current`,"sftp.lastConnected":`Last connected {at}`,"sftp.connectionFailed":`Could not connect.`,"sftp.path":`Remote path`,"sftp.editPath":`Edit path`,"sftp.go":`Go`,"sftp.navigation":`Directory navigation`,"sftp.back":`Back`,"sftp.forward":`Forward`,"sftp.homeDirectory":`Home directory`,"sftp.rootDirectory":`Root directory`,"sftp.filter":`Filter entries`,"sftp.filterPlaceholder":`Filter`,"sftp.searchBelow":`Search everything under this directory`,"sftp.searchResults":`{count} matches for “{query}” under {path}`,"sftp.searchResultsTruncated":`First {count} matches for “{query}” under {path}; the search stopped early.`,"sftp.searchNoMatches":`Nothing under this directory is named like “{query}”.`,"sftp.searchEnd":`Leave search`,"sftp.revealInFolder":`Go to containing folder`,"sftp.up":`Up`,"sftp.parentDirectory":`Parent directory`,"sftp.createActions":`Create or upload`,"sftp.noSelectionActions":`Select an item to see actions`,"sftp.selectedActions":`Actions for {name}`,"sftp.selectedActionsCount":`Actions for {count} selected items`,"sftp.selected":`Selected: {name}`,"sftp.selectedCount":`{count} selected`,"sftp.selectedCountSize":`{count} selected · {size}`,"sftp.selectAll":`Select all entries`,"sftp.selectEntry":`Select {name}`,"sftp.clearSelection":`Clear selection`,"sftp.invertSelection":`Invert selection`,"sftp.copyName":`Copy name`,"sftp.copyNames":`Copy names`,"sftp.copyPath":`Copy full path`,"sftp.copyPaths":`Copy full paths`,"sftp.openFolder":`Open folder`,"sftp.editFile":`Edit file`,"sftp.newFolder":`New folder`,"sftp.newFile":`New empty file`,"sftp.duplicate":`Duplicate`,"sftp.moveTo":`Move to folder`,"sftp.move":`Move`,"sftp.upload":`Upload`,"sftp.uploadFolder":`Upload folder`,"sftp.dropZone":`Upload files or folders to the current remote directory`,"sftp.uploads":`File uploads`,"sftp.upload.pending":`Waiting`,"sftp.upload.queued":`Queued`,"sftp.upload.uploading":`Uploading…`,"sftp.upload.paused":`Paused`,"sftp.upload.reattach":`Select the same file to resume`,"sftp.upload.needs_overwrite":`Overwrite confirmation required`,"sftp.upload.done":`Uploaded`,"sftp.upload.failed":`Failed`,"sftp.upload.skipped":`Skipped`,"sftp.upload.cancelled":`Cancelled`,"sftp.cancelTransfer":`Cancel transfer`,"sftp.activeTransfers":`{count} active`,"sftp.transfer.pause":`Pause`,"sftp.transfer.resume":`Resume`,"sftp.transfer.clear":`Clear finished`,"sftp.manager.heading":`Transfer Manager`,"sftp.manager.summaryRunning":`{count} active · {progress}% · {speed}/s`,"sftp.manager.summaryIdle":`{count} transfers`,"sftp.manager.actions":`Transfer queue actions`,"sftp.manager.concurrency":`Concurrent transfers`,"sftp.manager.autoClear":`Clear finished after`,"sftp.manager.autoClearOff":`Keep`,"sftp.manager.largeFileThreshold":`Split at`,"sftp.manager.largeFileParallelism":`Streams`,"sftp.manager.largeFileChunk":`Chunk`,"sftp.manager.stopProcessing":`Stop starting new transfers`,"sftp.manager.startProcessing":`Resume processing the transfer queue`,"sftp.manager.status.held":`Held`,"sftp.manager.resize":`Drag to resize the transfer queue`,"sftp.manager.moveUp":`Move {name} earlier in the queue`,"sftp.manager.moveDown":`Move {name} later in the queue`,"sftp.manager.collapse":`Collapse Transfer Manager`,"sftp.manager.expand":`Expand Transfer Manager`,"sftp.manager.pauseAll":`Pause all`,"sftp.manager.resumeAll":`Resume all`,"sftp.manager.cancelAll":`Cancel all`,"sftp.manager.clearFailed":`Remove failed transfers from the list`,"sftp.manager.remove":`Remove from list`,"sftp.manager.controlChanged":`The transfer state changed. The list has been refreshed.`,"sftp.manager.cleanupFailed":`The remote temporary file could not be removed. Check the connection and try again.`,"sftp.manager.controlFailed":`The transfer could not be controlled. Check the connection and try again.`,"sftp.manager.dismissError":`Dismiss error`,"sftp.manager.items":`Transfer files`,"sftp.manager.file":`File`,"sftp.manager.folder":`Folder`,"sftp.manager.upload":`Upload`,"sftp.manager.download":`Download`,"sftp.manager.remaining":`{duration} left`,"sftp.manager.retry":`Retry`,"sftp.manager.retryFailed":`Retry failed transfers ({count})`,"sftp.manager.status.queued":`Queued`,"sftp.manager.status.running":`Transferring…`,"sftp.manager.status.paused":`Paused`,"sftp.manager.status.reattach":`Select the same file`,"sftp.manager.status.needs_overwrite":`Confirm overwrite`,"sftp.manager.status.reconcile":`Check the destination`,"sftp.manager.status.completed":`Completed`,"sftp.manager.status.failed":`Failed`,"sftp.manager.status.cancelled":`Cancelled`,"sftp.notice.heading":`Transfer notifications`,"sftp.notice.completed":`{direction} completed: {name}`,"sftp.notice.failed":`{direction} failed: {name} ({problem})`,"sftp.notice.dismiss":`Dismiss notification`,"sftp.download":`Download`,"sftp.downloads":`Downloads`,"sftp.download.downloading":`Downloading…`,"sftp.download.done":`Downloaded`,"sftp.download.failed":`Failed`,"sftp.download.cancelled":`Cancelled`,"sftp.name":`Name`,"sftp.size":`Size`,"sftp.linkTarget":`Points to`,"sftp.brokenLink":`{target} (not found)`,"sftp.calculating":`Calculating…`,"sftp.partialSizePrefix":`At least `,"sftp.sizeUnavailable":`Unavailable`,"sftp.containedFiles":`Files inside`,"sftp.containedDirectories":`Folders inside`,"sftp.type":`Type`,"sftp.type.file":`File`,"sftp.type.directory":`Folder`,"sftp.type.symlink":`Symlink`,"sftp.type.other":`Other`,"sftp.modified":`Modified`,"sftp.permissions":`Permissions`,"sftp.revision":`Revision`,"sftp.details":`Details`,"sftp.detailsFor":`Details for {name}`,"sftp.detailsForCount":`Details for {count} selected items`,"sftp.preview":`Preview`,"sftp.properties":`Properties`,"sftp.previewLoading":`Loading preview…`,"sftp.previewUnavailable":`This file cannot be previewed here.`,"sftp.previewTruncated":`Only the beginning of this file is shown.`,"sftp.selectedItems":`Selected items`,"sftp.totalSize":`Total size`,"sftp.actions":`Actions`,"sftp.entries":`File list`,"sftp.rename":`Rename`,"sftp.delete":`Delete`,"sftp.refreshDirectory":`Refresh directory`,"sftp.deleteContentsWarning":`Folders and everything inside them will be deleted.`,"sftp.manager.delete":`Deleting`,"sftp.chmod":`Change permissions`,"sftp.chmodRecursive":`Change permissions recursively`,"sftp.chmodPrompt":`Permissions (octal, for example 640)`,"sftp.chmodInvalid":`Enter three octal digits from 000 to 777.`,"sftp.overwriteHeading":`Overwrite this remote file?`,"sftp.overwrite":`Overwrite`,"sftp.skip":`Skip`,"sftp.cancel":`Cancel`,"sftp.remoteDropTitle":`Transfer remote items`,"sftp.remoteDropDescription":`Transfer {count} item(s) to {alias}. Data is transferred directly between the two SFTP connections.`,"sftp.remoteDropInvalid":`This remote drag could not be read.`,"sftp.copyHere":`Copy here`,"sftp.moveHere":`Move here`,"sftp.openTerminalHere":`Open Terminal here`,"sftp.compare.action":`Compare`,"sftp.compare.heading":`Compare directories`,"sftp.compare.description":`Copy selected differences in either direction. Items that exist only on the destination are not deleted.`,"sftp.compare.loading":`Comparing both directory trees…`,"sftp.compare.noChanges":`The two directories have matching metadata.`,"sftp.compare.status":`Difference`,"sftp.compare.same":`Same`,"sftp.compare.different":`Changed`,"sftp.compare.left_only":`Left only`,"sftp.compare.right_only":`Right only`,"sftp.compare.type_mismatch":`Different type`,"sftp.compare.leftToRight":`Copy left → right`,"sftp.compare.rightToLeft":`Copy right → left`,"sftp.save":`Save`,"sftp.close":`Close`,"sftp.editorEmpty":`Select a UTF-8 text file to edit it here.`,"sftp.editorLoading":`Loading editor…`,"sftp.unsaved":`Unsaved`,"sftp.unsavedBlocked":`Save or close the edited file before navigating.`,"sftp.conflict":`The remote file changed. Reload it before saving again.`,"sftp.binaryHint":`This is not a UTF-8 text file. Download it instead.`,"sftp.tooLargeHint":`Files larger than 2 MiB can be downloaded but not edited.`,"sftp.mkdirPrompt":`Folder name`,"sftp.newFilePrompt":`File name`,"sftp.moveToPrompt":`Destination folder`,"sftp.pathAbsolute":`Enter an absolute path beginning with /.`,"sftp.renamePrompt":`New name`,"sftp.nameRequired":`Enter a name.`,"sftp.nameInvalid":`A name cannot contain a slash.`,"sftp.renameUnchanged":`Enter a different name.`,"sftp.deleteHeading":`Delete this remote entry?`,"sftp.deleteHeadingCount":`Delete {count} remote entries?`,"sftp.deleteFailedCount":`Could not delete {count} selected entries.`,"workspace.saved":`Choose a saved layout`,"workspace.new":`New saved layout`,"workspace.save":`Save with a name`,"workspace.reopen":`Open this layout`,"workspace.delete":`Delete`,"workspace.detachPane":`Remove from workspace`,"workspace.live":`Live workspace`,"workspace.mobilePaneSwitcher":`Workspace terminals`,"workspace.oneLiveOnly":`Finish or dissolve the current live workspace before creating another one.`,"workspace.dock.left":`Place on the left`,"workspace.dock.right":`Place on the right`,"workspace.dock.top":`Place above`,"workspace.dock.bottom":`Place below`,"workspace.groupCount":`{count} sessions`,"workspace.rename":`Rename workspace`,"workspace.renameLabel":`New name for {name}`,"workspace.rowMenu":`Actions for {name}`,"workspace.expandGroup":`Show terminals in {name}`,"workspace.collapseGroup":`Hide terminals in {name}`,"workspace.resizeSplit":`Resize split`,"workspace.focusMode":`Focus {alias}`,"workspace.exitFocusMode":`Exit focus mode`,"workspace.movePane":`Move {alias} pane. Select it, then choose another pane to exchange positions.`,"workspace.movePanePicked":`{alias} selected. Choose another pane to exchange positions.`,"workspace.reconnecting":`Reconnect this pane to continue.`,"workspace.maxPanes":`A screen can contain up to {count} terminals.`,"workspace.namePrompt":`Saved layout name`,"workspace.nameRequired":`Enter a saved layout name.`,"workspace.saveConfirm":`Save layout`,"workspace.cancel":`Cancel`,"workspace.savedLayouts":`Saved layouts`,"workspace.actions":`Workspace actions`,"workspace.savedDescription":`Save SSH targets, local shells, and split ratios with a name, then recreate them later as new sessions. Each layout supports up to {count} terminals.`,"workspace.broadcastCommand":`Send command…`,"workspace.broadcastHeading":`Send to connected terminals`,"workspace.broadcastDescription":`Review a command or snippet, then send it to each connected terminal's current input.`,"workspace.commandClose":`Close command delivery`,"workspace.commandSource":`Command source`,"workspace.adHocCommand":`Ad-hoc command`,"workspace.savedSnippet":`Saved snippet`,"workspace.command":`Command`,"workspace.chooseSnippet":`Choose a snippet`,"workspace.useDefault":`Use default`,"workspace.targetMode":`Connected terminals`,"workspace.targetCount":`{count} targets`,"workspace.paneNumber":`Pane {number}`,"workspace.targetSkipped":`Not sent ({state})`,"workspace.executionNotice":`The command and Enter are sent to each terminal's current input, preserving its working directory, environment, and shell state. Partially typed input or a running foreground process may receive the text instead of a shell prompt.`,"workspace.previewHeading":`Review terminal input`,"workspace.sendTargets":`Send to {count} terminals`,"workspace.deliveryResults":`Delivery results`,"workspace.deliveryNotice":`Command output appears in each terminal. Delivery does not mean the command has finished.`,"workspace.delivered":`Sent`,"workspace.deliveryFailed":`Not sent`,"snippets.heading":`Snippets`,"snippets.new":`New`,"snippets.empty":`No snippets have been saved.`,"snippets.name":`Name`,"snippets.description":`Description`,"snippets.command":`Command`,"snippets.variableHint":`Use {{name}} placeholders. Values are reviewed before execution.`,"snippets.variableType":`Variable type`,"snippets.variableType.string":`String`,"snippets.variableType.integer":`Integer`,"snippets.variableType.boolean":`Boolean`,"snippets.variableType.secret":`Secret`,"snippets.variableType.unknown":`Unknown type`,"snippets.value":`Value`,"snippets.save":`Save`,"snippets.delete":`Delete`,"snippets.targets":`Target hosts`,"snippets.preview":`Preview execution`,"snippets.confirm":`Review exact commands`,"snippets.run":`Run on these hosts`,"snippets.results":`Results`,"snippets.status.running":`Running`,"snippets.status.completed":`Completed`,"snippets.status.cancelled":`Cancelled`,"snippets.status.queued":`Queued`,"snippets.status.succeeded":`Succeeded`,"snippets.status.failed":`Failed`,"snippets.status.unknown":`Status unavailable`,"snippets.cancel":`Cancel`,"snippets.startup":`Connection startup`,"snippets.startupHint":`Run this snippet after the selected host's shell is ready. It is sent on every connection and automatic reconnection, so secret variable values are stored encrypted with the binding and may remain in the remote shell history or on screen.`,"snippets.setStartup":`Set startup snippet`,"snippets.clearStartup":`Clear`,"host.duplicateKeyword":`A previous line in this block uses the same keyword. OpenSSH keeps the first one.`,"terminal.consoleList":`Open consoles`,"terminal.noSessions":`No console is open.`,"terminal.openShell":`Local shell`,"terminal.newSession":`New session`,"terminal.rowDetail":`{status} · {destination}`,"terminal.running":`connected`,"terminal.connecting":`connecting`,"terminal.connected":`connected`,"terminal.longCommandCompleted":`A command in {subject} finished after {seconds} seconds.`,"terminal.unreadNotification":`Unread notification`,"terminal.notificationFallback":`A program in this terminal sent a notification.`,"terminal.unreadWorkspace":`This workspace has an unread terminal notification`,"terminal.browserNotificationsHeading":`Notifications`,"terminal.browserNotificationsDefault":`Allow sshc to notify you when a program in a terminal asks for attention (for example a coding agent waiting for input) or a file transfer completes while this tab is in the background.`,"terminal.browserNotificationsGranted":`Browser notifications are allowed. sshc only sends them while this tab is in the background.`,"terminal.browserNotificationsDenied":`Notifications are blocked for sshc. Allow them in this site's browser settings to enable terminal and file transfer notifications.`,"terminal.browserNotificationsUnsupported":`This browser does not support web notifications.`,"terminal.browserNotificationsEnable":`Enable notifications`,"terminal.browserNotificationsTest":`Send test notification`,"terminal.browserNotificationsEnabled":`Notifications enabled`,"terminal.browserNotificationsReady":`Terminal and transfer notifications are ready.`,"terminal.browserNotificationsRequestFailed":`Notification permission could not be requested.`,"terminal.browserNotificationsDeliveryFailed":`The browser allowed notifications but could not display one.`,"terminal.notificationSound":`Notification sound`,"terminal.notificationSoundHint":`Played when a terminal program sends a notification (OSC 9, 99 or 777) while this tab is in the background. Stored only in this browser.`,"terminal.notificationPreviewSound":`Play the notification sound`,"terminal.notificationSound.none":`No sound`,"terminal.notificationSound.gentle":`Gentle`,"terminal.notificationSound.bell":`Bell`,"terminal.notificationSound.pulse":`Pulse`,"terminal.notificationPreview":`Play`,"terminal.notificationVolume":`Notification volume`,"terminal.notificationVolumeHint":`{volume}%`,"terminal.quickCommands":`Quick Commands`,"terminal.quickCommandsClose":`Close Quick Commands`,"terminal.quickCommandInsert":`Insert`,"terminal.quickCommandRun":`Run`,"terminal.quickCommandCopy":`Copy`,"terminal.quickCommandSaveSelection":`Save selection as snippet`,"terminal.quickCommandName":`Snippet name`,"terminal.quickCommandSave":`Save snippet`,"terminal.quickCommandSaved":`Snippet saved.`,"terminal.quickCommandContextWarning":`Insert and Run send text to the pane's current input. Partially typed text or a foreground prompt—including a password or passphrase prompt—may receive it.`,"terminal.quickCommandChanged":`The snippet or pane changed. Review the updated preview before continuing.`,"terminal.quickCommandInsertUnsafe":`Commands with line breaks or control characters cannot be inserted without running them. Use Run or Copy instead.`,"terminal.linkActions":`Terminal link actions`,"terminal.linkOpenBrowser":`Open in browser`,"terminal.linkBrowseSFTP":`Browse in SFTP`,"terminal.linkEditSFTP":`Edit with SFTP`,"terminal.linkDownloadSFTP":`Download with SFTP`,"terminal.linkCopy":`Copy link`,"sftp.linkTargetInvalid":`This terminal link is no longer available.`,"sftp.linkTargetNotFound":`The remote path no longer exists.`,"sftp.linkTargetNotFile":`The remote path is not a file.`,"terminal.progressDialing":`connecting to {target} · {position}`,"terminal.progressHostKey":`checking the host key for {target} · {position}`,"terminal.progressAuthenticating":`authenticating with {target} · {position}`,"terminal.progressAuthenticated":`authenticated with {target} · {position}`,"terminal.progressOpeningSession":`opening the session · {position}`,"terminal.reconnectingAttempt":`reconnecting {attempt}/{limit}`,"terminal.exitedWith":`exited {code}`,"terminal.localhost":`localhost`,"terminal.emptyHeading":`No console is open`,"terminal.emptyHint":`Open one from the list on the left, or press Connect on a host.`,"terminal.forwardLocal":`forwarding {listen} → {to}`,"terminal.forwardDynamic":`SOCKS5 proxy on {listen}`,"terminal.forwardAgent":`forwarding the SSH agent to the remote host`,"terminal.rowMenu":`Actions for {title}`,"terminal.rename":`Rename`,"terminal.unpinTitle":`Use automatic name`,"terminal.renameLabel":`New name for {title}`,"terminal.renameFailed":`The console could not be renamed.`,"terminal.duplicate":`Duplicate this connection`,"terminal.moveUp":`Move up`,"terminal.moveDown":`Move down`,"terminal.closeSession":`Close {title}`,"terminal.closeHeading":`Close {title}?`,"terminal.closeBody":`This ends the connection. Running processes and visible output will be lost.`,"terminal.closeForwards":`This also closes {count} port forward(s) for the console.`,"terminal.closeConfirm":`Close`,"terminal.closeCancel":`Keep it open`,"desktop.closeAllHeading2":`Close {count} running console(s)?`,"desktop.closeAllBody":`This ends every connection. Running processes and visible output will be lost.`,"desktop.closeAllConfirm":`Close them all`,"desktop.closeAllCancel":`Keep them open`,"terminal.limitReached":`The limit of {max} open consoles has been reached. Close one to open another.`,"terminal.limitRefused":`No more consoles can be opened. Close one first.`,"terminal.unresolvable":`The settings for this connection could not be resolved. Open Analysis to see why.`,"terminal.jumpDepthExceeded":`The ProxyJump chain exceeds the supported depth.`,"terminal.hostKeyUnknown":`The host key is not trusted yet. Connect interactively after reviewing it.`,"terminal.hostKeyChanged":`The host key changed. Review Known Hosts before connecting again.`,"terminal.hostKeyRevoked":`The host key is marked as revoked and cannot be used.`,"terminal.identityUnavailable":`No usable identity or SSH agent key is available.`,"terminal.authenticationUnavailable":`No supported authentication method is available for this connection.`,"terminal.authenticationCancelled":`Authentication was cancelled.`,"terminal.keyPassphraseRequired":`The private key needs a passphrase. Unlock the Vault or save the correct passphrase for this key.`,"terminal.reconnectFailed":`The reconnect attempt failed. sshc will retry within the configured limit.`,"terminal.reconnectExhausted":`The reconnect limit was reached. Open a new connection when the network is ready.`,"terminal.manualReconnect":`Reconnect`,"terminal.stopReconnect":`Stop reconnecting`,"terminal.reconnectStopped":`Automatic reconnection was stopped. Reconnect when you are ready.`,"terminal.notReconnecting":`This session is not waiting to reconnect.`,"terminal.manualReconnecting":`Connecting…`,"terminal.manualReconnectFailed":`The SSH session could not be reconnected. Check the connection settings and network, then try again.`,"terminal.openFailed":`The console could not be opened.`,"terminal.keyBar":`On-screen keys`,"terminal.extraKeys":`Extra keys`,"shell.mobileNavigation":`Quick navigation`,"sftp.mobile.actions":`Folder actions`,"sftp.mobile.search":`Search files`,"sftp.manager.settings":`Transfer settings`,"sftp.manager.close":`Close Transfer Manager`,"terminal.closeFailed":`The console could not be closed.`,"terminal.linkConnecting":`Connecting…`,"terminal.linkRetrying":`Connecting… (attempt {attempt})`,"terminal.linkWaiting":`The connection dropped. Attempt {attempt} in {seconds}s.`,"terminal.linkStopped":`Retrying has stopped. The session is still available; reconnect whenever you are ready.`,"terminal.linkGone":`The session no longer exists, so it cannot be reconnected.`,"terminal.linkNow":`Connect now`,"terminal.linkStop":`Stop retrying`,"terminal.replayTruncated":`Some output produced while the terminal link was offline is no longer in the engine replay buffer.`,"terminal.clipboardRefused":`The clipboard could not be accessed.`,"terminal.pasteHeading":`Review paste to {target}`,"terminal.pasteDescription":`Review this paste before anything is sent. Logical line count: {lines}.`,"terminal.pasteRiskLineBreak":`Line breaks can run one or more commands immediately.`,"terminal.pasteRiskControl":`Terminal control characters can change terminal state or input.`,"terminal.pastePreview":`Paste preview with control characters made visible`,"terminal.pastePreviewTruncated":`The preview is truncated. The action still applies to the complete paste.`,"terminal.pasteNotSent":`Nothing has been sent to the terminal yet.`,"terminal.pasteCancel":`Cancel`,"terminal.pasteWithoutFinalLineBreak":`Paste without final Enter`,"terminal.pasteEdit":`Edit paste`,"terminal.pasteSend":`Paste`,"terminal.search":`Find`,"terminal.searchInput":`Search terminal output`,"terminal.searchPlaceholder":`Search scrollback…`,"terminal.searchNoResults":`No results`,"terminal.searchPrevious":`Previous match`,"terminal.searchNext":`Next match`,"terminal.searchClose":`Close search`,"terminal.searchCaseSensitive":`Match case`,"terminal.searchRegex":`Use regular expression`,"terminal.searchInvalidRegex":`Invalid`,"terminal.copyContext":`Copy recent terminal context`,"terminal.copyContextHint":`Copy up to the latest 200 terminal rows without control sequences`,"terminal.copyContextDone":`Recent terminal context copied.`,"terminal.copyContextEmpty":`There is no terminal context to copy.`,"terminal.osc52Hint":`Allow this terminal session to write to the system clipboard via OSC 52`,"terminal.osc52Enabled":`OSC 52 clipboard writes are allowed for this terminal session.`,"terminal.osc52Disabled":`OSC 52 clipboard writes are blocked.`,"terminal.osc52Copied":`The remote application copied text to the system clipboard.`,"terminal.moreActions":`More terminal actions`,"terminal.portForwarding":`Port forwarding`,"terminal.openDirectoryInSFTP":`Open current directory in SFTP`,"terminal.forwardDescription":`Manage tunnels using the active SSH connection to {title}.`,"terminal.forwardClose":`Close`,"terminal.forwardActive":`Active forwarding`,"terminal.forwardNone":`No forwarding is active on this connection.`,"terminal.forwardTemporary":`This session`,"terminal.forwardSaved":`Saved`,"terminal.forwardSavedStopHint":`Stopping it here does not remove it from the connection settings.`,"terminal.forwardRetryHint":`Fix the local port conflict, then reconnect this SSH session to retry the saved forwarding.`,"terminal.forwardAgentLabel":`SSH agent`,"terminal.forwardCopy":`Copy address`,"terminal.forwardCopied":`The address was copied.`,"terminal.forwardCopyFailed":`The address could not be copied.`,"terminal.forwardStop":`Stop`,"terminal.forwardStopping":`Stopping…`,"terminal.forwardStopped":`The forwarding was stopped.`,"terminal.forwardNew":`Start port forwarding`,"terminal.forwardSaveConnection":`Save to this connection`,"terminal.forwardSaveHint":`The forwarding will start now and be restored the next time this connection opens.`,"terminal.forwardSaveUnavailable":`A local shell or an unsaved connection cannot store this setting.`,"terminal.forwardNeedsConnection":`Reconnect this SSH session before starting a forwarding.`,"terminal.forwardStart":`Start`,"terminal.forwardStarting":`Starting…`,"terminal.forwardStarted":`The forwarding is active for this session.`,"terminal.forwardStartedAndSaved":`The forwarding is active and was saved to the connection.`,"terminal.forwardPausedReconnect":`Forwarding listeners are unavailable while this SSH connection is reconnecting.`,"terminal.forwardBindFailed":`The local port could not be opened: {detail}`,"terminal.forwardUnavailable":`This SSH connection cannot change forwarding in its current state.`,"terminal.forwardInvalid":`Check the forwarding type, port, and destination.`,"terminal.forwardSaveFailed":`The forwarding started, but it could not be saved to the connection.`,"terminal.forwardFailed":`The forwarding operation could not be completed.`,"terminal.settingsHeading":`Terminal`,"terminal.settingsSaved":`Saved. Clipboard settings apply immediately; other settings apply to newly opened terminals.`,"terminal.settingsLoading":`Loading terminal settings…`,"terminal.settingsStorageHint":`These settings, including terminal appearance, are stored in workspace metadata and included in backups and sync. Theme, language and notification sounds are stored only in this browser.`,"terminal.maxSessionsLabel":`Consoles open at once`,"terminal.maxSessionsHint":`Enter a value from 1 to 200. Leave it empty to use 50. When the limit is reached, no new console can be opened; existing consoles remain open.`,"terminal.scrollbackLabel":`Engine replay buffer (bytes)`,"terminal.scrollbackHint":`Output retained by the engine for browser reconnects. Enter 16384–4194304; blank uses 262144 bytes (256 KiB). It stays in memory and is not written to disk.`,"terminal.browserScrollbackLabel":`Browser scrollback (lines)`,"terminal.browserScrollbackHint":`Lines kept by each browser terminal. Enter 1000–100000; blank uses 5000. Larger values consume more browser memory.`,"terminal.localShellProfileLabel":`Default local shell`,"terminal.localShellProfileHint":`Choose from executables detected and verified on this machine. A shell can also be chosen once when opening a local terminal.`,"terminal.localShellProfileSystem":`System login shell`,"terminal.osc52DefaultLabel":`Allow OSC 52 clipboard writes by default`,"terminal.osc52DefaultHint":`Local shells use this setting. Each SSH connection can inherit, allow, or deny it in sshc settings.`,"terminal.jisYenBackslashLabel":`Send the JIS ¥ key as backslash`,"terminal.jisYenBackslashHint":`Useful with Japanese keyboards. IME composition is not modified.`,"terminal.fontSizeLabel":`Font size`,"terminal.paletteLabel":`Colour scheme`,"terminal.verbosityLabel":`Connection log`,"terminal.verbosityHint":`Displays diagnostics available to sshc, including connection stages, authentication methods and saved-TOTP availability. Applies to new connections and never prints secret values.`,"terminal.verbosityQuiet":`None`,"terminal.verbosityBrief":`Basic details (-v)`,"terminal.verbosityDetailed":`Keys, hops and timings (-vv)`,"terminal.verbosityFull":`Everything (-vvv)`,"terminal.reconnectLabel":`Reconnect after a dropped connection`,"terminal.reconnectHint":`Number of reconnection attempts after an unexpected disconnect. Retries use 1, 2, 5, 10, and 15 second base delays with jitter, so five attempts take up to 40 seconds. A console you close manually is not reconnected.`,"terminal.reconnectDefault":`Default (5 attempts, up to 40 seconds)`,"terminal.reconnectNever":`Do not reconnect`,"terminal.reconnectOnce":`Once (up to 2 seconds)`,"terminal.reconnectTwice":`Twice (up to 4 seconds)`,"terminal.reconnectThrice":`Three times (up to 10 seconds)`,"terminal.reconnectFive":`Five times (up to 40 seconds)`,"engine.heading":`Engine`,"engine.portLabel":`Port`,"engine.portHint":`Leave this empty to use a device-local stable port (initially 54447). A stable port keeps bookmarks and the installed web app working. Applies the next time the engine starts.`,"engine.portOutOfRange":`The port must be between 1024 and 65535.`,"engine.loading":`Loading engine settings…`,"engine.saved":`Saved. Auto-lock applies now; a port change applies the next time the engine starts.`,"engine.saveFailed":`The engine setting could not be saved.`,"engine.vaultAutoLockLabel":`Vault auto-lock`,"engine.vaultAutoLockHint":`Lock the Vault after no saved credential or key passphrase has been used for this long. Status checks, terminal output, and background sync do not extend the timer.`,"engine.vaultAutoLockIdle":`Lock after inactivity`,"engine.vaultAutoLockRestart":`Do not auto-lock`,"engine.vaultAutoLockValue":`Time`,"engine.vaultAutoLockUnit":`Unit`,"engine.vaultAutoLockMinutes":`Minutes`,"engine.vaultAutoLockHours":`Hours`,"engine.vaultAutoLockOutOfRange":`Enter a whole number from 1 to 999 for the auto-lock time.`,"engine.vaultAutoLockRestartWarning":`The Vault will not lock automatically. Unless you lock it manually, it remains unlocked until sshc is restarted. Use this setting only on a device you control.`,"terminal.fontLabel":`Font family`,"terminal.backgroundLabel":`Background image`,"terminal.backgroundHint":`Images are stored in your workspace and included in backups and sync.`,"terminal.backgroundNone":`No image`,"terminal.backgroundFollowsOverall":`Use the overall setting`,"terminal.backgroundAdd":`Add an image`,"terminal.backgroundChoose":`Change`,"terminal.backgroundClear":`Clear`,"terminal.backgroundNotSelected":`No background image is selected`,"terminal.backgroundLibrary":`Background image library`,"terminal.backgroundClose":`Close`,"terminal.backgroundSearch":`Search images`,"terminal.backgroundEmpty":`No saved images`,"terminal.backgroundEmptyHint":`Add an image to choose it here.`,"terminal.backgroundActions":`Actions for {name}`,"terminal.backgroundRenameAction":`Rename`,"terminal.backgroundDeleteAction":`Delete`,"terminal.backgroundDeleteHeading":`Delete background image?`,"terminal.backgroundDeleteHint":`Delete {name} and clear settings that use it. This cannot be undone.`,"terminal.backgroundUse":`Use this image`,"terminal.backgroundUseNone":`Select no image`,"terminal.backgroundCapacityHeading":`Storage capacity`,"terminal.backgroundCapacityUsage":`{used} of {capacity} used`,"terminal.backgroundCapacityLabel":`Limit`,"terminal.backgroundCapacitySave":`Save limit`,"terminal.backgroundCapacityHint":`1–1024 MiB; the default is 16 MiB. Lowering the limit does not delete existing images. You are responsible for storage and sync costs.`,"terminal.backgroundCapacityInvalid":`Enter a whole number from 1 to 1024 MiB.`,"terminal.backgroundCapacityFailed":`The storage capacity could not be changed.`,"terminal.backgroundRename":`Rename {name}`,"terminal.backgroundRenameHeading":`Rename background image`,"terminal.backgroundRenameHint":`The extension is selected from the image type. Saved Terminal settings are updated to use the new name.`,"terminal.backgroundRenameLabel":`New file name`,"terminal.backgroundRenameSubmit":`Rename`,"terminal.backgroundRenameCancel":`Cancel`,"terminal.backgroundRenameRequired":`Enter a file name.`,"terminal.backgroundRenameExists":`A background image with that name already exists.`,"terminal.backgroundRenameFailed":`The background image could not be renamed.`,"terminal.backgroundRemove":`Remove {name}`,"terminal.backgroundRoom":`{megabytes} MB left`,"terminal.backgroundTooLarge":`The image exceeds the maximum file size.`,"terminal.backgroundsFull":`There is no room left for another image.`,"terminal.backgroundNotAnImage":`The selected file is not a supported image.`,"terminal.backgroundFailed":`The image could not be stored.`,"terminal.tintLabel":`Image overlay opacity`,"terminal.tintHint":`Increase the opacity to darken the image and improve text readability.`,"connection.backgroundLabel":`Console background image`,"connection.backgroundHint":`Only this connection's consoles use it.`,"terminal.fontHint":`JetBrains Mono ships with the application.`,"terminal.fontFollowsSystem":`Use the device's monospace font`,"terminal.fontFollowsOverall":`Use the overall setting`,"connection.fontLabel":`Console font family`,"connection.fontHint":`Only this connection's consoles use it.`,"terminal.paletteHint":`Applies to terminals without a custom colour scheme.`,"terminal.paletteFollowsTheme":`Follow the application theme`,"terminal.paletteFollowsOverall":`Use the overall setting`,"connection.paletteLabel":`Console colour scheme`,"connection.paletteHint":`Only this connection's consoles use it.`,"connection.encodingLabel":`Remote text encoding`,"connection.encodingHint":`Used by this connection in the browser terminal and by sshc on the command line.`,"connection.encodingUTF8":`UTF-8 (default)`,"connection.encodingShiftJIS":`Shift_JIS (Japanese)`,"connection.encodingEUCJP":`EUC-JP (Japanese)`,"connection.encodingISO2022JP":`ISO-2022-JP (Japanese)`,"connection.osc52Label":`OSC 52 clipboard`,"connection.osc52Hint":`Choose whether remote applications on this SSH connection may write to the system clipboard.`,"connection.osc52Inherit":`Use terminal default`,"connection.osc52Allow":`Allow for this connection`,"connection.osc52Deny":`Block for this connection`,"terminal.fontSizeHint":`Enter a font size in pixels. Leave this blank to use 15 on narrow screens or 13 on other screens.`,"terminal.copyOnSelectLabel":`Copy selected text automatically`,"terminal.copyOnSelectHint":`Copies once when you finish selecting. Turn this off if selections should not replace the system clipboard.`,"terminal.rightClickPasteLabel":`Paste with right click`,"terminal.rightClickPasteHint":`Uses terminal bracketed paste when supported. Turn this off to keep the normal context menu.`,"terminal.webglLabel":`Use WebGL rendering`,"terminal.webglHint":`Uses GPU rendering for smoother output. Turn this off if characters are duplicated or leave visual traces.`,"terminal.limitsOutOfRange":`Those numbers are outside the range this build accepts.`,"terminal.startLabel":`Starting directory`,"terminal.startHint":`Directory in which local shells start. Enter ~/work or an absolute path. The ~ is stored without expansion, so the same setting can be used on another machine. Leave this empty to use your home directory.`,"terminal.startSave":`Save`,"terminal.startMissing":`The specified directory does not exist.`,"terminal.startNotADirectory":`The specified path is not a directory.`,"terminal.startUnusable":`Write the path as ~/something or as an absolute path.`,"terminal.settingsSaveFailed":`The terminal settings could not be saved.`,"terminal.screenLabel":`Console for {title}`,"terminal.exitedWithCode":`The program exited with status {code}. The output above is kept until you close this console.`,"terminal.exitedWithSignal":`The program was ended by {signal}. The output above is kept until you close this console.`,"inspector.appOnly":`sshc-only settings`,"inspector.groupLabel":`Group display settings`,"inspector.hostSavesImmediately":`Changes here are saved immediately.`,"inspector.groupChangesStaged":`Changes here are staged until you choose Save groups.`,"inspector.notices":`Notices`,"inspector.inherited":`Inherited values`,"inspector.noNotices":`Nothing to report for this connection.`,"inspector.noInherited":`All values for this connection are defined in its own block.`,"shell.language":`Lang`,"shell.languageMenu":`Lang menu`,"shell.languageEnglish":`English`,"shell.languageJapanese":`日本語`,"shell.theme":`Appearance`,"shell.themeMenu":`Theme menu`,"shell.themeSystem":`System`,"shell.themeLight":`Light`,"shell.themeDark":`Dark`,"section.home":`Home`,"section.license":`License`,"menu.others":`Others`,"license.description":`Licenses and copyright notices for sshc and its components. Full texts are available offline.`,"license.search":`Search components or licenses`,"license.count":`Components: {count}`,"license.noMatches":`No matching components.`,"section.menu":`Menu`,"section.connections":`Connections`,"section.terminal":`Terminal`,"section.config":`Config`,"section.groups":`Groups`,"section.keys":`Keys`,"section.knownHosts":`Known Hosts`,"section.remoteKeys":`Install Key on Server`,"section.diagnostics":`Ad hoc checks`,"section.settings":`Settings`,"settings.heading":`Settings`,"settings.pageDescription":`Configure embedded terminals, sshc's lifecycle, and protection for this machine's encrypted data.`,"settings.engineDescription":`Configure the sshc engine port and automatic vault locking.`,"settings.terminalDescription":`Configure the behavior, appearance, and controls used by new terminals.`,"settings.notificationsDescription":`Configure browser notifications and the sound for notifications sent by terminal programs.`,"settings.connectionsDescription":`Review the connections open in this browser and close them together.`,"settings.passwordDescription":`Change the master password that protects encrypted data on this machine.`,"secrets.heading":`The vault`,"secrets.pageDescription":`Manage named account passwords, key passphrases, and one-time password seeds. Values are shown only while editing.`,"secrets.passwordsDescription":`Manage named account passwords and the hosts that use them. Values are shown only while editing.`,"secrets.passphrasesDescription":`Manage named and key-specific passphrases. Values are shown only while editing.`,"secrets.totpDescription":`Register one-time passwords, view the current code, and manage their connection assignments.`,"secrets.metricPasswords":`Account passwords`,"secrets.metricPassphrases":`Key passphrases`,"secrets.metricTOTP":`One-time passwords`,"secrets.metricAssignments":`Assignments`,"secrets.loading":`Reading the vault…`,"secrets.explainNew":`One master password encrypts account passwords, key passphrases, object-storage credentials, and snippets. The master password is not stored and cannot be recovered. If you lose it, this encrypted data cannot be recovered; files read directly by OpenSSH are unaffected.`,"secrets.explainLocked":`The vault is locked. Enter the master password to access it.`,"secrets.master":`Master password`,"secrets.create":`Create the vault`,"secrets.unlock":`Unlock`,"secrets.lock":`Lock sshc`,"secrets.createFailed":`The vault could not be created. A master password must be at least 4 characters.`,"secrets.unlockFailed":`The master password is incorrect.`,"secrets.failed":`The vault could not be read.`,"secrets.storeFailed":`The credential could not be saved.`,"secrets.deleteFailed":`The credential could not be deleted.`,"secrets.inUse":`This credential is still assigned. Change its assignments before deleting it.`,"secrets.none":`Nothing is stored here yet.`,"secrets.assignedHosts":`Assigned hosts`,"secrets.noAssignedHosts":`No assigned hosts`,"secrets.keys":`Keys`,"secrets.noKeys":`No assigned keys`,"secrets.dedicated":`Dedicated to this key`,"secrets.removeDedicated":`Remove saved passphrase for {key}`,"secrets.keyHostUsageIncomplete":`Key host assignments could not be fully confirmed from SSH configuration. Check Config diagnostics.`,"secrets.keyHostsUnavailable":`Could not confirm assigned hosts`,"secrets.delete":`Delete {name}`,"secrets.edit":`Edit {name}`,"secrets.actions":`Actions for {name}`,"secrets.usageExpand":`Show {label} for {name}`,"secrets.usageCollapse":`Hide {label} for {name}`,"secrets.editPassword":`Edit account password`,"secrets.editPassphrase":`Edit key passphrase`,"secrets.editTOTP":`Edit one-time password`,"secrets.editNote":`The saved value is shown below. Renaming keeps every current assignment.`,"secrets.credentialName":`Name`,"secrets.passwordValue":`Password`,"secrets.passphraseValue":`Key passphrase`,"secrets.totpValue":`Setup key or otpauth URI`,"secrets.revealing":`Reading the saved value…`,"secrets.revealFailed":`The saved value could not be shown.`,"secrets.updateFailed":`The changes could not be saved.`,"secrets.nameExists":`A credential with that name already exists. Choose another name.`,"secrets.saveChanges":`Save changes`,"secrets.saving":`Saving…`,"secrets.cancel":`Cancel`,"secrets.passwordsHeading":`Account passwords`,"secrets.passphrasesHeading":`Key passphrases`,"secrets.newPasswordName":`New account password name`,"secrets.newPasswordValue":`New account password value`,"secrets.storePassword":`Store account password`,"secrets.newPassphraseName":`New key passphrase name`,"secrets.newPassphraseValue":`New key passphrase value`,"secrets.storePassphrase":`Store key passphrase`,"secrets.totpHeading":`One-time passwords (TOTP)`,"secrets.newTOTPName":`New one-time password name`,"secrets.newTOTPValue":`Base32 setup key or otpauth URI`,"secrets.storeTOTP":`Store one-time password`,"secrets.totpAssignInConnection":`To assign this token, open its target in Connections and choose it under One-time password (TOTP) in Basic settings.`,"secrets.totpLoading":`Generating the current code…`,"secrets.totpRetry":`Try generating the code again`,"secrets.totpExpand":`Show the previous and next codes for {name}`,"secrets.totpCollapse":`Hide the previous and next codes for {name}`,"secrets.totpRemaining":`{seconds}s`,"secrets.totpPrevious":`Previous`,"secrets.totpNext":`Next`,"secrets.unassignTOTP":`Remove the one-time password assignment from {host}`,"secrets.unassignTOTPFailed":`The one-time password assignment could not be removed.`,"update.version":`Version {version}`,"update.available":`{version} is available — read what changed`,"desktop.closeAllHeading":`Open connections`,"desktop.closeAllNote":`This closes every console, port forward, and SSH agent forwarding session. The engine keeps running.`,"desktop.openCount":`{count} open`,"desktop.closeAll":`Close every connection`,"secrets.changeHeading":`Master password`,"secrets.changeNote":`Choose password protection or automatic opening on this device. The change also updates protection for snippets, sync settings, and local backups. Sync uses an independent key.`,"secrets.currentMaster":`Current master password`,"secrets.newMaster":`New master password`,"secrets.confirmMaster":`Confirm new master password`,"secrets.change":`Change the master password`,"secrets.wrongCurrent":`The current master password is incorrect. Nothing was changed.`,"secrets.changeFailed":`The master password could not be changed.`,"secrets.changedMasterLocally":`Local vault protection was updated, including snippets, sync settings, and backups. Remote snapshots were not rewritten.`,"section.passwords":`Account passwords`,"section.keyPassphrases":`Key passphrases`,"section.otp":`OTP`,"lock.explainNew":`Choose whether to protect this device’s vault with a password. A password must contain at least 4 characters.`,"lock.explainOpen":`Enter your master password to unlock sshc.`,"lock.noRecovery":`The master password cannot be recovered. If you lose it, the vault, snippets, and encrypted backups cannot be opened.`,"lock.explainPasswordless":`This device uses the vault without a password.`,"lock.withoutPassword":`Use without a password`,"lock.withoutPasswordHint":`Opens automatically when sshc starts. Protection of local data relies on your OS account and device security. Sync encryption stays enabled.`,"lock.shortPasswordHint":`A short password offers limited protection if local files are copied. A longer, unpredictable password provides stronger protection.`,"lock.password":`Master password`,"lock.confirm":`Confirm master password`,"lock.create":`Create the vault`,"lock.open":`Open`,"lock.wrong":`The master password is incorrect.`,"lock.tooShort":`A master password must be at least {count} characters.`,"lock.alreadyExists":`A vault already exists in app storage. Enter its master password to unlock it.`,"lock.storagePermission":`Android denied access to the app's private storage. Copy the details below for support.`,"lock.storageFull":`There is not enough free storage to create or update the vault.`,"lock.storageReadOnly":`The app's private storage is read-only. Restart the device and try again.`,"lock.storageBusy":`Another vault update is still finishing. Wait a moment and try again.`,"lock.storageIO":`Android reported an input/output failure while accessing the app's private storage.`,"lock.schemaOlder":`The vault format is old (required: {required}, current: {current}).`,"lock.schemaNewer":`The vault format is newer than this sshc build (supported: {required}, current: {current}).`,"lock.migrationFailed":`The vault could not be migrated from version {current} to {required}. The original vault was not changed.`,"lock.migrationCompleted":`The vault was safely migrated from version {current} to {required}.`,"lock.migrationDismiss":`Dismiss migration notice`,"lock.envelopeUnsupported":`The encrypted vault container uses an unsupported format. Open diagnostic details for support.`,"lock.schemaRecoveryHint":`Restore the newest compatible local backup first. If none exists, you can create an empty vault without deleting SSH configuration or key files.`,"lock.restoreCompatibleBackup":`Restore a compatible vault backup`,"lock.noCompatibleBackup":`No compatible local vault backup was found. Nothing was changed.`,"lock.recoveryFailed":`The compatible vault backup could not be restored.`,"lock.resetUnsupportedAcknowledge":`I understand that saved passwords, saved key passphrases, and synchronization settings will be reset. SSH configuration and key files remain.`,"lock.resetUnsupported":`Create an empty vault`,"lock.resetFailed":`The unsupported vault could not be safely replaced.`,"lock.failed":`The vault could not be opened.`,"section.sync":`Sync`,"section.history":`History`,"home.heading":`Your connections`,"home.manageConnections":`Manage connections`,"home.connections":`Connections`,"home.groups":`Groups`,"home.attention":`Needs attention`,"home.quickConnect":`Quick connect`,"home.quickConnectHint":`Recently used hosts stay first; unused hosts follow in name order.`,"home.recentConnections":`Recent connections`,"home.recentConnectionsHint":`Successful SSH connections on this device.`,"home.recentConnectionList":`Recently used connections`,"home.savedWorkspaces":`Saved layouts`,"home.savedWorkspacesHint":`Recreate saved connection targets and pane placement in one action.`,"home.savedWorkspaceList":`Saved terminal layouts`,"home.workspacePanes":`{count} panes`,"home.workspaceUpdated":`updated {at}`,"home.openWorkspace":`Open layout`,"home.lastConnected":`Last connected {at}`,"home.connectionList":`Available connections`,"home.search":`Search connections`,"home.searchPlaceholder":`Search hosts, groups or tags`,"home.viewMode":`Connection layout`,"home.panelView":`Panels`,"home.listView":`List`,"home.groupFilter":`Filter connections by group`,"home.allGroups":`All`,"home.groupCount":`Groups {count}`,"home.connectionCount":`Connections {count}`,"home.groupBreadcrumb":`Selected group`,"home.openGroup":`Open {name}, {count} connections`,"home.noChildGroups":`No groups at this level.`,"home.connectGesture":`Connect to {alias}. Double-click with a mouse or tap once on a touch screen.`,"home.neverConnected":`Not connected yet`,"home.loading":`Reading your SSH configuration…`,"home.noConnections":`No concrete Host alias is configured yet.`,"home.noMatches":`No connection matches this search.`,"home.groupMissingDetail":`The selected group {name} no longer exists.`,"home.ungrouped":`No group`,"home.tagsFor":`Tags for {alias}`,"home.connectionActions":`Actions for {alias}`,"home.openConnectionSettings":`Open connection settings`,"home.connect":`Connect`,"home.openingConnection":`Opening {alias}…`,"home.opening":`Opening…`,"home.loadFailed":`The SSH configuration could not be read.`,"home.workspace":`Workspace`,"home.workspaceUnavailable":`Workspace status is unavailable.`,"home.workspaceClean":`No configuration problem or interrupted change needs attention.`,"home.workspaceAttention":`{count} configuration or recovery item(s) need attention.`,"home.openConfig":`Review configuration`,"home.recoverChanges":`Recover changes`,"home.sync":`Sync`,"home.syncUnavailable":`Sync status is unavailable.`,"home.syncNotConfigured":`Remote sync is not configured.`,"home.syncNever":`A remote bucket is configured but has not been synced yet.`,"home.syncLast":`Last synced {at} · {count} files`,"home.openSync":`Open sync`,"copy.button":`Copy {label}`,"copy.done":`Copied.`,"copy.refused":`The browser refused to write to the clipboard.`,"copy.command":`command`,"copy.terminalCommand":`Terminal command`,"copy.privateKey":`private key`,"copy.publicKey":`public key`,"copy.keyLine":`key line`,"copy.remoteCommand":`remote command`,"copy.diagnosticReport":`diagnostic report`,"diagnostic.requestFailed":`The operation could not be completed`,"diagnostic.requestFailedHint":`sshc reported {code}. Open the safe diagnostic details when reporting the problem.`,"diagnostic.showDetails":`Show diagnostic details`,"diagnostic.dismiss":`Dismiss error`,"history.requestRejected":`The request was rejected ({code}).`,"history.pageTitle":`History`,"history.pageDescription":`Review every completed change, recover interrupted writes, and restore individual files without losing the newer history.`,"history.metricChanges":`Completed changes`,"history.metricInterrupted":`Interrupted`,"history.metricRestorable":`Restorable files`,"history.operation.configuration":`Configuration change`,"history.operation.connection":`Connection change`,"history.operation.key":`Key change`,"history.operation.terminal":`Terminal settings change`,"history.operation.engine":`Engine settings change`,"history.operation.vault":`Vault change`,"history.operation.sync":`Sync change`,"history.operation.other":`Application change`,"history.status.staging":`Preparing`,"history.status.staged":`Interrupted`,"history.status.applied":`Applied`,"history.status.completed":`Completed`,"history.status.rolledBack":`Rolled back`,"history.status.unknown":`Recorded`,"history.interrupted":`Interrupted transactions`,"history.interruptedDetail":`{operation} started {startedAt}: {committed} of {total} files were written.`,"history.complete":`Complete`,"history.rollBack":`Roll back`,"history.loading":`Loading history…`,"history.restored":`Restored {path} as transaction {id}.`,"history.completedTransaction":`The interrupted transaction was completed.`,"history.rolledBack":`The interrupted transaction was rolled back.`,"history.completed":`Completed changes`,"history.empty":`No change has been made through this application yet.`,"history.restorePath":`Restore {path}`,"history.backupsKept":`Generation backups are kept in ~/.ssh/sshc/backups and are never deleted automatically. A restore is itself a new transaction, so it can be undone the same way.`,"notice.complex_external_rule":`This value cannot be edited in the simplified view because its source uses a wildcard, negation, Match block, or duplicate alias. The source is shown instead.`,"notice.duplicate_alias":`Another block declares the same alias. For most options, OpenSSH uses the first value it reads.`,"notice.proxy_ignored":`Both ProxyCommand and ProxyJump are set. OpenSSH keeps whichever it read first, so this line is ignored.`,"notice.wildcard_shadow":`A catch-all block can override values for this host.`,"notice.negated_pattern":`A negated pattern applies here.`,"notice.unnamed_host_block":`This block has no concrete alias and can only be edited as raw text.`,"notice.match_block":`A Match block was found.`,"notice.dangerous_directive":`This directive can run a command. It is saved as written and never executed by this application.`,"notice.unstructured_line":`This line has unbalanced quoting and is preserved exactly as written.`,"notice.external_file":`This file is outside ~/.ssh. It is shown but never written.`,"notice.orphan_metadata":`The host for this note no longer exists. Review the target before reassigning it.`,"notice.group_cycle":`This group's parent hierarchy is cyclic, so the group was skipped.`,"notice.group_member_missing":`This group member has no host block in the configuration.`,"refusal.directory_not_empty":`The directory is not empty. Delete its files first; Include lines that directly reference those files will be updated at the same time.`,"refusal.not_a_directory":`The specified path is a file, not a directory.`,"refusal.group_is_declared":`{detail} is a declared group. Rename or remove it on the Groups screen so its connections, shared settings, and keys are moved together.`,"refusal.destination_exists":`A file or directory with that name already exists at the destination.`,"refusal.alias_already_declared":`A connection with that name already exists, so these changes cannot be saved. Choose another name.`,"refusal.region_damaged":`~/.ssh/config contains only one marker for the block generated by sshc. The generated range cannot be identified, so nothing was written.`,"notice.group_not_declared":`This directory is under connections/, but no Include line references it. Declare it as a group or move its files.`,"notice.group_directory_missing":`This group is declared, but its directory is missing. Its settings will not be loaded until you create the directory and add configuration files.`,"notice.group_empty":`This group is declared but contains no files.`,"notice.generated_region_damaged":`~/.ssh/config has the opening marker of this application's generated block but not its closing one, so it cannot tell where its own lines stop. The Include lines in it still work; groups cannot be saved until the closing marker is put back. Add a line reading “# <<< sshc groups” after the last generated Include, or delete the whole block and save the groups again.`,"notice.explained_values_only":`Part of the configuration could not be read, so these values come from what was reachable.`,"notice.match_exec_refused":`This configuration has a Match exec block. Nothing here runs commands, so these values cannot be resolved. Connect from a terminal with ssh instead.`,"notice.match_final_refused":`This configuration has a Match final block. OpenSSH reads the file twice for that, which this engine does not do, so these values cannot be resolved.`,"notice.canonicalise_refused":`This configuration turns on CanonicalizeHostname, which re-reads the configuration. These values cannot be resolved here.`,"notice.unknown_token_refused":`This configuration uses a token this engine does not expand, so these values cannot be resolved.`,"notice.destination_not_included":`No Include references this file, so OpenSSH will not read the moved connection until one is added.`,"notice.group_file_unreached":`This file is under connections/, but no Include references it, so OpenSSH does not read it. Move it into a declared group.`,"notice.group_directory_leftover":`The group directory is now empty. sshc does not remove empty directories automatically; delete it manually if it is no longer needed.`,"notice.include_no_longer_matches":`A pattern that reached this file will not match its new name, so OpenSSH will stop reading it.`,"notice.include_not_rewritten":`An Include references this file in a format that sshc cannot rewrite. The Include was not changed; review it manually.`,"notice.include_now_unreached":`No Include references the new path, so OpenSSH will not read this file until one is added.`,"preview.heading":`Save preview`,"preview.newFile":` (new file)`,"preview.tooLarge":`This file is too large for a line-by-line preview, so the whole file is shown as replaced.`,"preview.syntaxError":`Syntax error in {path} at line {line}, column {column}. The edit is kept here and was not written.`,"preview.theFile":`the file`,"preview.graphError":`This change would break the Include graph. Nothing was written.`,"preview.conflictError":`The file changed outside this application. Nothing was written.`,"preview.rejected":`The request was rejected ({code}). Nothing was written.`,"preview.changedOnDisk":`Changed on disk since you loaded it`,"preview.pendingChange":`Your pending change`,"preview.mergeByHand":`Reload the file to merge the two changes by hand. Nothing was written.`,"preview.nothingYet":`Change a value to see exactly what would be written.`,"preview.explainedFor":`Resolved settings for {alias}`,"preview.unset":`unset`,"reveal.heading":`Show private key: {path}`,"reveal.warning":`The private key will appear on this page. Anyone who can view the screen can copy it. sshc cannot protect the key from browser extensions or clipboard-history tools. Each reveal is recorded in History, but the key itself is not.`,"reveal.show":`Show private key`,"reveal.requesting":`Requesting a one-time confirmation…`,"reveal.privateKeyLabel":`Private key`,"reveal.failed":`The private key could not be shown. Close this dialog and confirm again.`,"reveal.close":`Close`,"orphan.heading":`Settings without a connection`,"orphan.explain":`The Host blocks associated with these notes are no longer in the configuration. Choose the connection to which each note should be assigned.`,"orphan.chooseTarget":`Choose the connection this note belongs to.`,"orphan.occupied":`{alias} already has its own settings. Clear those first, or discard this note.`,"orphan.entry":`{alias} in {path}`,"orphan.noSettings":`no settings`,"orphan.tags":`tags {tags}`,"orphan.note":`note “{note}”`,"orphan.colour":`colour {colour}`,"orphan.reassociateWith":`Re-associate {alias} with`,"orphan.reassociatePlaceholder":`Re-associate with…`,"orphan.reassociate":`Re-associate {alias}`,"orphan.discard":`Discard {alias} settings`,"password.blocker.authenticationOff":`PasswordAuthentication is off for this host, so the client will never offer a password.`,"password.blocker.aliasNotSimple":`This is a pattern rather than a specific host. To save a password, specify an account on one host.`,"password.blocker.identityFile":`This host has a direct private key. sshc leaves any password prompt to OpenSSH instead of storing or supplying one.`,"password.warn.hostKeyUnknown":`This host key is not in known_hosts. When a saved password is used, the password helper cannot answer the host-key confirmation prompt, so the first connection will fail. Add the host key through Known Hosts first.`,"password.warn.hostNameUnresolved":`No HostName could be resolved for this alias. The password will still be assigned to the alias.`,"password.show":`Show`,"password.showNamed":`Show {label}`,"password.hideNamed":`Hide {label}`,"password.hide":`Hide`,"sync.heading":`Remote sync`,"sync.overviewHeading":`Sync`,"sync.manageSettings":`Manage sync settings`,"sync.exclusions.heading":`Files to sync`,"sync.exclusions.open":`Selection and exclusion rules`,"sync.exclusions.loading":`Loading synchronization files…`,"sync.exclusions.summary":`{included} included · {ignored} excluded`,"sync.exclusions.hint":`Unchecked files are not sent, overwritten, or removed by a receive. Existing local copies stay in place.`,"sync.exclusions.defaults":`There is no .sshcignore yet. The built-in rules exclude OS metadata, backups, temporary files, lock files, SSH authorized keys and known host files, and environment and rc at the root of .ssh. Saving shares the rules with every machine.`,"sync.exclusions.search":`Search file names and paths`,"sync.exclusions.empty":`No files match this search.`,"sync.exclusions.sensitiveWarning":`A connection file or key is excluded. Other machines may not be able to reproduce that connection.`,"sync.exclusions.advanced":`Edit .sshcignore`,"sync.exclusions.rules":`Synchronization exclusion rules`,"sync.exclusions.syntax":`Use Gitignore syntax including *, **, ?, [a-z], and ! to include again. .sshcignore itself and sshc device-local state are handled independently.`,"sync.exclusions.save":`Save exclusions`,"sync.exclusions.shared":`.sshcignore is synchronized so every machine uses the same rules.`,"sync.exclusions.invalid":`The exclusion rules are not valid.`,"sync.exclusions.loadFailed":`Could not load the synchronization files.`,"sync.exclusions.saveFailed":`Could not save the exclusion rules.`,"sync.receiveRemote":`Receive from remote`,"sync.autoBlockedReason":`Sync is paused. Reason: {reason}`,"sync.autoFailedReason":`The previous sync failed. Reason: {reason}`,"sync.setup.check":`Check connection`,"sync.setup.empty":`Connected. This path has no sync data.`,"sync.setup.existing":`Existing sync data was found.`,"sync.setup.incomplete":`History exists, but the current snapshot is missing.`,"sync.setup.useAnotherPath":`To start fresh, choose a different empty path.`,"sync.setup.existingKey":`Enter the encryption key used by this sync data. The actual snapshot will be decrypted before anything is saved.`,"sync.setup.emptyKey":`A strong encryption key will be generated. You may also choose your own.`,"sync.setup.save":`Verify and save`,"sync.setup.saved":`Connection details and encryption key saved.`,"sync.setup.changed":`The destination changed after it was checked. Check the connection again.`,"sync.role.main":`Main device (send and receive)`,"sync.role.receive":`Receive-only device`,"sync.role.advanced":`Advanced device roles`,"sync.role.send":`Send-only device`,"sync.pageDescription":`Synchronise an encrypted snapshot of this SSH workspace between machines through an object-storage bucket.`,"sync.flowHeading":`Steps to start syncing`,"sync.flowBucket":`Configure a bucket`,"sync.flowKey":`Set the shared encryption key`,"sync.flowOperate":`Inspect, send, or receive`,"sync.loading":`Reading the sync settings…`,"sync.warning":`The sync includes regular files under ~/.ssh that do not match the exclusion rules; this may include private keys. The snapshot is encrypted on this machine with the key below before upload, so the storage provider does not receive the synchronised content in plaintext. However, anyone with the bucket credentials can download the encrypted snapshot and attempt to guess the encryption key offline without a time limit.`,"sync.statusFailed":`The sync settings could not be read.`,"sync.bucketHeading":`Bucket`,"sync.notConfigured":`No bucket is configured yet.`,"sync.endpoint":`Endpoint`,"sync.endpointHint":`Must be https. For R2 this is https://.r2.cloudflarestorage.com.`,"sync.bucket":`Bucket name`,"sync.path":`Path in the bucket`,"sync.pathHint":`Optional. Empty puts the snapshot at the root of the bucket.`,"sync.region":`Region`,"sync.regionHint":`Optional. Leave this empty to use auto. Use auto for R2; for Amazon S3, enter the bucket's region.`,"sync.accessKeyId":`Access key ID`,"sync.secretAccessKey":`Secret access key`,"sync.credentialsNote":`Bucket credentials are encrypted with the master password and excluded from snapshots. Including them would allow anyone who obtained one snapshot to download later snapshots.`,"sync.sealed":`These settings are encrypted with the master password. Unlock the vault to view them.`,"sync.unlockFailed":`The master password is incorrect.`,"sync.noVault":`This machine has no vault yet. Create one from a Vault page, then come back.`,"sync.direction":`Direction`,"sync.direction.both":`Send and receive`,"sync.direction.push":`Send only`,"sync.direction.pull":`Receive only`,"sync.direction.both.hint":`This machine can send local changes and apply changes sent by other machines.`,"sync.direction.push.hint":`This machine only sends changes. Changes from other machines are not applied, but you can still preview them.`,"sync.direction.pull.hint":`This machine only receives changes. Local changes are not sent to the bucket or other machines.`,"sync.configure":`Use this bucket`,"sync.editSettings":`Edit bucket settings`,"sync.cancelSettings":`Cancel editing`,"sync.configureFailed":`The bucket could not be configured.`,"sync.detailsHeading":`Details and history`,"sync.neverSynced":`This machine has not synced yet.`,"sync.lastSynced":`Last synced {at}, {count} files.`,"sync.key":`Encryption key`,"sync.keyHint":`Snapshots are encrypted with this key, not the master password. Enter the same key on every machine that shares this bucket; each machine may use a different master password. If you lose this key, the snapshots cannot be decrypted.`,"sync.keyMissing":`No key yet. Create one here, then enter the same key on your other machines.`,"sync.keySet":`A key is set. It is not shown again.`,"sync.keyReady":`Key configured`,"sync.keyNeeded":`Key required`,"sync.keyShownOnce":`Copy this now and enter it on your other machines. Leave this screen and it will not be shown again.`,"sync.keyChooseOwn":`Choose the key myself`,"sync.keyOwnValue":`Key`,"sync.keyCreate":`Create a key`,"sync.keyReplace":`Replace the key`,"sync.keySaved":`Saved.`,"sync.keyFailed":`The key could not be saved.`,"sync.keyTooShort":`A key you choose yourself must be at least 12 characters.`,"sync.wrongKey":`The saved key cannot decrypt the snapshot in this bucket. Check that every machine uses the same key, or explicitly replace the remote snapshot from Bucket status.`,"sync.wrongMaster":`The master password for this machine is incorrect.`,"sync.bucketAuthenticationFailed":`The object store could not authenticate the request. Nothing was saved. Check the access key and secret.`,"sync.bucketAccessDenied":`The object store denied access. Nothing was saved. Check the credentials, bucket, region, and key permissions.`,"sync.bucketRateLimited":`The object store is limiting requests. Wait a moment and try again.`,"sync.bucketUnavailable":`The object store service is temporarily unavailable. Try again later.`,"sync.unreachable":`The object store refused the request. Nothing was saved. Check the bucket, access key, secret, region, and permissions.`,"sync.bucketTimeout":`The object store did not respond in time. Check the network and endpoint.`,"sync.bucketDNSFailed":`The endpoint hostname could not be resolved. Check the address and this device's DNS connection.`,"sync.bucketTLSFailed":`The secure connection to the endpoint could not be verified. Check the HTTPS address and this device's clock.`,"sync.bucketUnreachable":`The object store could not be reached. Check this device's network and the endpoint.`,"sync.snapshotDownloadIncomplete":`The encrypted snapshot download ended early. Check the network and try receiving it again.`,"sync.snapshotCostRefused":`This snapshot requires more decryption work than the safety limit allows.`,"sync.snapshotSchemaUnsupported":`This snapshot uses a format unsupported by this version of sshc. Update to the same or a newer version than the machine that created it.`,"sync.snapshotRejected":`The downloaded data is not a valid sshc snapshot or is damaged. Nothing was overwritten.`,"sync.snapshotTooLarge":`The snapshot exceeds the safe read limit. Nothing was overwritten.`,"sync.noSnapshot":`There is no current snapshot at the specified bucket and path.`,"sync.internalFailed":`Sync encountered an unclassified internal error. Include the diagnostic code below when reporting it.`,"sync.failed":`Sync could not be completed. Nothing was overwritten. Check the connection and try again.`,"sync.localChanged":`Settings on this machine changed after the preview. Nothing was overwritten. Check for changes again.`,"sync.workspaceBusy":`Another operation is updating settings on this machine. Try again after it finishes.`,"sync.endpointPath":`The endpoint is the account address only — no bucket name and no path. Put the bucket name in the field below.`,"sync.auto":`Automatic sync`,"sync.autoHint.both":`While the Vault is unlocked, sshc checks the remote once a minute. After a local setting changes, it waits until five seconds pass without another change and pushes once. Conflicts and changes that remove files are not applied automatically; automatic sync stops and reports them.`,"sync.autoHint.pull":`While the Vault is unlocked, sshc checks the remote once a minute. Changes on this machine are never pushed. Automatic receiving stops and reports conflicts or changes that would remove files.`,"sync.autoHint.push":`While the Vault is unlocked, sshc checks whether the remote has changed. After a local setting changes, it waits until five seconds pass without another change and pushes once. Remote content is never applied to this machine.`,"sync.autoEnable":`Keep this machine in sync automatically`,"sync.autoIdle":`Stopped`,"sync.autoLastRan":`Last checked {at}.`,"sync.autoBlockedConflicts":`Automatic sync stopped because the same files changed on this machine and another machine. Select Check for changes to compare them.`,"sync.autoBlockedRemovals":`Automatic sync stopped because applying the snapshot would remove files from this machine. Select Check for changes to review them.`,"sync.autoBlockedRemoteMoved":`Automatic sync stopped before uploading because another machine changed the remote snapshot. Download those changes or explicitly replace the confirmed remote snapshot.`,"sync.autoBlockedRemoteMovedPull":`The current remote has diverged from the last revision received by this machine. Automatic receiving stopped to prevent an unintended rollback.`,"sync.remoteHeadReviewHint":`A receive-only machine can explicitly accept the current remote as authoritative. Review when it was created, its source, and the affected files before applying it.`,"sync.remoteHeadReview":`Review current remote`,"sync.checkRemoteChanges":`Review remote changes`,"sync.remoteHeadPreviewHeading":`Receive current remote`,"sync.remoteHeadPreview":`Reviewing the remote created at {at} by {origin}. Apply verifies the same exact generation again and writes nothing if it changed in the meantime.`,"sync.remoteHeadApply":`Receive this remote`,"sync.autoBlockedRemoteDeleted":`The previously synchronized live snapshot was deleted from the bucket. Automatic sync stopped so it will not silently recreate or overwrite it.`,"sync.autoFailedLast":`The previous check could not reach the bucket. Automatic sync will try again.`,"sync.autoFailedWrongKey":`The remote snapshot cannot be opened with this machine's synchronization key. The same generation will not be downloaded again automatically.`,"sync.autoFailedSchema":`The remote snapshot uses an unsupported format. The same generation will not be downloaded again automatically.`,"sync.autoFailed":`The setting could not be saved.`,"sync.autoNow":`Sync now`,"sync.autoNow.both":`Sync now`,"sync.autoNow.pull":`Receive now`,"sync.autoNow.push":`Send now`,"sync.autoNowFailed":`The sync check could not be run.`,"sync.transferHeading":`Send or review changes`,"sync.transferHint.both":`Push this machine's workspace, or review the remote snapshot before applying it.`,"sync.transferHint.push":`Push this machine's workspace. Remote content is not applied to this machine.`,"sync.commitMessage":`Commit message`,"sync.commitMessagePlaceholder":`Describe this snapshot`,"sync.commitMessageHint":`A local-diff summary is generated automatically. Edit it before a manual push.`,"sync.commitMessageChanges":`Local diff: {added} added · {modified} modified · {removed} removed`,"sync.commitMessageInvalid":`Use a single-line commit message of 240 characters or fewer.`,"sync.bucketStateHeading":`Bucket status`,"sync.bucketStateHint":`Reads the live object and dated history directly from S3 without downloading their encrypted contents. Refreshes every 30 seconds while this screen is visible and after transfers.`,"sync.bucketRefresh":`Refresh bucket status`,"sync.bucketNotConfigured":`Configure a bucket to inspect it.`,"sync.bucketLoading":`Reading the bucket…`,"sync.bucketStatusFailed":`The bucket status could not be read.`,"sync.bucketLive":`Current snapshot`,"sync.bucketLiveEmpty":`The bucket has no current snapshot.`,"sync.bucketLocalCurrent":`This machine has acknowledged the current remote generation.`,"sync.bucketLocalBehind":`The remote generation differs from this machine's last acknowledged snapshot.`,"sync.bucketHistory":`Dated history · {count}`,"sync.bucketHistoryShowing":`Showing the latest {shown} of {count} entries.`,"sync.bucketHistoryExpand":`Show all history`,"sync.bucketHistoryCollapse":`Show only the latest 5`,"sync.bucketObjectName":`Show S3 object name`,"sync.bucketHistoryTruncated":`Showing the newest 10,000 entries. The bucket contains older history too.`,"sync.bucketHistoryEmpty":`No dated history objects were found.`,"sync.bucketObjectMeta":`{size} · updated {at}`,"sync.bucketCheckedAt":`Bucket checked at {at}.`,"sync.historyHeading":`Encrypted revision history`,"sync.historyHint":`Decrypts a bounded recent window on this machine and shows it as a commit graph. File contents never enter the API response.`,"sync.historyRefresh":`Refresh revision history`,"sync.historyNeedsKey":`Set the shared encryption key to read revision history.`,"sync.historyLoading":`Decrypting recent revisions…`,"sync.historyFailed":`The encrypted revision history could not be read.`,"sync.historySummary":`{count} revisions · downloaded {size}`,"sync.historyTruncated":`Only the newest bounded history window is decoded. Older objects remain in the bucket list above.`,"sync.historySkipped":`{count} history object(s) could not be opened with the current format or key and were skipped.`,"sync.historyTimeline":`Revision timeline`,"sync.historyRelation.head":`HEAD`,"sync.historyRelation.ancestor":`ancestor`,"sync.historyRelation.branch":`branch`,"sync.historyRevisionMeta":`{at} · {count} files · device {origin}`,"sync.historyParent":`parent {revision}`,"sync.historySelect":`Select a revision to compare it with the current remote head.`,"sync.historySelected":`Selected revision`,"sync.historyDiffLoading":`Comparing paths…`,"sync.historyDiffEmpty":`Select this revision again to compare paths.`,"sync.historyDiffFailed":`The selected revision could not be compared.`,"sync.historyDiff.added":`Added · {count}`,"sync.historyDiff.modified":`Modified · {count}`,"sync.historyDiff.removed":`Removed · {count}`,"sync.historyRestoreHint":`Restore previews local file changes first. It does not rewind the remote head; the next push creates a new head from this revision.`,"sync.historyRestorePreview":`Preview restoring this revision`,"sync.forceHeading":`Replace the remote snapshot`,"sync.forceHint":`Use this when changing to a bucket that already contains an unreadable or unwanted snapshot. The current workspace is encrypted and replaces only the exact remote generation shown above. If it changes after confirmation, the operation is cancelled. Existing dated history is not deleted.`,"sync.forceConfirm":`I understand that the current remote snapshot will be replaced with this machine's workspace.`,"sync.forcePush":`Replace the remote snapshot`,"sync.forcePushShort":`Force send`,"sync.forcePull":`Force receive`,"sync.dialogClose":`Close`,"sync.forcePushed":`Replaced the confirmed remote snapshot.`,"sync.forceFailed":`The remote snapshot could not be replaced. Refresh the bucket status and confirm again.`,"sync.push":`Push this workspace`,"sync.pushed":`Pushed.`,"sync.pushFailed":`The snapshot could not be uploaded. If another machine uploaded changes after this machine's last sync, download those changes first.`,"sync.noLocalChanges":`There are no local changes to push.`,"sync.remoteMoved":`Another machine changed the current snapshot, so the update was cancelled before retrying. Download the other machine's changes or explicitly replace the confirmed remote snapshot.`,"sync.previewStale":`The remote snapshot changed after this preview. Preview it again before applying.`,"sync.remoteDeleted":`The live remote snapshot was deleted before apply. Refresh the bucket status.`,"sync.keyRecoveryRequired":`Synchronization key replacement was interrupted. Enter the same new synchronization key again to recover.`,"sync.keyRecoveryTargetChange":`Finish the interrupted key replacement before changing the bucket or path.`,"sync.keyHistoryLossConfirm":`I understand that older history snapshots will remain encrypted with the previous key and will no longer be readable.`,"sync.preview":`Check for changes`,"sync.pullFailed":`The snapshot could not be read.`,"sync.alreadyMatches":`This workspace already matches the snapshot.`,"sync.previewHeading":`What a pull would change`,"sync.conflictExplain":`These files changed on this machine and another machine. The same configuration block cannot be merged automatically, so nothing was applied. Merge the files manually in the Configuration files screen, or upload from the machine whose version you want to keep.`,"sync.conflictPermissions":`Permissions: last sync {base} · this machine {local} · remote {remote}`,"sync.keepMine":`Keep this machine's version`,"sync.takeTheirs":`Use the other machine's version`,"sync.wouldWrite":`{count} files would be written:`,"sync.wouldRemove":`{count} files would be removed:`,"sync.confirmOverwrite":`This will overwrite files in ~/.ssh and remove the files listed above from this machine. Every affected file is first copied to ~/.ssh/sshc/backups/ and can be restored from History. Continue?`,"sync.apply":`Apply the snapshot`,"sync.applied":`Applied. The change is in History and can be rolled back.`,"sync.applyFailed":`The snapshot could not be applied.`,"sync.result.pushTitle":`This push`,"sync.result.previewTitle":`Pull preview`,"sync.result.applyTitle":`Apply result`,"sync.result.previousTitle":`Previous success`,"sync.result.filesSource":`{count} files · {size}`,"sync.result.encrypted":`Encrypted snapshot {size}`,"sync.result.uploaded":`S3 transfer {size} ({count} objects, history + live)`,"sync.result.previewDownload":`Downloaded {downloaded} · {source} after opening`,"sync.result.applyDownload":`Downloaded again for apply: {size}`,"sync.result.changes":`{written} written · {removed} removed · {conflicts} conflicts`,"sync.result.created":`Snapshot created {at}`,"sync.result.snapshotAt":`Snapshot from {at}`,"sync.result.appliedSnapshot":`Applied the snapshot from {at}`,"sync.result.completed":`Operation completed {at}`,"diag.heading":`Ad hoc checks`,"diag.pageDescription":`Run SSH checks against a saved alias or any one-off host. Nothing is contacted until you choose a check.`,"diag.configUnreadable":`The configuration could not be read.`,"diag.running":`Running the requested check…`,"diag.idle":`No check is running.`,"diag.hostAlias":`Host alias`,"diag.needsAlias":`Type a host alias to run a check.`,"diag.explain":`Explain`,"diag.explainFailed":`Could not analyse the settings for this alias.`,"diag.checkReachability":`Check reachability`,"diag.reachabilityFailed":`The reachability check could not be run.`,"diag.testAuthentication":`Test authentication`,"diag.authenticationFailed":`The authentication test could not be run.`,"diag.configuration":`Configuration`,"diag.missingSuffix":` (missing)`,"diag.canRunCommand":`This connection includes settings that may cause OpenSSH to run commands`,"diag.directiveAt":`{keyword} at {path}:{line}`,"diag.sourcesCaption":`Source of each value. A line marked “superseded” was read after the effective value and had no effect.`,"diag.tableScrollHint":`Swipe sideways to see every column`,"diag.columnKeyword":`Keyword`,"diag.columnValue":`Value`,"diag.columnWhere":`Read from`,"diag.columnCondition":`Under`,"diag.columnState":`State`,"diag.inEffect":`in effect`,"diag.superseded":`superseded`,"diag.route":`Connection route`,"diag.hopComplex":`this hop is not a simple alias, so its destination is not resolved here`,"diag.reachedThrough":`reached through {parent}`,"diag.notSimple":`These rules cannot be resolved in the simplified view`,"diag.notSimpleDetail":"sshc shows the source of each value but cannot resolve the final result. Use `ssh -G` for the authoritative values.","diag.inside":`inside {condition}`,"diag.reachability":`Reachability`,"diag.authentication":`Authentication`,"diag.authenticationMethod":`Authenticated with {method}.`,"diag.forHost":`Diagnostics for {host}`,"kh.heading":`Known Hosts`,"kh.pageDescription":`Review trusted host keys, scan a destination and verify its fingerprint before adding it to known_hosts.`,"kh.metricEntries":`Trusted entries`,"kh.metricHashed":`Hashed hosts`,"kh.metricCandidates":`Scan candidates`,"kh.scanHeading":`Scan a host`,"kh.trustedHeading":`Trusted host keys`,"kh.columnHost":`Host`,"kh.columnType":`Key type`,"kh.columnFingerprint":`Fingerprint`,"kh.columnTrust":`Trust`,"kh.columnActions":`Actions`,"kh.unreadable":`The known_hosts file could not be read.`,"kh.removeFailed":`The entry could not be removed. Nothing was changed.`,"kh.scanFailed":`The host could not be scanned.`,"kh.addFailed":`The key could not be added. Nothing was changed.`,"kh.addFailedCode":`The key could not be added ({code}). Nothing was changed.`,"kh.removed":`Removed one entry in transaction {id}.`,"kh.added":`Added {host} in transaction {id}.`,"kh.search":`Search`,"kh.hashed":`(hashed)`,"kh.delete":`Delete`,"kh.confirmRemove":`Remove line {line} ({fingerprint})? The operation is recorded in History and a backup is kept.`,"kh.confirmDelete":`Confirm delete`,"kh.cancel":`Cancel`,"kh.hostToScan":`Host to scan`,"kh.scan":`Scan`,"kh.scanCandidates":`Scan candidates`,"kh.unverified":`unverified`,"kh.add":`Add`,"kh.addHeading":`Add an unverified host key`,"kh.addExplain":`This key was presented when connecting to {host}, but another system reachable at that address could have presented it. Enter a fingerprint obtained through another trusted channel, or accept the risk of trusting an unverified key.`,"kh.expectedFingerprint":`Fingerprint verified through another channel`,"kh.acknowledge":`I could not verify this key and I accept the risk of trusting it`,"kh.addToKnownHosts":`Add to known_hosts`,"kh.fingerprintMismatch":`The fingerprint you typed does not match this key. You typed {typed}; the scan returned {scanned}. Nothing was added.`,"rk.heading":`Install Key on Server`,"rk.pageDescription":`Review the exact authorized_keys change before installing one of your public keys on a remote account.`,"rk.waiting":`Waiting for the server…`,"rk.idle":`Nothing is sent to the remote host until you confirm it.`,"rk.added":`The key was added to the remote authorized_keys file.`,"rk.alreadyPresent":`The key was already present; the remote file was left as it was.`,"rk.valuesFromEngine":`sshc reading your configuration; ssh was not run`,"rk.valuesFromSshG":`Resolved by OpenSSH using ssh -G`,"rk.pickFromSsh":`Public key from ~/.ssh`,"rk.typeInstead":`Type one below instead`,"rk.hostAlias":`Host alias`,"rk.hostSearch":`Connections`,"rk.hostSearchPlaceholder":`Search hosts or type an alias`,"rk.hostTypeHint":`Type a Host alias above. Saved connections will appear here when available.`,"rk.hostsSelected":`{count} selected`,"rk.hostChoices":`Connection choices`,"rk.selectMatches":`Select matches`,"rk.clearSelection":`Clear`,"rk.noHostMatches":`No matching connections`,"rk.chooseHost":`Select at least one connection or type a Host alias.`,"rk.publicKeyFile":`Public key file`,"rk.publicKeyLine":`Public key line`,"rk.showWhatWouldHappen":`Show what this would do`,"rk.register":`Register the key`,"rk.registerMany":`Register on {count} hosts`,"rk.plannedHosts":`Reviewed {count} hosts`,"rk.planFailed":`The change could not be described. Nothing was contacted.`,"rk.registerFailed":`The key was not registered. The remote host was left as it was.`,"rk.publicKeyUnreadable":`The selected public key could not be read. No connection was attempted.`,"rk.withCode":`{message} ({code})`,"rk.confirmHeading":`Confirm remote registration`,"rk.confirmManyHeading":`Confirm registration on {count} hosts`,"rk.planFor":`Registration plan for {alias}`,"rk.alias":`Alias`,"rk.effectiveUser":`Connection user`,"rk.noUser":`not set in your configuration; ssh will use your local account`,"rk.destination":`Destination`,"rk.valuesCameFrom":`These values came from`,"rk.keyFile":`Public key file`,"rk.fingerprint":`Fingerprint`,"rk.appendTo":`Add one line to {remotePath} for {account} on {hostname}, but only if the same line is not already present.`,"rk.theRemoteAccount":`the remote account`,"rk.usersAccount":`{user}’s account`,"rk.keyLineLabel":`Public key line to append`,"rk.remoteRuns":`The remote host runs this command with the key provided on standard input:`,"rk.remoteCommandLabel":`Remote command`,"rk.connectingRuns":`Connecting to this host runs a command`,"rk.acknowledgeRuns":`I have read this command and accept that connecting runs it`,"rk.manualHeading":`sshc cannot register a key on this host. Complete these steps manually:`,"rk.result":`Result`,"rk.someRegistrationsFailed":`Some hosts could not be updated. Review the result for each host.`,"explorer.loading":`Loading configuration files…`,"explorer.pageTitle":`Configuration files`,"explorer.pageDescription":`Follow the Include graph, edit exact file contents and manage workspace files without losing OpenSSH formatting.`,"explorer.metricFiles":`Loaded files`,"explorer.metricEditable":`Editable files`,"explorer.metricDiagnostics":`Diagnostics`,"explorer.hierarchy":`Include hierarchy`,"explorer.externalFile":`This file is outside ~/.ssh. It is read and shown, never written.`,"explorer.insideCondition":`inside {condition}`,"explorer.fileState":`{missing}{loads}{editable}`,"explorer.missing":`missing · `,"explorer.readTimes":`read {count} times · `,"explorer.editable":`editable`,"explorer.readOnly":`read only`,"explorer.newFilePath":`New file path`,"explorer.workspaceActions":`Workspace files`,"explorer.directoryHelp":`About files and directories`,"explorer.createFile":`Create file`,"explorer.createDirectory":`Create directory`,"explorer.deleteDirectory":`Delete directory`,"explorer.directoryNote":`You can create and delete directories here, but only empty directories can be deleted. Delete their files first; Include lines that directly reference those files are updated at the same time. Manage declared groups on the Groups screen.`,"explorer.fileOperations":`This file`,"explorer.fileOperationsNote":`Renaming this file also updates Include lines that directly reference it. Wildcard patterns are not changed; a warning appears if the new path no longer matches.`,"explorer.renameTo":`New path`,"explorer.renameFile":`Rename file`,"explorer.deleteFile":`Delete file`,"explorer.confirmDelete":`Delete it`,"explorer.cancelDelete":`Keep it`,"explorer.deleteIsRecoverable":`Deleting this file also removes Include lines that directly reference it. A backup is kept so the file can be restored from History.`,"explorer.saveOrDiscardFirst":`There are unsaved edits. Save them or reopen the file before renaming or deleting it.`,"explorer.newFileNote":`To make OpenSSH read a new file, reference it with an Include directive in ~/.ssh/config. Move connections between groups on the Connections screen.`,"explorer.diagnostics":`Diagnostics`,"explorer.noIncludeProblem":`No Include problem detected.`,"explorer.opened":`Opened {path} at line {line}.`,"explorer.selectFile":`Select a file to edit its full text.`,"explorer.emptyHeading":`Select a configuration file`,"explorer.unsaved":`Unsaved changes`,"explorer.fileText":`File text — {path}. The content is written back exactly as entered.`,"explorer.preview":`Preview`,"explorer.saveFile":`Save file`,"groups.loading":`Loading groups…`,"groups.pageTitle":`Groups`,"groups.pageDescription":`Organise connections and keys into nested groups, then apply shared SSH settings to each group.`,"groups.metricGroups":`Groups`,"groups.metricConnections":`Connections`,"groups.metricDraft":`Unsaved drafts`,"groups.empty":`No group exists yet. Create one below to organise related connections and keys.`,"groups.nameTaken":`A group with this name already exists. Enter a different name.`,"groups.chooseGroupAndKeyword":`Choose a group and a directive keyword.`,"groups.unbalancedQuote":`A value has an unbalanced quote. OpenSSH has no escape inside quotes, so this cannot be saved.`,"groups.renameNeedsName":`Enter a new name for the group.`,"groups.renameCollides":`{name} already exists. Rename it to something else, or remove one of the two.`,"groups.compileNote":`Groups compile into ordinary Host blocks in {file}, with child groups written before their parents so OpenSSH keeps the most specific value it reads first.`,"groups.members":`Members:`,"groups.noMembers":`none`,"groups.colour":`Colour`,"groups.clearColour":`Clear {name} colour`,"groups.renameTo":`Rename {name} to`,"groups.renameShort":`New name`,"groups.rename":`Rename {name}`,"groups.displayOrder":`Display order`,"groups.hide":`Hide {name} from Connections`,"groups.hideOnlyContainers":`This group contains direct connections, which would also be hidden. Move them into a child group first.`,"groups.remove":`Remove {name}`,"groups.newName":`New group name`,"groups.invalidName":`A group name is a relative directory path: letters, digits, dot, dash and underscore, slash-separated, at most six levels deep.`,"groups.directoryNote":`Each group is a directory. Connections are stored in {connections}// and keys in {keys}//. sshc adds one Include line per group to ~/.ssh/config, making the read order and setting precedence explicit instead of relying on a wildcard.`,"groups.howItWorks":`How groups map to SSH files`,"groups.directories":`{connections}/ · {keys}/`,"groups.nestingNote":`Use a slash to nest: work/eu is a group inside work.`,"groups.addChild":`Add a group inside {name}`,"groups.listLabel":`Groups, parent before child`,"groups.orderNote":`Listed as a tree, parent first. The Include lines are written in the opposite order — deepest group first — because OpenSSH keeps the first value it reads, so a child's setting has to be read before its parent's.`,"groups.removeInto":`Remove {name}`,"groups.removeIntoShort":`Move its connections to`,"groups.removeIntoNone":`No group (connections/ itself)`,"groups.removeExplain":`Removing {name} takes away its Include line and its group settings. Its {count} connections have to go somewhere:`,"groups.removeExplainEmpty":`Removing {name} deletes its Include line and group settings. The group contains no connections, so no connection files are moved.`,"groups.removeKeepsFiles":`No configuration file is deleted. The change is one transaction, so History can undo it.`,"groups.removeConfirm":`Remove {name}`,"groups.removeCancel":`Keep it`,"groups.unsaved":`Not saved`,"groups.unsavedBarLabel":`Unsaved group changes`,"groups.unsavedBarNote":`Group additions and display settings are not saved yet. Save or discard them before renaming or removing a group.`,"groups.discard":`Discard group changes`,"groups.saveDraftFirst":`Save or discard the pending group changes before renaming or removing a group.`,"groups.savedNote":`There are no unsaved changes. Colour, display order, new groups, and new settings are applied with Save groups. Rename and Remove write to disk immediately.`,"groups.immediateActions":`Rename and remove write to disk immediately.`,"groups.newGroupNote":`This group does not have a directory yet. Save groups creates it; Rename and Remove become available afterwards.`,"groups.addHeading":`Add a group`,"groups.add":`Add group`,"groups.settingHeadingFor":`Add a setting to {name}`,"groups.directive":`Directive`,"groups.value":`Value`,"groups.addSetting":`Add setting`,"groups.previewChanges":`Preview group changes`,"groups.save":`Save groups`,"tree.navLabel":`Connections`,"tree.ungrouped":`Ungrouped`,"tree.arrangeBy":`Arrange connections by`,"tree.byGroups":`Groups`,"tree.byFiles":`Files`,"tree.groupFilter":`Filter by group`,"tree.groupSection":`{name} group, {count} connections`,"tree.filter":`Filter connections`,"tree.filterPlaceholder":`alias, pattern, group or tag`,"tree.filterPlaceholderExpanded":`Search name, destination, user, group or tag`,"tree.allConnections":`All`,"tree.resultsLabel":`Connection results`,"tree.resultCount":`{visible} of {total}`,"tree.sortLabel":`Connection order`,"tree.sortConfigured":`Configured order`,"tree.sortName":`Name`,"tree.sortGroup":`Group`,"tree.noMatch":`No connection matches this filter.`,"tree.groupEmpty":`No connection is in this group.`,"tree.collapse":`Collapse {name}`,"tree.expand":`Expand {name}`,"tree.patternRuleExternal":`Pattern rule in {path}, a file this editor only reads.`,"tree.patternRuleOpen":`Pattern rule — open it in the Config file view ({path}:{line})`,"tree.duplicateAlias":`duplicate alias`,"tree.patternRule":`pattern rule`,"tree.dragGroupHint":`Drag a group to nest or reorder it.`,"browser.modeLabel":`Browse connections by`,"browser.servers":`Servers`,"browser.groups":`Groups`,"browser.groupPath":`Group path`,"browser.ungrouped":`Ungrouped`,"browser.groupCountOne":`1 server`,"browser.groupCountMany":`{count} servers`,"browser.noMatches":`No servers match the current filters.`,"browser.emptyGroup":`No servers are directly in this group.`,"browser.emptyGroups":`No groups are declared yet.`,"browser.groupMissing":`Group not found.`,"browser.backToGroupRoot":`Back to group root`,"browser.invalidUrl":`This connection URL is not recognised.`,"browser.backToServers":`Back to servers`,"browser.duplicateAlias":`duplicate alias`,"conn.loading":`Loading connections…`,"conn.heading":`Connections`,"conn.count":`{count} available`,"conn.new":`New connection`,"conn.resizeGroups":`Resize the groups column`,"conn.resizeList":`Resize the connection list`,"conn.allConnections":`All connections`,"conn.createAnother":`Create another connection`,"conn.cancelCreate":`Cancel`,"conn.create":`Create connection`,"conn.createTitle":`Create connection`,"conn.createDescription":`Save an SSH destination and choose its authentication method.`,"conn.createConnectionSection":`Connection`,"conn.createName":`Connection name`,"conn.createNameRequired":`Connection name (required)`,"conn.createGroup":`Save in group`,"conn.createManageGroups":`Manage groups`,"conn.createNoGroup":`No group`,"conn.createHostName":`Host name or IP address`,"conn.createHostNameRequired":`Host name or IP address (required)`,"conn.createUser":`User (optional)`,"conn.createPort":`Port (optional)`,"conn.createPortHint":`Defaults to 22.`,"conn.createAuthenticationSection":`Authentication`,"conn.createAuthenticationMethod":`Authentication method`,"conn.createDedicatedPassword":`Encrypted password for this connection`,"conn.createSavedPassword":`Saved password`,"conn.createNewSharedPassword":`New saved password`,"conn.createIdentityFile":`SSH private key`,"conn.createConnectionPassword":`Connection password`,"conn.createDedicatedHint":`Encrypted in the vault and not listed as a reusable password.`,"conn.createChooseSavedPassword":`Saved password`,"conn.createSavedHint":`This connection will share the selected reusable password.`,"conn.createNoSavedPasswords":`No saved passwords`,"conn.createSavedPasswordName":`Saved password name`,"conn.createNewPassword":`New password`,"conn.createPrivateKey":`SSH private key`,"conn.createNoPrivateKeys":`No private keys available`,"conn.createNoPrivateKeysHint":`Create a private key first if you do not want to use a password.`,"conn.createCreatePrivateKey":`Create a private key`,"conn.createLoadingOptions":`Loading authentication options…`,"conn.createOptionsFailed":`Authentication options could not be loaded.`,"conn.createMasterPassword":`Master password`,"conn.createConfirmMaster":`Confirm master password`,"conn.createInitialiseVault":`Create encrypted vault`,"conn.createUnlockVault":`Unlock vault`,"conn.createVaultMissing":`Create the encrypted vault before saving this connection.`,"conn.createVaultLocked":`Unlock the encrypted vault before saving this connection.`,"conn.createVaultFailed":`The encrypted vault could not be created.`,"conn.createUnlockFailed":`The encrypted vault could not be unlocked.`,"conn.createNeedVault":`Unlock the encrypted vault to continue.`,"conn.createNeedConnectionPassword":`Enter a connection password to continue.`,"conn.createNeedSavedPassword":`Choose a saved password to continue.`,"conn.createNeedSavedPasswordName":`Enter a saved password name to continue.`,"conn.createNeedNewPassword":`Enter the new password to continue.`,"conn.createNeedPrivateKey":`Choose or create a private key to continue.`,"conn.createDraftWaiting":`Connection setup for {alias} is paused.`,"conn.createUntitledDraft":`Untitled connection`,"conn.createReturnToDraft":`Return to connection setup`,"conn.createAliasRequired":`Enter a connection name.`,"conn.createAliasInvalid":`Use letters, numbers, dot, dash, or underscore; start with a letter or number.`,"conn.createHostRequired":`Enter a host name or IP address.`,"conn.createHostInvalid":`Enter a DNS name, IPv4 address, or unbracketed IPv6 address.`,"conn.createUserInvalid":`User cannot contain whitespace or control characters.`,"conn.createPortInvalid":`Port must be a whole number from 1 to 65535.`,"conn.creating":`Creating…`,"conn.createFailed":`The connection could not be created.`,"conn.createAliasTaken":`Another connection already uses that name.`,"conn.duplicateAliasTaken":`{alias} already exists, so this connection cannot be duplicated.`,"conn.createGroupMissing":`The selected group is no longer declared. Reload and choose another group.`,"conn.createKeyInvalid":`The selected private key is no longer available. Reload and choose another key.`,"conn.createCredentialMissing":`The selected saved password is no longer available. Reload and choose another one.`,"conn.createDestinationExists":`A connection file with that name already exists in this group.`,"conn.basicConnection":`Connection`,"conn.basicAuthentication":`Authentication`,"conn.basicHostName":`Host name or IP address`,"conn.basicServerKeyInvalid":`The selected SSH private key is no longer available. Reload and choose it again.`,"conn.basicCredentialExists":`A saved password with this name already exists. Choose it under Saved password or use another name.`,"conn.basicCredentialMissing":`The selected saved password no longer exists. Reload and choose another one.`,"conn.basicPasswordMissing":`This connection no longer has a stored password to remove.`,"conn.basicUser":`User`,"conn.basicPort":`Port`,"conn.basicPrivateKey":`SSH private key`,"conn.basicStoredPassword":`Stored password`,"conn.basicStoredTOTP":`One-time password (TOTP)`,"conn.basicThisConnection":`Set on this connection.`,"conn.basicInheritedFrom":`Inherited from {path}:{line}.`,"conn.basicSSHDefault":`SSH default. Saving another field will not write this value.`,"conn.basicReadOnlyAdvanced":`Read-only in Basic; the original directives remain available in Advanced.`,"conn.basicComplex":`This connection has multiple direct {keyword} values. Resolve them in Advanced.`,"conn.basicUseInheritedHost":`Use inherited/default host name`,"conn.basicUseInheritedUser":`Use inherited/default user`,"conn.basicUseInheritedPort":`Use inherited/default port`,"conn.basicKeepDirect":`Keep this connection value`,"conn.basicAgentOrInherited":`SSH agent or inherited keys`,"conn.basicManageKeyPassphrase":`Save or change key passphrase`,"conn.basicKeyPassphraseHeading":`Saved key passphrase`,"conn.basicKeyPassphraseUnencrypted":`This private key is not encrypted, so it needs no saved passphrase.`,"conn.basicKeyPassphraseNone":`No passphrase is saved for this key.`,"conn.basicKeyPassphraseDedicated":`A passphrase is saved only for this key.`,"conn.basicKeyPassphraseShared":`This key uses the shared saved passphrase “{name}”.`,"conn.basicKeyPassphraseSharedOthers":`It is also used by {count} other key(s).`,"conn.basicKeyPassphraseDetach":`Saving here creates a passphrase dedicated to this key. The shared credential and its other assignments remain unchanged.`,"conn.basicNewKeyPassphrase":`New saved key passphrase`,"conn.basicConfirmKeyPassphrase":`Confirm saved key passphrase`,"conn.basicKeyPassphraseMismatch":`The key passphrases do not match.`,"conn.basicKeyPassphraseStoredNote":`This saves the passphrase used to decrypt the private key. It does not change the passphrase that encrypts the private-key file.`,"conn.basicKeyPassphraseWrong":`The entered passphrase does not unlock the selected private key.`,"conn.basicKeyPassphraseChanged":`The selected private key changed. Reload before saving its passphrase.`,"conn.basicGeneratedKeyStaged":`{path} is staged for this connection. Choose Save Basic settings to apply it.`,"conn.basicCustomKey":`This connection uses the custom IdentityFile path {path}. Edit it in Advanced.`,"conn.basicComplexKey":`This connection has multiple direct IdentityFile values. Resolve them in Advanced.`,"conn.basicAssignedDedicated":`A connection-only password is assigned. Its value is never displayed.`,"conn.basicAssignedNamed":`Assigned: {name}`,"conn.basicNoPassword":`No stored password is assigned.`,"conn.basicNoTOTP":`No one-time password is assigned.`,"conn.basicAssignedTOTP":`Assigned: {name}`,"conn.basicRouteConfirmHeading":`Use saved credentials on this route?`,"conn.basicRouteConfirmBody":`The authentication route changed. Saving allows the assigned password or one-time password to be used on the current route.`,"conn.basicRouteConfirmSave":`Save and confirm`,"conn.basicRouteConfirmCancel":`Cancel`,"conn.basicTOTPAction":`One-time password action`,"conn.basicTOTPUnchanged":`No assignment change`,"conn.basicUseSavedTOTP":`Assign a saved TOTP`,"conn.basicRemoveTOTP":`Remove TOTP assignment`,"conn.basicChooseSavedTOTP":`Saved TOTP`,"conn.basicNoSavedTOTPs":`No TOTP is stored in Vault`,"conn.basicTOTPNote":`Register TOTP seeds in the Vault, then assign one to this connection here. sshc only enters the code when an authentication prompt explicitly requests it, such as “Verification code”.`,"conn.basicPasswordCleanup":`A stored password is still assigned, but sshc will not use it. Saving Basic settings will remove this connection's assignment; a shared credential and its other hosts remain unchanged.`,"conn.basicPasswordAction":`Stored password action`,"conn.basicPasswordUnchanged":`No password change`,"conn.basicReplaceDedicated":`Replace with a connection-only password`,"conn.basicRemovePassword":`Remove stored password`,"conn.basicConfirmRemove":`Confirm stored password removal`,"conn.basicEmptyPasswordUnchanged":`Leaving this empty makes no password change.`,"conn.basicVaultMissing":`Create the encrypted vault before saving Basic settings.`,"conn.basicVaultLocked":`Unlock the encrypted vault before saving Basic settings.`,"conn.basicNeedVault":`Unlock the encrypted vault to save this draft.`,"conn.basicPasswordBlocked":`The current SSH settings block adding or replacing a stored password.`,"conn.basicNothingChanged":`No Basic setting has changed.`,"conn.basicOptionsFailed":`Keys and password options could not be loaded.`,"conn.basicCredentialOptionsFailed":`Saved password options could not be loaded.`,"conn.basicSaveFailed":`Basic settings could not be saved. Nothing was changed; review the error or reload and try again.`,"conn.basicRefreshFailed":`The settings were saved, but their updated password status could not be loaded. Reload this connection.`,"conn.basicConnectionRefreshFailed":`The settings were saved, but the updated connection could not be loaded. Reload this connection.`,"conn.basicSave":`Save Basic settings`,"conn.basicSaving":`Saving…`,"conn.discardChanges":`Discard changes`,"conn.blockMoved":`This block moved on disk. Reload the connection and try again.`,"conn.emptyHeading":`Choose a connection`,"conn.emptyHint":`Select a host from the list to edit its SSH settings, or create a new connection.`,"conn.assignKeyHeading":`Choose a connection for this key`,"conn.assignKeyHint":`Select a connection to stage {path} in its Basic settings. Nothing changes until you save.`,"conn.missingHeading":`This connection is no longer available`,"conn.missingHint":`It may have been renamed, moved or deleted since this link was created.`,"conn.backToList":`Back to connections`,"conn.summarySaved":`Saved connection`,"conn.summarySavedState":`Saved`,"conn.summaryUnsaved":`Unsaved changes`,"conn.summaryGroup":`Group`,"conn.summaryNoGroup":`No group`,"conn.summaryPrivateKey":`SSH private key`,"conn.summaryKeyNone":`SSH agent or inherited keys`,"conn.summaryKeyComplex":`Multiple IdentityFile directives`,"conn.summaryKeyUnavailable":`{path} — key details unavailable`,"conn.summaryKeyPassphrase":`Key passphrase`,"conn.summaryKeyPassphraseNone":`No passphrase saved`,"conn.summaryKeyPassphraseDedicated":`Saved only for this key`,"conn.summaryKeyPassphraseNamed":`Saved passphrase: {name}`,"conn.summaryKeyPassphraseNotNeeded":`Not needed for this unencrypted key`,"conn.summaryAccountPassword":`Account password`,"conn.summaryPasswordNone":`No saved password`,"conn.summaryPasswordDedicated":`Connection-only password saved`,"conn.summaryPasswordNamed":`Saved password: {name}`,"conn.summaryPasswordRouteStale":`Saved password paused`,"conn.summaryPasswordCleanup":`A stored password is assigned but is not used and will be unassigned when Basic settings are saved.`,"conn.summaryLocked":`Unavailable while the vault is locked`,"conn.summaryUnavailable":`Could not load this status`,"conn.summaryDraftBlocksActions":`Save or discard this draft before using the saved connection.`,"conn.summaryRefreshing":`Reloading the saved connection. Actions will be available when it finishes.`,"conn.editorLabel":`Connection editor`,"conn.areaBasic":`Basic`,"conn.areaAnalysis":`Analysis`,"conn.areaAdvanced":`Advanced`,"conn.areaSshc":`sshc`,"conn.checksLabel":`Connection checks`,"conn.checkReachability":`Check reachability`,"conn.checkAuthentication":`Check authentication with saved settings`,"conn.checking":`Checking…`,"conn.checksExecutableHeading":`Authentication may execute SSH directives`,"conn.checksExecutableHint":`Review the exact saved directives before allowing the authentication check to continue.`,"conn.checksDirectiveAt":`{keyword} at {path}:{line}`,"conn.checksAcknowledge":`Acknowledge and check authentication`,"conn.analysisLabel":`Settings analysis`,"conn.analysisExplained":`Resolved saved values`,"conn.analysisExplainedHint":`These are the values used by this connection. They are resolved without executing commands. Settings that cannot be resolved are identified explicitly.`,"conn.analysisAuthoritative":`Where each value comes from`,"conn.analysisAuthoritativeHint":`Lists every line read for the saved connection, the file containing it, and whether the line takes effect.`,"conn.analysisRun":`Show the sources`,"conn.analysisRunning":`Reading…`,"conn.analysisExecutableHeading":`This connection includes directives that may cause OpenSSH to run commands`,"conn.analysisTokenWarning":`OpenSSH does not shell-escape expanded tokens. Host name, port, or user values may therefore reach the command's shell unescaped.`,"conn.analysisSources":`Configuration lines related to this connection`,"conn.advancedLabel":`Advanced settings`,"conn.advancedViews":`Advanced setting views`,"conn.advancedViewLabel":`View`,"conn.advancedDirectives":`Directives`,"conn.portForwarding":`Port forwarding`,"conn.forwardLoopbackOnly":`Listeners are bound to this device only (127.0.0.1), but other OS accounts on the same device may be able to use them. Remote forwarding is not supported.`,"conn.forwardNoneSaved":`No port forwarding is saved for this connection.`,"conn.forwardLocal":`Local tunnel`,"conn.forwardDynamic":`SOCKS proxy`,"conn.forwardType":`Type`,"conn.forwardListenPort":`Local port`,"conn.forwardDestination":`Destination`,"conn.forwardDestinationHint":`Enter the host name or IP address and port as seen from the SSH server.`,"conn.forwardDynamicHint":`The application using this SOCKS proxy chooses the destination for each connection.`,"conn.forwardAdd":`Add forwarding`,"conn.forwardPendingSave":`This forwarding will be written when you save the changes.`,"conn.forwardInvalidPort":`Enter a local port from 1 to 65535.`,"conn.forwardInvalidDestination":`Enter the destination as host:port.`,"conn.advancedNoFields":`This connection has no settings in this view.`,"conn.advancedRawBlocksFields":`Raw has unsaved changes. Discard or save it before editing directives.`,"conn.advancedFieldsBlockRaw":`Directives have unsaved changes. Discard or save them before editing Raw.`,"conn.connect":`Connect`,"conn.opening":`Opening…`,"conn.duplicate":`Duplicate connection`,"conn.manage":`More connection actions`,"conn.manageLabel":`Manage connection`,"conn.manageIndependent":`Each action is saved independently of Basic and Advanced settings.`,"conn.manageDraftBlocked":`Save or discard the editor draft before changing connection identity or storage.`,"conn.discardPrompt":`Discard the unsaved connection changes and leave this connection?`,"conn.keepEditing":`Keep editing`,"conn.reloadConnection":`Reload saved connection`,"conn.moveToFile":`Storage file`,"conn.moveToFilePlaceholder":`Choose a storage file…`,"conn.move":`Change storage file`,"conn.storageFileNote":`Primary group controls where sshc organises the connection. Storage file is an advanced override that selects the exact SSH configuration file.`,"conn.confirmDelete":`Delete it`,"conn.deleteHeading":`Delete {alias}?`,"conn.deleteBody":`This removes the Host block from your configuration. You can restore it from History.`,"conn.deleteCancel":`Keep it`,"conn.delete":`Delete connection`,"host.tabJump":`Jump Host`,"host.tabRaw":`Raw`,"host.unbalancedQuote":`A value has an unbalanced quote. OpenSSH has no escape inside quotes, so this cannot be saved.`,"host.needsKeyword":`A directive needs a keyword.`,"host.dangerousField":`{keyword} can run a command when OpenSSH evaluates this host. It is stored as written and never executed here.`,"host.keep":`Keep`,"host.remove":`Remove`,"host.newDirective":`New directive`,"host.newValue":`New value`,"host.addDirective":`Add directive`,"host.saveChanges":`Save changes`,"host.blockText":`Block text. Comments, blank lines and unknown directives are written back exactly as typed.`,"host.saveBlock":`Save block`,"host.noDestination":`This block matches by pattern and names no destination of its own, so there is nothing to diagnose. Open a connection with a concrete alias instead.`,"host.primaryGroup":`Primary group`,"host.groupNone":`None`,"host.groupNoneMeans":`Choosing none moves the connection back into ~/.ssh/config, at the end of the file.`,"host.moveToGroup":`Move to this group`,"host.comment":`Comment`,"host.commentNote":`Written into the configuration file above the Host line, so it is there for anyone reading the file without sshc.`,"host.commentFromNote":`This started as a note stored only by sshc. Saving it writes it into the configuration file and retires the note.`,"host.saveComment":`Save comment`,"host.os":`Operating system icon`,"host.osAutomatic":`Auto-detect after connecting`,"host.osGeneric":`Generic server`,"host.osUnknown":`OS unknown`,"host.osHint":`Detected after connecting. Choose an icon to override detection.`,"host.colour":`Colour`,"host.clearColour":`Clear colour`,"host.displayOrder":`Display order — lower sorts earlier; 0 leaves this host where the file puts it`,"host.tags":`Tags, comma separated`,"host.renameAlias":`Rename alias`,"host.rename":`Rename`,"keys.heading":`Keys`,"keys.pageDescription":`Review private keys, public keys, certificates, and their references, then manage creation, updates, and deletion.`,"keys.search":`Search keys`,"keys.searchPlaceholder":`file, host or fingerprint`,"keys.metricFiles":`Classified SSH files`,"keys.metricPrivate":`Private keys`,"keys.metricAttention":`Needs attention`,"keys.noMatches":`No key matches this search.`,"keys.reading":`Reading the ssh directory…`,"keys.unreadable":`The ssh directory could not be read. Restart sshc and try again.`,"keys.createFailed":`The key could not be created. Check the name, the algorithm and the passphrase.`,"keys.passphraseFailed":`The passphrase could not be changed. Check the current passphrase and try again.`,"keys.agentFailed":`The key could not be added to ssh-agent. Check the passphrase and confirm that this process can connect to a running ssh-agent.`,"keys.publicKeyFailed":`The public key could not be read.`,"keys.trashFailed":`The key could not be moved to the trash.`,"keys.restoreFailed":`The entry could not be restored.`,"keys.restoreRefused":`The entry cannot be restored: {blockers}`,"keys.purgeFailed":`The entry could not be deleted permanently.`,"keys.tableCaption":`Files classified by content and permissions`,"keys.inventoryEmpty":`Nothing under ~/.ssh yet. Create a key below.`,"keys.colFile":`File`,"keys.colKind":`Kind`,"keys.kind.privateKey":`Private key`,"keys.kind.publicKey":`Public key`,"keys.kind.certificate":`Certificate`,"keys.kind.other":`Other file`,"keys.kind.unreadable":`Unreadable file`,"keys.colAlgorithm":`Algorithm`,"keys.colFingerprint":`Fingerprint`,"keys.colPermissions":`Permissions`,"keys.colUsedBy":`Used by`,"keys.colState":`State`,"keys.stateInAgent":`registered with ssh-agent`,"keys.stateUsedBy":`referenced by {count}`,"keys.usedByNothing":`No connection references this key`,"keys.inspectorLabel":`Key details`,"keys.colActions":`Actions`,"keys.showDetails":`Show details`,"keys.hideDetails":`Hide details`,"keys.actionsHeading":`Actions for {path}`,"keys.keyActions":`Key actions`,"keys.permissionRisk":`Permissions too open`,"keys.showPublicKey":`Show public key`,"keys.relatedPublicFiles":`Public key files ({count})`,"keys.showPrivateKey":`Show private key`,"keys.changePassphrase":`Change passphrase`,"keys.moreActions":`More actions`,"keys.manageStoredPassphrase":`Save passphrase`,"keys.storedPassphraseHeading":`Saved passphrase: {path}`,"keys.storedPassphraseNote":`Save this encrypted key's passphrase in the sshc vault, or assign an existing named passphrase. Values are encrypted with the master password and are not displayed here after saving.`,"keys.newStoredPassphraseName":`Passphrase name`,"keys.newStoredPassphraseValue":`Passphrase value`,"keys.storeAndUsePassphrase":`Save and use for this key`,"keys.storedPassphraseExists":`A passphrase with this name already exists. Select it above or choose a new name.`,"keys.unassignPassphrase":`Stop using it`,"keys.storePassphraseFailed":`The passphrase could not be saved and assigned to this key.`,"keys.unassignPassphraseFailed":`The stored passphrase could not be detached from this key.`,"keys.addToAgent":`Add to ssh-agent`,"keys.removeFromAgent":`Remove from ssh-agent`,"keys.agentRemoveFailed":`The key could not be removed from ssh-agent. It may already have been removed, or the required public key may be missing.`,"keys.trashConfirmHeading":`Move {path} to the trash`,"keys.trashExplain":`These files move together, because they are one key:`,"keys.trashReferences":`{count} Host block(s) still reference this key. After the move, their IdentityFile lines will reference a missing file. ssh reports the error and then tries other authentication methods.`,"keys.trashNoReferences":`No Host block references this key.`,"keys.trashIsRecoverable":`Nothing is deleted. The files move into the trash below, where they can be restored.`,"keys.trashConfirm":`Move it to the trash`,"keys.trashCancel":`Keep it`,"keys.moveToTrash":`Move to trash`,"keys.publicKeyHeading":`Public key: {path}`,"keys.publicKeyLabel":`Public key`,"keys.close":`Close`,"keys.unreadableHeading":`Files this scan could not classify`,"keys.unreadableNote":`These are inside ~/.ssh and are missing from the table above. Nothing was changed about them.`,"keys.unresolvedHeading":`Configuration entries pointing at a key that is not there`,"keys.agentHeading":`ssh-agent`,"keys.agentEmpty":`ssh-agent is reachable, but no keys are registered.`,"keys.agentIdentitiesCaption":`Keys registered with ssh-agent`,"keys.colComment":`Comment`,"keys.agentUnavailable":`This process cannot connect to ssh-agent, so keys cannot be registered. Both the ssh-add command and an SSH_AUTH_SOCK that identifies the agent are required.`,"keys.agentDelegationsNote":`These configuration entries use a key from ssh-agent instead of referencing a key file:`,"keys.registerHeading":`Add to ssh-agent: {path}`,"keys.registerNote":`The passphrase is passed to ssh-add through standard input, so it is not included in the command line or child-process environment. sshc does not store it or retain it after this operation.`,"keys.keyPassphrase":`Key passphrase`,"keys.lifetime":`Lifetime`,"keys.lifetimeForever":`Until ssh-agent exits`,"keys.lifetimeHour":`1 hour`,"keys.lifetimeFourHours":`4 hours`,"keys.lifetimeTwelveHours":`12 hours`,"keys.useStoredPassphrase":`Use a stored passphrase`,"keys.choosePassphraseName":`— choose a name —`,"keys.useThisPassphrase":`Use this passphrase`,"keys.usesStoredPassphrase":`This key uses the stored passphrase named {name}.`,"keys.usesDedicatedPassphrase":`A passphrase is saved only for this key.`,"keys.typedWins":`Leave this empty to use the saved passphrase. If you enter a value, that value is used instead.`,"keys.assignPassphraseFailed":`The selected passphrase could not be assigned to this key.`,"keys.registerSubmit":`Add key to ssh-agent`,"keys.cancel":`Cancel`,"keys.passphraseHeading":`Change passphrase: {path}`,"keys.passphraseNote":`The passphrases typed here are used only for this change and are not stored. Use “Save passphrase” in the key list when you want the sshc Vault to remember one.`,"keys.currentPassphrase":`Current passphrase`,"keys.newPassphrase":`New passphrase`,"keys.removePassphrase":`Remove the passphrase and leave the key unprotected on disk`,"keys.savePassphrase":`Change passphrase`,"keys.createHeading":`Create a key`,"keys.generatedHeading":`Key created`,"keys.generatedNext":`{path} is ready. Choose where to use it next.`,"keys.assignGenerated":`Assign to a connection`,"keys.installGenerated":`Install on a server`,"keys.algorithm":`Algorithm`,"keys.fileName":`File name`,"keys.comment":`Comment`,"keys.passphrase":`Passphrase`,"keys.createUnencrypted":`Create without a passphrase, and accept that anyone who reads the file can use the key`,"keys.createSubmit":`Create key`,"keys.showTerminalCommand":`Show Terminal command`,"keys.hardwareNote":`Creating a hardware-backed key requires interaction with a security key, so sshc does not support it. Run this command in a terminal:`,"keys.trashHeading":`Trash`,"keys.trashSummary":`Trash ({count})`,"keys.trashNote":`Keys moved to Trash remain here until you delete them permanently. They are not deleted automatically.`,"keys.trashCaption":`Soft-deleted keys`,"keys.trashEmpty":`Trash is empty.`,"keys.colFiles":`Files`,"keys.colAge":`Age`,"keys.colStatus":`Status`,"keys.ageStale":`{days} days · older than {retention} days`,"keys.age":`{days} days`,"keys.restorable":`Restorable`,"keys.restore":`Restore`,"keys.purgeWarning":`This cannot be undone. There is no backup of a permanently deleted key.`,"keys.confirmPurge":`Confirm permanent deletion`,"keys.purge":`Delete permanently`,"keys.noteFingerprintUnavailable":`Fingerprint unavailable`,"keys.noteSymbolicLink":`Symbolic link, not followed`,"keys.noteEmptyFile":`Empty file`,"keys.noteNotRegularFile":`Not a regular file`,"keys.noteCommentNotPreserved":`Comment not preserved`,"keys.certKeyId":`key id {keyId}`,"keys.certFor":`for {principals}`,"keys.certAnyPrincipal":`for any principal`,"keys.certNeverExpires":`never expires`,"keys.certExpired":`expired {when}`,"keys.certValidUntil":`valid until {when}`,"keys.certSigns":`signs {keyType} {fingerprint}`,"keys.reference":`{directive} {value} — {path}:{line}`,"keys.referenceWithReason":`{directive} {value} — {path}:{line} ({reason})`,"keys.unreadableEntry":`{path} — {reason}`,"keys.colChoose":`Choose`,"keys.chooseKey":`Choose {path}`,"keys.listFilter":`What to list`,"keys.listFilterKeys":`Keys only`,"keys.listFilterAll":`Every file in ~/.ssh`,"keys.dragKey":`Drag {path}`,"keys.chosenCount":`{count} selected`,"keys.moveTargetLabel":`Move into`,"keys.moveChosen":`Move`,"keys.clearChosen":`Clear the selection`,"keys.moveMoved":`Moved {count}.`,"keys.moveBlocked":`{path} cannot be moved: {reason}`,"keys.moveFailed":`{path} could not be moved.`,"keys.folders":`Folders`,"keys.foldersLabel":`Key folders`,"keys.folderRow":`{name}, {count}`,"keys.folderAll":`All keys`,"keys.folderUngrouped":`No group`,"keys.relocate":`Rename or move`,"keys.relocateHeading":`Rename or move: {path}`,"keys.relocateNote":`Changing the name or group moves the key files. Every IdentityFile and CertificateFile that references this key is updated in the same transaction, so no reference to the old path remains.`,"keys.relocateNewName":`Name`,"keys.relocateGroup":`Group`,"keys.relocateSubmit":`Rename or move the key`,"keys.relocateFailed":`The key could not be moved.`,"keys.relocateDone":`Now at {path}.`,"keys.relocateMoved":`Files moved`,"keys.relocateRewritten":`Configuration entries rewritten`,"keys.relocateSkipped":`Not moved because the file name is not the key name followed by a suffix: {paths}`,"keys.relocateRefused":`Nothing was moved and nothing was written:`,"keys.relocateFilePair":`{from} → {to}`,"keys.relocateReference":`{directive} {from} → {to} — {path}:{line}`,"keys.groupNone":`No group (~/.ssh itself)`,"keys.createGroup":`Group`,"keys.blockerTargetOccupied":`{detail} already exists`,"keys.blockerUnresolved":`{detail} is a path that sshc cannot resolve and may reference this key`,"keys.blockerReferenceExternal":`{detail} is outside ~/.ssh and cannot be rewritten`,"keys.blockerGroupNotDeclared":`no Include line declares the group {detail}`,"keys.blockerDestinationIsConfig":`an Include would read {detail} as configuration`,"keys.blockerStateDirectory":`{detail} is inside the engine's own state directory`,"keys.blockerOther":`{detail}`},ja:{"shortcuts.heading":`Keyboard shortcuts`,"shortcuts.description":`ショートカットのプリセットを共有し、このブラウザーで使うものを選びます。`,"shortcuts.confirmDelete":`同期中のすべての端末からこのプリセットを削除しますか?`,"shortcuts.deleteEverywhere":`すべての端末から削除`,"shortcuts.cancelDelete":`キャンセル`,"shortcuts.preset":`このブラウザーのプリセット`,"shortcuts.defaultPreset":`標準`,"shortcuts.presetName":`プリセット名`,"shortcuts.duplicate":`複製して保存`,"shortcuts.rename":`名前を変更`,"shortcuts.delete":`プリセットを削除`,"shortcuts.reloadRequired":`プリセットの読み込み、または保存ができませんでした。再読み込みして最新の内容を確認してください。`,"shortcuts.reload":`再読み込み`,"shortcuts.loading":`プリセットを読み込み中…`,"shortcuts.hint":`割り当て欄を押し、Ctrl・Alt・Meta(Command)を含む組み合わせ、またはファンクションキーを入力してください。Escで中止、Tabで次の項目へ移動します。プリセットの内容は端末間で同期され、使用するプリセットはブラウザーごとに保持されます。標準の編集時は個人用プリセットを作成します。選択中のプリセットが削除された場合は標準に戻ります。ブラウザーやOSのショートカットが優先される場合があります。コピー・貼り付け・ターミナル内検索はターミナル内で有効です。`,"shortcuts.palette":`コマンド検索`,"shortcuts.terminalSearch":`ターミナル内検索`,"shortcuts.copy":`選択範囲をコピー`,"shortcuts.paste":`貼り付け`,"shortcuts.nextSession":`次のコネクション`,"shortcuts.previousSession":`前のコネクション`,"shortcuts.home":`Homeを開く`,"shortcuts.sftp":`SFTPを開く`,"shortcuts.assign":`キーを割り当て: {action}`,"shortcuts.clearAction":`割り当てを解除: {action}`,"shortcuts.clear":`解除`,"shortcuts.recording":`キーを入力…(Escで中止)`,"shortcuts.unassigned":`未設定`,"shortcuts.reset":`初期設定に戻す`,"shortcuts.saved":`キー設定を保存しました。`,"shortcuts.saveFailed":`保存できませんでした。プリセットを再読み込みし、接続状態とブラウザーの保存設定を確認してください。`,"shortcuts.conflict":`{action}に割り当て済みです。先にその割り当てを解除してください。`,"shell.title":`sshc`,"shell.starting":`ローカルセッションを開始しています…`,"shell.vaultChecking":`保護された内容を再表示する前に、Vault のロック状態を確認しています…`,"shell.vaultCheckRetrying":`Vault の状態を確認できませんでした。保護された内容を隠したまま再試行します。`,"shell.active":`ローカルセッション稼働中 · {version}`,"shell.bootstrapFailed":`ローカルセッションを開始できませんでした。ターミナルで sshc を一度実行し、このブラウザーを登録し直してください。`,"shell.bootstrapRetry":`もう一度試す`,"shell.sessionEndedHeading":`セッションが終了しました`,"shell.sessionEnded":`再読み込みするとローカルセッションを自動で復旧します。このブラウザーの登録が無効な場合だけ、ターミナルで sshc を一度実行してください。`,"shell.sessionReload":`セッションを再読み込み`,"shell.pageNotFound":`ページが見つかりません`,"shell.pageNotFoundDescription":`この URL に対応する sshc の画面はありません。`,"shell.goHome":`ホームへ移動`,"shell.primaryNavigation":`メインナビゲーション`,"shell.navigationToggle":`ナビゲーション`,"shell.navigationResize":`ナビゲーションの幅を変更`,"shell.sessions":`Sessions`,"shell.navStart":`Main`,"shell.navConnections":`Configuration`,"shell.navKeysHosts":`Security`,"shell.navVault":`Vault`,"shell.navMaintenance":`Tools`,"menu.open":`{section}を開く`,"menu.displaySettings":`Preferences`,"menu.theme":`Theme`,"menu.language":`Language`,"shell.inspectorShowNamed":`{label}を表示`,"shell.inspectorHideNamed":`{label}を隠す`,"shell.inspectorAttention":`確認が必要な項目があります`,"palette.open":`Search`,"palette.heading":`セッション・ホスト・ファイル・スニペット・設定を検索`,"palette.placeholder":`セッション、ホスト、ファイル、スニペット、設定を検索`,"palette.results":`検索結果`,"palette.loading":`検索項目を読み込んでいます…`,"palette.empty":`一致する項目がありません`,"palette.hint":`↑↓ 選択 · Enter 開く · Esc 閉じる`,"palette.connectHost":`{alias} へ接続`,"palette.openHostSettings":`{alias} の接続設定を開く`,"palette.openSection":`セクションを開く`,"palette.kind.session":`セッション`,"palette.kind.host":`ホスト`,"palette.kind.file":`ファイル`,"palette.kind.snippet":`スニペット`,"palette.kind.setting":`設定`,"palette.kind.command":`操作`,"palette.newConnection":`接続を作成する`,"palette.newConnectionDetail":`新規接続のフォームを開く`,"palette.openRemoteFiles":`リモートファイルを開く`,"palette.openRemoteFilesDetail":`SFTPでホストのファイルを見る`,"palette.openLocalShell":`ローカルシェルを開く`,"palette.openLocalShellDetail":`このマシンでターミナルを起動する`,"palette.lockVault":`vaultをロックする`,"palette.lockVaultDetail":`マスターパスワードの入力をもう一度求める`,"table.sortAscending":`、昇順に並べ替え`,"table.sortDescending":`、降順に並べ替え`,"section.files":`SFTP`,"section.snippets":`Snippets`,"sftp.heading":`リモートファイル`,"sftp.tabs":`リモートファイルのタブ`,"sftp.primaryTabs":`左ペインのタブ`,"sftp.secondaryTabs":`右ペインのタブ`,"sftp.newTab":`新しいタブ`,"sftp.closeTab":`{name} のタブを閉じる`,"sftp.resizePanes":`ペインの幅を変更`,"sftp.dropTabLeft":`左に新しいペインで開く`,"sftp.dropTabRight":`右に新しいペインで開く`,"sftp.dropTabHere":`このペインへ移動`,"sftp.firstPane":`1つ目のリモートペイン`,"sftp.secondPane":`2つ目のリモートペイン`,"sftp.local.heading":`ローカルファイル`,"sftp.local.connection":`ローカル`,"sftp.local.engine":`sshcエンジン側`,"sftp.local.path":`ローカルフォルダのパス`,"sftp.local.editPath":`ローカルパスを編集`,"sftp.local.pathInput":`エンジン側のファイルパス`,"sftp.local.upload":`選択項目をアップロード`,"sftp.local.loading":`ローカルのディレクトリを読み込み中…`,"sftp.local.dropZone":`ローカルのファイル一覧とドロップ先`,"sftp.local.connectRemote":`アップロードするにはリモート側を接続してください。`,"sftp.host":`ホスト`,"sftp.noHosts":`保存済みホストなし`,"sftp.chooseHost":`ホストを選択`,"sftp.chooseHostHint":`ローカルか保存済みのSSHホストを選択してください。SSHホストは接続が必要です。`,"sftp.connect":`接続`,"sftp.connecting":`{alias} に接続しています…`,"sftp.readyToConnect":`{alias} は未接続です`,"sftp.connectHint":`SFTPは画面や保存済みタブを開いただけでは接続しません。`,"sftp.loading":`リモートディレクトリを読み込んでいます…`,"sftp.retry":`再試行`,"sftp.emptyDirectory":`このディレクトリは空です。`,"sftp.noFilterMatches":`絞り込みに一致する項目はありません。`,"sftp.clearFilterHint":`絞り込みを消すと、すべての項目が表示されます。`,"sftp.undo":`取り消す`,"sftp.dismissUndo":`取り消し通知を閉じる`,"sftp.renamedTo":`{name} へ名前を変更しました。`,"sftp.permissionsChanged":`権限を {mode} に変更しました。`,"sftp.leaveHeading":`保存せずに移動しますか?`,"sftp.leaveBody":`{path} には、サーバーへ書き込んでいない変更があります。`,"sftp.leaveDiscard":`破棄して移動`,"sftp.leaveStay":`編集を続ける`,"sftp.chooseHostHeading":`接続先を選択`,"sftp.closeHostPicker":`ホスト選択を閉じる`,"sftp.searchHosts":`接続先を検索`,"sftp.searchHostsPlaceholder":`名前、グループ、ホスト、ユーザーを検索`,"sftp.hostViews":`ホスト一覧の表示`,"sftp.recentHosts":`最近接続した順`,"sftp.hostGroups":`グループ`,"sftp.ungroupedHosts":`グループなし`,"sftp.noHostMatches":`検索に一致するホストはありません。`,"sftp.hostNoDetails":`SSHホスト`,"sftp.hostCurrent":`選択中`,"sftp.lastConnected":`最終接続 {at}`,"sftp.connectionFailed":`接続できませんでした。`,"sftp.path":`リモートパス`,"sftp.editPath":`パスを編集`,"sftp.go":`移動`,"sftp.navigation":`ディレクトリ移動`,"sftp.back":`戻る`,"sftp.forward":`進む`,"sftp.homeDirectory":`ホームディレクトリ`,"sftp.rootDirectory":`ルートディレクトリ`,"sftp.filter":`項目を絞り込み`,"sftp.filterPlaceholder":`絞り込み`,"sftp.searchBelow":`このディレクトリ配下を検索する`,"sftp.searchResults":`{path} 配下で「{query}」に一致: {count}件`,"sftp.searchResultsTruncated":`{path} 配下で「{query}」に一致した先頭{count}件。検索は途中で終了しました。`,"sftp.searchNoMatches":`このディレクトリ配下に「{query}」を含む名前はありません。`,"sftp.searchEnd":`検索を終える`,"sftp.revealInFolder":`この項目があるフォルダーへ移動`,"sftp.up":`上へ`,"sftp.parentDirectory":`親ディレクトリ`,"sftp.createActions":`作成・アップロード`,"sftp.noSelectionActions":`項目を選択すると操作できます`,"sftp.selectedActions":`{name}の操作`,"sftp.selectedActionsCount":`選択した{count}件の操作`,"sftp.selected":`選択中:{name}`,"sftp.selectedCount":`{count}件を選択中`,"sftp.selectedCountSize":`{count}件を選択中 · {size}`,"sftp.selectAll":`すべての項目を選択`,"sftp.selectEntry":`{name}を選択`,"sftp.clearSelection":`選択を解除`,"sftp.invertSelection":`選択を反転`,"sftp.copyName":`名前をコピー`,"sftp.copyNames":`名前をまとめてコピー`,"sftp.copyPath":`フルパスをコピー`,"sftp.copyPaths":`フルパスをまとめてコピー`,"sftp.openFolder":`フォルダを開く`,"sftp.editFile":`ファイルを編集`,"sftp.newFolder":`新規フォルダ`,"sftp.newFile":`空ファイルを作成`,"sftp.duplicate":`複製`,"sftp.moveTo":`フォルダへ移動`,"sftp.move":`移動`,"sftp.upload":`アップロード`,"sftp.uploadFolder":`フォルダをアップロード`,"sftp.dropZone":`現在のリモートディレクトリへファイル・フォルダをアップロード`,"sftp.uploads":`ファイルのアップロード`,"sftp.upload.pending":`準備中`,"sftp.upload.queued":`待機中`,"sftp.upload.uploading":`アップロード中…`,"sftp.upload.paused":`一時停止`,"sftp.upload.reattach":`同じファイルを選択して再開`,"sftp.upload.needs_overwrite":`上書き確認待ち`,"sftp.upload.done":`完了`,"sftp.upload.failed":`失敗`,"sftp.upload.skipped":`スキップ`,"sftp.upload.cancelled":`キャンセル済み`,"sftp.cancelTransfer":`転送をキャンセル`,"sftp.activeTransfers":`転送中 {count}`,"sftp.transfer.pause":`一時停止`,"sftp.transfer.resume":`再開`,"sftp.transfer.clear":`完了分を消去`,"sftp.manager.heading":`転送マネージャー`,"sftp.manager.summaryRunning":`{count}件転送中 · {progress}% · {speed}/s`,"sftp.manager.summaryIdle":`転送 {count}件`,"sftp.manager.actions":`転送キューの操作`,"sftp.manager.concurrency":`同時実行`,"sftp.manager.autoClear":`完了項目の自動消去`,"sftp.manager.autoClearOff":`残す`,"sftp.manager.largeFileThreshold":`分割開始`,"sftp.manager.largeFileParallelism":`分割並列数`,"sftp.manager.largeFileChunk":`チャンク`,"sftp.manager.stopProcessing":`新しい転送の開始を止める`,"sftp.manager.startProcessing":`転送キューの処理を再開する`,"sftp.manager.status.held":`保留中`,"sftp.manager.resize":`ドラッグして転送キューの高さを変える`,"sftp.manager.moveUp":`{name} を待機列の前へ移す`,"sftp.manager.moveDown":`{name} を待機列の後ろへ移す`,"sftp.manager.collapse":`転送マネージャーを折りたたむ`,"sftp.manager.expand":`転送マネージャーを展開`,"sftp.manager.pauseAll":`すべて一時停止`,"sftp.manager.resumeAll":`すべて再開`,"sftp.manager.cancelAll":`すべてキャンセル`,"sftp.manager.clearFailed":`失敗項目を一覧から削除`,"sftp.manager.remove":`一覧から削除`,"sftp.manager.controlChanged":`転送状態が変わりました。最新の状態に更新しました。`,"sftp.manager.cleanupFailed":`リモートの一時ファイルを削除できませんでした。接続を確認して、もう一度お試しください。`,"sftp.manager.controlFailed":`転送を操作できませんでした。接続を確認して、もう一度お試しください。`,"sftp.manager.dismissError":`エラーを閉じる`,"sftp.manager.items":`転送ファイル`,"sftp.manager.file":`ファイル`,"sftp.manager.folder":`フォルダ`,"sftp.manager.upload":`アップロード`,"sftp.manager.download":`ダウンロード`,"sftp.manager.remaining":`残り{duration}`,"sftp.manager.retry":`再実行`,"sftp.manager.retryFailed":`失敗した {count} 件を再実行`,"sftp.manager.status.queued":`待機中`,"sftp.manager.status.running":`転送中…`,"sftp.manager.status.paused":`一時停止`,"sftp.manager.status.reattach":`同じファイルを選択`,"sftp.manager.status.needs_overwrite":`上書き確認待ち`,"sftp.manager.status.reconcile":`転送先の確認が必要`,"sftp.manager.status.completed":`完了`,"sftp.manager.status.failed":`失敗`,"sftp.manager.status.cancelled":`キャンセル済み`,"sftp.notice.heading":`転送通知`,"sftp.notice.completed":`{direction}完了:{name}`,"sftp.notice.failed":`{direction}失敗:{name}({problem})`,"sftp.notice.dismiss":`通知を閉じる`,"sftp.download":`ダウンロード`,"sftp.downloads":`ダウンロード`,"sftp.download.downloading":`ダウンロード中…`,"sftp.download.done":`完了`,"sftp.download.failed":`失敗`,"sftp.download.cancelled":`キャンセル済み`,"sftp.name":`名前`,"sftp.size":`サイズ`,"sftp.linkTarget":`リンク先`,"sftp.brokenLink":`{target}(見つかりません)`,"sftp.calculating":`計算中…`,"sftp.partialSizePrefix":`少なくとも `,"sftp.sizeUnavailable":`取得できません`,"sftp.containedFiles":`内包ファイル`,"sftp.containedDirectories":`内包フォルダー`,"sftp.type":`種別`,"sftp.type.file":`ファイル`,"sftp.type.directory":`フォルダ`,"sftp.type.symlink":`シンボリックリンク`,"sftp.type.other":`その他`,"sftp.modified":`更新日時`,"sftp.permissions":`権限`,"sftp.revision":`リビジョン`,"sftp.details":`詳細`,"sftp.detailsFor":`{name} の詳細`,"sftp.detailsForCount":`選択した{count}件の詳細`,"sftp.preview":`プレビュー`,"sftp.properties":`プロパティ`,"sftp.previewLoading":`プレビューを読み込んでいます…`,"sftp.previewUnavailable":`このファイルはここではプレビューできません。`,"sftp.previewTruncated":`先頭部分だけを表示しています。`,"sftp.selectedItems":`選択中の項目`,"sftp.totalSize":`合計サイズ`,"sftp.actions":`操作`,"sftp.entries":`ファイル一覧`,"sftp.rename":`名前変更`,"sftp.delete":`削除`,"sftp.refreshDirectory":`ディレクトリを更新`,"sftp.deleteContentsWarning":`フォルダ内の項目もすべて削除されます。`,"sftp.manager.delete":`削除中`,"sftp.chmod":`権限変更`,"sftp.chmodRecursive":`配下も含めて権限変更`,"sftp.chmodPrompt":`権限(8 進数、例:640)`,"sftp.chmodInvalid":`000〜777の3桁の8進数で入力してください。`,"sftp.overwriteHeading":`このリモートファイルを上書きしますか?`,"sftp.overwrite":`上書き`,"sftp.skip":`スキップ`,"sftp.cancel":`キャンセル`,"sftp.remoteDropTitle":`リモート項目を転送`,"sftp.remoteDropDescription":`{count}件を{alias}へ転送します。データは2つのSFTP接続間で直接転送されます。`,"sftp.remoteDropInvalid":`リモート項目のドラッグ情報を読み取れませんでした。`,"sftp.copyHere":`ここへコピー`,"sftp.moveHere":`ここへ移動`,"sftp.openTerminalHere":`ここでTerminalを開く`,"sftp.compare.action":`比較`,"sftp.compare.heading":`ディレクトリを比較`,"sftp.compare.description":`選択した差分を左右どちらかへコピーします。コピー先だけにある項目は削除しません。`,"sftp.compare.loading":`両方のディレクトリを比較しています…`,"sftp.compare.noChanges":`2つのディレクトリのメタデータに差分はありません。`,"sftp.compare.status":`差分`,"sftp.compare.same":`同じ`,"sftp.compare.different":`変更あり`,"sftp.compare.left_only":`左のみ`,"sftp.compare.right_only":`右のみ`,"sftp.compare.type_mismatch":`種別が異なる`,"sftp.compare.leftToRight":`左から右へコピー`,"sftp.compare.rightToLeft":`右から左へコピー`,"sftp.save":`保存`,"sftp.close":`閉じる`,"sftp.editorEmpty":`UTF-8のテキストファイルを選ぶと、ここで編集できます。`,"sftp.editorLoading":`エディタを読み込んでいます…`,"sftp.unsaved":`未保存`,"sftp.unsavedBlocked":`移動する前に、編集中のファイルを保存または閉じてください。`,"sftp.conflict":`リモートファイルが更新されています。再読込してから保存してください。`,"sftp.binaryHint":`UTF-8テキストではありません。ダウンロードしてください。`,"sftp.tooLargeHint":`2 MiBを超えるファイルはダウンロードできますが、編集はできません。`,"sftp.mkdirPrompt":`フォルダ名`,"sftp.newFilePrompt":`ファイル名`,"sftp.moveToPrompt":`移動先フォルダ`,"sftp.pathAbsolute":`/ で始まる絶対パスを入力してください。`,"sftp.renamePrompt":`新しい名前`,"sftp.nameRequired":`名前を入力してください。`,"sftp.nameInvalid":`名前にスラッシュは使用できません。`,"sftp.renameUnchanged":`現在とは異なる名前を入力してください。`,"sftp.deleteHeading":`このリモート項目を削除しますか?`,"sftp.deleteHeadingCount":`選択した{count}件を削除しますか?`,"sftp.deleteFailedCount":`選択した項目のうち{count}件を削除できませんでした。`,"workspace.saved":`保存レイアウトを選択`,"workspace.new":`新しい保存レイアウト`,"workspace.save":`名前を付けて保存`,"workspace.reopen":`この配置を開く`,"workspace.delete":`削除`,"workspace.detachPane":`ワークスペースから外す`,"workspace.live":`現在のワークスペース`,"workspace.mobilePaneSwitcher":`ワークスペースのターミナル`,"workspace.oneLiveOnly":`現在のワークスペースを閉じてから、別のワークスペースを作成してください。`,"workspace.dock.left":`左に配置`,"workspace.dock.right":`右に配置`,"workspace.dock.top":`上に配置`,"workspace.dock.bottom":`下に配置`,"workspace.groupCount":`{count} sessions`,"workspace.rename":`名前変更`,"workspace.renameLabel":`{name} の新しい名前`,"workspace.rowMenu":`{name}のワークスペース操作`,"workspace.expandGroup":`{name}のターミナルを表示`,"workspace.collapseGroup":`{name}のターミナルを隠す`,"workspace.resizeSplit":`分割サイズを変更`,"workspace.focusMode":`{alias} をフォーカス表示`,"workspace.exitFocusMode":`フォーカス表示を終了`,"workspace.movePane":`{alias} のペインを移動します。移動先のペインを選んでください。`,"workspace.movePanePicked":`{alias} を選択中です。移動先のペインを選んでください。`,"workspace.reconnecting":`このペインを再接続してください。`,"workspace.maxPanes":`1 つのワークスペースに配置できるのは最大 {count} ペインです。`,"workspace.namePrompt":`保存レイアウト名`,"workspace.nameRequired":`保存レイアウト名を入力してください。`,"workspace.saveConfirm":`レイアウトを保存`,"workspace.cancel":`キャンセル`,"workspace.savedLayouts":`保存レイアウト`,"workspace.actions":`ワークスペース操作`,"workspace.savedDescription":`SSH 接続先、ローカルシェル、ペイン配置を名前付きで保存し、あとで新しいセッションとして開き直せます。1 レイアウトにつき最大 {count} ペインです。`,"workspace.broadcastCommand":`コマンドを一括送信…`,"workspace.broadcastHeading":`接続中のターミナルへ送信`,"workspace.broadcastDescription":`コマンドまたはスニペットを確認してから、接続中の各ターミナルの現在の入力先へ送信します。`,"workspace.commandClose":`コマンド送信を閉じる`,"workspace.commandSource":`コマンドの選択`,"workspace.adHocCommand":`直接入力`,"workspace.savedSnippet":`保存済みスニペット`,"workspace.command":`コマンド`,"workspace.chooseSnippet":`スニペットを選択`,"workspace.useDefault":`既定値を使用`,"workspace.targetMode":`接続中のターミナル`,"workspace.targetCount":`対象:{count} 件`,"workspace.paneNumber":`ペイン {number}`,"workspace.targetSkipped":`送信しません({state})`,"workspace.executionNotice":`各ターミナルの現在の入力先へコマンドとEnterを送信するため、作業ディレクトリ、環境、シェルの状態をそのまま使います。入力途中の文字や実行中のフォアグラウンドプロセスがある場合は、その続きまたは標準入力として扱われることがあります。`,"workspace.previewHeading":`ターミナルへ送る内容の確認`,"workspace.sendTargets":`{count} セッションへ送信`,"workspace.deliveryResults":`送信結果`,"workspace.deliveryNotice":`出力は各ターミナルに表示されます。送信済みはコマンドの完了を意味しません。`,"workspace.delivered":`送信済み`,"workspace.deliveryFailed":`送信できませんでした`,"snippets.heading":`Snippets`,"snippets.new":`新規`,"snippets.empty":`保存済みスニペットはありません。`,"snippets.name":`名前`,"snippets.description":`説明`,"snippets.command":`コマンド`,"snippets.variableHint":`{{name}}で変数を指定します。実行前に展開結果を確認できます。`,"snippets.variableType":`変数の型`,"snippets.variableType.string":`文字列`,"snippets.variableType.integer":`整数`,"snippets.variableType.boolean":`真偽値`,"snippets.variableType.secret":`シークレット`,"snippets.variableType.unknown":`不明な型`,"snippets.value":`値`,"snippets.save":`保存`,"snippets.delete":`削除`,"snippets.targets":`対象ホスト`,"snippets.preview":`実行内容を確認`,"snippets.confirm":`実際のコマンドを確認`,"snippets.run":`このホストで実行`,"snippets.results":`実行結果`,"snippets.status.running":`実行中`,"snippets.status.completed":`完了`,"snippets.status.cancelled":`キャンセル済み`,"snippets.status.queued":`待機中`,"snippets.status.succeeded":`成功`,"snippets.status.failed":`失敗`,"snippets.status.unknown":`状態を確認できません`,"snippets.cancel":`中止`,"snippets.startup":`接続時の自動実行`,"snippets.startupHint":`選択したホストのシェル準備後に実行します。初回接続と自動再接続のたびに送るため、シークレット変数の値も暗号化した設定に保存され、リモートのシェル履歴や画面に残ることがあります。`,"snippets.setStartup":`接続時に自動実行`,"snippets.clearStartup":`解除`,"host.duplicateKeyword":`このブロックの前の行が同じキーワードを使っています。OpenSSH は最初の 1 つを採用します。`,"terminal.consoleList":`開いているセッション`,"terminal.noSessions":`開いているセッションはありません。`,"terminal.openShell":`Local shell`,"terminal.newSession":`新しいセッション`,"terminal.rowDetail":`{status} · {destination}`,"terminal.running":`接続中`,"terminal.connecting":`接続を開始中`,"terminal.connected":`接続済み`,"terminal.longCommandCompleted":`{subject} のコマンドが {seconds} 秒で完了しました。`,"terminal.unreadNotification":`未読の通知`,"terminal.notificationFallback":`このターミナルのプログラムから通知がありました。`,"terminal.unreadWorkspace":`このワークスペースに未読のターミナル通知があります`,"terminal.browserNotificationsHeading":`Notifications`,"terminal.browserNotificationsDefault":`このタブがバックグラウンドにあるとき、ターミナル内のプログラムからの通知(コーディングエージェントの入力待ちなど)やファイル転送の完了を sshc から通知できます。`,"terminal.browserNotificationsGranted":`ブラウザ通知は許可されています。このタブがバックグラウンドにあるときだけ通知します。`,"terminal.browserNotificationsDenied":`sshc の通知がブロックされています。ターミナルとファイル転送の通知を使うには、ブラウザのサイト設定で通知を許可してください。`,"terminal.browserNotificationsUnsupported":`このブラウザはWeb通知に対応していません。`,"terminal.browserNotificationsEnable":`通知を有効にする`,"terminal.browserNotificationsTest":`テスト通知を送る`,"terminal.browserNotificationsEnabled":`通知は有効です`,"terminal.browserNotificationsReady":`ターミナルとファイル転送の通知を利用できます。`,"terminal.browserNotificationsRequestFailed":`通知の許可をリクエストできませんでした。`,"terminal.browserNotificationsDeliveryFailed":`通知は許可されていますが、ブラウザで表示できませんでした。`,"terminal.notificationSound":`通知音`,"terminal.notificationSoundHint":`このタブがバックグラウンドにあるとき、ターミナル内のプログラムが通知(OSC 9/99/777)を送ると鳴ります。このブラウザにだけ保存されます。`,"terminal.notificationPreviewSound":`通知音を再生`,"terminal.notificationSound.none":`音なし`,"terminal.notificationSound.gentle":`やさしい音`,"terminal.notificationSound.bell":`ベル`,"terminal.notificationSound.pulse":`パルス`,"terminal.notificationPreview":`再生`,"terminal.notificationVolume":`通知音量`,"terminal.notificationVolumeHint":`{volume}%`,"terminal.quickCommands":`クイックコマンド`,"terminal.quickCommandsClose":`クイックコマンドを閉じる`,"terminal.quickCommandInsert":`ペインに挿入`,"terminal.quickCommandRun":`実行`,"terminal.quickCommandCopy":`コピー`,"terminal.quickCommandSaveSelection":`選択範囲をスニペットとして保存`,"terminal.quickCommandName":`スニペット名`,"terminal.quickCommandSave":`スニペットを保存`,"terminal.quickCommandSaved":`スニペットを保存しました。`,"terminal.quickCommandContextWarning":`挿入と実行は、ペインの現在の入力先へ文字を送ります。入力途中の文字列や、パスワード/パスフレーズなどを求めるフォアグラウンドの入力待ちへ続けて送られる場合があります。`,"terminal.quickCommandChanged":`スニペットまたはペインが変更されました。更新後のプレビューを確認してから続けてください。`,"terminal.quickCommandInsertUnsafe":`改行または制御文字を含むコマンドは、安全に挿入できません。実行またはコピーを使用してください。`,"terminal.linkActions":`ターミナルリンクの操作`,"terminal.linkOpenBrowser":`ブラウザで開く`,"terminal.linkBrowseSFTP":`SFTPで表示`,"terminal.linkEditSFTP":`SFTPで編集`,"terminal.linkDownloadSFTP":`SFTPでダウンロード`,"terminal.linkCopy":`リンクをコピー`,"sftp.linkTargetInvalid":`このターミナルリンクは利用できなくなりました。`,"sftp.linkTargetNotFound":`リモートパスが見つかりません。`,"sftp.linkTargetNotFile":`リモートパスはファイルではありません。`,"terminal.progressDialing":`{target} へ接続中 · {position}`,"terminal.progressHostKey":`{target} のホスト鍵を確認中 · {position}`,"terminal.progressAuthenticating":`{target} で認証中 · {position}`,"terminal.progressAuthenticated":`{target} の認証完了 · {position}`,"terminal.progressOpeningSession":`セッションを開始中 · {position}`,"terminal.reconnectingAttempt":`再接続中({attempt}/{limit})`,"terminal.exitedWith":`終了 {code}`,"terminal.localhost":`localhost`,"terminal.emptyHeading":`開いているセッションがありません`,"terminal.emptyHint":`左の一覧から開くか、ホストの「接続」を押してください。`,"terminal.forwardLocal":`{listen} → {to} を転送中`,"terminal.forwardDynamic":`{listen} で SOCKS5 プロキシ`,"terminal.forwardAgent":`ssh-agent をリモートへ転送中`,"terminal.rowMenu":`{title} の操作`,"terminal.rename":`名前を変更`,"terminal.unpinTitle":`自動の名前に戻す`,"terminal.renameLabel":`{title} の新しい名前`,"terminal.renameFailed":`セッション名を変更できませんでした。`,"terminal.duplicate":`この接続を複製`,"terminal.moveUp":`上へ移動`,"terminal.moveDown":`下へ移動`,"terminal.closeSession":`{title} を閉じる`,"terminal.closeHeading":`{title} を閉じますか?`,"terminal.closeBody":`接続を終了します。実行中のプロセスと表示中の出力は失われます。`,"terminal.closeForwards":`このセッションのポート転送 {count} 件も終了します。`,"terminal.closeConfirm":`閉じる`,"terminal.closeCancel":`開いたままにする`,"desktop.closeAllHeading2":`開いているセッション {count} 件を閉じますか?`,"desktop.closeAllBody":`すべての接続を終了します。実行中のプロセスと表示中の出力は失われます。`,"desktop.closeAllConfirm":`すべて閉じる`,"desktop.closeAllCancel":`開いたままにする`,"terminal.limitReached":`同時に開けるセッション数の上限({max})に達しました。どれかを閉じてください。`,"terminal.limitRefused":`これ以上セッションを開けません。どれかを閉じてください。`,"terminal.unresolvable":`この接続の設定を解決できませんでした。理由は「Analysis」で確認できます。`,"terminal.jumpDepthExceeded":`ProxyJump の階層が上限を超えています。`,"terminal.hostKeyUnknown":`ホスト鍵をまだ信頼していません。内容を確認してから対話接続してください。`,"terminal.hostKeyChanged":`ホスト鍵が変わりました。Known Hostsを確認してから接続し直してください。`,"terminal.hostKeyRevoked":`ホスト鍵は失効済みとして登録されているため接続できません。`,"terminal.identityUnavailable":`利用できる秘密鍵または ssh-agent の鍵がありません。`,"terminal.authenticationUnavailable":`この接続で利用できる認証方式がありません。`,"terminal.authenticationCancelled":`認証を中止しました。`,"terminal.keyPassphraseRequired":`秘密鍵のパスフレーズが必要です。Vaultを開くか、この鍵に正しいパスフレーズを保存してください。`,"terminal.reconnectFailed":`再接続に失敗しました。設定された上限まで再試行します。`,"terminal.reconnectExhausted":`再接続の上限に達しました。ネットワーク復旧後に新しい接続を開いてください。`,"terminal.manualReconnect":`再接続`,"terminal.stopReconnect":`再接続を止める`,"terminal.reconnectStopped":`自動再接続を停止しました。必要なときに再接続してください。`,"terminal.notReconnecting":`このセッションは再接続待ちではありません。`,"terminal.manualReconnecting":`接続中…`,"terminal.manualReconnectFailed":`SSH セッションへ再接続できませんでした。接続設定とネットワークを確認して、もう一度試してください。`,"terminal.openFailed":`ターミナルを開けませんでした。`,"terminal.keyBar":`画面上のキー`,"terminal.extraKeys":`追加キー`,"shell.mobileNavigation":`クイックナビゲーション`,"sftp.mobile.actions":`フォルダ操作`,"sftp.mobile.search":`ファイルを検索`,"sftp.manager.settings":`転送設定`,"sftp.manager.close":`転送マネージャーを閉じる`,"terminal.closeFailed":`セッションを閉じられませんでした。`,"terminal.linkConnecting":`接続しています…`,"terminal.linkRetrying":`接続しています…({attempt} 回目)`,"terminal.linkWaiting":`接続が切れました。{seconds} 秒後に {attempt} 回目の再接続を試みます。`,"terminal.linkStopped":`再試行を停止しました。セッションは残っているため、いつでも再接続できます。`,"terminal.linkGone":`セッションが存在しないため、再接続できません。`,"terminal.linkNow":`今すぐ接続`,"terminal.linkStop":`再試行をやめる`,"terminal.replayTruncated":`ターミナルとの接続が切れている間の出力の一部は、Engine再生バッファから既に失われています。`,"terminal.clipboardRefused":`クリップボードにアクセスできませんでした。`,"terminal.pasteHeading":`{target} への貼り付けを確認`,"terminal.pasteDescription":`送信前に内容を確認してください。論理行数は{lines}です。`,"terminal.pasteRiskLineBreak":`改行によって1個以上のコマンドが直ちに実行される可能性があります。`,"terminal.pasteRiskControl":`ターミナル制御文字によって表示状態や入力が変更される可能性があります。`,"terminal.pastePreview":`制御文字を可視化した貼り付けプレビュー`,"terminal.pastePreviewTruncated":`プレビューは省略されています。操作は貼り付け内容全体に適用されます。`,"terminal.pasteNotSent":`まだターミナルには何も送信していません。`,"terminal.pasteCancel":`キャンセル`,"terminal.pasteWithoutFinalLineBreak":`末尾のEnterを除いて貼り付け`,"terminal.pasteEdit":`貼り付け内容を編集`,"terminal.pasteSend":`貼り付け`,"terminal.search":`検索`,"terminal.searchInput":`ターミナル出力を検索`,"terminal.searchPlaceholder":`スクロールバックを検索…`,"terminal.searchNoResults":`該当なし`,"terminal.searchPrevious":`前の一致`,"terminal.searchNext":`次の一致`,"terminal.searchClose":`検索を閉じる`,"terminal.searchCaseSensitive":`大文字と小文字を区別`,"terminal.searchRegex":`正規表現を使う`,"terminal.searchInvalidRegex":`不正な式`,"terminal.copyContext":`直近のターミナル出力をコピー`,"terminal.copyContextHint":`制御シーケンスを除き、直近最大 200 行をコピーします`,"terminal.copyContextDone":`直近のターミナル出力をコピーしました。`,"terminal.copyContextEmpty":`コピーできるターミナル出力がありません。`,"terminal.osc52Hint":`このターミナルセッションから OSC 52 でシステムのクリップボードへ書き込むことを許可します`,"terminal.osc52Enabled":`このターミナルセッションで OSC 52 のクリップボード書き込みを許可しました。`,"terminal.osc52Disabled":`OSC 52 のクリップボード書き込みを拒否します。`,"terminal.osc52Copied":`リモートアプリがシステムのクリップボードへコピーしました。`,"terminal.moreActions":`ターミナルのその他の操作`,"terminal.portForwarding":`ポート転送`,"terminal.openDirectoryInSFTP":`現在のディレクトリをSFTPで開く`,"terminal.forwardDescription":`{title}へのSSH接続を使うトンネルを管理します。`,"terminal.forwardClose":`閉じる`,"terminal.forwardActive":`動作中の転送`,"terminal.forwardNone":`この接続で動作中の転送はありません。`,"terminal.forwardTemporary":`このセッションのみ`,"terminal.forwardSaved":`保存済み`,"terminal.forwardSavedStopHint":`ここで停止しても接続設定からは削除されません。`,"terminal.forwardRetryHint":`ローカルポートの競合を解消し、このSSHを再接続すると保存済み転送を再試行します。`,"terminal.forwardAgentLabel":`SSH エージェント`,"terminal.forwardCopy":`アドレスをコピー`,"terminal.forwardCopied":`アドレスをコピーしました。`,"terminal.forwardCopyFailed":`アドレスをコピーできませんでした。`,"terminal.forwardStop":`停止`,"terminal.forwardStopping":`停止中…`,"terminal.forwardStopped":`転送を停止しました。`,"terminal.forwardNew":`ポート転送を開始`,"terminal.forwardSaveConnection":`この接続設定にも保存する`,"terminal.forwardSaveHint":`今すぐ開始し、次回この接続を開いたときにも復元します。`,"terminal.forwardSaveUnavailable":`ローカルシェルまたは未保存の接続には設定を保存できません。`,"terminal.forwardNeedsConnection":`SSHを再接続してから転送を開始してください。`,"terminal.forwardStart":`開始`,"terminal.forwardStarting":`開始中…`,"terminal.forwardStarted":`このセッションで転送を開始しました。`,"terminal.forwardStartedAndSaved":`転送を開始し、接続設定にも保存しました。`,"terminal.forwardPausedReconnect":`SSHの再接続中は転送を利用できません。`,"terminal.forwardBindFailed":`ローカルポートを開けませんでした: {detail}`,"terminal.forwardUnavailable":`現在のSSH接続ではポート転送を変更できません。`,"terminal.forwardInvalid":`転送の種類、ポート、転送先を確認してください。`,"terminal.forwardSaveFailed":`転送は開始しましたが、接続設定へ保存できませんでした。`,"terminal.forwardFailed":`ポート転送の操作を完了できませんでした。`,"terminal.settingsHeading":`Terminal`,"terminal.settingsSaved":`保存しました。クリップボード設定はすぐに反映され、その他の設定は新しく開くターミナルに適用されます。`,"terminal.settingsLoading":`ターミナル設定を読み込んでいます…`,"terminal.settingsStorageHint":`ターミナルの外観を含むこれらの設定は、ワークスペースのメタデータに保存され、バックアップと同期の対象になります。テーマ、言語、通知音はこのブラウザーにのみ保存されます。`,"terminal.maxSessionsLabel":`最大セッション数`,"terminal.maxSessionsHint":`1〜200。空欄の場合は 50 です。上限に達すると新しいセッションを開けません。既存のセッションは自動的に閉じられません。`,"terminal.scrollbackLabel":`Engine再生バッファ(バイト)`,"terminal.scrollbackHint":`ブラウザ再接続時にengineが再生する出力です。16384〜4194304、空欄は262144(256 KiB)。メモリだけに保持し、ディスクへ書きません。`,"terminal.browserScrollbackLabel":`ブラウザのスクロールバック(行)`,"terminal.browserScrollbackHint":`ブラウザー内の各ターミナルが保持する行数です。1000〜100000、空欄は5000。増やすほどブラウザーのメモリを使用します。`,"terminal.localShellProfileLabel":`既定のローカルシェル`,"terminal.localShellProfileHint":`このマシンで検出・検証できた実行ファイルから選びます。ローカル端末を開くときだけ別のシェルを選ぶこともできます。`,"terminal.localShellProfileSystem":`システムのログインシェル`,"terminal.osc52DefaultLabel":`OSC 52のクリップボード書き込みを既定で許可`,"terminal.osc52DefaultHint":`ローカルシェルはこの設定を使います。SSH接続ごとに継承・許可・拒否を選べます。`,"terminal.jisYenBackslashLabel":`JIS配列の¥キーをbackslashとして送る`,"terminal.jisYenBackslashHint":`日本語キーボード向けです。IME変換中の入力は変更しません。`,"terminal.fontSizeLabel":`文字の大きさ`,"terminal.paletteLabel":`配色`,"terminal.verbosityLabel":`接続のログ`,"terminal.verbosityHint":`接続、認証方式、保存済みTOTPの使用可否など、sshcが取得できる診断をターミナルへ表示します。新しい接続から適用され、秘密値は表示しません。`,"terminal.verbosityQuiet":`表示しない`,"terminal.verbosityBrief":`基本情報(-v)`,"terminal.verbosityDetailed":`鍵・経由地・所要時間(-vv)`,"terminal.verbosityFull":`すべて(-vvv)`,"terminal.reconnectLabel":`接続が切れたときの再接続`,"terminal.reconnectHint":`予期せず切断された場合の再接続回数です。1、2、5、10、15 秒を基準に再試行を分散するため、5 回の場合は最大 40 秒かかります。手動で閉じたセッションは再接続しません。`,"terminal.reconnectDefault":`既定(5 回・最大 40 秒)`,"terminal.reconnectNever":`再接続しない`,"terminal.reconnectOnce":`1 回(最大 2 秒)`,"terminal.reconnectTwice":`2 回(最大 4 秒)`,"terminal.reconnectThrice":`3 回(最大 10 秒)`,"terminal.reconnectFive":`5 回(最大 40 秒)`,"engine.heading":`Engine`,"engine.portLabel":`ポート`,"engine.portHint":`空欄の場合、デスクトップでは端末固有の固定ポート(初期値54447)を使用します。ブックマークやインストールしたWebアプリを継続して使えます。次回のエンジン起動時から適用されます。`,"engine.portOutOfRange":`ポートは 1024〜65535 の範囲で指定してください。`,"engine.loading":`エンジン設定を読み込んでいます…`,"engine.saved":`保存しました。自動ロックはすぐに、ポートの変更は次回のエンジン起動時から適用されます。`,"engine.saveFailed":`保存できませんでした。`,"engine.vaultAutoLockLabel":`Vault の自動ロック`,"engine.vaultAutoLockHint":`保存済みパスワードや鍵パスフレーズを使用しない時間が続いた場合に Vault をロックします。状態確認、Terminal の出力、バックグラウンド同期では時間を延長しません。`,"engine.vaultAutoLockIdle":`操作がない場合にロック`,"engine.vaultAutoLockRestart":`自動ロックしない`,"engine.vaultAutoLockValue":`時間`,"engine.vaultAutoLockUnit":`単位`,"engine.vaultAutoLockMinutes":`分`,"engine.vaultAutoLockHours":`時間`,"engine.vaultAutoLockOutOfRange":`自動ロック時間は 1〜999 の整数で指定してください。`,"engine.vaultAutoLockRestartWarning":`Vault は自動でロックされません。手動でロックしない限り、sshc を再起動するまでロック解除状態が続きます。自分で管理している端末でのみ使用してください。`,"terminal.fontLabel":`フォント`,"terminal.backgroundLabel":`背景画像`,"terminal.backgroundHint":`画像はワークスペースに保存され、バックアップと同期の対象になります。`,"terminal.backgroundNone":`画像なし`,"terminal.backgroundFollowsOverall":`全体の設定に従う`,"terminal.backgroundAdd":`画像を追加`,"terminal.backgroundChoose":`変更`,"terminal.backgroundClear":`解除`,"terminal.backgroundNotSelected":`背景画像は選択されていません`,"terminal.backgroundLibrary":`背景画像ライブラリ`,"terminal.backgroundClose":`閉じる`,"terminal.backgroundSearch":`画像を検索`,"terminal.backgroundEmpty":`保存済みの画像はありません`,"terminal.backgroundEmptyHint":`画像を追加すると、ここから選べるようになります。`,"terminal.backgroundActions":`{name} の操作`,"terminal.backgroundRenameAction":`名前を変更`,"terminal.backgroundDeleteAction":`削除`,"terminal.backgroundDeleteHeading":`背景画像を削除しますか?`,"terminal.backgroundDeleteHint":`{name} を削除し、この画像を使用している設定を解除します。元に戻せません。`,"terminal.backgroundUse":`この画像を使用`,"terminal.backgroundUseNone":`画像なしを選択`,"terminal.backgroundCapacityHeading":`保存容量`,"terminal.backgroundCapacityUsage":`{used} / {capacity} を使用中`,"terminal.backgroundCapacityLabel":`上限`,"terminal.backgroundCapacitySave":`上限を保存`,"terminal.backgroundCapacityHint":`1〜1024 MiB。既定は16 MiBです。上限を下げても既存画像は削除されません。容量と同期コストは利用者が管理してください。`,"terminal.backgroundCapacityInvalid":`保存容量は1〜1024 MiBの整数で指定してください。`,"terminal.backgroundCapacityFailed":`保存容量を変更できませんでした。`,"terminal.backgroundRename":`{name} の名前を変更`,"terminal.backgroundRenameHeading":`背景画像の名前を変更`,"terminal.backgroundRenameHint":`拡張子は画像の種類に合わせて自動的に決まります。保存済みのTerminal設定も新しい名前へ更新します。`,"terminal.backgroundRenameLabel":`新しいファイル名`,"terminal.backgroundRenameSubmit":`名前を変更`,"terminal.backgroundRenameCancel":`キャンセル`,"terminal.backgroundRenameRequired":`ファイル名を入力してください。`,"terminal.backgroundRenameExists":`同じ名前の背景画像がすでにあります。`,"terminal.backgroundRenameFailed":`背景画像の名前を変更できませんでした。`,"terminal.backgroundRemove":`{name} を削除`,"terminal.backgroundRoom":`残り {megabytes} MB`,"terminal.backgroundTooLarge":`この画像は保存できる大きさを超えています。`,"terminal.backgroundsFull":`これ以上画像を置く余地がありません。`,"terminal.backgroundNotAnImage":`このファイルは、表示できる画像ではありません。`,"terminal.backgroundFailed":`画像を保存できませんでした。`,"terminal.tintLabel":`画像に重ねる色の不透明度`,"terminal.tintHint":`値を大きくすると画像が暗くなり、文字を読みやすくできます。`,"connection.backgroundLabel":`ターミナルの背景画像`,"connection.backgroundHint":`この接続のターミナルにだけ適用されます。`,"terminal.fontHint":`JetBrains Mono はアプリに同梱されています。`,"terminal.fontFollowsSystem":`システムの等幅フォントを使用`,"terminal.fontFollowsOverall":`全体の設定に従う`,"connection.fontLabel":`ターミナルのフォント`,"connection.fontHint":`この接続のターミナルにだけ適用されます。`,"terminal.paletteHint":`個別の配色を指定していないターミナルに適用されます。`,"terminal.paletteFollowsTheme":`アプリのテーマに従う`,"terminal.paletteFollowsOverall":`全体の設定に従う`,"connection.paletteLabel":`ターミナルの配色`,"connection.paletteHint":`この接続のターミナルにだけ適用されます。`,"connection.encodingLabel":`接続先の文字コード`,"connection.encodingHint":`ブラウザのターミナルとコマンドラインの sshc の両方で、この接続に使用します。`,"connection.encodingUTF8":`UTF-8(既定)`,"connection.encodingShiftJIS":`Shift_JIS(日本語)`,"connection.encodingEUCJP":`EUC-JP(日本語)`,"connection.encodingISO2022JP":`ISO-2022-JP(日本語)`,"connection.osc52Label":`OSC 52クリップボード`,"connection.osc52Hint":`このSSH接続のリモートアプリケーションが、システムのクリップボードへ書き込むことを許可するか選択します。`,"connection.osc52Inherit":`Terminal全体の設定を使う`,"connection.osc52Allow":`この接続では許可`,"connection.osc52Deny":`この接続では拒否`,"terminal.fontSizeHint":`ピクセル単位で指定します。空欄の場合は、狭い画面で 15、それ以外で 13 になります。`,"terminal.copyOnSelectLabel":`選択した文字列を自動的にコピーする`,"terminal.copyOnSelectHint":`選択を終えたときに一度だけコピーします。選択によってシステムのクリップボードを置き換えたくない場合はオフにします。`,"terminal.rightClickPasteLabel":`右クリックで貼り付ける`,"terminal.rightClickPasteHint":`対応する端末では bracketed paste を使います。通常のコンテキストメニューを残す場合はオフにします。`,"terminal.webglLabel":`WebGL描画を使用する`,"terminal.webglHint":`GPUを使って滑らかに描画します。文字が二重に見える、または残像が残る場合は無効にしてください。`,"terminal.limitsOutOfRange":`指定値が有効範囲外です。`,"terminal.startLabel":`開始ディレクトリ`,"terminal.startHint":`ローカルシェルを開始するディレクトリです。~/work または絶対パスで指定してください。~ は展開せずに保存されるため、別のマシンでも同じ指定を使用できます。空欄の場合はホームディレクトリから開始します。`,"terminal.startSave":`保存`,"terminal.startMissing":`そのディレクトリはありません。`,"terminal.startNotADirectory":`それはディレクトリではありません。`,"terminal.startUnusable":`~/から始まるパス、または絶対パスを指定してください。`,"terminal.settingsSaveFailed":`ターミナル設定を保存できませんでした。`,"terminal.screenLabel":`{title} のターミナル`,"terminal.exitedWithCode":`プログラムが終了コード {code} で終了しました。出力は、このセッションを閉じるまで表示されます。`,"terminal.exitedWithSignal":`プログラムがシグナル {signal} で終了しました。出力は、このセッションを閉じるまで表示されます。`,"inspector.appOnly":`sshc 固有の設定`,"inspector.groupLabel":`グループの表示設定`,"inspector.hostSavesImmediately":`ここでの変更はすぐに保存されます。`,"inspector.groupChangesStaged":`ここでの変更は「グループを保存」を選ぶまで未保存です。`,"inspector.notices":`注意`,"inspector.inherited":`継承した値`,"inspector.noNotices":`この接続に関する注意事項はありません。`,"inspector.noInherited":`この接続の値はすべて同じ Host ブロック内で定義されています。`,"shell.language":`Lang`,"shell.languageMenu":`言語メニュー`,"shell.languageEnglish":`English`,"shell.languageJapanese":`日本語`,"shell.theme":`外観`,"shell.themeMenu":`テーマメニュー`,"shell.themeSystem":`システムに合わせる`,"shell.themeLight":`ライト`,"shell.themeDark":`ダーク`,"section.home":`Home`,"section.license":`License`,"menu.others":`Others`,"license.description":`sshcと使用コンポーネントのライセンス・著作権表示です。全文はオフラインでも読めます。`,"license.search":`コンポーネント・ライセンスを検索`,"license.count":`{count}件のコンポーネント`,"license.noMatches":`一致するコンポーネントがありません。`,"section.menu":`Menu`,"section.connections":`Connections`,"section.terminal":`Terminal`,"section.config":`SSH Config`,"section.groups":`Groups`,"section.keys":`SSH Keys`,"section.knownHosts":`Known Hosts`,"section.remoteKeys":`Remote Keys`,"section.diagnostics":`Diagnostics`,"section.settings":`Settings`,"settings.heading":`Settings`,"settings.pageDescription":`ターミナルの動作、sshc の起動設定、このマシンに保存するデータの暗号化を設定します。`,"settings.engineDescription":`sshc エンジンの待受ポートと Vault の自動ロックを設定します。`,"settings.terminalDescription":`新しいターミナルに適用する動作、表示、操作方法を設定します。`,"settings.notificationsDescription":`ブラウザ通知と、ターミナル内のプログラムからの通知を知らせる音を設定します。`,"settings.connectionsDescription":`このブラウザで開いている接続を確認し、まとめて終了します。`,"settings.passwordDescription":`このマシンの暗号化データを保護するマスターパスワードを変更します。`,"secrets.heading":`Vault`,"secrets.pageDescription":`名前付きのアカウントパスワード、鍵パスフレーズ、ワンタイムパスワードを管理します。値は編集時だけ表示されます。`,"secrets.passwordsDescription":`名前付きのアカウントパスワードと割り当て先を管理します。値は編集時だけ表示されます。`,"secrets.passphrasesDescription":`名前付きまたは鍵専用のパスフレーズを管理します。値は編集時だけ表示されます。`,"secrets.totpDescription":`ワンタイムパスワードを登録し、現在のコードと接続先への割り当てを確認します。`,"secrets.metricPasswords":`アカウントパスワード`,"secrets.metricPassphrases":`鍵パスフレーズ`,"secrets.metricTOTP":`ワンタイムパスワード`,"secrets.metricAssignments":`割り当て`,"secrets.loading":`Vault を読み込んでいます…`,"secrets.explainNew":`1 つのマスターパスワードで、アカウントのパスワード、鍵のパスフレーズ、オブジェクトストレージの認証情報、Snippet を暗号化します。マスターパスワードは保存されず、復旧もできません。紛失すると、これらの暗号化データを復号できなくなります。OpenSSH が直接読み込むファイルには影響しません。`,"secrets.explainLocked":`Vault はロックされています。アクセスするにはマスターパスワードを入力してください。`,"secrets.master":`マスターパスワード`,"secrets.create":`Vault を作成`,"secrets.unlock":`開く`,"secrets.lock":`sshc をロック`,"secrets.createFailed":`Vault を作成できませんでした。マスターパスワードは 4 文字以上必要です。`,"secrets.unlockFailed":`マスターパスワードが違います。`,"secrets.failed":`Vault を読み込めませんでした。`,"secrets.storeFailed":`保存できませんでした。`,"secrets.deleteFailed":`削除できませんでした。`,"secrets.inUse":`この認証情報は使用中です。削除する前に割り当て先を変更してください。`,"secrets.none":`まだ何も保存されていません。`,"secrets.assignedHosts":`割り当て先のホスト`,"secrets.noAssignedHosts":`割り当て先のホストはありません`,"secrets.keys":`対象の鍵`,"secrets.noKeys":`対象の鍵はありません`,"secrets.dedicated":`この鍵専用`,"secrets.removeDedicated":`{key} の保存済みパスフレーズを削除`,"secrets.keyHostUsageIncomplete":`SSH 設定をすべて読み込めなかったため、この鍵を使用しているホストを完全には確認できませんでした。SSH Config の診断を確認してください。`,"secrets.keyHostsUnavailable":`割り当て先ホストを確認できません`,"secrets.delete":`{name} を削除`,"secrets.edit":`{name} を編集`,"secrets.actions":`{name} の操作`,"secrets.usageExpand":`{name} の{label}を表示`,"secrets.usageCollapse":`{name} の{label}を隠す`,"secrets.editPassword":`アカウントパスワードを編集`,"secrets.editPassphrase":`鍵パスフレーズを編集`,"secrets.editTOTP":`ワンタイムパスワードを編集`,"secrets.editNote":`保存済みの値を表示しています。名前を変更しても、現在の割り当て先は維持されます。`,"secrets.credentialName":`名前`,"secrets.passwordValue":`パスワード`,"secrets.passphraseValue":`鍵パスフレーズ`,"secrets.totpValue":`セットアップキーまたは otpauth URI`,"secrets.revealing":`保存済みの値を読み込んでいます…`,"secrets.revealFailed":`保存済みの値を表示できませんでした。`,"secrets.updateFailed":`変更を保存できませんでした。`,"secrets.nameExists":`同じ名前の認証情報が既にあります。別の名前を指定してください。`,"secrets.saveChanges":`変更を保存`,"secrets.saving":`保存中…`,"secrets.cancel":`キャンセル`,"secrets.passwordsHeading":`アカウントのパスワード`,"secrets.passphrasesHeading":`鍵のパスフレーズ`,"secrets.newPasswordName":`新しいアカウントパスワードの名前`,"secrets.newPasswordValue":`新しいアカウントパスワードの値`,"secrets.storePassword":`アカウントパスワードを保存`,"secrets.newPassphraseName":`新しい鍵パスフレーズの名前`,"secrets.newPassphraseValue":`新しい鍵パスフレーズの値`,"secrets.storePassphrase":`鍵パスフレーズを保存`,"secrets.totpHeading":`ワンタイムパスワード(TOTP)`,"secrets.newTOTPName":`新しいワンタイムパスワードの名前`,"secrets.newTOTPValue":`Base32 セットアップキーまたは otpauth URI`,"secrets.storeTOTP":`ワンタイムパスワードを保存`,"secrets.totpAssignInConnection":`接続先への割り当ては、Connectionsで対象を開き、基本設定の「ワンタイムパスワード(TOTP)」から選択してください。`,"secrets.totpLoading":`現在のコードを生成しています…`,"secrets.totpRetry":`コードをもう一度生成`,"secrets.totpExpand":`{name} の前後のコードを表示`,"secrets.totpCollapse":`{name} の前後のコードを隠す`,"secrets.totpRemaining":`残り {seconds} 秒`,"secrets.totpPrevious":`ひとつ前`,"secrets.totpNext":`ひとつ後`,"secrets.unassignTOTP":`{host} へのワンタイムパスワード割り当てを解除`,"secrets.unassignTOTPFailed":`ワンタイムパスワードの割り当てを解除できませんでした。`,"update.version":`バージョン {version}`,"update.available":`{version} が公開されています — 変更点を読む`,"desktop.closeAllHeading":`Open connections`,"desktop.closeAllNote":`すべてのセッション、ポート転送、ssh-agent 転送を終了します。エンジンは動作を続けます。`,"desktop.openCount":`{count} 件`,"desktop.closeAll":`接続をすべて閉じる`,"secrets.changeHeading":`Master password`,"secrets.changeNote":`この端末でパスワード保護を使うか、自動で開くかを選べます。変更は Snippet、同期設定、ローカルのバックアップにも適用されます。同期には独立したキーを使います。`,"secrets.currentMaster":`現在のマスターパスワード`,"secrets.newMaster":`新しいマスターパスワード`,"secrets.confirmMaster":`新しいマスターパスワード(確認)`,"secrets.change":`マスターパスワードを変更`,"secrets.wrongCurrent":`現在のマスターパスワードが違います。何も変更していません。`,"secrets.changeFailed":`マスターパスワードを変更できませんでした。`,"secrets.changedMasterLocally":`Vault の保護設定を変更しました。Snippet、同期設定、ローカルのバックアップにも適用されています。リモートスナップショットは書き換えていません。`,"section.passwords":`Account passwords`,"section.keyPassphrases":`Key passphrases`,"section.otp":`OTP`,"lock.explainNew":`この端末の Vault をパスワードで保護するか選んでください。パスワードを使う場合は 4 文字以上で設定できます。`,"lock.explainOpen":`sshc を開くにはマスターパスワードを入力してください。`,"lock.noRecovery":`マスターパスワードは復旧できません。紛失すると Vault、Snippet、暗号化されたバックアップを開けなくなります。`,"lock.explainPasswordless":`この端末では Vault をパスワードなしで使えます。`,"lock.withoutPassword":`パスワードなしで使う`,"lock.withoutPasswordHint":`sshc の起動時に自動で開きます。ローカルデータの保護は OS アカウントと端末のセキュリティに任せます。同期データの暗号化は維持されます。`,"lock.shortPasswordHint":`短いパスワードは、ローカルファイルを持ち出された場合の保護が弱くなります。長く予測しにくいパスワードほど強く保護できます。`,"lock.password":`マスターパスワード`,"lock.confirm":`マスターパスワード(確認)`,"lock.create":`Vault を作成`,"lock.open":`開く`,"lock.wrong":`マスターパスワードが違います。`,"lock.tooShort":`マスターパスワードは {count} 文字以上必要です。`,"lock.alreadyExists":`アプリ内に Vault が見つかりました。マスターパスワードを入力して開いてください。`,"lock.storagePermission":`Android がアプリ専用ストレージへのアクセスを拒否しました。下の詳細をコピーして共有してください。`,"lock.storageFull":`空き容量が不足しているため Vault を作成または更新できません。`,"lock.storageReadOnly":`アプリ専用ストレージが読み取り専用です。端末を再起動してから再試行してください。`,"lock.storageBusy":`別の Vault 更新が完了していません。少し待ってから再試行してください。`,"lock.storageIO":`Android がアプリ専用ストレージへの入出力エラーを報告しました。`,"lock.schemaOlder":`Vault のバージョンが古いです(必要なバージョン:{required}、現在:{current})。`,"lock.schemaNewer":`Vault のバージョンがこの sshc より新しいです(対応バージョン:{required}、現在:{current})。`,"lock.migrationFailed":`Vault をバージョン {current} から {required} へ更新できませんでした。元の Vault は変更していません。`,"lock.migrationCompleted":`Vault をバージョン {current} から {required} へ安全に更新しました。`,"lock.migrationDismiss":`更新通知を閉じる`,"lock.envelopeUnsupported":`この形式の暗号化 Vault には対応していません。診断情報を開いて共有してください。`,"lock.schemaRecoveryHint":`まず互換性のある最新のローカルバックアップを復元できます。見つからない場合は、SSH 設定と鍵ファイルを残して空の Vault を作成できます。`,"lock.restoreCompatibleBackup":`互換性のある Vault を復元`,"lock.noCompatibleBackup":`互換性のあるローカルバックアップは見つかりませんでした。何も変更していません。`,"lock.recoveryFailed":`互換性のある Vault を復元できませんでした。`,"lock.resetUnsupportedAcknowledge":`保存済みパスワード、保存済み鍵パスフレーズ、同期設定が初期化されることを確認しました。SSH 設定と鍵ファイルは残ります。`,"lock.resetUnsupported":`空の Vault を作成`,"lock.resetFailed":`未対応の Vault を安全に置き換えられませんでした。`,"lock.failed":`Vault を開けませんでした。`,"section.sync":`Sync`,"section.history":`History`,"home.heading":`Connections`,"home.manageConnections":`Connections を管理`,"home.connections":`Connections`,"home.groups":`グループ`,"home.attention":`確認が必要`,"home.quickConnect":`Quick Connect`,"home.quickConnectHint":`最近接続した順に表示し、未接続の接続先は名前順に並べます。`,"home.recentConnections":`最近使った接続`,"home.recentConnectionsHint":`この端末で接続に成功した SSH 接続です。`,"home.recentConnectionList":`最近使った接続先`,"home.savedWorkspaces":`保存レイアウト`,"home.savedWorkspacesHint":`保存した接続先とペイン配置を、新しいセッションとしてまとめて開きます。`,"home.savedWorkspaceList":`保存済みターミナルレイアウト`,"home.workspacePanes":`{count} ペイン`,"home.workspaceUpdated":`更新 {at}`,"home.openWorkspace":`レイアウトを開く`,"home.lastConnected":`最終接続 {at}`,"home.connectionList":`利用できる接続`,"home.search":`接続を検索`,"home.searchPlaceholder":`ホスト、グループ、タグを検索`,"home.viewMode":`接続先の表示形式`,"home.panelView":`パネル`,"home.listView":`リスト`,"home.groupFilter":`グループで接続先を絞り込み`,"home.allGroups":`すべて`,"home.groupCount":`グループ {count} 件`,"home.connectionCount":`接続先 {count} 件`,"home.groupBreadcrumb":`選択中のグループ`,"home.openGroup":`{name} を開く(接続先 {count} 件)`,"home.noChildGroups":`この階層にグループはありません。`,"home.connectGesture":`{alias} へ接続します。マウスではダブルクリック、タッチ画面では 1 回タップします。`,"home.neverConnected":`接続履歴なし`,"home.loading":`SSH 設定を読み込んでいます…`,"home.noConnections":`接続先がまだありません。SSH Config に Host を追加してください。`,"home.noMatches":`検索に一致する接続はありません。`,"home.groupMissingDetail":`選択中のグループ {name} は、すでに存在しません。`,"home.ungrouped":`グループなし`,"home.tagsFor":`{alias} のタグ`,"home.connectionActions":`{alias} の操作`,"home.openConnectionSettings":`接続設定を開く`,"home.connect":`接続`,"home.openingConnection":`{alias} に接続中…`,"home.opening":`接続中…`,"home.loadFailed":`SSH 設定を読み込めませんでした。`,"home.workspace":`ワークスペース`,"home.workspaceUnavailable":`ワークスペースの状態を取得できません。`,"home.workspaceClean":`設定の問題や中断した変更はありません。`,"home.workspaceAttention":`設定または復旧について {count} 件の確認が必要です。`,"home.openConfig":`設定を確認`,"home.recoverChanges":`変更を復旧`,"home.sync":`同期`,"home.syncUnavailable":`同期状態を取得できません。`,"home.syncNotConfigured":`リモート同期は設定されていません。`,"home.syncNever":`リモートバケットは設定済みですが、まだ同期していません。`,"home.syncLast":`最終同期 {at} · {count} ファイル`,"home.openSync":`同期画面を開く`,"copy.button":`{label}をコピー`,"copy.done":`コピーしました。`,"copy.refused":`ブラウザがクリップボードへの書き込みを拒否しました。`,"copy.command":`コマンド`,"copy.terminalCommand":`ターミナルコマンド`,"copy.privateKey":`秘密鍵`,"copy.publicKey":`公開鍵`,"copy.keyLine":`鍵の行`,"copy.remoteCommand":`リモートコマンド`,"copy.diagnosticReport":`診断レポート`,"diagnostic.requestFailed":`操作を完了できませんでした`,"diagnostic.requestFailedHint":`sshc でエラーが発生しました({code})。問い合わせの際は診断情報を確認してください。`,"diagnostic.showDetails":`診断情報を表示`,"diagnostic.dismiss":`エラーを閉じる`,"history.requestRejected":`要求が拒否されました({code})。`,"history.pageTitle":`History`,"history.pageDescription":`完了した変更を確認し、中断した書き込みを復旧し、新しい履歴を失わずにファイル単位で復元できます。`,"history.metricChanges":`完了した変更`,"history.metricInterrupted":`中断`,"history.metricRestorable":`復元可能なファイル`,"history.operation.configuration":`SSH Config の変更`,"history.operation.connection":`接続先の変更`,"history.operation.key":`鍵の変更`,"history.operation.terminal":`ターミナル設定の変更`,"history.operation.engine":`起動設定の変更`,"history.operation.vault":`Vault の変更`,"history.operation.sync":`同期設定の変更`,"history.operation.other":`アプリの変更`,"history.status.staging":`準備中`,"history.status.staged":`中断`,"history.status.applied":`適用済み`,"history.status.completed":`完了`,"history.status.rolledBack":`取り消し済み`,"history.status.unknown":`記録済み`,"history.interrupted":`中断した変更`,"history.interruptedDetail":`{operation} 開始 {startedAt}:{total} 個のうち {committed} 個のファイルが書き込まれました。`,"history.complete":`完了させる`,"history.rollBack":`取り消す`,"history.loading":`履歴を読み込んでいます…`,"history.restored":`{path} を復元しました(履歴 ID:{id})。`,"history.completedTransaction":`中断していた変更を完了しました。`,"history.rolledBack":`中断していた変更を取り消しました。`,"history.completed":`完了した変更`,"history.empty":`このアプリケーションを通した変更はまだありません。`,"history.restorePath":`{path} を復元`,"history.backupsKept":`世代バックアップは ~/.ssh/sshc/backups に保存され、自動では削除されません。復元操作も新しい変更として履歴に残るため、同じ方法で取り消せます。`,"notice.complex_external_rule":`ワイルドカード、否定、Match ブロック、alias の重複のいずれかが含まれるため、この値を単純な形式では編集できません。値の参照元を表示します。`,"notice.duplicate_alias":`別のブロックも同じaliasを宣言しています。OpenSSHは多くの設定項目で、最初に読み込んだ値を使用します。`,"notice.proxy_ignored":`ProxyCommandとProxyJumpの両方が書かれています。OpenSSHは先に読み込んだ方だけを使い、この行は無視されます。`,"notice.wildcard_shadow":`すべてに一致するブロックが、このホストの値に影響する可能性があります。`,"notice.negated_pattern":`否定パターンがここに適用されます。`,"notice.unnamed_host_block":`このブロックには具体的な alias がないため、Raw テキストでのみ編集できます。`,"notice.match_block":`Match ブロックが見つかりました。Match exec はコマンドを実行しうるため、ここでは評価しません。`,"notice.dangerous_directive":`このディレクティブはコマンドを実行する可能性があります。記述どおりに保存され、このアプリが実行することはありません。`,"notice.unstructured_line":`この行は引用符が対応しておらず、記述されたまま保持されます。`,"notice.external_file":`このファイルは ~/.ssh の外にあります。表示のみで、書き込みは行いません。`,"notice.orphan_metadata":`このメモに対応するホストが存在しません。接続先を確認して関連付け直してください。`,"notice.group_cycle":`このグループの親子関係が循環しているため、スキップしました。`,"notice.group_member_missing":`このグループのメンバーに対応する Host ブロックが設定にありません。`,"refusal.directory_not_empty":`ディレクトリが空ではありません。先に中のファイルを削除してください。ファイルを直接参照する Include 行も同時に更新されます。`,"refusal.not_a_directory":`そのパスはディレクトリではなくファイルです。`,"refusal.group_is_declared":`{detail} は宣言済みのグループです。グループ画面で名前を変更または削除してください。関連する接続、共通設定、鍵も同時に移動されます。`,"refusal.destination_exists":`移動先には同名のファイルまたはディレクトリがあります。`,"refusal.alias_already_declared":`同名の接続設定が既にあるため保存できません。別の名前を使用してください。`,"refusal.region_damaged":`~/.ssh/config にある sshc 生成ブロックのマーカーが片方しかありません。生成範囲を特定できないため、何も書き込んでいません。`,"notice.group_not_declared":`このディレクトリは connections/ の下にありますが、参照する Include 行がないため読み込まれません。グループとして宣言するか、中のファイルを移動してください。`,"notice.group_directory_missing":`このグループは宣言されていますが、ディレクトリがありません。ディレクトリを作成してファイルを配置するまで、設定は読み込まれません。`,"notice.group_empty":`このグループは宣言されていますが、中身がありません。`,"notice.generated_region_damaged":`~/.ssh/config に sshc 生成ブロックの開始マーカーはありますが、終了マーカーがありません。sshc が生成した範囲を特定できないため、グループを保存できません。ブロック内の Include 行は現在も有効です。最後の Include 行の次に「# <<< sshc groups」を追加するか、生成ブロック全体を削除してからグループを保存し直してください。`,"notice.explained_values_only":`設定の一部を読み込めなかったため、読み込み可能な範囲の値だけを表示しています。`,"notice.match_exec_refused":`この設定には Match exec があります。ここでは何も実行しないので、値を解決できません。端末から ssh で接続してください。`,"notice.match_final_refused":`この設定には Match final があります。OpenSSH は設定を二度読み込みますが、sshc はこの処理に対応していないため値を解決できません。`,"notice.canonicalise_refused":`この設定は CanonicalizeHostname を有効にしています。設定を読み直す必要があるため、ここでは値を解決できません。`,"notice.unknown_token_refused":`この設定では、sshc が対応していないトークンを使用しています。値を解決できません。`,"notice.destination_not_included":`このファイルは SSH Config から参照されていないため、OpenSSH に読み込まれません。Include 設定を追加してください。`,"notice.group_file_unreached":`このファイルは connections/ 内にありますが、どのグループからも参照されていません。宣言済みのグループへ移動してください。`,"notice.group_directory_leftover":`グループのディレクトリが空になりました。sshc は空のディレクトリを自動削除しません。不要であれば手動で削除してください。`,"notice.include_no_longer_matches":`ファイル名を変更すると現在の Include パターンの対象外になり、OpenSSH に読み込まれなくなります。`,"notice.include_not_rewritten":`sshc が自動更新できない形式の Include がこのファイルを参照しています。Include 設定を手動で確認してください。`,"notice.include_now_unreached":`新しい保存先は SSH Config から参照されていません。Include 設定を追加するまで、OpenSSH に読み込まれません。`,"preview.heading":`保存内容の確認`,"preview.newFile":`(新規ファイル)`,"preview.tooLarge":`このファイルは行単位で表示できるサイズを超えているため、ファイル全体の置換として表示します。`,"preview.syntaxError":`{path} の {line} 行 {column} 列に構文エラーがあります。編集はここに保持され、書き込まれていません。`,"preview.theFile":`対象ファイル`,"preview.graphError":`この変更により Include の参照関係が不正になります。何も書き込んでいません。`,"preview.conflictError":`このファイルはアプリケーションの外で変更されました。何も書き込まれていません。`,"preview.rejected":`要求が拒否されました({code})。何も書き込まれていません。`,"preview.changedOnDisk":`読み込み後にディスク上で変更された内容`,"preview.pendingChange":`保留中の変更`,"preview.mergeByHand":`ファイルを読み込み直し、2 つの変更を手動で統合してください。何も書き込んでいません。`,"preview.nothingYet":`値を変更すると、何が書き込まれるかがここに表示されます。`,"preview.explainedFor":`{alias} の解決済み設定値`,"preview.unset":`未設定`,"reveal.heading":`秘密鍵を表示:{path}`,"reveal.warning":`秘密鍵はこのページに表示されます。この画面を見られる人は秘密鍵をコピーできます。sshcでは、ブラウザー拡張機能やクリップボード履歴ツールによる取得を防げません。表示操作は履歴に記録されます(鍵そのものは記録しません)。`,"reveal.show":`秘密鍵を表示`,"reveal.requesting":`一度限りの確認を要求しています…`,"reveal.privateKeyLabel":`秘密鍵`,"reveal.failed":`秘密鍵を表示できませんでした。このダイアログを閉じて、もう一度確認してください。`,"reveal.close":`閉じる`,"orphan.heading":`接続先が存在しない設定`,"orphan.explain":`これらのメモに対応する Host ブロックは設定から削除されています。関連付け先の接続を指定してください。`,"orphan.chooseTarget":`このメモが属する接続を選んでください。`,"orphan.occupied":`{alias} には既に独自の設定があります。先にそちらを消すか、このメモを破棄してください。`,"orphan.entry":`{path} の {alias}`,"orphan.noSettings":`設定なし`,"orphan.tags":`タグ {tags}`,"orphan.note":`メモ「{note}」`,"orphan.colour":`色 {colour}`,"orphan.reassociateWith":`{alias} の再関連付け先`,"orphan.reassociatePlaceholder":`再関連付け先…`,"orphan.reassociate":`{alias} を再関連付け`,"orphan.discard":`{alias} の設定を破棄`,"password.blocker.authenticationOff":`このホストは PasswordAuthentication が no のため、クライアントがパスワードを提示することはありません。`,"password.blocker.aliasNotSimple":`これは具体的なホストではなくパターンです。パスワードを保存するには、単一ホストのアカウントを指定してください。`,"password.blocker.identityFile":`このホストには秘密鍵が直接設定されています。sshc はパスワードを保存・供給せず、必要な手入力を OpenSSH に任せます。`,"password.warn.hostKeyUnknown":`このホストの鍵は known_hosts に登録されていません。保存済みパスワードを使用すると、パスワード入力ヘルパはホスト鍵の確認に応答できないため、初回接続に失敗します。先に Known Hosts でホスト鍵を登録してください。`,"password.warn.hostNameUnresolved":`この alias の HostName を特定できませんでした。パスワードは alias に紐づけて保存されます。`,"password.show":`表示`,"password.showNamed":`{label}を表示`,"password.hideNamed":`{label}を隠す`,"password.hide":`隠す`,"sync.heading":`Sync`,"sync.overviewHeading":`同期`,"sync.manageSettings":`同期設定を管理`,"sync.exclusions.heading":`同期するファイル`,"sync.exclusions.open":`選択・除外ルール`,"sync.exclusions.loading":`同期対象を読み込んでいます…`,"sync.exclusions.summary":`対象 {included} 件 · 除外 {ignored} 件`,"sync.exclusions.hint":`チェックを外したファイルは送信せず、受信時にも上書き・削除しません。ローカルにある内容はそのまま残ります。`,"sync.exclusions.defaults":`まだ .sshcignore はありません。OSの管理ファイル、バックアップ、一時ファイル、ロックファイル、SSHの許可鍵・既知ホスト情報、.ssh直下のenvironmentとrcを除外する既定ルールが有効です。保存すると端末間で共有されます。`,"sync.exclusions.search":`ファイル名・パスを検索`,"sync.exclusions.empty":`一致するファイルはありません。`,"sync.exclusions.sensitiveWarning":`接続設定または鍵が除外されています。別の端末ではその接続を再現できない可能性があります。`,"sync.exclusions.advanced":`.sshcignore を編集`,"sync.exclusions.rules":`同期除外ルール`,"sync.exclusions.syntax":`Gitignoreと同じ形式で *、**、?、[a-z]、!(再追加)を使えます。.sshcignore自身とsshcの端末固有状態はこの設定に関係なく扱われます。`,"sync.exclusions.save":`除外設定を保存`,"sync.exclusions.shared":`.sshcignore は同期され、すべての端末で同じルールを使います。`,"sync.exclusions.invalid":`除外ルールの書式が正しくありません。`,"sync.exclusions.loadFailed":`同期対象を読み込めませんでした。`,"sync.exclusions.saveFailed":`除外設定を保存できませんでした。`,"sync.receiveRemote":`リモートから受信`,"sync.autoBlockedReason":`同期を停止しています。理由:{reason}`,"sync.autoFailedReason":`前回の同期に失敗しました。理由:{reason}`,"sync.setup.check":`接続を確認`,"sync.setup.empty":`接続できました。このパスには同期データがありません。`,"sync.setup.existing":`既存の同期データが見つかりました。`,"sync.setup.incomplete":`履歴はありますが、現在のスナップショットがありません。`,"sync.setup.useAnotherPath":`新しく始める場合は、空の別パスを指定してください。`,"sync.setup.existingKey":`この同期データと同じ暗号化キーを入力してください。保存前に実際のスナップショットを復号して確認します。`,"sync.setup.emptyKey":`強い暗号化キーを自動生成します。自分で決めることもできます。`,"sync.setup.save":`確認して保存`,"sync.setup.saved":`接続情報と暗号化キーを保存しました。`,"sync.setup.changed":`確認後に同期先の状態が変わりました。もう一度、接続を確認してください。`,"sync.role.main":`このマシンで送受信`,"sync.role.receive":`このマシンでは受信のみ`,"sync.role.advanced":`同期モードの詳細設定`,"sync.role.send":`このマシンでは送信のみ`,"sync.pageDescription":`この SSH ワークスペースを暗号化スナップショットとして保存し、オブジェクトストレージ経由でマシン間に同期します。`,"sync.flowHeading":`同期を始める手順`,"sync.flowBucket":`バケットを設定`,"sync.flowKey":`共通の暗号化キーを設定`,"sync.flowOperate":`状態を確認して送受信`,"sync.loading":`同期設定を読み込んでいます…`,"sync.warning":`同期対象には、同期除外ルールに一致しない~/.ssh配下の通常ファイルが含まれます。秘密鍵も含まれる場合があります。スナップショットはアップロード前にこのマシン上で下のキーを使って暗号化されるため、ストレージ事業者に同期対象の平文は送信されません。ただし、バケットの認証情報を持つ第三者は暗号化済みスナップショットを取得し、暗号化キーの総当たりをオフラインで続けられます。`,"sync.statusFailed":`同期設定を読み取れませんでした。`,"sync.bucketHeading":`バケット`,"sync.notConfigured":`まだバケットが設定されていません。`,"sync.endpoint":`エンドポイント`,"sync.endpointHint":`https である必要があります。R2 では https://.r2.cloudflarestorage.com です。`,"sync.bucket":`バケット名`,"sync.path":`バケット内のパス`,"sync.pathHint":`任意です。空ならバケットのルートに置きます。`,"sync.region":`リージョン`,"sync.regionHint":`任意です。空欄の場合は auto を使用します。R2 では auto、AWS S3 ではバケットのリージョンを指定してください。`,"sync.accessKeyId":`アクセスキー ID`,"sync.secretAccessKey":`シークレットアクセスキー`,"sync.credentialsNote":`バケットの認証情報はマスターパスワードで暗号化して保存し、スナップショットには含めません。スナップショットに含めると、1 つのスナップショットを入手した第三者が以後のスナップショットも取得できるためです。`,"sync.sealed":`この設定はマスターパスワードで暗号化されています。表示するには Vault を開いてください。`,"sync.unlockFailed":`マスターパスワードが違います。`,"sync.noVault":`このマシンにはまだ Vault がありません。「Vault」で作成してから戻ってきてください。`,"sync.direction":`同期の方向`,"sync.direction.both":`送信と受信`,"sync.direction.push":`送信のみ`,"sync.direction.pull":`受信のみ`,"sync.direction.both.hint":`このマシンの変更を送信し、他のマシンが送信した変更を適用できます。`,"sync.direction.push.hint":`このマシンからの送信のみを行います。他のマシンの変更は適用されませんが、変更内容の確認はできます。`,"sync.direction.pull.hint":`このマシンでは受信のみを行います。ローカルの変更はバケットや他のマシンへ送信されません。`,"sync.configure":`このバケットを使う`,"sync.editSettings":`バケット設定を編集`,"sync.cancelSettings":`編集をキャンセル`,"sync.configureFailed":`そのバケットを設定できませんでした。`,"sync.detailsHeading":`詳細・履歴`,"sync.neverSynced":`このマシンはまだ同期していません。`,"sync.lastSynced":`最終同期 {at}、{count} ファイル。`,"sync.key":`暗号化キー`,"sync.keyHint":`スナップショットはマスターパスワードではなく、このキーで暗号化します。同じバケットを共有するすべてのマシンに同じキーを入力してください。マスターパスワードはマシンごとに異なる値を使用できます。このキーを紛失するとスナップショットを復号できません。`,"sync.keyMissing":`キーがまだありません。ここで作り、同じキーを他のマシンにも入力してください。`,"sync.keySet":`キーは設定済みです。保存後の値は再表示できません。`,"sync.keyReady":`設定済み`,"sync.keyNeeded":`キーが必要`,"sync.keyShownOnce":`いまコピーして、他のマシンに入力してください。この画面を離れると二度と表示されません。`,"sync.keyChooseOwn":`自分で決める`,"sync.keyOwnValue":`キー`,"sync.keyCreate":`暗号化キーを作成`,"sync.keyReplace":`キーを置き換える`,"sync.keySaved":`保存しました。`,"sync.keyFailed":`キーを保存できませんでした。`,"sync.keyTooShort":`自分で決めるキーは 12 文字以上にしてください。`,"sync.wrongKey":`保存済みのキーでは、このバケットのスナップショットを復号できません。すべてのマシンで同じキーを使用しているか確認するか、バケットの状態からリモートスナップショットを明示的に置き換えてください。`,"sync.wrongMaster":`このマシンのマスターパスワードと違います。`,"sync.bucketAuthenticationFailed":`オブジェクトストレージが要求を認証できませんでした。何も保存していません。アクセスキーとシークレットを確認してください。`,"sync.bucketAccessDenied":`オブジェクトストレージへのアクセスが拒否されました。何も保存していません。資格情報、バケット、リージョン、キーの権限を確認してください。`,"sync.bucketRateLimited":`オブジェクトストレージが要求を制限しています。しばらく待ってから再実行してください。`,"sync.bucketUnavailable":`オブジェクトストレージのサービスが一時的に利用できません。時間を置いて再実行してください。`,"sync.unreachable":`オブジェクトストレージが要求を拒否しました。何も保存していません。バケット名、アクセスキー、シークレット、リージョン、権限を確認してください。`,"sync.bucketTimeout":`オブジェクトストレージが時間内に応答しませんでした。回線とエンドポイントを確認してください。`,"sync.bucketDNSFailed":`エンドポイントのホスト名を解決できませんでした。入力したアドレスと端末のDNS接続を確認してください。`,"sync.bucketTLSFailed":`エンドポイントとの安全な接続を検証できませんでした。HTTPSのアドレスと端末の日時を確認してください。`,"sync.bucketUnreachable":`オブジェクトストレージへ接続できませんでした。端末のネットワークとエンドポイントを確認してください。`,"sync.snapshotDownloadIncomplete":`暗号化スナップショットの受信が途中で終了しました。回線を確認して、もう一度受信してください。`,"sync.snapshotCostRefused":`このスナップショットは復号時の負荷が安全上限を超えるため開けません。`,"sync.snapshotSchemaUnsupported":`このスナップショットは現在のsshcが対応していない形式です。作成した端末のsshcと同じか新しい版へ更新してください。`,"sync.snapshotRejected":`取得したデータは有効なsshcスナップショットではないか、破損しています。何も上書きしていません。`,"sync.snapshotTooLarge":`スナップショットが安全に読み込める上限を超えています。何も上書きしていません。`,"sync.noSnapshot":`指定したバケットとパスに現在のスナップショットがありません。`,"sync.internalFailed":`同期処理で分類できない内部エラーが発生しました。下の診断コードを添えて報告してください。`,"sync.failed":`同期できませんでした。何も上書きしていません。接続を確認してから、もう一度お試しください。`,"sync.localChanged":`確認後にこのマシンの設定が変更されました。上書きせずに停止しました。もう一度「変更を確認」からやり直してください。`,"sync.workspaceBusy":`別の処理がこのマシンの設定を更新しています。完了してから、もう一度お試しください。`,"sync.endpointPath":`エンドポイントはアカウントのアドレスだけです。バケット名やパスは含めません。バケット名は下の欄に入れてください。`,"sync.auto":`自動同期`,"sync.autoHint.both":`Vault が開いている間、1 分ごとにリモートの更新を確認します。このマシンの設定を変更した場合は、最後の変更から 5 秒後に一度だけ送信します。競合は自動解決せず、ファイルを削除する変更も自動適用しません。どちらの場合も自動同期を停止して通知します。`,"sync.autoHint.pull":`Vault が開いている間、1 分ごとにリモートの更新を確認します。このマシンの変更は送信しません。競合やファイルを削除する変更を見つけた場合は、自動受信を停止して通知します。`,"sync.autoHint.push":`Vault が開いている間、リモートが更新されていないか確認します。このマシンの設定を変更した場合は、最後の変更から 5 秒後に一度だけ送信します。リモートの内容は受信しません。`,"sync.autoEnable":`このマシンを自動で同期する`,"sync.autoIdle":`停止中`,"sync.autoLastRan":`最後に確認したのは {at} です。`,"sync.autoBlockedConflicts":`自動同期を停止しました。同じファイルがこのマシンと他のマシンの両方で変更されています。「変更を確認」で内容を比較してください。`,"sync.autoBlockedRemovals":`自動同期を停止しました。適用すると、このマシンからファイルが削除されます。「変更を確認」で対象を確認してください。`,"sync.autoBlockedRemoteMoved":`別のマシンがリモートスナップショットを変更したため、送信前に自動同期を停止しました。変更を取得するか、確認したリモートスナップショットを明示的に置き換えてください。`,"sync.autoBlockedRemoteMovedPull":`現在のリモートは、このマシンが最後に受信した履歴から分岐しています。意図しない巻き戻しを防ぐため、自動受信を停止しました。`,"sync.remoteHeadReviewHint":`受信専用では、現在のリモートを正として明示的に受信できます。作成日時・作成元・変更されるファイルを確認してから適用します。`,"sync.remoteHeadReview":`現在のリモートを確認`,"sync.checkRemoteChanges":`リモートの変更を確認`,"sync.remoteHeadPreviewHeading":`現在のリモートを受信`,"sync.remoteHeadPreview":`作成 {at}・作成元 {origin} のリモートを確認しています。適用時にも同じ世代であることを再確認し、途中で変わっていた場合は何も書き込みません。`,"sync.remoteHeadApply":`このリモートを受信`,"sync.autoBlockedRemoteDeleted":`以前同期した現在のスナップショットがバケットから削除されています。意図せず再作成または上書きしないよう、自動同期を停止しました。`,"sync.autoFailedLast":`前回はバケットに接続できませんでした。次回の自動同期で再試行します。`,"sync.autoFailedWrongKey":`このマシンの同期鍵ではリモートスナップショットを開けません。同じスナップショットの自動取得は再試行しません。`,"sync.autoFailedSchema":`リモートスナップショットの形式に対応していません。同じスナップショットの自動取得は再試行しません。`,"sync.autoFailed":`設定を保存できませんでした。`,"sync.autoNow":`今すぐ同期`,"sync.autoNow.both":`今すぐ同期`,"sync.autoNow.pull":`今すぐ受信`,"sync.autoNow.push":`今すぐ送信`,"sync.autoNowFailed":`その確認を実行できませんでした。`,"sync.transferHeading":`送信・変更確認`,"sync.transferHint.both":`このマシンの内容を送信するか、他のマシンの変更を確認してから適用します。`,"sync.transferHint.push":`このマシンの内容を送信します。リモートの内容はこのマシンへ適用しません。`,"sync.commitMessage":`コミットメッセージ`,"sync.commitMessagePlaceholder":`このスナップショットの変更内容`,"sync.commitMessageHint":`ローカル差分から自動生成します。手動送信前に編集できます。`,"sync.commitMessageChanges":`ローカル差分:追加 {added} 件 · 変更 {modified} 件 · 削除 {removed} 件`,"sync.commitMessageInvalid":`コミットメッセージは 240 文字以内の 1 行で入力してください。`,"sync.bucketStateHeading":`バケットの状態`,"sync.bucketStateHint":`暗号化された内容は取得せず、現在のスナップショットと日付付き履歴を S3 から直接確認します。画面表示中は 30 秒ごと、送受信後にも更新します。`,"sync.bucketRefresh":`バケットの状態を更新`,"sync.bucketNotConfigured":`バケットを設定すると状態を確認できます。`,"sync.bucketLoading":`バケットを確認しています…`,"sync.bucketStatusFailed":`バケットの状態を取得できませんでした。`,"sync.bucketLive":`現在のスナップショット`,"sync.bucketLiveEmpty":`バケットに現在のスナップショットはありません。`,"sync.bucketLocalCurrent":`このマシンは現在のリモートスナップショットを確認済みです。`,"sync.bucketLocalBehind":`リモートスナップショットが、このマシンで最後に確認した内容から更新されています。`,"sync.bucketHistory":`日付付き履歴 · {count} 件`,"sync.bucketHistoryShowing":`{count} 件のうち最新 {shown} 件を表示しています。`,"sync.bucketHistoryExpand":`すべての履歴を表示`,"sync.bucketHistoryCollapse":`最新 5 件だけ表示`,"sync.bucketObjectName":`S3 オブジェクト名を表示`,"sync.bucketHistoryTruncated":`最新 10,000 件を表示しています。これより古い履歴もバケットにあります。`,"sync.bucketHistoryEmpty":`日付付き履歴は見つかりませんでした。`,"sync.bucketObjectMeta":`{size}・更新 {at}`,"sync.bucketCheckedAt":`バケット確認時刻 {at}`,"sync.historyHeading":`暗号化された世代履歴`,"sync.historyHint":`このマシン上で最近の履歴を上限付きで復号し、コミットグラフとして表示します。ファイル内容はAPI応答へ出しません。`,"sync.historyRefresh":`世代履歴を更新`,"sync.historyNeedsKey":`共有暗号化キーを設定すると世代履歴を読めます。`,"sync.historyLoading":`最近の世代を復号しています…`,"sync.historyFailed":`暗号化されたバックアップ履歴を読み込めませんでした。`,"sync.historySummary":`{count} 世代 · 取得 {size}`,"sync.historyTruncated":`上限内の新しい履歴だけを復号しています。古い履歴ファイルは上のバケット一覧に残っています。`,"sync.historySkipped":`現在の形式または暗号化キーで開けない履歴ファイルを {count} 件スキップしました。`,"sync.historyTimeline":`世代タイムライン`,"sync.historyRelation.head":`HEAD`,"sync.historyRelation.ancestor":`祖先`,"sync.historyRelation.branch":`分岐`,"sync.historyRevisionMeta":`{at} · {count} ファイル · 作成元 {origin}`,"sync.historyParent":`親 {revision}`,"sync.historySelect":`世代を選ぶと、現在のリモート最新版との差分を確認できます。`,"sync.historySelected":`選択した世代`,"sync.historyDiffLoading":`パスの差分を確認しています…`,"sync.historyDiffEmpty":`この世代をもう一度選ぶとパスの差分を確認できます。`,"sync.historyDiffFailed":`選択した世代との差分を確認できませんでした。`,"sync.historyDiff.added":`追加 {count} 件`,"sync.historyDiff.modified":`変更 {count} 件`,"sync.historyDiff.removed":`削除 {count} 件`,"sync.historyRestoreHint":`復元前にローカルの変更内容を確認します。リモートの最新版は巻き戻さず、次の送信でこの世代を親にした新しい最新版を作ります。`,"sync.historyRestorePreview":`この世代の復元を確認`,"sync.forceHeading":`リモートスナップショットを置き換える`,"sync.forceHint":`読み取れない、または不要なスナップショットがあるバケットへ変更した場合に使います。このワークスペースを暗号化し、上に表示した現在のリモートスナップショットだけを置き換えます。確認後に内容が変わった場合は中止します。既存の日付付き履歴は削除しません。`,"sync.forceConfirm":`現在のリモートスナップショットを、このマシンのワークスペースで置き換えることを理解しました。`,"sync.forcePush":`リモートスナップショットを置き換える`,"sync.forcePushShort":`強制送信`,"sync.forcePull":`強制受信`,"sync.dialogClose":`閉じる`,"sync.forcePushed":`確認したリモートスナップショットを置き換えました。`,"sync.forceFailed":`リモートスナップショットを置き換えられませんでした。バケットの状態を更新し、もう一度確認してください。`,"sync.push":`このワークスペースを送信`,"sync.pushed":`ワークスペースを送信しました。`,"sync.pushFailed":`スナップショットを送信できませんでした。他のマシンがこのマシンの最終同期後に送信している場合は、先にその変更を取得してください。`,"sync.noLocalChanges":`送信するローカル変更はありません。`,"sync.remoteMoved":`別のマシンが最新のスナップショットを変更したため、再送信せず停止しました。先に変更を取得するか、確認したリモートスナップショットを明示的に置き換えてください。`,"sync.previewStale":`プレビュー後にリモートのスナップショットが変わりました。もう一度プレビューしてから適用してください。`,"sync.remoteDeleted":`適用前に現在のリモートスナップショットが削除されました。バケットの状態を更新してください。`,"sync.keyRecoveryRequired":`同期キーの置き換えが中断されました。同じ新しい同期キーをもう一度入力して復旧してください。`,"sync.keyRecoveryTargetChange":`中断された同期キーの置き換えを完了してから、バケットまたはパスを変更してください。`,"sync.keyHistoryLossConfirm":`過去の履歴スナップショットは以前のキーで暗号化されたままとなり、読み取れなくなることを理解しました。`,"sync.preview":`変更を確認`,"sync.pullFailed":`スナップショットを読み取れませんでした。`,"sync.alreadyMatches":`このワークスペースは既にスナップショットと一致しています。`,"sync.previewHeading":`取得した場合の変更`,"sync.conflictExplain":`これらのファイルは、このマシンと他のマシンの両方で変更されています。同じ設定ブロックを自動的に統合できないため、何も適用していません。設定ファイル画面で手動で統合するか、採用する内容を持つマシンから送信してください。`,"sync.conflictPermissions":`権限: 前回の同期 {base}・このマシン {local}・リモート {remote}`,"sync.keepMine":`このマシンの内容を残す`,"sync.takeTheirs":`他のマシンの内容を使用`,"sync.wouldWrite":`{count} 個のファイルが書き込まれます:`,"sync.wouldRemove":`{count} 個のファイルが削除されます:`,"sync.confirmOverwrite":`~/.ssh のファイルを上書きし、上記のファイルをこのマシンから削除します。変更対象は事前に ~/.ssh/sshc/backups/ へバックアップされ、履歴から復元できます。続行しますか?`,"sync.apply":`スナップショットを適用`,"sync.applied":`適用しました。この変更は履歴に残り、あとから取り消せます。`,"sync.applyFailed":`スナップショットを適用できませんでした。`,"sync.result.pushTitle":`今回の送信`,"sync.result.previewTitle":`受信内容の確認`,"sync.result.applyTitle":`適用結果`,"sync.result.previousTitle":`前回の成功`,"sync.result.filesSource":`{count} ファイル · {size}`,"sync.result.encrypted":`暗号化スナップショット {size}`,"sync.result.uploaded":`S3 転送 {size}({count} オブジェクト、履歴+現在版)`,"sync.result.previewDownload":`{downloaded} 取得 · 展開後 {source}`,"sync.result.applyDownload":`適用時に再取得 {size}`,"sync.result.changes":`書き込み {written} 件 · 削除 {removed} 件 · 競合 {conflicts} 件`,"sync.result.created":`スナップショット作成 {at}`,"sync.result.snapshotAt":`{at}のスナップショット`,"sync.result.appliedSnapshot":`{at}のスナップショットを適用`,"sync.result.completed":`操作完了 {at}`,"diag.heading":`Diagnostics`,"diag.pageDescription":`保存済みの接続先だけでなく、一時的に指定したホストも検査できます。検査を開始するまで接続しません。`,"diag.configUnreadable":`設定を読み取れませんでした。`,"diag.running":`選択した検査を実行しています…`,"diag.idle":`開始するまで、どの検査も実行されません。`,"diag.hostAlias":`Host alias`,"diag.needsAlias":`検査するには Host alias を入力してください。`,"diag.explain":`設定を解析`,"diag.explainFailed":`この接続の設定を解析できませんでした。`,"diag.checkReachability":`疎通を確認`,"diag.reachabilityFailed":`疎通確認を実行できませんでした。`,"diag.testAuthentication":`認証を確認`,"diag.authenticationFailed":`認証テストを実行できませんでした。`,"diag.configuration":`設定ファイル`,"diag.missingSuffix":`(存在しません)`,"diag.canRunCommand":`この接続には、OpenSSHがコマンドを実行する可能性のある設定があります`,"diag.directiveAt":`{keyword}({path}:{line})`,"diag.sourcesCaption":`各値の参照元。「不採用」と表示された行は、採用された行より後に読み込まれたため効果がありません。`,"diag.tableScrollHint":`横にスワイプするとすべての列を確認できます`,"diag.columnKeyword":`キーワード`,"diag.columnValue":`値`,"diag.columnWhere":`読み込み元`,"diag.columnCondition":`条件`,"diag.columnState":`状態`,"diag.inEffect":`有効`,"diag.superseded":`不採用`,"diag.route":`接続経路`,"diag.hopComplex":`このホップは alias だけで指定されていないため、接続先をここでは解決できません`,"diag.reachedThrough":`{parent} を経由`,"diag.notSimple":`この設定は簡易表示では解決できません`,"diag.notSimpleDetail":"sshc では各値の参照元だけを表示します。最終的な値は `ssh -G` で確認してください。","diag.inside":`{condition} の内側`,"diag.reachability":`疎通`,"diag.authentication":`認証`,"diag.authenticationMethod":`{method} で認証されました。`,"diag.forHost":`{host} の診断`,"kh.heading":`Known Hosts`,"kh.pageDescription":`信頼済みホスト鍵を確認し、接続先をスキャンして、known_hosts へ追加する前にフィンガープリントを検証します。`,"kh.metricEntries":`信頼済みエントリ`,"kh.metricHashed":`ハッシュ化ホスト`,"kh.metricCandidates":`スキャン候補`,"kh.scanHeading":`ホストをスキャン`,"kh.trustedHeading":`信頼済みホスト鍵`,"kh.columnHost":`ホスト`,"kh.columnType":`鍵種別`,"kh.columnFingerprint":`フィンガープリント`,"kh.columnTrust":`信頼状態`,"kh.columnActions":`操作`,"kh.unreadable":`known_hosts を読み取れませんでした。`,"kh.removeFailed":`エントリを削除できませんでした。何も変更していません。`,"kh.scanFailed":`このホストをスキャンできませんでした。`,"kh.addFailed":`鍵を追加できませんでした。何も変更していません。`,"kh.addFailedCode":`鍵を追加できませんでした({code})。何も変更していません。`,"kh.removed":`1 件のエントリを削除しました(履歴 ID:{id})。`,"kh.added":`{host} を追加しました(履歴 ID:{id})。`,"kh.search":`検索`,"kh.hashed":`(ハッシュ済み)`,"kh.delete":`削除`,"kh.confirmRemove":`{line} 行目({fingerprint})を削除しますか? 操作は履歴に記録され、バックアップも保存されます。`,"kh.confirmDelete":`削除を確定`,"kh.cancel":`キャンセル`,"kh.hostToScan":`スキャンするホスト`,"kh.scan":`スキャン`,"kh.scanCandidates":`スキャン候補`,"kh.unverified":`未検証`,"kh.add":`追加`,"kh.addHeading":`未検証のホスト鍵を追加`,"kh.addExplain":`{host} への接続時にこの鍵が提示されましたが、通信を傍受した第三者によって差し替えられた可能性があります。別の信頼できる経路で入手したフィンガープリントを入力するか、未検証の鍵を信頼するリスクを確認してください。`,"kh.expectedFingerprint":`別経路で確認したフィンガープリント`,"kh.acknowledge":`検証できていないリスクを理解したうえで、この鍵を信頼します`,"kh.addToKnownHosts":`known_hosts に追加`,"kh.fingerprintMismatch":`入力したフィンガープリントはこの鍵と一致しません。入力値:{typed}、スキャン結果:{scanned}。何も追加していません。`,"rk.heading":`Remote Keys`,"rk.pageDescription":`公開鍵をリモートアカウントへ登録する前に、authorized_keys へ追加する内容を確認します。`,"rk.waiting":`サーバーの応答を待っています…`,"rk.idle":`確認するまで、リモートホストへは何も送られません。`,"rk.added":`リモートの authorized_keys に鍵を追加しました。`,"rk.alreadyPresent":`鍵は既に存在したため、リモートのファイルはそのままです。`,"rk.valuesFromEngine":`sshc が設定を読んだ結果です(ssh は実行していません)`,"rk.valuesFromSshG":`OpenSSHがssh -Gで解決した結果です`,"rk.pickFromSsh":`~/.ssh から公開鍵を選ぶ`,"rk.typeInstead":`公開鍵を手動で入力`,"rk.hostAlias":`Host alias`,"rk.hostSearch":`接続先`,"rk.hostSearchPlaceholder":`ホストを検索、または alias を入力`,"rk.hostTypeHint":`上に Host alias を入力してください。保存済みの接続があればここに表示されます。`,"rk.hostsSelected":`{count} 件を選択中`,"rk.hostChoices":`接続先の候補`,"rk.selectMatches":`一致項目を選択`,"rk.clearSelection":`解除`,"rk.noHostMatches":`一致する接続先がありません`,"rk.chooseHost":`接続先を 1 件以上選択するか、Host alias を入力してください。`,"rk.publicKeyFile":`公開鍵ファイル`,"rk.publicKeyLine":`公開鍵の行`,"rk.showWhatWouldHappen":`登録内容を確認`,"rk.register":`鍵を登録`,"rk.registerMany":`{count} 台へ鍵を登録`,"rk.plannedHosts":`{count} 台の内容を確認済み`,"rk.planFailed":`登録内容を確認できませんでした。どのホストにも接続していません。`,"rk.registerFailed":`鍵は登録されませんでした。リモートホストはそのままです。`,"rk.publicKeyUnreadable":`その公開鍵を読み取れませんでした。どこにも接続していません。`,"rk.withCode":`{message}({code})`,"rk.confirmHeading":`リモート登録の確認`,"rk.confirmManyHeading":`{count} 台への登録内容を確認`,"rk.planFor":`{alias} への登録内容`,"rk.alias":`Alias`,"rk.effectiveUser":`接続ユーザー`,"rk.noUser":`設定にありません。ssh はローカルのアカウント名を使います`,"rk.destination":`接続先`,"rk.valuesCameFrom":`設定値の参照元`,"rk.keyFile":`公開鍵ファイル`,"rk.fingerprint":`フィンガープリント`,"rk.appendTo":`{hostname} の {account} にある {remotePath} へ、同じ行が存在しない場合のみ 1 行追加します。`,"rk.theRemoteAccount":`リモートアカウント`,"rk.usersAccount":`{user} のアカウント`,"rk.keyLineLabel":`追加する公開鍵の行`,"rk.remoteRuns":`リモートホストで次のコマンドを実行し、鍵を標準入力へ渡します:`,"rk.remoteCommandLabel":`リモートコマンド`,"rk.connectingRuns":`接続時にリモートコマンドが実行されます`,"rk.acknowledgeRuns":`実行されるリモートコマンドを確認しました`,"rk.manualHeading":`sshc からこのホストへ鍵を登録できません。次の手順を手動で実行してください:`,"rk.result":`結果`,"rk.someRegistrationsFailed":`更新できなかった接続先があります。接続先ごとの結果を確認してください。`,"explorer.loading":`設定ファイルを読み込んでいます…`,"explorer.pageTitle":`SSH Config`,"explorer.pageDescription":`Include の参照関係を確認し、OpenSSH の書式を維持したまま設定ファイルとワークスペース内のファイルを管理します。`,"explorer.metricFiles":`読み込んだファイル`,"explorer.metricEditable":`編集可能`,"explorer.metricDiagnostics":`診断`,"explorer.hierarchy":`Include 階層`,"explorer.externalFile":`このファイルは ~/.ssh の外にあります。読み取って表示するだけで、書き込みは行いません。`,"explorer.insideCondition":`{condition} の内側`,"explorer.fileState":`{missing}{loads}{editable}`,"explorer.missing":`存在しません · `,"explorer.readTimes":`{count} 回読まれます · `,"explorer.editable":`編集可能`,"explorer.readOnly":`読み取り専用`,"explorer.newFilePath":`新しいファイルのパス`,"explorer.workspaceActions":`ワークスペースのファイル`,"explorer.directoryHelp":`ファイルとディレクトリの操作`,"explorer.createFile":`ファイルを作成`,"explorer.createDirectory":`ディレクトリを作成`,"explorer.deleteDirectory":`ディレクトリを削除`,"explorer.directoryNote":`ディレクトリを作成・削除できます。削除できるのは空のディレクトリだけです。先に中のファイルを削除してください。ファイルを直接参照する Include 行も同時に更新されます。宣言済みグループはグループ画面で管理してください。`,"explorer.fileOperations":`このファイル`,"explorer.fileOperationsNote":`ファイル名を変更すると、このファイルを直接参照する Include 行も同時に書き換えます。ワイルドカードのパターンは変更せず、新しいパスが一致しない場合は警告します。`,"explorer.renameTo":`新しいパス`,"explorer.renameFile":`ファイル名を変更`,"explorer.deleteFile":`ファイルを削除`,"explorer.confirmDelete":`削除する`,"explorer.cancelDelete":`やめる`,"explorer.deleteIsRecoverable":`削除すると、このファイルを直接参照する Include 行も削除します。バックアップは保存されるため、履歴から復元できます。`,"explorer.saveOrDiscardFirst":`未保存の編集があります。リネームや削除の前に保存するか、ファイルを開き直してください。`,"explorer.newFileNote":`新しいファイルをOpenSSHに読み込ませるには、~/.ssh/configのIncludeから参照してください。接続をグループ間で移動するには、[Connections]を使用します。`,"explorer.diagnostics":`診断`,"explorer.noIncludeProblem":`Include の問題は検出されていません。`,"explorer.opened":`{path} の {line} 行目を開きました。`,"explorer.selectFile":`全文を編集するファイルを選んでください。`,"explorer.emptyHeading":`設定ファイルを選択`,"explorer.unsaved":`未保存の変更があります`,"explorer.fileText":`ファイル本文 — {path}。入力内容をそのまま書き戻します。`,"explorer.preview":`プレビュー`,"explorer.saveFile":`ファイルを保存`,"groups.loading":`グループを読み込んでいます…`,"groups.pageTitle":`Groups`,"groups.pageDescription":`接続と鍵を階層化して整理し、グループ単位で共通の SSH 設定を適用します。`,"groups.metricGroups":`グループ`,"groups.metricConnections":`Connections`,"groups.metricDraft":`未保存の下書き`,"groups.empty":`グループはまだありません。下のフォームから作成できます。`,"groups.nameTaken":`同名のグループが既に存在します。別の名前を指定してください。`,"groups.chooseGroupAndKeyword":`グループとディレクティブのキーワードを選んでください。`,"groups.unbalancedQuote":`値の引用符が対応していません。OpenSSH は引用符の中でエスケープを持たないため、これは保存できません。`,"groups.renameNeedsName":`名前を変更するには、新しい名前が必要です。`,"groups.renameCollides":`{name} は既に存在します。別の名前にするか、どちらか一方を削除してください。`,"groups.compileNote":`グループは {file} の中の通常の Host ブロックとして生成されます。OpenSSH は最初に読んだ値を保持するため、子グループを親より先に書き出します。`,"groups.members":`メンバー`,"groups.noMembers":`なし`,"groups.colour":`色`,"groups.clearColour":`{name} の色を消す`,"groups.renameTo":`{name} の新しい名前`,"groups.renameShort":`新しい名前`,"groups.rename":`{name} の名前を変更`,"groups.displayOrder":`表示順`,"groups.hide":`{name} を接続タブで非表示`,"groups.hideOnlyContainers":`このグループには直下の接続があります。非表示にするとその接続も見えなくなるため、先に子グループへ移してください。`,"groups.remove":`{name} を削除`,"groups.newName":`新しいグループ名`,"groups.invalidName":`グループ名は相対ディレクトリパスです。英数字とドット・ハイフン・アンダースコアをスラッシュで区切り、6 階層までにしてください。`,"groups.directoryNote":`グループはディレクトリとして保存されます。接続先は {connections}//、鍵は {keys}// に配置され、~/.ssh/config にはグループごとに Include 行が生成されます。読み込み順は glob の展開順に依存せず、設定ファイルに明示されます。`,"groups.howItWorks":`グループと SSH ファイルの仕組み`,"groups.directories":`{connections}/ · {keys}/`,"groups.nestingNote":`スラッシュで階層化できます。work/eu は work の子グループです。`,"groups.addChild":`{name} の中にグループを追加`,"groups.listLabel":`グループ一覧(親が先)`,"groups.orderNote":`ここでは親が先に来るツリー順で表示しています。Include 行は逆順(深い子グループが先)で書かれます。OpenSSH は最初に読んだ値を採用するため、子の設定を親より先に読ませる必要があるからです。`,"groups.removeInto":`{name} を削除`,"groups.removeIntoShort":`中の接続の移動先`,"groups.removeIntoNone":`グループなし(connections/ 直下)`,"groups.removeExplain":`{name} を削除すると、Include 行とグループ設定がなくなります。中の接続 {count} 件はどこかへ移す必要があります。`,"groups.removeExplainEmpty":`{name} を削除すると、Include 行とグループ設定がなくなります。中に接続はないので、移動するものはありません。`,"groups.removeKeepsFiles":`設定ファイルは 1 つも削除されません。1 回の変更として履歴に残るため、あとから元に戻せます。`,"groups.removeConfirm":`{name} を削除する`,"groups.removeCancel":`キャンセル`,"groups.unsaved":`未保存`,"groups.unsavedBarLabel":`未保存のグループ変更`,"groups.unsavedBarNote":`グループ追加と表示設定はまだ保存されていません。名前変更や削除の前に保存するか破棄してください。`,"groups.discard":`グループ変更を破棄`,"groups.saveDraftFirst":`保留中のグループ変更を保存または破棄してから、名前変更や削除を行ってください。`,"groups.savedNote":`未保存の変更はありません。色、表示順、グループ、設定の追加は「グループを保存」で反映されます。名前の変更と削除は実行時に即座に書き込まれます。`,"groups.immediateActions":`名前変更と削除は即座にディスクへ書き込みます。`,"groups.newGroupNote":`このグループのディレクトリはまだありません。保存時に作成され、それまでは名前変更・削除できません。`,"groups.addHeading":`グループを追加する`,"groups.add":`グループを追加`,"groups.settingHeadingFor":`{name} に設定を追加`,"groups.directive":`ディレクティブ`,"groups.value":`値`,"groups.addSetting":`設定を追加`,"groups.previewChanges":`グループ変更をプレビュー`,"groups.save":`グループを保存`,"tree.navLabel":`Connections`,"tree.ungrouped":`未分類`,"tree.arrangeBy":`接続の並べ方`,"tree.byGroups":`グループ`,"tree.byFiles":`ファイル`,"tree.groupFilter":`グループを選択`,"tree.groupSection":`{name} グループ(接続先 {count} 件)`,"tree.filter":`接続を絞り込む`,"tree.filterPlaceholder":`alias、パターン、グループ、タグ`,"tree.filterPlaceholderExpanded":`名前、接続先、ユーザー、グループ、タグを検索`,"tree.allConnections":`すべて`,"tree.resultsLabel":`接続先`,"tree.resultCount":`{visible} 件 / 全 {total} 件`,"tree.sortLabel":`接続の並び順`,"tree.sortConfigured":`設定順`,"tree.sortName":`名前順`,"tree.sortGroup":`グループ順`,"tree.noMatch":`この条件に一致する接続はありません。`,"tree.groupEmpty":`このグループに接続はありません。`,"tree.collapse":`{name} を折りたたむ`,"tree.expand":`{name} を展開する`,"tree.patternRuleExternal":`{path} のパターン規則です。このエディタはこのファイルを読み取るだけです。`,"tree.patternRuleOpen":`パターン規則 — 設定ファイル画面で開く({path}:{line})`,"tree.duplicateAlias":`alias 重複`,"tree.patternRule":`パターン規則`,"tree.dragGroupHint":`グループをドラッグすると、階層と表示順を変更できます。`,"browser.modeLabel":`接続の表示方法`,"browser.servers":`サーバー`,"browser.groups":`グループ`,"browser.groupPath":`グループの場所`,"browser.ungrouped":`未分類`,"browser.groupCountOne":`サーバー 1 台`,"browser.groupCountMany":`サーバー {count} 台`,"browser.noMatches":`現在の条件に一致するサーバーはありません。`,"browser.emptyGroup":`このグループ直下にサーバーはありません。`,"browser.emptyGroups":`宣言済みグループはまだありません。`,"browser.groupMissing":`グループが見つかりません。`,"browser.backToGroupRoot":`グループ一覧へ戻る`,"browser.invalidUrl":`この接続 URL は認識できません。`,"browser.backToServers":`サーバー一覧へ戻る`,"browser.duplicateAlias":`alias 重複`,"conn.loading":`接続を読み込んでいます…`,"conn.heading":`Connections`,"conn.count":`接続先 {count} 件`,"conn.new":`新しい接続`,"conn.resizeGroups":`グループ列の幅を変更`,"conn.resizeList":`接続一覧の幅を変更`,"conn.allConnections":`接続一覧`,"conn.createAnother":`接続を追加`,"conn.cancelCreate":`キャンセル`,"conn.create":`接続を作成`,"conn.createTitle":`接続を作成`,"conn.createDescription":`SSH 接続先の設定を保存し、認証方法を選択します。`,"conn.createConnectionSection":`接続先`,"conn.createName":`接続名`,"conn.createNameRequired":`接続名(必須)`,"conn.createGroup":`保存先グループ`,"conn.createManageGroups":`グループを管理`,"conn.createNoGroup":`グループなし`,"conn.createHostName":`ホスト名または IP アドレス`,"conn.createHostNameRequired":`ホスト名または IP アドレス(必須)`,"conn.createUser":`ユーザー(任意)`,"conn.createPort":`ポート(任意)`,"conn.createPortHint":`空欄の場合は 22 を使用します。`,"conn.createAuthenticationSection":`認証`,"conn.createAuthenticationMethod":`認証方法`,"conn.createDedicatedPassword":`この接続専用の暗号化パスワード`,"conn.createSavedPassword":`保存済みパスワード`,"conn.createNewSharedPassword":`新しい保存済みパスワード`,"conn.createIdentityFile":`SSH 秘密鍵`,"conn.createConnectionPassword":`接続パスワード`,"conn.createDedicatedHint":`Vault 内で暗号化され、再利用可能なパスワード一覧には表示されません。`,"conn.createChooseSavedPassword":`保存済みパスワード`,"conn.createSavedHint":`選択した再利用可能なパスワードをこの接続と共有します。`,"conn.createNoSavedPasswords":`保存済みパスワードはありません`,"conn.createSavedPasswordName":`保存するパスワードの名前`,"conn.createNewPassword":`新しいパスワード`,"conn.createPrivateKey":`SSH 秘密鍵`,"conn.createNoPrivateKeys":`利用できる秘密鍵がありません`,"conn.createNoPrivateKeysHint":`パスワードを使わない場合は、先に秘密鍵を作成してください。`,"conn.createCreatePrivateKey":`秘密鍵を作成`,"conn.createLoadingOptions":`認証の選択肢を読み込んでいます…`,"conn.createOptionsFailed":`認証の選択肢を読み込めませんでした。`,"conn.createMasterPassword":`マスターパスワード`,"conn.createConfirmMaster":`マスターパスワードの確認`,"conn.createInitialiseVault":`暗号化 Vault を作成`,"conn.createUnlockVault":`Vault を開く`,"conn.createVaultMissing":`この接続を保存する前に暗号化 Vault を作成してください。`,"conn.createVaultLocked":`この接続を保存する前に暗号化 Vault を開いてください。`,"conn.createVaultFailed":`暗号化 Vault を作成できませんでした。`,"conn.createUnlockFailed":`暗号化 Vault を開けませんでした。`,"conn.createNeedVault":`続行するには暗号化 Vault を開いてください。`,"conn.createNeedConnectionPassword":`続行するには接続パスワードを入力してください。`,"conn.createNeedSavedPassword":`続行するには保存済みパスワードを選んでください。`,"conn.createNeedSavedPasswordName":`続行するには保存名を入力してください。`,"conn.createNeedNewPassword":`続行するには新しいパスワードを入力してください。`,"conn.createNeedPrivateKey":`続行するには秘密鍵を選ぶか作成してください。`,"conn.createDraftWaiting":`{alias} の接続設定を編集中です。`,"conn.createUntitledDraft":`名前未設定の接続`,"conn.createReturnToDraft":`接続設定に戻る`,"conn.createAliasRequired":`接続名を入力してください。`,"conn.createAliasInvalid":`英数字、ピリオド、ハイフン、アンダースコアを使い、先頭は英数字にしてください。`,"conn.createHostRequired":`ホスト名または IP アドレスを入力してください。`,"conn.createHostInvalid":`DNS 名、IPv4 アドレス、または角括弧なしの IPv6 アドレスを入力してください。`,"conn.createUserInvalid":`ユーザーには空白や制御文字を含められません。`,"conn.createPortInvalid":`ポートは 1〜65535 の整数にしてください。`,"conn.creating":`作成しています…`,"conn.createFailed":`接続を作成できませんでした。`,"conn.createAliasTaken":`別の接続がすでにその名前を使っています。`,"conn.duplicateAliasTaken":`{alias} は既に存在するため複製できません。`,"conn.createGroupMissing":`そのグループは宣言されていません。再読み込みして別のグループを選んでください。`,"conn.createKeyInvalid":`その秘密鍵は利用できなくなりました。再読み込みして別の鍵を選んでください。`,"conn.createCredentialMissing":`その保存済みパスワードは利用できなくなりました。再読み込みして別のものを選んでください。`,"conn.createDestinationExists":`このグループには同名の接続ファイルがすでにあります。`,"conn.basicConnection":`接続先`,"conn.basicAuthentication":`認証`,"conn.basicHostName":`ホスト名または IP アドレス`,"conn.basicServerKeyInvalid":`その SSH 秘密鍵は選択できなくなりました。再読み込みして選び直してください。`,"conn.basicCredentialExists":`同じ名前の保存済みパスワードがあります。「保存済みパスワード」から選ぶか、別の名前を使ってください。`,"conn.basicCredentialMissing":`その保存済みパスワードは存在しなくなりました。再読み込みして選び直してください。`,"conn.basicPasswordMissing":`この接続には削除できる保存済みパスワードがありません。`,"conn.basicUser":`ユーザー`,"conn.basicPort":`ポート`,"conn.basicPrivateKey":`SSH 秘密鍵`,"conn.basicStoredPassword":`保存済みパスワード`,"conn.basicStoredTOTP":`ワンタイムパスワード(TOTP)`,"conn.basicThisConnection":`この接続に設定されています。`,"conn.basicInheritedFrom":`{path}:{line} から継承しています。`,"conn.basicSSHDefault":`SSH の既定値です。他の項目を保存しても、この値は書き込みません。`,"conn.basicReadOnlyAdvanced":`基本タブでは読み取り専用です。元のディレクティブは詳細タブに残っています。`,"conn.basicComplex":`この接続には {keyword} が複数あります。詳細タブで整理してください。`,"conn.basicUseInheritedHost":`ホスト名を継承値・既定値に戻す`,"conn.basicUseInheritedUser":`ユーザーを継承値・既定値に戻す`,"conn.basicUseInheritedPort":`ポートを継承値・既定値に戻す`,"conn.basicKeepDirect":`この接続の値を維持`,"conn.basicAgentOrInherited":`ssh-agent または継承した鍵`,"conn.basicManageKeyPassphrase":`鍵パスフレーズを保存・変更`,"conn.basicKeyPassphraseHeading":`保存済みの鍵パスフレーズ`,"conn.basicKeyPassphraseUnencrypted":`この秘密鍵は暗号化されていないため、保存するパスフレーズは不要です。`,"conn.basicKeyPassphraseNone":`この鍵にはパスフレーズが保存されていません。`,"conn.basicKeyPassphraseDedicated":`この鍵だけのパスフレーズが保存されています。`,"conn.basicKeyPassphraseShared":`この鍵は共有の保存済みパスフレーズ「{name}」を使っています。`,"conn.basicKeyPassphraseSharedOthers":`ほかに {count} 個の鍵でも使われています。`,"conn.basicKeyPassphraseDetach":`ここで保存すると、この鍵専用の値へ切り替わります。共有資格情報と、ほかの鍵への割り当ては変更しません。`,"conn.basicNewKeyPassphrase":`新しい保存用鍵パスフレーズ`,"conn.basicConfirmKeyPassphrase":`保存用鍵パスフレーズの確認`,"conn.basicKeyPassphraseMismatch":`鍵パスフレーズが一致しません。`,"conn.basicKeyPassphraseStoredNote":`秘密鍵の復号に使用するパスフレーズを保存します。秘密鍵ファイル自体を暗号化しているパスフレーズは変更しません。`,"conn.basicKeyPassphraseWrong":`入力したパスフレーズでは、選択した秘密鍵を解錠できません。`,"conn.basicKeyPassphraseChanged":`選択した秘密鍵が変更されました。再読み込みしてから保存してください。`,"conn.basicGeneratedKeyStaged":`{path} をこの接続の下書きに追加しました。「基本設定を保存」で反映します。`,"conn.basicCustomKey":`この接続は独自の IdentityFile パス {path} を使っています。詳細タブで編集してください。`,"conn.basicComplexKey":`この接続には IdentityFile が複数あります。詳細タブで整理してください。`,"conn.basicAssignedDedicated":`この接続専用のパスワードが割り当てられています。値は表示しません。`,"conn.basicAssignedNamed":`割り当て済み:{name}`,"conn.basicNoPassword":`保存済みパスワードは割り当てられていません。`,"conn.basicNoTOTP":`ワンタイムパスワードは割り当てられていません。`,"conn.basicAssignedTOTP":`割り当て済み:{name}`,"conn.basicRouteConfirmHeading":`保存済みの認証情報をこの経路で使いますか?`,"conn.basicRouteConfirmBody":`認証経路が変更されています。保存すると、割り当て済みのパスワードまたはワンタイムパスワードを現在の経路で使用できるようにします。`,"conn.basicRouteConfirmSave":`保存して再確認`,"conn.basicRouteConfirmCancel":`キャンセル`,"conn.basicTOTPAction":`ワンタイムパスワードの操作`,"conn.basicTOTPUnchanged":`割り当ては変更しない`,"conn.basicUseSavedTOTP":`保存済みTOTPを割り当てる`,"conn.basicRemoveTOTP":`TOTPの割り当てを外す`,"conn.basicChooseSavedTOTP":`保存済みTOTP`,"conn.basicNoSavedTOTPs":`Vaultに保存済みTOTPがありません`,"conn.basicTOTPNote":`TOTPの登録はVaultで行い、この接続先への割り当てはここで保存します。「Verification code」など、認証コードを明示的に求める入力欄にのみ自動入力します。`,"conn.basicPasswordCleanup":`保存済みパスワードが割り当てられていますが、現在の SSH 設定では使用されません。基本設定を保存すると、この接続への割り当てだけを解除します。保存済みパスワードと、ほかの接続への割り当ては変更しません。`,"conn.basicPasswordAction":`保存済みパスワードの操作`,"conn.basicPasswordUnchanged":`パスワードは変更しない`,"conn.basicReplaceDedicated":`この接続専用パスワードで置き換える`,"conn.basicRemovePassword":`保存済みパスワードを外す`,"conn.basicConfirmRemove":`保存済みパスワードを外すことを確認`,"conn.basicEmptyPasswordUnchanged":`空欄のままならパスワードを変更しません。`,"conn.basicVaultMissing":`基本設定を保存する前に暗号化 Vault を作成してください。`,"conn.basicVaultLocked":`基本設定を保存する前に暗号化 Vault を開いてください。`,"conn.basicNeedVault":`この下書きを保存するには暗号化 Vault を開いてください。`,"conn.basicPasswordBlocked":`現在の SSH 設定では、保存済みパスワードを追加・置換できません。`,"conn.basicNothingChanged":`基本設定はまだ変更されていません。`,"conn.basicOptionsFailed":`鍵とパスワードの選択肢を読み込めませんでした。`,"conn.basicCredentialOptionsFailed":`保存済みパスワードの選択肢を読み込めませんでした。`,"conn.basicSaveFailed":`基本設定を保存できませんでした。変更は行われていません。エラーを確認するか、再読み込みしてもう一度試してください。`,"conn.basicRefreshFailed":`設定は保存されましたが、更新後のパスワード状態を読み込めませんでした。この接続を再読み込みしてください。`,"conn.basicConnectionRefreshFailed":`設定は保存されましたが、更新後の接続を読み込めませんでした。この接続を再読み込みしてください。`,"conn.basicSave":`基本設定を保存`,"conn.basicSaving":`保存しています…`,"conn.discardChanges":`変更を破棄`,"conn.blockMoved":`このブロックはディスク上で移動しました。接続を読み込み直してもう一度試してください。`,"conn.emptyHeading":`接続を選択`,"conn.emptyHint":`一覧からホストを選んで SSH 設定を編集するか、新しい接続を作成してください。`,"conn.assignKeyHeading":`この鍵を使う接続を選択`,"conn.assignKeyHint":`接続を選ぶと {path} が基本設定の下書きに入ります。保存するまで変更はありません。`,"conn.missingHeading":`この接続は現在利用できません`,"conn.missingHint":`このリンクの作成後に、名前変更・移動・削除された可能性があります。`,"conn.backToList":`接続一覧へ戻る`,"conn.summarySaved":`保存済みの接続`,"conn.summarySavedState":`保存済み`,"conn.summaryUnsaved":`未保存の変更あり`,"conn.summaryGroup":`グループ`,"conn.summaryNoGroup":`グループなし`,"conn.summaryPrivateKey":`SSH 秘密鍵`,"conn.summaryKeyNone":`ssh-agent または継承した鍵`,"conn.summaryKeyComplex":`IdentityFile が複数あります`,"conn.summaryKeyUnavailable":`{path} — 鍵の詳細を確認できません`,"conn.summaryKeyPassphrase":`鍵パスフレーズ`,"conn.summaryKeyPassphraseNone":`パスフレーズは保存されていません`,"conn.summaryKeyPassphraseDedicated":`この鍵専用として保存済み`,"conn.summaryKeyPassphraseNamed":`保存済みパスフレーズ:{name}`,"conn.summaryKeyPassphraseNotNeeded":`暗号化されていない鍵のため不要`,"conn.summaryAccountPassword":`アカウントのパスワード`,"conn.summaryPasswordNone":`保存済みパスワードなし`,"conn.summaryPasswordDedicated":`この接続専用のパスワードを保存済み`,"conn.summaryPasswordNamed":`保存済みパスワード:{name}`,"conn.summaryPasswordRouteStale":`保存済みパスワードは停止中`,"conn.summaryPasswordCleanup":`保存済みパスワードが割り当てられていますが、現在の SSH 設定では使用されません。基本設定を保存すると、この接続への割り当てを解除します。`,"conn.summaryLocked":`施錠中のため確認できません`,"conn.summaryUnavailable":`この状態を読み込めませんでした`,"conn.summaryDraftBlocksActions":`下書きを保存または破棄してから、保存済みの接続を使用してください。`,"conn.summaryRefreshing":`保存済みの接続を再読み込みしています。完了後に操作できます。`,"conn.editorLabel":`接続エディタ`,"conn.areaBasic":`Basic`,"conn.areaAnalysis":`Analysis`,"conn.areaAdvanced":`Advanced`,"conn.areaSshc":`sshc`,"conn.checksLabel":`接続確認`,"conn.checkReachability":`疎通を確認`,"conn.checkAuthentication":`保存済み設定で認証を確認`,"conn.checking":`確認しています…`,"conn.checksExecutableHeading":`認証確認で SSH ディレクティブが実行される可能性があります`,"conn.checksExecutableHint":`認証確認を続ける前に、保存済みディレクティブの内容を確認してください。`,"conn.checksDirectiveAt":`{path}:{line} の {keyword}`,"conn.checksAcknowledge":`確認して認証を実行`,"conn.analysisLabel":`Config Analysis`,"conn.analysisExplained":`保存済み設定から解決した値`,"conn.analysisExplainedHint":`この接続で使用する値です。コマンドを実行せずに解析し、解決できない設定は理由を表示します。`,"conn.analysisAuthoritative":`各値の参照元`,"conn.analysisAuthoritativeHint":`この接続に関係する設定行を、ファイルと行番号、実際に採用されるかどうかとともに表示します。`,"conn.analysisRun":`出所を表示`,"conn.analysisRunning":`読み取っています…`,"conn.analysisExecutableHeading":`この接続には、OpenSSHがコマンドを実行する可能性のあるディレクティブがあります`,"conn.analysisTokenWarning":`OpenSSHは展開したトークンをシェル向けにエスケープしません。そのため、ホスト名、ポート、ユーザー名の値が、エスケープされないままコマンドを実行するシェルに渡る可能性があります。`,"conn.analysisSources":`この接続に関係する設定行`,"conn.advancedLabel":`詳細設定`,"conn.advancedViews":`詳細設定の表示`,"conn.advancedViewLabel":`表示`,"conn.advancedDirectives":`Directives`,"conn.portForwarding":`ポート転送`,"conn.forwardLoopbackOnly":`待ち受けはこの端末内(127.0.0.1)に限定しますが、同じ端末の別OSユーザーから利用される可能性があります。Remote Forward には対応しません。`,"conn.forwardNoneSaved":`この接続にはポート転送が保存されていません。`,"conn.forwardLocal":`Local トンネル`,"conn.forwardDynamic":`SOCKS プロキシ`,"conn.forwardType":`種類`,"conn.forwardListenPort":`ローカルポート`,"conn.forwardDestination":`転送先`,"conn.forwardDestinationHint":`SSH接続先から見たホスト名またはIPアドレスとポートです。`,"conn.forwardDynamicHint":`接続先は、このSOCKSプロキシを使うアプリが通信ごとに指定します。`,"conn.forwardAdd":`転送を追加`,"conn.forwardPendingSave":`変更を保存すると、この転送が設定へ書き込まれます。`,"conn.forwardInvalidPort":`1〜65535のローカルポートを入力してください。`,"conn.forwardInvalidDestination":`転送先を host:port の形式で入力してください。`,"conn.advancedNoFields":`現在の表示条件に一致する設定はありません。`,"conn.advancedRawBlocksFields":`Raw に未保存の変更があります。保存または破棄してからディレクティブを編集してください。`,"conn.advancedFieldsBlockRaw":`ディレクティブに未保存の変更があります。保存または破棄してから Raw を編集してください。`,"conn.connect":`接続`,"conn.opening":`接続中…`,"conn.duplicate":`接続を複製`,"conn.manage":`その他の接続操作`,"conn.manageLabel":`接続の管理`,"conn.manageIndependent":`ここでの操作は、基本設定・詳細設定の変更とは別に保存されます。`,"conn.manageDraftBlocked":`接続の識別情報や保存場所を変更する前に、編集中の下書きを保存または破棄してください。`,"conn.discardPrompt":`未保存の接続設定を破棄して、この接続から移動しますか?`,"conn.keepEditing":`編集を続ける`,"conn.reloadConnection":`保存済み接続を再読み込み`,"conn.moveToFile":`保存ファイル`,"conn.moveToFilePlaceholder":`保存ファイルを選択…`,"conn.move":`保存ファイルを変更`,"conn.storageFileNote":`所属グループは sshc 上の整理場所です。保存ファイルを変更すると、実際に書き込む SSH 設定ファイルが変わります。通常は変更する必要はありません。`,"conn.confirmDelete":`削除する`,"conn.deleteHeading":`{alias} を削除しますか?`,"conn.deleteBody":`この Host ブロックを設定から削除します。削除後も履歴から復元できます。`,"conn.deleteCancel":`やめる`,"conn.delete":`接続を削除`,"host.tabJump":`Jump Host`,"host.tabRaw":`Raw`,"host.unbalancedQuote":`値の引用符が対応していません。OpenSSH は引用符の中でエスケープを持たないため、これは保存できません。`,"host.needsKeyword":`ディレクティブにはキーワードが必要です。`,"host.dangerousField":`{keyword} は、OpenSSH がこのホストを評価するときにコマンドを実行する可能性があります。記述どおり保存され、ここで実行されることはありません。`,"host.keep":`戻す`,"host.remove":`削除`,"host.newDirective":`新しいディレクティブ`,"host.newValue":`新しい値`,"host.addDirective":`ディレクティブを追加`,"host.saveChanges":`変更を保存`,"host.blockText":`ブロック本文。コメント、空行、未知のディレクティブは入力したとおりに書き戻されます。`,"host.saveBlock":`ブロックを保存`,"host.noDestination":`この Host ブロックはパターンに一致する接続へ設定を適用するもので、単独では接続先を特定できません。診断するには、具体的な alias を持つ接続を開いてください。`,"host.primaryGroup":`所属グループ`,"host.groupNone":`なし`,"host.groupNoneMeans":`「なし」を選ぶと接続は ~/.ssh/config の末尾へ戻ります。`,"host.moveToGroup":`このグループへ移動`,"host.comment":`コメント`,"host.commentNote":`Host 行の上に設定ファイルへ書き込まれます。sshc を使わずにファイルを読む人にも残ります。`,"host.commentFromNote":`これは sshc だけが保存していたメモです。保存すると設定ファイルへ書き込まれ、メモは廃止されます。`,"host.saveComment":`コメントを保存`,"host.os":`OSアイコン`,"host.osAutomatic":`接続時に自動判定`,"host.osGeneric":`汎用サーバー`,"host.osUnknown":`OS未判定`,"host.osHint":`接続後にOSを判定します。手動でアイコンを選ぶこともできます。`,"host.colour":`色`,"host.clearColour":`色を消す`,"host.displayOrder":`表示順 — 小さいほど先に並びます。0 の場合はファイル内の順序を使用します。`,"host.tags":`タグ(カンマ区切り)`,"host.renameAlias":`alias の変更`,"host.rename":`変更`,"keys.heading":`SSH Keys`,"keys.pageDescription":`秘密鍵、公開鍵、証明書の一覧と参照元を確認し、作成・変更・削除を管理します。`,"keys.search":`鍵を検索`,"keys.searchPlaceholder":`ファイル、ホスト、フィンガープリント`,"keys.metricFiles":`確認済み SSH ファイル`,"keys.metricPrivate":`秘密鍵`,"keys.metricAttention":`確認が必要`,"keys.noMatches":`この検索に一致する鍵はありません。`,"keys.reading":`ssh ディレクトリを読み込んでいます…`,"keys.unreadable":`ssh ディレクトリを読み取れませんでした。sshc を再起動して、もう一度試してください。`,"keys.createFailed":`鍵を作成できませんでした。名前、アルゴリズム、パスフレーズを確認してください。`,"keys.passphraseFailed":`パスフレーズを変更できませんでした。現在のパスフレーズを確認して、もう一度試してください。`,"keys.agentFailed":`鍵を ssh-agent に追加できませんでした。パスフレーズと ssh-agent の接続状態を確認してください。`,"keys.publicKeyFailed":`公開鍵を読み取れませんでした。`,"keys.trashFailed":`鍵をゴミ箱へ移動できませんでした。`,"keys.restoreFailed":`エントリを復元できませんでした。`,"keys.restoreRefused":`次の理由により復元できません:{blockers}`,"keys.purgeFailed":`エントリを完全に削除できませんでした。`,"keys.tableCaption":`内容とファイル権限を確認した SSH ファイル`,"keys.inventoryEmpty":`~/.ssh にはまだファイルがありません。この画面から鍵を作成できます。`,"keys.colFile":`ファイル`,"keys.colKind":`種別`,"keys.kind.privateKey":`秘密鍵`,"keys.kind.publicKey":`公開鍵`,"keys.kind.certificate":`証明書`,"keys.kind.other":`その他のファイル`,"keys.kind.unreadable":`読み取り不可`,"keys.colAlgorithm":`アルゴリズム`,"keys.colFingerprint":`フィンガープリント`,"keys.colPermissions":`権限`,"keys.colUsedBy":`参照元`,"keys.colState":`状態`,"keys.stateInAgent":`ssh-agent に登録済み`,"keys.stateUsedBy":`{count} 件の接続で使用`,"keys.usedByNothing":`この鍵を参照する接続はありません`,"keys.inspectorLabel":`鍵の詳細`,"keys.colActions":`操作`,"keys.showDetails":`詳細を開く`,"keys.hideDetails":`詳細を閉じる`,"keys.actionsHeading":`{path} の操作`,"keys.keyActions":`鍵の操作`,"keys.permissionRisk":`ファイル権限が緩すぎます`,"keys.showPublicKey":`公開鍵を表示`,"keys.relatedPublicFiles":`公開鍵ファイル({count})`,"keys.showPrivateKey":`秘密鍵を表示`,"keys.changePassphrase":`パスフレーズを変更`,"keys.moreActions":`その他の操作`,"keys.manageStoredPassphrase":`保存済みパスフレーズを管理`,"keys.storedPassphraseHeading":`保存済みパスフレーズ:{path}`,"keys.storedPassphraseNote":`暗号化された鍵のパスフレーズを sshc Vault へ保存するか、既存の名前付きパスフレーズを割り当てます。値はマスターパスワードで暗号化され、保存後はこの画面に表示されません。`,"keys.newStoredPassphraseName":`パスフレーズ名`,"keys.newStoredPassphraseValue":`パスフレーズの値`,"keys.storeAndUsePassphrase":`保存してこの鍵に割り当てる`,"keys.storedPassphraseExists":`その名前はすでに存在します。上の一覧から選ぶか、新しい名前を指定してください。`,"keys.unassignPassphrase":`割り当てを解除`,"keys.storePassphraseFailed":`パスフレーズを保存し、この鍵へ割り当てることができませんでした。`,"keys.unassignPassphraseFailed":`この鍵への保存済みパスフレーズの割り当てを解除できませんでした。`,"keys.addToAgent":`ssh-agent に追加`,"keys.removeFromAgent":`ssh-agent から削除`,"keys.agentRemoveFailed":`ssh-agent から鍵を削除できませんでした。鍵がすでに削除されているか、削除に必要な公開鍵が存在しない可能性があります。`,"keys.trashConfirmHeading":`{path} をゴミ箱へ移動`,"keys.trashExplain":`同じ鍵に属するため、次のファイルをまとめて移動します:`,"keys.trashReferences":`{count} 件の Host ブロックがこの鍵を参照しています。移動後、その IdentityFile 行は存在しないファイルを参照します。ssh はエラーを表示した後、他の認証方法を試します。`,"keys.trashNoReferences":`この鍵を参照する Host ブロックはありません。`,"keys.trashIsRecoverable":`削除はされません。下のゴミ箱へ移動するだけで、復元できます。`,"keys.trashConfirm":`ゴミ箱へ移動する`,"keys.trashCancel":`やめる`,"keys.moveToTrash":`ゴミ箱へ移動`,"keys.publicKeyHeading":`公開鍵:{path}`,"keys.publicKeyLabel":`公開鍵`,"keys.close":`閉じる`,"keys.unreadableHeading":`内容を確認できなかったファイル`,"keys.unreadableNote":`これらは ~/.ssh の中にあり、上の表には含まれていません。これらに対して何も変更していません。`,"keys.unresolvedHeading":`存在しない鍵を指している設定エントリ`,"keys.agentHeading":`ssh-agent`,"keys.agentEmpty":`ssh-agent に接続できましたが、鍵は登録されていません。`,"keys.agentIdentitiesCaption":`ssh-agent に登録されている鍵`,"keys.colComment":`コメント`,"keys.agentUnavailable":`このプロセスから ssh-agent に接続できないため、鍵を登録できません。ssh-add コマンドと、接続先を示す SSH_AUTH_SOCK の両方が必要です。`,"keys.agentDelegationsNote":`次の設定エントリは、鍵ファイルではなく ssh-agent の鍵を使用します:`,"keys.registerHeading":`ssh-agent に追加:{path}`,"keys.registerNote":`パスフレーズは ssh-add の標準入力へ渡され、コマンドラインや子プロセスの環境変数には含まれません。sshc はパスフレーズを保存せず、この操作の完了後は保持しません。`,"keys.keyPassphrase":`鍵のパスフレーズ`,"keys.lifetime":`保持期間`,"keys.lifetimeForever":`ssh-agent が終了するまで`,"keys.lifetimeHour":`1 時間`,"keys.lifetimeFourHours":`4 時間`,"keys.lifetimeTwelveHours":`12 時間`,"keys.useStoredPassphrase":`保存済みのパスフレーズを使う`,"keys.choosePassphraseName":`— 名前を選ぶ —`,"keys.useThisPassphrase":`このパスフレーズを使う`,"keys.usesStoredPassphrase":`この鍵は保存済みパスフレーズ「{name}」を使用します。`,"keys.usesDedicatedPassphrase":`この鍵だけのパスフレーズが保存されています。`,"keys.typedWins":`空欄の場合は保存済みのパスフレーズを使用します。入力した値がある場合は、その値を使用します。`,"keys.assignPassphraseFailed":`この鍵に指定したパスフレーズを割り当てられませんでした。`,"keys.registerSubmit":`鍵を ssh-agent に追加`,"keys.cancel":`キャンセル`,"keys.passphraseHeading":`パスフレーズを変更:{path}`,"keys.passphraseNote":`ここで入力したパスフレーズは、この変更にのみ使用され、保存されません。sshc Vaultへ保存する場合は、鍵一覧の「保存済みパスフレーズを管理」を使用してください。`,"keys.currentPassphrase":`現在のパスフレーズ`,"keys.newPassphrase":`新しいパスフレーズ`,"keys.removePassphrase":`パスフレーズを削除する(秘密鍵は暗号化されなくなります)`,"keys.savePassphrase":`パスフレーズを変更`,"keys.createHeading":`鍵を作成`,"keys.generatedHeading":`鍵を作成しました`,"keys.generatedNext":`{path} を作成しました。次の操作を選んでください。`,"keys.assignGenerated":`接続に割り当てる`,"keys.installGenerated":`サーバーに公開鍵を登録`,"keys.algorithm":`アルゴリズム`,"keys.fileName":`ファイル名`,"keys.comment":`コメント`,"keys.passphrase":`パスフレーズ`,"keys.createUnencrypted":`パスフレーズなしで作成する(秘密鍵ファイルを読み取れるユーザーは、この鍵を使用できます)`,"keys.createSubmit":`鍵を作成`,"keys.showTerminalCommand":`Terminal コマンドを表示`,"keys.hardwareNote":`ハードウェアに保存する鍵の作成にはセキュリティキーの操作が必要なため、sshc では対応していません。次のコマンドをターミナルで実行してください:`,"keys.trashHeading":`ゴミ箱`,"keys.trashSummary":`ゴミ箱({count})`,"keys.trashNote":`ゴミ箱へ移動した鍵は、手動で完全削除するまで残ります。自動削除されません。`,"keys.trashCaption":`ゴミ箱内の鍵`,"keys.trashEmpty":`ゴミ箱は空です。`,"keys.colFiles":`ファイル`,"keys.colAge":`経過`,"keys.colStatus":`状態`,"keys.ageStale":`{days} 日 · 保持期間 {retention} 日を超過`,"keys.age":`{days} 日`,"keys.restorable":`復元可能`,"keys.restore":`復元`,"keys.purgeWarning":`これは取り消せません。完全に削除した鍵のバックアップはありません。`,"keys.confirmPurge":`完全削除を確定`,"keys.purge":`完全に削除`,"keys.noteFingerprintUnavailable":`フィンガープリントを取得できません`,"keys.noteSymbolicLink":`シンボリックリンク(追跡しません)`,"keys.noteEmptyFile":`空のファイル`,"keys.noteNotRegularFile":`通常ファイルではありません`,"keys.noteCommentNotPreserved":`コメントは保持されていません`,"keys.certKeyId":`Key ID:{keyId}`,"keys.certFor":`対象プリンシパル:{principals}`,"keys.certAnyPrincipal":`すべてのプリンシパルが対象`,"keys.certNeverExpires":`無期限`,"keys.certExpired":`{when} に失効`,"keys.certValidUntil":`{when} まで有効`,"keys.certSigns":`{keyType} {fingerprint} に署名`,"keys.reference":`{directive} {value} — {path}:{line}`,"keys.referenceWithReason":`{directive} {value} — {path}:{line}({reason})`,"keys.unreadableEntry":`{path} — {reason}`,"keys.colChoose":`選択`,"keys.chooseKey":`{path} を選ぶ`,"keys.listFilter":`一覧に表示するファイル`,"keys.listFilterKeys":`鍵だけ`,"keys.listFilterAll":`~/.ssh のすべてのファイル`,"keys.dragKey":`{path} をドラッグ`,"keys.chosenCount":`{count} 件を選択中`,"keys.moveTargetLabel":`移動先`,"keys.moveChosen":`移動`,"keys.clearChosen":`選択を解除`,"keys.moveMoved":`{count} 件を移しました。`,"keys.moveBlocked":`{path} は次の理由で移動できません:{reason}`,"keys.moveFailed":`{path} を移動できませんでした。`,"keys.folders":`フォルダ`,"keys.foldersLabel":`鍵のフォルダ`,"keys.folderRow":`{name}、{count} 件`,"keys.folderAll":`すべての鍵`,"keys.folderUngrouped":`グループなし`,"keys.relocate":`名前・グループを変更`,"keys.relocateHeading":`名前・グループの変更:{path}`,"keys.relocateNote":`名前またはグループを変更すると、鍵ファイルが移動します。この鍵を参照する IdentityFile と CertificateFile も同時に書き換えられるため、古いパスへの参照は残りません。`,"keys.relocateNewName":`名前`,"keys.relocateGroup":`グループ`,"keys.relocateSubmit":`鍵を改名・移動`,"keys.relocateFailed":`鍵を移動できませんでした。`,"keys.relocateDone":`{path} へ移動しました。`,"keys.relocateMoved":`移動したファイル`,"keys.relocateRewritten":`書き換えた設定行`,"keys.relocateSkipped":`鍵名と接尾辞から構成されたファイル名ではないため、次のファイルは移動しませんでした:{paths}`,"keys.relocateRefused":`次の理由により移動できませんでした。ファイルは変更していません:`,"keys.relocateFilePair":`{from} → {to}`,"keys.relocateReference":`{directive} {from} → {to} — {path}:{line}`,"keys.groupNone":`グループなし(~/.ssh 直下)`,"keys.createGroup":`グループ`,"keys.blockerTargetOccupied":`{detail} はすでに存在します`,"keys.blockerUnresolved":`{detail} は解決できないパスなので、この鍵を指している可能性があります`,"keys.blockerReferenceExternal":`{detail} は ~/.ssh の外にあるため書き換えられません`,"keys.blockerGroupNotDeclared":`グループ {detail} を宣言する Include 行がありません`,"keys.blockerDestinationIsConfig":`{detail} は Include によって設定ファイルとして読み込まれる場所です`,"keys.blockerStateDirectory":`{detail} は sshc の状態ディレクトリ内です`,"keys.blockerOther":`{detail}`}},i=[`en`,`ja`],a=`sshc.language`;function o(e){return typeof e==`string`&&i.includes(e)}function s(){try{let e=window.localStorage.getItem(a);if(o(e))return e}catch{}for(let e of navigator.languages??[navigator.language]){let t=e.split(`-`)[0];if(o(t))return t}return`en`}function c(e){try{window.localStorage.setItem(a,e)}catch{}}var l=t(),u=(0,n.createContext)(null);function d(e,t){return t===void 0?e:e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e)}function f({children:e,initial:t}){let[i,a]=(0,n.useState)(()=>t??s()),o=(0,n.useCallback)(e=>{a(e),c(e)},[]),f=(0,n.useMemo)(()=>{let e=r[i];return{locale:i,setLocale:o,t:(t,n)=>d(e[t]??r.en[t],n)}},[i,o]);return(0,l.jsx)(u.Provider,{value:f,children:e})}var p={locale:`en`,setLocale:()=>void 0,t:(e,t)=>d(r.en[e],t)};function m(){return(0,n.useContext)(u)??p}function h(){return m().t}var g=`w-full rounded-md border border-control-line bg-control px-2 py-1.5 text-sm text-ink placeholder:text-ink-faint focus:border-accent focus:outline-none disabled:border-line disabled:text-ink-faint`,_=g.replace(`w-full`,`w-40`),v=g.replace(`w-full`,`w-auto`),y=`whitespace-nowrap rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-accent-ink transition-[background-color,box-shadow,filter] duration-150 hover:brightness-110 active:brightness-95 disabled:cursor-not-allowed disabled:bg-line disabled:text-ink-faint`,b=`whitespace-nowrap rounded-md border border-control-line bg-card px-3 py-1.5 text-sm text-ink transition-colors duration-150 hover:border-accent/50 hover:bg-hover active:bg-select-fill disabled:cursor-not-allowed disabled:text-ink-faint`,x=`whitespace-nowrap rounded-md border border-control-line px-3 py-1.5 text-sm text-danger transition-colors duration-150 hover:border-danger/50 hover:bg-danger/10`,S=`text-xs font-medium tracking-wide text-ink-muted`,C=`text-xs text-ink-muted`,w=`flex flex-col gap-4 rounded-lg border border-line bg-card p-4`,T=`text-sm font-medium text-ink`,E=`border-b border-line text-xs uppercase tracking-wide text-ink-muted`,D=`py-2 pr-3 text-left font-medium`;function O({label:e,hint:t,error:r,children:i,interactiveChildren:a=!1}){let o=(0,n.useId)(),s=i;if(r!==void 0&&r!==``&&(0,n.isValidElement)(i)){let e=i;s=(0,n.cloneElement)(e,{"aria-describedby":[e.props[`aria-describedby`],o].filter(Boolean).join(` `),"aria-invalid":!0})}let c=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:S,children:e}),s]});return(0,l.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[a?(0,l.jsx)(`div`,{className:`flex flex-col gap-1`,children:c}):(0,l.jsx)(`label`,{className:`flex flex-col gap-1`,children:c}),t===void 0?null:(0,l.jsx)(`span`,{className:C,children:t}),r===void 0||r===``?null:(0,l.jsx)(`span`,{id:o,role:`alert`,className:`text-xs text-danger`,children:r})]})}function k({label:e,hint:t,checked:n,onChange:r,disabled:i=!1,tone:a=`default`,className:o=``}){return(0,l.jsxs)(`label`,{className:`flex items-start gap-2 text-sm ${a===`notice`?`text-notice-ink`:a===`danger`?`text-danger`:i?`text-ink-faint`:`text-ink`} ${o}`,children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:n,disabled:i,onChange:e=>r(e.target.checked),className:`mt-0.5 h-4 w-4 shrink-0 accent-accent`}),(0,l.jsxs)(`span`,{children:[e,t===void 0?null:(0,l.jsx)(`span`,{className:`block ${C}`,children:t})]})]})}export{h as _,x as a,_ as c,w as d,T as f,m as g,f as h,g as i,y as l,E as m,O as n,S as o,D as p,v as r,C as s,k as t,b as u,s as v,i as y}; \ No newline at end of file diff --git a/internal/ui/dist/assets/form-zbLY2cuV.js b/internal/ui/dist/assets/form-zbLY2cuV.js new file mode 100644 index 000000000..50bd6c5dc --- /dev/null +++ b/internal/ui/dist/assets/form-zbLY2cuV.js @@ -0,0 +1 @@ +import{a as e,o as t,r as n,t as r}from"./jsx-runtime-BOsSdQ68.js";var i=t(),a={en:{"shortcuts.heading":`Keyboard shortcuts`,"shortcuts.description":`Share shortcut presets and choose one for this browser.`,"shortcuts.confirmDelete":`Delete this preset on all synced devices?`,"shortcuts.deleteBody":`{name} is removed from every synced device and cannot be recovered.`,"shortcuts.deleteEverywhere":`Delete everywhere`,"shortcuts.cancelDelete":`Cancel`,"shortcuts.preset":`Preset for this browser`,"shortcuts.defaultPreset":`Default`,"shortcuts.presetName":`Preset name`,"shortcuts.duplicate":`Save a copy`,"shortcuts.rename":`Rename`,"shortcuts.delete":`Delete preset`,"shortcuts.reloadRequired":`Could not save or load presets. Reload to get the latest version before editing.`,"shortcuts.reload":`Reload`,"shortcuts.loading":`Loading presets…`,"shortcuts.hint":`Click a binding, then press a key with Ctrl, Alt or Meta (Command), or a function key. Escape cancels; Tab moves to the next control. Preset contents sync between devices; the selected preset stays in this browser. Editing Default creates your own preset. Deleting a selected preset restores defaults. Browser or OS shortcuts may take priority. Copy, paste and terminal search apply inside the terminal.`,"shortcuts.palette":`Command search`,"shortcuts.terminalSearch":`Terminal search`,"shortcuts.copy":`Copy selection`,"shortcuts.paste":`Paste`,"shortcuts.nextSession":`Next connection`,"shortcuts.previousSession":`Previous connection`,"shortcuts.home":`Open Home`,"shortcuts.sftp":`Open SFTP`,"shortcuts.assign":`Assign shortcut: {action}`,"shortcuts.clearAction":`Clear shortcut: {action}`,"shortcuts.clear":`Clear`,"shortcuts.recording":`Press keys… (Esc to cancel)`,"shortcuts.unassigned":`Unassigned`,"shortcuts.reset":`Restore defaults`,"shortcuts.saved":`Shortcuts saved.`,"shortcuts.saveFailed":`Could not save. Reload the presets and check the connection and browser storage permissions.`,"shortcuts.conflict":`Already assigned to {action}. Clear that binding first.`,"shell.title":`sshc`,"shell.starting":`Starting secure local session…`,"shell.vaultChecking":`Checking that the vault is still unlocked before restoring protected content…`,"shell.vaultCheckRetrying":`The vault state could not be confirmed. Protected content remains hidden while sshc retries.`,"shell.active":`Local session active · {version}`,"shell.bootstrapFailed":`Secure local session could not be started. Run sshc in a terminal to enrol this browser again.`,"shell.bootstrapRetry":`Try again`,"shell.sessionEndedHeading":`Session ended`,"shell.sessionEnded":`Reload to recover the local session automatically. If this browser is no longer enrolled, run sshc in a terminal once.`,"shell.sessionReload":`Reload session`,"shell.pageNotFound":`Page not found`,"shell.pageNotFoundDescription":`No sshc section exists at this URL.`,"shell.goHome":`Go to Home`,"shell.primaryNavigation":`Primary`,"shell.navigationToggle":`Navigation`,"shell.navigationResize":`Resize navigation`,"shell.sessions":`Sessions`,"shell.navStart":`Start`,"shell.navConnections":`Connection files`,"shell.navKeysHosts":`Keys and hosts`,"shell.navVault":`Vault`,"shell.navMaintenance":`Maintenance`,"menu.open":`Open {section}`,"menu.displaySettings":`Preferences`,"menu.theme":`Theme`,"menu.language":`Language`,"shell.inspectorShowNamed":`Show {label}`,"shell.inspectorHideNamed":`Hide {label}`,"shell.inspectorAttention":`Needs attention`,"palette.open":`Search everything`,"palette.heading":`Search sessions, hosts, files, snippets and settings`,"palette.placeholder":`Search sessions, hosts, files, snippets and settings`,"palette.results":`Search results`,"palette.loading":`Loading searchable items…`,"palette.empty":`No matching items`,"palette.hint":`↑↓ Select · Enter Open · Esc Close`,"palette.connectHost":`Connect to {alias}`,"palette.openHostSettings":`Open connection settings for {alias}`,"palette.openSection":`Open section`,"palette.kind.session":`Session`,"palette.kind.host":`Host`,"palette.kind.file":`File`,"palette.kind.snippet":`Snippet`,"palette.kind.setting":`Setting`,"palette.kind.command":`Action`,"palette.newConnection":`Create a connection`,"palette.newConnectionDetail":`Open the new connection form`,"palette.openRemoteFiles":`Open remote files`,"palette.openRemoteFilesDetail":`Browse a host over SFTP`,"palette.openLocalShell":`Open a local shell`,"palette.openLocalShellDetail":`Start a terminal on this machine`,"palette.lockVault":`Lock the vault`,"palette.lockVaultDetail":`Require the master password again`,"table.sortAscending":`, sort ascending`,"table.sortDescending":`, sort descending`,"section.files":`SFTP`,"section.snippets":`Snippets`,"sftp.heading":`Remote files`,"sftp.tabs":`Remote file tabs`,"sftp.primaryTabs":`Left pane tabs`,"sftp.secondaryTabs":`Right pane tabs`,"sftp.newTab":`New tab`,"sftp.closeTab":`Close the {name} tab`,"sftp.resizePanes":`Resize the panes`,"sftp.dropTabLeft":`Open in a new left pane`,"sftp.dropTabRight":`Open in a new right pane`,"sftp.dropTabHere":`Move to this pane`,"sftp.firstPane":`First remote pane`,"sftp.secondPane":`Second remote pane`,"sftp.local.heading":`Local files`,"sftp.local.connection":`Local`,"sftp.local.engine":`sshc engine`,"sftp.local.path":`Local folder path`,"sftp.local.editPath":`Edit local path`,"sftp.local.pathInput":`Engine filesystem path`,"sftp.local.upload":`Upload selection`,"sftp.local.loading":`Reading the local directory…`,"sftp.local.dropZone":`Local file list and drop zone`,"sftp.local.connectRemote":`Connect the remote pane to upload files.`,"sftp.host":`Host`,"sftp.noHosts":`No saved hosts`,"sftp.chooseHost":`Select a host`,"sftp.chooseHostHint":`Choose Local or a saved SSH host. Connect after choosing an SSH host.`,"sftp.connect":`Connect`,"sftp.connecting":`Connecting to {alias}…`,"sftp.readyToConnect":`{alias} is disconnected`,"sftp.connectHint":`SFTP does not connect just because you opened the screen or restored a saved tab.`,"sftp.loading":`Reading the remote directory…`,"sftp.retry":`Try again`,"sftp.emptyDirectory":`This directory is empty.`,"sftp.noFilterMatches":`Nothing here matches the filter.`,"sftp.clearFilterHint":`Clear the filter to see every entry again.`,"sftp.undo":`Undo`,"sftp.dismissUndo":`Dismiss undo notification`,"sftp.renamedTo":`Renamed to {name}.`,"sftp.permissionsChanged":`Permissions set to {mode}.`,"sftp.leaveHeading":`Leave without saving?`,"sftp.leaveBody":`{path} has changes that are not written to the server.`,"sftp.leaveDiscard":`Discard and leave`,"sftp.leaveStay":`Keep editing`,"sftp.chooseHostHeading":`Choose a connection`,"sftp.closeHostPicker":`Close host picker`,"sftp.searchHosts":`Search connections`,"sftp.searchHostsPlaceholder":`Search aliases, groups, hosts or users`,"sftp.hostViews":`Host list view`,"sftp.recentHosts":`Recent`,"sftp.hostGroups":`Groups`,"sftp.ungroupedHosts":`No group`,"sftp.noHostMatches":`No host matches this search.`,"sftp.hostNoDetails":`SSH host`,"sftp.hostCurrent":`Current`,"sftp.lastConnected":`Last connected {at}`,"sftp.connectionFailed":`Could not connect.`,"sftp.path":`Remote path`,"sftp.editPath":`Edit path`,"sftp.go":`Go`,"sftp.navigation":`Directory navigation`,"sftp.back":`Back`,"sftp.forward":`Forward`,"sftp.homeDirectory":`Home directory`,"sftp.rootDirectory":`Root directory`,"sftp.filter":`Filter entries`,"sftp.filterPlaceholder":`Filter`,"sftp.searchBelow":`Search everything under this directory`,"sftp.searchResults":`{count} matches for “{query}” under {path}`,"sftp.searchResultsTruncated":`First {count} matches for “{query}” under {path}; the search stopped early.`,"sftp.searchNoMatches":`Nothing under this directory is named like “{query}”.`,"sftp.searchEnd":`Leave search`,"sftp.revealInFolder":`Go to containing folder`,"sftp.up":`Up`,"sftp.parentDirectory":`Parent directory`,"sftp.createActions":`Create or upload`,"sftp.noSelectionActions":`Select an item to see actions`,"sftp.selectedActions":`Actions for {name}`,"sftp.selectedActionsCount":`Actions for {count} selected items`,"sftp.selected":`Selected: {name}`,"sftp.selectedCount":`{count} selected`,"sftp.selectedCountSize":`{count} selected · {size}`,"sftp.selectAll":`Select all entries`,"sftp.selectEntry":`Select {name}`,"sftp.clearSelection":`Clear selection`,"sftp.invertSelection":`Invert selection`,"sftp.copyName":`Copy name`,"sftp.copyNames":`Copy names`,"sftp.copyPath":`Copy full path`,"sftp.copyPaths":`Copy full paths`,"sftp.openFolder":`Open folder`,"sftp.editFile":`Edit file`,"sftp.newFolder":`New folder`,"sftp.newFile":`New empty file`,"sftp.duplicate":`Duplicate`,"sftp.moveTo":`Move to folder`,"sftp.move":`Move`,"sftp.upload":`Upload`,"sftp.uploadFolder":`Upload folder`,"sftp.dropZone":`Upload files or folders to the current remote directory`,"sftp.uploads":`File uploads`,"sftp.upload.pending":`Waiting`,"sftp.upload.queued":`Queued`,"sftp.upload.uploading":`Uploading…`,"sftp.upload.paused":`Paused`,"sftp.upload.reattach":`Select the same file to resume`,"sftp.upload.needs_overwrite":`Overwrite confirmation required`,"sftp.upload.done":`Uploaded`,"sftp.upload.failed":`Failed`,"sftp.upload.skipped":`Skipped`,"sftp.upload.cancelled":`Cancelled`,"sftp.cancelTransfer":`Cancel transfer`,"sftp.activeTransfers":`{count} active`,"sftp.transfer.pause":`Pause`,"sftp.transfer.resume":`Resume`,"sftp.transfer.clear":`Clear finished`,"sftp.manager.heading":`Transfer Manager`,"sftp.manager.summaryRunning":`{count} active · {progress}% · {speed}/s`,"sftp.manager.summaryIdle":`{count} transfers`,"sftp.manager.actions":`Transfer queue actions`,"sftp.manager.concurrency":`Concurrent transfers`,"sftp.manager.autoClear":`Clear finished after`,"sftp.manager.autoClearOff":`Keep`,"sftp.manager.largeFileThreshold":`Split at`,"sftp.manager.largeFileParallelism":`Streams`,"sftp.manager.largeFileChunk":`Chunk`,"sftp.manager.stopProcessing":`Stop starting new transfers`,"sftp.manager.startProcessing":`Resume processing the transfer queue`,"sftp.manager.status.held":`Held`,"sftp.manager.resize":`Drag to resize the transfer queue`,"sftp.manager.moveUp":`Move {name} earlier in the queue`,"sftp.manager.moveDown":`Move {name} later in the queue`,"sftp.manager.collapse":`Collapse Transfer Manager`,"sftp.manager.expand":`Expand Transfer Manager`,"sftp.manager.pauseAll":`Pause all`,"sftp.manager.resumeAll":`Resume all`,"sftp.manager.cancelAll":`Cancel all`,"sftp.manager.clearFailed":`Remove failed transfers from the list`,"sftp.manager.remove":`Remove from list`,"sftp.manager.controlChanged":`The transfer state changed. The list has been refreshed.`,"sftp.manager.cleanupFailed":`The remote temporary file could not be removed. Check the connection and try again.`,"sftp.manager.controlFailed":`The transfer could not be controlled. Check the connection and try again.`,"sftp.manager.dismissError":`Dismiss error`,"sftp.manager.items":`Transfer files`,"sftp.manager.file":`File`,"sftp.manager.folder":`Folder`,"sftp.manager.upload":`Upload`,"sftp.manager.download":`Download`,"sftp.manager.remaining":`{duration} left`,"sftp.manager.retry":`Retry`,"sftp.manager.retryFailed":`Retry failed transfers ({count})`,"sftp.manager.status.queued":`Queued`,"sftp.manager.status.running":`Transferring…`,"sftp.manager.status.paused":`Paused`,"sftp.manager.status.reattach":`Select the same file`,"sftp.manager.status.needs_overwrite":`Confirm overwrite`,"sftp.manager.status.reconcile":`Check the destination`,"sftp.manager.status.completed":`Completed`,"sftp.manager.status.failed":`Failed`,"sftp.manager.status.cancelled":`Cancelled`,"sftp.notice.heading":`Transfer notifications`,"sftp.notice.completed":`{direction} completed: {name}`,"sftp.notice.failed":`{direction} failed: {name} ({problem})`,"sftp.notice.dismiss":`Dismiss notification`,"sftp.download":`Download`,"sftp.downloads":`Downloads`,"sftp.download.downloading":`Downloading…`,"sftp.download.done":`Downloaded`,"sftp.download.failed":`Failed`,"sftp.download.cancelled":`Cancelled`,"sftp.name":`Name`,"sftp.size":`Size`,"sftp.linkTarget":`Points to`,"sftp.brokenLink":`{target} (not found)`,"sftp.calculating":`Calculating…`,"sftp.partialSizePrefix":`At least `,"sftp.sizeUnavailable":`Unavailable`,"sftp.containedFiles":`Files inside`,"sftp.containedDirectories":`Folders inside`,"sftp.type":`Type`,"sftp.type.file":`File`,"sftp.type.directory":`Folder`,"sftp.type.symlink":`Symlink`,"sftp.type.other":`Other`,"sftp.modified":`Modified`,"sftp.permissions":`Permissions`,"sftp.revision":`Revision`,"sftp.details":`Details`,"sftp.detailsFor":`Details for {name}`,"sftp.detailsForCount":`Details for {count} selected items`,"sftp.preview":`Preview`,"sftp.properties":`Properties`,"sftp.previewLoading":`Loading preview…`,"sftp.previewUnavailable":`This file cannot be previewed here.`,"sftp.previewTruncated":`Only the beginning of this file is shown.`,"sftp.selectedItems":`Selected items`,"sftp.totalSize":`Total size`,"sftp.actions":`Actions`,"sftp.entries":`File list`,"sftp.rename":`Rename`,"sftp.delete":`Delete`,"sftp.refreshDirectory":`Refresh directory`,"sftp.deleteContentsWarning":`Folders and everything inside them will be deleted.`,"sftp.manager.delete":`Deleting`,"sftp.chmod":`Change permissions`,"sftp.chmodRecursive":`Change permissions recursively`,"sftp.chmodPrompt":`Permissions (octal, for example 640)`,"sftp.chmodInvalid":`Enter three octal digits from 000 to 777.`,"sftp.overwriteHeading":`Overwrite this remote file?`,"sftp.overwrite":`Overwrite`,"sftp.skip":`Skip`,"sftp.cancel":`Cancel`,"sftp.remoteDropTitle":`Transfer remote items`,"sftp.remoteDropDescription":`Transfer {count} item(s) to {alias}. Data is transferred directly between the two SFTP connections.`,"sftp.remoteDropInvalid":`This remote drag could not be read.`,"sftp.copyHere":`Copy here`,"sftp.moveHere":`Move here`,"sftp.openTerminalHere":`Open Terminal here`,"sftp.compare.action":`Compare`,"sftp.compare.heading":`Compare directories`,"sftp.compare.description":`Copy selected differences in either direction. Items that exist only on the destination are not deleted.`,"sftp.compare.loading":`Comparing both directory trees…`,"sftp.compare.noChanges":`The two directories have matching metadata.`,"sftp.compare.status":`Difference`,"sftp.compare.same":`Same`,"sftp.compare.different":`Changed`,"sftp.compare.left_only":`Left only`,"sftp.compare.right_only":`Right only`,"sftp.compare.type_mismatch":`Different type`,"sftp.compare.leftToRight":`Copy left → right`,"sftp.compare.rightToLeft":`Copy right → left`,"sftp.save":`Save`,"sftp.close":`Close`,"sftp.editorEmpty":`Select a UTF-8 text file to edit it here.`,"sftp.editorLoading":`Loading editor…`,"sftp.unsaved":`Unsaved`,"sftp.unsavedBlocked":`Save or close the edited file before navigating.`,"sftp.conflict":`The remote file changed. Reload it before saving again.`,"sftp.binaryHint":`This is not a UTF-8 text file. Download it instead.`,"sftp.tooLargeHint":`Files larger than 2 MiB can be downloaded but not edited.`,"sftp.mkdirPrompt":`Folder name`,"sftp.newFilePrompt":`File name`,"sftp.moveToPrompt":`Destination folder`,"sftp.pathAbsolute":`Enter an absolute path beginning with /.`,"sftp.renamePrompt":`New name`,"sftp.nameRequired":`Enter a name.`,"sftp.nameInvalid":`A name cannot contain a slash.`,"sftp.renameUnchanged":`Enter a different name.`,"sftp.deleteHeading":`Delete this remote entry?`,"sftp.deleteHeadingCount":`Delete {count} remote entries?`,"sftp.deleteFailedCount":`Could not delete {count} selected entries.`,"workspace.saved":`Choose a saved layout`,"workspace.new":`New saved layout`,"workspace.save":`Save with a name`,"workspace.reopen":`Open this layout`,"workspace.delete":`Delete`,"workspace.deleteHeading":`Delete {name}?`,"workspace.deleteBody":`The saved layout cannot be recovered. Open sessions stay open.`,"workspace.confirmDelete":`Delete it`,"workspace.detachPane":`Remove from workspace`,"workspace.live":`Live workspace`,"workspace.mobilePaneSwitcher":`Workspace terminals`,"workspace.oneLiveOnly":`Finish or dissolve the current live workspace before creating another one.`,"workspace.dock.left":`Place on the left`,"workspace.dock.right":`Place on the right`,"workspace.dock.top":`Place above`,"workspace.dock.bottom":`Place below`,"workspace.groupCount":`{count} sessions`,"workspace.rename":`Rename workspace`,"workspace.renameLabel":`New name for {name}`,"workspace.rowMenu":`Actions for {name}`,"workspace.expandGroup":`Show terminals in {name}`,"workspace.collapseGroup":`Hide terminals in {name}`,"workspace.resizeSplit":`Resize split`,"workspace.focusMode":`Focus {alias}`,"workspace.exitFocusMode":`Exit focus mode`,"workspace.movePane":`Move {alias} pane. Select it, then choose another pane to exchange positions.`,"workspace.movePanePicked":`{alias} selected. Choose another pane to exchange positions.`,"workspace.reconnecting":`Reconnect this pane to continue.`,"workspace.maxPanes":`A screen can contain up to {count} terminals.`,"workspace.namePrompt":`Saved layout name`,"workspace.nameRequired":`Enter a saved layout name.`,"workspace.saveConfirm":`Save layout`,"workspace.cancel":`Cancel`,"workspace.savedLayouts":`Saved layouts`,"workspace.actions":`Workspace actions`,"workspace.savedDescription":`Save SSH targets, local shells, and split ratios with a name, then recreate them later as new sessions. Each layout supports up to {count} terminals.`,"workspace.broadcastCommand":`Send command…`,"workspace.broadcastHeading":`Send to connected terminals`,"workspace.broadcastDescription":`Review a command or snippet, then send it to each connected terminal's current input.`,"workspace.commandClose":`Close command delivery`,"workspace.commandSource":`Command source`,"workspace.adHocCommand":`Ad-hoc command`,"workspace.savedSnippet":`Saved snippet`,"workspace.command":`Command`,"workspace.chooseSnippet":`Choose a snippet`,"workspace.useDefault":`Use default`,"workspace.targetMode":`Connected terminals`,"workspace.targetCount":`{count} targets`,"workspace.paneNumber":`Pane {number}`,"workspace.targetSkipped":`Not sent ({state})`,"workspace.executionNotice":`The command and Enter are sent to each terminal's current input, preserving its working directory, environment, and shell state. Partially typed input or a running foreground process may receive the text instead of a shell prompt.`,"workspace.previewHeading":`Review terminal input`,"workspace.sendTargets":`Send to {count} terminals`,"workspace.deliveryResults":`Delivery results`,"workspace.deliveryNotice":`Command output appears in each terminal. Delivery does not mean the command has finished.`,"workspace.delivered":`Sent`,"workspace.deliveryFailed":`Not sent`,"snippets.heading":`Snippets`,"snippets.new":`New`,"snippets.empty":`No snippets have been saved.`,"snippets.name":`Name`,"snippets.description":`Description`,"snippets.command":`Command`,"snippets.variableHint":`Use {{name}} placeholders. Values are reviewed before execution.`,"snippets.variableType":`Variable type`,"snippets.variableType.string":`String`,"snippets.variableType.integer":`Integer`,"snippets.variableType.boolean":`Boolean`,"snippets.variableType.secret":`Secret`,"snippets.variableType.unknown":`Unknown type`,"snippets.value":`Value`,"snippets.save":`Save`,"snippets.delete":`Delete`,"snippets.deleteHeading":`Delete {name}?`,"snippets.deleteBody":`The snippet is removed for every target host and cannot be recovered.`,"snippets.confirmDelete":`Delete it`,"snippets.deleteCancel":`Cancel`,"snippets.targets":`Target hosts`,"snippets.preview":`Preview execution`,"snippets.confirm":`Review exact commands`,"snippets.run":`Run on these hosts`,"snippets.results":`Results`,"snippets.status.running":`Running`,"snippets.status.completed":`Completed`,"snippets.status.cancelled":`Cancelled`,"snippets.status.queued":`Queued`,"snippets.status.succeeded":`Succeeded`,"snippets.status.failed":`Failed`,"snippets.status.unknown":`Status unavailable`,"snippets.cancel":`Cancel`,"snippets.startup":`Connection startup`,"snippets.startupHint":`Run this snippet after the selected host's shell is ready. It is sent on every connection and automatic reconnection, so secret variable values are stored encrypted with the binding and may remain in the remote shell history or on screen.`,"snippets.setStartup":`Set startup snippet`,"snippets.clearStartup":`Clear`,"host.duplicateKeyword":`A previous line in this block uses the same keyword. OpenSSH keeps the first one.`,"terminal.consoleList":`Open sessions`,"terminal.noSessions":`No session is open.`,"terminal.openShell":`Local shell`,"terminal.newSession":`New session`,"terminal.rowDetail":`{status} · {destination}`,"terminal.connecting":`connecting`,"terminal.connected":`connected`,"terminal.longCommandCompleted":`A command in {subject} finished after {seconds} seconds.`,"terminal.unreadNotification":`Unread notification`,"terminal.notificationFallback":`A program in this terminal sent a notification.`,"terminal.unreadWorkspace":`This workspace has an unread terminal notification`,"terminal.browserNotificationsHeading":`Notifications`,"terminal.browserNotificationsDefault":`Allow sshc to notify you when a program in a terminal asks for attention (for example a coding agent waiting for input) or a file transfer completes while this tab is in the background.`,"terminal.browserNotificationsGranted":`Browser notifications are allowed. sshc only sends them while this tab is in the background.`,"terminal.browserNotificationsDenied":`Notifications are blocked for sshc. Allow them in this site's browser settings to enable terminal and file transfer notifications.`,"terminal.browserNotificationsUnsupported":`This browser does not support web notifications.`,"terminal.browserNotificationsEnable":`Enable notifications`,"terminal.browserNotificationsTest":`Send test notification`,"terminal.browserNotificationsEnabled":`Notifications enabled`,"terminal.browserNotificationsReady":`Terminal and transfer notifications are ready.`,"terminal.browserNotificationsRequestFailed":`Notification permission could not be requested.`,"terminal.browserNotificationsDeliveryFailed":`The browser allowed notifications but could not display one.`,"terminal.notificationSound":`Notification sound`,"terminal.notificationSoundHint":`Played when a terminal program sends a notification (OSC 9, 99 or 777) while this tab is in the background. Stored only in this browser.`,"terminal.notificationPreviewSound":`Play the notification sound`,"terminal.notificationSound.none":`No sound`,"terminal.notificationSound.gentle":`Gentle`,"terminal.notificationSound.bell":`Bell`,"terminal.notificationSound.pulse":`Pulse`,"terminal.notificationPreview":`Play`,"terminal.notificationVolume":`Notification volume`,"terminal.notificationVolumeHint":`{volume}%`,"terminal.quickCommands":`Quick Commands`,"terminal.quickCommandsClose":`Close Quick Commands`,"terminal.quickCommandInsert":`Insert`,"terminal.quickCommandRun":`Run`,"terminal.quickCommandCopy":`Copy`,"terminal.quickCommandSaveSelection":`Save selection as snippet`,"terminal.quickCommandName":`Snippet name`,"terminal.quickCommandSave":`Save snippet`,"terminal.quickCommandSaved":`Snippet saved.`,"terminal.quickCommandContextWarning":`Insert and Run send text to the pane's current input. Partially typed text or a foreground prompt—including a password or passphrase prompt—may receive it.`,"terminal.quickCommandChanged":`The snippet or pane changed. Review the updated preview before continuing.`,"terminal.quickCommandInsertUnsafe":`Commands with line breaks or control characters cannot be inserted without running them. Use Run or Copy instead.`,"terminal.linkActions":`Terminal link actions`,"terminal.linkOpenBrowser":`Open in browser`,"terminal.linkBrowseSFTP":`Browse in SFTP`,"terminal.linkEditSFTP":`Edit with SFTP`,"terminal.linkDownloadSFTP":`Download with SFTP`,"terminal.linkCopy":`Copy link`,"sftp.linkTargetInvalid":`This terminal link is no longer available.`,"sftp.linkTargetNotFound":`The remote path no longer exists.`,"sftp.linkTargetNotFile":`The remote path is not a file.`,"terminal.progressDialing":`connecting to {target} · {position}`,"terminal.progressHostKey":`checking the host key for {target} · {position}`,"terminal.progressAuthenticating":`authenticating with {target} · {position}`,"terminal.progressAuthenticated":`authenticated with {target} · {position}`,"terminal.progressOpeningSession":`opening the session · {position}`,"terminal.reconnectingAttempt":`reconnecting {attempt}/{limit}`,"terminal.exitedWith":`exited {code}`,"terminal.localhost":`localhost`,"terminal.emptyHeading":`No session is open`,"terminal.emptyHint":`Open one from the list on the left, or press Connect on a host.`,"terminal.forwardLocal":`forwarding {listen} → {to}`,"terminal.forwardDynamic":`SOCKS5 proxy on {listen}`,"terminal.forwardAgent":`forwarding the SSH agent to the remote host`,"terminal.rowMenu":`Actions for {title}`,"terminal.rename":`Rename`,"terminal.unpinTitle":`Use automatic name`,"terminal.renameLabel":`New name for {title}`,"terminal.renameFailed":`The session could not be renamed.`,"terminal.duplicate":`Duplicate this connection`,"terminal.moveUp":`Move up`,"terminal.moveDown":`Move down`,"terminal.closeSession":`Close {title}`,"terminal.closeHeading":`Close {title}?`,"terminal.closeBody":`This ends the connection. Running processes and visible output will be lost.`,"terminal.closeForwards":`This also closes {count} port forward(s) for the session.`,"terminal.closeConfirm":`Close`,"terminal.closeCancel":`Keep it open`,"desktop.closeAllHeading2":`Close {count} open session(s)?`,"desktop.closeAllBody":`This ends every connection. Running processes and visible output will be lost.`,"desktop.closeAllConfirm":`Close them all`,"desktop.closeAllCancel":`Keep them open`,"terminal.limitReached":`The limit of {max} open sessions has been reached. Close one to open another.`,"terminal.limitRefused":`No more sessions can be opened. Close one first.`,"terminal.unresolvable":`The settings for this connection could not be resolved. Open Analysis to see why.`,"terminal.jumpDepthExceeded":`The ProxyJump chain exceeds the supported depth.`,"terminal.hostKeyUnknown":`The host key is not trusted yet. Connect interactively after reviewing it.`,"terminal.hostKeyChanged":`The host key changed. Review Known Hosts before connecting again.`,"terminal.hostKeyRevoked":`The host key is marked as revoked and cannot be used.`,"terminal.identityUnavailable":`No usable identity or SSH agent key is available.`,"terminal.authenticationUnavailable":`No supported authentication method is available for this connection.`,"terminal.authenticationCancelled":`Authentication was cancelled.`,"terminal.keyPassphraseRequired":`The private key needs a passphrase. Unlock the Vault or save the correct passphrase for this key.`,"terminal.reconnectFailed":`The reconnect attempt failed. sshc will retry within the configured limit.`,"terminal.reconnectExhausted":`The reconnect limit was reached. Open a new connection when the network is ready.`,"terminal.manualReconnect":`Reconnect`,"terminal.stopReconnect":`Stop reconnecting`,"terminal.reconnectStopped":`Automatic reconnection was stopped. Reconnect when you are ready.`,"terminal.notReconnecting":`This session is not waiting to reconnect.`,"terminal.manualReconnecting":`Connecting…`,"terminal.manualReconnectFailed":`The SSH session could not be reconnected. Check the connection settings and network, then try again.`,"terminal.openFailed":`The terminal could not be opened.`,"terminal.keyBar":`On-screen keys`,"terminal.extraKeys":`Extra keys`,"shell.mobileNavigation":`Quick navigation`,"sftp.mobile.actions":`Folder actions`,"sftp.mobile.search":`Search files`,"sftp.manager.settings":`Transfer settings`,"sftp.manager.close":`Close Transfer Manager`,"terminal.closeFailed":`The session could not be closed.`,"terminal.linkConnecting":`Connecting…`,"terminal.linkRetrying":`Connecting… (attempt {attempt})`,"terminal.linkWaiting":`The connection dropped. Attempt {attempt} in {seconds}s.`,"terminal.linkStopped":`Retrying has stopped. The session is still available; reconnect whenever you are ready.`,"terminal.linkGone":`The session no longer exists, so it cannot be reconnected.`,"terminal.linkNow":`Connect now`,"terminal.linkStop":`Stop retrying`,"terminal.replayTruncated":`Some output produced while the terminal link was offline is no longer in the engine replay buffer.`,"terminal.clipboardRefused":`The clipboard could not be accessed.`,"terminal.pasteHeading":`Review paste to {target}`,"terminal.pasteDescription":`Review this paste before anything is sent. Logical line count: {lines}.`,"terminal.pasteRiskLineBreak":`Line breaks can run one or more commands immediately.`,"terminal.pasteRiskControl":`Terminal control characters can change terminal state or input.`,"terminal.pastePreview":`Paste preview with control characters made visible`,"terminal.pastePreviewTruncated":`The preview is truncated. The action still applies to the complete paste.`,"terminal.pasteNotSent":`Nothing has been sent to the terminal yet.`,"terminal.pasteCancel":`Cancel`,"terminal.pasteWithoutFinalLineBreak":`Paste without final Enter`,"terminal.pasteEdit":`Edit paste`,"terminal.pasteSend":`Paste`,"terminal.search":`Find`,"terminal.searchInput":`Search terminal output`,"terminal.searchPlaceholder":`Search scrollback…`,"terminal.searchNoResults":`No results`,"terminal.searchPrevious":`Previous match`,"terminal.searchNext":`Next match`,"terminal.searchClose":`Close search`,"terminal.searchCaseSensitive":`Match case`,"terminal.searchRegex":`Use regular expression`,"terminal.searchInvalidRegex":`Invalid`,"terminal.copyContext":`Copy recent terminal context`,"terminal.copyContextHint":`Copy up to the latest 200 terminal rows without control sequences`,"terminal.copyContextDone":`Recent terminal context copied.`,"terminal.copyContextEmpty":`There is no terminal context to copy.`,"terminal.osc52Hint":`Allow this terminal session to write to the system clipboard via OSC 52`,"terminal.osc52Enabled":`OSC 52 clipboard writes are allowed for this terminal session.`,"terminal.osc52Disabled":`OSC 52 clipboard writes are blocked.`,"terminal.osc52Copied":`The remote application copied text to the system clipboard.`,"terminal.moreActions":`More terminal actions`,"terminal.portForwarding":`Port forwarding`,"terminal.openDirectoryInSFTP":`Open current directory in SFTP`,"terminal.forwardDescription":`Manage tunnels using the active SSH connection to {title}.`,"terminal.forwardClose":`Close`,"terminal.forwardActive":`Active forwarding`,"terminal.forwardNone":`No forwarding is active on this connection.`,"terminal.forwardTemporary":`This session`,"terminal.forwardSaved":`Saved`,"terminal.forwardSavedStopHint":`Stopping it here does not remove it from the connection settings.`,"terminal.forwardRetryHint":`Fix the local port conflict, then reconnect this SSH session to retry the saved forwarding.`,"terminal.forwardAgentLabel":`SSH agent`,"terminal.forwardCopy":`Copy address`,"terminal.forwardCopied":`The address was copied.`,"terminal.forwardCopyFailed":`The address could not be copied.`,"terminal.forwardStop":`Stop`,"terminal.forwardStopping":`Stopping…`,"terminal.forwardStopped":`The forwarding was stopped.`,"terminal.forwardNew":`Start port forwarding`,"terminal.forwardSaveConnection":`Save to this connection`,"terminal.forwardSaveHint":`The forwarding will start now and be restored the next time this connection opens.`,"terminal.forwardSaveUnavailable":`A local shell or an unsaved connection cannot store this setting.`,"terminal.forwardNeedsConnection":`Reconnect this SSH session before starting a forwarding.`,"terminal.forwardStart":`Start`,"terminal.forwardStarting":`Starting…`,"terminal.forwardStarted":`The forwarding is active for this session.`,"terminal.forwardStartedAndSaved":`The forwarding is active and was saved to the connection.`,"terminal.forwardPausedReconnect":`Forwarding listeners are unavailable while this SSH connection is reconnecting.`,"terminal.forwardBindFailed":`The local port could not be opened: {detail}`,"terminal.forwardUnavailable":`This SSH connection cannot change forwarding in its current state.`,"terminal.forwardInvalid":`Check the forwarding type, port, and destination.`,"terminal.forwardSaveFailed":`The forwarding started, but it could not be saved to the connection.`,"terminal.forwardFailed":`The forwarding operation could not be completed.`,"terminal.settingsHeading":`Terminal`,"terminal.settingsSaved":`Saved. Clipboard settings apply immediately; other settings apply to newly opened terminals.`,"terminal.settingsLoading":`Loading terminal settings…`,"terminal.settingsStorageHint":`These settings, including terminal appearance, are stored in workspace metadata and included in backups and sync. Theme, language and notification sounds are stored only in this browser.`,"terminal.maxSessionsLabel":`Sessions open at once`,"terminal.maxSessionsHint":`Enter a value from 1 to 200. Leave it empty to use 50. When the limit is reached, no new session can be opened; existing sessions remain open.`,"terminal.scrollbackLabel":`Engine replay buffer (bytes)`,"terminal.scrollbackHint":`Output retained by the engine for browser reconnects. Enter 16384–4194304; blank uses 262144 bytes (256 KiB). It stays in memory and is not written to disk.`,"terminal.browserScrollbackLabel":`Browser scrollback (lines)`,"terminal.browserScrollbackHint":`Lines kept by each browser terminal. Enter 1000–100000; blank uses 5000. Larger values consume more browser memory.`,"terminal.localShellProfileLabel":`Default local shell`,"terminal.localShellProfileHint":`Choose from executables detected and verified on this machine. A shell can also be chosen once when opening a local terminal.`,"terminal.localShellProfileSystem":`System login shell`,"terminal.osc52DefaultLabel":`Allow OSC 52 clipboard writes by default`,"terminal.osc52DefaultHint":`Local shells use this setting. Each SSH connection can inherit, allow, or deny it in sshc settings.`,"terminal.jisYenBackslashLabel":`Send the JIS ¥ key as backslash`,"terminal.jisYenBackslashHint":`Useful with Japanese keyboards. IME composition is not modified.`,"terminal.fontSizeLabel":`Font size`,"terminal.paletteLabel":`Colour scheme`,"terminal.verbosityLabel":`Connection log`,"terminal.verbosityHint":`Displays diagnostics available to sshc, including connection stages, authentication methods and saved-TOTP availability. Applies to new connections and never prints secret values.`,"terminal.verbosityQuiet":`None`,"terminal.verbosityBrief":`Basic details (-v)`,"terminal.verbosityDetailed":`Keys, hops and timings (-vv)`,"terminal.verbosityFull":`Everything (-vvv)`,"terminal.reconnectLabel":`Reconnect after a dropped connection`,"terminal.reconnectHint":`Number of reconnection attempts after an unexpected disconnect. Retries use 1, 2, 5, 10, and 15 second base delays with jitter, so five attempts take up to 40 seconds. A session you close manually is not reconnected.`,"terminal.reconnectDefault":`Default (5 attempts, up to 40 seconds)`,"terminal.reconnectNever":`Do not reconnect`,"terminal.reconnectOnce":`Once (up to 2 seconds)`,"terminal.reconnectTwice":`Twice (up to 4 seconds)`,"terminal.reconnectThrice":`Three times (up to 10 seconds)`,"terminal.reconnectFive":`Five times (up to 40 seconds)`,"engine.heading":`Engine`,"engine.portLabel":`Port`,"engine.portHint":`Leave this empty to use a device-local stable port (initially 54447). A stable port keeps bookmarks and the installed web app working. Applies the next time the engine starts.`,"engine.portOutOfRange":`The port must be between 1024 and 65535.`,"engine.loading":`Loading engine settings…`,"engine.saved":`Saved. Auto-lock applies now; a port change applies the next time the engine starts.`,"engine.saveFailed":`The engine setting could not be saved.`,"engine.vaultAutoLockLabel":`Vault auto-lock`,"engine.vaultAutoLockHint":`Lock the Vault after no saved credential or key passphrase has been used for this long. Status checks, terminal output, and background sync do not extend the timer.`,"engine.vaultAutoLockIdle":`Lock after inactivity`,"engine.vaultAutoLockRestart":`Do not auto-lock`,"engine.vaultAutoLockValue":`Time`,"engine.vaultAutoLockUnit":`Unit`,"engine.vaultAutoLockMinutes":`Minutes`,"engine.vaultAutoLockHours":`Hours`,"engine.vaultAutoLockOutOfRange":`Enter a whole number from 1 to 999 for the auto-lock time.`,"engine.vaultAutoLockRestartWarning":`The Vault will not lock automatically. Unless you lock it manually, it remains unlocked until sshc is restarted. Use this setting only on a device you control.`,"terminal.fontLabel":`Font family`,"terminal.backgroundLabel":`Background image`,"terminal.backgroundHint":`Images are stored in your workspace and included in backups and sync.`,"terminal.backgroundNone":`No image`,"terminal.backgroundFollowsOverall":`Use the overall setting`,"terminal.backgroundAdd":`Add an image`,"terminal.backgroundChoose":`Change`,"terminal.backgroundClear":`Clear`,"terminal.backgroundNotSelected":`No background image is selected`,"terminal.backgroundLibrary":`Background image library`,"terminal.backgroundClose":`Close`,"terminal.backgroundSearch":`Search images`,"terminal.backgroundEmpty":`No saved images`,"terminal.backgroundEmptyHint":`Add an image to choose it here.`,"terminal.backgroundActions":`Actions for {name}`,"terminal.backgroundRenameAction":`Rename`,"terminal.backgroundDeleteAction":`Delete`,"terminal.backgroundDeleteHeading":`Delete background image?`,"terminal.backgroundDeleteHint":`Delete {name} and clear settings that use it. This cannot be undone.`,"terminal.backgroundUse":`Use this image`,"terminal.backgroundUseNone":`Select no image`,"terminal.backgroundCapacityHeading":`Storage capacity`,"terminal.backgroundCapacityUsage":`{used} of {capacity} used`,"terminal.backgroundCapacityLabel":`Limit`,"terminal.backgroundCapacitySave":`Save limit`,"terminal.backgroundCapacityHint":`1–1024 MiB; the default is 16 MiB. Lowering the limit does not delete existing images. You are responsible for storage and sync costs.`,"terminal.backgroundCapacityInvalid":`Enter a whole number from 1 to 1024 MiB.`,"terminal.backgroundCapacityFailed":`The storage capacity could not be changed.`,"terminal.backgroundRenameHeading":`Rename background image`,"terminal.backgroundRenameHint":`The extension is selected from the image type. Saved Terminal settings are updated to use the new name.`,"terminal.backgroundRenameLabel":`New file name`,"terminal.backgroundRenameSubmit":`Rename`,"terminal.backgroundRenameCancel":`Cancel`,"terminal.backgroundRenameRequired":`Enter a file name.`,"terminal.backgroundRenameExists":`A background image with that name already exists.`,"terminal.backgroundRenameFailed":`The background image could not be renamed.`,"terminal.backgroundTooLarge":`The image exceeds the maximum file size.`,"terminal.backgroundsFull":`There is no room left for another image.`,"terminal.backgroundNotAnImage":`The selected file is not a supported image.`,"terminal.backgroundFailed":`The image could not be stored.`,"terminal.tintLabel":`Image overlay opacity`,"terminal.tintHint":`Increase the opacity to darken the image and improve text readability.`,"connection.backgroundLabel":`Terminal background image`,"connection.backgroundHint":`Only this connection's terminals use it.`,"terminal.fontHint":`JetBrains Mono ships with the application.`,"terminal.fontFollowsSystem":`Use the device's monospace font`,"terminal.fontFollowsOverall":`Use the overall setting`,"connection.fontLabel":`Terminal font family`,"connection.fontHint":`Only this connection's terminals use it.`,"terminal.paletteHint":`Applies to terminals without a custom colour scheme.`,"terminal.paletteFollowsTheme":`Follow the application theme`,"terminal.paletteFollowsOverall":`Use the overall setting`,"connection.paletteLabel":`Terminal colour scheme`,"connection.paletteHint":`Only this connection's terminals use it.`,"connection.encodingLabel":`Remote text encoding`,"connection.encodingHint":`Used by this connection in the browser terminal and by sshc on the command line.`,"connection.encodingUTF8":`UTF-8 (default)`,"connection.encodingShiftJIS":`Shift_JIS (Japanese)`,"connection.encodingEUCJP":`EUC-JP (Japanese)`,"connection.encodingISO2022JP":`ISO-2022-JP (Japanese)`,"connection.osc52Label":`OSC 52 clipboard`,"connection.osc52Hint":`Choose whether remote applications on this SSH connection may write to the system clipboard.`,"connection.osc52Inherit":`Use terminal default`,"connection.osc52Allow":`Allow for this connection`,"connection.osc52Deny":`Block for this connection`,"terminal.fontSizeHint":`Enter a font size in pixels. Leave this blank to use 15 on narrow screens or 13 on other screens.`,"terminal.copyOnSelectLabel":`Copy selected text automatically`,"terminal.copyOnSelectHint":`Copies once when you finish selecting. Turn this off if selections should not replace the system clipboard.`,"terminal.rightClickPasteLabel":`Paste with right click`,"terminal.rightClickPasteHint":`Uses terminal bracketed paste when supported. Turn this off to keep the normal context menu.`,"terminal.webglLabel":`Use WebGL rendering`,"terminal.webglHint":`Uses GPU rendering for smoother output. Turn this off if characters are duplicated or leave visual traces.`,"terminal.limitsOutOfRange":`Those numbers are outside the range this build accepts.`,"terminal.startLabel":`Starting directory`,"terminal.startHint":`Directory in which local shells start. Enter ~/work or an absolute path. The ~ is stored without expansion, so the same setting can be used on another machine. Leave this empty to use your home directory.`,"terminal.startSave":`Save`,"terminal.startMissing":`The specified directory does not exist.`,"terminal.startNotADirectory":`The specified path is not a directory.`,"terminal.startUnusable":`Write the path as ~/something or as an absolute path.`,"terminal.settingsSaveFailed":`The terminal settings could not be saved.`,"terminal.screenLabel":`Terminal for {title}`,"terminal.exitedWithCode":`The program exited with status {code}. The output above is kept until you close this session.`,"terminal.exitedWithSignal":`The program was ended by {signal}. The output above is kept until you close this session.`,"inspector.appOnly":`sshc-only settings`,"inspector.groupLabel":`Group display settings`,"inspector.hostSavesImmediately":`Changes here are saved immediately.`,"inspector.groupChangesStaged":`Changes here are staged until you choose Save groups.`,"inspector.notices":`Notices`,"inspector.inherited":`Inherited values`,"inspector.noNotices":`Nothing to report for this connection.`,"inspector.noInherited":`All values for this connection are defined in its own block.`,"shell.language":`Lang`,"shell.languageMenu":`Lang menu`,"shell.languageEnglish":`English`,"shell.languageJapanese":`日本語`,"shell.theme":`Appearance`,"shell.themeMenu":`Theme menu`,"shell.themeSystem":`System`,"shell.themeLight":`Light`,"shell.themeDark":`Dark`,"section.home":`Home`,"section.license":`License`,"menu.others":`Others`,"license.description":`Licenses and copyright notices for sshc and its components. Full texts are available offline.`,"license.search":`Search components or licenses`,"license.count":`Components: {count}`,"license.noMatches":`No matching components.`,"section.menu":`Menu`,"section.connections":`Connections`,"section.terminal":`Terminal`,"section.config":`Config`,"section.groups":`Groups`,"section.keys":`Keys`,"section.knownHosts":`Known Hosts`,"section.remoteKeys":`Install Key on Server`,"section.diagnostics":`Ad hoc checks`,"section.settings":`Settings`,"settings.heading":`Settings`,"settings.pageDescription":`Configure embedded terminals, sshc's lifecycle, and protection for this machine's encrypted data.`,"settings.engineDescription":`Configure the sshc engine port and automatic vault locking.`,"settings.terminalDescription":`Configure the behavior, appearance, and controls used by new terminals.`,"settings.notificationsDescription":`Configure browser notifications and the sound for notifications sent by terminal programs.`,"settings.connectionsDescription":`Review the connections open in this browser and close them together.`,"settings.passwordDescription":`Change the master password that protects encrypted data on this machine.`,"secrets.heading":`The vault`,"secrets.pageDescription":`Manage named account passwords, key passphrases, and one-time password seeds. Values are shown only while editing.`,"secrets.passwordsDescription":`Manage named account passwords and the hosts that use them. Values are shown only while editing.`,"secrets.passphrasesDescription":`Manage named and key-specific passphrases. Values are shown only while editing.`,"secrets.totpDescription":`Register one-time passwords, view the current code, and manage their connection assignments.`,"secrets.metricPasswords":`Account passwords`,"secrets.metricPassphrases":`Key passphrases`,"secrets.metricTOTP":`One-time passwords`,"secrets.metricAssignments":`Assignments`,"secrets.loading":`Reading the vault…`,"secrets.master":`Master password`,"secrets.unlock":`Unlock`,"secrets.lock":`Lock sshc`,"secrets.failed":`The vault could not be read.`,"secrets.storeFailed":`The credential could not be saved.`,"secrets.deleteFailed":`The credential could not be deleted.`,"secrets.inUse":`This credential is still assigned. Change its assignments before deleting it.`,"secrets.none":`Nothing is stored here yet.`,"secrets.assignedHosts":`Assigned hosts`,"secrets.noAssignedHosts":`No assigned hosts`,"secrets.keys":`Keys`,"secrets.noKeys":`No assigned keys`,"secrets.dedicated":`Dedicated to this key`,"secrets.removeDedicated":`Remove saved passphrase for {key}`,"secrets.keyHostUsageIncomplete":`Key host assignments could not be fully confirmed from SSH configuration. Check Config diagnostics.`,"secrets.keyHostsUnavailable":`Could not confirm assigned hosts`,"secrets.delete":`Delete {name}`,"secrets.deleteHeading":`Delete {name}?`,"secrets.deleteBody":`The credential leaves the vault and cannot be recovered.`,"secrets.confirmDelete":`Delete it`,"secrets.deleteCancel":`Cancel`,"secrets.edit":`Edit {name}`,"secrets.actions":`Actions for {name}`,"secrets.usageExpand":`Show {label} for {name}`,"secrets.usageCollapse":`Hide {label} for {name}`,"secrets.editPassword":`Edit account password`,"secrets.editPassphrase":`Edit key passphrase`,"secrets.editTOTP":`Edit one-time password`,"secrets.editNote":`The saved value is shown below. Renaming keeps every current assignment.`,"secrets.credentialName":`Name`,"secrets.passwordValue":`Password`,"secrets.passphraseValue":`Key passphrase`,"secrets.totpValue":`Setup key or otpauth URI`,"secrets.revealing":`Reading the saved value…`,"secrets.revealFailed":`The saved value could not be shown.`,"secrets.updateFailed":`The changes could not be saved.`,"secrets.nameExists":`A credential with that name already exists. Choose another name.`,"secrets.saveChanges":`Save changes`,"secrets.saving":`Saving…`,"secrets.cancel":`Cancel`,"secrets.passwordsHeading":`Account passwords`,"secrets.passphrasesHeading":`Key passphrases`,"secrets.newPasswordName":`New account password name`,"secrets.newPasswordValue":`New account password value`,"secrets.storePassword":`Store account password`,"secrets.newPassphraseName":`New key passphrase name`,"secrets.newPassphraseValue":`New key passphrase value`,"secrets.storePassphrase":`Store key passphrase`,"secrets.totpHeading":`One-time passwords (TOTP)`,"secrets.newTOTPName":`New one-time password name`,"secrets.newTOTPValue":`Base32 setup key or otpauth URI`,"secrets.storeTOTP":`Store one-time password`,"secrets.totpAssignInConnection":`To assign this token, open its target in Connections and choose it under One-time password (TOTP) in Basic settings.`,"secrets.totpLoading":`Generating the current code…`,"secrets.totpRetry":`Try generating the code again`,"secrets.totpExpand":`Show the previous and next codes for {name}`,"secrets.totpCollapse":`Hide the previous and next codes for {name}`,"secrets.totpRemaining":`{seconds}s`,"secrets.totpPrevious":`Previous`,"secrets.totpNext":`Next`,"secrets.unassignTOTP":`Remove the one-time password assignment from {host}`,"secrets.unassignTOTPFailed":`The one-time password assignment could not be removed.`,"update.version":`Version {version}`,"update.available":`{version} is available — read what changed`,"desktop.closeAllHeading":`Open connections`,"desktop.closeAllNote":`This closes every session, port forward, and SSH agent forwarding. The engine keeps running.`,"desktop.openCount":`{count} open`,"desktop.closeAll":`Close every connection`,"secrets.changeHeading":`Master password`,"secrets.changeNote":`Choose password protection or automatic opening on this device. The change also updates protection for snippets, sync settings, and local backups. Sync uses an independent key.`,"secrets.currentMaster":`Current master password`,"secrets.newMaster":`New master password`,"secrets.confirmMaster":`Confirm new master password`,"secrets.change":`Change the master password`,"secrets.wrongCurrent":`The current master password is incorrect. Nothing was changed.`,"secrets.changeFailed":`The master password could not be changed.`,"secrets.changedMasterLocally":`Local vault protection was updated, including snippets, sync settings, and backups. Remote snapshots were not rewritten.`,"section.passwords":`Account passwords`,"section.keyPassphrases":`Key passphrases`,"section.otp":`OTP`,"lock.explainNew":`Choose whether to protect this device’s vault with a password. A password must contain at least 4 characters.`,"lock.explainOpen":`Enter your master password to unlock sshc.`,"lock.noRecovery":`The master password cannot be recovered. If you lose it, the vault, snippets, and encrypted backups cannot be opened.`,"lock.explainPasswordless":`This device uses the vault without a password.`,"lock.withoutPassword":`Use without a password`,"lock.withoutPasswordHint":`Opens automatically when sshc starts. Protection of local data relies on your OS account and device security. Sync encryption stays enabled.`,"lock.shortPasswordHint":`A short password offers limited protection if local files are copied. A longer, unpredictable password provides stronger protection.`,"lock.password":`Master password`,"lock.confirm":`Confirm master password`,"lock.create":`Create the vault`,"lock.open":`Open`,"lock.wrong":`The master password is incorrect.`,"lock.tooShort":`A master password must be at least {count} characters.`,"lock.alreadyExists":`A vault already exists in app storage. Enter its master password to unlock it.`,"lock.storagePermission":`Android denied access to the app's private storage. Copy the details below for support.`,"lock.storageFull":`There is not enough free storage to create or update the vault.`,"lock.storageReadOnly":`The app's private storage is read-only. Restart the device and try again.`,"lock.storageBusy":`Another vault update is still finishing. Wait a moment and try again.`,"lock.storageIO":`Android reported an input/output failure while accessing the app's private storage.`,"lock.schemaOlder":`The vault format is old (required: {required}, current: {current}).`,"lock.schemaNewer":`The vault format is newer than this sshc build (supported: {required}, current: {current}).`,"lock.migrationFailed":`The vault could not be migrated from version {current} to {required}. The original vault was not changed.`,"lock.migrationCompleted":`The vault was safely migrated from version {current} to {required}.`,"lock.migrationDismiss":`Dismiss migration notice`,"lock.envelopeUnsupported":`The encrypted vault container uses an unsupported format. Open diagnostic details for support.`,"lock.schemaRecoveryHint":`Restore the newest compatible local backup first. If none exists, you can create an empty vault without deleting SSH configuration or key files.`,"lock.restoreCompatibleBackup":`Restore a compatible vault backup`,"lock.noCompatibleBackup":`No compatible local vault backup was found. Nothing was changed.`,"lock.recoveryFailed":`The compatible vault backup could not be restored.`,"lock.resetUnsupportedAcknowledge":`I understand that saved passwords, saved key passphrases, and synchronization settings will be reset. SSH configuration and key files remain.`,"lock.resetUnsupported":`Create an empty vault`,"lock.resetFailed":`The unsupported vault could not be safely replaced.`,"lock.failed":`The vault could not be opened.`,"section.sync":`Sync`,"section.history":`History`,"home.heading":`Your connections`,"home.manageConnections":`Manage connections`,"home.connections":`Connections`,"home.groups":`Groups`,"home.attention":`Needs attention`,"home.quickConnect":`Quick connect`,"home.savedWorkspaces":`Saved layouts`,"home.savedWorkspacesHint":`Recreate saved connection targets and pane placement in one action.`,"home.savedWorkspaceList":`Saved terminal layouts`,"home.workspacePanes":`{count} panes`,"home.workspaceUpdated":`updated {at}`,"home.openWorkspace":`Open layout`,"home.lastConnected":`Last connected {at}`,"home.connectionList":`Available connections`,"home.search":`Search connections`,"home.searchPlaceholder":`Search hosts, groups or tags`,"home.viewMode":`Connection layout`,"home.panelView":`Panels`,"home.listView":`List`,"home.groupFilter":`Filter connections by group`,"home.allGroups":`All`,"home.connectionCount":`Connections {count}`,"home.groupBreadcrumb":`Selected group`,"home.openGroup":`Open {name}, {count} connections`,"home.connectGesture":`Connect to {alias}. Double-click with a mouse or tap once on a touch screen.`,"home.loading":`Reading your SSH configuration…`,"home.noConnections":`No concrete Host alias is configured yet.`,"home.noMatches":`No connection matches this search.`,"home.connectionActions":`Actions for {alias}`,"home.openConnectionSettings":`Open connection settings`,"home.connect":`Connect`,"home.openingConnection":`Opening {alias}…`,"home.opening":`Opening…`,"home.loadFailed":`The SSH configuration could not be read.`,"home.workspaceAttention":`{count} configuration or recovery item(s) need attention.`,"home.openConfig":`Review configuration`,"home.recoverChanges":`Recover changes`,"home.sync":`Sync`,"home.syncUnavailable":`Sync status is unavailable.`,"home.syncNotConfigured":`Remote sync is not configured.`,"home.syncNever":`A remote bucket is configured but has not been synced yet.`,"home.syncLast":`Last synced {at} · {count} files`,"home.openSync":`Open sync`,"copy.button":`Copy {label}`,"copy.done":`Copied.`,"copy.refused":`The browser refused to write to the clipboard.`,"copy.command":`command`,"copy.terminalCommand":`Terminal command`,"copy.privateKey":`private key`,"copy.publicKey":`public key`,"copy.keyLine":`key line`,"copy.remoteCommand":`remote command`,"copy.diagnosticReport":`diagnostic report`,"diagnostic.requestFailed":`The operation could not be completed`,"diagnostic.requestFailedHint":`sshc reported {code}. Open the safe diagnostic details when reporting the problem.`,"diagnostic.showDetails":`Show diagnostic details`,"diagnostic.dismiss":`Dismiss error`,"history.requestRejected":`The request was rejected ({code}).`,"history.pageTitle":`History`,"history.pageDescription":`Review every completed change, recover interrupted writes, and restore individual files without losing the newer history.`,"history.metricChanges":`Completed changes`,"history.metricInterrupted":`Interrupted`,"history.metricRestorable":`Restorable files`,"history.operation.configuration":`Configuration change`,"history.operation.connection":`Connection change`,"history.operation.key":`Key change`,"history.operation.terminal":`Terminal settings change`,"history.operation.engine":`Engine settings change`,"history.operation.vault":`Vault change`,"history.operation.sync":`Sync change`,"history.operation.other":`Application change`,"history.status.staging":`Preparing`,"history.status.staged":`Interrupted`,"history.status.applied":`Applied`,"history.status.completed":`Completed`,"history.status.rolledBack":`Rolled back`,"history.status.unknown":`Recorded`,"history.interrupted":`Interrupted transactions`,"history.interruptedDetail":`{operation} started {startedAt}: {committed} of {total} files were written.`,"history.complete":`Complete`,"history.rollBack":`Roll back`,"history.loading":`Loading history…`,"history.restored":`Restored {path} as transaction {id}.`,"history.completedTransaction":`The interrupted transaction was completed.`,"history.rolledBack":`The interrupted transaction was rolled back.`,"history.completed":`Completed changes`,"history.empty":`No change has been made through this application yet.`,"history.restorePath":`Restore {path}`,"history.backupsKept":`Generation backups are kept in ~/.ssh/sshc/backups and are never deleted automatically. A restore is itself a new transaction, so it can be undone the same way.`,"notice.complex_external_rule":`This value cannot be edited in the simplified view because its source uses a wildcard, negation, Match block, or duplicate alias. The source is shown instead.`,"notice.duplicate_alias":`Another block declares the same alias. For most options, OpenSSH uses the first value it reads.`,"notice.proxy_ignored":`Both ProxyCommand and ProxyJump are set. OpenSSH keeps whichever it read first, so this line is ignored.`,"notice.wildcard_shadow":`A catch-all block can override values for this host.`,"notice.negated_pattern":`A negated pattern applies here.`,"notice.unnamed_host_block":`This block has no concrete alias and can only be edited as raw text.`,"notice.match_block":`A Match block was found.`,"notice.dangerous_directive":`This directive can run a command. It is saved as written and never executed by this application.`,"notice.unstructured_line":`This line has unbalanced quoting and is preserved exactly as written.`,"notice.external_file":`This file is outside ~/.ssh. It is shown but never written.`,"notice.orphan_metadata":`The host for this note no longer exists. Review the target before reassigning it.`,"notice.group_cycle":`This group's parent hierarchy is cyclic, so the group was skipped.`,"notice.group_member_missing":`This group member has no host block in the configuration.`,"refusal.directory_not_empty":`The directory is not empty. Delete its files first; Include lines that directly reference those files will be updated at the same time.`,"refusal.not_a_directory":`The specified path is a file, not a directory.`,"refusal.group_is_declared":`{detail} is a declared group. Rename or remove it on the Groups screen so its connections, shared settings, and keys are moved together.`,"refusal.destination_exists":`A file or directory with that name already exists at the destination.`,"refusal.alias_already_declared":`A connection with that name already exists, so these changes cannot be saved. Choose another name.`,"refusal.region_damaged":`~/.ssh/config contains only one marker for the block generated by sshc. The generated range cannot be identified, so nothing was written.`,"notice.group_not_declared":`This directory is under connections/, but no Include line references it. Declare it as a group or move its files.`,"notice.group_directory_missing":`This group is declared, but its directory is missing. Its settings will not be loaded until you create the directory and add configuration files.`,"notice.group_empty":`This group is declared but contains no files.`,"notice.generated_region_damaged":`~/.ssh/config has the opening marker of this application's generated block but not its closing one, so it cannot tell where its own lines stop. The Include lines in it still work; groups cannot be saved until the closing marker is put back. Add a line reading “# <<< sshc groups” after the last generated Include, or delete the whole block and save the groups again.`,"notice.explained_values_only":`Part of the configuration could not be read, so these values come from what was reachable.`,"notice.match_exec_refused":`This configuration has a Match exec block. Nothing here runs commands, so these values cannot be resolved. Connect from a terminal with ssh instead.`,"notice.match_final_refused":`This configuration has a Match final block. OpenSSH reads the file twice for that, which this engine does not do, so these values cannot be resolved.`,"notice.canonicalise_refused":`This configuration turns on CanonicalizeHostname, which re-reads the configuration. These values cannot be resolved here.`,"notice.unknown_token_refused":`This configuration uses a token this engine does not expand, so these values cannot be resolved.`,"notice.destination_not_included":`No Include references this file, so OpenSSH will not read the moved connection until one is added.`,"notice.group_file_unreached":`This file is under connections/, but no Include references it, so OpenSSH does not read it. Move it into a declared group.`,"notice.group_directory_leftover":`The group directory is now empty. sshc does not remove empty directories automatically; delete it manually if it is no longer needed.`,"notice.include_no_longer_matches":`A pattern that reached this file will not match its new name, so OpenSSH will stop reading it.`,"notice.include_not_rewritten":`An Include references this file in a format that sshc cannot rewrite. The Include was not changed; review it manually.`,"notice.include_now_unreached":`No Include references the new path, so OpenSSH will not read this file until one is added.`,"preview.heading":`Save preview`,"preview.newFile":` (new file)`,"preview.tooLarge":`This file is too large for a line-by-line preview, so the whole file is shown as replaced.`,"preview.syntaxError":`Syntax error in {path} at line {line}, column {column}. The edit is kept here and was not written.`,"preview.theFile":`the file`,"preview.graphError":`This change would break the Include graph. Nothing was written.`,"preview.conflictError":`The file changed outside this application. Nothing was written.`,"preview.rejected":`The request was rejected ({code}). Nothing was written.`,"preview.changedOnDisk":`Changed on disk since you loaded it`,"preview.pendingChange":`Your pending change`,"preview.mergeByHand":`Reload the file to merge the two changes by hand. Nothing was written.`,"preview.nothingYet":`Change a value to see exactly what would be written.`,"preview.explainedFor":`Resolved settings for {alias}`,"preview.unset":`unset`,"reveal.heading":`Show private key: {path}`,"reveal.warning":`The private key will appear on this page. Anyone who can view the screen can copy it. sshc cannot protect the key from browser extensions or clipboard-history tools. Each reveal is recorded in History, but the key itself is not.`,"reveal.show":`Show private key`,"reveal.requesting":`Requesting a one-time confirmation…`,"reveal.privateKeyLabel":`Private key`,"reveal.failed":`The private key could not be shown. Close this dialog and confirm again.`,"reveal.close":`Close`,"orphan.heading":`Settings without a connection`,"orphan.explain":`The Host blocks associated with these notes are no longer in the configuration. Choose the connection to which each note should be assigned.`,"orphan.chooseTarget":`Choose the connection this note belongs to.`,"orphan.occupied":`{alias} already has its own settings. Clear those first, or discard this note.`,"orphan.entry":`{alias} in {path}`,"orphan.noSettings":`no settings`,"orphan.tags":`tags {tags}`,"orphan.note":`note “{note}”`,"orphan.colour":`colour {colour}`,"orphan.reassociateWith":`Re-associate {alias} with`,"orphan.reassociatePlaceholder":`Re-associate with…`,"orphan.reassociate":`Re-associate {alias}`,"orphan.discard":`Discard {alias} settings`,"password.blocker.authenticationOff":`PasswordAuthentication is off for this host, so the client will never offer a password.`,"password.blocker.aliasNotSimple":`This is a pattern rather than a specific host. To save a password, specify an account on one host.`,"password.blocker.identityFile":`This host has a direct private key. sshc leaves any password prompt to OpenSSH instead of storing or supplying one.`,"password.warn.hostKeyUnknown":`This host key is not in known_hosts. When a saved password is used, the password helper cannot answer the host-key confirmation prompt, so the first connection will fail. Add the host key through Known Hosts first.`,"password.warn.hostNameUnresolved":`No HostName could be resolved for this alias. The password will still be assigned to the alias.`,"password.show":`Show`,"password.showNamed":`Show {label}`,"password.hideNamed":`Hide {label}`,"password.hide":`Hide`,"sync.heading":`Remote sync`,"sync.overviewHeading":`Sync`,"sync.manageSettings":`Manage sync settings`,"sync.exclusions.heading":`Files to sync`,"sync.exclusions.open":`Selection and exclusion rules`,"sync.exclusions.loading":`Loading synchronization files…`,"sync.exclusions.summary":`{included} included · {ignored} excluded`,"sync.exclusions.hint":`Unchecked files are not sent, overwritten, or removed by a receive. Existing local copies stay in place.`,"sync.exclusions.defaults":`There is no .sshcignore yet. The built-in rules exclude OS metadata, backups, temporary files, lock files, SSH authorized keys and known host files, and environment and rc at the root of .ssh. Saving shares the rules with every machine.`,"sync.exclusions.search":`Search file names and paths`,"sync.exclusions.empty":`No files match this search.`,"sync.exclusions.sensitiveWarning":`A connection file or key is excluded. Other machines may not be able to reproduce that connection.`,"sync.exclusions.advanced":`Edit .sshcignore`,"sync.exclusions.rules":`Synchronization exclusion rules`,"sync.exclusions.syntax":`Use Gitignore syntax including *, **, ?, [a-z], and ! to include again. .sshcignore itself and sshc device-local state are handled independently.`,"sync.exclusions.save":`Save exclusions`,"sync.exclusions.shared":`.sshcignore is synchronized so every machine uses the same rules.`,"sync.exclusions.invalid":`The exclusion rules are not valid.`,"sync.exclusions.loadFailed":`Could not load the synchronization files.`,"sync.exclusions.saveFailed":`Could not save the exclusion rules.`,"sync.setup.check":`Check connection`,"sync.setup.empty":`Connected. This path has no sync data.`,"sync.setup.existing":`Existing sync data was found.`,"sync.setup.incomplete":`History exists, but the current snapshot is missing.`,"sync.setup.useAnotherPath":`To start fresh, choose a different empty path.`,"sync.setup.existingKey":`Enter the encryption key used by this sync data. The actual snapshot will be decrypted before anything is saved.`,"sync.setup.emptyKey":`A strong encryption key will be generated. You may also choose your own.`,"sync.setup.save":`Verify and save`,"sync.setup.saved":`Connection details and encryption key saved.`,"sync.setup.changed":`The destination changed after it was checked. Check the connection again.`,"sync.role.main":`Main device (send and receive)`,"sync.role.receive":`Receive-only device`,"sync.role.advanced":`Advanced device roles`,"sync.role.send":`Send-only device`,"sync.pageDescription":`Synchronise an encrypted snapshot of this SSH workspace between machines through an object-storage bucket.`,"sync.flowHeading":`Steps to start syncing`,"sync.flowBucket":`Configure a bucket`,"sync.flowKey":`Set the shared encryption key`,"sync.flowOperate":`Inspect, send, or receive`,"sync.loading":`Reading the sync settings…`,"sync.warning":`The sync includes regular files under ~/.ssh that do not match the exclusion rules; this may include private keys. The snapshot is encrypted on this machine with the key below before upload, so the storage provider does not receive the synchronised content in plaintext. However, anyone with the bucket credentials can download the encrypted snapshot and attempt to guess the encryption key offline without a time limit.`,"sync.statusFailed":`The sync settings could not be read.`,"sync.bucketHeading":`Bucket`,"sync.notConfigured":`No bucket is configured yet.`,"sync.endpoint":`Endpoint`,"sync.endpointHint":`Must be https. For R2 this is https://.r2.cloudflarestorage.com.`,"sync.bucket":`Bucket name`,"sync.path":`Path in the bucket`,"sync.pathHint":`Optional. Empty puts the snapshot at the root of the bucket.`,"sync.region":`Region`,"sync.regionHint":`Optional. Leave this empty to use auto. Use auto for R2; for Amazon S3, enter the bucket's region.`,"sync.accessKeyId":`Access key ID`,"sync.secretAccessKey":`Secret access key`,"sync.credentialsNote":`Bucket credentials are encrypted with the master password and excluded from snapshots. Including them would allow anyone who obtained one snapshot to download later snapshots.`,"sync.sealed":`These settings are encrypted with the master password. Unlock the vault to view them.`,"sync.unlockFailed":`The master password is incorrect.`,"sync.noVault":`This machine has no vault yet. Create one from a Vault page, then come back.`,"sync.direction":`Direction`,"sync.direction.both":`Send and receive`,"sync.direction.push":`Send only`,"sync.direction.pull":`Receive only`,"sync.direction.both.hint":`This machine can send local changes and apply changes sent by other machines.`,"sync.direction.push.hint":`This machine only sends changes. Changes from other machines are not applied, but you can still preview them.`,"sync.direction.pull.hint":`This machine only receives changes. Local changes are not sent to the bucket or other machines.`,"sync.editSettings":`Edit bucket settings`,"sync.cancelSettings":`Cancel editing`,"sync.configureFailed":`The bucket could not be configured.`,"sync.detailsHeading":`Details and history`,"sync.neverSynced":`This machine has not synced yet.`,"sync.lastSynced":`Last synced {at}, {count} files.`,"sync.key":`Encryption key`,"sync.keyHint":`Snapshots are encrypted with this key, not the master password. Enter the same key on every machine that shares this bucket; each machine may use a different master password. If you lose this key, the snapshots cannot be decrypted.`,"sync.keyMissing":`No key yet. Create one here, then enter the same key on your other machines.`,"sync.keySet":`A key is set. It is not shown again.`,"sync.keyReady":`Key configured`,"sync.keyNeeded":`Key required`,"sync.keyShownOnce":`Copy this now and enter it on your other machines. Leave this screen and it will not be shown again.`,"sync.keyChooseOwn":`Choose the key myself`,"sync.keyOwnValue":`Key`,"sync.keyCreate":`Create a key`,"sync.keyReplace":`Replace the key`,"sync.keySaved":`Saved.`,"sync.keyFailed":`The key could not be saved.`,"sync.keyTooShort":`A key you choose yourself must be at least 12 characters.`,"sync.wrongKey":`The saved key cannot decrypt the snapshot in this bucket. Check that every machine uses the same key, or explicitly replace the remote snapshot from Bucket status.`,"sync.wrongMaster":`The master password for this machine is incorrect.`,"sync.bucketAuthenticationFailed":`The object store could not authenticate the request. Nothing was saved. Check the access key and secret.`,"sync.bucketAccessDenied":`The object store denied access. Nothing was saved. Check the credentials, bucket, region, and key permissions.`,"sync.bucketRateLimited":`The object store is limiting requests. Wait a moment and try again.`,"sync.bucketUnavailable":`The object store service is temporarily unavailable. Try again later.`,"sync.unreachable":`The object store refused the request. Nothing was saved. Check the bucket, access key, secret, region, and permissions.`,"sync.bucketTimeout":`The object store did not respond in time. Check the network and endpoint.`,"sync.bucketDNSFailed":`The endpoint hostname could not be resolved. Check the address and this device's DNS connection.`,"sync.bucketTLSFailed":`The secure connection to the endpoint could not be verified. Check the HTTPS address and this device's clock.`,"sync.bucketUnreachable":`The object store could not be reached. Check this device's network and the endpoint.`,"sync.snapshotDownloadIncomplete":`The encrypted snapshot download ended early. Check the network and try receiving it again.`,"sync.snapshotCostRefused":`This snapshot requires more decryption work than the safety limit allows.`,"sync.snapshotSchemaUnsupported":`This snapshot uses a format unsupported by this version of sshc. Update to the same or a newer version than the machine that created it.`,"sync.snapshotRejected":`The downloaded data is not a valid sshc snapshot or is damaged. Nothing was overwritten.`,"sync.snapshotTooLarge":`The snapshot exceeds the safe read limit. Nothing was overwritten.`,"sync.noSnapshot":`There is no current snapshot at the specified bucket and path.`,"sync.internalFailed":`Sync encountered an unclassified internal error. Include the diagnostic code below when reporting it.`,"sync.failed":`Sync could not be completed. Nothing was overwritten. Check the connection and try again.`,"sync.localChanged":`Settings on this machine changed after the preview. Nothing was overwritten. Check for changes again.`,"sync.workspaceBusy":`Another operation is updating settings on this machine. Try again after it finishes.`,"sync.endpointPath":`The endpoint is the account address only — no bucket name and no path. Put the bucket name in the field below.`,"sync.autoHint.both":`While the Vault is unlocked, sshc checks the remote once a minute. After a local setting changes, it waits until five seconds pass without another change and pushes once. Conflicts and changes that remove files are not applied automatically; automatic sync stops and reports them.`,"sync.autoHint.pull":`While the Vault is unlocked, sshc checks the remote once a minute. Changes on this machine are never pushed. Automatic receiving stops and reports conflicts or changes that would remove files.`,"sync.autoHint.push":`While the Vault is unlocked, sshc checks whether the remote has changed. After a local setting changes, it waits until five seconds pass without another change and pushes once. Remote content is never applied to this machine.`,"sync.autoEnable":`Keep this machine in sync automatically`,"sync.autoIdle":`Stopped`,"sync.autoLastRan":`Last checked {at}.`,"sync.autoBlockedConflicts":`Automatic sync stopped because the same files changed on this machine and another machine. Select Check for changes to compare them.`,"sync.autoBlockedRemovals":`Automatic sync stopped because applying the snapshot would remove files from this machine. Select Check for changes to review them.`,"sync.autoBlockedRemoteMoved":`Automatic sync stopped before uploading because another machine changed the remote snapshot. Download those changes or explicitly replace the confirmed remote snapshot.`,"sync.autoBlockedRemoteMovedPull":`The current remote has diverged from the last revision received by this machine. Automatic receiving stopped to prevent an unintended rollback.`,"sync.remoteHeadReviewHint":`A receive-only machine can explicitly accept the current remote as authoritative. Review when it was created, its source, and the affected files before applying it.`,"sync.remoteHeadReview":`Review current remote`,"sync.checkRemoteChanges":`Review remote changes`,"sync.remoteHeadPreviewHeading":`Receive current remote`,"sync.remoteHeadPreview":`Reviewing the remote created at {at} by {origin}. Apply verifies the same exact generation again and writes nothing if it changed in the meantime.`,"sync.remoteHeadApply":`Receive this remote`,"sync.autoBlockedRemoteDeleted":`The previously synchronized live snapshot was deleted from the bucket. Automatic sync stopped so it will not silently recreate or overwrite it.`,"sync.autoFailedLast":`The previous check could not reach the bucket. Automatic sync will try again.`,"sync.autoFailedWrongKey":`The remote snapshot cannot be opened with this machine's synchronization key. The same generation will not be downloaded again automatically.`,"sync.autoFailedSchema":`The remote snapshot uses an unsupported format. The same generation will not be downloaded again automatically.`,"sync.autoFailed":`The setting could not be saved.`,"sync.autoNow.both":`Sync now`,"sync.autoNow.pull":`Receive now`,"sync.autoNow.push":`Send now`,"sync.autoNowFailed":`The sync check could not be run.`,"sync.transferHeading":`Send or review changes`,"sync.transferHint.both":`Push this machine's workspace, or review the remote snapshot before applying it.`,"sync.transferHint.push":`Push this machine's workspace. Remote content is not applied to this machine.`,"sync.commitMessage":`Commit message`,"sync.commitMessagePlaceholder":`Describe this snapshot`,"sync.commitMessageHint":`A local-diff summary is generated automatically. Edit it before a manual push.`,"sync.commitMessageChanges":`Local diff: {added} added · {modified} modified · {removed} removed`,"sync.commitMessageInvalid":`Use a single-line commit message of 240 characters or fewer.`,"sync.bucketStateHeading":`Bucket status`,"sync.bucketStateHint":`Reads the live object and dated history directly from S3 without downloading their encrypted contents. Refreshes every 30 seconds while this screen is visible and after transfers.`,"sync.bucketRefresh":`Refresh bucket status`,"sync.bucketNotConfigured":`Configure a bucket to inspect it.`,"sync.bucketLoading":`Reading the bucket…`,"sync.bucketStatusFailed":`The bucket status could not be read.`,"sync.bucketLive":`Current snapshot`,"sync.bucketLiveEmpty":`The bucket has no current snapshot.`,"sync.bucketLocalCurrent":`This machine has acknowledged the current remote generation.`,"sync.bucketLocalBehind":`The remote generation differs from this machine's last acknowledged snapshot.`,"sync.bucketHistory":`Dated history · {count}`,"sync.bucketHistoryShowing":`Showing the latest {shown} of {count} entries.`,"sync.bucketHistoryExpand":`Show all history`,"sync.bucketHistoryCollapse":`Show only the latest 5`,"sync.bucketObjectName":`Show S3 object name`,"sync.bucketHistoryTruncated":`Showing the newest 10,000 entries. The bucket contains older history too.`,"sync.bucketHistoryEmpty":`No dated history objects were found.`,"sync.bucketObjectMeta":`{size} · updated {at}`,"sync.bucketCheckedAt":`Bucket checked at {at}.`,"sync.historyHeading":`Encrypted revision history`,"sync.historyHint":`Decrypts a bounded recent window on this machine and shows it as a commit graph. File contents never enter the API response.`,"sync.historyRefresh":`Refresh revision history`,"sync.historyNeedsKey":`Set the shared encryption key to read revision history.`,"sync.historyLoading":`Decrypting recent revisions…`,"sync.historyFailed":`The encrypted revision history could not be read.`,"sync.historySummary":`{count} revisions · downloaded {size}`,"sync.historyTruncated":`Only the newest bounded history window is decoded. Older objects remain in the bucket list above.`,"sync.historySkipped":`{count} history object(s) could not be opened with the current format or key and were skipped.`,"sync.historyTimeline":`Revision timeline`,"sync.historyRelation.head":`HEAD`,"sync.historyRelation.ancestor":`ancestor`,"sync.historyRelation.branch":`branch`,"sync.historyRevisionMeta":`{at} · {count} files · device {origin}`,"sync.historyParent":`parent {revision}`,"sync.historySelect":`Select a revision to compare it with the current remote head.`,"sync.historySelected":`Selected revision`,"sync.historyDiffLoading":`Comparing paths…`,"sync.historyDiffEmpty":`Select this revision again to compare paths.`,"sync.historyDiffFailed":`The selected revision could not be compared.`,"sync.historyDiff.added":`Added · {count}`,"sync.historyDiff.modified":`Modified · {count}`,"sync.historyDiff.removed":`Removed · {count}`,"sync.historyRestoreHint":`Restore previews local file changes first. It does not rewind the remote head; the next push creates a new head from this revision.`,"sync.historyRestorePreview":`Preview restoring this revision`,"sync.forceHeading":`Replace the remote snapshot`,"sync.forceHint":`Use this when changing to a bucket that already contains an unreadable or unwanted snapshot. The current workspace is encrypted and replaces only the exact remote generation shown above. If it changes after confirmation, the operation is cancelled. Existing dated history is not deleted.`,"sync.forceConfirm":`I understand that the current remote snapshot will be replaced with this machine's workspace.`,"sync.forcePush":`Replace the remote snapshot`,"sync.forcePushShort":`Force send`,"sync.forcePull":`Force receive`,"sync.dialogClose":`Close`,"sync.forcePushed":`Replaced the confirmed remote snapshot.`,"sync.forceFailed":`The remote snapshot could not be replaced. Refresh the bucket status and confirm again.`,"sync.push":`Push this workspace`,"sync.pushed":`Pushed.`,"sync.pushFailed":`The snapshot could not be uploaded. If another machine uploaded changes after this machine's last sync, download those changes first.`,"sync.noLocalChanges":`There are no local changes to push.`,"sync.remoteMoved":`Another machine changed the current snapshot, so the update was cancelled before retrying. Download the other machine's changes or explicitly replace the confirmed remote snapshot.`,"sync.previewStale":`The remote snapshot changed after this preview. Preview it again before applying.`,"sync.remoteDeleted":`The live remote snapshot was deleted before apply. Refresh the bucket status.`,"sync.keyRecoveryRequired":`Synchronization key replacement was interrupted. Enter the same new synchronization key again to recover.`,"sync.keyRecoveryTargetChange":`Finish the interrupted key replacement before changing the bucket or path.`,"sync.keyHistoryLossConfirm":`I understand that older history snapshots will remain encrypted with the previous key and will no longer be readable.`,"sync.preview":`Check for changes`,"sync.pullFailed":`The snapshot could not be read.`,"sync.alreadyMatches":`This workspace already matches the snapshot.`,"sync.previewHeading":`What a pull would change`,"sync.conflictExplain":`These files changed on this machine and another machine. The same configuration block cannot be merged automatically, so nothing was applied. Merge the files manually in the Configuration files screen, or upload from the machine whose version you want to keep.`,"sync.conflictPermissions":`Permissions: last sync {base} · this machine {local} · remote {remote}`,"sync.keepMine":`Keep this machine's version`,"sync.takeTheirs":`Use the other machine's version`,"sync.wouldWrite":`{count} files would be written:`,"sync.wouldRemove":`{count} files would be removed:`,"sync.confirmOverwrite":`This will overwrite files in ~/.ssh and remove the files listed above from this machine. Every affected file is first copied to ~/.ssh/sshc/backups/ and can be restored from History. Continue?`,"sync.apply":`Apply the snapshot`,"sync.applied":`Applied. The change is in History and can be rolled back.`,"sync.applyFailed":`The snapshot could not be applied.`,"sync.result.pushTitle":`This push`,"sync.result.previewTitle":`Pull preview`,"sync.result.applyTitle":`Apply result`,"sync.result.previousTitle":`Previous success`,"sync.result.filesSource":`{count} files · {size}`,"sync.result.encrypted":`Encrypted snapshot {size}`,"sync.result.uploaded":`S3 transfer {size} ({count} objects, history + live)`,"sync.result.previewDownload":`Downloaded {downloaded} · {source} after opening`,"sync.result.applyDownload":`Downloaded again for apply: {size}`,"sync.result.changes":`{written} written · {removed} removed · {conflicts} conflicts`,"sync.result.created":`Snapshot created {at}`,"sync.result.snapshotAt":`Snapshot from {at}`,"sync.result.appliedSnapshot":`Applied the snapshot from {at}`,"sync.result.completed":`Operation completed {at}`,"diag.heading":`Ad hoc checks`,"diag.pageDescription":`Run SSH checks against a saved alias or any one-off host. Nothing is contacted until you choose a check.`,"diag.configUnreadable":`The configuration could not be read.`,"diag.running":`Running the requested check…`,"diag.idle":`No check is running.`,"diag.hostAlias":`Host alias`,"diag.needsAlias":`Type a host alias to run a check.`,"diag.explain":`Explain`,"diag.explainFailed":`Could not analyse the settings for this alias.`,"diag.checkReachability":`Check reachability`,"diag.reachabilityFailed":`The reachability check could not be run.`,"diag.testAuthentication":`Test authentication`,"diag.authenticationFailed":`The authentication test could not be run.`,"diag.configuration":`Configuration`,"diag.missingSuffix":` (missing)`,"diag.canRunCommand":`This connection includes settings that may cause OpenSSH to run commands`,"diag.directiveAt":`{keyword} at {path}:{line}`,"diag.sourcesCaption":`Source of each value. A line marked “superseded” was read after the effective value and had no effect.`,"diag.tableScrollHint":`Swipe sideways to see every column`,"diag.columnKeyword":`Keyword`,"diag.columnValue":`Value`,"diag.columnWhere":`Read from`,"diag.columnCondition":`Under`,"diag.columnState":`State`,"diag.inEffect":`in effect`,"diag.superseded":`superseded`,"diag.route":`Connection route`,"diag.hopComplex":`this hop is not a simple alias, so its destination is not resolved here`,"diag.reachedThrough":`reached through {parent}`,"diag.notSimple":`These rules cannot be resolved in the simplified view`,"diag.notSimpleDetail":"sshc shows the source of each value but cannot resolve the final result. Use `ssh -G` for the authoritative values.","diag.inside":`inside {condition}`,"diag.reachability":`Reachability`,"diag.authentication":`Authentication`,"diag.authenticationMethod":`Authenticated with {method}.`,"diag.forHost":`Diagnostics for {host}`,"kh.heading":`Known Hosts`,"kh.pageDescription":`Review trusted host keys, scan a destination and verify its fingerprint before adding it to known_hosts.`,"kh.metricEntries":`Trusted entries`,"kh.metricHashed":`Hashed hosts`,"kh.metricCandidates":`Scan candidates`,"kh.scanHeading":`Scan a host`,"kh.trustedHeading":`Trusted host keys`,"kh.columnHost":`Host`,"kh.columnType":`Key type`,"kh.columnFingerprint":`Fingerprint`,"kh.columnTrust":`Trust`,"kh.columnActions":`Actions`,"kh.unreadable":`The known_hosts file could not be read.`,"kh.removeFailed":`The entry could not be removed. Nothing was changed.`,"kh.scanFailed":`The host could not be scanned.`,"kh.addFailed":`The key could not be added. Nothing was changed.`,"kh.addFailedCode":`The key could not be added ({code}). Nothing was changed.`,"kh.removed":`Removed one entry in transaction {id}.`,"kh.added":`Added {host} in transaction {id}.`,"kh.search":`Search`,"kh.hashed":`(hashed)`,"kh.delete":`Delete`,"kh.confirmRemove":`Remove line {line} ({fingerprint})? The operation is recorded in History and a backup is kept.`,"kh.confirmDelete":`Confirm delete`,"kh.cancel":`Cancel`,"kh.hostToScan":`Host to scan`,"kh.scan":`Scan`,"kh.scanCandidates":`Scan candidates`,"kh.unverified":`unverified`,"kh.add":`Add`,"kh.addHeading":`Add an unverified host key`,"kh.addExplain":`This key was presented when connecting to {host}, but another system reachable at that address could have presented it. Enter a fingerprint obtained through another trusted channel, or accept the risk of trusting an unverified key.`,"kh.expectedFingerprint":`Fingerprint verified through another channel`,"kh.acknowledge":`I could not verify this key and I accept the risk of trusting it`,"kh.addToKnownHosts":`Add to known_hosts`,"kh.fingerprintMismatch":`The fingerprint you typed does not match this key. You typed {typed}; the scan returned {scanned}. Nothing was added.`,"rk.heading":`Install Key on Server`,"rk.pageDescription":`Review the exact authorized_keys change before installing one of your public keys on a remote account.`,"rk.waiting":`Waiting for the server…`,"rk.idle":`Nothing is sent to the remote host until you confirm it.`,"rk.added":`The key was added to the remote authorized_keys file.`,"rk.alreadyPresent":`The key was already present; the remote file was left as it was.`,"rk.valuesFromEngine":`sshc reading your configuration; ssh was not run`,"rk.valuesFromSshG":`Resolved by OpenSSH using ssh -G`,"rk.pickFromSsh":`Public key from ~/.ssh`,"rk.typeInstead":`Type one below instead`,"rk.hostAlias":`Host alias`,"rk.hostSearch":`Connections`,"rk.hostSearchPlaceholder":`Search hosts or type an alias`,"rk.hostTypeHint":`Type a Host alias above. Saved connections will appear here when available.`,"rk.hostsSelected":`{count} selected`,"rk.hostChoices":`Connection choices`,"rk.selectMatches":`Select matches`,"rk.clearSelection":`Clear`,"rk.noHostMatches":`No matching connections`,"rk.chooseHost":`Select at least one connection or type a Host alias.`,"rk.publicKeyFile":`Public key file`,"rk.publicKeyLine":`Public key line`,"rk.showWhatWouldHappen":`Show what this would do`,"rk.register":`Register the key`,"rk.registerMany":`Register on {count} hosts`,"rk.plannedHosts":`Reviewed {count} hosts`,"rk.planFailed":`The change could not be described. Nothing was contacted.`,"rk.registerFailed":`The key was not registered. The remote host was left as it was.`,"rk.publicKeyUnreadable":`The selected public key could not be read. No connection was attempted.`,"rk.withCode":`{message} ({code})`,"rk.confirmHeading":`Confirm remote registration`,"rk.confirmManyHeading":`Confirm registration on {count} hosts`,"rk.planFor":`Registration plan for {alias}`,"rk.alias":`Alias`,"rk.effectiveUser":`Connection user`,"rk.noUser":`not set in your configuration; ssh will use your local account`,"rk.destination":`Destination`,"rk.valuesCameFrom":`These values came from`,"rk.keyFile":`Public key file`,"rk.fingerprint":`Fingerprint`,"rk.appendTo":`Add one line to {remotePath} for {account} on {hostname}, but only if the same line is not already present.`,"rk.theRemoteAccount":`the remote account`,"rk.usersAccount":`{user}’s account`,"rk.keyLineLabel":`Public key line to append`,"rk.remoteRuns":`The remote host runs this command with the key provided on standard input:`,"rk.remoteCommandLabel":`Remote command`,"rk.connectingRuns":`Connecting to this host runs a command`,"rk.acknowledgeRuns":`I have read this command and accept that connecting runs it`,"rk.manualHeading":`sshc cannot register a key on this host. Complete these steps manually:`,"rk.result":`Result`,"rk.someRegistrationsFailed":`Some hosts could not be updated. Review the result for each host.`,"explorer.loading":`Loading configuration files…`,"explorer.pageTitle":`Configuration files`,"explorer.pageDescription":`Follow the Include graph, edit exact file contents and manage workspace files without losing OpenSSH formatting.`,"explorer.metricFiles":`Loaded files`,"explorer.metricEditable":`Editable files`,"explorer.metricDiagnostics":`Diagnostics`,"explorer.hierarchy":`Include hierarchy`,"explorer.externalFile":`This file is outside ~/.ssh. It is read and shown, never written.`,"explorer.insideCondition":`inside {condition}`,"explorer.fileState":`{missing}{loads}{editable}`,"explorer.missing":`missing · `,"explorer.readTimes":`read {count} times · `,"explorer.editable":`editable`,"explorer.readOnly":`read only`,"explorer.newFilePath":`New file path`,"explorer.workspaceActions":`Workspace files`,"explorer.directoryHelp":`About files and directories`,"explorer.createFile":`Create file`,"explorer.createDirectory":`Create directory`,"explorer.deleteDirectory":`Delete directory`,"explorer.directoryNote":`You can create and delete directories here, but only empty directories can be deleted. Delete their files first; Include lines that directly reference those files are updated at the same time. Manage declared groups on the Groups screen.`,"explorer.fileOperations":`This file`,"explorer.fileOperationsNote":`Renaming this file also updates Include lines that directly reference it. Wildcard patterns are not changed; a warning appears if the new path no longer matches.`,"explorer.renameTo":`New path`,"explorer.renameFile":`Rename file`,"explorer.deleteFile":`Delete file`,"explorer.confirmDelete":`Delete it`,"explorer.cancelDelete":`Keep it`,"explorer.deleteIsRecoverable":`Deleting this file also removes Include lines that directly reference it. A backup is kept so the file can be restored from History.`,"explorer.saveOrDiscardFirst":`There are unsaved edits. Save them or reopen the file before renaming or deleting it.`,"explorer.newFileNote":`To make OpenSSH read a new file, reference it with an Include directive in ~/.ssh/config. Move connections between groups on the Connections screen.`,"explorer.diagnostics":`Diagnostics`,"explorer.noIncludeProblem":`No Include problem detected.`,"explorer.opened":`Opened {path} at line {line}.`,"explorer.selectFile":`Select a file to edit its full text.`,"explorer.emptyHeading":`Select a configuration file`,"explorer.unsaved":`Unsaved changes`,"explorer.fileText":`File text — {path}. The content is written back exactly as entered.`,"explorer.preview":`Preview`,"explorer.saveFile":`Save file`,"groups.loading":`Loading groups…`,"groups.pageTitle":`Groups`,"groups.pageDescription":`Organise connections and keys into nested groups, then apply shared SSH settings to each group.`,"groups.metricGroups":`Groups`,"groups.metricConnections":`Connections`,"groups.metricDraft":`Unsaved drafts`,"groups.empty":`No group exists yet. Create one below to organise related connections and keys.`,"groups.nameTaken":`A group with this name already exists. Enter a different name.`,"groups.chooseGroupAndKeyword":`Choose a group and a directive keyword.`,"groups.unbalancedQuote":`A value has an unbalanced quote. OpenSSH has no escape inside quotes, so this cannot be saved.`,"groups.renameNeedsName":`Enter a new name for the group.`,"groups.renameCollides":`{name} already exists. Rename it to something else, or remove one of the two.`,"groups.compileNote":`Groups compile into ordinary Host blocks in {file}, with child groups written before their parents so OpenSSH keeps the most specific value it reads first.`,"groups.members":`Members:`,"groups.noMembers":`none`,"groups.colour":`Colour`,"groups.clearColour":`Clear {name} colour`,"groups.renameTo":`Rename {name} to`,"groups.renameShort":`New name`,"groups.rename":`Rename {name}`,"groups.displayOrder":`Display order`,"groups.hide":`Hide {name} from Connections`,"groups.hideOnlyContainers":`This group contains direct connections, which would also be hidden. Move them into a child group first.`,"groups.remove":`Remove {name}`,"groups.newName":`New group name`,"groups.invalidName":`A group name is a relative directory path: letters, digits, dot, dash and underscore, slash-separated, at most six levels deep.`,"groups.directoryNote":`Each group is a directory. Connections are stored in {connections}// and keys in {keys}//. sshc adds one Include line per group to ~/.ssh/config, making the read order and setting precedence explicit instead of relying on a wildcard.`,"groups.howItWorks":`How groups map to SSH files`,"groups.directories":`{connections}/ · {keys}/`,"groups.nestingNote":`Use a slash to nest: work/eu is a group inside work.`,"groups.addChild":`Add a group inside {name}`,"groups.listLabel":`Groups, parent before child`,"groups.orderNote":`Listed as a tree, parent first. The Include lines are written in the opposite order — deepest group first — because OpenSSH keeps the first value it reads, so a child's setting has to be read before its parent's.`,"groups.removeInto":`Remove {name}`,"groups.removeIntoShort":`Move its connections to`,"groups.removeIntoNone":`No group (connections/ itself)`,"groups.removeExplain":`Removing {name} takes away its Include line and its group settings. Its {count} connections have to go somewhere:`,"groups.removeExplainEmpty":`Removing {name} deletes its Include line and group settings. The group contains no connections, so no connection files are moved.`,"groups.removeKeepsFiles":`No configuration file is deleted. The change is one transaction, so History can undo it.`,"groups.removeConfirm":`Remove {name}`,"groups.removeCancel":`Keep it`,"groups.unsaved":`Not saved`,"groups.unsavedBarLabel":`Unsaved group changes`,"groups.unsavedBarNote":`Group additions and display settings are not saved yet. Save or discard them before renaming or removing a group.`,"groups.discard":`Discard group changes`,"groups.saveDraftFirst":`Save or discard the pending group changes before renaming or removing a group.`,"groups.savedNote":`There are no unsaved changes. Colour, display order, new groups, and new settings are applied with Save groups. Rename and Remove write to disk immediately.`,"groups.immediateActions":`Rename and remove write to disk immediately.`,"groups.newGroupNote":`This group does not have a directory yet. Save groups creates it; Rename and Remove become available afterwards.`,"groups.addHeading":`Add a group`,"groups.add":`Add group`,"groups.settingHeadingFor":`Add a setting to {name}`,"groups.directive":`Directive`,"groups.value":`Value`,"groups.addSetting":`Add setting`,"groups.previewChanges":`Preview group changes`,"groups.save":`Save groups`,"tree.navLabel":`Connections`,"tree.ungrouped":`Ungrouped`,"tree.byGroups":`Groups`,"tree.groupFilter":`Filter by group`,"tree.groupSection":`{name} group, {count} connections`,"tree.filter":`Filter connections`,"tree.filterPlaceholderExpanded":`Search name, destination, user, group or tag`,"tree.allConnections":`All`,"tree.resultsLabel":`Connection results`,"tree.resultCount":`{visible} of {total}`,"tree.sortLabel":`Connection order`,"tree.sortConfigured":`Configured order`,"tree.sortName":`Name`,"tree.noMatch":`No connection matches this filter.`,"tree.collapse":`Collapse {name}`,"tree.expand":`Expand {name}`,"tree.duplicateAlias":`duplicate alias`,"tree.dragGroupHint":`Drag a group to nest or reorder it.`,"browser.invalidUrl":`This connection URL is not recognised.`,"browser.backToServers":`Back to servers`,"browser.duplicateAlias":`duplicate alias`,"conn.loading":`Loading connections…`,"conn.heading":`Connections`,"conn.count":`{count} available`,"conn.new":`New connection`,"conn.resizeGroups":`Resize the groups column`,"conn.resizeList":`Resize the connection list`,"conn.allConnections":`All connections`,"conn.createAnother":`Create another connection`,"conn.cancelCreate":`Cancel`,"conn.create":`Create connection`,"conn.createTitle":`Create connection`,"conn.createDescription":`Save an SSH destination and choose its authentication method.`,"conn.createConnectionSection":`Connection`,"conn.createName":`Connection name`,"conn.createNameRequired":`Connection name (required)`,"conn.createGroup":`Save in group`,"conn.createManageGroups":`Manage groups`,"conn.createNoGroup":`No group`,"conn.createHostName":`Host name or IP address`,"conn.createHostNameRequired":`Host name or IP address (required)`,"conn.createUser":`User (optional)`,"conn.createPort":`Port (optional)`,"conn.createPortHint":`Defaults to 22.`,"conn.createAuthenticationSection":`Authentication`,"conn.createAuthenticationMethod":`Authentication method`,"conn.createDedicatedPassword":`Encrypted password for this connection`,"conn.createSavedPassword":`Saved password`,"conn.createNewSharedPassword":`New saved password`,"conn.createIdentityFile":`SSH private key`,"conn.createConnectionPassword":`Connection password`,"conn.createDedicatedHint":`Encrypted in the vault and not listed as a reusable password.`,"conn.createChooseSavedPassword":`Saved password`,"conn.createSavedHint":`This connection will share the selected reusable password.`,"conn.createNoSavedPasswords":`No saved passwords`,"conn.createSavedPasswordName":`Saved password name`,"conn.createNewPassword":`New password`,"conn.createPrivateKey":`SSH private key`,"conn.createNoPrivateKeys":`No private keys available`,"conn.createNoPrivateKeysHint":`Create a private key first if you do not want to use a password.`,"conn.createCreatePrivateKey":`Create a private key`,"conn.createLoadingOptions":`Loading authentication options…`,"conn.createOptionsFailed":`Authentication options could not be loaded.`,"conn.createMasterPassword":`Master password`,"conn.createConfirmMaster":`Confirm master password`,"conn.createInitialiseVault":`Create encrypted vault`,"conn.createUnlockVault":`Unlock vault`,"conn.createVaultMissing":`Create the encrypted vault before saving this connection.`,"conn.createVaultLocked":`Unlock the encrypted vault before saving this connection.`,"conn.createVaultFailed":`The encrypted vault could not be created.`,"conn.createUnlockFailed":`The encrypted vault could not be unlocked.`,"conn.createNeedVault":`Unlock the encrypted vault to continue.`,"conn.createNeedConnectionPassword":`Enter a connection password to continue.`,"conn.createNeedSavedPassword":`Choose a saved password to continue.`,"conn.createNeedSavedPasswordName":`Enter a saved password name to continue.`,"conn.createNeedNewPassword":`Enter the new password to continue.`,"conn.createNeedPrivateKey":`Choose or create a private key to continue.`,"conn.createDraftWaiting":`Connection setup for {alias} is paused.`,"conn.createUntitledDraft":`Untitled connection`,"conn.createReturnToDraft":`Return to connection setup`,"conn.createAliasRequired":`Enter a connection name.`,"conn.createAliasInvalid":`Use letters, numbers, dot, dash, or underscore; start with a letter or number.`,"conn.createHostRequired":`Enter a host name or IP address.`,"conn.createHostInvalid":`Enter a DNS name, IPv4 address, or unbracketed IPv6 address.`,"conn.createUserInvalid":`User cannot contain whitespace or control characters.`,"conn.createPortInvalid":`Port must be a whole number from 1 to 65535.`,"conn.creating":`Creating…`,"conn.createFailed":`The connection could not be created.`,"conn.createAliasTaken":`Another connection already uses that name.`,"conn.duplicateAliasTaken":`{alias} already exists, so this connection cannot be duplicated.`,"conn.createGroupMissing":`The selected group is no longer declared. Reload and choose another group.`,"conn.createKeyInvalid":`The selected private key is no longer available. Reload and choose another key.`,"conn.createCredentialMissing":`The selected saved password is no longer available. Reload and choose another one.`,"conn.createDestinationExists":`A connection file with that name already exists in this group.`,"conn.basicConnection":`Connection`,"conn.basicAuthentication":`Authentication`,"conn.basicHostName":`Host name or IP address`,"conn.basicServerKeyInvalid":`The selected SSH private key is no longer available. Reload and choose it again.`,"conn.basicCredentialExists":`A saved password with this name already exists. Choose it under Saved password or use another name.`,"conn.basicCredentialMissing":`The selected saved password no longer exists. Reload and choose another one.`,"conn.basicPasswordMissing":`This connection no longer has a stored password to remove.`,"conn.basicUser":`User`,"conn.basicPort":`Port`,"conn.basicPrivateKey":`SSH private key`,"conn.basicStoredPassword":`Stored password`,"conn.basicStoredTOTP":`One-time password (TOTP)`,"conn.basicThisConnection":`Set on this connection.`,"conn.basicInheritedFrom":`Inherited from {path}:{line}.`,"conn.basicSSHDefault":`SSH default. Saving another field will not write this value.`,"conn.basicReadOnlyAdvanced":`Read-only in Basic; the original directives remain available in Advanced.`,"conn.basicComplex":`This connection has multiple direct {keyword} values. Resolve them in Advanced.`,"conn.basicUseInheritedHost":`Use inherited/default host name`,"conn.basicUseInheritedUser":`Use inherited/default user`,"conn.basicUseInheritedPort":`Use inherited/default port`,"conn.basicKeepDirect":`Keep this connection value`,"conn.basicAgentOrInherited":`SSH agent or inherited keys`,"conn.basicManageKeyPassphrase":`Save or change key passphrase`,"conn.basicKeyPassphraseHeading":`Saved key passphrase`,"conn.basicKeyPassphraseUnencrypted":`This private key is not encrypted, so it needs no saved passphrase.`,"conn.basicKeyPassphraseNone":`No passphrase is saved for this key.`,"conn.basicKeyPassphraseDedicated":`A passphrase is saved only for this key.`,"conn.basicKeyPassphraseShared":`This key uses the shared saved passphrase “{name}”.`,"conn.basicKeyPassphraseSharedOthers":`It is also used by {count} other key(s).`,"conn.basicKeyPassphraseDetach":`Saving here creates a passphrase dedicated to this key. The shared credential and its other assignments remain unchanged.`,"conn.basicNewKeyPassphrase":`New saved key passphrase`,"conn.basicConfirmKeyPassphrase":`Confirm saved key passphrase`,"conn.basicKeyPassphraseMismatch":`The key passphrases do not match.`,"conn.basicKeyPassphraseStoredNote":`This saves the passphrase used to decrypt the private key. It does not change the passphrase that encrypts the private-key file.`,"conn.basicKeyPassphraseWrong":`The entered passphrase does not unlock the selected private key.`,"conn.basicKeyPassphraseChanged":`The selected private key changed. Reload before saving its passphrase.`,"conn.basicGeneratedKeyStaged":`{path} is staged for this connection. Choose Save Basic settings to apply it.`,"conn.basicCustomKey":`This connection uses the custom IdentityFile path {path}. Edit it in Advanced.`,"conn.basicComplexKey":`This connection has multiple direct IdentityFile values. Resolve them in Advanced.`,"conn.basicAssignedDedicated":`A connection-only password is assigned. Its value is never displayed.`,"conn.basicAssignedNamed":`Assigned: {name}`,"conn.basicNoPassword":`No stored password is assigned.`,"conn.basicNoTOTP":`No one-time password is assigned.`,"conn.basicAssignedTOTP":`Assigned: {name}`,"conn.basicRouteConfirmHeading":`Use saved credentials on this route?`,"conn.basicRouteConfirmBody":`The authentication route changed. Saving allows the assigned password or one-time password to be used on the current route.`,"conn.basicRouteConfirmSave":`Save and confirm`,"conn.basicRouteConfirmCancel":`Cancel`,"conn.basicTOTPAction":`One-time password action`,"conn.basicTOTPUnchanged":`No assignment change`,"conn.basicUseSavedTOTP":`Assign a saved TOTP`,"conn.basicRemoveTOTP":`Remove TOTP assignment`,"conn.basicChooseSavedTOTP":`Saved TOTP`,"conn.basicNoSavedTOTPs":`No TOTP is stored in Vault`,"conn.basicTOTPNote":`Register TOTP seeds in the Vault, then assign one to this connection here. sshc only enters the code when an authentication prompt explicitly requests it, such as “Verification code”.`,"conn.basicPasswordCleanup":`A stored password is still assigned, but sshc will not use it. Saving Basic settings will remove this connection's assignment; a shared credential and its other hosts remain unchanged.`,"conn.basicPasswordAction":`Stored password action`,"conn.basicPasswordUnchanged":`No password change`,"conn.basicReplaceDedicated":`Replace with a connection-only password`,"conn.basicRemovePassword":`Remove stored password`,"conn.basicConfirmRemove":`Confirm stored password removal`,"conn.basicEmptyPasswordUnchanged":`Leaving this empty makes no password change.`,"conn.basicVaultMissing":`Create the encrypted vault before saving Basic settings.`,"conn.basicVaultLocked":`Unlock the encrypted vault before saving Basic settings.`,"conn.basicNeedVault":`Unlock the encrypted vault to save this draft.`,"conn.basicPasswordBlocked":`The current SSH settings block adding or replacing a stored password.`,"conn.basicOptionsFailed":`Keys and password options could not be loaded.`,"conn.basicCredentialOptionsFailed":`Saved password options could not be loaded.`,"conn.basicSaveFailed":`Basic settings could not be saved. Nothing was changed; review the error or reload and try again.`,"conn.basicRefreshFailed":`The settings were saved, but their updated password status could not be loaded. Reload this connection.`,"conn.basicConnectionRefreshFailed":`The settings were saved, but the updated connection could not be loaded. Reload this connection.`,"conn.basicSave":`Save Basic settings`,"conn.basicSaving":`Saving…`,"conn.discardChanges":`Discard changes`,"conn.blockMoved":`This block moved on disk. Reload the connection and try again.`,"conn.emptyHeading":`Choose a connection`,"conn.emptyHint":`Select a host from the list to edit its SSH settings, or create a new connection.`,"conn.assignKeyHeading":`Choose a connection for this key`,"conn.assignKeyHint":`Select a connection to stage {path} in its Basic settings. Nothing changes until you save.`,"conn.missingHeading":`This connection is no longer available`,"conn.missingHint":`It may have been renamed, moved or deleted since this link was created.`,"conn.backToList":`Back to connections`,"conn.summaryUnsaved":`Unsaved changes`,"conn.summaryGroup":`Group`,"conn.summaryPrivateKey":`SSH private key`,"conn.summaryKeyNone":`SSH agent or inherited keys`,"conn.summaryKeyComplex":`Multiple IdentityFile directives`,"conn.summaryKeyUnavailable":`{path} — key details unavailable`,"conn.summaryKeyPassphrase":`Key passphrase`,"conn.summaryKeyPassphraseNone":`No passphrase saved`,"conn.summaryKeyPassphraseDedicated":`Saved only for this key`,"conn.summaryKeyPassphraseNamed":`Saved passphrase: {name}`,"conn.summaryKeyPassphraseNotNeeded":`Not needed for this unencrypted key`,"conn.summaryAccountPassword":`Account password`,"conn.summaryPasswordNone":`No saved password`,"conn.summaryPasswordDedicated":`Connection-only password saved`,"conn.summaryPasswordNamed":`Saved password: {name}`,"conn.summaryPasswordRouteStale":`Saved password paused`,"conn.summaryPasswordCleanup":`A stored password is assigned but is not used and will be unassigned when Basic settings are saved.`,"conn.summaryLocked":`Unavailable while the vault is locked`,"conn.summaryUnavailable":`Could not load this status`,"conn.summaryDraftBlocksActions":`Save or discard this draft before using the saved connection.`,"conn.summaryRefreshing":`Reloading the saved connection. Actions will be available when it finishes.`,"conn.editorLabel":`Connection editor`,"conn.areaBasic":`Basic`,"conn.areaAnalysis":`Analysis`,"conn.areaAdvanced":`Advanced`,"conn.areaSshc":`sshc`,"conn.checksLabel":`Connection checks`,"conn.checkReachability":`Check reachability`,"conn.checkAuthentication":`Check authentication with saved settings`,"conn.checking":`Checking…`,"conn.checksExecutableHeading":`Authentication may execute SSH directives`,"conn.checksExecutableHint":`Review the exact saved directives before allowing the authentication check to continue.`,"conn.checksDirectiveAt":`{keyword} at {path}:{line}`,"conn.checksAcknowledge":`Acknowledge and check authentication`,"conn.analysisLabel":`Settings analysis`,"conn.analysisExplained":`Resolved saved values`,"conn.analysisExplainedHint":`These are the values used by this connection. They are resolved without executing commands. Settings that cannot be resolved are identified explicitly.`,"conn.analysisAuthoritative":`Where each value comes from`,"conn.analysisAuthoritativeHint":`Lists every line read for the saved connection, the file containing it, and whether the line takes effect.`,"conn.analysisRun":`Show the sources`,"conn.analysisRunning":`Reading…`,"conn.analysisExecutableHeading":`This connection includes directives that may cause OpenSSH to run commands`,"conn.analysisTokenWarning":`OpenSSH does not shell-escape expanded tokens. Host name, port, or user values may therefore reach the command's shell unescaped.`,"conn.analysisSources":`Configuration lines related to this connection`,"conn.advancedLabel":`Advanced settings`,"conn.advancedViews":`Advanced setting views`,"conn.advancedViewLabel":`View`,"conn.advancedDirectives":`Directives`,"conn.portForwarding":`Port forwarding`,"conn.forwardLoopbackOnly":`Listeners are bound to this device only (127.0.0.1), but other OS accounts on the same device may be able to use them. Remote forwarding is not supported.`,"conn.forwardNoneSaved":`No port forwarding is saved for this connection.`,"conn.forwardLocal":`Local tunnel`,"conn.forwardDynamic":`SOCKS proxy`,"conn.forwardType":`Type`,"conn.forwardListenPort":`Local port`,"conn.forwardDestination":`Destination`,"conn.forwardDestinationHint":`Enter the host name or IP address and port as seen from the SSH server.`,"conn.forwardDynamicHint":`The application using this SOCKS proxy chooses the destination for each connection.`,"conn.forwardAdd":`Add forwarding`,"conn.forwardPendingSave":`This forwarding will be written when you save the changes.`,"conn.forwardInvalidPort":`Enter a local port from 1 to 65535.`,"conn.forwardInvalidDestination":`Enter the destination as host:port.`,"conn.advancedNoFields":`This connection has no settings in this view.`,"conn.advancedRawBlocksFields":`Raw has unsaved changes. Discard or save it before editing directives.`,"conn.advancedFieldsBlockRaw":`Directives have unsaved changes. Discard or save them before editing Raw.`,"conn.connect":`Connect`,"conn.opening":`Opening…`,"conn.duplicate":`Duplicate connection`,"conn.manageLabel":`Manage connection`,"conn.manageIndependent":`Each action is saved independently of Basic and Advanced settings.`,"conn.manageDraftBlocked":`Save or discard the editor draft before changing connection identity or storage.`,"conn.discardPrompt":`Discard the unsaved connection changes and leave this connection?`,"conn.keepEditing":`Keep editing`,"conn.reloadConnection":`Reload saved connection`,"conn.moveToFile":`Storage file`,"conn.moveToFilePlaceholder":`Choose a storage file…`,"conn.move":`Change storage file`,"conn.storageFileNote":`Primary group controls where sshc organises the connection. Storage file is an advanced override that selects the exact SSH configuration file.`,"conn.confirmDelete":`Delete it`,"conn.deleteHeading":`Delete {alias}?`,"conn.deleteBody":`This removes the Host block from your configuration. You can restore it from History.`,"conn.deleteCancel":`Keep it`,"conn.delete":`Delete connection`,"host.tabJump":`Jump Host`,"host.tabRaw":`Raw`,"host.unbalancedQuote":`A value has an unbalanced quote. OpenSSH has no escape inside quotes, so this cannot be saved.`,"host.needsKeyword":`A directive needs a keyword.`,"host.dangerousField":`{keyword} can run a command when OpenSSH evaluates this host. It is stored as written and never executed here.`,"host.keep":`Keep`,"host.remove":`Remove`,"host.newDirective":`New directive`,"host.newValue":`New value`,"host.addDirective":`Add directive`,"host.saveChanges":`Save changes`,"host.blockText":`Block text. Comments, blank lines and unknown directives are written back exactly as typed.`,"host.saveBlock":`Save block`,"host.noDestination":`This block matches by pattern and names no destination of its own, so there is nothing to diagnose. Open a connection with a concrete alias instead.`,"host.primaryGroup":`Primary group`,"host.groupNone":`None`,"host.groupNoneMeans":`Choosing none moves the connection back into ~/.ssh/config, at the end of the file.`,"host.moveToGroup":`Move to this group`,"host.comment":`Comment`,"host.commentNote":`Written into the configuration file above the Host line, so it is there for anyone reading the file without sshc.`,"host.commentFromNote":`This started as a note stored only by sshc. Saving it writes it into the configuration file and retires the note.`,"host.saveComment":`Save comment`,"host.os":`Operating system icon`,"host.osAutomatic":`Auto-detect after connecting`,"host.osGeneric":`Generic server`,"host.osUnknown":`OS unknown`,"host.osHint":`Detected after connecting. Choose an icon to override detection.`,"host.colour":`Colour`,"host.clearColour":`Clear colour`,"host.displayOrder":`Display order — lower sorts earlier; 0 leaves this host where the file puts it`,"host.tags":`Tags, comma separated`,"host.renameAlias":`Rename alias`,"host.rename":`Rename`,"keys.heading":`Keys`,"keys.pageDescription":`Review private keys, public keys, certificates, and their references, then manage creation, updates, and deletion.`,"keys.search":`Search keys`,"keys.searchPlaceholder":`file, host or fingerprint`,"keys.metricFiles":`Classified SSH files`,"keys.metricPrivate":`Private keys`,"keys.metricAttention":`Needs attention`,"keys.noMatches":`No key matches this search.`,"keys.reading":`Reading the ssh directory…`,"keys.unreadable":`The ssh directory could not be read. Restart sshc and try again.`,"keys.createFailed":`The key could not be created. Check the name, the algorithm and the passphrase.`,"keys.passphraseFailed":`The passphrase could not be changed. Check the current passphrase and try again.`,"keys.agentFailed":`The key could not be added to ssh-agent. Check the passphrase and confirm that this process can connect to a running ssh-agent.`,"keys.publicKeyFailed":`The public key could not be read.`,"keys.trashFailed":`The key could not be moved to the trash.`,"keys.restoreFailed":`The entry could not be restored.`,"keys.restoreRefused":`The entry cannot be restored: {blockers}`,"keys.purgeFailed":`The entry could not be deleted permanently.`,"keys.tableCaption":`Files classified by content and permissions`,"keys.inventoryEmpty":`Nothing under ~/.ssh yet. Create a key below.`,"keys.colFile":`File`,"keys.colKind":`Kind`,"keys.kind.privateKey":`Private key`,"keys.kind.publicKey":`Public key`,"keys.kind.certificate":`Certificate`,"keys.kind.other":`Other file`,"keys.kind.unreadable":`Unreadable file`,"keys.colAlgorithm":`Algorithm`,"keys.colFingerprint":`Fingerprint`,"keys.colPermissions":`Permissions`,"keys.colUsedBy":`Used by`,"keys.colState":`State`,"keys.stateInAgent":`registered with ssh-agent`,"keys.stateUsedBy":`referenced by {count}`,"keys.usedByNothing":`No connection references this key`,"keys.inspectorLabel":`Key details`,"keys.colActions":`Actions`,"keys.showDetails":`Show details`,"keys.hideDetails":`Hide details`,"keys.actionsHeading":`Actions for {path}`,"keys.keyActions":`Key actions`,"keys.permissionRisk":`Permissions too open`,"keys.showPublicKey":`Show public key`,"keys.relatedPublicFiles":`Public key files ({count})`,"keys.showPrivateKey":`Show private key`,"keys.changePassphrase":`Change passphrase`,"keys.manageStoredPassphrase":`Save passphrase`,"keys.storedPassphraseHeading":`Saved passphrase: {path}`,"keys.storedPassphraseNote":`Save this encrypted key's passphrase in the sshc vault, or assign an existing named passphrase. Values are encrypted with the master password and are not displayed here after saving.`,"keys.newStoredPassphraseName":`Passphrase name`,"keys.newStoredPassphraseValue":`Passphrase value`,"keys.storeAndUsePassphrase":`Save and use for this key`,"keys.storedPassphraseExists":`A passphrase with this name already exists. Select it above or choose a new name.`,"keys.unassignPassphrase":`Stop using it`,"keys.storePassphraseFailed":`The passphrase could not be saved and assigned to this key.`,"keys.unassignPassphraseFailed":`The stored passphrase could not be detached from this key.`,"keys.addToAgent":`Add to ssh-agent`,"keys.removeFromAgent":`Remove from ssh-agent`,"keys.agentRemoveFailed":`The key could not be removed from ssh-agent. It may already have been removed, or the required public key may be missing.`,"keys.trashConfirmHeading":`Move {path} to the trash`,"keys.trashExplain":`These files move together, because they are one key:`,"keys.trashReferences":`{count} Host block(s) still reference this key. After the move, their IdentityFile lines will reference a missing file. ssh reports the error and then tries other authentication methods.`,"keys.trashNoReferences":`No Host block references this key.`,"keys.trashIsRecoverable":`Nothing is deleted. The files move into the trash below, where they can be restored.`,"keys.trashConfirm":`Move it to the trash`,"keys.trashCancel":`Keep it`,"keys.moveToTrash":`Move to trash`,"keys.publicKeyHeading":`Public key: {path}`,"keys.publicKeyLabel":`Public key`,"keys.close":`Close`,"keys.unreadableHeading":`Files this scan could not classify`,"keys.unreadableNote":`These are inside ~/.ssh and are missing from the table above. Nothing was changed about them.`,"keys.unresolvedHeading":`Configuration entries pointing at a key that is not there`,"keys.agentHeading":`ssh-agent`,"keys.agentEmpty":`ssh-agent is reachable, but no keys are registered.`,"keys.agentIdentitiesCaption":`Keys registered with ssh-agent`,"keys.colComment":`Comment`,"keys.agentUnavailable":`This process cannot connect to ssh-agent, so keys cannot be registered. Both the ssh-add command and an SSH_AUTH_SOCK that identifies the agent are required.`,"keys.agentDelegationsNote":`These configuration entries use a key from ssh-agent instead of referencing a key file:`,"keys.registerHeading":`Add to ssh-agent: {path}`,"keys.registerNote":`The passphrase is passed to ssh-add through standard input, so it is not included in the command line or child-process environment. sshc does not store it or retain it after this operation.`,"keys.keyPassphrase":`Key passphrase`,"keys.lifetime":`Lifetime`,"keys.lifetimeForever":`Until ssh-agent exits`,"keys.lifetimeHour":`1 hour`,"keys.lifetimeFourHours":`4 hours`,"keys.lifetimeTwelveHours":`12 hours`,"keys.useStoredPassphrase":`Use a stored passphrase`,"keys.choosePassphraseName":`— choose a name —`,"keys.useThisPassphrase":`Use this passphrase`,"keys.usesStoredPassphrase":`This key uses the stored passphrase named {name}.`,"keys.usesDedicatedPassphrase":`A passphrase is saved only for this key.`,"keys.typedWins":`Leave this empty to use the saved passphrase. If you enter a value, that value is used instead.`,"keys.assignPassphraseFailed":`The selected passphrase could not be assigned to this key.`,"keys.registerSubmit":`Add key to ssh-agent`,"keys.cancel":`Cancel`,"keys.passphraseHeading":`Change passphrase: {path}`,"keys.passphraseNote":`The passphrases typed here are used only for this change and are not stored. Use “Save passphrase” in the key list when you want the sshc Vault to remember one.`,"keys.currentPassphrase":`Current passphrase`,"keys.newPassphrase":`New passphrase`,"keys.removePassphrase":`Remove the passphrase and leave the key unprotected on disk`,"keys.savePassphrase":`Change passphrase`,"keys.createHeading":`Create a key`,"keys.generatedHeading":`Key created`,"keys.generatedNext":`{path} is ready. Choose where to use it next.`,"keys.assignGenerated":`Assign to a connection`,"keys.installGenerated":`Install on a server`,"keys.algorithm":`Algorithm`,"keys.fileName":`File name`,"keys.comment":`Comment`,"keys.passphrase":`Passphrase`,"keys.createUnencrypted":`Create without a passphrase, and accept that anyone who reads the file can use the key`,"keys.createSubmit":`Create key`,"keys.showTerminalCommand":`Show Terminal command`,"keys.hardwareNote":`Creating a hardware-backed key requires interaction with a security key, so sshc does not support it. Run this command in a terminal:`,"keys.trashHeading":`Trash`,"keys.trashSummary":`Trash ({count})`,"keys.trashNote":`Keys moved to Trash remain here until you delete them permanently. They are not deleted automatically.`,"keys.trashCaption":`Soft-deleted keys`,"keys.trashEmpty":`Trash is empty.`,"keys.colFiles":`Files`,"keys.colAge":`Age`,"keys.colStatus":`Status`,"keys.ageStale":`{days} days · older than {retention} days`,"keys.age":`{days} days`,"keys.restorable":`Restorable`,"keys.restore":`Restore`,"keys.purgeWarning":`This cannot be undone. There is no backup of a permanently deleted key.`,"keys.confirmPurge":`Confirm permanent deletion`,"keys.purge":`Delete permanently`,"keys.noteFingerprintUnavailable":`Fingerprint unavailable`,"keys.noteSymbolicLink":`Symbolic link, not followed`,"keys.noteEmptyFile":`Empty file`,"keys.noteNotRegularFile":`Not a regular file`,"keys.noteCommentNotPreserved":`Comment not preserved`,"keys.certKeyId":`key id {keyId}`,"keys.certFor":`for {principals}`,"keys.certAnyPrincipal":`for any principal`,"keys.certNeverExpires":`never expires`,"keys.certExpired":`expired {when}`,"keys.certValidUntil":`valid until {when}`,"keys.certSigns":`signs {keyType} {fingerprint}`,"keys.reference":`{directive} {value} — {path}:{line}`,"keys.referenceWithReason":`{directive} {value} — {path}:{line} ({reason})`,"keys.unreadableEntry":`{path} — {reason}`,"keys.colChoose":`Choose`,"keys.chooseKey":`Choose {path}`,"keys.listFilter":`What to list`,"keys.listFilterKeys":`Keys only`,"keys.listFilterAll":`Every file in ~/.ssh`,"keys.dragKey":`Drag {path}`,"keys.chosenCount":`{count} selected`,"keys.moveTargetLabel":`Move into`,"keys.moveChosen":`Move`,"keys.clearChosen":`Clear the selection`,"keys.moveMoved":`Moved {count}.`,"keys.moveBlocked":`{path} cannot be moved: {reason}`,"keys.moveFailed":`{path} could not be moved.`,"keys.folders":`Folders`,"keys.foldersLabel":`Key folders`,"keys.folderRow":`{name}, {count}`,"keys.folderAll":`All keys`,"keys.folderUngrouped":`No group`,"keys.relocate":`Rename or move`,"keys.relocateHeading":`Rename or move: {path}`,"keys.relocateNote":`Changing the name or group moves the key files. Every IdentityFile and CertificateFile that references this key is updated in the same transaction, so no reference to the old path remains.`,"keys.relocateNewName":`Name`,"keys.relocateGroup":`Group`,"keys.relocateSubmit":`Rename or move the key`,"keys.relocateFailed":`The key could not be moved.`,"keys.relocateDone":`Now at {path}.`,"keys.relocateMoved":`Files moved`,"keys.relocateRewritten":`Configuration entries rewritten`,"keys.relocateSkipped":`Not moved because the file name is not the key name followed by a suffix: {paths}`,"keys.relocateRefused":`Nothing was moved and nothing was written:`,"keys.relocateFilePair":`{from} → {to}`,"keys.relocateReference":`{directive} {from} → {to} — {path}:{line}`,"keys.groupNone":`No group (~/.ssh itself)`,"keys.createGroup":`Group`,"keys.blockerTargetOccupied":`{detail} already exists`,"keys.blockerUnresolved":`{detail} is a path that sshc cannot resolve and may reference this key`,"keys.blockerReferenceExternal":`{detail} is outside ~/.ssh and cannot be rewritten`,"keys.blockerGroupNotDeclared":`no Include line declares the group {detail}`,"keys.blockerDestinationIsConfig":`an Include would read {detail} as configuration`,"keys.blockerStateDirectory":`{detail} is inside the engine's own state directory`,"keys.blockerOther":`{detail}`},ja:{"shortcuts.heading":`Keyboard shortcuts`,"shortcuts.description":`ショートカットのプリセットを共有し、このブラウザーで使うものを選びます。`,"shortcuts.confirmDelete":`同期中のすべての端末からこのプリセットを削除しますか?`,"shortcuts.deleteBody":`{name} は同期しているすべての端末から消え、元に戻せません。`,"shortcuts.deleteEverywhere":`すべての端末から削除`,"shortcuts.cancelDelete":`キャンセル`,"shortcuts.preset":`このブラウザーのプリセット`,"shortcuts.defaultPreset":`標準`,"shortcuts.presetName":`プリセット名`,"shortcuts.duplicate":`複製して保存`,"shortcuts.rename":`名前を変更`,"shortcuts.delete":`プリセットを削除`,"shortcuts.reloadRequired":`プリセットの読み込み、または保存ができませんでした。再読み込みして最新の内容を確認してください。`,"shortcuts.reload":`再読み込み`,"shortcuts.loading":`プリセットを読み込み中…`,"shortcuts.hint":`割り当て欄を押し、Ctrl・Alt・Meta(Command)を含む組み合わせ、またはファンクションキーを入力してください。Escで中止、Tabで次の項目へ移動します。プリセットの内容は端末間で同期され、使用するプリセットはブラウザーごとに保持されます。標準の編集時は個人用プリセットを作成します。選択中のプリセットが削除された場合は標準に戻ります。ブラウザーやOSのショートカットが優先される場合があります。コピー・貼り付け・ターミナル内検索はターミナル内で有効です。`,"shortcuts.palette":`コマンド検索`,"shortcuts.terminalSearch":`ターミナル内検索`,"shortcuts.copy":`選択範囲をコピー`,"shortcuts.paste":`貼り付け`,"shortcuts.nextSession":`次のコネクション`,"shortcuts.previousSession":`前のコネクション`,"shortcuts.home":`Homeを開く`,"shortcuts.sftp":`SFTPを開く`,"shortcuts.assign":`キーを割り当て: {action}`,"shortcuts.clearAction":`割り当てを解除: {action}`,"shortcuts.clear":`解除`,"shortcuts.recording":`キーを入力…(Escで中止)`,"shortcuts.unassigned":`未設定`,"shortcuts.reset":`初期設定に戻す`,"shortcuts.saved":`キー設定を保存しました。`,"shortcuts.saveFailed":`保存できませんでした。プリセットを再読み込みし、接続状態とブラウザーの保存設定を確認してください。`,"shortcuts.conflict":`{action}に割り当て済みです。先にその割り当てを解除してください。`,"shell.title":`sshc`,"shell.starting":`ローカルセッションを開始しています…`,"shell.vaultChecking":`保護された内容を再表示する前に、Vault のロック状態を確認しています…`,"shell.vaultCheckRetrying":`Vault の状態を確認できませんでした。保護された内容を隠したまま再試行します。`,"shell.active":`ローカルセッション稼働中 · {version}`,"shell.bootstrapFailed":`ローカルセッションを開始できませんでした。ターミナルで sshc を一度実行し、このブラウザーを登録し直してください。`,"shell.bootstrapRetry":`もう一度試す`,"shell.sessionEndedHeading":`セッションが終了しました`,"shell.sessionEnded":`再読み込みするとローカルセッションを自動で復旧します。このブラウザーの登録が無効な場合だけ、ターミナルで sshc を一度実行してください。`,"shell.sessionReload":`セッションを再読み込み`,"shell.pageNotFound":`ページが見つかりません`,"shell.pageNotFoundDescription":`この URL に対応する sshc の画面はありません。`,"shell.goHome":`ホームへ移動`,"shell.primaryNavigation":`メインナビゲーション`,"shell.navigationToggle":`ナビゲーション`,"shell.navigationResize":`ナビゲーションの幅を変更`,"shell.sessions":`Sessions`,"shell.navStart":`Main`,"shell.navConnections":`Configuration`,"shell.navKeysHosts":`Security`,"shell.navVault":`Vault`,"shell.navMaintenance":`Tools`,"menu.open":`{section}を開く`,"menu.displaySettings":`Preferences`,"menu.theme":`Theme`,"menu.language":`Language`,"shell.inspectorShowNamed":`{label}を表示`,"shell.inspectorHideNamed":`{label}を隠す`,"shell.inspectorAttention":`確認が必要な項目があります`,"palette.open":`Search`,"palette.heading":`セッション・ホスト・ファイル・スニペット・設定を検索`,"palette.placeholder":`セッション、ホスト、ファイル、スニペット、設定を検索`,"palette.results":`検索結果`,"palette.loading":`検索項目を読み込んでいます…`,"palette.empty":`一致する項目がありません`,"palette.hint":`↑↓ 選択 · Enter 開く · Esc 閉じる`,"palette.connectHost":`{alias} へ接続`,"palette.openHostSettings":`{alias} の接続設定を開く`,"palette.openSection":`セクションを開く`,"palette.kind.session":`セッション`,"palette.kind.host":`ホスト`,"palette.kind.file":`ファイル`,"palette.kind.snippet":`スニペット`,"palette.kind.setting":`設定`,"palette.kind.command":`操作`,"palette.newConnection":`接続を作成する`,"palette.newConnectionDetail":`新規接続のフォームを開く`,"palette.openRemoteFiles":`リモートファイルを開く`,"palette.openRemoteFilesDetail":`SFTPでホストのファイルを見る`,"palette.openLocalShell":`ローカルシェルを開く`,"palette.openLocalShellDetail":`このマシンでターミナルを起動する`,"palette.lockVault":`vaultをロックする`,"palette.lockVaultDetail":`マスターパスワードの入力をもう一度求める`,"table.sortAscending":`、昇順に並べ替え`,"table.sortDescending":`、降順に並べ替え`,"section.files":`SFTP`,"section.snippets":`Snippets`,"sftp.heading":`リモートファイル`,"sftp.tabs":`リモートファイルのタブ`,"sftp.primaryTabs":`左ペインのタブ`,"sftp.secondaryTabs":`右ペインのタブ`,"sftp.newTab":`新しいタブ`,"sftp.closeTab":`{name} のタブを閉じる`,"sftp.resizePanes":`ペインの幅を変更`,"sftp.dropTabLeft":`左に新しいペインで開く`,"sftp.dropTabRight":`右に新しいペインで開く`,"sftp.dropTabHere":`このペインへ移動`,"sftp.firstPane":`1つ目のリモートペイン`,"sftp.secondPane":`2つ目のリモートペイン`,"sftp.local.heading":`ローカルファイル`,"sftp.local.connection":`ローカル`,"sftp.local.engine":`sshcエンジン側`,"sftp.local.path":`ローカルフォルダのパス`,"sftp.local.editPath":`ローカルパスを編集`,"sftp.local.pathInput":`エンジン側のファイルパス`,"sftp.local.upload":`選択項目をアップロード`,"sftp.local.loading":`ローカルのディレクトリを読み込み中…`,"sftp.local.dropZone":`ローカルのファイル一覧とドロップ先`,"sftp.local.connectRemote":`アップロードするにはリモート側を接続してください。`,"sftp.host":`ホスト`,"sftp.noHosts":`保存済みホストなし`,"sftp.chooseHost":`ホストを選択`,"sftp.chooseHostHint":`ローカルか保存済みのSSHホストを選択してください。SSHホストは接続が必要です。`,"sftp.connect":`接続`,"sftp.connecting":`{alias} に接続しています…`,"sftp.readyToConnect":`{alias} は未接続です`,"sftp.connectHint":`SFTPは画面や保存済みタブを開いただけでは接続しません。`,"sftp.loading":`リモートディレクトリを読み込んでいます…`,"sftp.retry":`再試行`,"sftp.emptyDirectory":`このディレクトリは空です。`,"sftp.noFilterMatches":`絞り込みに一致する項目はありません。`,"sftp.clearFilterHint":`絞り込みを消すと、すべての項目が表示されます。`,"sftp.undo":`取り消す`,"sftp.dismissUndo":`取り消し通知を閉じる`,"sftp.renamedTo":`{name} へ名前を変更しました。`,"sftp.permissionsChanged":`権限を {mode} に変更しました。`,"sftp.leaveHeading":`保存せずに移動しますか?`,"sftp.leaveBody":`{path} には、サーバーへ書き込んでいない変更があります。`,"sftp.leaveDiscard":`破棄して移動`,"sftp.leaveStay":`編集を続ける`,"sftp.chooseHostHeading":`接続先を選択`,"sftp.closeHostPicker":`ホスト選択を閉じる`,"sftp.searchHosts":`接続先を検索`,"sftp.searchHostsPlaceholder":`名前、グループ、ホスト、ユーザーを検索`,"sftp.hostViews":`ホスト一覧の表示`,"sftp.recentHosts":`最近接続した順`,"sftp.hostGroups":`グループ`,"sftp.ungroupedHosts":`グループなし`,"sftp.noHostMatches":`検索に一致するホストはありません。`,"sftp.hostNoDetails":`SSHホスト`,"sftp.hostCurrent":`選択中`,"sftp.lastConnected":`最終接続 {at}`,"sftp.connectionFailed":`接続できませんでした。`,"sftp.path":`リモートパス`,"sftp.editPath":`パスを編集`,"sftp.go":`移動`,"sftp.navigation":`ディレクトリ移動`,"sftp.back":`戻る`,"sftp.forward":`進む`,"sftp.homeDirectory":`ホームディレクトリ`,"sftp.rootDirectory":`ルートディレクトリ`,"sftp.filter":`項目を絞り込み`,"sftp.filterPlaceholder":`絞り込み`,"sftp.searchBelow":`このディレクトリ配下を検索する`,"sftp.searchResults":`{path} 配下で「{query}」に一致: {count}件`,"sftp.searchResultsTruncated":`{path} 配下で「{query}」に一致した先頭{count}件。検索は途中で終了しました。`,"sftp.searchNoMatches":`このディレクトリ配下に「{query}」を含む名前はありません。`,"sftp.searchEnd":`検索を終える`,"sftp.revealInFolder":`この項目があるフォルダーへ移動`,"sftp.up":`上へ`,"sftp.parentDirectory":`親ディレクトリ`,"sftp.createActions":`作成・アップロード`,"sftp.noSelectionActions":`項目を選択すると操作できます`,"sftp.selectedActions":`{name}の操作`,"sftp.selectedActionsCount":`選択した{count}件の操作`,"sftp.selected":`選択中:{name}`,"sftp.selectedCount":`{count}件を選択中`,"sftp.selectedCountSize":`{count}件を選択中 · {size}`,"sftp.selectAll":`すべての項目を選択`,"sftp.selectEntry":`{name}を選択`,"sftp.clearSelection":`選択を解除`,"sftp.invertSelection":`選択を反転`,"sftp.copyName":`名前をコピー`,"sftp.copyNames":`名前をまとめてコピー`,"sftp.copyPath":`フルパスをコピー`,"sftp.copyPaths":`フルパスをまとめてコピー`,"sftp.openFolder":`フォルダを開く`,"sftp.editFile":`ファイルを編集`,"sftp.newFolder":`新規フォルダ`,"sftp.newFile":`空ファイルを作成`,"sftp.duplicate":`複製`,"sftp.moveTo":`フォルダへ移動`,"sftp.move":`移動`,"sftp.upload":`アップロード`,"sftp.uploadFolder":`フォルダをアップロード`,"sftp.dropZone":`現在のリモートディレクトリへファイル・フォルダをアップロード`,"sftp.uploads":`ファイルのアップロード`,"sftp.upload.pending":`準備中`,"sftp.upload.queued":`待機中`,"sftp.upload.uploading":`アップロード中…`,"sftp.upload.paused":`一時停止`,"sftp.upload.reattach":`同じファイルを選択して再開`,"sftp.upload.needs_overwrite":`上書き確認待ち`,"sftp.upload.done":`完了`,"sftp.upload.failed":`失敗`,"sftp.upload.skipped":`スキップ`,"sftp.upload.cancelled":`キャンセル済み`,"sftp.cancelTransfer":`転送をキャンセル`,"sftp.activeTransfers":`転送中 {count}`,"sftp.transfer.pause":`一時停止`,"sftp.transfer.resume":`再開`,"sftp.transfer.clear":`完了分を消去`,"sftp.manager.heading":`転送マネージャー`,"sftp.manager.summaryRunning":`{count}件転送中 · {progress}% · {speed}/s`,"sftp.manager.summaryIdle":`転送 {count}件`,"sftp.manager.actions":`転送キューの操作`,"sftp.manager.concurrency":`同時実行`,"sftp.manager.autoClear":`完了項目の自動消去`,"sftp.manager.autoClearOff":`残す`,"sftp.manager.largeFileThreshold":`分割開始`,"sftp.manager.largeFileParallelism":`分割並列数`,"sftp.manager.largeFileChunk":`チャンク`,"sftp.manager.stopProcessing":`新しい転送の開始を止める`,"sftp.manager.startProcessing":`転送キューの処理を再開する`,"sftp.manager.status.held":`保留中`,"sftp.manager.resize":`ドラッグして転送キューの高さを変える`,"sftp.manager.moveUp":`{name} を待機列の前へ移す`,"sftp.manager.moveDown":`{name} を待機列の後ろへ移す`,"sftp.manager.collapse":`転送マネージャーを折りたたむ`,"sftp.manager.expand":`転送マネージャーを展開`,"sftp.manager.pauseAll":`すべて一時停止`,"sftp.manager.resumeAll":`すべて再開`,"sftp.manager.cancelAll":`すべてキャンセル`,"sftp.manager.clearFailed":`失敗項目を一覧から削除`,"sftp.manager.remove":`一覧から削除`,"sftp.manager.controlChanged":`転送状態が変わりました。最新の状態に更新しました。`,"sftp.manager.cleanupFailed":`リモートの一時ファイルを削除できませんでした。接続を確認して、もう一度お試しください。`,"sftp.manager.controlFailed":`転送を操作できませんでした。接続を確認して、もう一度お試しください。`,"sftp.manager.dismissError":`エラーを閉じる`,"sftp.manager.items":`転送ファイル`,"sftp.manager.file":`ファイル`,"sftp.manager.folder":`フォルダ`,"sftp.manager.upload":`アップロード`,"sftp.manager.download":`ダウンロード`,"sftp.manager.remaining":`残り{duration}`,"sftp.manager.retry":`再実行`,"sftp.manager.retryFailed":`失敗した {count} 件を再実行`,"sftp.manager.status.queued":`待機中`,"sftp.manager.status.running":`転送中…`,"sftp.manager.status.paused":`一時停止`,"sftp.manager.status.reattach":`同じファイルを選択`,"sftp.manager.status.needs_overwrite":`上書き確認待ち`,"sftp.manager.status.reconcile":`転送先の確認が必要`,"sftp.manager.status.completed":`完了`,"sftp.manager.status.failed":`失敗`,"sftp.manager.status.cancelled":`キャンセル済み`,"sftp.notice.heading":`転送通知`,"sftp.notice.completed":`{direction}完了:{name}`,"sftp.notice.failed":`{direction}失敗:{name}({problem})`,"sftp.notice.dismiss":`通知を閉じる`,"sftp.download":`ダウンロード`,"sftp.downloads":`ダウンロード`,"sftp.download.downloading":`ダウンロード中…`,"sftp.download.done":`完了`,"sftp.download.failed":`失敗`,"sftp.download.cancelled":`キャンセル済み`,"sftp.name":`名前`,"sftp.size":`サイズ`,"sftp.linkTarget":`リンク先`,"sftp.brokenLink":`{target}(見つかりません)`,"sftp.calculating":`計算中…`,"sftp.partialSizePrefix":`少なくとも `,"sftp.sizeUnavailable":`取得できません`,"sftp.containedFiles":`内包ファイル`,"sftp.containedDirectories":`内包フォルダー`,"sftp.type":`種別`,"sftp.type.file":`ファイル`,"sftp.type.directory":`フォルダ`,"sftp.type.symlink":`シンボリックリンク`,"sftp.type.other":`その他`,"sftp.modified":`更新日時`,"sftp.permissions":`権限`,"sftp.revision":`リビジョン`,"sftp.details":`詳細`,"sftp.detailsFor":`{name} の詳細`,"sftp.detailsForCount":`選択した{count}件の詳細`,"sftp.preview":`プレビュー`,"sftp.properties":`プロパティ`,"sftp.previewLoading":`プレビューを読み込んでいます…`,"sftp.previewUnavailable":`このファイルはここではプレビューできません。`,"sftp.previewTruncated":`先頭部分だけを表示しています。`,"sftp.selectedItems":`選択中の項目`,"sftp.totalSize":`合計サイズ`,"sftp.actions":`操作`,"sftp.entries":`ファイル一覧`,"sftp.rename":`名前変更`,"sftp.delete":`削除`,"sftp.refreshDirectory":`ディレクトリを更新`,"sftp.deleteContentsWarning":`フォルダ内の項目もすべて削除されます。`,"sftp.manager.delete":`削除中`,"sftp.chmod":`権限変更`,"sftp.chmodRecursive":`配下も含めて権限変更`,"sftp.chmodPrompt":`権限(8 進数、例:640)`,"sftp.chmodInvalid":`000〜777の3桁の8進数で入力してください。`,"sftp.overwriteHeading":`このリモートファイルを上書きしますか?`,"sftp.overwrite":`上書き`,"sftp.skip":`スキップ`,"sftp.cancel":`キャンセル`,"sftp.remoteDropTitle":`リモート項目を転送`,"sftp.remoteDropDescription":`{count}件を{alias}へ転送します。データは2つのSFTP接続間で直接転送されます。`,"sftp.remoteDropInvalid":`リモート項目のドラッグ情報を読み取れませんでした。`,"sftp.copyHere":`ここへコピー`,"sftp.moveHere":`ここへ移動`,"sftp.openTerminalHere":`ここでTerminalを開く`,"sftp.compare.action":`比較`,"sftp.compare.heading":`ディレクトリを比較`,"sftp.compare.description":`選択した差分を左右どちらかへコピーします。コピー先だけにある項目は削除しません。`,"sftp.compare.loading":`両方のディレクトリを比較しています…`,"sftp.compare.noChanges":`2つのディレクトリのメタデータに差分はありません。`,"sftp.compare.status":`差分`,"sftp.compare.same":`同じ`,"sftp.compare.different":`変更あり`,"sftp.compare.left_only":`左のみ`,"sftp.compare.right_only":`右のみ`,"sftp.compare.type_mismatch":`種別が異なる`,"sftp.compare.leftToRight":`左から右へコピー`,"sftp.compare.rightToLeft":`右から左へコピー`,"sftp.save":`保存`,"sftp.close":`閉じる`,"sftp.editorEmpty":`UTF-8のテキストファイルを選ぶと、ここで編集できます。`,"sftp.editorLoading":`エディタを読み込んでいます…`,"sftp.unsaved":`未保存`,"sftp.unsavedBlocked":`移動する前に、編集中のファイルを保存または閉じてください。`,"sftp.conflict":`リモートファイルが更新されています。再読込してから保存してください。`,"sftp.binaryHint":`UTF-8テキストではありません。ダウンロードしてください。`,"sftp.tooLargeHint":`2 MiBを超えるファイルはダウンロードできますが、編集はできません。`,"sftp.mkdirPrompt":`フォルダ名`,"sftp.newFilePrompt":`ファイル名`,"sftp.moveToPrompt":`移動先フォルダ`,"sftp.pathAbsolute":`/ で始まる絶対パスを入力してください。`,"sftp.renamePrompt":`新しい名前`,"sftp.nameRequired":`名前を入力してください。`,"sftp.nameInvalid":`名前にスラッシュは使用できません。`,"sftp.renameUnchanged":`現在とは異なる名前を入力してください。`,"sftp.deleteHeading":`このリモート項目を削除しますか?`,"sftp.deleteHeadingCount":`選択した{count}件を削除しますか?`,"sftp.deleteFailedCount":`選択した項目のうち{count}件を削除できませんでした。`,"workspace.saved":`保存レイアウトを選択`,"workspace.new":`新しい保存レイアウト`,"workspace.save":`名前を付けて保存`,"workspace.reopen":`この配置を開く`,"workspace.delete":`削除`,"workspace.deleteHeading":`{name} を削除しますか?`,"workspace.deleteBody":`保存したレイアウトは元に戻せません。開いているセッションは閉じません。`,"workspace.confirmDelete":`削除する`,"workspace.detachPane":`ワークスペースから外す`,"workspace.live":`現在のワークスペース`,"workspace.mobilePaneSwitcher":`ワークスペースのターミナル`,"workspace.oneLiveOnly":`現在のワークスペースを閉じてから、別のワークスペースを作成してください。`,"workspace.dock.left":`左に配置`,"workspace.dock.right":`右に配置`,"workspace.dock.top":`上に配置`,"workspace.dock.bottom":`下に配置`,"workspace.groupCount":`{count} sessions`,"workspace.rename":`名前変更`,"workspace.renameLabel":`{name} の新しい名前`,"workspace.rowMenu":`{name}のワークスペース操作`,"workspace.expandGroup":`{name}のターミナルを表示`,"workspace.collapseGroup":`{name}のターミナルを隠す`,"workspace.resizeSplit":`分割サイズを変更`,"workspace.focusMode":`{alias} をフォーカス表示`,"workspace.exitFocusMode":`フォーカス表示を終了`,"workspace.movePane":`{alias} のペインを移動します。移動先のペインを選んでください。`,"workspace.movePanePicked":`{alias} を選択中です。移動先のペインを選んでください。`,"workspace.reconnecting":`このペインを再接続してください。`,"workspace.maxPanes":`1 つのワークスペースに配置できるのは最大 {count} ペインです。`,"workspace.namePrompt":`保存レイアウト名`,"workspace.nameRequired":`保存レイアウト名を入力してください。`,"workspace.saveConfirm":`レイアウトを保存`,"workspace.cancel":`キャンセル`,"workspace.savedLayouts":`保存レイアウト`,"workspace.actions":`ワークスペース操作`,"workspace.savedDescription":`SSH 接続先、ローカルシェル、ペイン配置を名前付きで保存し、あとで新しいセッションとして開き直せます。1 レイアウトにつき最大 {count} ペインです。`,"workspace.broadcastCommand":`コマンドを一括送信…`,"workspace.broadcastHeading":`接続中のターミナルへ送信`,"workspace.broadcastDescription":`コマンドまたはスニペットを確認してから、接続中の各ターミナルの現在の入力先へ送信します。`,"workspace.commandClose":`コマンド送信を閉じる`,"workspace.commandSource":`コマンドの選択`,"workspace.adHocCommand":`直接入力`,"workspace.savedSnippet":`保存済みスニペット`,"workspace.command":`コマンド`,"workspace.chooseSnippet":`スニペットを選択`,"workspace.useDefault":`既定値を使用`,"workspace.targetMode":`接続中のターミナル`,"workspace.targetCount":`対象:{count} 件`,"workspace.paneNumber":`ペイン {number}`,"workspace.targetSkipped":`送信しません({state})`,"workspace.executionNotice":`各ターミナルの現在の入力先へコマンドとEnterを送信するため、作業ディレクトリ、環境、シェルの状態をそのまま使います。入力途中の文字や実行中のフォアグラウンドプロセスがある場合は、その続きまたは標準入力として扱われることがあります。`,"workspace.previewHeading":`ターミナルへ送る内容の確認`,"workspace.sendTargets":`{count} セッションへ送信`,"workspace.deliveryResults":`送信結果`,"workspace.deliveryNotice":`出力は各ターミナルに表示されます。送信済みはコマンドの完了を意味しません。`,"workspace.delivered":`送信済み`,"workspace.deliveryFailed":`送信できませんでした`,"snippets.heading":`Snippets`,"snippets.new":`新規`,"snippets.empty":`保存済みスニペットはありません。`,"snippets.name":`名前`,"snippets.description":`説明`,"snippets.command":`コマンド`,"snippets.variableHint":`{{name}}で変数を指定します。実行前に展開結果を確認できます。`,"snippets.variableType":`変数の型`,"snippets.variableType.string":`文字列`,"snippets.variableType.integer":`整数`,"snippets.variableType.boolean":`真偽値`,"snippets.variableType.secret":`シークレット`,"snippets.variableType.unknown":`不明な型`,"snippets.value":`値`,"snippets.save":`保存`,"snippets.delete":`削除`,"snippets.deleteHeading":`{name} を削除しますか?`,"snippets.deleteBody":`このスニペットは全ての対象ホストから消え、元に戻せません。`,"snippets.confirmDelete":`削除する`,"snippets.deleteCancel":`キャンセル`,"snippets.targets":`対象ホスト`,"snippets.preview":`実行内容を確認`,"snippets.confirm":`実際のコマンドを確認`,"snippets.run":`このホストで実行`,"snippets.results":`実行結果`,"snippets.status.running":`実行中`,"snippets.status.completed":`完了`,"snippets.status.cancelled":`キャンセル済み`,"snippets.status.queued":`待機中`,"snippets.status.succeeded":`成功`,"snippets.status.failed":`失敗`,"snippets.status.unknown":`状態を確認できません`,"snippets.cancel":`中止`,"snippets.startup":`接続時の自動実行`,"snippets.startupHint":`選択したホストのシェル準備後に実行します。初回接続と自動再接続のたびに送るため、シークレット変数の値も暗号化した設定に保存され、リモートのシェル履歴や画面に残ることがあります。`,"snippets.setStartup":`接続時に自動実行`,"snippets.clearStartup":`解除`,"host.duplicateKeyword":`このブロックの前の行が同じキーワードを使っています。OpenSSH は最初の 1 つを採用します。`,"terminal.consoleList":`開いているセッション`,"terminal.noSessions":`開いているセッションはありません。`,"terminal.openShell":`Local shell`,"terminal.newSession":`新しいセッション`,"terminal.rowDetail":`{status} · {destination}`,"terminal.connecting":`接続を開始中`,"terminal.connected":`接続済み`,"terminal.longCommandCompleted":`{subject} のコマンドが {seconds} 秒で完了しました。`,"terminal.unreadNotification":`未読の通知`,"terminal.notificationFallback":`このターミナルのプログラムから通知がありました。`,"terminal.unreadWorkspace":`このワークスペースに未読のターミナル通知があります`,"terminal.browserNotificationsHeading":`Notifications`,"terminal.browserNotificationsDefault":`このタブがバックグラウンドにあるとき、ターミナル内のプログラムからの通知(コーディングエージェントの入力待ちなど)やファイル転送の完了を sshc から通知できます。`,"terminal.browserNotificationsGranted":`ブラウザ通知は許可されています。このタブがバックグラウンドにあるときだけ通知します。`,"terminal.browserNotificationsDenied":`sshc の通知がブロックされています。ターミナルとファイル転送の通知を使うには、ブラウザのサイト設定で通知を許可してください。`,"terminal.browserNotificationsUnsupported":`このブラウザはWeb通知に対応していません。`,"terminal.browserNotificationsEnable":`通知を有効にする`,"terminal.browserNotificationsTest":`テスト通知を送る`,"terminal.browserNotificationsEnabled":`通知は有効です`,"terminal.browserNotificationsReady":`ターミナルとファイル転送の通知を利用できます。`,"terminal.browserNotificationsRequestFailed":`通知の許可をリクエストできませんでした。`,"terminal.browserNotificationsDeliveryFailed":`通知は許可されていますが、ブラウザで表示できませんでした。`,"terminal.notificationSound":`通知音`,"terminal.notificationSoundHint":`このタブがバックグラウンドにあるとき、ターミナル内のプログラムが通知(OSC 9/99/777)を送ると鳴ります。このブラウザにだけ保存されます。`,"terminal.notificationPreviewSound":`通知音を再生`,"terminal.notificationSound.none":`音なし`,"terminal.notificationSound.gentle":`やさしい音`,"terminal.notificationSound.bell":`ベル`,"terminal.notificationSound.pulse":`パルス`,"terminal.notificationPreview":`再生`,"terminal.notificationVolume":`通知音量`,"terminal.notificationVolumeHint":`{volume}%`,"terminal.quickCommands":`クイックコマンド`,"terminal.quickCommandsClose":`クイックコマンドを閉じる`,"terminal.quickCommandInsert":`ペインに挿入`,"terminal.quickCommandRun":`実行`,"terminal.quickCommandCopy":`コピー`,"terminal.quickCommandSaveSelection":`選択範囲をスニペットとして保存`,"terminal.quickCommandName":`スニペット名`,"terminal.quickCommandSave":`スニペットを保存`,"terminal.quickCommandSaved":`スニペットを保存しました。`,"terminal.quickCommandContextWarning":`挿入と実行は、ペインの現在の入力先へ文字を送ります。入力途中の文字列や、パスワード/パスフレーズなどを求めるフォアグラウンドの入力待ちへ続けて送られる場合があります。`,"terminal.quickCommandChanged":`スニペットまたはペインが変更されました。更新後のプレビューを確認してから続けてください。`,"terminal.quickCommandInsertUnsafe":`改行または制御文字を含むコマンドは、安全に挿入できません。実行またはコピーを使用してください。`,"terminal.linkActions":`ターミナルリンクの操作`,"terminal.linkOpenBrowser":`ブラウザで開く`,"terminal.linkBrowseSFTP":`SFTPで表示`,"terminal.linkEditSFTP":`SFTPで編集`,"terminal.linkDownloadSFTP":`SFTPでダウンロード`,"terminal.linkCopy":`リンクをコピー`,"sftp.linkTargetInvalid":`このターミナルリンクは利用できなくなりました。`,"sftp.linkTargetNotFound":`リモートパスが見つかりません。`,"sftp.linkTargetNotFile":`リモートパスはファイルではありません。`,"terminal.progressDialing":`{target} へ接続中 · {position}`,"terminal.progressHostKey":`{target} のホスト鍵を確認中 · {position}`,"terminal.progressAuthenticating":`{target} で認証中 · {position}`,"terminal.progressAuthenticated":`{target} の認証完了 · {position}`,"terminal.progressOpeningSession":`セッションを開始中 · {position}`,"terminal.reconnectingAttempt":`再接続中({attempt}/{limit})`,"terminal.exitedWith":`終了 {code}`,"terminal.localhost":`localhost`,"terminal.emptyHeading":`開いているセッションがありません`,"terminal.emptyHint":`左の一覧から開くか、ホストの「接続」を押してください。`,"terminal.forwardLocal":`{listen} → {to} を転送中`,"terminal.forwardDynamic":`{listen} で SOCKS5 プロキシ`,"terminal.forwardAgent":`ssh-agent をリモートへ転送中`,"terminal.rowMenu":`{title} の操作`,"terminal.rename":`名前を変更`,"terminal.unpinTitle":`自動の名前に戻す`,"terminal.renameLabel":`{title} の新しい名前`,"terminal.renameFailed":`セッション名を変更できませんでした。`,"terminal.duplicate":`この接続を複製`,"terminal.moveUp":`上へ移動`,"terminal.moveDown":`下へ移動`,"terminal.closeSession":`{title} を閉じる`,"terminal.closeHeading":`{title} を閉じますか?`,"terminal.closeBody":`接続を終了します。実行中のプロセスと表示中の出力は失われます。`,"terminal.closeForwards":`このセッションのポート転送 {count} 件も終了します。`,"terminal.closeConfirm":`閉じる`,"terminal.closeCancel":`開いたままにする`,"desktop.closeAllHeading2":`開いているセッション {count} 件を閉じますか?`,"desktop.closeAllBody":`すべての接続を終了します。実行中のプロセスと表示中の出力は失われます。`,"desktop.closeAllConfirm":`すべて閉じる`,"desktop.closeAllCancel":`開いたままにする`,"terminal.limitReached":`同時に開けるセッション数の上限({max})に達しました。どれかを閉じてください。`,"terminal.limitRefused":`これ以上セッションを開けません。どれかを閉じてください。`,"terminal.unresolvable":`この接続の設定を解決できませんでした。理由は「Analysis」で確認できます。`,"terminal.jumpDepthExceeded":`ProxyJump の階層が上限を超えています。`,"terminal.hostKeyUnknown":`ホスト鍵をまだ信頼していません。内容を確認してから対話接続してください。`,"terminal.hostKeyChanged":`ホスト鍵が変わりました。Known Hostsを確認してから接続し直してください。`,"terminal.hostKeyRevoked":`ホスト鍵は失効済みとして登録されているため接続できません。`,"terminal.identityUnavailable":`利用できる秘密鍵または ssh-agent の鍵がありません。`,"terminal.authenticationUnavailable":`この接続で利用できる認証方式がありません。`,"terminal.authenticationCancelled":`認証を中止しました。`,"terminal.keyPassphraseRequired":`秘密鍵のパスフレーズが必要です。Vaultを開くか、この鍵に正しいパスフレーズを保存してください。`,"terminal.reconnectFailed":`再接続に失敗しました。設定された上限まで再試行します。`,"terminal.reconnectExhausted":`再接続の上限に達しました。ネットワーク復旧後に新しい接続を開いてください。`,"terminal.manualReconnect":`再接続`,"terminal.stopReconnect":`再接続を止める`,"terminal.reconnectStopped":`自動再接続を停止しました。必要なときに再接続してください。`,"terminal.notReconnecting":`このセッションは再接続待ちではありません。`,"terminal.manualReconnecting":`接続中…`,"terminal.manualReconnectFailed":`SSH セッションへ再接続できませんでした。接続設定とネットワークを確認して、もう一度試してください。`,"terminal.openFailed":`ターミナルを開けませんでした。`,"terminal.keyBar":`画面上のキー`,"terminal.extraKeys":`追加キー`,"shell.mobileNavigation":`クイックナビゲーション`,"sftp.mobile.actions":`フォルダ操作`,"sftp.mobile.search":`ファイルを検索`,"sftp.manager.settings":`転送設定`,"sftp.manager.close":`転送マネージャーを閉じる`,"terminal.closeFailed":`セッションを閉じられませんでした。`,"terminal.linkConnecting":`接続しています…`,"terminal.linkRetrying":`接続しています…({attempt} 回目)`,"terminal.linkWaiting":`接続が切れました。{seconds} 秒後に {attempt} 回目の再接続を試みます。`,"terminal.linkStopped":`再試行を停止しました。セッションは残っているため、いつでも再接続できます。`,"terminal.linkGone":`セッションが存在しないため、再接続できません。`,"terminal.linkNow":`今すぐ接続`,"terminal.linkStop":`再試行をやめる`,"terminal.replayTruncated":`ターミナルとの接続が切れている間の出力の一部は、Engine再生バッファから既に失われています。`,"terminal.clipboardRefused":`クリップボードにアクセスできませんでした。`,"terminal.pasteHeading":`{target} への貼り付けを確認`,"terminal.pasteDescription":`送信前に内容を確認してください。論理行数は{lines}です。`,"terminal.pasteRiskLineBreak":`改行によって1個以上のコマンドが直ちに実行される可能性があります。`,"terminal.pasteRiskControl":`ターミナル制御文字によって表示状態や入力が変更される可能性があります。`,"terminal.pastePreview":`制御文字を可視化した貼り付けプレビュー`,"terminal.pastePreviewTruncated":`プレビューは省略されています。操作は貼り付け内容全体に適用されます。`,"terminal.pasteNotSent":`まだターミナルには何も送信していません。`,"terminal.pasteCancel":`キャンセル`,"terminal.pasteWithoutFinalLineBreak":`末尾のEnterを除いて貼り付け`,"terminal.pasteEdit":`貼り付け内容を編集`,"terminal.pasteSend":`貼り付け`,"terminal.search":`検索`,"terminal.searchInput":`ターミナル出力を検索`,"terminal.searchPlaceholder":`スクロールバックを検索…`,"terminal.searchNoResults":`該当なし`,"terminal.searchPrevious":`前の一致`,"terminal.searchNext":`次の一致`,"terminal.searchClose":`検索を閉じる`,"terminal.searchCaseSensitive":`大文字と小文字を区別`,"terminal.searchRegex":`正規表現を使う`,"terminal.searchInvalidRegex":`不正な式`,"terminal.copyContext":`直近のターミナル出力をコピー`,"terminal.copyContextHint":`制御シーケンスを除き、直近最大 200 行をコピーします`,"terminal.copyContextDone":`直近のターミナル出力をコピーしました。`,"terminal.copyContextEmpty":`コピーできるターミナル出力がありません。`,"terminal.osc52Hint":`このターミナルセッションから OSC 52 でシステムのクリップボードへ書き込むことを許可します`,"terminal.osc52Enabled":`このターミナルセッションで OSC 52 のクリップボード書き込みを許可しました。`,"terminal.osc52Disabled":`OSC 52 のクリップボード書き込みを拒否します。`,"terminal.osc52Copied":`リモートアプリがシステムのクリップボードへコピーしました。`,"terminal.moreActions":`ターミナルのその他の操作`,"terminal.portForwarding":`ポート転送`,"terminal.openDirectoryInSFTP":`現在のディレクトリをSFTPで開く`,"terminal.forwardDescription":`{title}へのSSH接続を使うトンネルを管理します。`,"terminal.forwardClose":`閉じる`,"terminal.forwardActive":`動作中の転送`,"terminal.forwardNone":`この接続で動作中の転送はありません。`,"terminal.forwardTemporary":`このセッションのみ`,"terminal.forwardSaved":`保存済み`,"terminal.forwardSavedStopHint":`ここで停止しても接続設定からは削除されません。`,"terminal.forwardRetryHint":`ローカルポートの競合を解消し、このSSHを再接続すると保存済み転送を再試行します。`,"terminal.forwardAgentLabel":`SSH エージェント`,"terminal.forwardCopy":`アドレスをコピー`,"terminal.forwardCopied":`アドレスをコピーしました。`,"terminal.forwardCopyFailed":`アドレスをコピーできませんでした。`,"terminal.forwardStop":`停止`,"terminal.forwardStopping":`停止中…`,"terminal.forwardStopped":`転送を停止しました。`,"terminal.forwardNew":`ポート転送を開始`,"terminal.forwardSaveConnection":`この接続設定にも保存する`,"terminal.forwardSaveHint":`今すぐ開始し、次回この接続を開いたときにも復元します。`,"terminal.forwardSaveUnavailable":`ローカルシェルまたは未保存の接続には設定を保存できません。`,"terminal.forwardNeedsConnection":`SSHを再接続してから転送を開始してください。`,"terminal.forwardStart":`開始`,"terminal.forwardStarting":`開始中…`,"terminal.forwardStarted":`このセッションで転送を開始しました。`,"terminal.forwardStartedAndSaved":`転送を開始し、接続設定にも保存しました。`,"terminal.forwardPausedReconnect":`SSHの再接続中は転送を利用できません。`,"terminal.forwardBindFailed":`ローカルポートを開けませんでした: {detail}`,"terminal.forwardUnavailable":`現在のSSH接続ではポート転送を変更できません。`,"terminal.forwardInvalid":`転送の種類、ポート、転送先を確認してください。`,"terminal.forwardSaveFailed":`転送は開始しましたが、接続設定へ保存できませんでした。`,"terminal.forwardFailed":`ポート転送の操作を完了できませんでした。`,"terminal.settingsHeading":`Terminal`,"terminal.settingsSaved":`保存しました。クリップボード設定はすぐに反映され、その他の設定は新しく開くターミナルに適用されます。`,"terminal.settingsLoading":`ターミナル設定を読み込んでいます…`,"terminal.settingsStorageHint":`ターミナルの外観を含むこれらの設定は、ワークスペースのメタデータに保存され、バックアップと同期の対象になります。テーマ、言語、通知音はこのブラウザーにのみ保存されます。`,"terminal.maxSessionsLabel":`最大セッション数`,"terminal.maxSessionsHint":`1〜200。空欄の場合は 50 です。上限に達すると新しいセッションを開けません。既存のセッションは自動的に閉じられません。`,"terminal.scrollbackLabel":`Engine再生バッファ(バイト)`,"terminal.scrollbackHint":`ブラウザ再接続時にengineが再生する出力です。16384〜4194304、空欄は262144(256 KiB)。メモリだけに保持し、ディスクへ書きません。`,"terminal.browserScrollbackLabel":`ブラウザのスクロールバック(行)`,"terminal.browserScrollbackHint":`ブラウザー内の各ターミナルが保持する行数です。1000〜100000、空欄は5000。増やすほどブラウザーのメモリを使用します。`,"terminal.localShellProfileLabel":`既定のローカルシェル`,"terminal.localShellProfileHint":`このマシンで検出・検証できた実行ファイルから選びます。ローカル端末を開くときだけ別のシェルを選ぶこともできます。`,"terminal.localShellProfileSystem":`システムのログインシェル`,"terminal.osc52DefaultLabel":`OSC 52のクリップボード書き込みを既定で許可`,"terminal.osc52DefaultHint":`ローカルシェルはこの設定を使います。SSH接続ごとに継承・許可・拒否を選べます。`,"terminal.jisYenBackslashLabel":`JIS配列の¥キーをbackslashとして送る`,"terminal.jisYenBackslashHint":`日本語キーボード向けです。IME変換中の入力は変更しません。`,"terminal.fontSizeLabel":`文字の大きさ`,"terminal.paletteLabel":`配色`,"terminal.verbosityLabel":`接続のログ`,"terminal.verbosityHint":`接続、認証方式、保存済みTOTPの使用可否など、sshcが取得できる診断をターミナルへ表示します。新しい接続から適用され、秘密値は表示しません。`,"terminal.verbosityQuiet":`表示しない`,"terminal.verbosityBrief":`基本情報(-v)`,"terminal.verbosityDetailed":`鍵・経由地・所要時間(-vv)`,"terminal.verbosityFull":`すべて(-vvv)`,"terminal.reconnectLabel":`接続が切れたときの再接続`,"terminal.reconnectHint":`予期せず切断された場合の再接続回数です。1、2、5、10、15 秒を基準に再試行を分散するため、5 回の場合は最大 40 秒かかります。手動で閉じたセッションは再接続しません。`,"terminal.reconnectDefault":`既定(5 回・最大 40 秒)`,"terminal.reconnectNever":`再接続しない`,"terminal.reconnectOnce":`1 回(最大 2 秒)`,"terminal.reconnectTwice":`2 回(最大 4 秒)`,"terminal.reconnectThrice":`3 回(最大 10 秒)`,"terminal.reconnectFive":`5 回(最大 40 秒)`,"engine.heading":`Engine`,"engine.portLabel":`ポート`,"engine.portHint":`空欄の場合、デスクトップでは端末固有の固定ポート(初期値54447)を使用します。ブックマークやインストールしたWebアプリを継続して使えます。次回のエンジン起動時から適用されます。`,"engine.portOutOfRange":`ポートは 1024〜65535 の範囲で指定してください。`,"engine.loading":`エンジン設定を読み込んでいます…`,"engine.saved":`保存しました。自動ロックはすぐに、ポートの変更は次回のエンジン起動時から適用されます。`,"engine.saveFailed":`保存できませんでした。`,"engine.vaultAutoLockLabel":`Vault の自動ロック`,"engine.vaultAutoLockHint":`保存済みパスワードや鍵パスフレーズを使用しない時間が続いた場合に Vault をロックします。状態確認、Terminal の出力、バックグラウンド同期では時間を延長しません。`,"engine.vaultAutoLockIdle":`操作がない場合にロック`,"engine.vaultAutoLockRestart":`自動ロックしない`,"engine.vaultAutoLockValue":`時間`,"engine.vaultAutoLockUnit":`単位`,"engine.vaultAutoLockMinutes":`分`,"engine.vaultAutoLockHours":`時間`,"engine.vaultAutoLockOutOfRange":`自動ロック時間は 1〜999 の整数で指定してください。`,"engine.vaultAutoLockRestartWarning":`Vault は自動でロックされません。手動でロックしない限り、sshc を再起動するまでロック解除状態が続きます。自分で管理している端末でのみ使用してください。`,"terminal.fontLabel":`フォント`,"terminal.backgroundLabel":`背景画像`,"terminal.backgroundHint":`画像はワークスペースに保存され、バックアップと同期の対象になります。`,"terminal.backgroundNone":`画像なし`,"terminal.backgroundFollowsOverall":`全体の設定に従う`,"terminal.backgroundAdd":`画像を追加`,"terminal.backgroundChoose":`変更`,"terminal.backgroundClear":`解除`,"terminal.backgroundNotSelected":`背景画像は選択されていません`,"terminal.backgroundLibrary":`背景画像ライブラリ`,"terminal.backgroundClose":`閉じる`,"terminal.backgroundSearch":`画像を検索`,"terminal.backgroundEmpty":`保存済みの画像はありません`,"terminal.backgroundEmptyHint":`画像を追加すると、ここから選べるようになります。`,"terminal.backgroundActions":`{name} の操作`,"terminal.backgroundRenameAction":`名前を変更`,"terminal.backgroundDeleteAction":`削除`,"terminal.backgroundDeleteHeading":`背景画像を削除しますか?`,"terminal.backgroundDeleteHint":`{name} を削除し、この画像を使用している設定を解除します。元に戻せません。`,"terminal.backgroundUse":`この画像を使用`,"terminal.backgroundUseNone":`画像なしを選択`,"terminal.backgroundCapacityHeading":`保存容量`,"terminal.backgroundCapacityUsage":`{used} / {capacity} を使用中`,"terminal.backgroundCapacityLabel":`上限`,"terminal.backgroundCapacitySave":`上限を保存`,"terminal.backgroundCapacityHint":`1〜1024 MiB。既定は16 MiBです。上限を下げても既存画像は削除されません。容量と同期コストは利用者が管理してください。`,"terminal.backgroundCapacityInvalid":`保存容量は1〜1024 MiBの整数で指定してください。`,"terminal.backgroundCapacityFailed":`保存容量を変更できませんでした。`,"terminal.backgroundRenameHeading":`背景画像の名前を変更`,"terminal.backgroundRenameHint":`拡張子は画像の種類に合わせて自動的に決まります。保存済みのTerminal設定も新しい名前へ更新します。`,"terminal.backgroundRenameLabel":`新しいファイル名`,"terminal.backgroundRenameSubmit":`名前を変更`,"terminal.backgroundRenameCancel":`キャンセル`,"terminal.backgroundRenameRequired":`ファイル名を入力してください。`,"terminal.backgroundRenameExists":`同じ名前の背景画像がすでにあります。`,"terminal.backgroundRenameFailed":`背景画像の名前を変更できませんでした。`,"terminal.backgroundTooLarge":`この画像は保存できる大きさを超えています。`,"terminal.backgroundsFull":`これ以上画像を置く余地がありません。`,"terminal.backgroundNotAnImage":`このファイルは、表示できる画像ではありません。`,"terminal.backgroundFailed":`画像を保存できませんでした。`,"terminal.tintLabel":`画像に重ねる色の不透明度`,"terminal.tintHint":`値を大きくすると画像が暗くなり、文字を読みやすくできます。`,"connection.backgroundLabel":`ターミナルの背景画像`,"connection.backgroundHint":`この接続のターミナルにだけ適用されます。`,"terminal.fontHint":`JetBrains Mono はアプリに同梱されています。`,"terminal.fontFollowsSystem":`システムの等幅フォントを使用`,"terminal.fontFollowsOverall":`全体の設定に従う`,"connection.fontLabel":`ターミナルのフォント`,"connection.fontHint":`この接続のターミナルにだけ適用されます。`,"terminal.paletteHint":`個別の配色を指定していないターミナルに適用されます。`,"terminal.paletteFollowsTheme":`アプリのテーマに従う`,"terminal.paletteFollowsOverall":`全体の設定に従う`,"connection.paletteLabel":`ターミナルの配色`,"connection.paletteHint":`この接続のターミナルにだけ適用されます。`,"connection.encodingLabel":`接続先の文字コード`,"connection.encodingHint":`ブラウザのターミナルとコマンドラインの sshc の両方で、この接続に使用します。`,"connection.encodingUTF8":`UTF-8(既定)`,"connection.encodingShiftJIS":`Shift_JIS(日本語)`,"connection.encodingEUCJP":`EUC-JP(日本語)`,"connection.encodingISO2022JP":`ISO-2022-JP(日本語)`,"connection.osc52Label":`OSC 52クリップボード`,"connection.osc52Hint":`このSSH接続のリモートアプリケーションが、システムのクリップボードへ書き込むことを許可するか選択します。`,"connection.osc52Inherit":`Terminal全体の設定を使う`,"connection.osc52Allow":`この接続では許可`,"connection.osc52Deny":`この接続では拒否`,"terminal.fontSizeHint":`ピクセル単位で指定します。空欄の場合は、狭い画面で 15、それ以外で 13 になります。`,"terminal.copyOnSelectLabel":`選択した文字列を自動的にコピーする`,"terminal.copyOnSelectHint":`選択を終えたときに一度だけコピーします。選択によってシステムのクリップボードを置き換えたくない場合はオフにします。`,"terminal.rightClickPasteLabel":`右クリックで貼り付ける`,"terminal.rightClickPasteHint":`対応する端末では bracketed paste を使います。通常のコンテキストメニューを残す場合はオフにします。`,"terminal.webglLabel":`WebGL描画を使用する`,"terminal.webglHint":`GPUを使って滑らかに描画します。文字が二重に見える、または残像が残る場合は無効にしてください。`,"terminal.limitsOutOfRange":`指定値が有効範囲外です。`,"terminal.startLabel":`開始ディレクトリ`,"terminal.startHint":`ローカルシェルを開始するディレクトリです。~/work または絶対パスで指定してください。~ は展開せずに保存されるため、別のマシンでも同じ指定を使用できます。空欄の場合はホームディレクトリから開始します。`,"terminal.startSave":`保存`,"terminal.startMissing":`そのディレクトリはありません。`,"terminal.startNotADirectory":`それはディレクトリではありません。`,"terminal.startUnusable":`~/から始まるパス、または絶対パスを指定してください。`,"terminal.settingsSaveFailed":`ターミナル設定を保存できませんでした。`,"terminal.screenLabel":`{title} のターミナル`,"terminal.exitedWithCode":`プログラムが終了コード {code} で終了しました。出力は、このセッションを閉じるまで表示されます。`,"terminal.exitedWithSignal":`プログラムがシグナル {signal} で終了しました。出力は、このセッションを閉じるまで表示されます。`,"inspector.appOnly":`sshc 固有の設定`,"inspector.groupLabel":`グループの表示設定`,"inspector.hostSavesImmediately":`ここでの変更はすぐに保存されます。`,"inspector.groupChangesStaged":`ここでの変更は「グループを保存」を選ぶまで未保存です。`,"inspector.notices":`注意`,"inspector.inherited":`継承した値`,"inspector.noNotices":`この接続に関する注意事項はありません。`,"inspector.noInherited":`この接続の値はすべて同じ Host ブロック内で定義されています。`,"shell.language":`Lang`,"shell.languageMenu":`言語メニュー`,"shell.languageEnglish":`English`,"shell.languageJapanese":`日本語`,"shell.theme":`外観`,"shell.themeMenu":`テーマメニュー`,"shell.themeSystem":`システムに合わせる`,"shell.themeLight":`ライト`,"shell.themeDark":`ダーク`,"section.home":`Home`,"section.license":`License`,"menu.others":`Others`,"license.description":`sshcと使用コンポーネントのライセンス・著作権表示です。全文はオフラインでも読めます。`,"license.search":`コンポーネント・ライセンスを検索`,"license.count":`{count}件のコンポーネント`,"license.noMatches":`一致するコンポーネントがありません。`,"section.menu":`Menu`,"section.connections":`Connections`,"section.terminal":`Terminal`,"section.config":`SSH Config`,"section.groups":`Groups`,"section.keys":`SSH Keys`,"section.knownHosts":`Known Hosts`,"section.remoteKeys":`Remote Keys`,"section.diagnostics":`Diagnostics`,"section.settings":`Settings`,"settings.heading":`Settings`,"settings.pageDescription":`ターミナルの動作、sshc の起動設定、このマシンに保存するデータの暗号化を設定します。`,"settings.engineDescription":`sshc エンジンの待受ポートと Vault の自動ロックを設定します。`,"settings.terminalDescription":`新しいターミナルに適用する動作、表示、操作方法を設定します。`,"settings.notificationsDescription":`ブラウザ通知と、ターミナル内のプログラムからの通知を知らせる音を設定します。`,"settings.connectionsDescription":`このブラウザで開いている接続を確認し、まとめて終了します。`,"settings.passwordDescription":`このマシンの暗号化データを保護するマスターパスワードを変更します。`,"secrets.heading":`Vault`,"secrets.pageDescription":`名前付きのアカウントパスワード、鍵パスフレーズ、ワンタイムパスワードを管理します。値は編集時だけ表示されます。`,"secrets.passwordsDescription":`名前付きのアカウントパスワードと割り当て先を管理します。値は編集時だけ表示されます。`,"secrets.passphrasesDescription":`名前付きまたは鍵専用のパスフレーズを管理します。値は編集時だけ表示されます。`,"secrets.totpDescription":`ワンタイムパスワードを登録し、現在のコードと接続先への割り当てを確認します。`,"secrets.metricPasswords":`アカウントパスワード`,"secrets.metricPassphrases":`鍵パスフレーズ`,"secrets.metricTOTP":`ワンタイムパスワード`,"secrets.metricAssignments":`割り当て`,"secrets.loading":`Vault を読み込んでいます…`,"secrets.master":`マスターパスワード`,"secrets.unlock":`開く`,"secrets.lock":`sshc をロック`,"secrets.failed":`Vault を読み込めませんでした。`,"secrets.storeFailed":`保存できませんでした。`,"secrets.deleteFailed":`削除できませんでした。`,"secrets.inUse":`この認証情報は使用中です。削除する前に割り当て先を変更してください。`,"secrets.none":`まだ何も保存されていません。`,"secrets.assignedHosts":`割り当て先のホスト`,"secrets.noAssignedHosts":`割り当て先のホストはありません`,"secrets.keys":`対象の鍵`,"secrets.noKeys":`対象の鍵はありません`,"secrets.dedicated":`この鍵専用`,"secrets.removeDedicated":`{key} の保存済みパスフレーズを削除`,"secrets.keyHostUsageIncomplete":`SSH 設定をすべて読み込めなかったため、この鍵を使用しているホストを完全には確認できませんでした。SSH Config の診断を確認してください。`,"secrets.keyHostsUnavailable":`割り当て先ホストを確認できません`,"secrets.delete":`{name} を削除`,"secrets.deleteHeading":`{name} を削除しますか?`,"secrets.deleteBody":`この資格情報は Vault から消え、元に戻せません。`,"secrets.confirmDelete":`削除する`,"secrets.deleteCancel":`キャンセル`,"secrets.edit":`{name} を編集`,"secrets.actions":`{name} の操作`,"secrets.usageExpand":`{name} の{label}を表示`,"secrets.usageCollapse":`{name} の{label}を隠す`,"secrets.editPassword":`アカウントパスワードを編集`,"secrets.editPassphrase":`鍵パスフレーズを編集`,"secrets.editTOTP":`ワンタイムパスワードを編集`,"secrets.editNote":`保存済みの値を表示しています。名前を変更しても、現在の割り当て先は維持されます。`,"secrets.credentialName":`名前`,"secrets.passwordValue":`パスワード`,"secrets.passphraseValue":`鍵パスフレーズ`,"secrets.totpValue":`セットアップキーまたは otpauth URI`,"secrets.revealing":`保存済みの値を読み込んでいます…`,"secrets.revealFailed":`保存済みの値を表示できませんでした。`,"secrets.updateFailed":`変更を保存できませんでした。`,"secrets.nameExists":`同じ名前の認証情報が既にあります。別の名前を指定してください。`,"secrets.saveChanges":`変更を保存`,"secrets.saving":`保存中…`,"secrets.cancel":`キャンセル`,"secrets.passwordsHeading":`アカウントのパスワード`,"secrets.passphrasesHeading":`鍵のパスフレーズ`,"secrets.newPasswordName":`新しいアカウントパスワードの名前`,"secrets.newPasswordValue":`新しいアカウントパスワードの値`,"secrets.storePassword":`アカウントパスワードを保存`,"secrets.newPassphraseName":`新しい鍵パスフレーズの名前`,"secrets.newPassphraseValue":`新しい鍵パスフレーズの値`,"secrets.storePassphrase":`鍵パスフレーズを保存`,"secrets.totpHeading":`ワンタイムパスワード(TOTP)`,"secrets.newTOTPName":`新しいワンタイムパスワードの名前`,"secrets.newTOTPValue":`Base32 セットアップキーまたは otpauth URI`,"secrets.storeTOTP":`ワンタイムパスワードを保存`,"secrets.totpAssignInConnection":`接続先への割り当ては、Connectionsで対象を開き、基本設定の「ワンタイムパスワード(TOTP)」から選択してください。`,"secrets.totpLoading":`現在のコードを生成しています…`,"secrets.totpRetry":`コードをもう一度生成`,"secrets.totpExpand":`{name} の前後のコードを表示`,"secrets.totpCollapse":`{name} の前後のコードを隠す`,"secrets.totpRemaining":`残り {seconds} 秒`,"secrets.totpPrevious":`ひとつ前`,"secrets.totpNext":`ひとつ後`,"secrets.unassignTOTP":`{host} へのワンタイムパスワード割り当てを解除`,"secrets.unassignTOTPFailed":`ワンタイムパスワードの割り当てを解除できませんでした。`,"update.version":`バージョン {version}`,"update.available":`{version} が公開されています — 変更点を読む`,"desktop.closeAllHeading":`Open connections`,"desktop.closeAllNote":`すべてのセッション、ポート転送、ssh-agent 転送を終了します。エンジンは動作を続けます。`,"desktop.openCount":`{count} 件`,"desktop.closeAll":`接続をすべて閉じる`,"secrets.changeHeading":`Master password`,"secrets.changeNote":`この端末でパスワード保護を使うか、自動で開くかを選べます。変更は Snippet、同期設定、ローカルのバックアップにも適用されます。同期には独立したキーを使います。`,"secrets.currentMaster":`現在のマスターパスワード`,"secrets.newMaster":`新しいマスターパスワード`,"secrets.confirmMaster":`新しいマスターパスワード(確認)`,"secrets.change":`マスターパスワードを変更`,"secrets.wrongCurrent":`現在のマスターパスワードが違います。何も変更していません。`,"secrets.changeFailed":`マスターパスワードを変更できませんでした。`,"secrets.changedMasterLocally":`Vault の保護設定を変更しました。Snippet、同期設定、ローカルのバックアップにも適用されています。リモートスナップショットは書き換えていません。`,"section.passwords":`Account passwords`,"section.keyPassphrases":`Key passphrases`,"section.otp":`OTP`,"lock.explainNew":`この端末の Vault をパスワードで保護するか選んでください。パスワードを使う場合は 4 文字以上で設定できます。`,"lock.explainOpen":`sshc を開くにはマスターパスワードを入力してください。`,"lock.noRecovery":`マスターパスワードは復旧できません。紛失すると Vault、Snippet、暗号化されたバックアップを開けなくなります。`,"lock.explainPasswordless":`この端末では Vault をパスワードなしで使えます。`,"lock.withoutPassword":`パスワードなしで使う`,"lock.withoutPasswordHint":`sshc の起動時に自動で開きます。ローカルデータの保護は OS アカウントと端末のセキュリティに任せます。同期データの暗号化は維持されます。`,"lock.shortPasswordHint":`短いパスワードは、ローカルファイルを持ち出された場合の保護が弱くなります。長く予測しにくいパスワードほど強く保護できます。`,"lock.password":`マスターパスワード`,"lock.confirm":`マスターパスワード(確認)`,"lock.create":`Vault を作成`,"lock.open":`開く`,"lock.wrong":`マスターパスワードが違います。`,"lock.tooShort":`マスターパスワードは {count} 文字以上必要です。`,"lock.alreadyExists":`アプリ内に Vault が見つかりました。マスターパスワードを入力して開いてください。`,"lock.storagePermission":`Android がアプリ専用ストレージへのアクセスを拒否しました。下の詳細をコピーして共有してください。`,"lock.storageFull":`空き容量が不足しているため Vault を作成または更新できません。`,"lock.storageReadOnly":`アプリ専用ストレージが読み取り専用です。端末を再起動してから再試行してください。`,"lock.storageBusy":`別の Vault 更新が完了していません。少し待ってから再試行してください。`,"lock.storageIO":`Android がアプリ専用ストレージへの入出力エラーを報告しました。`,"lock.schemaOlder":`Vault のバージョンが古いです(必要なバージョン:{required}、現在:{current})。`,"lock.schemaNewer":`Vault のバージョンがこの sshc より新しいです(対応バージョン:{required}、現在:{current})。`,"lock.migrationFailed":`Vault をバージョン {current} から {required} へ更新できませんでした。元の Vault は変更していません。`,"lock.migrationCompleted":`Vault をバージョン {current} から {required} へ安全に更新しました。`,"lock.migrationDismiss":`更新通知を閉じる`,"lock.envelopeUnsupported":`この形式の暗号化 Vault には対応していません。診断情報を開いて共有してください。`,"lock.schemaRecoveryHint":`まず互換性のある最新のローカルバックアップを復元できます。見つからない場合は、SSH 設定と鍵ファイルを残して空の Vault を作成できます。`,"lock.restoreCompatibleBackup":`互換性のある Vault を復元`,"lock.noCompatibleBackup":`互換性のあるローカルバックアップは見つかりませんでした。何も変更していません。`,"lock.recoveryFailed":`互換性のある Vault を復元できませんでした。`,"lock.resetUnsupportedAcknowledge":`保存済みパスワード、保存済み鍵パスフレーズ、同期設定が初期化されることを確認しました。SSH 設定と鍵ファイルは残ります。`,"lock.resetUnsupported":`空の Vault を作成`,"lock.resetFailed":`未対応の Vault を安全に置き換えられませんでした。`,"lock.failed":`Vault を開けませんでした。`,"section.sync":`Sync`,"section.history":`History`,"home.heading":`Connections`,"home.manageConnections":`Connections を管理`,"home.connections":`Connections`,"home.groups":`グループ`,"home.attention":`確認が必要`,"home.quickConnect":`Quick Connect`,"home.savedWorkspaces":`保存レイアウト`,"home.savedWorkspacesHint":`保存した接続先とペイン配置を、新しいセッションとしてまとめて開きます。`,"home.savedWorkspaceList":`保存済みターミナルレイアウト`,"home.workspacePanes":`{count} ペイン`,"home.workspaceUpdated":`更新 {at}`,"home.openWorkspace":`レイアウトを開く`,"home.lastConnected":`最終接続 {at}`,"home.connectionList":`利用できる接続`,"home.search":`接続を検索`,"home.searchPlaceholder":`ホスト、グループ、タグを検索`,"home.viewMode":`接続先の表示形式`,"home.panelView":`パネル`,"home.listView":`リスト`,"home.groupFilter":`グループで接続先を絞り込み`,"home.allGroups":`すべて`,"home.connectionCount":`接続先 {count} 件`,"home.groupBreadcrumb":`選択中のグループ`,"home.openGroup":`{name} を開く(接続先 {count} 件)`,"home.connectGesture":`{alias} へ接続します。マウスではダブルクリック、タッチ画面では 1 回タップします。`,"home.loading":`SSH 設定を読み込んでいます…`,"home.noConnections":`接続先がまだありません。SSH Config に Host を追加してください。`,"home.noMatches":`検索に一致する接続はありません。`,"home.connectionActions":`{alias} の操作`,"home.openConnectionSettings":`接続設定を開く`,"home.connect":`接続`,"home.openingConnection":`{alias} に接続中…`,"home.opening":`接続中…`,"home.loadFailed":`SSH 設定を読み込めませんでした。`,"home.workspaceAttention":`設定または復旧について {count} 件の確認が必要です。`,"home.openConfig":`設定を確認`,"home.recoverChanges":`変更を復旧`,"home.sync":`同期`,"home.syncUnavailable":`同期状態を取得できません。`,"home.syncNotConfigured":`リモート同期は設定されていません。`,"home.syncNever":`リモートバケットは設定済みですが、まだ同期していません。`,"home.syncLast":`最終同期 {at} · {count} ファイル`,"home.openSync":`同期画面を開く`,"copy.button":`{label}をコピー`,"copy.done":`コピーしました。`,"copy.refused":`ブラウザがクリップボードへの書き込みを拒否しました。`,"copy.command":`コマンド`,"copy.terminalCommand":`ターミナルコマンド`,"copy.privateKey":`秘密鍵`,"copy.publicKey":`公開鍵`,"copy.keyLine":`鍵の行`,"copy.remoteCommand":`リモートコマンド`,"copy.diagnosticReport":`診断レポート`,"diagnostic.requestFailed":`操作を完了できませんでした`,"diagnostic.requestFailedHint":`sshc でエラーが発生しました({code})。問い合わせの際は診断情報を確認してください。`,"diagnostic.showDetails":`診断情報を表示`,"diagnostic.dismiss":`エラーを閉じる`,"history.requestRejected":`要求が拒否されました({code})。`,"history.pageTitle":`History`,"history.pageDescription":`完了した変更を確認し、中断した書き込みを復旧し、新しい履歴を失わずにファイル単位で復元できます。`,"history.metricChanges":`完了した変更`,"history.metricInterrupted":`中断`,"history.metricRestorable":`復元可能なファイル`,"history.operation.configuration":`SSH Config の変更`,"history.operation.connection":`接続先の変更`,"history.operation.key":`鍵の変更`,"history.operation.terminal":`ターミナル設定の変更`,"history.operation.engine":`起動設定の変更`,"history.operation.vault":`Vault の変更`,"history.operation.sync":`同期設定の変更`,"history.operation.other":`アプリの変更`,"history.status.staging":`準備中`,"history.status.staged":`中断`,"history.status.applied":`適用済み`,"history.status.completed":`完了`,"history.status.rolledBack":`取り消し済み`,"history.status.unknown":`記録済み`,"history.interrupted":`中断した変更`,"history.interruptedDetail":`{operation} 開始 {startedAt}:{total} 個のうち {committed} 個のファイルが書き込まれました。`,"history.complete":`完了させる`,"history.rollBack":`取り消す`,"history.loading":`履歴を読み込んでいます…`,"history.restored":`{path} を復元しました(履歴 ID:{id})。`,"history.completedTransaction":`中断していた変更を完了しました。`,"history.rolledBack":`中断していた変更を取り消しました。`,"history.completed":`完了した変更`,"history.empty":`このアプリケーションを通した変更はまだありません。`,"history.restorePath":`{path} を復元`,"history.backupsKept":`世代バックアップは ~/.ssh/sshc/backups に保存され、自動では削除されません。復元操作も新しい変更として履歴に残るため、同じ方法で取り消せます。`,"notice.complex_external_rule":`ワイルドカード、否定、Match ブロック、alias の重複のいずれかが含まれるため、この値を単純な形式では編集できません。値の参照元を表示します。`,"notice.duplicate_alias":`別のブロックも同じaliasを宣言しています。OpenSSHは多くの設定項目で、最初に読み込んだ値を使用します。`,"notice.proxy_ignored":`ProxyCommandとProxyJumpの両方が書かれています。OpenSSHは先に読み込んだ方だけを使い、この行は無視されます。`,"notice.wildcard_shadow":`すべてに一致するブロックが、このホストの値に影響する可能性があります。`,"notice.negated_pattern":`否定パターンがここに適用されます。`,"notice.unnamed_host_block":`このブロックには具体的な alias がないため、Raw テキストでのみ編集できます。`,"notice.match_block":`Match ブロックが見つかりました。Match exec はコマンドを実行しうるため、ここでは評価しません。`,"notice.dangerous_directive":`このディレクティブはコマンドを実行する可能性があります。記述どおりに保存され、このアプリが実行することはありません。`,"notice.unstructured_line":`この行は引用符が対応しておらず、記述されたまま保持されます。`,"notice.external_file":`このファイルは ~/.ssh の外にあります。表示のみで、書き込みは行いません。`,"notice.orphan_metadata":`このメモに対応するホストが存在しません。接続先を確認して関連付け直してください。`,"notice.group_cycle":`このグループの親子関係が循環しているため、スキップしました。`,"notice.group_member_missing":`このグループのメンバーに対応する Host ブロックが設定にありません。`,"refusal.directory_not_empty":`ディレクトリが空ではありません。先に中のファイルを削除してください。ファイルを直接参照する Include 行も同時に更新されます。`,"refusal.not_a_directory":`そのパスはディレクトリではなくファイルです。`,"refusal.group_is_declared":`{detail} は宣言済みのグループです。グループ画面で名前を変更または削除してください。関連する接続、共通設定、鍵も同時に移動されます。`,"refusal.destination_exists":`移動先には同名のファイルまたはディレクトリがあります。`,"refusal.alias_already_declared":`同名の接続設定が既にあるため保存できません。別の名前を使用してください。`,"refusal.region_damaged":`~/.ssh/config にある sshc 生成ブロックのマーカーが片方しかありません。生成範囲を特定できないため、何も書き込んでいません。`,"notice.group_not_declared":`このディレクトリは connections/ の下にありますが、参照する Include 行がないため読み込まれません。グループとして宣言するか、中のファイルを移動してください。`,"notice.group_directory_missing":`このグループは宣言されていますが、ディレクトリがありません。ディレクトリを作成してファイルを配置するまで、設定は読み込まれません。`,"notice.group_empty":`このグループは宣言されていますが、中身がありません。`,"notice.generated_region_damaged":`~/.ssh/config に sshc 生成ブロックの開始マーカーはありますが、終了マーカーがありません。sshc が生成した範囲を特定できないため、グループを保存できません。ブロック内の Include 行は現在も有効です。最後の Include 行の次に「# <<< sshc groups」を追加するか、生成ブロック全体を削除してからグループを保存し直してください。`,"notice.explained_values_only":`設定の一部を読み込めなかったため、読み込み可能な範囲の値だけを表示しています。`,"notice.match_exec_refused":`この設定には Match exec があります。ここでは何も実行しないので、値を解決できません。端末から ssh で接続してください。`,"notice.match_final_refused":`この設定には Match final があります。OpenSSH は設定を二度読み込みますが、sshc はこの処理に対応していないため値を解決できません。`,"notice.canonicalise_refused":`この設定は CanonicalizeHostname を有効にしています。設定を読み直す必要があるため、ここでは値を解決できません。`,"notice.unknown_token_refused":`この設定では、sshc が対応していないトークンを使用しています。値を解決できません。`,"notice.destination_not_included":`このファイルは SSH Config から参照されていないため、OpenSSH に読み込まれません。Include 設定を追加してください。`,"notice.group_file_unreached":`このファイルは connections/ 内にありますが、どのグループからも参照されていません。宣言済みのグループへ移動してください。`,"notice.group_directory_leftover":`グループのディレクトリが空になりました。sshc は空のディレクトリを自動削除しません。不要であれば手動で削除してください。`,"notice.include_no_longer_matches":`ファイル名を変更すると現在の Include パターンの対象外になり、OpenSSH に読み込まれなくなります。`,"notice.include_not_rewritten":`sshc が自動更新できない形式の Include がこのファイルを参照しています。Include 設定を手動で確認してください。`,"notice.include_now_unreached":`新しい保存先は SSH Config から参照されていません。Include 設定を追加するまで、OpenSSH に読み込まれません。`,"preview.heading":`保存内容の確認`,"preview.newFile":`(新規ファイル)`,"preview.tooLarge":`このファイルは行単位で表示できるサイズを超えているため、ファイル全体の置換として表示します。`,"preview.syntaxError":`{path} の {line} 行 {column} 列に構文エラーがあります。編集はここに保持され、書き込まれていません。`,"preview.theFile":`対象ファイル`,"preview.graphError":`この変更により Include の参照関係が不正になります。何も書き込んでいません。`,"preview.conflictError":`このファイルはアプリケーションの外で変更されました。何も書き込まれていません。`,"preview.rejected":`要求が拒否されました({code})。何も書き込まれていません。`,"preview.changedOnDisk":`読み込み後にディスク上で変更された内容`,"preview.pendingChange":`保留中の変更`,"preview.mergeByHand":`ファイルを読み込み直し、2 つの変更を手動で統合してください。何も書き込んでいません。`,"preview.nothingYet":`値を変更すると、何が書き込まれるかがここに表示されます。`,"preview.explainedFor":`{alias} の解決済み設定値`,"preview.unset":`未設定`,"reveal.heading":`秘密鍵を表示:{path}`,"reveal.warning":`秘密鍵はこのページに表示されます。この画面を見られる人は秘密鍵をコピーできます。sshcでは、ブラウザー拡張機能やクリップボード履歴ツールによる取得を防げません。表示操作は履歴に記録されます(鍵そのものは記録しません)。`,"reveal.show":`秘密鍵を表示`,"reveal.requesting":`一度限りの確認を要求しています…`,"reveal.privateKeyLabel":`秘密鍵`,"reveal.failed":`秘密鍵を表示できませんでした。このダイアログを閉じて、もう一度確認してください。`,"reveal.close":`閉じる`,"orphan.heading":`接続先が存在しない設定`,"orphan.explain":`これらのメモに対応する Host ブロックは設定から削除されています。関連付け先の接続を指定してください。`,"orphan.chooseTarget":`このメモが属する接続を選んでください。`,"orphan.occupied":`{alias} には既に独自の設定があります。先にそちらを消すか、このメモを破棄してください。`,"orphan.entry":`{path} の {alias}`,"orphan.noSettings":`設定なし`,"orphan.tags":`タグ {tags}`,"orphan.note":`メモ「{note}」`,"orphan.colour":`色 {colour}`,"orphan.reassociateWith":`{alias} の再関連付け先`,"orphan.reassociatePlaceholder":`再関連付け先…`,"orphan.reassociate":`{alias} を再関連付け`,"orphan.discard":`{alias} の設定を破棄`,"password.blocker.authenticationOff":`このホストは PasswordAuthentication が no のため、クライアントがパスワードを提示することはありません。`,"password.blocker.aliasNotSimple":`これは具体的なホストではなくパターンです。パスワードを保存するには、単一ホストのアカウントを指定してください。`,"password.blocker.identityFile":`このホストには秘密鍵が直接設定されています。sshc はパスワードを保存・供給せず、必要な手入力を OpenSSH に任せます。`,"password.warn.hostKeyUnknown":`このホストの鍵は known_hosts に登録されていません。保存済みパスワードを使用すると、パスワード入力ヘルパはホスト鍵の確認に応答できないため、初回接続に失敗します。先に Known Hosts でホスト鍵を登録してください。`,"password.warn.hostNameUnresolved":`この alias の HostName を特定できませんでした。パスワードは alias に紐づけて保存されます。`,"password.show":`表示`,"password.showNamed":`{label}を表示`,"password.hideNamed":`{label}を隠す`,"password.hide":`隠す`,"sync.heading":`Sync`,"sync.overviewHeading":`同期`,"sync.manageSettings":`同期設定を管理`,"sync.exclusions.heading":`同期するファイル`,"sync.exclusions.open":`選択・除外ルール`,"sync.exclusions.loading":`同期対象を読み込んでいます…`,"sync.exclusions.summary":`対象 {included} 件 · 除外 {ignored} 件`,"sync.exclusions.hint":`チェックを外したファイルは送信せず、受信時にも上書き・削除しません。ローカルにある内容はそのまま残ります。`,"sync.exclusions.defaults":`まだ .sshcignore はありません。OSの管理ファイル、バックアップ、一時ファイル、ロックファイル、SSHの許可鍵・既知ホスト情報、.ssh直下のenvironmentとrcを除外する既定ルールが有効です。保存すると端末間で共有されます。`,"sync.exclusions.search":`ファイル名・パスを検索`,"sync.exclusions.empty":`一致するファイルはありません。`,"sync.exclusions.sensitiveWarning":`接続設定または鍵が除外されています。別の端末ではその接続を再現できない可能性があります。`,"sync.exclusions.advanced":`.sshcignore を編集`,"sync.exclusions.rules":`同期除外ルール`,"sync.exclusions.syntax":`Gitignoreと同じ形式で *、**、?、[a-z]、!(再追加)を使えます。.sshcignore自身とsshcの端末固有状態はこの設定に関係なく扱われます。`,"sync.exclusions.save":`除外設定を保存`,"sync.exclusions.shared":`.sshcignore は同期され、すべての端末で同じルールを使います。`,"sync.exclusions.invalid":`除外ルールの書式が正しくありません。`,"sync.exclusions.loadFailed":`同期対象を読み込めませんでした。`,"sync.exclusions.saveFailed":`除外設定を保存できませんでした。`,"sync.setup.check":`接続を確認`,"sync.setup.empty":`接続できました。このパスには同期データがありません。`,"sync.setup.existing":`既存の同期データが見つかりました。`,"sync.setup.incomplete":`履歴はありますが、現在のスナップショットがありません。`,"sync.setup.useAnotherPath":`新しく始める場合は、空の別パスを指定してください。`,"sync.setup.existingKey":`この同期データと同じ暗号化キーを入力してください。保存前に実際のスナップショットを復号して確認します。`,"sync.setup.emptyKey":`強い暗号化キーを自動生成します。自分で決めることもできます。`,"sync.setup.save":`確認して保存`,"sync.setup.saved":`接続情報と暗号化キーを保存しました。`,"sync.setup.changed":`確認後に同期先の状態が変わりました。もう一度、接続を確認してください。`,"sync.role.main":`このマシンで送受信`,"sync.role.receive":`このマシンでは受信のみ`,"sync.role.advanced":`同期モードの詳細設定`,"sync.role.send":`このマシンでは送信のみ`,"sync.pageDescription":`この SSH ワークスペースを暗号化スナップショットとして保存し、オブジェクトストレージ経由でマシン間に同期します。`,"sync.flowHeading":`同期を始める手順`,"sync.flowBucket":`バケットを設定`,"sync.flowKey":`共通の暗号化キーを設定`,"sync.flowOperate":`状態を確認して送受信`,"sync.loading":`同期設定を読み込んでいます…`,"sync.warning":`同期対象には、同期除外ルールに一致しない~/.ssh配下の通常ファイルが含まれます。秘密鍵も含まれる場合があります。スナップショットはアップロード前にこのマシン上で下のキーを使って暗号化されるため、ストレージ事業者に同期対象の平文は送信されません。ただし、バケットの認証情報を持つ第三者は暗号化済みスナップショットを取得し、暗号化キーの総当たりをオフラインで続けられます。`,"sync.statusFailed":`同期設定を読み取れませんでした。`,"sync.bucketHeading":`バケット`,"sync.notConfigured":`まだバケットが設定されていません。`,"sync.endpoint":`エンドポイント`,"sync.endpointHint":`https である必要があります。R2 では https://.r2.cloudflarestorage.com です。`,"sync.bucket":`バケット名`,"sync.path":`バケット内のパス`,"sync.pathHint":`任意です。空ならバケットのルートに置きます。`,"sync.region":`リージョン`,"sync.regionHint":`任意です。空欄の場合は auto を使用します。R2 では auto、AWS S3 ではバケットのリージョンを指定してください。`,"sync.accessKeyId":`アクセスキー ID`,"sync.secretAccessKey":`シークレットアクセスキー`,"sync.credentialsNote":`バケットの認証情報はマスターパスワードで暗号化して保存し、スナップショットには含めません。スナップショットに含めると、1 つのスナップショットを入手した第三者が以後のスナップショットも取得できるためです。`,"sync.sealed":`この設定はマスターパスワードで暗号化されています。表示するには Vault を開いてください。`,"sync.unlockFailed":`マスターパスワードが違います。`,"sync.noVault":`このマシンにはまだ Vault がありません。「Vault」で作成してから戻ってきてください。`,"sync.direction":`同期の方向`,"sync.direction.both":`送信と受信`,"sync.direction.push":`送信のみ`,"sync.direction.pull":`受信のみ`,"sync.direction.both.hint":`このマシンの変更を送信し、他のマシンが送信した変更を適用できます。`,"sync.direction.push.hint":`このマシンからの送信のみを行います。他のマシンの変更は適用されませんが、変更内容の確認はできます。`,"sync.direction.pull.hint":`このマシンでは受信のみを行います。ローカルの変更はバケットや他のマシンへ送信されません。`,"sync.editSettings":`バケット設定を編集`,"sync.cancelSettings":`編集をキャンセル`,"sync.configureFailed":`そのバケットを設定できませんでした。`,"sync.detailsHeading":`詳細・履歴`,"sync.neverSynced":`このマシンはまだ同期していません。`,"sync.lastSynced":`最終同期 {at}、{count} ファイル。`,"sync.key":`暗号化キー`,"sync.keyHint":`スナップショットはマスターパスワードではなく、このキーで暗号化します。同じバケットを共有するすべてのマシンに同じキーを入力してください。マスターパスワードはマシンごとに異なる値を使用できます。このキーを紛失するとスナップショットを復号できません。`,"sync.keyMissing":`キーがまだありません。ここで作り、同じキーを他のマシンにも入力してください。`,"sync.keySet":`キーは設定済みです。保存後の値は再表示できません。`,"sync.keyReady":`設定済み`,"sync.keyNeeded":`キーが必要`,"sync.keyShownOnce":`いまコピーして、他のマシンに入力してください。この画面を離れると二度と表示されません。`,"sync.keyChooseOwn":`自分で決める`,"sync.keyOwnValue":`キー`,"sync.keyCreate":`暗号化キーを作成`,"sync.keyReplace":`キーを置き換える`,"sync.keySaved":`保存しました。`,"sync.keyFailed":`キーを保存できませんでした。`,"sync.keyTooShort":`自分で決めるキーは 12 文字以上にしてください。`,"sync.wrongKey":`保存済みのキーでは、このバケットのスナップショットを復号できません。すべてのマシンで同じキーを使用しているか確認するか、バケットの状態からリモートスナップショットを明示的に置き換えてください。`,"sync.wrongMaster":`このマシンのマスターパスワードと違います。`,"sync.bucketAuthenticationFailed":`オブジェクトストレージが要求を認証できませんでした。何も保存していません。アクセスキーとシークレットを確認してください。`,"sync.bucketAccessDenied":`オブジェクトストレージへのアクセスが拒否されました。何も保存していません。資格情報、バケット、リージョン、キーの権限を確認してください。`,"sync.bucketRateLimited":`オブジェクトストレージが要求を制限しています。しばらく待ってから再実行してください。`,"sync.bucketUnavailable":`オブジェクトストレージのサービスが一時的に利用できません。時間を置いて再実行してください。`,"sync.unreachable":`オブジェクトストレージが要求を拒否しました。何も保存していません。バケット名、アクセスキー、シークレット、リージョン、権限を確認してください。`,"sync.bucketTimeout":`オブジェクトストレージが時間内に応答しませんでした。回線とエンドポイントを確認してください。`,"sync.bucketDNSFailed":`エンドポイントのホスト名を解決できませんでした。入力したアドレスと端末のDNS接続を確認してください。`,"sync.bucketTLSFailed":`エンドポイントとの安全な接続を検証できませんでした。HTTPSのアドレスと端末の日時を確認してください。`,"sync.bucketUnreachable":`オブジェクトストレージへ接続できませんでした。端末のネットワークとエンドポイントを確認してください。`,"sync.snapshotDownloadIncomplete":`暗号化スナップショットの受信が途中で終了しました。回線を確認して、もう一度受信してください。`,"sync.snapshotCostRefused":`このスナップショットは復号時の負荷が安全上限を超えるため開けません。`,"sync.snapshotSchemaUnsupported":`このスナップショットは現在のsshcが対応していない形式です。作成した端末のsshcと同じか新しい版へ更新してください。`,"sync.snapshotRejected":`取得したデータは有効なsshcスナップショットではないか、破損しています。何も上書きしていません。`,"sync.snapshotTooLarge":`スナップショットが安全に読み込める上限を超えています。何も上書きしていません。`,"sync.noSnapshot":`指定したバケットとパスに現在のスナップショットがありません。`,"sync.internalFailed":`同期処理で分類できない内部エラーが発生しました。下の診断コードを添えて報告してください。`,"sync.failed":`同期できませんでした。何も上書きしていません。接続を確認してから、もう一度お試しください。`,"sync.localChanged":`確認後にこのマシンの設定が変更されました。上書きせずに停止しました。もう一度「変更を確認」からやり直してください。`,"sync.workspaceBusy":`別の処理がこのマシンの設定を更新しています。完了してから、もう一度お試しください。`,"sync.endpointPath":`エンドポイントはアカウントのアドレスだけです。バケット名やパスは含めません。バケット名は下の欄に入れてください。`,"sync.autoHint.both":`Vault が開いている間、1 分ごとにリモートの更新を確認します。このマシンの設定を変更した場合は、最後の変更から 5 秒後に一度だけ送信します。競合は自動解決せず、ファイルを削除する変更も自動適用しません。どちらの場合も自動同期を停止して通知します。`,"sync.autoHint.pull":`Vault が開いている間、1 分ごとにリモートの更新を確認します。このマシンの変更は送信しません。競合やファイルを削除する変更を見つけた場合は、自動受信を停止して通知します。`,"sync.autoHint.push":`Vault が開いている間、リモートが更新されていないか確認します。このマシンの設定を変更した場合は、最後の変更から 5 秒後に一度だけ送信します。リモートの内容は受信しません。`,"sync.autoEnable":`このマシンを自動で同期する`,"sync.autoIdle":`停止中`,"sync.autoLastRan":`最後に確認したのは {at} です。`,"sync.autoBlockedConflicts":`自動同期を停止しました。同じファイルがこのマシンと他のマシンの両方で変更されています。「変更を確認」で内容を比較してください。`,"sync.autoBlockedRemovals":`自動同期を停止しました。適用すると、このマシンからファイルが削除されます。「変更を確認」で対象を確認してください。`,"sync.autoBlockedRemoteMoved":`別のマシンがリモートスナップショットを変更したため、送信前に自動同期を停止しました。変更を取得するか、確認したリモートスナップショットを明示的に置き換えてください。`,"sync.autoBlockedRemoteMovedPull":`現在のリモートは、このマシンが最後に受信した履歴から分岐しています。意図しない巻き戻しを防ぐため、自動受信を停止しました。`,"sync.remoteHeadReviewHint":`受信専用では、現在のリモートを正として明示的に受信できます。作成日時・作成元・変更されるファイルを確認してから適用します。`,"sync.remoteHeadReview":`現在のリモートを確認`,"sync.checkRemoteChanges":`リモートの変更を確認`,"sync.remoteHeadPreviewHeading":`現在のリモートを受信`,"sync.remoteHeadPreview":`作成 {at}・作成元 {origin} のリモートを確認しています。適用時にも同じ世代であることを再確認し、途中で変わっていた場合は何も書き込みません。`,"sync.remoteHeadApply":`このリモートを受信`,"sync.autoBlockedRemoteDeleted":`以前同期した現在のスナップショットがバケットから削除されています。意図せず再作成または上書きしないよう、自動同期を停止しました。`,"sync.autoFailedLast":`前回はバケットに接続できませんでした。次回の自動同期で再試行します。`,"sync.autoFailedWrongKey":`このマシンの同期鍵ではリモートスナップショットを開けません。同じスナップショットの自動取得は再試行しません。`,"sync.autoFailedSchema":`リモートスナップショットの形式に対応していません。同じスナップショットの自動取得は再試行しません。`,"sync.autoFailed":`設定を保存できませんでした。`,"sync.autoNow.both":`今すぐ同期`,"sync.autoNow.pull":`今すぐ受信`,"sync.autoNow.push":`今すぐ送信`,"sync.autoNowFailed":`その確認を実行できませんでした。`,"sync.transferHeading":`送信・変更確認`,"sync.transferHint.both":`このマシンの内容を送信するか、他のマシンの変更を確認してから適用します。`,"sync.transferHint.push":`このマシンの内容を送信します。リモートの内容はこのマシンへ適用しません。`,"sync.commitMessage":`コミットメッセージ`,"sync.commitMessagePlaceholder":`このスナップショットの変更内容`,"sync.commitMessageHint":`ローカル差分から自動生成します。手動送信前に編集できます。`,"sync.commitMessageChanges":`ローカル差分:追加 {added} 件 · 変更 {modified} 件 · 削除 {removed} 件`,"sync.commitMessageInvalid":`コミットメッセージは 240 文字以内の 1 行で入力してください。`,"sync.bucketStateHeading":`バケットの状態`,"sync.bucketStateHint":`暗号化された内容は取得せず、現在のスナップショットと日付付き履歴を S3 から直接確認します。画面表示中は 30 秒ごと、送受信後にも更新します。`,"sync.bucketRefresh":`バケットの状態を更新`,"sync.bucketNotConfigured":`バケットを設定すると状態を確認できます。`,"sync.bucketLoading":`バケットを確認しています…`,"sync.bucketStatusFailed":`バケットの状態を取得できませんでした。`,"sync.bucketLive":`現在のスナップショット`,"sync.bucketLiveEmpty":`バケットに現在のスナップショットはありません。`,"sync.bucketLocalCurrent":`このマシンは現在のリモートスナップショットを確認済みです。`,"sync.bucketLocalBehind":`リモートスナップショットが、このマシンで最後に確認した内容から更新されています。`,"sync.bucketHistory":`日付付き履歴 · {count} 件`,"sync.bucketHistoryShowing":`{count} 件のうち最新 {shown} 件を表示しています。`,"sync.bucketHistoryExpand":`すべての履歴を表示`,"sync.bucketHistoryCollapse":`最新 5 件だけ表示`,"sync.bucketObjectName":`S3 オブジェクト名を表示`,"sync.bucketHistoryTruncated":`最新 10,000 件を表示しています。これより古い履歴もバケットにあります。`,"sync.bucketHistoryEmpty":`日付付き履歴は見つかりませんでした。`,"sync.bucketObjectMeta":`{size}・更新 {at}`,"sync.bucketCheckedAt":`バケット確認時刻 {at}`,"sync.historyHeading":`暗号化された世代履歴`,"sync.historyHint":`このマシン上で最近の履歴を上限付きで復号し、コミットグラフとして表示します。ファイル内容はAPI応答へ出しません。`,"sync.historyRefresh":`世代履歴を更新`,"sync.historyNeedsKey":`共有暗号化キーを設定すると世代履歴を読めます。`,"sync.historyLoading":`最近の世代を復号しています…`,"sync.historyFailed":`暗号化されたバックアップ履歴を読み込めませんでした。`,"sync.historySummary":`{count} 世代 · 取得 {size}`,"sync.historyTruncated":`上限内の新しい履歴だけを復号しています。古い履歴ファイルは上のバケット一覧に残っています。`,"sync.historySkipped":`現在の形式または暗号化キーで開けない履歴ファイルを {count} 件スキップしました。`,"sync.historyTimeline":`世代タイムライン`,"sync.historyRelation.head":`HEAD`,"sync.historyRelation.ancestor":`祖先`,"sync.historyRelation.branch":`分岐`,"sync.historyRevisionMeta":`{at} · {count} ファイル · 作成元 {origin}`,"sync.historyParent":`親 {revision}`,"sync.historySelect":`世代を選ぶと、現在のリモート最新版との差分を確認できます。`,"sync.historySelected":`選択した世代`,"sync.historyDiffLoading":`パスの差分を確認しています…`,"sync.historyDiffEmpty":`この世代をもう一度選ぶとパスの差分を確認できます。`,"sync.historyDiffFailed":`選択した世代との差分を確認できませんでした。`,"sync.historyDiff.added":`追加 {count} 件`,"sync.historyDiff.modified":`変更 {count} 件`,"sync.historyDiff.removed":`削除 {count} 件`,"sync.historyRestoreHint":`復元前にローカルの変更内容を確認します。リモートの最新版は巻き戻さず、次の送信でこの世代を親にした新しい最新版を作ります。`,"sync.historyRestorePreview":`この世代の復元を確認`,"sync.forceHeading":`リモートスナップショットを置き換える`,"sync.forceHint":`読み取れない、または不要なスナップショットがあるバケットへ変更した場合に使います。このワークスペースを暗号化し、上に表示した現在のリモートスナップショットだけを置き換えます。確認後に内容が変わった場合は中止します。既存の日付付き履歴は削除しません。`,"sync.forceConfirm":`現在のリモートスナップショットを、このマシンのワークスペースで置き換えることを理解しました。`,"sync.forcePush":`リモートスナップショットを置き換える`,"sync.forcePushShort":`強制送信`,"sync.forcePull":`強制受信`,"sync.dialogClose":`閉じる`,"sync.forcePushed":`確認したリモートスナップショットを置き換えました。`,"sync.forceFailed":`リモートスナップショットを置き換えられませんでした。バケットの状態を更新し、もう一度確認してください。`,"sync.push":`このワークスペースを送信`,"sync.pushed":`ワークスペースを送信しました。`,"sync.pushFailed":`スナップショットを送信できませんでした。他のマシンがこのマシンの最終同期後に送信している場合は、先にその変更を取得してください。`,"sync.noLocalChanges":`送信するローカル変更はありません。`,"sync.remoteMoved":`別のマシンが最新のスナップショットを変更したため、再送信せず停止しました。先に変更を取得するか、確認したリモートスナップショットを明示的に置き換えてください。`,"sync.previewStale":`プレビュー後にリモートのスナップショットが変わりました。もう一度プレビューしてから適用してください。`,"sync.remoteDeleted":`適用前に現在のリモートスナップショットが削除されました。バケットの状態を更新してください。`,"sync.keyRecoveryRequired":`同期キーの置き換えが中断されました。同じ新しい同期キーをもう一度入力して復旧してください。`,"sync.keyRecoveryTargetChange":`中断された同期キーの置き換えを完了してから、バケットまたはパスを変更してください。`,"sync.keyHistoryLossConfirm":`過去の履歴スナップショットは以前のキーで暗号化されたままとなり、読み取れなくなることを理解しました。`,"sync.preview":`変更を確認`,"sync.pullFailed":`スナップショットを読み取れませんでした。`,"sync.alreadyMatches":`このワークスペースは既にスナップショットと一致しています。`,"sync.previewHeading":`取得した場合の変更`,"sync.conflictExplain":`これらのファイルは、このマシンと他のマシンの両方で変更されています。同じ設定ブロックを自動的に統合できないため、何も適用していません。設定ファイル画面で手動で統合するか、採用する内容を持つマシンから送信してください。`,"sync.conflictPermissions":`権限: 前回の同期 {base}・このマシン {local}・リモート {remote}`,"sync.keepMine":`このマシンの内容を残す`,"sync.takeTheirs":`他のマシンの内容を使用`,"sync.wouldWrite":`{count} 個のファイルが書き込まれます:`,"sync.wouldRemove":`{count} 個のファイルが削除されます:`,"sync.confirmOverwrite":`~/.ssh のファイルを上書きし、上記のファイルをこのマシンから削除します。変更対象は事前に ~/.ssh/sshc/backups/ へバックアップされ、履歴から復元できます。続行しますか?`,"sync.apply":`スナップショットを適用`,"sync.applied":`適用しました。この変更は履歴に残り、あとから取り消せます。`,"sync.applyFailed":`スナップショットを適用できませんでした。`,"sync.result.pushTitle":`今回の送信`,"sync.result.previewTitle":`受信内容の確認`,"sync.result.applyTitle":`適用結果`,"sync.result.previousTitle":`前回の成功`,"sync.result.filesSource":`{count} ファイル · {size}`,"sync.result.encrypted":`暗号化スナップショット {size}`,"sync.result.uploaded":`S3 転送 {size}({count} オブジェクト、履歴+現在版)`,"sync.result.previewDownload":`{downloaded} 取得 · 展開後 {source}`,"sync.result.applyDownload":`適用時に再取得 {size}`,"sync.result.changes":`書き込み {written} 件 · 削除 {removed} 件 · 競合 {conflicts} 件`,"sync.result.created":`スナップショット作成 {at}`,"sync.result.snapshotAt":`{at}のスナップショット`,"sync.result.appliedSnapshot":`{at}のスナップショットを適用`,"sync.result.completed":`操作完了 {at}`,"diag.heading":`Diagnostics`,"diag.pageDescription":`保存済みの接続先だけでなく、一時的に指定したホストも検査できます。検査を開始するまで接続しません。`,"diag.configUnreadable":`設定を読み取れませんでした。`,"diag.running":`選択した検査を実行しています…`,"diag.idle":`開始するまで、どの検査も実行されません。`,"diag.hostAlias":`Host alias`,"diag.needsAlias":`検査するには Host alias を入力してください。`,"diag.explain":`設定を解析`,"diag.explainFailed":`この接続の設定を解析できませんでした。`,"diag.checkReachability":`疎通を確認`,"diag.reachabilityFailed":`疎通確認を実行できませんでした。`,"diag.testAuthentication":`認証を確認`,"diag.authenticationFailed":`認証テストを実行できませんでした。`,"diag.configuration":`設定ファイル`,"diag.missingSuffix":`(存在しません)`,"diag.canRunCommand":`この接続には、OpenSSHがコマンドを実行する可能性のある設定があります`,"diag.directiveAt":`{keyword}({path}:{line})`,"diag.sourcesCaption":`各値の参照元。「不採用」と表示された行は、採用された行より後に読み込まれたため効果がありません。`,"diag.tableScrollHint":`横にスワイプするとすべての列を確認できます`,"diag.columnKeyword":`キーワード`,"diag.columnValue":`値`,"diag.columnWhere":`読み込み元`,"diag.columnCondition":`条件`,"diag.columnState":`状態`,"diag.inEffect":`有効`,"diag.superseded":`不採用`,"diag.route":`接続経路`,"diag.hopComplex":`このホップは alias だけで指定されていないため、接続先をここでは解決できません`,"diag.reachedThrough":`{parent} を経由`,"diag.notSimple":`この設定は簡易表示では解決できません`,"diag.notSimpleDetail":"sshc では各値の参照元だけを表示します。最終的な値は `ssh -G` で確認してください。","diag.inside":`{condition} の内側`,"diag.reachability":`疎通`,"diag.authentication":`認証`,"diag.authenticationMethod":`{method} で認証されました。`,"diag.forHost":`{host} の診断`,"kh.heading":`Known Hosts`,"kh.pageDescription":`信頼済みホスト鍵を確認し、接続先をスキャンして、known_hosts へ追加する前にフィンガープリントを検証します。`,"kh.metricEntries":`信頼済みエントリ`,"kh.metricHashed":`ハッシュ化ホスト`,"kh.metricCandidates":`スキャン候補`,"kh.scanHeading":`ホストをスキャン`,"kh.trustedHeading":`信頼済みホスト鍵`,"kh.columnHost":`ホスト`,"kh.columnType":`鍵種別`,"kh.columnFingerprint":`フィンガープリント`,"kh.columnTrust":`信頼状態`,"kh.columnActions":`操作`,"kh.unreadable":`known_hosts を読み取れませんでした。`,"kh.removeFailed":`エントリを削除できませんでした。何も変更していません。`,"kh.scanFailed":`このホストをスキャンできませんでした。`,"kh.addFailed":`鍵を追加できませんでした。何も変更していません。`,"kh.addFailedCode":`鍵を追加できませんでした({code})。何も変更していません。`,"kh.removed":`1 件のエントリを削除しました(履歴 ID:{id})。`,"kh.added":`{host} を追加しました(履歴 ID:{id})。`,"kh.search":`検索`,"kh.hashed":`(ハッシュ済み)`,"kh.delete":`削除`,"kh.confirmRemove":`{line} 行目({fingerprint})を削除しますか? 操作は履歴に記録され、バックアップも保存されます。`,"kh.confirmDelete":`削除を確定`,"kh.cancel":`キャンセル`,"kh.hostToScan":`スキャンするホスト`,"kh.scan":`スキャン`,"kh.scanCandidates":`スキャン候補`,"kh.unverified":`未検証`,"kh.add":`追加`,"kh.addHeading":`未検証のホスト鍵を追加`,"kh.addExplain":`{host} への接続時にこの鍵が提示されましたが、通信を傍受した第三者によって差し替えられた可能性があります。別の信頼できる経路で入手したフィンガープリントを入力するか、未検証の鍵を信頼するリスクを確認してください。`,"kh.expectedFingerprint":`別経路で確認したフィンガープリント`,"kh.acknowledge":`検証できていないリスクを理解したうえで、この鍵を信頼します`,"kh.addToKnownHosts":`known_hosts に追加`,"kh.fingerprintMismatch":`入力したフィンガープリントはこの鍵と一致しません。入力値:{typed}、スキャン結果:{scanned}。何も追加していません。`,"rk.heading":`Remote Keys`,"rk.pageDescription":`公開鍵をリモートアカウントへ登録する前に、authorized_keys へ追加する内容を確認します。`,"rk.waiting":`サーバーの応答を待っています…`,"rk.idle":`確認するまで、リモートホストへは何も送られません。`,"rk.added":`リモートの authorized_keys に鍵を追加しました。`,"rk.alreadyPresent":`鍵は既に存在したため、リモートのファイルはそのままです。`,"rk.valuesFromEngine":`sshc が設定を読んだ結果です(ssh は実行していません)`,"rk.valuesFromSshG":`OpenSSHがssh -Gで解決した結果です`,"rk.pickFromSsh":`~/.ssh から公開鍵を選ぶ`,"rk.typeInstead":`公開鍵を手動で入力`,"rk.hostAlias":`Host alias`,"rk.hostSearch":`接続先`,"rk.hostSearchPlaceholder":`ホストを検索、または alias を入力`,"rk.hostTypeHint":`上に Host alias を入力してください。保存済みの接続があればここに表示されます。`,"rk.hostsSelected":`{count} 件を選択中`,"rk.hostChoices":`接続先の候補`,"rk.selectMatches":`一致項目を選択`,"rk.clearSelection":`解除`,"rk.noHostMatches":`一致する接続先がありません`,"rk.chooseHost":`接続先を 1 件以上選択するか、Host alias を入力してください。`,"rk.publicKeyFile":`公開鍵ファイル`,"rk.publicKeyLine":`公開鍵の行`,"rk.showWhatWouldHappen":`登録内容を確認`,"rk.register":`鍵を登録`,"rk.registerMany":`{count} 台へ鍵を登録`,"rk.plannedHosts":`{count} 台の内容を確認済み`,"rk.planFailed":`登録内容を確認できませんでした。どのホストにも接続していません。`,"rk.registerFailed":`鍵は登録されませんでした。リモートホストはそのままです。`,"rk.publicKeyUnreadable":`その公開鍵を読み取れませんでした。どこにも接続していません。`,"rk.withCode":`{message}({code})`,"rk.confirmHeading":`リモート登録の確認`,"rk.confirmManyHeading":`{count} 台への登録内容を確認`,"rk.planFor":`{alias} への登録内容`,"rk.alias":`Alias`,"rk.effectiveUser":`接続ユーザー`,"rk.noUser":`設定にありません。ssh はローカルのアカウント名を使います`,"rk.destination":`接続先`,"rk.valuesCameFrom":`設定値の参照元`,"rk.keyFile":`公開鍵ファイル`,"rk.fingerprint":`フィンガープリント`,"rk.appendTo":`{hostname} の {account} にある {remotePath} へ、同じ行が存在しない場合のみ 1 行追加します。`,"rk.theRemoteAccount":`リモートアカウント`,"rk.usersAccount":`{user} のアカウント`,"rk.keyLineLabel":`追加する公開鍵の行`,"rk.remoteRuns":`リモートホストで次のコマンドを実行し、鍵を標準入力へ渡します:`,"rk.remoteCommandLabel":`リモートコマンド`,"rk.connectingRuns":`接続時にリモートコマンドが実行されます`,"rk.acknowledgeRuns":`実行されるリモートコマンドを確認しました`,"rk.manualHeading":`sshc からこのホストへ鍵を登録できません。次の手順を手動で実行してください:`,"rk.result":`結果`,"rk.someRegistrationsFailed":`更新できなかった接続先があります。接続先ごとの結果を確認してください。`,"explorer.loading":`設定ファイルを読み込んでいます…`,"explorer.pageTitle":`SSH Config`,"explorer.pageDescription":`Include の参照関係を確認し、OpenSSH の書式を維持したまま設定ファイルとワークスペース内のファイルを管理します。`,"explorer.metricFiles":`読み込んだファイル`,"explorer.metricEditable":`編集可能`,"explorer.metricDiagnostics":`診断`,"explorer.hierarchy":`Include 階層`,"explorer.externalFile":`このファイルは ~/.ssh の外にあります。読み取って表示するだけで、書き込みは行いません。`,"explorer.insideCondition":`{condition} の内側`,"explorer.fileState":`{missing}{loads}{editable}`,"explorer.missing":`存在しません · `,"explorer.readTimes":`{count} 回読まれます · `,"explorer.editable":`編集可能`,"explorer.readOnly":`読み取り専用`,"explorer.newFilePath":`新しいファイルのパス`,"explorer.workspaceActions":`ワークスペースのファイル`,"explorer.directoryHelp":`ファイルとディレクトリの操作`,"explorer.createFile":`ファイルを作成`,"explorer.createDirectory":`ディレクトリを作成`,"explorer.deleteDirectory":`ディレクトリを削除`,"explorer.directoryNote":`ディレクトリを作成・削除できます。削除できるのは空のディレクトリだけです。先に中のファイルを削除してください。ファイルを直接参照する Include 行も同時に更新されます。宣言済みグループはグループ画面で管理してください。`,"explorer.fileOperations":`このファイル`,"explorer.fileOperationsNote":`ファイル名を変更すると、このファイルを直接参照する Include 行も同時に書き換えます。ワイルドカードのパターンは変更せず、新しいパスが一致しない場合は警告します。`,"explorer.renameTo":`新しいパス`,"explorer.renameFile":`ファイル名を変更`,"explorer.deleteFile":`ファイルを削除`,"explorer.confirmDelete":`削除する`,"explorer.cancelDelete":`やめる`,"explorer.deleteIsRecoverable":`削除すると、このファイルを直接参照する Include 行も削除します。バックアップは保存されるため、履歴から復元できます。`,"explorer.saveOrDiscardFirst":`未保存の編集があります。リネームや削除の前に保存するか、ファイルを開き直してください。`,"explorer.newFileNote":`新しいファイルをOpenSSHに読み込ませるには、~/.ssh/configのIncludeから参照してください。接続をグループ間で移動するには、[Connections]を使用します。`,"explorer.diagnostics":`診断`,"explorer.noIncludeProblem":`Include の問題は検出されていません。`,"explorer.opened":`{path} の {line} 行目を開きました。`,"explorer.selectFile":`全文を編集するファイルを選んでください。`,"explorer.emptyHeading":`設定ファイルを選択`,"explorer.unsaved":`未保存の変更があります`,"explorer.fileText":`ファイル本文 — {path}。入力内容をそのまま書き戻します。`,"explorer.preview":`プレビュー`,"explorer.saveFile":`ファイルを保存`,"groups.loading":`グループを読み込んでいます…`,"groups.pageTitle":`Groups`,"groups.pageDescription":`接続と鍵を階層化して整理し、グループ単位で共通の SSH 設定を適用します。`,"groups.metricGroups":`グループ`,"groups.metricConnections":`Connections`,"groups.metricDraft":`未保存の下書き`,"groups.empty":`グループはまだありません。下のフォームから作成できます。`,"groups.nameTaken":`同名のグループが既に存在します。別の名前を指定してください。`,"groups.chooseGroupAndKeyword":`グループとディレクティブのキーワードを選んでください。`,"groups.unbalancedQuote":`値の引用符が対応していません。OpenSSH は引用符の中でエスケープを持たないため、これは保存できません。`,"groups.renameNeedsName":`名前を変更するには、新しい名前が必要です。`,"groups.renameCollides":`{name} は既に存在します。別の名前にするか、どちらか一方を削除してください。`,"groups.compileNote":`グループは {file} の中の通常の Host ブロックとして生成されます。OpenSSH は最初に読んだ値を保持するため、子グループを親より先に書き出します。`,"groups.members":`メンバー`,"groups.noMembers":`なし`,"groups.colour":`色`,"groups.clearColour":`{name} の色を消す`,"groups.renameTo":`{name} の新しい名前`,"groups.renameShort":`新しい名前`,"groups.rename":`{name} の名前を変更`,"groups.displayOrder":`表示順`,"groups.hide":`{name} を接続タブで非表示`,"groups.hideOnlyContainers":`このグループには直下の接続があります。非表示にするとその接続も見えなくなるため、先に子グループへ移してください。`,"groups.remove":`{name} を削除`,"groups.newName":`新しいグループ名`,"groups.invalidName":`グループ名は相対ディレクトリパスです。英数字とドット・ハイフン・アンダースコアをスラッシュで区切り、6 階層までにしてください。`,"groups.directoryNote":`グループはディレクトリとして保存されます。接続先は {connections}//、鍵は {keys}// に配置され、~/.ssh/config にはグループごとに Include 行が生成されます。読み込み順は glob の展開順に依存せず、設定ファイルに明示されます。`,"groups.howItWorks":`グループと SSH ファイルの仕組み`,"groups.directories":`{connections}/ · {keys}/`,"groups.nestingNote":`スラッシュで階層化できます。work/eu は work の子グループです。`,"groups.addChild":`{name} の中にグループを追加`,"groups.listLabel":`グループ一覧(親が先)`,"groups.orderNote":`ここでは親が先に来るツリー順で表示しています。Include 行は逆順(深い子グループが先)で書かれます。OpenSSH は最初に読んだ値を採用するため、子の設定を親より先に読ませる必要があるからです。`,"groups.removeInto":`{name} を削除`,"groups.removeIntoShort":`中の接続の移動先`,"groups.removeIntoNone":`グループなし(connections/ 直下)`,"groups.removeExplain":`{name} を削除すると、Include 行とグループ設定がなくなります。中の接続 {count} 件はどこかへ移す必要があります。`,"groups.removeExplainEmpty":`{name} を削除すると、Include 行とグループ設定がなくなります。中に接続はないので、移動するものはありません。`,"groups.removeKeepsFiles":`設定ファイルは 1 つも削除されません。1 回の変更として履歴に残るため、あとから元に戻せます。`,"groups.removeConfirm":`{name} を削除する`,"groups.removeCancel":`キャンセル`,"groups.unsaved":`未保存`,"groups.unsavedBarLabel":`未保存のグループ変更`,"groups.unsavedBarNote":`グループ追加と表示設定はまだ保存されていません。名前変更や削除の前に保存するか破棄してください。`,"groups.discard":`グループ変更を破棄`,"groups.saveDraftFirst":`保留中のグループ変更を保存または破棄してから、名前変更や削除を行ってください。`,"groups.savedNote":`未保存の変更はありません。色、表示順、グループ、設定の追加は「グループを保存」で反映されます。名前の変更と削除は実行時に即座に書き込まれます。`,"groups.immediateActions":`名前変更と削除は即座にディスクへ書き込みます。`,"groups.newGroupNote":`このグループのディレクトリはまだありません。保存時に作成され、それまでは名前変更・削除できません。`,"groups.addHeading":`グループを追加する`,"groups.add":`グループを追加`,"groups.settingHeadingFor":`{name} に設定を追加`,"groups.directive":`ディレクティブ`,"groups.value":`値`,"groups.addSetting":`設定を追加`,"groups.previewChanges":`グループ変更をプレビュー`,"groups.save":`グループを保存`,"tree.navLabel":`Connections`,"tree.ungrouped":`未分類`,"tree.byGroups":`グループ`,"tree.groupFilter":`グループを選択`,"tree.groupSection":`{name} グループ(接続先 {count} 件)`,"tree.filter":`接続を絞り込む`,"tree.filterPlaceholderExpanded":`名前、接続先、ユーザー、グループ、タグを検索`,"tree.allConnections":`すべて`,"tree.resultsLabel":`接続先`,"tree.resultCount":`{visible} 件 / 全 {total} 件`,"tree.sortLabel":`接続の並び順`,"tree.sortConfigured":`設定順`,"tree.sortName":`名前順`,"tree.noMatch":`この条件に一致する接続はありません。`,"tree.collapse":`{name} を折りたたむ`,"tree.expand":`{name} を展開する`,"tree.duplicateAlias":`alias 重複`,"tree.dragGroupHint":`グループをドラッグすると、階層と表示順を変更できます。`,"browser.invalidUrl":`この接続 URL は認識できません。`,"browser.backToServers":`サーバー一覧へ戻る`,"browser.duplicateAlias":`alias 重複`,"conn.loading":`接続を読み込んでいます…`,"conn.heading":`Connections`,"conn.count":`接続先 {count} 件`,"conn.new":`新しい接続`,"conn.resizeGroups":`グループ列の幅を変更`,"conn.resizeList":`接続一覧の幅を変更`,"conn.allConnections":`接続一覧`,"conn.createAnother":`接続を追加`,"conn.cancelCreate":`キャンセル`,"conn.create":`接続を作成`,"conn.createTitle":`接続を作成`,"conn.createDescription":`SSH 接続先の設定を保存し、認証方法を選択します。`,"conn.createConnectionSection":`接続先`,"conn.createName":`接続名`,"conn.createNameRequired":`接続名(必須)`,"conn.createGroup":`保存先グループ`,"conn.createManageGroups":`グループを管理`,"conn.createNoGroup":`グループなし`,"conn.createHostName":`ホスト名または IP アドレス`,"conn.createHostNameRequired":`ホスト名または IP アドレス(必須)`,"conn.createUser":`ユーザー(任意)`,"conn.createPort":`ポート(任意)`,"conn.createPortHint":`空欄の場合は 22 を使用します。`,"conn.createAuthenticationSection":`認証`,"conn.createAuthenticationMethod":`認証方法`,"conn.createDedicatedPassword":`この接続専用の暗号化パスワード`,"conn.createSavedPassword":`保存済みパスワード`,"conn.createNewSharedPassword":`新しい保存済みパスワード`,"conn.createIdentityFile":`SSH 秘密鍵`,"conn.createConnectionPassword":`接続パスワード`,"conn.createDedicatedHint":`Vault 内で暗号化され、再利用可能なパスワード一覧には表示されません。`,"conn.createChooseSavedPassword":`保存済みパスワード`,"conn.createSavedHint":`選択した再利用可能なパスワードをこの接続と共有します。`,"conn.createNoSavedPasswords":`保存済みパスワードはありません`,"conn.createSavedPasswordName":`保存するパスワードの名前`,"conn.createNewPassword":`新しいパスワード`,"conn.createPrivateKey":`SSH 秘密鍵`,"conn.createNoPrivateKeys":`利用できる秘密鍵がありません`,"conn.createNoPrivateKeysHint":`パスワードを使わない場合は、先に秘密鍵を作成してください。`,"conn.createCreatePrivateKey":`秘密鍵を作成`,"conn.createLoadingOptions":`認証の選択肢を読み込んでいます…`,"conn.createOptionsFailed":`認証の選択肢を読み込めませんでした。`,"conn.createMasterPassword":`マスターパスワード`,"conn.createConfirmMaster":`マスターパスワードの確認`,"conn.createInitialiseVault":`暗号化 Vault を作成`,"conn.createUnlockVault":`Vault を開く`,"conn.createVaultMissing":`この接続を保存する前に暗号化 Vault を作成してください。`,"conn.createVaultLocked":`この接続を保存する前に暗号化 Vault を開いてください。`,"conn.createVaultFailed":`暗号化 Vault を作成できませんでした。`,"conn.createUnlockFailed":`暗号化 Vault を開けませんでした。`,"conn.createNeedVault":`続行するには暗号化 Vault を開いてください。`,"conn.createNeedConnectionPassword":`続行するには接続パスワードを入力してください。`,"conn.createNeedSavedPassword":`続行するには保存済みパスワードを選んでください。`,"conn.createNeedSavedPasswordName":`続行するには保存名を入力してください。`,"conn.createNeedNewPassword":`続行するには新しいパスワードを入力してください。`,"conn.createNeedPrivateKey":`続行するには秘密鍵を選ぶか作成してください。`,"conn.createDraftWaiting":`{alias} の接続設定を編集中です。`,"conn.createUntitledDraft":`名前未設定の接続`,"conn.createReturnToDraft":`接続設定に戻る`,"conn.createAliasRequired":`接続名を入力してください。`,"conn.createAliasInvalid":`英数字、ピリオド、ハイフン、アンダースコアを使い、先頭は英数字にしてください。`,"conn.createHostRequired":`ホスト名または IP アドレスを入力してください。`,"conn.createHostInvalid":`DNS 名、IPv4 アドレス、または角括弧なしの IPv6 アドレスを入力してください。`,"conn.createUserInvalid":`ユーザーには空白や制御文字を含められません。`,"conn.createPortInvalid":`ポートは 1〜65535 の整数にしてください。`,"conn.creating":`作成しています…`,"conn.createFailed":`接続を作成できませんでした。`,"conn.createAliasTaken":`別の接続がすでにその名前を使っています。`,"conn.duplicateAliasTaken":`{alias} は既に存在するため複製できません。`,"conn.createGroupMissing":`そのグループは宣言されていません。再読み込みして別のグループを選んでください。`,"conn.createKeyInvalid":`その秘密鍵は利用できなくなりました。再読み込みして別の鍵を選んでください。`,"conn.createCredentialMissing":`その保存済みパスワードは利用できなくなりました。再読み込みして別のものを選んでください。`,"conn.createDestinationExists":`このグループには同名の接続ファイルがすでにあります。`,"conn.basicConnection":`接続先`,"conn.basicAuthentication":`認証`,"conn.basicHostName":`ホスト名または IP アドレス`,"conn.basicServerKeyInvalid":`その SSH 秘密鍵は選択できなくなりました。再読み込みして選び直してください。`,"conn.basicCredentialExists":`同じ名前の保存済みパスワードがあります。「保存済みパスワード」から選ぶか、別の名前を使ってください。`,"conn.basicCredentialMissing":`その保存済みパスワードは存在しなくなりました。再読み込みして選び直してください。`,"conn.basicPasswordMissing":`この接続には削除できる保存済みパスワードがありません。`,"conn.basicUser":`ユーザー`,"conn.basicPort":`ポート`,"conn.basicPrivateKey":`SSH 秘密鍵`,"conn.basicStoredPassword":`保存済みパスワード`,"conn.basicStoredTOTP":`ワンタイムパスワード(TOTP)`,"conn.basicThisConnection":`この接続に設定されています。`,"conn.basicInheritedFrom":`{path}:{line} から継承しています。`,"conn.basicSSHDefault":`SSH の既定値です。他の項目を保存しても、この値は書き込みません。`,"conn.basicReadOnlyAdvanced":`基本タブでは読み取り専用です。元のディレクティブは詳細タブに残っています。`,"conn.basicComplex":`この接続には {keyword} が複数あります。詳細タブで整理してください。`,"conn.basicUseInheritedHost":`ホスト名を継承値・既定値に戻す`,"conn.basicUseInheritedUser":`ユーザーを継承値・既定値に戻す`,"conn.basicUseInheritedPort":`ポートを継承値・既定値に戻す`,"conn.basicKeepDirect":`この接続の値を維持`,"conn.basicAgentOrInherited":`ssh-agent または継承した鍵`,"conn.basicManageKeyPassphrase":`鍵パスフレーズを保存・変更`,"conn.basicKeyPassphraseHeading":`保存済みの鍵パスフレーズ`,"conn.basicKeyPassphraseUnencrypted":`この秘密鍵は暗号化されていないため、保存するパスフレーズは不要です。`,"conn.basicKeyPassphraseNone":`この鍵にはパスフレーズが保存されていません。`,"conn.basicKeyPassphraseDedicated":`この鍵だけのパスフレーズが保存されています。`,"conn.basicKeyPassphraseShared":`この鍵は共有の保存済みパスフレーズ「{name}」を使っています。`,"conn.basicKeyPassphraseSharedOthers":`ほかに {count} 個の鍵でも使われています。`,"conn.basicKeyPassphraseDetach":`ここで保存すると、この鍵専用の値へ切り替わります。共有資格情報と、ほかの鍵への割り当ては変更しません。`,"conn.basicNewKeyPassphrase":`新しい保存用鍵パスフレーズ`,"conn.basicConfirmKeyPassphrase":`保存用鍵パスフレーズの確認`,"conn.basicKeyPassphraseMismatch":`鍵パスフレーズが一致しません。`,"conn.basicKeyPassphraseStoredNote":`秘密鍵の復号に使用するパスフレーズを保存します。秘密鍵ファイル自体を暗号化しているパスフレーズは変更しません。`,"conn.basicKeyPassphraseWrong":`入力したパスフレーズでは、選択した秘密鍵を解錠できません。`,"conn.basicKeyPassphraseChanged":`選択した秘密鍵が変更されました。再読み込みしてから保存してください。`,"conn.basicGeneratedKeyStaged":`{path} をこの接続の下書きに追加しました。「基本設定を保存」で反映します。`,"conn.basicCustomKey":`この接続は独自の IdentityFile パス {path} を使っています。詳細タブで編集してください。`,"conn.basicComplexKey":`この接続には IdentityFile が複数あります。詳細タブで整理してください。`,"conn.basicAssignedDedicated":`この接続専用のパスワードが割り当てられています。値は表示しません。`,"conn.basicAssignedNamed":`割り当て済み:{name}`,"conn.basicNoPassword":`保存済みパスワードは割り当てられていません。`,"conn.basicNoTOTP":`ワンタイムパスワードは割り当てられていません。`,"conn.basicAssignedTOTP":`割り当て済み:{name}`,"conn.basicRouteConfirmHeading":`保存済みの認証情報をこの経路で使いますか?`,"conn.basicRouteConfirmBody":`認証経路が変更されています。保存すると、割り当て済みのパスワードまたはワンタイムパスワードを現在の経路で使用できるようにします。`,"conn.basicRouteConfirmSave":`保存して再確認`,"conn.basicRouteConfirmCancel":`キャンセル`,"conn.basicTOTPAction":`ワンタイムパスワードの操作`,"conn.basicTOTPUnchanged":`割り当ては変更しない`,"conn.basicUseSavedTOTP":`保存済みTOTPを割り当てる`,"conn.basicRemoveTOTP":`TOTPの割り当てを外す`,"conn.basicChooseSavedTOTP":`保存済みTOTP`,"conn.basicNoSavedTOTPs":`Vaultに保存済みTOTPがありません`,"conn.basicTOTPNote":`TOTPの登録はVaultで行い、この接続先への割り当てはここで保存します。「Verification code」など、認証コードを明示的に求める入力欄にのみ自動入力します。`,"conn.basicPasswordCleanup":`保存済みパスワードが割り当てられていますが、現在の SSH 設定では使用されません。基本設定を保存すると、この接続への割り当てだけを解除します。保存済みパスワードと、ほかの接続への割り当ては変更しません。`,"conn.basicPasswordAction":`保存済みパスワードの操作`,"conn.basicPasswordUnchanged":`パスワードは変更しない`,"conn.basicReplaceDedicated":`この接続専用パスワードで置き換える`,"conn.basicRemovePassword":`保存済みパスワードを外す`,"conn.basicConfirmRemove":`保存済みパスワードを外すことを確認`,"conn.basicEmptyPasswordUnchanged":`空欄のままならパスワードを変更しません。`,"conn.basicVaultMissing":`基本設定を保存する前に暗号化 Vault を作成してください。`,"conn.basicVaultLocked":`基本設定を保存する前に暗号化 Vault を開いてください。`,"conn.basicNeedVault":`この下書きを保存するには暗号化 Vault を開いてください。`,"conn.basicPasswordBlocked":`現在の SSH 設定では、保存済みパスワードを追加・置換できません。`,"conn.basicOptionsFailed":`鍵とパスワードの選択肢を読み込めませんでした。`,"conn.basicCredentialOptionsFailed":`保存済みパスワードの選択肢を読み込めませんでした。`,"conn.basicSaveFailed":`基本設定を保存できませんでした。変更は行われていません。エラーを確認するか、再読み込みしてもう一度試してください。`,"conn.basicRefreshFailed":`設定は保存されましたが、更新後のパスワード状態を読み込めませんでした。この接続を再読み込みしてください。`,"conn.basicConnectionRefreshFailed":`設定は保存されましたが、更新後の接続を読み込めませんでした。この接続を再読み込みしてください。`,"conn.basicSave":`基本設定を保存`,"conn.basicSaving":`保存しています…`,"conn.discardChanges":`変更を破棄`,"conn.blockMoved":`このブロックはディスク上で移動しました。接続を読み込み直してもう一度試してください。`,"conn.emptyHeading":`接続を選択`,"conn.emptyHint":`一覧からホストを選んで SSH 設定を編集するか、新しい接続を作成してください。`,"conn.assignKeyHeading":`この鍵を使う接続を選択`,"conn.assignKeyHint":`接続を選ぶと {path} が基本設定の下書きに入ります。保存するまで変更はありません。`,"conn.missingHeading":`この接続は現在利用できません`,"conn.missingHint":`このリンクの作成後に、名前変更・移動・削除された可能性があります。`,"conn.backToList":`接続一覧へ戻る`,"conn.summaryUnsaved":`未保存の変更あり`,"conn.summaryGroup":`グループ`,"conn.summaryPrivateKey":`SSH 秘密鍵`,"conn.summaryKeyNone":`ssh-agent または継承した鍵`,"conn.summaryKeyComplex":`IdentityFile が複数あります`,"conn.summaryKeyUnavailable":`{path} — 鍵の詳細を確認できません`,"conn.summaryKeyPassphrase":`鍵パスフレーズ`,"conn.summaryKeyPassphraseNone":`パスフレーズは保存されていません`,"conn.summaryKeyPassphraseDedicated":`この鍵専用として保存済み`,"conn.summaryKeyPassphraseNamed":`保存済みパスフレーズ:{name}`,"conn.summaryKeyPassphraseNotNeeded":`暗号化されていない鍵のため不要`,"conn.summaryAccountPassword":`アカウントのパスワード`,"conn.summaryPasswordNone":`保存済みパスワードなし`,"conn.summaryPasswordDedicated":`この接続専用のパスワードを保存済み`,"conn.summaryPasswordNamed":`保存済みパスワード:{name}`,"conn.summaryPasswordRouteStale":`保存済みパスワードは停止中`,"conn.summaryPasswordCleanup":`保存済みパスワードが割り当てられていますが、現在の SSH 設定では使用されません。基本設定を保存すると、この接続への割り当てを解除します。`,"conn.summaryLocked":`施錠中のため確認できません`,"conn.summaryUnavailable":`この状態を読み込めませんでした`,"conn.summaryDraftBlocksActions":`下書きを保存または破棄してから、保存済みの接続を使用してください。`,"conn.summaryRefreshing":`保存済みの接続を再読み込みしています。完了後に操作できます。`,"conn.editorLabel":`接続エディタ`,"conn.areaBasic":`Basic`,"conn.areaAnalysis":`Analysis`,"conn.areaAdvanced":`Advanced`,"conn.areaSshc":`sshc`,"conn.checksLabel":`接続確認`,"conn.checkReachability":`疎通を確認`,"conn.checkAuthentication":`保存済み設定で認証を確認`,"conn.checking":`確認しています…`,"conn.checksExecutableHeading":`認証確認で SSH ディレクティブが実行される可能性があります`,"conn.checksExecutableHint":`認証確認を続ける前に、保存済みディレクティブの内容を確認してください。`,"conn.checksDirectiveAt":`{path}:{line} の {keyword}`,"conn.checksAcknowledge":`確認して認証を実行`,"conn.analysisLabel":`Config Analysis`,"conn.analysisExplained":`保存済み設定から解決した値`,"conn.analysisExplainedHint":`この接続で使用する値です。コマンドを実行せずに解析し、解決できない設定は理由を表示します。`,"conn.analysisAuthoritative":`各値の参照元`,"conn.analysisAuthoritativeHint":`この接続に関係する設定行を、ファイルと行番号、実際に採用されるかどうかとともに表示します。`,"conn.analysisRun":`出所を表示`,"conn.analysisRunning":`読み取っています…`,"conn.analysisExecutableHeading":`この接続には、OpenSSHがコマンドを実行する可能性のあるディレクティブがあります`,"conn.analysisTokenWarning":`OpenSSHは展開したトークンをシェル向けにエスケープしません。そのため、ホスト名、ポート、ユーザー名の値が、エスケープされないままコマンドを実行するシェルに渡る可能性があります。`,"conn.analysisSources":`この接続に関係する設定行`,"conn.advancedLabel":`詳細設定`,"conn.advancedViews":`詳細設定の表示`,"conn.advancedViewLabel":`表示`,"conn.advancedDirectives":`Directives`,"conn.portForwarding":`ポート転送`,"conn.forwardLoopbackOnly":`待ち受けはこの端末内(127.0.0.1)に限定しますが、同じ端末の別OSユーザーから利用される可能性があります。Remote Forward には対応しません。`,"conn.forwardNoneSaved":`この接続にはポート転送が保存されていません。`,"conn.forwardLocal":`Local トンネル`,"conn.forwardDynamic":`SOCKS プロキシ`,"conn.forwardType":`種類`,"conn.forwardListenPort":`ローカルポート`,"conn.forwardDestination":`転送先`,"conn.forwardDestinationHint":`SSH接続先から見たホスト名またはIPアドレスとポートです。`,"conn.forwardDynamicHint":`接続先は、このSOCKSプロキシを使うアプリが通信ごとに指定します。`,"conn.forwardAdd":`転送を追加`,"conn.forwardPendingSave":`変更を保存すると、この転送が設定へ書き込まれます。`,"conn.forwardInvalidPort":`1〜65535のローカルポートを入力してください。`,"conn.forwardInvalidDestination":`転送先を host:port の形式で入力してください。`,"conn.advancedNoFields":`現在の表示条件に一致する設定はありません。`,"conn.advancedRawBlocksFields":`Raw に未保存の変更があります。保存または破棄してからディレクティブを編集してください。`,"conn.advancedFieldsBlockRaw":`ディレクティブに未保存の変更があります。保存または破棄してから Raw を編集してください。`,"conn.connect":`接続`,"conn.opening":`接続中…`,"conn.duplicate":`接続を複製`,"conn.manageLabel":`接続の管理`,"conn.manageIndependent":`ここでの操作は、基本設定・詳細設定の変更とは別に保存されます。`,"conn.manageDraftBlocked":`接続の識別情報や保存場所を変更する前に、編集中の下書きを保存または破棄してください。`,"conn.discardPrompt":`未保存の接続設定を破棄して、この接続から移動しますか?`,"conn.keepEditing":`編集を続ける`,"conn.reloadConnection":`保存済み接続を再読み込み`,"conn.moveToFile":`保存ファイル`,"conn.moveToFilePlaceholder":`保存ファイルを選択…`,"conn.move":`保存ファイルを変更`,"conn.storageFileNote":`所属グループは sshc 上の整理場所です。保存ファイルを変更すると、実際に書き込む SSH 設定ファイルが変わります。通常は変更する必要はありません。`,"conn.confirmDelete":`削除する`,"conn.deleteHeading":`{alias} を削除しますか?`,"conn.deleteBody":`この Host ブロックを設定から削除します。削除後も履歴から復元できます。`,"conn.deleteCancel":`やめる`,"conn.delete":`接続を削除`,"host.tabJump":`Jump Host`,"host.tabRaw":`Raw`,"host.unbalancedQuote":`値の引用符が対応していません。OpenSSH は引用符の中でエスケープを持たないため、これは保存できません。`,"host.needsKeyword":`ディレクティブにはキーワードが必要です。`,"host.dangerousField":`{keyword} は、OpenSSH がこのホストを評価するときにコマンドを実行する可能性があります。記述どおり保存され、ここで実行されることはありません。`,"host.keep":`戻す`,"host.remove":`削除`,"host.newDirective":`新しいディレクティブ`,"host.newValue":`新しい値`,"host.addDirective":`ディレクティブを追加`,"host.saveChanges":`変更を保存`,"host.blockText":`ブロック本文。コメント、空行、未知のディレクティブは入力したとおりに書き戻されます。`,"host.saveBlock":`ブロックを保存`,"host.noDestination":`この Host ブロックはパターンに一致する接続へ設定を適用するもので、単独では接続先を特定できません。診断するには、具体的な alias を持つ接続を開いてください。`,"host.primaryGroup":`所属グループ`,"host.groupNone":`なし`,"host.groupNoneMeans":`「なし」を選ぶと接続は ~/.ssh/config の末尾へ戻ります。`,"host.moveToGroup":`このグループへ移動`,"host.comment":`コメント`,"host.commentNote":`Host 行の上に設定ファイルへ書き込まれます。sshc を使わずにファイルを読む人にも残ります。`,"host.commentFromNote":`これは sshc だけが保存していたメモです。保存すると設定ファイルへ書き込まれ、メモは廃止されます。`,"host.saveComment":`コメントを保存`,"host.os":`OSアイコン`,"host.osAutomatic":`接続時に自動判定`,"host.osGeneric":`汎用サーバー`,"host.osUnknown":`OS未判定`,"host.osHint":`接続後にOSを判定します。手動でアイコンを選ぶこともできます。`,"host.colour":`色`,"host.clearColour":`色を消す`,"host.displayOrder":`表示順 — 小さいほど先に並びます。0 の場合はファイル内の順序を使用します。`,"host.tags":`タグ(カンマ区切り)`,"host.renameAlias":`alias の変更`,"host.rename":`変更`,"keys.heading":`SSH Keys`,"keys.pageDescription":`秘密鍵、公開鍵、証明書の一覧と参照元を確認し、作成・変更・削除を管理します。`,"keys.search":`鍵を検索`,"keys.searchPlaceholder":`ファイル、ホスト、フィンガープリント`,"keys.metricFiles":`確認済み SSH ファイル`,"keys.metricPrivate":`秘密鍵`,"keys.metricAttention":`確認が必要`,"keys.noMatches":`この検索に一致する鍵はありません。`,"keys.reading":`ssh ディレクトリを読み込んでいます…`,"keys.unreadable":`ssh ディレクトリを読み取れませんでした。sshc を再起動して、もう一度試してください。`,"keys.createFailed":`鍵を作成できませんでした。名前、アルゴリズム、パスフレーズを確認してください。`,"keys.passphraseFailed":`パスフレーズを変更できませんでした。現在のパスフレーズを確認して、もう一度試してください。`,"keys.agentFailed":`鍵を ssh-agent に追加できませんでした。パスフレーズと ssh-agent の接続状態を確認してください。`,"keys.publicKeyFailed":`公開鍵を読み取れませんでした。`,"keys.trashFailed":`鍵をゴミ箱へ移動できませんでした。`,"keys.restoreFailed":`エントリを復元できませんでした。`,"keys.restoreRefused":`次の理由により復元できません:{blockers}`,"keys.purgeFailed":`エントリを完全に削除できませんでした。`,"keys.tableCaption":`内容とファイル権限を確認した SSH ファイル`,"keys.inventoryEmpty":`~/.ssh にはまだファイルがありません。この画面から鍵を作成できます。`,"keys.colFile":`ファイル`,"keys.colKind":`種別`,"keys.kind.privateKey":`秘密鍵`,"keys.kind.publicKey":`公開鍵`,"keys.kind.certificate":`証明書`,"keys.kind.other":`その他のファイル`,"keys.kind.unreadable":`読み取り不可`,"keys.colAlgorithm":`アルゴリズム`,"keys.colFingerprint":`フィンガープリント`,"keys.colPermissions":`権限`,"keys.colUsedBy":`参照元`,"keys.colState":`状態`,"keys.stateInAgent":`ssh-agent に登録済み`,"keys.stateUsedBy":`{count} 件の接続で使用`,"keys.usedByNothing":`この鍵を参照する接続はありません`,"keys.inspectorLabel":`鍵の詳細`,"keys.colActions":`操作`,"keys.showDetails":`詳細を開く`,"keys.hideDetails":`詳細を閉じる`,"keys.actionsHeading":`{path} の操作`,"keys.keyActions":`鍵の操作`,"keys.permissionRisk":`ファイル権限が緩すぎます`,"keys.showPublicKey":`公開鍵を表示`,"keys.relatedPublicFiles":`公開鍵ファイル({count})`,"keys.showPrivateKey":`秘密鍵を表示`,"keys.changePassphrase":`パスフレーズを変更`,"keys.manageStoredPassphrase":`保存済みパスフレーズを管理`,"keys.storedPassphraseHeading":`保存済みパスフレーズ:{path}`,"keys.storedPassphraseNote":`暗号化された鍵のパスフレーズを sshc Vault へ保存するか、既存の名前付きパスフレーズを割り当てます。値はマスターパスワードで暗号化され、保存後はこの画面に表示されません。`,"keys.newStoredPassphraseName":`パスフレーズ名`,"keys.newStoredPassphraseValue":`パスフレーズの値`,"keys.storeAndUsePassphrase":`保存してこの鍵に割り当てる`,"keys.storedPassphraseExists":`その名前はすでに存在します。上の一覧から選ぶか、新しい名前を指定してください。`,"keys.unassignPassphrase":`割り当てを解除`,"keys.storePassphraseFailed":`パスフレーズを保存し、この鍵へ割り当てることができませんでした。`,"keys.unassignPassphraseFailed":`この鍵への保存済みパスフレーズの割り当てを解除できませんでした。`,"keys.addToAgent":`ssh-agent に追加`,"keys.removeFromAgent":`ssh-agent から削除`,"keys.agentRemoveFailed":`ssh-agent から鍵を削除できませんでした。鍵がすでに削除されているか、削除に必要な公開鍵が存在しない可能性があります。`,"keys.trashConfirmHeading":`{path} をゴミ箱へ移動`,"keys.trashExplain":`同じ鍵に属するため、次のファイルをまとめて移動します:`,"keys.trashReferences":`{count} 件の Host ブロックがこの鍵を参照しています。移動後、その IdentityFile 行は存在しないファイルを参照します。ssh はエラーを表示した後、他の認証方法を試します。`,"keys.trashNoReferences":`この鍵を参照する Host ブロックはありません。`,"keys.trashIsRecoverable":`削除はされません。下のゴミ箱へ移動するだけで、復元できます。`,"keys.trashConfirm":`ゴミ箱へ移動する`,"keys.trashCancel":`やめる`,"keys.moveToTrash":`ゴミ箱へ移動`,"keys.publicKeyHeading":`公開鍵:{path}`,"keys.publicKeyLabel":`公開鍵`,"keys.close":`閉じる`,"keys.unreadableHeading":`内容を確認できなかったファイル`,"keys.unreadableNote":`これらは ~/.ssh の中にあり、上の表には含まれていません。これらに対して何も変更していません。`,"keys.unresolvedHeading":`存在しない鍵を指している設定エントリ`,"keys.agentHeading":`ssh-agent`,"keys.agentEmpty":`ssh-agent に接続できましたが、鍵は登録されていません。`,"keys.agentIdentitiesCaption":`ssh-agent に登録されている鍵`,"keys.colComment":`コメント`,"keys.agentUnavailable":`このプロセスから ssh-agent に接続できないため、鍵を登録できません。ssh-add コマンドと、接続先を示す SSH_AUTH_SOCK の両方が必要です。`,"keys.agentDelegationsNote":`次の設定エントリは、鍵ファイルではなく ssh-agent の鍵を使用します:`,"keys.registerHeading":`ssh-agent に追加:{path}`,"keys.registerNote":`パスフレーズは ssh-add の標準入力へ渡され、コマンドラインや子プロセスの環境変数には含まれません。sshc はパスフレーズを保存せず、この操作の完了後は保持しません。`,"keys.keyPassphrase":`鍵のパスフレーズ`,"keys.lifetime":`保持期間`,"keys.lifetimeForever":`ssh-agent が終了するまで`,"keys.lifetimeHour":`1 時間`,"keys.lifetimeFourHours":`4 時間`,"keys.lifetimeTwelveHours":`12 時間`,"keys.useStoredPassphrase":`保存済みのパスフレーズを使う`,"keys.choosePassphraseName":`— 名前を選ぶ —`,"keys.useThisPassphrase":`このパスフレーズを使う`,"keys.usesStoredPassphrase":`この鍵は保存済みパスフレーズ「{name}」を使用します。`,"keys.usesDedicatedPassphrase":`この鍵だけのパスフレーズが保存されています。`,"keys.typedWins":`空欄の場合は保存済みのパスフレーズを使用します。入力した値がある場合は、その値を使用します。`,"keys.assignPassphraseFailed":`この鍵に指定したパスフレーズを割り当てられませんでした。`,"keys.registerSubmit":`鍵を ssh-agent に追加`,"keys.cancel":`キャンセル`,"keys.passphraseHeading":`パスフレーズを変更:{path}`,"keys.passphraseNote":`ここで入力したパスフレーズは、この変更にのみ使用され、保存されません。sshc Vaultへ保存する場合は、鍵一覧の「保存済みパスフレーズを管理」を使用してください。`,"keys.currentPassphrase":`現在のパスフレーズ`,"keys.newPassphrase":`新しいパスフレーズ`,"keys.removePassphrase":`パスフレーズを削除する(秘密鍵は暗号化されなくなります)`,"keys.savePassphrase":`パスフレーズを変更`,"keys.createHeading":`鍵を作成`,"keys.generatedHeading":`鍵を作成しました`,"keys.generatedNext":`{path} を作成しました。次の操作を選んでください。`,"keys.assignGenerated":`接続に割り当てる`,"keys.installGenerated":`サーバーに公開鍵を登録`,"keys.algorithm":`アルゴリズム`,"keys.fileName":`ファイル名`,"keys.comment":`コメント`,"keys.passphrase":`パスフレーズ`,"keys.createUnencrypted":`パスフレーズなしで作成する(秘密鍵ファイルを読み取れるユーザーは、この鍵を使用できます)`,"keys.createSubmit":`鍵を作成`,"keys.showTerminalCommand":`Terminal コマンドを表示`,"keys.hardwareNote":`ハードウェアに保存する鍵の作成にはセキュリティキーの操作が必要なため、sshc では対応していません。次のコマンドをターミナルで実行してください:`,"keys.trashHeading":`ゴミ箱`,"keys.trashSummary":`ゴミ箱({count})`,"keys.trashNote":`ゴミ箱へ移動した鍵は、手動で完全削除するまで残ります。自動削除されません。`,"keys.trashCaption":`ゴミ箱内の鍵`,"keys.trashEmpty":`ゴミ箱は空です。`,"keys.colFiles":`ファイル`,"keys.colAge":`経過`,"keys.colStatus":`状態`,"keys.ageStale":`{days} 日 · 保持期間 {retention} 日を超過`,"keys.age":`{days} 日`,"keys.restorable":`復元可能`,"keys.restore":`復元`,"keys.purgeWarning":`これは取り消せません。完全に削除した鍵のバックアップはありません。`,"keys.confirmPurge":`完全削除を確定`,"keys.purge":`完全に削除`,"keys.noteFingerprintUnavailable":`フィンガープリントを取得できません`,"keys.noteSymbolicLink":`シンボリックリンク(追跡しません)`,"keys.noteEmptyFile":`空のファイル`,"keys.noteNotRegularFile":`通常ファイルではありません`,"keys.noteCommentNotPreserved":`コメントは保持されていません`,"keys.certKeyId":`Key ID:{keyId}`,"keys.certFor":`対象プリンシパル:{principals}`,"keys.certAnyPrincipal":`すべてのプリンシパルが対象`,"keys.certNeverExpires":`無期限`,"keys.certExpired":`{when} に失効`,"keys.certValidUntil":`{when} まで有効`,"keys.certSigns":`{keyType} {fingerprint} に署名`,"keys.reference":`{directive} {value} — {path}:{line}`,"keys.referenceWithReason":`{directive} {value} — {path}:{line}({reason})`,"keys.unreadableEntry":`{path} — {reason}`,"keys.colChoose":`選択`,"keys.chooseKey":`{path} を選ぶ`,"keys.listFilter":`一覧に表示するファイル`,"keys.listFilterKeys":`鍵だけ`,"keys.listFilterAll":`~/.ssh のすべてのファイル`,"keys.dragKey":`{path} をドラッグ`,"keys.chosenCount":`{count} 件を選択中`,"keys.moveTargetLabel":`移動先`,"keys.moveChosen":`移動`,"keys.clearChosen":`選択を解除`,"keys.moveMoved":`{count} 件を移しました。`,"keys.moveBlocked":`{path} は次の理由で移動できません:{reason}`,"keys.moveFailed":`{path} を移動できませんでした。`,"keys.folders":`フォルダ`,"keys.foldersLabel":`鍵のフォルダ`,"keys.folderRow":`{name}、{count} 件`,"keys.folderAll":`すべての鍵`,"keys.folderUngrouped":`グループなし`,"keys.relocate":`名前・グループを変更`,"keys.relocateHeading":`名前・グループの変更:{path}`,"keys.relocateNote":`名前またはグループを変更すると、鍵ファイルが移動します。この鍵を参照する IdentityFile と CertificateFile も同時に書き換えられるため、古いパスへの参照は残りません。`,"keys.relocateNewName":`名前`,"keys.relocateGroup":`グループ`,"keys.relocateSubmit":`鍵を改名・移動`,"keys.relocateFailed":`鍵を移動できませんでした。`,"keys.relocateDone":`{path} へ移動しました。`,"keys.relocateMoved":`移動したファイル`,"keys.relocateRewritten":`書き換えた設定行`,"keys.relocateSkipped":`鍵名と接尾辞から構成されたファイル名ではないため、次のファイルは移動しませんでした:{paths}`,"keys.relocateRefused":`次の理由により移動できませんでした。ファイルは変更していません:`,"keys.relocateFilePair":`{from} → {to}`,"keys.relocateReference":`{directive} {from} → {to} — {path}:{line}`,"keys.groupNone":`グループなし(~/.ssh 直下)`,"keys.createGroup":`グループ`,"keys.blockerTargetOccupied":`{detail} はすでに存在します`,"keys.blockerUnresolved":`{detail} は解決できないパスなので、この鍵を指している可能性があります`,"keys.blockerReferenceExternal":`{detail} は ~/.ssh の外にあるため書き換えられません`,"keys.blockerGroupNotDeclared":`グループ {detail} を宣言する Include 行がありません`,"keys.blockerDestinationIsConfig":`{detail} は Include によって設定ファイルとして読み込まれる場所です`,"keys.blockerStateDirectory":`{detail} は sshc の状態ディレクトリ内です`,"keys.blockerOther":`{detail}`}},o=[`en`,`ja`],s=`sshc.language`,c={en:`shell.languageEnglish`,ja:`shell.languageJapanese`};function l(e){return typeof e==`string`&&o.includes(e)}function u(){let e=n(s);if(l(e))return e;for(let e of navigator.languages??[navigator.language]){let t=e.split(`-`)[0];if(l(t))return t}return`en`}function d(t){e(s,t)}var f=r(),p=(0,i.createContext)(null);function m(e,t){return t===void 0?e:e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e)}function h({children:e,initial:t}){let[n,r]=(0,i.useState)(()=>t??u()),o=(0,i.useCallback)(e=>{r(e),d(e)},[]),s=(0,i.useMemo)(()=>{let e=a[n];return{locale:n,setLocale:o,t:(t,n)=>m(e[t]??a.en[t],n)}},[n,o]);return(0,f.jsx)(p.Provider,{value:s,children:e})}var g={locale:`en`,setLocale:()=>void 0,t:(e,t)=>m(a.en[e],t)};function _(){return(0,i.useContext)(p)??g}function v(){return _().t}var y=`w-full rounded-md border border-control-line bg-control px-2 py-1.5 text-sm text-ink placeholder:text-ink-faint focus:border-accent focus:outline-none disabled:border-line disabled:text-ink-faint`,b=y.replace(`w-full`,`w-40`),x=y.replace(`w-full`,`w-auto`),S=`whitespace-nowrap rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-accent-ink transition-[background-color,box-shadow,filter] duration-150 hover:brightness-110 active:brightness-95 disabled:cursor-not-allowed disabled:bg-line disabled:text-ink-faint`,C=`whitespace-nowrap rounded-md border border-control-line bg-card px-3 py-1.5 text-sm text-ink transition-colors duration-150 hover:border-accent/50 hover:bg-hover active:bg-select-fill disabled:cursor-not-allowed disabled:text-ink-faint`,w=`whitespace-nowrap rounded-md border border-control-line px-3 py-1.5 text-sm text-danger transition-colors duration-150 hover:border-danger/50 hover:bg-danger/10`,T=`text-xs font-medium tracking-wide text-ink-muted`,E=`text-xs text-ink-muted`,D=`flex flex-col gap-4 rounded-lg border border-line bg-card p-4`,O=`text-sm font-medium text-ink`,k=`border-b border-line text-xs uppercase tracking-wide text-ink-muted`,A=`py-2 pr-3 text-left font-medium`;function j({label:e,hint:t,error:n,children:r,interactiveChildren:a=!1}){let o=(0,i.useId)(),s=r;if(n!==void 0&&n!==``&&(0,i.isValidElement)(r)){let e=r;s=(0,i.cloneElement)(e,{"aria-describedby":[e.props[`aria-describedby`],o].filter(Boolean).join(` `),"aria-invalid":!0})}let c=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{className:T,children:e}),s]});return(0,f.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[a?(0,f.jsx)(`div`,{className:`flex flex-col gap-1`,children:c}):(0,f.jsx)(`label`,{className:`flex flex-col gap-1`,children:c}),t===void 0?null:(0,f.jsx)(`span`,{className:E,children:t}),n===void 0||n===``?null:(0,f.jsx)(`span`,{id:o,role:`alert`,className:`text-xs text-danger`,children:n})]})}function M({label:e,hint:t,checked:n,onChange:r,disabled:i=!1,tone:a=`default`,className:o=``}){return(0,f.jsxs)(`label`,{className:`flex items-start gap-2 text-sm ${a===`notice`?`text-notice-ink`:a===`danger`?`text-danger`:i?`text-ink-faint`:`text-ink`} ${o}`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:n,disabled:i,onChange:e=>r(e.target.checked),className:`mt-0.5 h-4 w-4 shrink-0 accent-accent`}),(0,f.jsxs)(`span`,{children:[e,t===void 0?null:(0,f.jsx)(`span`,{className:`block ${E}`,children:t})]})]})}export{v as _,w as a,o as b,b as c,D as d,O as f,_ as g,h,y as i,S as l,k as m,j as n,T as o,A as p,x as r,E as s,M as t,C as u,u as v,c as y}; \ No newline at end of file diff --git a/internal/ui/dist/assets/html-D-jvHwC7.js b/internal/ui/dist/assets/html-DMa_AVOZ.js similarity index 98% rename from internal/ui/dist/assets/html-D-jvHwC7.js rename to internal/ui/dist/assets/html-DMa_AVOZ.js index 3437da58a..33096a12b 100644 --- a/internal/ui/dist/assets/html-D-jvHwC7.js +++ b/internal/ui/dist/assets/html-DMa_AVOZ.js @@ -1 +1 @@ -import{o as e}from"./editor.api-BUrKrayv.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[``]},brackets:[[``],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*`),end:RegExp(`^\\s*`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language}; \ No newline at end of file +import{o as e}from"./editor.api-BJ0kNDCq.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[``]},brackets:[[``],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*`),end:RegExp(`^\\s*`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-DJ8h9zNi.js b/internal/ui/dist/assets/index-DJ8h9zNi.js deleted file mode 100644 index 3abce7107..000000000 --- a/internal/ui/dist/assets/index-DJ8h9zNi.js +++ /dev/null @@ -1,13 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LicensePage-CwJdmrxm.js","assets/jsx-runtime-QtymfJMM.js","assets/form-C1olpQVF.js","assets/ConnectionsPage-BcsnqY3h.js","assets/surface-Ck_FblzE.js","assets/diagnostics-Clvm8IB7.js","assets/credentials-Ck0fkrY6.js","assets/rules-Bwt16Wjc.js","assets/SavePreview-BHSS1r5l.js","assets/api-DomXbahF.js","assets/palettes--8RhxKto.js","assets/fonts-CUObG_Dx.js","assets/ConfigExplorer-BB1e3kuF.js","assets/page-CiAVS9qS.js","assets/GroupsPanel-B9EFjIFq.js","assets/HistoryPanel-D75T25CW.js","assets/KeysScreen-CtJ38_1X.js","assets/tableSort-CcSWRQGj.js","assets/DiagnosticsPanel-BHiHI9ah.js","assets/SecretsPanel-DwbwPwGg.js","assets/SettingsPanel-tyxfeXty.js","assets/SyncPanel-9DIuhm2Y.js","assets/KnownHostsPanel-CVuqmEac.js","assets/RemoteKeyPanel-S-URk5vh.js","assets/SFTPWorkspace-Cifnx1fQ.js","assets/clipboard-ObSO6ZLv.js","assets/SnippetsPanel-DGx5bdAa.js","assets/TerminalView-UxyIAgy5.js","assets/reducedMotion-XhcdVu33.js","assets/TerminalView-BrP-ENHg.css"])))=>i.map(i=>d[i]); -import{n as e,r as t,t as n}from"./jsx-runtime-QtymfJMM.js";import{S as r,_ as i,a,b as o,c as s,d as c,f as l,g as u,h as d,l as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"./surface-Ck_FblzE.js";import{_ as C,g as w,h as T,i as E,n as D,r as O,s as k,t as A,u as ee,v as j,y as te}from"./form-C1olpQVF.js";import{t as M}from"./clipboard-ObSO6ZLv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var N=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ne=t(((e,t)=>{t.exports=N()})),re=t((t=>{var n=e();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=re()})),ae=t((t=>{var n=ne(),r=e(),i=ie();function a(e){var t=`https://react.dev/errors/`+e;if(1oe||(e.current=ae[oe],ae[oe]=null,oe--)}function I(e,t){oe++,ae[oe]=e.current,e.current=t}var L=P(null),se=P(null),ce=P(null),le=P(null);function R(e,t){switch(I(ce,t),I(se,e),I(L,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}F(L),I(L,e)}function ue(){F(L),F(se),F(ce)}function de(e){e.memoizedState!==null&&I(le,e);var t=L.current,n=Hd(t,e.type);t!==n&&(I(se,e),I(L,n))}function fe(e){se.current===e&&(F(L),F(se)),le.current===e&&(F(le),Qf._currentValue=re)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=n.unstable_scheduleCallback,Se=n.unstable_cancelCallback,Ce=n.unstable_shouldYield,we=n.unstable_requestPaint,Te=n.unstable_now,Ee=n.unstable_getCurrentPriorityLevel,De=n.unstable_ImmediatePriority,Oe=n.unstable_UserBlockingPriority,ke=n.unstable_NormalPriority,Ae=n.unstable_LowPriority,je=n.unstable_IdlePriority,Me=n.log,Ne=n.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ge(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.textContent,a=i.length;for(e=0;e=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pt(e.document)}return t}function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Dr=sn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Pt(r)||(r=Or,`selectionStart`in r&&Er(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&xr(Ar,r)||(Ar=r,r=Ed(kr,`onSelect`),0>=o,i-=o,wi=1<<32-Le(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Ei(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),H&&Ei(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Ei(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),H&&Ei(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Ta(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ta(o),b(e,r,o,c)}if(te(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===x)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Y&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=M.T,s={};M.T=s,Ms(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,pa(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Cs(e).queue;bs(e,i,t,re,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return Qi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ba(n);var r=Va(t,e,n);r!==null&&(hu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=ei(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return $r(e,t,i,0),q===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(a(479))}else t=ei(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===U||t!==null&&t===U}function Ps(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Is={readContext:Qi,use:jo,useCallback:G,useContext:G,useEffect:G,useImperativeHandle:G,useLayoutEffect:G,useInsertionEffect:G,useMemo:G,useReducer:G,useRef:G,useState:G,useDebugValue:G,useDeferredValue:G,useTransition:G,useSyncExternalStore:G,useId:G,useHostTransitionStatus:G,useFormState:G,useActionState:G,useOptimistic:G,useMemoCache:G,useCacheRefresh:G};Is.useEffectEvent=G;var Ls={readContext:Qi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(mo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(mo){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,U,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,i=Do();if(H){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),q===null)throw Error(a(349));Y&127||Ro(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=q.identifierPrefix;if(H){var n=Ti,r=wi;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[at]=t,o[ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ce.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ji,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Fi(t,!0)}else e=Bd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[at]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(a(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[at]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),i=!1}else i=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return ue(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return Ki(t.type),Ic(t),null;case 19:if(F(so),r=t.memoizedState,r===null)return Ic(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return I(so,so.current&1|2),H&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>tu&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304)}else{if(!i)if(e=co(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return Ic(t),null}else 2*Te()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=so.current,I(so,i?n&1|2:n&1),H&&Ei(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&F(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Ic(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Rc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(so),null;case 4:return ue(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&F(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function zc(e,t){switch(ki(t),t.tag){case 3:Ki(ia),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:F(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&F(ha);break;case 24:Ki(ia)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ot]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[at]=e,t[ot]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[at]=e,B(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Cr(s,h),v=Cr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,M.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(a(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{N.p=i,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=gi(n,t),t=Xs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Xe(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=gi(n,e),n=Zs(2),r=Va(t,n,2),r!==null&&(Qs(n,r,t,e),Xe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Te()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Je()),e=ti(e,t),e!==null&&(Xe(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return xe(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Ge(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Te(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),B(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),B(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),B(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=_t(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);B(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),B(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),B(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ce.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=_t(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=_t(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=_t(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+It(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),B(t),e.head.appendChild(t))}function Pf(e){return`[src="`+It(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,B(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),B(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,B(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),B(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,B(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),B(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,B(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),B(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ae()}))(),P=e(),F={palette:[`Ctrl+K`,`Meta+K`],terminalSearch:[`Ctrl+F`,`Meta+F`],copy:[`Ctrl+Shift+C`,`Meta+C`],paste:[`Ctrl+V`,`Meta+V`,`Ctrl+Shift+V`],nextSession:[`Alt+PageDown`],previousSession:[`Alt+PageUp`],home:[],sftp:[]},I=Object.keys(F),L=`sshc.shortcuts.v1`,se=`sshc-shortcuts-changed`,ce=/^(?:[A-Z0-9]|F(?:[1-9]|1[0-2])|Arrow(?:Up|Down|Left|Right)|PageUp|PageDown|Home|End|Insert|Delete|Backspace|Enter|Tab|Escape|Space|[-=,.;/\[\]\\'`])$/;function le(e){if(e.isComposing||e.keyCode===229||e.getModifierState(`AltGraph`)||[`Control`,`Shift`,`Alt`,`Meta`,`Dead`,`Unidentified`].includes(e.key)||!e.ctrlKey&&!e.metaKey&&!e.altKey&&!/^F([1-9]|1[0-2])$/.test(e.key))return null;let t=e.key===` `?`Space`:e.key.length===1?e.key.toUpperCase():e.key;return ce.test(t)?[e.ctrlKey&&`Ctrl`,e.altKey&&`Alt`,e.shiftKey&&`Shift`,e.metaKey&&`Meta`,t].filter(Boolean).join(`+`):null}function R(e){if(typeof e!=`string`)return!1;let t=e.split(`+`),n=t.pop()??``;return ce.test(n)?le(new KeyboardEvent(`keydown`,{key:n===`Space`?` `:n,ctrlKey:t.includes(`Ctrl`),altKey:t.includes(`Alt`),shiftKey:t.includes(`Shift`),metaKey:t.includes(`Meta`)}))===e:!1}function ue(){return fe(`sshc.shortcuts.v1`)??``}function de(e,t=!0){try{let n=JSON.parse(e);if(typeof n!=`object`||!n)return F;let r={...F};for(let e of I){let t=n[e];Array.isArray(t)&&t.length<=3&&t.every(R)&&(r[e]=[...new Set(t)])}t&&r.paste.length===2&&r.paste.includes(`Ctrl+Shift+V`)&&r.paste.includes(`Meta+V`)&&!I.some(e=>e!==`paste`&&r[e].includes(`Ctrl+V`))&&(r.paste=F.paste);let i=Object.values(r).flat();return new Set(i).size===i.length?r:F}catch{return F}}function fe(e){try{return window.localStorage.getItem(e)}catch{return null}}function pe(e,t){try{window.localStorage.setItem(e,t)}catch{}}var me=`sshc.shortcuts.selected.v1`;function he(){return fe(me)===null}function ge(){return de(ue(),he())}function _e(e){window.localStorage.setItem(L,JSON.stringify(e)),window.dispatchEvent(new Event(se))}function ve(e){return window.addEventListener(`storage`,e),window.addEventListener(se,e),()=>{window.removeEventListener(`storage`,e),window.removeEventListener(se,e)}}function ye(){let e=(0,P.useSyncExternalStore)(ve,ue,()=>``);return(0,P.useMemo)(()=>de(e,he()),[e])}function be(e,t,n){let r=le(e);return r!==null&&(n??ge())[t].includes(r)}function xe(e){return e.defaultPrevented||e.isComposing||e.keyCode===229||e.target instanceof Element&&e.target.closest(`[data-shortcut-editor]`)!==null||document.querySelector(`[role="dialog"][aria-modal="true"], dialog[open]`)!==null}var Se={presets:[],selected:`default`,loading:!0,busy:!1,error:!1},Ce=new Set,we=0,Te=!1,Ee=0,De=e=>{Se={...Se,...e},Ce.forEach(e=>e())},Oe=e=>(Ce.add(e),()=>{Ce.delete(e)}),ke=()=>(0,P.useSyncExternalStore)(Oe,()=>Se);async function Ae(e,t){await u.mutate(`/api/v1/metadata/shortcuts`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({base:e,presets:t})})}function je(e,t,n=!0){let r=t.find(t=>t.id===e),i=r?e:`default`,a=r?.bindings??F;n&&pe(me,i),JSON.stringify(ge())!==JSON.stringify(a)&&_e(a),De({selected:i})}function Me(e){++Ee,je(e,Se.presets)}async function Ne(){if(Te||Se.busy)return;Te=!0;let e=we,t=Ee;try{let n=r(`Metadata`,await u.read(`/api/v1/metadata`));if(e!==we||t!==Ee)return;let i=n.shortcutPresets??[],a=fe(me),o=a!==null||fe(`sshc.shortcuts.v1`)!==null;if(a===null&&(a=o?`pending:${crypto.randomUUID()}`:`default`,o&&pe(me,a)),a.startsWith(`pending:`)){let n=a.slice(8);if(!i.some(e=>e.id===n)){let r=[...i,{id:n,name:`Imported shortcuts`,bindings:de(fe(`sshc.shortcuts.v1`)??``)}];if(await Ae(i,r),e!==we||t!==Ee)return;i=r}a=n}je(a,i,o),De({presets:i,loading:!1,error:!1})}catch{e===we&&De({loading:!1,error:!0})}finally{Te=!1}}async function Pe(e,t=Se.selected){if(Se.busy||Se.loading||Se.error)throw Error(`Presets are not ready; reload before saving`);++Ee,De({busy:!0});try{await Ae(Se.presets,e),De({presets:e}),je(t,e)}catch(e){throw De({error:!0}),e}finally{De({busy:!1})}}async function Fe(e){let t=Se.presets.find(e=>e.id===Se.selected),n=t?{...t,bindings:e}:{id:crypto.randomUUID(),name:`My shortcuts`,bindings:e};await Pe(t?Se.presets.map(e=>e.id===n.id?n:e):[...Se.presets,n],n.id)}function Ie(e){(0,P.useEffect)(()=>{if(!e)return;++we,De({loading:!0}),Ne();let t=window.setInterval(()=>{Ne()},5e3),n=()=>{Ne()};return window.addEventListener(`focus`,n),window.addEventListener(`storage`,n),()=>{++we,window.clearInterval(t),window.removeEventListener(`focus`,n),window.removeEventListener(`storage`,n)}},[e])}function Le(e){return r(`TerminalSessionList`,e)}function Re(e){return r(`OpenTerminalSessionResponse`,e)}function ze(e){return r(`TerminalStreamTicket`,e)}var Be={async terminalSessions(){return Le(await u.read(`/api/v1/terminal/sessions`))},async openTerminalSession(e){return Re(await h(`/api/v1/terminal/sessions`,e))},async terminalStreamTicket(e,t){let n=t===void 0?``:`?cursor=${encodeURIComponent(String(t))}`;return ze(await l(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/stream${n}`))},async reconnectTerminalSession(e){return Le(await l(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/reconnect`))},async stopTerminalReconnect(e){return Le(await l(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/reconnect/stop`))},async startTerminalForward(e,t){return Le(await h(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/forwards`,t))},async stopTerminalForward(e,t){return Le(await u.mutate(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/forwards/${encodeURIComponent(t)}`,{method:`DELETE`}))},async renameTerminalSession(e,t){return Le(await u.mutate(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/title`,{method:`PUT`,headers:{...c},body:JSON.stringify({title:t})}))},async closeTerminalSession(e){return Le(await u.mutate(`/api/v1/terminal/sessions/${encodeURIComponent(e)}`,{method:`DELETE`}))}};function Ve(e){let t=s(e);return{...typeof t.palette==`string`?{palette:t.palette}:{},...typeof t.font==`string`?{font:t.font}:{},...typeof t.background==`string`?{background:t.background}:{},...typeof t.backgroundTint==`number`?{backgroundTint:t.backgroundTint}:{}}}function He(e){return r(`LocalShellProfileList`,e)}function Ue(e){return r(`TerminalBackground`,e)}var We={async terminalSettings(){let e=s(await u.read(`/api/v1/metadata`));if(e.embeddedTerminal===void 0)return{};let t=s(e.embeddedTerminal);return{...typeof t.startDirectory==`string`&&t.startDirectory!==``?{startDirectory:t.startDirectory}:{},...typeof t.maxSessions==`number`?{maxSessions:t.maxSessions}:{},...typeof t.scrollbackBytes==`number`?{scrollbackBytes:t.scrollbackBytes}:{},...typeof t.browserScrollbackLines==`number`&&t.browserScrollbackLines>=1e3&&t.browserScrollbackLines<=1e5?{browserScrollbackLines:t.browserScrollbackLines}:{},...typeof t.fontSize==`number`?{fontSize:t.fontSize}:{},...typeof t.verbosity==`number`?{verbosity:t.verbosity}:{},...typeof t.reconnect==`number`?{reconnect:t.reconnect}:{},...typeof t.copyOnSelect==`boolean`?{copyOnSelect:t.copyOnSelect}:{},...typeof t.rightClickPaste==`boolean`?{rightClickPaste:t.rightClickPaste}:{},...typeof t.webgl==`boolean`?{webgl:t.webgl}:{},...typeof t.osc52==`boolean`?{osc52:t.osc52}:{},...typeof t.jisYenBackslash==`boolean`?{jisYenBackslash:t.jisYenBackslash}:{},...typeof t.localShellProfile==`string`&&/^[a-z0-9-]{1,64}$/.test(t.localShellProfile)?{localShellProfile:t.localShellProfile}:{},...t.appearance===void 0?{}:{appearance:Ve(t.appearance)}}},async setTerminalSettings(e){await u.mutate(`/api/v1/metadata/terminal`,{method:`PUT`,headers:c,body:JSON.stringify(e)})},async localShellProfiles(){return He(await u.read(`/api/v1/terminal/shell-profiles`))},async engineSettings(){let e=s(await u.read(`/api/v1/metadata`));if(e.engine===void 0)return{};let t=s(e.engine),n=typeof t.port==`number`?{port:t.port}:{};if(t.vaultAutoLock!==void 0){let e=s(t.vaultAutoLock),r=f(e.mode);if(r===`restart`)n.vaultAutoLock={mode:r};else if(r===`idle`){let t=_(e.value),i=f(e.unit);Number.isSafeInteger(t)&&t>=1&&t<=999&&(i===`minutes`||i===`hours`)&&(n.vaultAutoLock={mode:r,value:t,unit:i})}}return n},async setEngineSettings(e){await u.mutate(`/api/v1/metadata/engine`,{method:`PUT`,headers:c,body:JSON.stringify(e)})},async terminalBackgrounds(){let e=s(await u.read(`/api/v1/terminal/backgrounds`));return{backgrounds:m(e.backgrounds).map(Ue),usedBytes:_(e.usedBytes),capacityBytes:_(e.capacityBytes),remainingBytes:_(e.remainingBytes)}},async addTerminalBackground(e,t){return Ue(await u.mutate(`/api/v1/terminal/backgrounds?name=${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:t}))},async setTerminalBackgroundCapacity(e){let t=s(await u.mutate(`/api/v1/terminal/backgrounds/capacity`,{method:`PUT`,headers:c,body:JSON.stringify({capacityMiB:e})}));return{backgrounds:m(t.backgrounds).map(Ue),usedBytes:_(t.usedBytes),capacityBytes:_(t.capacityBytes),remainingBytes:_(t.remainingBytes)}},async renameTerminalBackground(e,t){return Ue(await u.mutate(`/api/v1/terminal/backgrounds/${encodeURIComponent(e)}`,{method:`PATCH`,headers:c,body:JSON.stringify({name:t})}))},async deleteTerminalBackground(e){await u.mutate(`/api/v1/terminal/backgrounds/${encodeURIComponent(e)}`,{method:`DELETE`})}};function Ge(e){return r(`PasswordVaultStatus`,e)}function Ke(e){return r(`PasswordEligibility`,e)}var qe={async passwordVault(){return Ge(await u.read(`/api/v1/passwords`))},async initialiseVault(e){return Ge(await h(`/api/v1/passwords/initialise`,{passphrase:e}))},async unlockVault(e){return Ge(await h(`/api/v1/passwords/unlock`,{passphrase:e}))},async recoverCompatibleVault(e){return Ge(await h(`/api/v1/passwords/recover-compatible-backup`,{passphrase:e}))},async resetUnsupportedVault(e){return Ge(await h(`/api/v1/passwords/reset-unsupported`,{passphrase:e,acknowledged:!0}))},async lockVault(){return Ge(await l(`/api/v1/passwords/lock`))},async changeMasterPassword(e,t){return{vault:Ge(s(await h(`/api/v1/passwords/change`,{current:e,next:t})).vault)}},async passwordEligibility(e){return Ke(await u.read(`/api/v1/passwords/${encodeURIComponent(e)}/eligibility`))},async storePassword(e,t){return Ge(await u.mutate(`/api/v1/passwords/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({password:t})}))},async forgetPassword(e){return Ge(await u.mutate(`/api/v1/passwords/${encodeURIComponent(e)}`,{method:`DELETE`}))}},Je=[`system`,`light`,`dark`],Ye=`dark`,Xe=`sshc.theme`;function Ze(e){return typeof e==`string`&&Je.includes(e)}function Qe(){try{let e=window.localStorage.getItem(Xe);if(Ze(e))return e}catch{}return Ye}function $e(e){try{window.localStorage.setItem(Xe,e)}catch{}}function et(e,t){return e===`system`?t?`dark`:`light`:e}function tt(e,t){e.setAttribute(`data-theme`,t)}var z=n(),nt=(0,P.createContext)(null),rt=`(prefers-color-scheme: dark)`;function it(){return typeof window.matchMedia==`function`&&window.matchMedia(rt).matches}function at({children:e,initial:t}){let[n,r]=(0,P.useState)(()=>t??Qe()),[i,a]=(0,P.useState)(()=>it());(0,P.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let e=window.matchMedia(rt),t=()=>a(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let o=et(n,i);(0,P.useEffect)(()=>{tt(document.documentElement,o)},[o]);let s=(0,P.useCallback)(e=>{r(e),$e(e)},[]),c=(0,P.useMemo)(()=>({theme:n,setTheme:s,resolved:o}),[n,s,o]);return(0,z.jsx)(nt.Provider,{value:c,children:e})}var ot={theme:`dark`,setTheme:()=>void 0,resolved:`dark`};function st(){return(0,P.useContext)(nt)??ot}function ct({label:e,value:t,onChange:n,autoFocus:r,disabled:i=!1,initialShown:a=!1,className:o=E,placeholder:s}){let c=C(),[l,u]=(0,P.useState)(a);return(0,z.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-2`,children:[(0,z.jsx)(`input`,{type:l?`text`:`password`,"aria-label":e,value:t,autoFocus:r??!1,autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1,disabled:i,placeholder:s,onChange:e=>n(e.target.value),className:`${o} min-w-0 grow`}),(0,z.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>u(!l),"aria-pressed":l,"aria-label":c(l?`password.hideNamed`:`password.showNamed`,{label:e}),className:`whitespace-nowrap rounded border border-control-line px-2 py-1.5 text-xs text-ink-muted hover:bg-select-fill`,children:c(l?`password.hide`:`password.show`)})]})}function lt({label:e,value:t,onChange:n,hint:r,autoFocus:i,disabled:a=!1,initialShown:o=!1}){return(0,z.jsx)(D,{label:e,interactiveChildren:!0,...r===void 0?{}:{hint:r},children:(0,z.jsx)(ct,{label:e,value:t,onChange:n,...i===void 0?{}:{autoFocus:i},disabled:a,initialShown:o})})}function ut({value:e,label:t,className:n}){let r=C(),[i,a]=(0,P.useState)(`idle`);(0,P.useEffect)(()=>{a(`idle`)},[e]);async function o(){try{await M.writeText(e),a(`copied`)}catch{a(`failed`)}}return(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>void o(),className:n??`rounded border border-control-line px-2 py-1 text-xs`,children:r(`copy.button`,{label:r(t)})}),(0,z.jsx)(`span`,{"aria-live":`polite`,className:i===`failed`?`text-xs text-danger`:`text-xs text-ink-muted`,children:i===`copied`?r(`copy.done`):i===`failed`?r(`copy.refused`):``})]})}function dt(e,t){let n=[`Version: ${e||`unknown`}`,`Code: ${t.code}`,`HTTP: ${t.status===0?`network unavailable`:t.status}`,`Operation: ${t.method.toUpperCase()} ${t.path}`];return t.detail!==void 0&&n.push(`Detail: ${t.detail}`),n.join(` -`)}function ft({diagnostic:e,version:t,onClose:n}){let r=C(),i=dt(t,e);return(0,z.jsx)(`section`,{"aria-labelledby":`request-failure-heading`,className:`shrink-0 border-b border-danger/40 bg-danger/5 px-4 py-3`,children:(0,z.jsxs)(`div`,{className:`mx-auto flex max-w-5xl flex-col gap-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,z.jsx)(`h2`,{id:`request-failure-heading`,className:`text-sm font-semibold text-danger`,children:r(`diagnostic.requestFailed`)}),(0,z.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-ink-muted`,children:r(`diagnostic.requestFailedHint`,{code:e.code})})]}),(0,z.jsx)(`button`,{type:`button`,onClick:n,"aria-label":r(`diagnostic.dismiss`),className:`shrink-0 rounded border border-control-line px-2 py-1 text-xs text-ink-muted`,children:r(`diagnostic.dismiss`)})]}),(0,z.jsxs)(`details`,{className:`text-xs`,children:[(0,z.jsx)(`summary`,{className:`cursor-pointer text-ink-muted`,children:r(`diagnostic.showDetails`)}),(0,z.jsx)(`pre`,{className:`mt-2 max-h-36 overflow-auto whitespace-pre-wrap break-words rounded border border-line bg-card p-2 text-ink`,children:i}),(0,z.jsx)(`div`,{className:`mt-2`,children:(0,z.jsx)(ut,{value:i,label:`copy.diagnosticReport`})})]})]})})}var pt={system:`shell.themeSystem`,light:`shell.themeLight`,dark:`shell.themeDark`};function mt({exists:e,passwordless:t=!1,onOpen:n,onExists:r=()=>void 0,version:i=``,api:a=qe}){let{locale:o,setLocale:s,t:c}=w(),{theme:l,setTheme:u}=st(),[f,p]=(0,P.useState)(``),[m,h]=(0,P.useState)(``),[_,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(null),[T,E]=(0,P.useState)(!1),[D,k]=(0,P.useState)(!1),[ee,j]=(0,P.useState)(!1),M=e?t:ee,N=!M&&[...f].length<(e?1:4),ne=!e&&!M&&m!==f;async function re(){if(!(D||N||ne)){k(!0),y(``),x(null),C(null),E(!1);try{let t=e?await a.unlockVault(M?``:f):await a.initialiseVault(M?``:f);p(``),h(``),n(t)}catch(t){let n=t instanceof d?t.code:`network_request_failed`,i=e?`/api/v1/passwords/unlock`:`/api/v1/passwords/initialise`;if(x({code:n,status:t instanceof d?t.status:0,method:`POST`,path:i,...t instanceof d&&typeof t.problem?.detail==`string`?{detail:t.problem.detail}:{}}),n===`vault_already_exists`)try{if((await a.passwordVault()).exists){p(``),h(``),r(),y(c(`lock.alreadyExists`));return}}catch{}switch(n){case`wrong_passphrase`:y(c(`lock.wrong`));break;case`passphrase_too_short`:y(c(`lock.tooShort`,{count:4}));break;case`vault_storage_permission_denied`:y(c(`lock.storagePermission`));break;case`vault_storage_full`:y(c(`lock.storageFull`));break;case`vault_storage_read_only`:y(c(`lock.storageReadOnly`));break;case`vault_storage_busy`:y(c(`lock.storageBusy`));break;case`vault_storage_io_failed`:y(c(`lock.storageIO`));break;case`vault_schema_older`:case`vault_schema_newer`:{let e=t instanceof d&&typeof t.problem?.currentVersion==`number`?t.problem.currentVersion:0,r=t instanceof d&&typeof t.problem?.requiredVersion==`number`?t.problem.requiredVersion:0,i=n===`vault_schema_older`?`older`:`newer`;C({kind:i,current:e,required:r}),y(c(i===`older`?`lock.schemaOlder`:`lock.schemaNewer`,{current:e,required:r}));break}case`vault_migration_failed`:{let e=t instanceof d&&typeof t.problem?.currentVersion==`number`?t.problem.currentVersion:0,n=t instanceof d&&typeof t.problem?.requiredVersion==`number`?t.problem.requiredVersion:0;y(c(`lock.migrationFailed`,{current:e,required:n}));break}case`vault_envelope_unsupported`:y(c(`lock.envelopeUnsupported`));break;default:y(c(`lock.failed`))}}finally{k(!1)}}}async function ie(){k(!0),y(``);try{let e=await a.recoverCompatibleVault(f);p(``),C(null),n(e)}catch(e){let t=e instanceof d?e.code:`network_request_failed`;y(c(t===`vault_compatible_backup_missing`?`lock.noCompatibleBackup`:`lock.recoveryFailed`))}finally{k(!1)}}async function ae(){if(T){k(!0),y(``);try{let e=await a.resetUnsupportedVault(f);p(``),C(null),E(!1),n(e)}catch{y(c(`lock.resetFailed`))}finally{k(!1)}}}return(0,z.jsx)(`main`,{className:`flex min-h-screen items-center justify-center bg-canvas p-4 md:p-6`,children:(0,z.jsxs)(`section`,{className:`w-full max-w-3xl overflow-hidden rounded-lg border border-control-line bg-card shadow-2xl`,children:[(0,z.jsxs)(`header`,{className:`flex flex-wrap items-center justify-end gap-3 border-b border-control-line bg-toolbar px-4 py-3`,children:[(0,z.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-medium text-ink-muted`,children:[(0,z.jsx)(`span`,{children:c(`shell.theme`)}),(0,z.jsx)(`select`,{"aria-label":c(`shell.themeMenu`),value:l,onChange:e=>u(e.target.value),className:`${O} min-h-9`,children:Je.map(e=>(0,z.jsx)(`option`,{value:e,children:c(pt[e])},e))})]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-medium text-ink-muted`,children:[(0,z.jsx)(`span`,{children:c(`shell.language`)}),(0,z.jsx)(`select`,{"aria-label":c(`shell.languageMenu`),value:o,onChange:e=>s(e.target.value),className:`${O} min-h-9`,children:te.map(e=>(0,z.jsx)(`option`,{value:e,children:e===`en`?`English`:`日本語`},e))})]})]}),b===null?null:(0,z.jsx)(ft,{diagnostic:b,version:i,onClose:()=>x(null)}),(0,z.jsxs)(`div`,{className:`grid md:grid-cols-[minmax(0,0.9fr)_minmax(20rem,1.1fr)]`,children:[(0,z.jsx)(`div`,{className:`flex min-h-60 flex-col justify-center gap-8 border-b border-control-line bg-toolbar p-7 md:border-b-0 md:border-r md:p-10`,children:(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-ink`,children:c(`shell.title`)}),(0,z.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-ink-muted`,children:c(e?M?`lock.explainPasswordless`:`lock.explainOpen`:`lock.explainNew`)})]})}),(0,z.jsxs)(`form`,{className:`flex flex-col justify-center gap-4 p-7 md:p-10`,onSubmit:e=>{e.preventDefault(),re()},children:[e||M?null:(0,z.jsx)(`p`,{className:`rounded-lg bg-notice px-3 py-2 text-sm text-notice-ink`,children:c(`lock.noRecovery`)}),_===``?null:(0,z.jsx)(g,{tone:`danger`,children:_}),S===null?null:(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-md border border-control-line bg-toolbar p-4`,children:[(0,z.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:c(`lock.schemaRecoveryHint`)}),(0,z.jsx)(v,{type:`button`,disabled:D||N,onClick:()=>void ie(),children:c(`lock.restoreCompatibleBackup`)}),(0,z.jsx)(A,{label:c(`lock.resetUnsupportedAcknowledge`),checked:T,onChange:E,tone:`danger`}),(0,z.jsx)(v,{kind:`danger`,type:`button`,disabled:D||N||!T,onClick:()=>void ae(),children:c(`lock.resetUnsupported`)})]}),e?null:(0,z.jsx)(A,{label:c(`lock.withoutPassword`),checked:ee,onChange:j}),M?(0,z.jsx)(`p`,{className:`text-sm text-ink-muted`,children:c(`lock.withoutPasswordHint`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(lt,{label:c(`lock.password`),value:f,onChange:p,autoFocus:!0}),e?null:(0,z.jsx)(lt,{label:c(`lock.confirm`),value:m,onChange:h})]}),!e&&!M&&[...f].length>=4&&[...f].length<12?(0,z.jsx)(`p`,{className:`text-sm text-ink-muted`,children:c(`lock.shortPasswordHint`)}):null,(0,z.jsx)(v,{kind:`primary`,className:`self-start`,type:`submit`,disabled:D||N||ne,children:c(e?`lock.open`:`lock.create`)})]})]})]})})}var ht=[`home`,`connections`,`config`,`groups`,`keys`,`knownHosts`,`remoteKeys`,`diagnostics`,`secrets`,`settings`,`notification`,`sync`,`history`,`inspector`,`moreHorizontal`,`terminal`,`movePane`,`focus`,`close`,`plus`,`menu`,`search`,`chevronRight`,`edit`,`copy`],gt={home:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M3 11.5L12 4l9 7.5`}),(0,z.jsx)(`path`,{d:`M5.5 10v10h13V10M9.5 20v-6h5v6`})]}),connections:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,z.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,z.jsx)(`path`,{d:`M6.6 7.5h.01M6.6 16.5h.01`})]}),config:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z`}),(0,z.jsx)(`path`,{d:`M14 3v5h5`})]}),groups:(0,z.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}),keys:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`3.5`}),(0,z.jsx)(`path`,{d:`M10 13L20 3M17 6l2 2M14 9l2 2`})]}),knownHosts:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6z`}),(0,z.jsx)(`path`,{d:`M9 12l2 2 4-4`})]}),remoteKeys:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M7.5 18a4 4 0 1 1 .6-7.95A5.5 5.5 0 0 1 18.6 11 3.5 3.5 0 0 1 18 18`}),(0,z.jsx)(`path`,{d:`M12 21v-7M9.5 16.5L12 14l2.5 2.5`})]}),diagnostics:(0,z.jsx)(`path`,{d:`M3 12h4l3 8 4-16 3 8h4`}),secrets:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`rect`,{x:`4`,y:`10`,width:`16`,height:`11`,rx:`2`}),(0,z.jsx)(`path`,{d:`M8 10V7a4 4 0 0 1 8 0v3`})]}),settings:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,z.jsx)(`path`,{d:`M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9L7 7M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1`})]}),notification:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9`}),(0,z.jsx)(`path`,{d:`M10 21h4`})]}),sync:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M20 11a8 8 0 0 0-13.7-4.6L4 8.5`}),(0,z.jsx)(`path`,{d:`M4 4.5v4h4`}),(0,z.jsx)(`path`,{d:`M4 13a8 8 0 0 0 13.7 4.6L20 15.5`}),(0,z.jsx)(`path`,{d:`M20 19.5v-4h-4`})]}),history:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,z.jsx)(`path`,{d:`M12 7v5l3 2`})]}),inspector:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,z.jsx)(`path`,{d:`M15 4v16`})]}),moreHorizontal:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`})]}),terminal:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,z.jsx)(`path`,{d:`M7 9.5l3 2.5-3 2.5M12.5 15.5h4.5`})]}),movePane:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`circle`,{cx:`8`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`16`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`8`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`16`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`8`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`16`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),focus:(0,z.jsx)(`path`,{d:`M9 4H4v5M15 4h5v5M20 15v5h-5M9 20H4v-5`}),close:(0,z.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`}),plus:(0,z.jsx)(`path`,{d:`M12 5v14M5 12h14`}),menu:(0,z.jsx)(`path`,{d:`M4 7h16M4 12h16M4 17h16`}),search:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,z.jsx)(`path`,{d:`M16 16l4 4`})]}),chevronRight:(0,z.jsx)(`path`,{d:`M9 5l7 7-7 7`}),edit:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:`M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16z`}),(0,z.jsx)(`path`,{d:`M13.5 6.5l4 4M4 20l3.8-1`})]}),copy:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`rect`,{x:`8`,y:`8`,width:`12`,height:`12`,rx:`2`}),(0,z.jsx)(`path`,{d:`M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2`})]})};function _t(){return(0,z.jsx)(`svg`,{"aria-hidden":`true`,style:{display:`none`},children:ht.map(e=>(0,z.jsx)(`symbol`,{id:`icon-${e}`,viewBox:`0 0 24 24`,children:gt[e]},e))})}function B({name:e,className:t=`h-4 w-4`}){return(0,z.jsx)(`svg`,{"aria-hidden":`true`,className:`shrink-0 ${t}`,fill:`none`,stroke:`currentColor`,strokeWidth:1.7,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`use`,{href:`#icon-${e}`})})}var vt=`inspector`;function yt({label:e,open:t,attention:n,onToggle:r,buttonRef:i}){let a=C(),o=a(t?`shell.inspectorHideNamed`:`shell.inspectorShowNamed`,{label:e});return(0,z.jsxs)(`button`,{ref:i,type:`button`,"aria-label":n?`${o} ${a(`shell.inspectorAttention`)}`:o,"aria-expanded":t,"aria-controls":vt,onClick:r,className:`relative flex items-center gap-1.5 rounded-md border border-control-line px-2 py-1 text-ink ${t?`bg-select-fill`:`bg-card`}`,children:[(0,z.jsx)(B,{name:`inspector`,className:`h-4 w-4`}),(0,z.jsx)(`span`,{className:`hidden max-w-44 truncate text-xs sm:inline`,children:e}),n?(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -right-1 -top-1 h-2 w-2 rounded-full border border-toolbar bg-notice-ink`}):null]})}function bt({label:e,children:t,paneRef:n}){return(0,z.jsx)(`aside`,{ref:n,tabIndex:-1,id:vt,"aria-label":e,className:`fixed inset-0 z-10 overflow-y-auto bg-sidebar p-3 lg:relative lg:z-auto lg:border-l lg:border-line`,children:t})}function xt({className:e}){return(0,z.jsx)(`div`,{className:`sshc-skeleton rounded-md ${e}`})}function St({kind:e=`section`}){return e===`terminal`?(0,z.jsx)(`div`,{"aria-hidden":`true`,className:`h-full bg-term-bg p-5`,children:(0,z.jsxs)(`div`,{className:`flex max-w-3xl flex-col gap-3 opacity-55`,children:[(0,z.jsx)(xt,{className:`h-3 w-48`}),(0,z.jsx)(xt,{className:`h-3 w-72`}),(0,z.jsx)(xt,{className:`h-3 w-56`})]})}):(0,z.jsx)(`div`,{"aria-hidden":`true`,className:`h-full overflow-hidden p-6`,children:(0,z.jsxs)(`div`,{className:`mx-auto flex max-w-6xl flex-col gap-6`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(xt,{className:`h-7 w-52`}),(0,z.jsx)(xt,{className:`h-3.5 w-full max-w-xl`})]}),(0,z.jsx)(`div`,{className:`sshc-card grid gap-px overflow-hidden rounded-md bg-line sm:grid-cols-3`,children:Array.from({length:3},(e,t)=>(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 bg-card p-4`,children:[(0,z.jsx)(xt,{className:`h-3 w-24`}),(0,z.jsx)(xt,{className:`h-6 w-16`})]},t))}),(0,z.jsxs)(`div`,{className:`sshc-card flex flex-col gap-4 rounded-md bg-card p-4`,children:[(0,z.jsx)(xt,{className:`h-4 w-36`}),(0,z.jsx)(xt,{className:`h-10 w-full`}),(0,z.jsx)(xt,{className:`h-14 w-full`}),(0,z.jsx)(xt,{className:`h-14 w-full`})]})]})})}var Ct=[`Engine`,`Terminal`,`Shortcuts`,`Notifications`,`Connections`,`Password`],wt={Engine:{path:`/settings/engine`,label:`engine.heading`,description:`settings.engineDescription`,icon:`settings`},Terminal:{path:`/settings/terminal`,label:`terminal.settingsHeading`,description:`settings.terminalDescription`,icon:`terminal`},Shortcuts:{path:`/settings/shortcuts`,label:`shortcuts.heading`,description:`shortcuts.description`,icon:`settings`},Notifications:{path:`/settings/notifications`,label:`terminal.browserNotificationsHeading`,description:`settings.notificationsDescription`,icon:`notification`},Connections:{path:`/settings/connections`,label:`desktop.closeAllHeading`,description:`settings.connectionsDescription`,icon:`connections`},Password:{path:`/settings/password`,label:`secrets.changeHeading`,description:`settings.passwordDescription`,icon:`secrets`}};function Tt(e){return wt[e].path}function Et(e){return Ct.find(t=>{let n=Tt(t);return e===n||e===`${n}/`})??null}function Dt(e){let t=Et(e);return t===null?null:Tt(t)}var Ot=[`Home`,`Menu`,`Connections`,`Terminal`,`Files`,`Snippets`,`Config`,`Groups`,`Keys`,`Known Hosts`,`Remote Keys`,`Diagnostics`,`Passwords`,`Key Passphrases`,`OTP`,`Settings`,`Sync`,`History`,`License`],kt={Home:`/`,Menu:`/menu`,Connections:`/connections`,Terminal:`/terminal`,Files:`/files`,Snippets:`/snippets`,Config:`/config`,Groups:`/groups`,Keys:`/keys`,"Known Hosts":`/known-hosts`,"Remote Keys":`/install-key`,Diagnostics:`/diagnostics`,Passwords:`/vault/passwords`,"Key Passphrases":`/vault/key-passphrases`,OTP:`/vault/otp`,Settings:`/settings/engine`,Sync:`/sync`,History:`/history`,License:`/license`};function At(e){return kt[e]}function jt(e){for(let t of Ot){let n=kt[t];if(e===n)return{kind:`section`,section:t,canonicalPath:n,canonical:!0};if(n!==`/`&&e===`${n}/`)return{kind:`section`,section:t,canonicalPath:n,canonical:!1}}let t=Dt(e);return t===null?e.startsWith(`/connections/`)?{kind:`section`,section:`Connections`,canonicalPath:kt.Connections,canonical:!0}:{kind:`not-found`,pathname:e}:{kind:`section`,section:`Settings`,canonicalPath:t,canonical:e===t}}function Mt(e){return e===``||e.startsWith(`/`)||e.startsWith(`~`)||e.includes(`\0`)||e.includes(`\\`)?!1:e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)}function Nt(e){return e!==``&&!/[\p{Cc}]/u.test(e)}var Pt={Basic:`basic`,Analysis:`analysis`,Advanced:`advanced`,Sshc:`sshc`},Ft=new Map(Object.entries(Pt).map(([e,t])=>[t,e])),It={Jump:`jump`,Forwards:`port-forwarding`,Directives:`directives`,Raw:`raw`},Lt=new Map(Object.entries(It).map(([e,t])=>[t,e])),Rt=new Set([`path`,`host`,`panel`,`advanced`]);function zt(e){let t=new Set;for(let n of e.keys()){if(!Rt.has(n)||t.has(n))return!1;t.add(n)}return!0}function Bt(e){let t=e.get(`path`),n=e.get(`host`),r=e.get(`panel`),i=e.get(`advanced`);if(t===null&&n===null&&r===null&&i===null)return null;if(t===null||n===null||r===null||!Mt(t)||!Nt(n))return!1;let a=Ft.get(r);if(a===void 0)return!1;if(a!==`Advanced`)return i===null&&{path:t,alias:n,panel:a,advanced:`Jump`};if(i===null)return!1;let o=Lt.get(i);return o!==void 0&&{path:t,alias:n,panel:a,advanced:o}}function Vt(e){if(e.pathname===`/connections`)return{kind:`redirect`,location:`/connections/servers`};let t=new URLSearchParams(e.search);if(!zt(t))return{kind:`invalid`};let n=Bt(t);return e.pathname!==`/connections/servers`||n===!1?{kind:`invalid`}:{kind:`valid`,target:n}}function Ht(e){let t=new URLSearchParams;if(e===null)return`/connections/servers`;if(!Mt(e.path)||!Nt(e.alias))throw Error(`Unsafe connection target`);return t.set(`path`,e.path),t.set(`host`,e.alias),t.set(`panel`,Pt[e.panel]),e.panel===`Advanced`&&t.set(`advanced`,It[e.advanced]),`/connections/servers?${t.toString()}`}function Ut({route:e,navigationOpen:t,navigationId:n,navigationToggleRef:r,onToggleNavigation:i,inspector:a,inspectorOpen:o,inspectorToggleRef:s,onToggleInspector:c,sectionLabels:l}){let{t:u}=w();return(0,z.jsxs)(`header`,{"data-app-header":!0,className:`sticky top-0 z-20 flex h-12 shrink-0 items-center gap-2 border-b border-line bg-toolbar px-2 md:hidden`,children:[(0,z.jsx)(`button`,{ref:r,type:`button`,"aria-label":u(`shell.navigationToggle`),"aria-expanded":t,"aria-controls":n,onClick:i,className:`grid h-10 w-10 shrink-0 place-items-center rounded text-ink-muted hover:bg-select-fill hover:text-ink`,children:(0,z.jsx)(B,{name:`menu`,className:`h-4 w-4`})}),(0,z.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-semibold`,children:e.kind===`section`&&e.section!==void 0?u(l[e.section]):u(`shell.pageNotFound`)}),a===null?null:(0,z.jsx)(`span`,{className:`shrink-0 [&>button]:h-10 [&>button]:min-w-10 [&>button]:justify-center`,children:(0,z.jsx)(yt,{label:a.label,open:o,attention:a.attention,...s===void 0?{}:{buttonRef:s},onToggle:c})})]})}var Wt=ie(),Gt=[];function Kt(){return Gt[Gt.length-1]}function qt(e){if(e.closest(`[hidden], [inert], [aria-hidden="true"]`))return!1;for(let t=e;t;t=t.parentElement){let e=getComputedStyle(t);if(e.display===`none`||e.visibility===`hidden`)return!1}return!0}function Jt(e){return[...e.querySelectorAll(`a[href], button, input, select, textarea, [tabindex]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.tabIndex>=0&&qt(e))}function Yt(e){let t=Kt(),n=e.target;t===void 0||!t.closeOnOutside||!(n instanceof Node)||t.containers().some(e=>e?.contains(n)===!0)||t.dismiss(`outside`)}function Xt(e){let t=Kt();if(t===void 0)return;if(e.key===`Tab`&&t.trapFocus){let n=t.containers().flatMap(e=>e===null?[]:Jt(e)),r=n[0]??t.containers()[0]??null,i=n[n.length-1]??r;if(r===null||i===null)return;let a=document.activeElement;(e.shiftKey?a===r||!n.includes(a):a===i||!n.includes(a))&&(e.preventDefault(),(e.shiftKey?i:r).focus());return}if(e.key!==`Escape`)return;e.preventDefault(),e.stopImmediatePropagation();let n=t.restoreFocus();t.dismiss(`escape`),queueMicrotask(()=>{n?.isConnected===!0&&n.focus()})}function Zt(e){let t=Gt.reduce((e,t,n)=>t.trapFocus?n:e,-1),n=Gt[t];n===void 0||!(e.target instanceof Node)||Gt.slice(t).some(t=>t.containers().some(t=>t?.contains(e.target)))||(n.initialFocus()??n.containers()[0])?.focus()}function Qt(e){let t=Kt();if(t===void 0)return;e.preventDefault(),e.stopImmediatePropagation();let n=t.restoreFocus();t.dismiss(`android-back`),queueMicrotask(()=>{n?.isConnected===!0&&n.focus()})}function $t(){Gt.length===1&&(document.addEventListener(`pointerdown`,Yt,!0),document.addEventListener(`keydown`,Xt,!0),document.addEventListener(`focusin`,Zt,!0),window.addEventListener(`sshc-android-back`,Qt,!0))}function en(){Gt.length===0&&(document.removeEventListener(`pointerdown`,Yt,!0),document.removeEventListener(`keydown`,Xt,!0),document.removeEventListener(`focusin`,Zt,!0),window.removeEventListener(`sshc-android-back`,Qt,!0))}function tn({open:e,containerRefs:t,onDismiss:n,closeOnOutside:r=!0,returnFocusRef:i,initialFocusRef:a,trapFocus:o=!1}){let s=(0,P.useRef)(Symbol(`dismissible-layer`)),c=(0,P.useRef)(t),l=(0,P.useRef)(n),u=(0,P.useRef)(i),d=(0,P.useRef)(a);c.current=t,l.current=n,u.current=i,d.current=a,(0,P.useEffect)(()=>{if(!e)return;let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n={id:s.current,containers:()=>c.current.map(e=>e.current),dismiss:e=>l.current(e),closeOnOutside:r,restoreFocus:()=>u.current?.current??t,initialFocus:()=>d.current?.current??null,trapFocus:o},i=n.containers(),a=Kt();return a?.trapFocus===!0&&t!==null&&a.containers().some(e=>e?.contains(t))||a?.dismiss(`superseded`),Gt.push(n),$t(),o&&(n.initialFocus()??n.containers().flatMap(e=>e===null?[]:Jt(e))[0]??n.containers()[0]??null)?.focus(),()=>{let e=n.restoreFocus(),t=Gt.findIndex(e=>e.id===n.id);t>=0&&Gt.splice(t,1),en(),queueMicrotask(()=>{let t=document.activeElement,n=t instanceof Node&&i.some(e=>e?.contains(t)===!0);e?.isConnected===!0&&(t===document.body||n)&&e.focus()})}},[r,e,o])}var nn={center:`items-center justify-center p-4`,sheet:`items-end justify-center p-3 sm:items-center`,palette:`items-start justify-center px-3 pt-[10vh] md:pt-[14vh]`};function rn({open:e=!0,labelledBy:t,describedBy:n,children:r,onDismiss:i,closeOnOutside:a=!1,initialFocusRef:o,returnFocusRef:s,placement:c=`center`,panelClassName:l=`w-full max-w-lg`,backdropClassName:u=``,zIndexClassName:d=`z-50`}){let f=(0,P.useRef)(null);return tn({open:e,containerRefs:[f],onDismiss:i,closeOnOutside:a,...o===void 0?{}:{initialFocusRef:o},...s===void 0?{}:{returnFocusRef:s},trapFocus:!0}),e?(0,Wt.createPortal)((0,z.jsx)(`div`,{"data-modal-placement":c,className:`sshc-modal-frame fixed inset-0 ${d} flex bg-canvas/80 backdrop-blur-[2px] ${nn[c]} ${u}`,children:(0,z.jsx)(`section`,{ref:f,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":t,"aria-describedby":n,className:`sshc-card sshc-modal-panel border border-control-line bg-card shadow-2xl ${l}`,children:r})}),document.body):null}function an({id:e,heading:t,body:n,confirmLabel:r,cancelLabel:i,onConfirm:a,onCancel:o,returnFocusRef:s,confirmKind:c=`danger`}){let l=(0,P.useRef)(null);return(0,z.jsxs)(rn,{labelledBy:e,onDismiss:o,initialFocusRef:l,...s===void 0?{}:{returnFocusRef:s},panelClassName:`flex w-full max-w-sm flex-col gap-3 rounded-lg p-4`,children:[(0,z.jsx)(`h2`,{id:e,className:`text-sm font-medium text-ink`,children:t}),n,(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(v,{ref:l,onClick:o,className:`focus:outline-2 focus:outline-offset-2 focus:outline-accent`,children:i}),(0,z.jsx)(v,{kind:c,onClick:a,className:`focus:outline-2 focus:outline-offset-2 focus:outline-accent`,children:r})]})]})}var on=10,sn=100;function cn(e,t,n=!0){let[r,a]=(0,P.useState)([]),[o,s]=(0,P.useState)(0),[c,l]=(0,P.useState)(0),[u,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(!1),m=(0,P.useRef)(0),h=(0,P.useRef)(0),g=c>0,_=(0,P.useCallback)(()=>{l(e=>e+1)},[]),v=(0,P.useCallback)(()=>{l(e=>Math.max(0,e-1))},[]),y=(0,P.useCallback)(()=>(m.current+=1,h.current+=1,h.current),[]),b=(0,P.useCallback)((e,t)=>t===h.current?(m.current+=1,a(e.sessions),s(e.maxSessions),!0):!1,[]),x=(0,P.useCallback)(async()=>{if(!n)return;let t=m.current+1;m.current=t;try{let n=await e.terminalSessions();if(t!==m.current)return;a(n.sessions),s(n.maxSessions)}catch{}finally{t===m.current&&p(!0)}},[e,n]),S=(0,P.useCallback)(async(e,t)=>{_();let n=y();try{let t=await e();return b(t,n)||await x(),!0}catch(e){return await t(e),!1}finally{v()}},[b,y,_,v,x]),C=(0,P.useCallback)(async e=>{d(t(ln(i(e)))),await x()},[x,t]);(0,P.useEffect)(()=>(x(),()=>{m.current+=1}),[x]);let w=r.some(e=>e.state===`connecting`||e.state===`reconnecting`);(0,P.useEffect)(()=>{if(!n||r.length===0)return;let e=window.setInterval(()=>void x(),w?500:2e3);return()=>window.clearInterval(e)},[w,n,x,r.length]);let T=(0,P.useCallback)(async n=>{_(),y(),d(``);try{let t=await e.openTerminalSession(n);return await x(),t.session}catch(e){return d(t(ln(i(e)))),null}finally{v()}},[e,y,_,v,x,t]),E=(0,P.useCallback)(async n=>{await S(()=>e.closeTerminalSession(n),()=>d(t(`terminal.closeFailed`)))},[e,S,t]),D=(0,P.useCallback)(async t=>(d(``),S(()=>e.reconnectTerminalSession(t),C)),[e,S,C]),O=(0,P.useCallback)(async t=>(d(``),S(()=>e.stopTerminalReconnect(t),C)),[e,S,C]),k=(0,P.useCallback)(async()=>{_();let n=!1;try{let i=r;for(let t=0;t0;t+=1){t>0&&await new Promise(e=>setTimeout(e,sn));for(let t of i)try{let n=y(),r=await e.closeTerminalSession(t.id);b(r,n)||await x(),i=r.sessions}catch{n=!0}let r=y(),a=await e.terminalSessions().catch(()=>null);if(a===null)break;b(a,r)||await x(),i=a.sessions}n&&i.length>0&&d(t(`terminal.closeFailed`))}finally{v()}},[b,e,y,_,v,x,r,t]);return{sessions:r,maxSessions:o,busy:g,problem:u,loaded:f,rename:(0,P.useCallback)((n,r)=>S(()=>e.renameTerminalSession(n,r),()=>d(t(`terminal.renameFailed`))),[e,S,t]),unpinTitle:(0,P.useCallback)(n=>S(()=>e.renameTerminalSession(n,null),()=>d(t(`terminal.renameFailed`))),[e,S,t]),open:T,reconnect:D,stopReconnect:O,close:E,closeAll:k,refresh:x,markExited:(0,P.useCallback)(e=>{m.current+=1,h.current+=1,a(t=>t.map(t=>t.id===e&&t.exited===void 0?{...t,state:`exited`,exited:{code:0,signal:``,at:``}}:t))},[])}}function ln(e){switch(e){case`terminal_session_limit`:return`terminal.limitRefused`;case`alias_unresolvable`:return`terminal.unresolvable`;case`jump_depth_exceeded`:return`terminal.jumpDepthExceeded`;case`host_key_unknown`:return`terminal.hostKeyUnknown`;case`host_key_changed`:return`terminal.hostKeyChanged`;case`host_key_revoked`:return`terminal.hostKeyRevoked`;case`identity_unavailable`:return`terminal.identityUnavailable`;case`authentication_unavailable`:return`terminal.authenticationUnavailable`;case`authentication_cancelled`:return`terminal.authenticationCancelled`;case`key_passphrase_required`:return`terminal.keyPassphraseRequired`;case`reconnect_failed`:return`terminal.reconnectFailed`;case`reconnect_exhausted`:return`terminal.reconnectExhausted`;case`reconnect_stopped`:return`terminal.reconnectStopped`;case`terminal_not_reconnecting`:return`terminal.notReconnecting`;default:return`terminal.openFailed`}}var un=`application/x-sshc-console`;function dn(e,t){let n=t.progress;if(n===void 0)return t.state===`connected`?e(`terminal.connected`):e(`terminal.connecting`);let r=n.alias||`${n.user}@${n.hostName}`,i=`${n.hop}/${n.hops}`;switch(n.phase){case`dialing`:return e(`terminal.progressDialing`,{target:r,position:i});case`host_key`:return e(`terminal.progressHostKey`,{target:r,position:i});case`authenticating`:return e(`terminal.progressAuthenticating`,{target:r,position:i});case`authenticated`:return e(`terminal.progressAuthenticated`,{target:r,position:i});case`opening_session`:return e(`terminal.progressOpeningSession`,{target:r,position:i})}}function fn(e){return e.presentation?.displayTitle??e.title}function pn(e){return e.kind===`ssh`?e.alias??e.title:`localhost`}function mn(e){return r(`RecentConnectionList`,e)}var hn={async recentConnections(){return mn(await u.read(`/api/v1/connections/recent`))}};function gn(e,t,n,r){let i;switch(e.key){case`ArrowRight`:i=(t+1)%n.length;break;case`ArrowLeft`:i=(t-1+n.length)%n.length;break;case`Home`:i=0;break;case`End`:i=n.length-1;break;default:return}e.preventDefault(),(e.currentTarget.closest(`[role="tablist"]`)?.querySelectorAll(`[role="tab"]`))?.[i]?.focus();let a=n[i];a!==void 0&&r(a)}var _n=()=>hn.recentConnections(),vn=[],yn=[];function bn(e,t){let n=new Map(t.map(e=>[e.identity.alias,e]));return e.map(e=>{let t=n.get(e);return{alias:e,group:t?.group??``,hostName:t?.hostName??``,user:t?.user??``}})}function xn({open:e,heading:t,aliases:n,hosts:r=vn,value:i=``,local:a=yn,loadRecent:o=_n,initialFocus:s=`search`,returnFocusRef:c,onChoose:l,onChooseLocal:u,onClose:d}){let f=C(),[p,m]=(0,P.useState)(``),[h,g]=(0,P.useState)(`groups`),[_,v]=(0,P.useState)([]),y=(0,P.useRef)(null),b=(0,P.useRef)(null),x=(0,P.useMemo)(()=>bn(n,r),[n,r]),S=(0,P.useMemo)(()=>new Map(x.map(e=>[e.alias,e])),[x]),w=p.trim().toLocaleLowerCase(),T=a.filter(e=>w===``||[e.label,e.detail,`local`].some(e=>e.toLocaleLowerCase().includes(w))),E=w===``?x:x.filter(e=>[e.alias,e.group,e.hostName,e.user].some(e=>e.toLocaleLowerCase().includes(w))),D=_.flatMap(e=>{let t=S.get(e.alias);return t===void 0?[]:[{...t,lastConnectedAt:e.lastConnectedAt}]}),O=(0,P.useMemo)(()=>{let e=new Map;for(let t of E)e.set(t.group,[...e.get(t.group)??[],t]);return e},[E]),k=D.length===0?[`groups`]:[`recent`,`groups`];(0,P.useEffect)(()=>{if(!e)return;let t=!0;return o().then(e=>{t&&(v(e.connections),e.connections.some(e=>S.has(e.alias))&&g(`recent`))}).catch(()=>void 0),()=>{t=!1}},[e,o,S]);function A(){d(),m(``)}let ee=({key:e,name:t,detail:n,icon:r,current:i,label:a,choose:o})=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>{o(),m(``)},"aria-label":a,className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left hover:bg-select-fill focus:bg-select-fill focus:outline-none ${i?`bg-select-fill`:``}`,children:[(0,z.jsx)(B,{name:r,className:`size-4 shrink-0 text-accent`}),(0,z.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,z.jsx)(`span`,{className:`block truncate font-medium text-ink`,children:t}),(0,z.jsx)(`span`,{className:`block truncate text-xs text-ink-muted`,children:n||f(`sftp.hostNoDetails`)})]}),i?(0,z.jsx)(`span`,{className:`text-xs text-accent`,children:f(`sftp.hostCurrent`)}):null]},e),j=(e,t)=>ee({key:e.alias,name:e.alias,detail:t||e.hostName,icon:`terminal`,current:e.alias===i,choose:()=>l(e.alias)}),te=e=>ee({key:`local:${e.id}`,name:e.label,detail:e.detail,icon:`home`,current:e.current===!0,label:`${e.label}, ${e.detail}`,choose:()=>u?.(e.id)});return(0,z.jsxs)(rn,{open:e,labelledBy:`host-picker-heading`,onDismiss:A,closeOnOutside:!0,initialFocusRef:s===`close`?b:y,...c===void 0?{}:{returnFocusRef:c},placement:`palette`,panelClassName:`flex max-h-[76vh] w-full max-w-xl flex-col overflow-hidden rounded-xl`,children:[(0,z.jsxs)(`div`,{className:`border-b border-line p-3`,children:[(0,z.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,z.jsx)(`h2`,{id:`host-picker-heading`,className:`font-semibold`,children:t}),(0,z.jsx)(`button`,{ref:b,type:`button`,"aria-label":f(`sftp.closeHostPicker`),onClick:A,className:`flex size-8 items-center justify-center rounded text-ink-muted hover:bg-select-fill`,children:`×`})]}),(0,z.jsxs)(`label`,{className:`relative block`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:f(`sftp.searchHosts`)}),(0,z.jsx)(B,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-muted`}),(0,z.jsx)(`input`,{ref:y,type:`search`,"aria-label":f(`sftp.searchHosts`),value:p,onChange:e=>m(e.target.value),placeholder:f(`sftp.searchHostsPlaceholder`),className:`w-full rounded-md border border-control-line bg-control py-2 pl-9 pr-3 text-sm`})]}),w===``?(0,z.jsxs)(`div`,{className:`mt-3 flex gap-1 rounded-md bg-toolbar p-1`,role:`tablist`,"aria-label":f(`sftp.hostViews`),children:[(0,z.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":h===`recent`,tabIndex:h===`recent`?0:-1,disabled:D.length===0,onClick:()=>g(`recent`),onKeyDown:e=>gn(e,0,k,g),className:`grow rounded px-3 py-1.5 text-sm disabled:text-ink-faint ${h===`recent`?`bg-card shadow-sm`:`text-ink-muted`}`,children:f(`sftp.recentHosts`)}),(0,z.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":h===`groups`,tabIndex:h===`groups`?0:-1,onClick:()=>g(`groups`),onKeyDown:e=>gn(e,k.length-1,k,g),className:`grow rounded px-3 py-1.5 text-sm ${h===`groups`?`bg-card shadow-sm`:`text-ink-muted`}`,children:f(`sftp.hostGroups`)})]}):null]}),(0,z.jsxs)(`div`,{className:`min-h-0 overflow-y-auto p-2`,children:[T.length>0?(0,z.jsx)(`div`,{className:`mb-2 border-b border-line pb-2`,children:T.map(te)}):null,w===``?h===`recent`&&D.length>0?(0,z.jsxs)(`section`,{"aria-labelledby":`host-picker-recent-heading`,children:[(0,z.jsx)(`h3`,{id:`host-picker-recent-heading`,className:`px-3 py-2 text-xs font-medium uppercase tracking-wide text-ink-muted`,children:f(`sftp.recentHosts`)}),D.map(e=>j(e,f(`sftp.lastConnected`,{at:new Date(e.lastConnectedAt).toLocaleString()})))]}):[...O.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,z.jsxs)(`section`,{"aria-label":e||f(`sftp.ungroupedHosts`),className:`mb-2`,children:[(0,z.jsx)(`h3`,{className:`px-3 py-2 text-xs font-medium uppercase tracking-wide text-ink-muted`,children:e||f(`sftp.ungroupedHosts`)}),t.map(e=>j(e,e.hostName))]},e||`ungrouped`)):E.length===0&&T.length===0?(0,z.jsx)(`p`,{className:`p-4 text-center text-sm text-ink-muted`,children:f(`sftp.noHostMatches`)}):E.map(e=>j(e,e.group||e.hostName))]})]})}function Sn(e){return[...e.querySelectorAll(`[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`)}function Cn({open:e,menuRef:t,onClose:n}){let r=(0,P.useRef)(n);r.current=n,(0,P.useEffect)(()=>{if(!e)return;let n=t.current;if(n===null)return;let i=n;Sn(i)[0]?.focus();function a(e){let t=Sn(i);if(t.length===0)return;let n=t.indexOf(document.activeElement),a=-1;if(e.key===`ArrowDown`)a=(n+1)%t.length;else if(e.key===`ArrowUp`)a=n<=0?t.length-1:n-1;else if(e.key===`Home`)a=0;else if(e.key===`End`)a=t.length-1;else if(e.key===`Tab`){queueMicrotask(()=>r.current());return}else return;e.preventDefault(),t[a]?.focus()}return i.addEventListener(`keydown`,a),()=>i.removeEventListener(`keydown`,a)},[t,e])}function wn(e,t){switch(t.kind){case`agent`:return e(`terminal.forwardAgent`);case`dynamic`:return e(`terminal.forwardDynamic`,{listen:t.listen});default:return e(`terminal.forwardLocal`,{listen:t.listen,to:t.to})}}function Tn({sessions:e,selected:t,maxSessions:n,busy:r,problem:i,workspace:a=null,unreadBySession:o=new Set,onSelect:s,onClose:c,onRename:l,onRenameWorkspace:u,onUnpinTitle:d,onDuplicate:f,onReorder:p,localShellProfiles:m=[],onOpenShell:h,aliases:g=[],hosts:_=[],onConnect:v}){let y=C(),[b,x]=(0,P.useState)(!1),S=(0,P.useRef)(null),w=(0,P.useMemo)(()=>{let e=m.filter(e=>e.id!=="default");return[{id:`default`,label:y(`terminal.openShell`),detail:y(`terminal.localhost`)},...e.map(e=>({id:e.id,label:`${y(`terminal.openShell`)} · ${e.label}`,detail:e.path}))]},[m,y]),[T,E]=(0,P.useState)(null),[D,O]=(0,P.useState)(`down`),[k,A]=(0,P.useState)(null),[ee,j]=(0,P.useState)(null),[te,M]=(0,P.useState)(``),[N,ne]=(0,P.useState)(!1),[re,ie]=(0,P.useState)(``),[ae,oe]=(0,P.useState)(null),[F,I]=(0,P.useState)(null),[L,se]=(0,P.useState)(!1),[ce,le]=(0,P.useState)(!1),[R,ue]=(0,P.useState)(!1),de=(0,P.useRef)(null),fe=(0,P.useRef)(null),pe=e.filter(e=>e.exited===void 0).length,me=n>0&&pe>=n,he=new Set(a?.memberSessionIds??[]),ge=a===null?[]:e.filter(e=>he.has(e.id)),_e=e.filter(e=>!he.has(e.id)),ve=a!==null&&L?[...ge,..._e]:_e;(0,P.useEffect)(()=>{T!==null&&!e.some(e=>e.id===T)&&E(null),ee!==null&&!e.some(e=>e.id===ee)&&j(null),a===null&&(le(!1),ne(!1))},[e,T,ee,a]),tn({open:T!==null||ce,containerRefs:[de,fe],onDismiss:()=>{E(null),le(!1)},returnFocusRef:fe}),Cn({open:T!==null||ce,menuRef:de,onClose:()=>{E(null),le(!1)}}),(0,P.useEffect)(()=>{function e(e){e.key===`Shift`&&ue(!0)}function t(e){e.key===`Shift`&&ue(!1)}function n(){ue(!1)}function r(){document.hidden&&n()}return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,n),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,n),document.removeEventListener(`visibilitychange`,r)}},[]);function ye(t,n){let r=e.map(e=>e.id),i=r.indexOf(t),a=i+n;i<0||a<0||a>=r.length||(r.splice(a,0,...r.splice(i,1)),p(r),E(null))}function be(t){let n=ae;if(oe(null),I(null),n===null||n===t)return;let r=e.map(e=>e.id).filter(e=>e!==n),i=t===null?r.length:r.indexOf(t);r.splice(i<0?r.length:i,0,n),p(r)}async function xe(t){let n=te.trim();j(null);let r=e.find(e=>e.id===t)?.title??``;n===``||n===r||await l(t,n)}function Se(){let e=re.trim();ne(!1),!(a===null||e===``||e===a.name)&&u(e)}return(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[i===``?null:(0,z.jsx)(`p`,{role:`alert`,className:`rounded-md border border-notice-line bg-notice px-2 py-1.5 text-xs text-notice-ink`,children:i}),e.length===0?(0,z.jsx)(`p`,{className:`px-2 text-xs text-ink-muted`,children:y(`terminal.noSessions`)}):(0,z.jsxs)(`ul`,{"aria-label":y(`terminal.consoleList`),className:`flex flex-col gap-0.5`,onDragOver:e=>{e.dataTransfer.types.includes(`application/x-sshc-console`)&&e.preventDefault()},onDrop:()=>be(null),children:[a===null||ge.length<2?null:(0,z.jsxs)(`li`,{className:`relative rounded-lg border border-control-line bg-control/70 p-1`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1 rounded-md ${he.has(t??``)?`bg-select-fill`:``}`,children:[(0,z.jsx)(`button`,{type:`button`,"aria-label":y(L?`workspace.collapseGroup`:`workspace.expandGroup`,{name:a.name}),"aria-expanded":L,onClick:()=>se(e=>!e),className:`flex size-7 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover`,children:(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs`,children:L?`▾`:`▸`})}),N?(0,z.jsxs)(`div`,{className:`min-w-0 grow px-1 py-1`,children:[(0,z.jsx)(`input`,{autoFocus:!0,"aria-label":y(`workspace.renameLabel`,{name:a.name}),value:re,onChange:e=>ie(e.target.value),onBlur:Se,onKeyDown:e=>{e.key===`Enter`&&Se(),e.key===`Escape`&&ne(!1)},className:`w-full rounded border border-accent bg-card px-1 py-0.5 text-sm text-ink`}),(0,z.jsx)(`span`,{className:`block text-xs text-ink-faint`,children:y(`workspace.groupCount`,{count:String(ge.length)})})]}):(0,z.jsxs)(`button`,{type:`button`,"aria-label":a.name,onClick:()=>s(a.focusedSessionId),className:`min-w-0 grow px-1 py-1 text-left`,children:[(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:`block min-w-0 truncate text-sm font-medium text-ink`,children:a.name}),ge.some(e=>o.has(e.id))?(0,z.jsx)(`span`,{"aria-label":y(`terminal.unreadWorkspace`),className:`size-2 shrink-0 rounded-full bg-accent`}):null]}),(0,z.jsx)(`span`,{className:`block text-xs text-ink-faint`,children:y(`workspace.groupCount`,{count:String(ge.length)})})]}),(0,z.jsx)(`button`,{type:`button`,"aria-label":y(`workspace.rowMenu`,{name:a.name}),"aria-expanded":ce,onClick:e=>{fe.current=e.currentTarget,E(null),le(e=>!e)},className:`hidden size-7 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover md:flex`,children:(0,z.jsx)(B,{name:`moreHorizontal`,className:`size-3.5`})})]}),ce?(0,z.jsx)(`div`,{ref:de,role:`menu`,"aria-label":y(`workspace.rowMenu`,{name:a.name}),className:`absolute right-1 top-full z-10 mt-0.5 hidden w-48 rounded-lg border border-control-line bg-card p-1 shadow-lg md:block`,children:(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{ie(a.name),ne(!0),le(!1)},className:`block w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover`,children:y(`workspace.rename`)})}):null]}),ve.map(n=>{let i=e.findIndex(e=>e.id===n.id),a=n.state!==`exited`,l=n.kind===`ssh`?n.alias??``:y(`terminal.localhost`),u=fn(n),p=o.has(n.id),m=n.problem===``?n.state===`reconnecting`?y(`terminal.reconnectingAttempt`,{attempt:String(n.reconnect?.attempt??1),limit:String(n.reconnect?.limit??1)}):a?n.state===`connecting`?dn(y,n):y(`terminal.connected`):y(`terminal.exitedWith`,{code:String(n.exited?.code??0)}):y(ln(n.problem)),h=(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1.5 size-1.5 shrink-0 rounded-full ${n.state===`reconnecting`||n.state===`connecting`?`bg-notice-ink`:a?`bg-live`:`bg-ink-faint`}`}),g=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`truncate text-xs text-ink-faint`,children:y(`terminal.rowDetail`,{status:m,destination:l})}),(n.forwards??[]).map(e=>(0,z.jsx)(`p`,{className:`truncate text-xs ${e.problem===``?`text-ink-faint`:`text-notice-ink`}`,children:e.problem===``?wn(y,e):e.problem},`${e.kind}:${e.listen}:${e.to}`))]});return(0,z.jsxs)(`li`,{draggable:ee===null,onDragStart:e=>{e.dataTransfer.setData(un,n.id),e.dataTransfer.effectAllowed=`move`,oe(n.id)},onDragEnd:()=>{oe(null),I(null)},onDragOver:e=>{e.dataTransfer.types.includes(`application/x-sshc-console`)&&(e.preventDefault(),I(n.id))},onDrop:e=>{e.stopPropagation(),be(n.id)},className:`relative ${ae===n.id?`opacity-40`:``} ${he.has(n.id)?`ml-4 border-l border-line pl-1`:``}`,children:[F===n.id&&ae!==n.id?(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-2 -top-px block h-0.5 rounded bg-accent`}):null,(0,z.jsxs)(`div`,{className:`relative flex items-start gap-2 rounded-md px-2 py-1.5 transition-colors ${R?`bg-danger/10 hover:bg-danger/10`:n.id===t?`bg-select-fill`:`hover:bg-hover`}`,children:[ee===n.id?(0,z.jsxs)(z.Fragment,{children:[h,(0,z.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,z.jsx)(`input`,{autoFocus:!0,"aria-label":y(`terminal.renameLabel`,{title:n.title}),value:te,onChange:e=>M(e.target.value),onBlur:()=>void xe(n.id),onKeyDown:e=>{e.key===`Enter`&&xe(n.id),e.key===`Escape`&&j(null)},className:`w-full rounded border border-accent bg-card px-1 py-0.5 text-sm text-ink`}),g]})]}):(0,z.jsxs)(`button`,{type:`button`,"aria-label":u,"aria-current":n.id===t?`true`:void 0,onClick:()=>s(n.id),className:`flex min-w-0 grow items-start gap-2 text-left after:absolute after:inset-0 after:rounded-md`,children:[h,(0,z.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,z.jsx)(`span`,{className:`block truncate text-sm ${n.id===t?`font-semibold text-accent`:`text-ink`}`,children:u}),g]})]}),p?(0,z.jsx)(`span`,{"aria-label":y(`terminal.unreadNotification`),title:y(`terminal.unreadNotification`),className:`mt-2 size-2 shrink-0 rounded-full bg-accent`}):null,(0,z.jsx)(`button`,{type:`button`,"aria-label":y(`terminal.rowMenu`,{title:n.title}),"aria-expanded":T===n.id,onClick:e=>{if(fe.current=e.currentTarget,T===n.id){E(null);return}let t=e.currentTarget.getBoundingClientRect(),r=e.currentTarget.closest(`[data-navigation-scroll]`)?.getBoundingClientRect(),i=r?.bottom??window.innerHeight,a=r?.top??0,o=i-t.bottom,s=t.top-a;O(o<132&&s>o?`up`:`down`),le(!1),E(n.id)},className:`relative mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none md:size-6`,children:(0,z.jsx)(B,{name:`moreHorizontal`,className:`size-3.5`})}),(0,z.jsx)(`button`,{type:`button`,"aria-label":y(`terminal.closeSession`,{title:n.title}),onClick:e=>{if(n.exited!==void 0||e.shiftKey||R){c(n.id);return}A(n)},className:`relative mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none md:size-6`,children:(0,z.jsx)(B,{name:`close`,className:`size-3.5`})})]}),T===n.id?(0,z.jsxs)(`div`,{ref:de,role:`menu`,"aria-label":y(`terminal.rowMenu`,{title:n.title}),className:`absolute right-1 z-10 w-48 rounded-lg border border-control-line bg-card p-1 shadow-lg ${D===`up`?`bottom-full mb-0.5`:`mt-0.5`}`,children:[(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{M(n.title),j(n.id),E(null)},className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none md:min-h-0`,children:y(`terminal.rename`)}),n.presentation?.titlePinned===!0?(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{d(n.id),E(null)},className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none md:min-h-0`,children:y(`terminal.unpinTitle`)}):null,(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:r||me,onClick:()=>{f(n.id),E(null)},className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:y(`terminal.duplicate`)}),(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:i===0,onClick:()=>ye(n.id,-1),className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:y(`terminal.moveUp`)}),(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:i===e.length-1,onClick:()=>ye(n.id,1),className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:y(`terminal.moveDown`)})]}):null]},n.id)})]}),(0,z.jsxs)(`button`,{ref:S,type:`button`,disabled:r||me,onClick:()=>x(!0),className:`flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-ink hover:bg-hover disabled:text-ink-faint`,children:[(0,z.jsx)(B,{name:`plus`,className:`size-3.5`,"aria-hidden":`true`}),y(`terminal.newSession`)]}),(0,z.jsx)(xn,{open:b,heading:y(`terminal.newSession`),aliases:g,hosts:_,local:w,returnFocusRef:S,onChoose:e=>{x(!1),v?.(e)},onChooseLocal:e=>{x(!1),h(e==="default"?void 0:e)},onClose:()=>x(!1)}),me?(0,z.jsx)(`p`,{className:`px-2 text-xs text-ink-muted`,children:y(`terminal.limitReached`,{max:n})}):null,k===null?null:(0,z.jsx)(En,{session:k,onCancel:()=>A(null),onConfirm:()=>{c(k.id),A(null)}})]})}function En({session:e,onCancel:t,onConfirm:n}){let r=C(),i=(e.forwards??[]).length;return(0,z.jsx)(an,{id:`close-console-heading`,heading:r(`terminal.closeHeading`,{title:e.title}),body:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`terminal.closeBody`)}),i===0?null:(0,z.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`terminal.closeForwards`,{count:String(i)})})]}),confirmLabel:r(`terminal.closeConfirm`),cancelLabel:r(`terminal.closeCancel`),onConfirm:n,onCancel:t})}function Dn(e){return r(`UpdateStatus`,e)}var On={async updateStatus(){return Dn(await u.read(`/api/v1/update`))}};function kn(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function An(e){return e.ctrlKey||e.metaKey}function jn(e,t,n,r){return!kn(e)||e.length>Mn?null:{kind:`url`,text:t||e,target:e,start:n,end:r}}var Mn=4096,Nn=/https?:\/\/[^\s<>"'`]+/giu,Pn=/(?:^|[\s([{=])((?:\/[A-Za-z0-9._~@%+,:=-]+)+(?::\d+(?::\d+)?)?)/gu;function Fn(e){let t=e.length;for(;t>0&&/[.,;!?)]/u.test(e[t-1]??``);)--t;return e.slice(0,t)}function In(e){return e.replace(/:\d+(?::\d+)?$/u,``)}function Ln(e,t,n){return e.some(e=>te.start)}function Rn(e,t){let n=[];for(let t of e.matchAll(Nn)){let e=Fn(t[0]??``),r=t.index??-1;r<0||e===``||e.length>Mn||n.push({kind:`url`,text:e,target:e,start:r,end:r+e.length})}if(t)for(let t of e.matchAll(Pn)){let e=t[1]??``,r=Fn(e),i=t[0]??``,a=Math.max(0,i.length-e.length),o=(t.index??-1)+a,s=In(r),c=o+r.length;o<0||s===``||s.length>Mn||Ln(n,o,c)||n.push({kind:`remote-path`,text:r,target:s,start:o,end:c})}return n.sort((e,t)=>e.start-t.start||e.end-t.end)}function zn({api:e=On,current:t=``,indicator:n}){let r=C(),[i,a]=(0,P.useState)(null);(0,P.useEffect)(()=>{let t=!0;return e.updateStatus().then(e=>{t&&a(e)}).catch(()=>void 0),()=>{t=!1}},[e]);let o=i?.current??t;return o===``?null:(0,z.jsxs)(`div`,{className:`border-t border-line px-2 py-2 text-xs text-ink-muted`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n,(0,z.jsx)(`p`,{children:r(`update.version`,{version:o})})]}),i===null||!i.available||i.pageUrl===void 0||!kn(i.pageUrl)?null:(0,z.jsx)(`p`,{className:n===void 0?`mt-1`:`mt-1 pl-3.5`,children:(0,z.jsx)(`a`,{href:i.pageUrl,target:`_blank`,rel:`noreferrer noopener`,className:`text-ink underline underline-offset-2`,children:r(`update.available`,{version:i.latest??``})})})]})}function Bn({className:e=`h-7 w-7`}){return(0,z.jsxs)(`svg`,{"aria-hidden":`true`,"data-sshc-brand-mark":`true`,className:`shrink-0 ${e}`,viewBox:`0 0 512 512`,children:[(0,z.jsx)(`rect`,{width:`512`,height:`512`,rx:`112`,fill:`var(--ui-brand-background)`}),(0,z.jsx)(`path`,{d:`M136 166H244L288 210H376V346H268L224 302H136Z`,fill:`none`,stroke:`var(--ui-brand-mark)`,strokeWidth:`28`,strokeLinejoin:`round`,strokeLinecap:`round`}),(0,z.jsx)(`rect`,{x:`304`,y:`248`,width:`24`,height:`52`,rx:`3`,fill:`var(--ui-brand-cursor)`})]})}function Vn({label:e,width:t,minimum:n,maximum:r,onWidthChange:i,className:a=`hidden md:flex`}){let o=(0,P.useRef)(null),s=(0,P.useRef)(t),c=(0,P.useRef)(null),l=(0,P.useRef)(``),u=e=>Number.isFinite(e)?Math.min(r,Math.max(n,Math.round(e))):t;(0,P.useEffect)(()=>{s.current=t},[t]),(0,P.useEffect)(()=>()=>{c.current!==null&&window.cancelAnimationFrame(c.current),o.current!==null&&(document.body.style.userSelect=l.current)},[]);function d(e){s.current=u(e),c.current===null&&(c.current=window.requestAnimationFrame(()=>{c.current=null,i(s.current)}))}function f(e){o.current?.pointerId===e&&(o.current=null,document.body.style.userSelect=l.current,c.current!==null&&(window.cancelAnimationFrame(c.current),c.current=null,i(s.current)))}function p(e){e.button!==0||o.current!==null||(e.preventDefault(),o.current={pointerId:e.pointerId,startX:e.clientX,startWidth:t},s.current=t,l.current=document.body.style.userSelect,document.body.style.userSelect=`none`,e.currentTarget.setPointerCapture(e.pointerId))}function m(e){let t=o.current;t===null||t.pointerId!==e.pointerId||d(t.startWidth+e.clientX-t.startX)}function h(e){let a=null,o=e.shiftKey?32:8;e.key===`ArrowLeft`&&(a=t-o),e.key===`ArrowRight`&&(a=t+o),e.key===`Home`&&(a=n),e.key===`End`&&(a=r),a!==null&&(e.preventDefault(),i(u(a)))}return(0,z.jsx)(`div`,{role:`separator`,"aria-label":e,"aria-orientation":`vertical`,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":t,tabIndex:0,onPointerDown:p,onPointerMove:m,onPointerUp:e=>f(e.pointerId),onPointerCancel:e=>f(e.pointerId),onLostPointerCapture:e=>f(e.pointerId),onKeyDown:h,className:`group absolute inset-y-0 right-0 z-10 w-2 cursor-col-resize touch-none items-center justify-center outline-none ${a}`,children:(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`h-full w-px bg-transparent transition-colors group-hover:bg-accent group-focus-visible:w-0.5 group-focus-visible:bg-accent`})})}function Hn(e,t,n,r){let i=e=>Number.isFinite(e)?Math.min(r,Math.max(n,Math.round(e))):t,[a,o]=(0,P.useState)(()=>{try{let t=window.localStorage.getItem(e);if(t!==null&&t.trim()!==``)return i(Number(t))}catch{}return t});return[a,t=>{let n=i(t);o(n);try{window.localStorage.setItem(e,String(n))}catch{}}]}var Un=`sshc.navigation.width`;function Wn(e){return Number.isFinite(e)?Math.min(384,Math.max(192,Math.round(e))):240}function Gn(){try{let e=window.localStorage.getItem(Un);if(e!==null&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return Wn(t)}}catch{}return 240}function Kn(e){try{window.localStorage.setItem(Un,String(Wn(e)))}catch{}}var qn=256*1024;function Jn(){let e=globalThis.crypto?.randomUUID?.();return e===void 0?`${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}_save`:e.replaceAll(`-`,``)}function Yn(e){let t=``;for(let n=0;n{let o=e=>{let t=e.detail;t?.requestId!==r||typeof t.status!=`string`||(window.removeEventListener(`sshc-android-save`,o),i(t.status))};window.addEventListener(`sshc-android-save`,o);let s=n.chooseSave(r,t,e.type||`application/octet-stream`);s!==``&&(window.removeEventListener(`sshc-android-save`,o),a(Error(s)))});if(i===`cancelled`)throw Error(`android_save_cancelled`);if(i!==`ready`)throw Error(`android_save_failed`);try{for(let t=0;tnull);throw new d(typeof e?.code==`string`?e.code:`sftp_failed`,r.status,null)}return{contentType:(r.headers.get(`Content-Type`)??``).split(`;`)[0]?.trim()??``,revision:r.headers.get(`ETag`)??``,blob:await r.blob()}},async readText(e,t){return r(`SFTPTextFile`,await u.read(tr(e,`text`,t)))},async saveText(e,t,n,i){return r(`SFTPTextFile`,await u.mutate(tr(e,`text`,t),{method:`PUT`,headers:c,body:JSON.stringify({contents:n,expectedRevision:i})}))},async mkdir(e,t){return nr(await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/entries`,{method:`POST`,headers:c,body:JSON.stringify({path:t,type:`directory`})}))},async createEmptyFile(e,t){return nr(await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/entries`,{method:`POST`,headers:c,body:JSON.stringify({path:t,type:`file`})},{locallyHandledCodes:[`sftp_exists`,`sftp_failed`]}))},async rename(e,t,n){return nr(await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/entry`,{method:`PATCH`,headers:c,body:JSON.stringify({from:t,to:n})}))},async remove(e,t){let n=await y(`sftp.delete`,`${e}:${t}`);await u.mutate(tr(e,`entry`,t),{method:`DELETE`,headers:{"X-SSHC-Action":n}})},async startUpload(e,t,n,r,i){return rr(await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}`,{method:`POST`,headers:c,body:JSON.stringify({path:n,size:r,sourceFingerprint:i})},{locallyHandledCodes:er}))},async appendUpload(e,t,n,r,i,a,o){let s=`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}?path=${encodeURIComponent(n)}&offset=${r}&total=${i}`;return rr(await u.mutate(s,{method:`PATCH`,headers:{"Content-Type":`application/octet-stream`},body:a,...o===void 0?{}:{signal:o}},{locallyHandledCodes:er}))},async appendUploadRange(e,t,n,r,i,a,o){let s=`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}?path=${encodeURIComponent(n)}&offset=${r}&total=${i}&range=true&length=${a.size}`;return rr(await u.mutate(s,{method:`PATCH`,headers:{"Content-Type":`application/octet-stream`},body:a,...o===void 0?{}:{signal:o}},{locallyHandledCodes:er}))},async completeUpload(e,t,n,r,i,a){await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}/complete`,{method:`POST`,headers:c,body:JSON.stringify({path:n,size:r,expectedRevision:i,sourceFingerprint:a})},{locallyHandledCodes:er})},async cancelUpload(e,t,n){await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}?path=${encodeURIComponent(n)}`,{method:`DELETE`},{locallyHandledCodes:er})},async streamDownload(e,t,n,r,i,a){let o=!r&&i>0?{Range:`bytes=${i}-`,...a.revision===void 0?{}:{"If-Range":a.revision}}:void 0,s=`${tr(e,r?`archive`:`download`,n)}&jobId=${encodeURIComponent(t)}`,c=await u.send(s,{method:`GET`,...o===void 0?{}:{headers:o},...a.signal===void 0?{}:{signal:a.signal}},{locallyHandledCodes:er});if(!c.ok||!r&&i>0&&c.status!==200&&c.status!==206)throw Error(`download_failed`);let l=Number(c.headers.get(`Content-Length`)),d=!r&&i>0&&c.status===200,f=d?0:i,p=Number.isFinite(l)&&l>=0?f+l:null,m=c.headers.get(`ETag`);if(!r&&m===null)throw Error(`download_revision_missing`);m!==null&&a.onRevision?.(m),d&&await a.onReset?.(p);let h=f;if(c.body===null){let e=new Uint8Array(await(await c.blob()).arrayBuffer());return h+=e.byteLength,await a.onChunk(e,p),{bytes:h,total:p}}let g=c.body.getReader();for(;;){let e=await g.read();if(e.done)break;h+=e.value.byteLength,await a.onChunk(e.value,p)}return{bytes:h,total:p}},async saveDownload(e,t,n){let r=new Blob(n,{type:t?`application/zip`:`application/octet-stream`}),i=e.split(`/`).filter(Boolean),a=`${i[i.length-1]??`download`}${t?`.zip`:``}`;if(await Xn(r,a))return;let o=URL.createObjectURL(r),s=document.createElement(`a`);s.href=o,s.download=a,s.click(),globalThis.setTimeout(()=>URL.revokeObjectURL(o),3e4)},async chmod(e,t,n,r,i=!1){let a=await y(`sftp.chmod`,`${e}:${t}:${n}${i?`:recursive`:``}`);return nr(await u.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/mode`,{method:`PATCH`,headers:{...c,"X-SSHC-Action":a},body:JSON.stringify({path:t,mode:n,expectedRevision:r,recursive:i})}))}};function or(e){return`sshc-sftp-${e}.part`}function sr(){return typeof globalThis.navigator?.storage?.getDirectory==`function`?globalThis.navigator.storage.getDirectory():null}var cr=class{sinks=new Map;get(e){return this.sinks.get(e)}async open(e){let t=this.sinks.get(e.id);if(t!==void 0)return t;try{let t=await sr();if(t===null)return null;let n=or(e.id),r=await t.getFileHandle(n,{create:!0}),i=await r.createWritable({keepExistingData:!0}),a=(await r.getFile()).size,o=a<0||e.totalBytes>=0&&a>e.totalBytes||a!==e.transferredBytes&&e.downloadRevision===``;o&&await i.truncate(0);let s=o?0:a;await i.seek(s);let c={root:t,name:n,handle:r,writer:i,reset:o,position:s};return this.sinks.set(e.id,c),c}catch{return null}}markReset(e){let t=this.sinks.get(e);t!==void 0&&(t.reset=!0)}release(e){this.sinks.delete(e)}async discard(e){let t=this.sinks.get(e);if(this.sinks.delete(e),t!==void 0){await t.writer.close().catch(()=>void 0),await t.root.removeEntry(t.name).catch(()=>void 0);return}try{await(await sr())?.removeEntry(or(e)).catch(()=>void 0)}catch{}}async removeOrphans(e){try{let t=await sr();if(t===null)return;let n=t.values();for await(let r of n){let n=/^sshc-sftp-(.+)\.part$/.exec(r.name)?.[1];n!==void 0&&!e.has(n)&&await t.removeEntry(r.name).catch(()=>void 0)}}catch{}}async checkpoint(e){if(await e.writer.close(),(await e.handle.getFile()).size!==e.position)throw Error(`sftp_download_checkpoint_failed`);e.writer=await e.handle.createWritable({keepExistingData:!0}),await e.writer.seek(e.position)}},lr=64<<20,ur=8<<20,dr=class{api;context;chunks=new Map;sinks=new cr;constructor(e,t){this.api=e,this.context=t}prepare(e){this.chunks.set(e,[])}restart(e){this.chunks.set(e,[]),this.sinks.markReset(e)}async discard(e){this.chunks.delete(e),await this.sinks.discard(e)}removeOrphans(e){return this.sinks.removeOrphans(e)}async run(e){let{ledger:t}=this.context,n=t.find(e);if(n===void 0)return;let r=await this.sinks.open(n),i=this.chunks.get(e)??[];this.chunks.set(e,i);let a=i.reduce((e,t)=>e+t.byteLength,0);if(r!==null&&r.position!==n.transferredBytes&&n.downloadRevision!==``)try{await this.api.checkpointDownload(e,r.position,n.downloadRevision),t.replace(e,{transferredBytes:r.position}),n=t.find(e)}catch{await r.writer.truncate(0),await r.writer.seek(0),r.position=0,r.reset=!0}if((r===null&&n.transferredBytes>0&&(a!==n.transferredBytes||n.downloadRevision===``)||r?.reset===!0)&&(i.length=0,a=0,r!==null&&(r.reset=!1),t.replace(e,{transferredBytes:0,downloadRevision:``,bytesPerSecond:0,remainingSeconds:-1}),await this.api.updateTransfer(e,`progress`,{transferredBytes:0,resetProgress:!0}),n=t.find(e),n===void 0))return;let o=r!==null&&n.kind===`file`&&n.downloadRevision!==``&&n.totalBytes>=0&&r.position===n.totalBytes,s=!o;if(o)try{await this.api.verifyDownload(n.alias,e,n.remotePath,n.downloadRevision),await this.api.checkpointDownload(e,r.position,n.downloadRevision),t.replace(e,{transferredBytes:r.position}),n=t.find(e)}catch{await r.writer.truncate(0),await r.writer.seek(0),r.position=0,await this.sinks.checkpoint(r),t.replace(e,{transferredBytes:0,downloadRevision:``,bytesPerSecond:0,remainingSeconds:-1}),await this.api.updateTransfer(e,`progress`,{transferredBytes:0,resetProgress:!0}),n=t.find(e),s=!0}if(s&&(a=await this.stream(e,r,i,a)),n=t.find(e),n===void 0||n.status!==`running`)return;if(r!==null){await r.writer.close(),this.sinks.release(e);let t=await r.handle.getFile();await this.api.saveDownload(n.remotePath,n.kind===`folder`,[t]),globalThis.setTimeout(()=>{r.root.removeEntry(r.name).catch(()=>void 0)},3e4)}else await this.api.saveDownload(n.remotePath,n.kind===`folder`,i.map(e=>new Uint8Array(e)));let c=await this.api.updateTransfer(e,`complete`);this.chunks.delete(e),t.replaceServer(c),t.notify(c)}async stream(e,t,n,r){let{ledger:i}=this.context,a=r,o=0,s=i.find(e)?.downloadRevision??``,c=t===null?a:t.position,l=0,u=null,d=t=>t??u??i.find(e)?.totalBytes??-1,f=async n=>{if(s===``)throw Error(`download_revision_missing`);t!==null&&await this.sinks.checkpoint(t);let r=await this.api.checkpointDownload(e,c,s);l=0,i.find(e)!==void 0&&this.context.progress(e,c,n??(r.totalBytes>=0?r.totalBytes:d(null)))};for(;;){let r=i.find(e);if(r===void 0||r.status!==`running`)return a;let p=this.context.arm(e);try{return await this.api.streamDownload(r.alias,e,r.remotePath,r.kind===`folder`,r.transferredBytes,{...r.downloadRevision===``?{}:{revision:r.downloadRevision},signal:p.signal,onRevision:t=>{s=t,i.replace(e,{downloadRevision:t})},onReset:async r=>{n.length=0,a=0,c=0,l=0,t!==null&&(await t.writer.truncate(0),await t.writer.seek(0),t.position=0,await this.sinks.checkpoint(t));let o=r??i.find(e)?.totalBytes??-1;i.replace(e,{transferredBytes:0,totalBytes:o,bytesPerSecond:0,remainingSeconds:-1})},onChunk:async(r,o)=>{if(s===``)throw Error(`download_revision_missing`);if(u=o,t!==null)await t.writer.write(new Uint8Array(r)),t.position+=r.byteLength,c=t.position;else{if(a+r.byteLength>lr)throw Error(`sftp_download_storage_unsupported`);n.push(r),a+=r.byteLength,c=a}if(l+=r.byteLength,l>=ur){await f(o);return}i.find(e)!==void 0&&this.context.progress(e,c,d(o))}}),l>0&&await f(u),a}catch(t){let n=i.find(e);if(n===void 0||n.status!==`running`||p.signal.aborted||n.kind===`folder`||o>=2)throw t;l>0&&await f(u),o+=1}}}},fr=class{jobs=[];notices=[];listeners=new Set;noticeListeners=new Set;mutationGeneration=0;snapshot(){return this.jobs}noticeSnapshot(){return this.notices}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}subscribeNotices(e){return this.noticeListeners.add(e),()=>this.noticeListeners.delete(e)}find(e){return this.jobs.find(t=>t.id===e)}replace(e,t){this.commit(this.jobs.map(n=>n.id===e?{...n,...t}:n))}replaceServer(e){this.mutationGeneration+=1,this.commit(this.jobs.some(t=>t.id===e.id)?this.jobs.map(t=>t.id===e.id?e:t):[...this.jobs,e])}generation(){return this.mutationGeneration}replaceAllServer(e){this.mutationGeneration+=1,this.commit(e)}adoptListing(e,t){return t===this.mutationGeneration?(this.commit(e),!0):!1}commit(e){this.jobs=e;for(let e of this.listeners)e()}notify(e){if(e.status!==`completed`&&e.status!==`failed`)return;let t={id:`${e.id}:${e.status}:${e.attempt}`,jobId:e.id,status:e.status,name:e.name,direction:e.direction,problem:e.problem};if(!this.notices.some(e=>e.id===t.id)){this.notices=[...this.notices.slice(-7),t],Zn(e.status);for(let e of this.noticeListeners)e()}}dismissNotice(e){this.notices=this.notices.filter(t=>t.id!==e);for(let e of this.noticeListeners)e()}},pr=class{now;samples=new Map;constructor(e){this.now=e}start(e,t){this.samples.set(e,{at:this.now(),bytes:t})}measure(e,t,n){let r=this.now(),i=this.samples.get(e.id)??{at:r,bytes:e.transferredBytes},a=Math.max((r-i.at)/1e3,0),o=e.bytesPerSecond;if(a>0){let n=Math.max(0,t-i.bytes)/a;o=o===0?n:o*.65+n*.35,this.samples.set(e.id,{at:r,bytes:t})}let s=n>=0?n:e.totalBytes,c=s>=0&&o>0?Math.max(0,Math.round((s-t)/o)):-1;return{transferredBytes:t,totalBytes:s,bytesPerSecond:o,remainingSeconds:c}}},mr=1<<20;async function hr(e,t,n=()=>!0){let r=[];for(let i=0;ii.set(e,8+t*32));let o=new Uint8Array(await globalThis.crypto.subtle.digest(`SHA-256`,i));if(t?.aborted||!n())throw new DOMException(`Transfer interrupted`,`AbortError`);return`tree-sha256:${[...o].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}async function gr(e){let t;for(let n=0;n<3;n+=1)try{return await e()}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;t=e,n<2&&await new Promise(e=>globalThis.setTimeout(e,250*2**n))}throw t}var _r=class{api;context;files=new Map;constructor(e,t){this.api=e,this.context=t}has(e){return this.files.has(e)}get(e){return this.files.get(e)}attach(e,t){this.files.set(e,t)}detach(e){this.files.delete(e)}async run(e,t){let{ledger:n}=this.context,r=this.files.get(e),i=n.find(e);if(r===void 0||i===void 0)return;let a=await this.api.startUpload(i.alias,e,i.remotePath,i.totalBytes,t);if(n.replace(e,{transferredBytes:a.offset,expectedRevision:a.expectedRevision}),a.parallelism>1){await this.runParallel(e,r,a,t);return}let o=a.offset;for(;othis.api.appendUpload(i.alias,e,i.remotePath,o,r.size,r.slice(o,a),t.signal))).offset,this.context.progress(e,o,r.size)}i=n.find(e),!(i===void 0||i.status!==`running`)&&await this.complete(e,i.expectedRevision,t)}async runParallel(e,t,n,r){let{ledger:i}=this.context,a=[];for(let e=0;ee>=t.offset&&e+r<=t.offset+t.size)||a.push({offset:e,size:r})}let o=this.context.arm(e),s=0;await Promise.all(Array.from({length:Math.min(n.parallelism,a.length)},async()=>{for(;sthis.api.appendUploadRange(r.alias,e,r.remotePath,n.offset,t.size,t.slice(n.offset,n.offset+n.size),o.signal)),l=i.find(e)?.transferredBytes??0;this.context.progress(e,Math.max(l,c.offset),t.size)}}));let c=i.find(e);c===void 0||c.status!==`running`||await this.complete(e,n.expectedRevision,r)}async complete(e,t,n){let{ledger:r}=this.context,i=r.find(e);await this.api.completeUpload(i.alias,e,i.remotePath,i.totalBytes,t,n),this.files.delete(e),await this.context.reconcile();let a=r.find(e);a!==void 0&&r.notify(a)}},vr=200,yr=100<<20,br=4,xr=32<<20,Sr=500;function Cr(e){return globalThis.crypto?.randomUUID?.()??`${e}_${Date.now()}_${Math.random().toString(36).slice(2)}`}function wr(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Tr(e){return(i(e)||(e instanceof Error?e.message:``))===`sftp_transfer_not_found`}var Er=new class{api;now;ledger=new fr;uploads;downloads;speed;controllers=new Map;inFlight=new Set;uploadAdmissions=new Set;controlOperations=new Map;retryAfter=new Map;active=0;maxConcurrent;clearCompletedAfter=0;processingStopped=!1;largeFileThreshold=yr;largeFileParallelism=br;largeFileChunkBytes=xr;constructor(e=ar,t=2,n=()=>Date.now()){this.api=e,this.now=n,this.maxConcurrent=t,this.speed=new pr(n);let r={ledger:this.ledger,arm:e=>{let t=new AbortController;return this.controllers.set(e,t),t},progress:(e,t,n)=>this.recordProgress(e,t,n),reconcile:()=>this.reconcile()};this.uploads=new _r(e,r),this.downloads=new dr(e,r)}getSnapshot=()=>this.ledger.snapshot();getNoticeSnapshot=()=>this.ledger.noticeSnapshot();getMaxConcurrent=()=>this.maxConcurrent;getClearCompletedAfter=()=>this.clearCompletedAfter;getProcessingStopped=()=>this.processingStopped;getLargeFileThreshold=()=>this.largeFileThreshold;getLargeFileParallelism=()=>this.largeFileParallelism;getLargeFileChunkBytes=()=>this.largeFileChunkBytes;hasUploadSource=e=>this.uploads.has(e);subscribe=e=>this.ledger.subscribe(e);subscribeNotices=e=>this.ledger.subscribeNotices(e);async reconcile(){let e=this.ledger.generation(),t=await this.api.listTransfers(),n=new Set(t.jobs.map(e=>e.id));if(t.jobs.length>vr||n.size!==t.jobs.length)throw Error(`sftp_transfer_limit`);this.adoptQueue(t,e)&&(await this.downloads.removeOrphans(new Set(t.jobs.filter(e=>![`completed`,`cancelled`].includes(e.status)).map(e=>e.id))),this.kick())}async applySettings(e,t,n,r,i,a){let o=await this.api.updateTransferSettings({maxConcurrent:e,clearCompletedAfterSeconds:t,processingStopped:n,largeFileThresholdBytes:r,largeFileParallelism:i,largeFileChunkBytes:a});this.adoptQueue(o),this.kick()}async move(e,t){let n=this.ledger.find(e);n===void 0||n.status!==`queued`||this.adoptQueue(await this.api.moveTransfer(e,t))}reserveUploads(e){let t=this.pendingUploadCount(e);if(this.jobs.length+this.reservedUploads()+t>vr)throw Error(`sftp_transfer_limit`);let n=!1,r={count:t,release:()=>{n||(n=!0,this.uploadAdmissions.delete(r))}};return this.uploadAdmissions.add(r),r}async addUploads(e,t,n){let r=e.filter(e=>this.reattachable(e)===void 0),i=this.reservedUploads(n);if(n!==void 0&&(!this.uploadAdmissions.has(n)||r.length>n.count)||this.jobs.length+i+r.length>vr)throw Error(`sftp_transfer_limit`);n?.release();let a=t?.id??Cr(`batch`),o=t?.name??e[0]?.localName??`upload`,s=t?.kind??(e.length>1?`folder`:`file`);for(let t of e){let e=this.reattachable(t);if(e!==void 0){await this.reattachUpload(e,t.file);continue}let n=Cr(`transfer`),r=await this.api.createTransfer({id:n,batchId:a,batchName:o,batchKind:s,alias:t.alias,direction:`upload`,kind:`file`,name:t.localName,remotePath:t.remotePath,totalBytes:t.file.size,lastModified:t.file.lastModified,largeFileThresholdBytes:this.largeFileThreshold,largeFileParallelism:this.largeFileParallelism,largeFileChunkBytes:this.largeFileChunkBytes});this.uploads.attach(n,t.file),this.ledger.commit([...this.jobs,r])}return this.kick(),a}async addDownload(e,t,n,r){if(this.jobs.length+this.reservedUploads()>=vr)throw Error(`sftp_transfer_limit`);let i=Cr(`transfer`),a=wr(t),o=await this.api.createTransfer({id:i,batchId:Cr(`batch`),batchName:a,batchKind:n,alias:e,direction:`download`,kind:n,name:a,remotePath:t,totalBytes:r,lastModified:0});return this.downloads.prepare(i),this.ledger.commit([...this.jobs,o]),this.kick(),i}async addRemoteTransfers(e,t){if(e.length===0)return[];if(this.jobs.length+this.reservedUploads()+e.length>vr)throw Error(`sftp_transfer_limit`);let n=Cr(`remote_batch`),r=e.length===1?e[0].name:`${e.length} items`,i=e.length===1?e[0].kind:`folder`,a=[];for(let o of e){let e=Cr(`remote`),s=await this.api.createTransfer({id:e,batchId:n,batchName:r,batchKind:i,alias:o.targetAlias,sourceAlias:o.sourceAlias,sourcePath:o.sourcePath,operation:t,overwrite:o.overwrite===!0,direction:`remote`,kind:o.kind,name:o.name,remotePath:o.targetPath,totalBytes:o.totalBytes,lastModified:0});this.ledger.commit([...this.jobs,s]),a.push(e)}return await this.reconcile(),a}async pause(e){let t=this.ledger.find(e);if(t===void 0||!t.allowedActions.includes(`pause`))return;this.controllers.get(e)?.abort();let n=this.api.updateTransfer(e,`pause`).then(e=>{this.ledger.replaceServer(e)});this.trackControl(e,n),await n}async resume(e){let t=this.ledger.find(e);if(t===void 0||!t.allowedActions.includes(`resume`)||!this.networkReady(t))return;let n=t.direction===`download`&&t.kind===`folder`;n&&(this.downloads.restart(e),this.ledger.replace(e,{transferredBytes:0,bytesPerSecond:0,remainingSeconds:-1}));let r=await this.api.updateTransfer(e,`resume`,{resetProgress:n});this.ledger.replaceServer(r),this.kick()}async retry(e){let t=this.ledger.find(e);if(t===void 0||!t.allowedActions.includes(`retry`)||!this.networkReady(t))return;let n=t.direction===`download`&&t.kind===`folder`;n&&this.downloads.restart(e);let r=await this.api.updateTransfer(e,`retry`,{resetProgress:n});this.ledger.replaceServer(r),this.kick()}async retryFailed(e){await Promise.all(this.jobs.filter(t=>t.batchId===e&&t.status===`failed`).map(e=>this.retry(e.id)))}async pauseAll(){await Promise.all([...this.jobs].filter(e=>e.allowedActions.includes(`pause`)).map(e=>this.pause(e.id)))}async resumeAll(){await Promise.all([...this.jobs].filter(e=>e.allowedActions.includes(`resume`)&&e.status!==`needs_overwrite`).map(e=>this.resume(e.id)))}async cancelAll(){let e;for(let t of[...this.jobs])if(this.ledger.find(t.id)?.allowedActions.includes(`cancel`))try{await this.cancel(t.id)}catch(t){e??=t}if(e!==void 0)throw e}async overwrite(e){let t=this.ledger.find(e);t===void 0||t.status!==`needs_overwrite`||await this.resume(e)}async cancel(e){let t=this.ledger.find(e);if(!(t===void 0||!t.allowedActions.includes(`cancel`))){if(this.controllers.get(e)?.abort(),t.direction===`upload`){try{await this.api.cancelUpload(t.alias,e,t.remotePath)}catch(t){if(Tr(t)){this.uploads.detach(e),await this.reconcile();return}throw await this.reconcile().catch(()=>void 0),t}this.uploads.detach(e)}else{try{let t=await this.api.updateTransfer(e,`cancel`);this.ledger.replaceServer(t)}catch(e){if(!Tr(e))throw e}await this.downloads.discard(e)}await this.reconcile()}}async clearFinished(){let e=this.jobs.filter(e=>e.status===`completed`||e.status===`cancelled`).map(e=>e.id);await this.api.clearFinishedTransfers(),this.ledger.commit(this.jobs.filter(e=>e.status!==`completed`&&e.status!==`cancelled`));for(let t of e)this.downloads.discard(t)}async remove(e){let t=this.ledger.find(e);t===void 0||!t.allowedActions.includes(`remove`)||(await this.api.removeTransfer(e),this.uploads.detach(e),await this.downloads.discard(e),this.ledger.commit(this.jobs.filter(t=>t.id!==e)))}async clearFailed(){let e;for(let t of[...this.jobs])if(!(t.status!==`failed`||!t.allowedActions.includes(`remove`)))try{await this.remove(t.id)}catch(t){e??=t}if(e!==void 0)throw e}dismissNotice(e){this.ledger.dismissNotice(e)}get jobs(){return this.ledger.snapshot()}adoptQueue(e,t){return this.maxConcurrent=e.maxConcurrent,this.clearCompletedAfter=e.clearCompletedAfterSeconds??0,this.processingStopped=e.processingStopped===!0,this.largeFileThreshold=e.largeFileThresholdBytes??yr,this.largeFileParallelism=e.largeFileParallelism??br,this.largeFileChunkBytes=e.largeFileChunkBytes??xr,t===void 0?(this.ledger.replaceAllServer(e.jobs),!0):this.ledger.adoptListing(e.jobs,t)}networkReady(e){return e.direction===`remote`||e.direction===`download`||this.uploads.has(e.id)}reattachable(e){return this.jobs.find(t=>t.direction===`upload`&&!this.uploads.has(t.id)&&[`queued`,`running`,`paused`,`reattach`,`failed`,`needs_overwrite`].includes(t.status)&&t.alias===e.alias&&t.remotePath===e.remotePath&&t.totalBytes===e.file.size&&t.lastModified===e.file.lastModified)}async reattachUpload(e,t){this.uploads.attach(e.id,t),e.status===`running`?(await this.api.updateTransfer(e.id,`pause`),this.ledger.replaceServer(await this.api.updateTransfer(e.id,`resume`))):e.status===`paused`||e.status===`reattach`?this.ledger.replaceServer(await this.api.updateTransfer(e.id,`resume`)):e.status===`failed`&&this.ledger.replaceServer(await this.api.updateTransfer(e.id,`retry`))}pendingUploadCount(e){return e.filter(e=>this.reattachable(e)===void 0).length}reservedUploads(e){return[...this.uploadAdmissions].reduce((t,n)=>t+(n===e?0:n.count),0)}kick(){if(!this.processingStopped)for(;this.activee.status===`queued`&&e.direction!==`remote`&&!this.inFlight.has(e.id)&&(this.retryAfter.get(e.id)??0)<=this.now()&&this.networkReady(e));if(e===void 0)return;this.active+=1,this.inFlight.add(e.id),this.speed.start(e.id,e.transferredBytes),this.run(e.id).finally(()=>{--this.active,this.inFlight.delete(e.id),this.controllers.delete(e.id),this.kick()})}}async run(e){let t=this.ledger.find(e);if(t!==void 0)try{let n=``;if(t.direction===`upload`){let r=this.uploads.get(e);if(r===void 0)return;let i=new AbortController;this.controllers.set(e,i),n=await hr(r,i.signal,()=>this.ledger.find(e)?.status===`queued`);let a=this.ledger.find(e);if(a===void 0||a.status!==`queued`)return;if(a.sourceFingerprint&&a.sourceFingerprint!==n)throw Error(`sftp_upload_source_changed`);t=this.ledger.find(e)}if(!await this.prepareServer(t)||(t=this.ledger.find(e),t===void 0||t.status!==`running`))return;t.direction===`upload`?await this.uploads.run(e,n):await this.downloads.run(e)}catch(t){await this.settleFailure(e,t)}}async settleFailure(e,t){let n=this.ledger.find(e);if(n===void 0||n.status===`paused`||n.status===`cancelled`||t instanceof DOMException&&t.name===`AbortError`)return;let r=i(t)||(t instanceof Error?t.message:`sftp_failed`);if(r===`sftp_transfer_limit`||r===`sftp_transfer_state`){this.retryAfter.set(e,this.now()+Sr),await this.reconcile().catch(()=>void 0),globalThis.setTimeout(()=>{this.retryAfter.delete(e),this.kick()},Sr);return}if(r===`sftp_exists`&&n.direction===`upload`&&!n.overwrite){let t=await this.api.updateTransfer(e,`needs_overwrite`).catch(()=>null);t!==null&&this.ledger.replaceServer(t);return}let a=await this.api.updateTransfer(e,`fail`,{problem:r}).catch(()=>null);a===null?await this.reconcile().catch(()=>void 0):(this.ledger.replaceServer(a),this.ledger.notify(a))}async prepareServer(e){if(await this.controlOperations.get(e.id),this.ledger.find(e.id)?.status!==`queued`)return!1;let t=await this.api.updateTransfer(e.id,`start`);return this.retryAfter.delete(e.id),this.ledger.replaceServer(t),t.status===`running`}recordProgress(e,t,n){let r=this.ledger.find(e);r!==void 0&&this.ledger.replace(e,this.speed.measure(r,t,n))}trackControl(e,t){this.controlOperations.set(e,t);let n=()=>{this.controlOperations.get(e)===t&&this.controlOperations.delete(e)};t.then(n,n)}};function Dr({navigationRef:e,navigationId:t,version:n,state:r,navigationOpen:i,mobileLayout:a=!1,desktopWidth:o,onDesktopWidthChange:s,startSections:c,section:l,sectionIcons:u,sectionLabels:d,onNavigate:f,consoles:p,orderedConsoles:m,activeConsole:h,liveWorkspace:g,onRenameWorkspace:_,unreadBySession:v,onShowConsole:y,onDuplicateConsole:b,onReorderConsoles:x,localShellProfiles:S=[],onOpenShell:w,aliases:T=[],hosts:E=[],onConnect:D,onOpenCommandPalette:O}){let k=C(),A=ye(),ee=(0,P.useSyncExternalStore)(Er.subscribe,Er.getSnapshot).filter(e=>[`queued`,`running`,`paused`,`reattach`,`needs_overwrite`].includes(e.status)).length,j=e=>(0,z.jsx)(kr,{name:e,section:l,sectionIcons:u,sectionLabels:d,onNavigate:f,attention:e===`Files`&&ee>0,attentionLabel:e===`Files`&&ee>0?k(`sftp.activeTransfers`,{count:ee}):void 0});return(0,z.jsxs)(`nav`,{ref:e,id:t,"aria-label":k(`shell.primaryNavigation`),"aria-hidden":a&&!i?!0:void 0,inert:a&&!i,"data-navigation-open":i,"data-app-navigation":!0,className:`fixed inset-y-0 left-0 z-30 flex min-h-0 w-72 max-w-[calc(100vw-2rem)] flex-col overflow-hidden border-r border-line bg-sidebar p-2 transition-transform motion-reduce:transition-none md:relative md:inset-auto md:z-auto md:flex md:w-auto md:max-w-none md:translate-x-0 md:shadow-none ${i?`translate-x-0 shadow-2xl`:`-translate-x-full shadow-none`}`,children:[(0,z.jsxs)(`div`,{"data-navigation-heading":!0,className:`mb-2 flex h-10 shrink-0 items-center gap-2 px-1`,children:[(0,z.jsx)(Bn,{className:`h-6 w-6`}),(0,z.jsx)(`h1`,{className:`font-mono text-sm font-semibold tracking-tight`,children:k(`shell.title`)}),(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`h-4 w-px bg-line`}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-semibold`,children:k(l===null?`shell.pageNotFound`:d[l])})]}),(0,z.jsxs)(`button`,{type:`button`,onClick:O,title:`${k(`palette.open`)} (${A.palette.join(` / `)})`,className:`mb-3 flex h-10 shrink-0 items-center gap-2 rounded-md border border-line bg-control px-2.5 text-sm text-ink-muted transition-colors hover:border-accent/60 hover:text-ink md:h-9 md:text-xs`,children:[(0,z.jsx)(B,{name:`search`,className:`h-4 w-4 shrink-0`}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:k(`palette.open`)}),(0,z.jsx)(`kbd`,{"aria-hidden":`true`,className:`hidden shrink-0 rounded border border-line px-1 py-0.5 font-mono text-[10px] text-ink-faint md:block`,children:A.palette[0]})]}),(0,z.jsx)(`div`,{className:`shrink-0`,children:(0,z.jsx)(Ar,{label:k(`shell.navStart`),children:c.map(e=>(0,z.jsx)(`li`,{children:j(e)},e))})}),(0,z.jsx)(`div`,{className:`mb-1 mt-1 shrink-0 border-b border-line pb-2`,children:j(`Menu`)}),(0,z.jsxs)(`div`,{"data-navigation-scroll":!0,className:`min-h-0 flex-1 overflow-y-auto pr-0.5 pt-2`,children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`block px-2 pb-1 text-[10px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:k(`shell.sessions`)}),(0,z.jsx)(Tn,{sessions:m,selected:l===`Terminal`?h:null,workspace:g,onRenameWorkspace:_,unreadBySession:v,maxSessions:p.maxSessions,busy:p.busy,problem:p.problem,onSelect:y,onClose:e=>void p.close(e),onRename:(e,t)=>p.rename(e,t),onUnpinTitle:e=>p.unpinTitle?.(e)??Promise.resolve(!1),onDuplicate:b,onReorder:x,localShellProfiles:S,onOpenShell:w,aliases:T,hosts:E,...D===void 0?{}:{onConnect:D}})]}),(0,z.jsxs)(`div`,{className:`shrink-0 pt-1 md:pt-2`,children:[(0,z.jsx)(`p`,{role:`status`,"data-session-status":!0,className:`sr-only`,children:r===`ready`?k(`shell.active`,{version:n}):k(`shell.starting`)}),(0,z.jsx)(zn,{current:n,indicator:(0,z.jsx)(`span`,{"aria-hidden":`true`,"data-session-status-badge":!0,title:r===`ready`?k(`shell.active`,{version:n}):k(`shell.starting`),className:`size-1.5 shrink-0 rounded-full shadow-[0_0_0_3px_color-mix(in_srgb,var(--ui-live)_14%,transparent)] ${r===`ready`?`bg-live`:`bg-ink-faint`}`})})]}),(0,z.jsx)(Or,{width:o,onWidthChange:s})]})}function Or({width:e,onWidthChange:t}){return(0,z.jsx)(Vn,{label:C()(`shell.navigationResize`),width:e,minimum:192,maximum:384,onWidthChange:e=>t(Wn(e))})}function kr({name:e,section:t,sectionIcons:n,sectionLabels:r,onNavigate:i,attention:a=!1,attentionLabel:o}){let s=C(),c=t===e;return(0,z.jsxs)(`a`,{href:At(e),"aria-current":c?`page`:void 0,onClick:t=>{i(t,e)},className:`group relative flex min-h-10 w-full items-center gap-2 overflow-hidden rounded-sm px-2 py-1 text-left text-sm transition-colors md:my-px md:min-h-8 md:gap-2.5 md:py-0.5 ${c?`bg-select-fill font-semibold text-accent`:`font-medium text-ink-muted hover:bg-hover hover:text-ink`}`,children:[c?(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-y-1 left-0 w-0.5 bg-accent`}):null,(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-6 w-6 shrink-0 place-items-center transition-colors md:h-5 md:w-5 ${c?`text-accent`:`text-ink-muted group-hover:text-ink`}`,children:(0,z.jsx)(B,{name:n[e],className:`h-4 w-4`})}),(0,z.jsx)(`span`,{className:`min-w-0 grow truncate`,children:s(r[e])}),a?(0,z.jsx)(`span`,{"aria-hidden":`true`,"data-sftp-transfer-indicator":!0,title:o,className:`mr-1 size-1.5 shrink-0 rounded-full bg-notice-ink shadow-[0_0_0_3px_color-mix(in_srgb,var(--ui-notice-ink)_12%,transparent)]`}):null]})}function Ar({label:e,children:t}){return(0,z.jsxs)(`div`,{className:`mb-1 md:mb-1.5`,children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`block px-2 pb-0.5 pt-0.5 text-[10px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:e}),(0,z.jsx)(`ul`,{"aria-label":e,children:t})]})}var jr=`__sshcNavigationPoint`;function Mr(e){if(typeof e!=`object`||!e)return null;let t=e[jr];return typeof t==`number`&&Number.isSafeInteger(t)?t:null}function Nr(e,t){return{...typeof e==`object`&&e&&!Array.isArray(e)?e:{},[jr]:t}}function Pr(){return{pathname:window.location.pathname,search:window.location.search}}function Fr(){let[e,t]=(0,P.useState)(Pr),n=(0,P.useRef)(e),r=(0,P.useRef)(null),i=(0,P.useRef)(null),a=(0,P.useRef)(null),o=(0,P.useMemo)(()=>jt(e.pathname),[e.pathname]),s=(0,P.useCallback)(e=>{n.current=e,t(e)},[]),c=(0,P.useCallback)(e=>{r.current=e},[]);return(0,P.useEffect)(()=>{let e=Mr(window.history.state);e===null&&(e=0,window.history.replaceState(Nr(window.history.state,e),``)),i.current=e;let t=()=>{let e=Pr(),t=Mr(window.history.state);if(a.current!==null&&t===a.current){i.current=t,a.current=null;return}let o=jt(e.pathname),c=o.kind===`section`&&!o.canonical?{pathname:o.canonicalPath,search:e.search}:e;if(r.current!==null&&!r.current(c)){let e=n.current,r=i.current;if(r!==null&&t!==null&&r!==t){a.current=r,window.history.go(r-t);return}window.history.replaceState(Nr(window.history.state,r??0),``,`${e.pathname}${e.search}`);return}if(t!==null&&(i.current=t),o.kind===`section`&&!o.canonical){window.history.replaceState(Nr(window.history.state,i.current??0),``,`${o.canonicalPath}${e.search}`),s({pathname:o.canonicalPath,search:e.search});return}s(e)};return t(),window.addEventListener(`popstate`,t),()=>window.removeEventListener(`popstate`,t)},[s]),{route:o,location:e,navigate:(0,P.useCallback)(e=>{let t=At(e),n={pathname:t,search:``};if(r.current!==null&&!r.current(n))return!1;if(window.location.pathname===t)(window.location.search!==``||window.location.hash!==``)&&window.history.replaceState(Nr(window.history.state,i.current??0),``,t);else{let e=(i.current??0)+1;window.history.pushState(Nr(null,e),``,t),i.current=e}return s(n),!0},[s]),navigateLocation:(0,P.useCallback)((e,t={})=>{let n=new URL(e,window.location.origin);if(n.origin!==window.location.origin)throw Error(`external navigation is not allowed`);let a={pathname:n.pathname,search:n.search};if(r.current!==null&&!r.current(a))return!1;let o=`${n.pathname}${n.search}`;if(o===`${window.location.pathname}${window.location.search}`)return!0;if(t.replace===!0)window.history.replaceState(Nr(window.history.state,i.current??0),``,o);else{let e=(i.current??0)+1;window.history.pushState(Nr(null,e),``,o),i.current=e}return s(a),!0},[s]),setNavigationBlocker:c}}var Ir=[`none`,`gentle`,`bell`,`pulse`],Lr=`sshc.terminal-notification-sound.v1`,Rr=new WeakMap,zr={sound:`bell`,volume:60};function Br(e){let t=e.Notification;return typeof t==`function`&&typeof t.requestPermission==`function`?t:null}function Vr(e=window){return Br(e)?.permission??`unsupported`}async function Hr(e=window){let t=Br(e);return t===null?`unsupported`:t.permission==="default"?t.requestPermission():t.permission}function Ur(e,t=window){let n=Br(t);if(n===null||n.permission!==`granted`)return!1;try{let r=new n(e.title,{body:e.body,tag:e.tag});return e.onClick!==void 0&&(r.onclick=()=>{try{t.focus()}catch{}e.onClick?.(),r.close()}),!0}catch{return!1}}function Wr(e){return typeof e==`string`&&Ir.includes(e)}function Gr(e=window){try{let t=JSON.parse(e.localStorage.getItem(Lr)??`null`);if(typeof t!=`object`||!t)return zr;let n=t,r=typeof n.volume==`number`&&Number.isFinite(n.volume)?Math.max(0,Math.min(100,Math.round(n.volume))):zr.volume;return{sound:Wr(n.sound)?n.sound:zr.sound,volume:r}}catch{return zr}}function Kr(e,t=window){try{t.localStorage.setItem(Lr,JSON.stringify(e))}catch{}}function qr(e){let t=Rr.get(e);if(t!==void 0&&t.state!==`closed`)return t;let n=e.AudioContext;if(n===void 0)return null;try{let t=new n;return Rr.set(e,t),t}catch{return null}}function Jr(e=window){let t=qr(e);return t===null?!1:(t.state===`suspended`&&t.resume().catch(()=>void 0),!0)}function Yr(e,t,n){if(n===void 0||(t.notificationVersion??0)<=n)return null;let r=t.lastNotification;if(r===void 0)return null;let i=fn(t),a=t.kind===`ssh`?t.alias:void 0;return{title:a===void 0||a===i?i:`${i}(${a})`,body:r.title!==``&&r.body!==``?`${r.title}\n${r.body}`:r.title||r.body||e(`terminal.notificationFallback`)}}function Xr(e=Gr(),t=window){let n=e.sound;if(n===`none`||e.volume<=0)return!1;let r=qr(t);if(r===null)return!1;let i=()=>{let t=r.createGain(),i=n===`bell`?{type:`triangle`,frequencies:[880,1174],duration:.32,peak:.12}:n===`pulse`?{type:`sine`,frequencies:[660,660],duration:.24,peak:.1}:{type:`sine`,frequencies:[520,660],duration:.22,peak:.07},a=Math.max(1e-4,i.peak*e.volume/100);t.gain.setValueAtTime(1e-4,r.currentTime),t.gain.exponentialRampToValueAtTime(a,r.currentTime+.015),t.gain.exponentialRampToValueAtTime(1e-4,r.currentTime+i.duration),t.connect(r.destination),i.frequencies.forEach((e,n)=>{let a=r.createOscillator();a.type=i.type,a.frequency.value=e,a.connect(t),a.start(r.currentTime+n*i.duration/2),a.stop(r.currentTime+i.duration)})};try{return r.state===`suspended`?r.resume().then(i).catch(()=>void 0):i(),!0}catch{return!1}}function Zr(e,t,n,r){let i=(0,P.useRef)(new Map),a=(0,P.useRef)(t),o=(0,P.useRef)(r),[s,c]=(0,P.useState)(()=>new Set);a.current=t,o.current=r,(0,P.useEffect)(()=>{let e=()=>{Jr(),window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`keydown`,e,!0)};return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`keydown`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`keydown`,e,!0)}},[]);let l=(0,P.useCallback)(()=>{let e=a.current;e===null||document.hidden||c(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);return(0,P.useEffect)(()=>(l(),window.addEventListener(`focus`,l),document.addEventListener(`visibilitychange`,l),()=>{window.removeEventListener(`focus`,l),document.removeEventListener(`visibilitychange`,l)}),[t,l]),(0,P.useEffect)(()=>{let t=new Set(e.map(e=>e.id));for(let e of i.current.keys())t.has(e)||i.current.delete(e);for(let t of e){let e=i.current.get(t.id);if(i.current.set(t.id,t.notificationVersion??0),e===void 0)continue;let r=Yr(n,t,e);r!==null&&((document.hidden||t.id!==a.current)&&c(e=>{if(e.has(t.id))return e;let n=new Set(e);return n.add(t.id),n}),document.hidden&&(Xr(),Ur({title:r.title,body:r.body,tag:`sshc-terminal-${t.id}`,onClick:()=>o.current(t.id)})))}c(e=>[...e].every(e=>t.has(e))?e:new Set([...e].filter(e=>t.has(e))))},[e,n]),s}function Qr(e,t,n,r=document.hidden){for(let i of e)t.has(i.id)||(t.add(i.id),r&&Ur({title:`sshc`,body:n(i.status===`completed`?`sftp.notice.completed`:`sftp.notice.failed`,{name:i.name,direction:n(i.direction===`upload`?`sftp.manager.upload`:`sftp.manager.download`),problem:i.problem}),tag:`sshc-transfer-${i.jobId}`}))}function $r(){let e=C(),t=(0,P.useSyncExternalStore)(Er.subscribeNotices,Er.getNoticeSnapshot),n=(0,P.useRef)(new Set);return(0,P.useEffect)(()=>{Qr(t,n.current,e)},[t,e]),t.length===0?null:(0,z.jsx)(`aside`,{className:`pointer-events-none fixed right-4 top-20 z-50 flex w-[min(22rem,calc(100vw-2rem))] flex-col gap-2 md:bottom-4 md:top-auto`,"aria-label":e(`sftp.notice.heading`),"aria-live":`polite`,children:t.map(t=>(0,z.jsx)(`div`,{role:t.status===`failed`?`alert`:`status`,className:`rounded-lg border p-3 shadow-lg ${t.status===`failed`?`border-danger/40 bg-card text-danger`:`border-live/40 bg-card text-ink`}`,children:(0,z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,z.jsx)(`p`,{className:`min-w-0 grow text-sm`,children:e(t.status===`completed`?`sftp.notice.completed`:`sftp.notice.failed`,{name:t.name,direction:e(t.direction===`upload`?`sftp.manager.upload`:`sftp.manager.download`),problem:t.problem})}),(0,z.jsx)(`button`,{type:`button`,className:`pointer-events-auto text-xs text-ink-muted`,"aria-label":e(`sftp.notice.dismiss`),onClick:()=>Er.dismissNotice(t.id),children:`×`})]})},t.id))})}function ei(e){return r(`Snippet`,e)}function ti(e){return r(`SnippetJob`,e)}function ni(e){return r(`SnippetPreview`,e)}var ri={async library(){return r(`SnippetLibrary`,await u.read(`/api/v1/snippets`))},async create(e){return ei(await u.mutate(`/api/v1/snippets`,{method:`POST`,headers:c,body:JSON.stringify(e)}))},async update(e,t){return ei(await u.mutate(`/api/v1/snippets/${encodeURIComponent(e)}`,{method:`PUT`,headers:c,body:JSON.stringify(t)}))},async remove(e){await u.mutate(`/api/v1/snippets/${encodeURIComponent(e)}`,{method:`DELETE`})},async setStartup(e,t,n){await u.mutate(`/api/v1/snippets/startup/${encodeURIComponent(e)}`,{method:`PUT`,headers:c,body:JSON.stringify({snippetId:t,inputs:n})})},async preview(e,t,n){return ni(await u.mutate(`/api/v1/snippets/preview`,{method:`POST`,headers:c,body:JSON.stringify({snippetId:e,aliases:t,inputs:n})}))},async start(e,t,n,r=4){return ti(await u.mutate(`/api/v1/snippets/jobs`,{method:`POST`,headers:{...c,"X-SSHC-Action":e.actionToken},body:JSON.stringify({snippetId:e.snippetId,aliases:t,inputs:n,evidence:e.evidence,concurrency:r})}))},async job(e){return ti(await u.read(`/api/v1/snippets/jobs/${encodeURIComponent(e)}`))},async cancel(e){return ti(await u.mutate(`/api/v1/snippets/jobs/${encodeURIComponent(e)}`,{method:`DELETE`}))}},ii={loading:`text-ink-muted`,empty:`text-ink-muted`,failed:`text-danger`};function ai({tone:e,title:t,detail:n,action:r,icon:i,className:a=``}){return(0,z.jsxs)(`div`,{role:e===`failed`?`alert`:`status`,"aria-busy":e===`loading`,className:`flex min-h-32 flex-col items-center justify-center gap-2 px-4 py-8 text-center ${a}`,children:[i,(0,z.jsx)(`p`,{className:`text-sm ${ii[e]}`,children:t}),n===void 0?null:(0,z.jsx)(`p`,{className:`max-w-prose text-xs text-ink-faint`,children:n}),r]})}var oi=[`Connections`,`Config`,`Groups`,`Keys`,`Known Hosts`,`Remote Keys`,`Diagnostics`,`Passwords`,`Key Passphrases`,`OTP`,`Snippets`,`Settings`,`Sync`,`History`];function si(e,t){let n=t.toLocaleLowerCase().trim().split(/\s+/).filter(Boolean);if(n.length===0)return!0;let r=`${e.label} ${e.detail} ${e.search}`.toLocaleLowerCase();return n.every(e=>r.includes(e))}function ci({open:e,commands:t=[],hosts:n,files:r,sessions:i,unreadBySession:a,sectionLabels:o,onClose:s,onConnect:c,onOpenHostSettings:l,onOpenFile:u,onNavigate:d,onOpenSnippet:f,onOpenSession:p,returnFocusRef:m}){let h=C(),g=(0,P.useRef)(null),[_,v]=(0,P.useState)(``),[y,b]=(0,P.useState)(0),[x,S]=(0,P.useState)([]),[w,T]=(0,P.useState)(!1);(0,P.useEffect)(()=>{if(!e)return;v(``),b(0),window.requestAnimationFrame(()=>g.current?.focus());let t=!0;return T(!0),ri.library().then(e=>{t&&S(e.snippets)}).catch(()=>{t&&S([])}).finally(()=>{t&&T(!1)}),()=>{t=!1}},[e]);let E=(0,P.useMemo)(()=>[...t.map(e=>({id:`command:${e.id}`,kind:`command`,label:e.label,detail:e.detail,search:`${e.search} command action 実行 コマンド 操作`,action:e.run})),...n.map(e=>({id:`host:${e.identity.path}:${e.identity.alias}`,kind:`host`,label:h(`palette.connectHost`,{alias:e.identity.alias}),detail:e.file.path??e.file.absolute,search:`${e.identity.alias} ${e.identity.path} host connect ssh 接続 ホスト`,action:()=>c(e.identity.alias),host:e.identity})),...i.filter(e=>e.exited===void 0).map(e=>{let t=a.has(e.id),n=h(`terminal.connected`),r=e.kind===`ssh`?e.alias??``:h(`terminal.localhost`);return{id:`session:${e.id}`,kind:`session`,label:fn(e),detail:h(`terminal.rowDetail`,{status:n,destination:r}),search:`session terminal console pane セッション ターミナル ${t?`@unread unread notification 未読 通知`:``}`,action:()=>p(e.id)}}),...r.map(e=>({id:`file:${e.file.path??e.file.absolute}`,kind:`file`,label:e.file.path??e.file.absolute,detail:e.file.absolute,search:`file config ssh 設定ファイル ${e.file.path??``}`,action:()=>u(e.file.path??e.file.absolute)})),...x.map(e=>({id:`snippet:${e.id}`,kind:`snippet`,label:e.name,detail:e.command,search:`snippet snippets スニペット ${e.description??``}`,action:()=>f(e.id)})),...oi.map(e=>({id:`setting:${e}`,kind:`setting`,label:h(o[e]),detail:h(`palette.openSection`),search:`${e} settings setting 設定`,action:()=>d(e)}))],[t,r,n,c,d,u,p,f,o,i,x,h,a]),D=(0,P.useMemo)(()=>E.filter(e=>si(e,_)).slice(0,40),[E,_]);if((0,P.useEffect)(()=>{y>=D.length&&b(Math.max(0,D.length-1))},[y,D.length]),!e)return null;async function O(e){s(),await e.action()}function k(e){e.key===`ArrowDown`?(e.preventDefault(),b(e=>D.length===0?0:(e+1)%D.length)):e.key===`ArrowUp`?(e.preventDefault(),b(e=>D.length===0?0:(e-1+D.length)%D.length)):e.key===`Enter`&&D[y]!==void 0&&(e.preventDefault(),O(D[y]))}return(0,z.jsxs)(rn,{labelledBy:`command-palette-heading`,onDismiss:s,closeOnOutside:!0,initialFocusRef:g,...m===void 0?{}:{returnFocusRef:m},placement:`palette`,zIndexClassName:`z-[70]`,panelClassName:`flex max-h-[72vh] w-full max-w-2xl flex-col overflow-hidden rounded-lg`,children:[(0,z.jsx)(`h2`,{id:`command-palette-heading`,className:`sr-only`,children:h(`palette.heading`)}),(0,z.jsxs)(`label`,{className:`flex h-12 shrink-0 items-center gap-2 border-b border-line px-3`,children:[(0,z.jsx)(B,{name:`search`,className:`h-4 w-4 text-ink-muted`}),(0,z.jsx)(`span`,{className:`sr-only`,children:h(`palette.heading`)}),(0,z.jsx)(`input`,{ref:g,type:`search`,"aria-label":h(`palette.heading`),"aria-controls":`command-palette-results`,"aria-activedescendant":D[y]===void 0?void 0:`command-palette-option-${y}`,value:_,onChange:e=>{v(e.target.value),b(0)},onKeyDown:k,placeholder:h(`palette.placeholder`),className:`min-w-0 flex-1 bg-transparent text-sm text-ink outline-none placeholder:text-ink-faint`}),(0,z.jsx)(`kbd`,{className:`border border-line px-1.5 py-0.5 font-mono text-[10px] text-ink-muted`,children:`Esc`})]}),(0,z.jsxs)(`div`,{id:`command-palette-results`,role:`listbox`,"aria-label":h(`palette.results`),className:`min-h-0 overflow-y-auto p-1.5`,children:[D.map((e,t)=>(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsxs)(`button`,{id:`command-palette-option-${t}`,type:`button`,role:`option`,"aria-selected":y===t,onMouseEnter:()=>b(t),onClick:()=>void O(e),className:`grid w-full grid-cols-[4.5rem_minmax(0,1fr)] items-center gap-x-3 rounded px-2.5 py-2 text-left text-sm ${e.host===void 0?``:`pr-12`} ${y===t?`bg-select-fill`:`hover:bg-hover`}`,children:[(0,z.jsx)(`span`,{className:`row-span-2 font-mono text-[10px] uppercase tracking-wide text-ink-faint`,children:h(`palette.kind.${e.kind}`)}),(0,z.jsx)(`span`,{className:`truncate font-medium text-ink`,children:e.label}),(0,z.jsx)(`span`,{className:`truncate font-mono text-[11px] text-ink-muted`,children:e.detail})]}),e.host===void 0?null:(0,z.jsx)(`button`,{type:`button`,"aria-label":h(`palette.openHostSettings`,{alias:e.host.alias}),title:h(`home.openConnectionSettings`),onMouseEnter:()=>b(t),onClick:()=>{let t=e.host;t!==void 0&&(s(),l(t))},className:`absolute right-1.5 top-1/2 flex size-9 -translate-y-1/2 items-center justify-center rounded text-ink-muted hover:bg-surface hover:text-ink`,children:(0,z.jsx)(B,{name:`moreHorizontal`,className:`size-4`})})]},e.id)),D.length===0?(0,z.jsx)(ai,{tone:w?`loading`:`empty`,title:h(w?`palette.loading`:`palette.empty`)}):null]}),(0,z.jsx)(`p`,{className:`shrink-0 border-t border-line px-3 py-2 text-[11px] text-ink-faint`,children:h(`palette.hint`)})]})}var li=`sshc.vault-lock.v1`,ui=`locked`;function di(){if(!(typeof BroadcastChannel>`u`))try{let e=new BroadcastChannel(li);e.postMessage(ui),e.close()}catch{}}function fi(e){if(typeof BroadcastChannel>`u`)return()=>void 0;try{let t=new BroadcastChannel(li),n=t=>{t.data===ui&&e()};return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),t.close()}}catch{return()=>void 0}}var pi=15e3;function mi({bootstrap:e,health:t,vault:n}){let[r,a]=(0,P.useState)(`starting`),[s,c]=(0,P.useState)(`idle`),[l,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(``),[v,y]=(0,P.useState)(null),[x,C]=(0,P.useState)(null);(0,P.useEffect)(()=>{let r=!0;return e().then(e=>r?(u.setCSRF(e.csrfToken),t()):null).then(e=>!r||e===null?null:(_(e.version),n())).then(e=>{!r||e===null||(p(e.exists),h(e.passwordless??!1),a(e.unlocked?`ready`:`locked`))}).catch(e=>{if(console.error(`sshc could not start its session`,e),!r)return;let t=i(e);if(e instanceof Error&&e.message===`session_expired`||t===`session_required`||t===`invalid_session`||t===`invalid_csrf`){a(`session-ended`);return}d(e instanceof Error?e.message:String(e)),a(`error`)}),()=>{r=!1,u.clear()}},[e,t,n]),(0,P.useEffect)(()=>{if(r!==`locked`||!f)return;let e=!0;return n().then(t=>{e&&h(t.passwordless??!1)}).catch(()=>void 0),()=>{e=!1}},[r,f,n]);let w=(0,P.useCallback)(()=>{p(!0),a(`locked`),di()},[]);return(0,P.useEffect)(()=>{b(w);let e=fi(()=>{p(!0),a(`locked`)});return()=>{b(null),e()}},[w]),(0,P.useEffect)(()=>{if(r!==`ready`)return;let e=!0,t=!1,i=!1,o=async(r=!1)=>{if(r&&(i=!0,c(`checking`)),!t){t=!0;try{let t=await n();if(!e)return;if(h(t.passwordless??!1),!t.unlocked){p(t.exists),a(`locked`),di();return}i&&(i=!1,c(`idle`))}catch{e&&i&&c(`retrying`)}finally{t=!1}}},s=window.setInterval(()=>void o(),pi),l=()=>{document.visibilityState===`visible`&&o(!0)},u=()=>{document.visibilityState===`visible`&&o()};return document.addEventListener(`visibilitychange`,l),window.addEventListener(`focus`,u),()=>{e=!1,window.clearInterval(s),document.removeEventListener(`visibilitychange`,l),window.removeEventListener(`focus`,u)}},[r,n]),(0,P.useEffect)(()=>(o(()=>a(`session-ended`)),()=>o(null)),[]),(0,P.useEffect)(()=>(S(y),()=>S(null)),[]),{state:r,vaultRecheck:s,failure:l,vaultExists:f,passwordless:m,version:g,requestFailure:v,vaultMigration:x,lock:w,markVaultExists:(0,P.useCallback)(()=>p(!0),[]),openVault:(0,P.useCallback)(e=>{h(e?.passwordless??!1),typeof e?.migratedFromVersion==`number`&&typeof e.migratedToVersion==`number`&&C({from:e.migratedFromVersion,to:e.migratedToVersion}),p(!0),c(`idle`),a(`ready`)},[]),clearRequestFailure:()=>y(null),clearVaultMigration:()=>C(null)}}function hi({api:e,consoles:t,enabled:n,section:r,navigate:i,closeNavigation:a}){let[o,s]=(0,P.useState)({}),[c,l]=(0,P.useState)([]),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(null),[m,h]=(0,P.useState)(null),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)([]),b=(0,P.useRef)(0),x=(0,P.useRef)(0),S=(0,P.useRef)(null);(0,P.useEffect)(()=>{if(!n)return;let t=!0;return e.terminalSettings().then(e=>{t&&s(e)}).catch(()=>void 0),e.localShellProfiles!==void 0&&e.localShellProfiles().then(e=>{t&&l(e.profiles)}).catch(()=>void 0),()=>{t=!1}},[e,n,r]),(0,P.useEffect)(()=>{if(u!==null){if(t.sessions.some(e=>e.id===u)){S.current=null;return}S.current!==u&&d(null)}},[t.sessions,u]),(0,P.useEffect)(()=>{u!==null||t.sessions.length===0||d(t.sessions[0]?.id??null)},[t.sessions,u]);let C=(0,P.useCallback)(e=>{S.current=e,d(e),a(),i(`Terminal`),t.refresh().finally(()=>{S.current===e&&(S.current=null)})},[a,t,i]),w=(0,P.useCallback)(e=>{b.current+=1,h({id:e,sequence:b.current}),i(`Terminal`)},[i]),T=(0,P.useCallback)(e=>{h(t=>t?.sequence===e?null:t)},[]),E=(0,P.useCallback)(e=>{x.current+=1,_({name:e,sequence:x.current}),a(),i(`Terminal`)},[a,i]),D=(0,P.useCallback)(e=>{_(t=>t?.sequence===e?null:t)},[]);return{settings:o,localShellProfiles:c,activeConsole:u,liveWorkspace:f,restoreRequest:m,renameRequest:g,orderedConsoles:(0,P.useMemo)(()=>{let e=new Map(v.map((e,t)=>[e,t]));return t.sessions.map((t,n)=>({session:t,rank:e.get(t.id)??v.length+n})).sort((e,t)=>e.rank-t.rank).map(e=>e.session)},[t.sessions,v]),showConsole:C,openWorkspace:w,renameWorkspace:E,openLocalShell:(0,P.useCallback)(async e=>{let n=await t.open({kind:`shell`,...e===void 0?{}:{profileId:e}});n!==null&&C(n.id)},[t,C]),duplicateConsole:(0,P.useCallback)(async e=>{let n=t.sessions.find(t=>t.id===e);if(n===void 0)return null;let r=await t.open(n.kind===`ssh`&&n.alias!==void 0?{kind:`ssh`,alias:n.alias}:{kind:`shell`});return r!==null&&C(r.id),r},[t,C]),consumeRestore:T,consumeRename:D,reorderConsoles:y,setLiveWorkspace:p,setSettings:s}}var gi=`(max-width: 767px), (pointer: coarse) and (max-width: 1023px)`;function _i(e){return typeof window.matchMedia==`function`&&window.matchMedia(e).matches}function vi(e){let[t,n]=(0,P.useState)(()=>_i(e));return(0,P.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}function yi(e,t=680){let n=vi(gi),[r,i]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let n=e.current;if(n===null)return;let r=()=>i(n.clientWidth>0&&n.clientWidth`u`)return;let a=new ResizeObserver(r);return a.observe(n),()=>a.disconnect()},[e,t]),n||r}function bi(){(0,P.useLayoutEffect)(()=>{let e=document.documentElement,t=window.visualViewport,n=window.innerHeight,r=window.innerWidth,i=!0,a;function o(){Math.abs(window.innerWidth-r)>80&&(r=window.innerWidth,n=window.innerHeight);let i=document.activeElement,o=i instanceof HTMLElement&&(i.matches(`input:not([type=checkbox]):not([type=radio]), textarea`)||i.isContentEditable);if(n=Math.max(n,window.innerHeight),t&&Math.abs(t.scale-1)>.01)return;let s=t?.height??window.innerHeight;e.style.setProperty(`--app-viewport-height`,`${s}px`),e.style.setProperty(`--app-viewport-top`,`${t?.offsetTop??0}px`);let c=o&&Math.max(n,window.innerHeight)-s>120;e.dataset.keyboardOpen=String(c),a!==void 0&&cancelAnimationFrame(a),c&&i instanceof HTMLElement&&!i.closest(`[data-terminal-host], .monaco-editor`)&&(a=requestAnimationFrame(()=>{document.activeElement===i&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`})}))}let s=()=>queueMicrotask(()=>{i&&o()});return o(),window.addEventListener(`resize`,o),t?.addEventListener(`resize`,o),t?.addEventListener(`scroll`,o),document.addEventListener(`focusin`,o),document.addEventListener(`focusout`,s),()=>{i=!1,a!==void 0&&cancelAnimationFrame(a),window.removeEventListener(`resize`,o),t?.removeEventListener(`resize`,o),t?.removeEventListener(`scroll`,o),document.removeEventListener(`focusin`,o),document.removeEventListener(`focusout`,s),e.style.removeProperty(`--app-viewport-height`),e.style.removeProperty(`--app-viewport-top`),delete e.dataset.keyboardOpen}},[])}function xi(){window.location.replace(window.location.pathname+window.location.search)}function Si({failure:e,requestFailure:t,version:n,onCloseFailure:r}){let i=C();return(0,z.jsxs)(`div`,{className:`min-h-screen bg-canvas text-ink`,children:[t===null?null:(0,z.jsx)(ft,{diagnostic:t,version:n,onClose:r}),(0,z.jsxs)(`main`,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,z.jsx)(`h1`,{className:`text-base font-semibold`,children:i(`shell.title`)}),(0,z.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:i(`shell.bootstrapFailed`)}),e===``?null:(0,z.jsx)(`code`,{className:`max-w-full overflow-x-auto rounded-md border border-line bg-card px-2 py-1 text-xs`,children:e}),(0,z.jsx)(v,{kind:`primary`,onClick:xi,children:i(`shell.bootstrapRetry`)})]})]})}function Ci(){let e=C();return(0,z.jsx)(`main`,{className:`grid min-h-screen place-items-center bg-canvas p-6 text-ink`,children:(0,z.jsxs)(p,{as:`section`,className:`flex w-full max-w-md flex-col items-start gap-4 p-6 sm:p-8`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:e(`shell.sessionEndedHeading`)}),(0,z.jsx)(`p`,{role:`alert`,className:`text-sm leading-6 text-ink-muted`,children:e(`shell.sessionEnded`)}),(0,z.jsx)(v,{kind:`primary`,onClick:xi,children:e(`shell.sessionReload`)})]})})}function wi({phase:e}){let t=C();return(0,z.jsx)(`div`,{className:`fixed inset-0 z-[100] grid min-h-screen place-items-center bg-canvas p-6`,children:(0,z.jsxs)(p,{as:`section`,role:`status`,className:`w-full max-w-md p-6 sm:p-8`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:t(`shell.title`)}),(0,z.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-ink-muted`,children:t(e===`checking`?`shell.vaultChecking`:`shell.vaultCheckRetrying`)})]})})}function Ti({pathname:e,onGoHome:t}){let n=C();return(0,z.jsx)(`div`,{className:`h-full overflow-y-auto p-4 md:p-5`,children:(0,z.jsxs)(`section`,{"aria-labelledby":`not-found-heading`,className:`flex max-w-2xl flex-col gap-3`,children:[(0,z.jsx)(`h2`,{id:`not-found-heading`,className:`font-medium`,children:n(`shell.pageNotFound`)}),(0,z.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`shell.pageNotFoundDescription`)}),(0,z.jsx)(`code`,{className:`w-fit rounded-md border border-line bg-card px-2 py-1 text-sm`,children:e}),(0,z.jsx)(`a`,{href:At(`Home`),onClick:t,className:`${ee} w-fit`,children:n(`shell.goHome`)})]})})}function Ei(e){return r(`Overview`,e)}function Di(e){return r(`HostDetail`,e)}function Oi(e){return r(`FileContents`,e)}function ki(e){return r(`SavePreview`,e)}function Ai(e){return r(`SaveResult`,e)}function ji(e){return r(`CreateConnectionResponse`,e)}function V(e){return r(`HistoryList`,e).entries}function H(e,t,n){return u.mutate(e,{method:t,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)})}function Mi(e,t){return H(e,`POST`,t)}var Ni={async overview(){return Ei(await u.read(`/api/v1/config/overview`))},async host(e,t){let n=new URLSearchParams({path:e,alias:t});return Di(await u.read(`/api/v1/config/host?${n.toString()}`))},async file(e){let t=new URLSearchParams({path:e});return Oi(await u.read(`/api/v1/config/file?${t.toString()}`))},async preview(e){return ki(await Mi(`/api/v1/config/preview`,e))},async save(e){return Ai(await Mi(`/api/v1/config/save`,e))},async createConnection(e){return ji(await Mi(`/api/v1/connections`,e))},async updateConnection(e){return Ai(await H(`/api/v1/connections`,`PATCH`,e))},async renameGroup(e,t){return Ai(await Mi(`/api/v1/config/groups/rename`,{from:e,to:t}))},async deleteGroup(e,t){return Ai(await Mi(`/api/v1/config/groups/delete`,{name:e,destination:t}))},async history(){return V(await u.read(`/api/v1/history`))},async restore(e,t){return Ai(await Mi(`/api/v1/history/restore`,{transactionId:e,path:t}))},async recover(e,t){await Mi(`/api/v1/history/recover`,{transactionId:e,action:t})}},Pi=[`bucket_authentication_failed`,`bucket_access_denied`,`bucket_rate_limited`,`bucket_unavailable`,`bucket_refused`,`bucket_timeout`,`bucket_dns_failed`,`bucket_tls_failed`,`bucket_unreachable`,`snapshot_download_incomplete`,`snapshot_cost_refused`,`snapshot_schema_unsupported`,`snapshot_rejected`,`snapshot_too_large`,`wrong_passphrase`,`sync_ignore_invalid`],Fi=`sync.force_push`,Ii=`remote-workspace`;function Li(e){return r(`SyncStatus`,e)}function Ri(e){return r(`SyncSetupCheckResponse`,e)}function zi(e){return r(`SyncSetupResponse`,e)}function Bi(e){return r(`SyncKeyResponse`,e)}function Vi(e){return r(`PushResponse`,e)}function Hi(e){return r(`SyncPushDraft`,e)}function Ui(e){return r(`SyncExclusions`,e)}function Wi(e){return r(`SyncBucketStatus`,e)}function Gi(e){return r(`SyncHistory`,e)}function Ki(e){return r(`SyncHistoryDiff`,e)}function qi(e){return r(`PullResponse`,e)}var Ji={async syncStatus(){return Li(await u.read(`/api/v1/sync`))},async checkSyncSetup(e){return Ri(await u.mutate(`/api/v1/sync/setup/check`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},{locallyHandledCodes:Pi}))},async completeSyncSetup(e){return zi(await u.mutate(`/api/v1/sync/setup`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},{locallyHandledCodes:Pi}))},async configureSync(e){return Li(await u.mutate(`/api/v1/sync/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}))},async syncExclusions(){return Ui(await u.read(`/api/v1/sync/exclusions`))},async saveSyncExclusions(e){return Ui(await u.mutate(`/api/v1/sync/exclusions`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({document:e})},{locallyHandledCodes:[`sync_ignore_invalid`]}))},async syncPushDraft(){return Hi(await u.read(`/api/v1/sync/push`))},async pushSnapshot(e){return Vi(await h(`/api/v1/sync/push`,{message:e}))},async forcePushSnapshot(e){let t=await y(Fi,Ii);return Vi(await h(`/api/v1/sync/force-push`,{message:e},t))},async syncBucketStatus(){return Wi(await u.read(`/api/v1/sync/bucket`))},async syncHistory(){return Gi(await u.read(`/api/v1/sync/history`))},async diffSyncHistory(e){return Ki(await h(`/api/v1/sync/history/diff`,{key:e}))},async pullSnapshot(e,t,n,r,i){if(e&&r===void 0)throw Error(`invalid_request`);return qi(await h(`/api/v1/sync/pull`,{apply:e,...t===void 0?{}:{resolve:t},...n===void 0?{}:{historyKey:n},...i===void 0?{}:{acceptRemoteHead:i},...r===void 0?{}:{expectedETag:r.remoteETag,expectedRevision:r.remoteRevision}},void 0,[...Pi,`sync_local_changed`,`sync_workspace_busy`]))},async setSyncKey(e,t){return Bi(await u.mutate(`/api/v1/sync/key`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e===void 0?{}:{key:e},...t===void 0?{}:{confirmHistoryLoss:t}})}))},async setAutoSync(e){return Li(await u.mutate(`/api/v1/sync/auto`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})}))},async syncNow(){return Li(await l(`/api/v1/sync/now`))}};function Yi(e){return`${e.path}\u0000${e.alias}`}function Xi(e,t){let n=e;for(;;){let e=n.lastIndexOf(`/`);if(e<0)return``;if(n=n.slice(0,e),t.has(n))return n}}function Zi(e,t){return e.group===t||e.group.startsWith(`${t}/`)}function Qi(e){let t=new Map;for(let n of e)n.identity.alias!==``&&t.set(n.identity.alias,(t.get(n.identity.alias)??0)+1);return new Set([...t].filter(([,e])=>e>1).map(([e])=>e))}function $i(e){let t=new Map((e.metadata.hosts??[]).map(e=>[Yi(e.identity),e])),n=Qi(e.hosts),r=e.hosts.map((e,t)=>({host:e,sourceOrder:t})).filter(({host:e})=>e.identity.alias!==``).map(({host:e,sourceOrder:r})=>{let i=t.get(Yi(e.identity));return{host:e,identity:e.identity,group:e.group??``,tags:i?.tags??[],colour:i?.colour??``,os:i?.os||i?.detectedOS||``,order:i?.order??0,duplicateAlias:n.has(e.identity.alias),sourceOrder:r}}).sort((e,t)=>e.order-t.order||e.sourceOrder-t.sourceOrder).map(({sourceOrder:e,...t})=>t),i=new Set(e.groups.map(e=>e.name)),a=new Map((e.metadata.groups??[]).filter(e=>i.has(e.name)).map(e=>[e.name,e])),o=e.groups.map((e,t)=>{let n=a.get(e.name),o=r.filter(t=>Zi(t,e.name));return{name:e.name,label:e.name.slice(e.name.lastIndexOf(`/`)+1),parent:Xi(e.name,i),hidden:n?.hidden===!0,colour:n?.colour??e.colour??``,order:n?.order??e.order??0,descendantCount:o.length,sourceOrder:t}}).sort((e,t)=>e.order-t.order||e.sourceOrder-t.sourceOrder).map(({sourceOrder:e,...t})=>t),s=new Map(o.map(e=>[e.name,e])),c=new Map;c.set(``,r.filter(e=>e.group===``));for(let e of o)c.set(e.name,r.filter(t=>t.group===e.name));let l=new Map;for(let e of o){let t=l.get(e.parent)??[];t.push(e),l.set(e.parent,t)}let u=new Map,d=e=>{let t=u.get(e);if(t!==void 0)return t;let n=(l.get(e)??[]).flatMap(e=>{let t=c.get(e.name)??[];return e.hidden&&t.length===0?d(e.name):[e]});return u.set(e,n),n};d(``);for(let e of o)d(e.name);return{servers:r,groups:o,duplicateAliases:n,groupByName:s,visibleChildrenByParent:u}}var ea=`data:image/svg+xml,%3csvg%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M24%200v128h80.662V0H24zm53.22%2055.023c4.613%200%208.35%203.768%208.35%208.416%200%204.648-3.737%208.416-8.35%208.416-4.61%200-8.35-3.768-8.35-8.416%200-4.648%203.74-8.416%208.35-8.416zm-11.486.854c.653.004%201.309.033%201.965.086a12.213%2012.213%200%2000-2.533%206.824c-6.573.122-12.64%203.392-16.398%208.842a11.834%2011.834%200%2000-3.815-1.549%2011.785%2011.785%200%2000-2.52-.271c-.21%200-.421.002-.634.015l-.004.002c4.872-8.663%2014.146-14.006%2023.94-13.949zm22.594%2012.328a27.771%2027.771%200%20013.938%2020.963%2027.677%2027.677%200%2001-5.303%2011.342l.002.006-.004-.004.002-.002a12.092%2012.092%200%2000-3.996-6.268%2020.658%2020.658%200%20002.597-6.52%2020.736%2020.736%200%2000-1.93-13.976%2012.1%2012.1%200%20004.694-5.54zM42.443%2073.48c4.611%200%208.35%203.768%208.35%208.416%200%204.648-3.739%208.416-8.35%208.416-4.612%200-8.35-3.768-8.35-8.416%200-4.648%203.738-8.416%208.35-8.416zm4.963%2019.417c2.826%205.492%207.853%209.364%2013.87%2010.663l.001-.004a20.048%2020.048%200%20002.05.336%2012.107%2012.107%200%20002.443%207.037%2027.24%2027.24%200%2001-5.93-.614c-8.903-1.924-16.153-8.07-19.572-16.535a11.934%2011.934%200%20007.138-.883zm27.936%202.291c4.612%200%208.35%203.769%208.35%208.417%200%204.647-3.738%208.416-8.35%208.416-4.611%200-8.352-3.769-8.352-8.416%200-4.648%203.74-8.416%208.352-8.416z'/%3e%3c/svg%3e`,ta=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill='%23A80030'%20d='M76.77%2068.974a27.05%2027.05%200%20002.008-1.729c-1.667.408-3.363.417-5.073.261-2.049.028.388%201.056%203.065%201.468zm7.94-4.212c1.222-1.685%202.111-3.53%202.425-5.438-.274%201.359-1.011%202.534-1.707%203.773-3.833%202.414-.36-1.433-.002-2.895-4.12%205.188-.566%203.111-.716%204.56zm4.063-10.57c.248-3.693-.727-2.525-1.055-1.117.383.199.685%202.603%201.055%201.117zM65.93%203.722c1.094.196%202.365.347%202.186.608%201.197-.262%201.469-.504-2.186-.608zm2.133.704l.053-.095-.773.159zM65.27%2080.73c-2.951-1.381-5.653-3.468-7.874-6.021%201.178%201.726%202.451%203.403%204.096%204.721-2.783-.942-6.499-6.742-7.584-6.978%204.796%208.587%2019.457%2015.059%2027.135%2011.848-3.553.13-8.065.073-12.057-1.402-1.536-.791-3.573-2.355-3.589-2.869-.077.201-.206.4-.127.701zm.156-.797l-.03.097.03-.097zm44.049-33.588c.033-1.882.523-.986.713-1.449-.37-.213-1.339-1.656-1.93-4.424.428-.651%201.143%201.686%201.726%201.781-.375-2.201-1.02-3.878-1.045-5.568-1.7-3.553-.602.474-1.981-1.525-1.81-5.646%201.502-1.311%201.725-3.875%202.743%203.974%204.308%2010.134%205.026%2012.685-.549-3.11-1.433-6.123-2.514-9.04.833.352-1.342-6.399%201.083-1.929-2.591-9.531-11.085-18.436-18.901-22.614.956.875%202.164%201.975%201.73%202.146-3.887-2.314-3.204-2.495-3.76-3.472-3.167-1.288-3.375.103-5.472.002-5.968-3.165-7.118-2.829-12.611-4.813l.251%201.168c-3.955-1.317-4.607.5-8.88.004-.261-.203%201.369-.735%202.71-.93-3.823.504-3.644-.753-7.384.139.921-.646%201.896-1.075%202.879-1.625-3.116.189-7.441%201.814-6.106.336C51.65%205.613%2042.619%208.798%2037.551%2013.55l-.159-1.065C35.07%2015.272%2027.266%2020.81%2026.645%2024.42l-.621.145c-1.209%202.046-1.991%204.365-2.949%206.47-1.581%202.693-2.317%201.036-2.091%201.459-3.109%206.302-4.653%2011.598-5.986%2015.94.951%201.421.022%208.553.382%2014.26-1.561%2028.19%2019.784%2055.559%2043.115%2061.879%203.42%201.222%208.506%201.176%2012.832%201.302-5.105-1.46-5.765-.773-10.735-2.508-3.587-1.689-4.373-3.617-6.914-5.821l1.006%201.777c-4.982-1.763-2.897-2.182-6.951-3.466l1.074-1.402c-1.615-.123-4.277-2.721-5.004-4.161l-1.767.069c-2.122-2.618-3.253-4.505-3.171-5.967l-.571%201.018c-.647-1.111-7.807-9.822-4.092-7.793-.691-.632-1.608-1.028-2.603-2.835l.756-.865c-1.788-2.299-3.291-5.249-3.177-6.231.954%201.289%201.616%201.529%202.271%201.75-4.515-11.204-4.768-.618-8.188-11.405l.723-.058c-.555-.836-.891-1.743-1.337-2.633l.314-3.138c-3.25-3.759-.91-15.982-.44-22.686.325-2.727%202.713-5.628%204.529-10.178l-1.106-.191c2.115-3.69%2012.079-14.82%2016.693-14.247%202.235-2.809-.443-.01-.88-.718%204.91-5.082%206.453-3.591%209.767-4.504%203.573-2.121-3.066.827-1.373-.809%206.178-1.578%204.378-3.587%2012.438-4.388.851.484-1.973.747-2.682%201.375%205.148-2.518%2016.289-1.946%2023.525%201.397%208.397%203.925%2017.832%2015.525%2018.204%2026.439l.423.113c-.213%204.339.665%209.356-.858%2013.965l1.037-2.182c.121%203.316-.971%204.925-1.955%207.773l-1.772.884c-1.45%202.817.14%201.789-.897%204.03-2.265%202.013-6.871%206.298-8.345%206.689-1.077-.024.729-1.269.964-1.759-3.029%202.082-2.431%203.125-7.065%204.39l-.136-.302C71.6%2082.675%2055.72%2072.017%2055.93%2057.475c-.123.924-.347.692-.601%201.067-.589-7.483%203.456-14.998%2010.278-18.065%206.674-3.305%2014.497-1.948%2019.276%202.507-2.625-3.44-7.851-7.085-14.046-6.744-6.066.096-11.742%203.952-13.636%208.137-3.109%201.957-3.469%207.544-4.824%208.565-1.822%2013.394%203.428%2019.179%2012.309%2025.985.718.484.801.757.739%201.005l.011-.02c10.477%203.915%2021.301%202.966%2030.366-4.302%202.306-1.796%204.825-4.852%205.553-4.895-1.096%201.649.188.793-.655%202.249%202.298-3.707-.999-1.509%202.375-6.401l1.247%201.716c-.463-3.075%203.819-6.812%203.385-11.676.982-1.488%201.097%201.601.053%205.024%201.446-3.798.381-4.408.754-7.542.401%201.053.928%202.173%201.199%203.284-.943-3.67.967-6.181%201.439-8.313-.462-.204-1.451%201.624-1.677-2.711zM51.037%2071.758c1.348%201.831%202.417%203.814%204.138%205.245-1.238-2.417-2.157-3.415-3.85-6.683l-.288%201.438zm3.473-1.563c-.713-.789-1.136-1.738-1.608-2.685.453%201.663%201.377%203.091%202.239%204.545l-.631-1.86zm52.5-.093a35.857%2035.857%200%20003.875-12.16l-.302.756a36.496%2036.496%200%2001-3.573%2011.404zM71.214%202.126c-1.917.161-3.825.257-5.709.499l.83.114c1.387-.509%203.408-.279%204.879-.613zM18.227%2030.775c1.424-3.207-.395-1.149-.552-2.007.221%202.846-2.19%203.924.552%202.007zm-2.838%207.237c-1.775%202.269-.817%202.752-1.004%204.296.642-1.972.76-3.156%201.004-4.296z'/%3e%3c/svg%3e`,na=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M77.6%2092.4c-.1%200-.1%200-.1.1-.8.9-1.2%201.3-1.7%201.7-1.4%201.1-3-.1-4-.7-2.3-1.3-4.1-.5-4.6.5-.4%201%20.1%202.3%201.3%202.1%201.7-.2%201.8%200%203.1.8%202.4%201.5%204.1.7%204.9%200%20.7-.6%201.1-1.1%201.5-1.8.7-1.3.1-2.4-.2-2.7h-.2zM74.9%2017h-.4c-.7%200-1.4.3-2.1.4-2.4.2-4.5%201-5.9%201.7-.1%200-.1-.1-.1-.1l.2-.1%201.2.2c3.9-.4%207.1.4%207.3%201.6.1.9-1.6%201.9-4.1%202.5-.1%200-.2.2-.2.3%200%20.1.1.3.2.3%201%20.3%202.3.5%203.6.5%204%20.1%207.3-1.6%207.3-3.5.2-1.8-3-3.8-7-3.8zM64%201.8C29.5%201.8%201.6%2029.7%201.6%2064.1c0%207%201.1%2013.9%203.3%2019.9h4.3c3.8%200%207.4-.9%2010.4-2.4.8-.4%201.6-.6%202.5-.6%201.9%200%203.6.8%204.6%202.5.9%201.6%201.7%202.5%202.8%203.1.9.6%202.1%201%203.8%201%20.8%200%202.1-.2%202.4-1.1.4-1-.1-1.7-1.3-2.2-1.7-.7-2.1-1.7-3-3.3-.9-1.6-2.8-2.4-3.1-5.4-.3-3%202-6.7%206.6-5.5%203.3.9%205.4%204.9%206.2%206.3.4.7%201.9%201.6%203.1.5%201.2-1.1%202.3-1.1%203.2.3.8%201.2%206.4%208.7%2012.5%208.9%206.2.2%209.5-1.4%2012.2-1.3%201.9.1%202.8%201%203.9%201.2%201.9.3%203.2-1.4%205.3-1.3%201.7.1%203.5%201.2%205.4%201.2s5.9-2.3%205.8-1.3c-.1%201.7-1.4%204.6-1.7%206-.2.9%200%203.2-.6%205.1-.5%201.9-2.2%204.2-2.7%204.9-1.5%202.3-2.6%203-3.9%205.4-1.4%202.7-3.7%205.2-4.3%206-.8%201%204.3%200%206.1-1.7%201.5-1.4%204.2-5.8%208.5-6.8%202.9-.6%203.4-1.7%203.1-2.8-.1-.1-.1-.3-.1-.4%200-.4.2-.7.6-.9%203-1.2%207-2%2011.4-2%202.6%200%205.1.3%207.5.9%206.3-9.8%2010-21.4%2010-33.9%200-34.6-27.9-62.6-62.4-62.6zM114.8%2063c-3%2016.4-29.9%2021.9-56%2014-25-7.5-46.8-22.5-44.3-31.3%201.5-5.1%209.6-7.3%2020.4-6.1-1.6%203.3-1.5%207.3%205.6%2011.7%208.8%205%2023.6%209.2%2027.6%208.8%201.5-.1%202.8-.9%201.5-1.8-1.3-.9-2.5-2.7-3.3-5.8-.4-1.7-.9-4.2-10.3-6-20.2-3.9-19.4-9.6-18.8-12.8%200%200%201.8-8.1%202.5-10.9.7-2.8%202.7-9.3%2015.7-6.4%207.5%201.7%2011.6-.4%2013.6-.9%205.6-1.4%2011.9-.4%2015.3%203.1%203.6%203.7%208.5%2014.9%2010.8%2023.4%201.2%204.3.9%206.3.3%207.8-.4%201-.7%201.6-2.2%204.1-.3.4%200%20.9.5.6%203.9-2%204.8-4.7%205.4-6.7%2010.7%202.2%2017%207.7%2015.7%2015.2zM57.6%2027.5c-3%200-5.2.4-7.1.4s-3.4-1.3-4-2.2c-.6-.7-2.4-1.4-3.3.9-1%202.3.8%204.7%202.3%205%200%200%202.5%204.7%204.4%202.6%201.3-1.4%202.1-2.2%209.3-2.7%203.4-.3%203.8-1%203.7-1.9-.2-1-2.3-2.1-5.3-2.1z'%20fill='%23E93442'/%3e%3c/svg%3e`,ra=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M64.219%201.266C29.605%201.266%201.563%2029.434%201.5%2064.207h-.012v48.723H1.5c.016%207.886%206.383%2014.273%2014.242%2014.273h48.465c34.621-.023%2062.656-28.187%2062.656-62.945%200-34.774-28.054-62.942-62.718-62.942zm12.738%2025.918c10.527%200%2020.465%208.093%2020.465%2019.261%200%201.035.008%202.07-.164%203.246-.29%202.97-2.992%205.106-5.938%204.688-2.941-.426-4.941-3.23-4.394-6.168.05-.336.066-.863.066-1.766%200-6.332-5.156-8.773-10.031-8.773-4.875%200-9.27%204.117-9.277%208.773.082%205.387%200%2010.727%200%2016.114l9.05-.07c7.067-.145%207.149%2010.538.082%2010.488l-9.125.066c-.023%204.336.032%203.55.012%205.734%200%200%20.074%205.297-.082%209.313-1.094%2011.8-11.094%2021.23-23.113%2021.23-12.746%200-23.242-10.457-23.242-23.28.382-13.188%2010.859-23.567%2024.05-23.446l7.36-.055v10.469l-7.36.066h-.035c-7.25.215-13.465%205.16-13.582%2012.957a12.765%2012.765%200%200012.805%2012.797c7.086%200%2012.758-5.18%2012.758-12.781l-.012-39.649c.004-.738.027-1.324.11-2.132%201.195-9.7%209.831-17.09%2019.609-17.09zm0%200'%20fill='%2351a2da'/%3e%3c/svg%3e`,ia=`data:image/svg+xml,%3csvg%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M64.633%205.723l-12.62%2012.863h8.444v33.818l4.176%204.258%204.13-4.207V18.811h8.71L64.633%205.723zM22.37%2021.355l.002%2022.903%209.266-9.246L53.633%2056.97h4.105v-3.418l-21.92-22.358%209.66-9.84H22.372zm26.938%200l-9.65%209.838%2018.08%2018.44V21.355h-8.43zm22.177.215l-.002%2028.108L89.61%2031.195l-9.43-9.625h-8.695zm13.395.883l8.566%208.742-21.96%2022.399v3.597h3.933l21.855-22.29%209.438%209.62V22.453H84.88zm12.394%2016.361l-18.02%2018.377h27.459V48.43l-9.438-9.616zm-65.632.069l-9.272%209.256v8.832h27.39L31.643%2038.883zM19.654%2050.846L6.28%2064.196%2019.654%2077.55v-9.328H52.98l4.03-4.028-4.49-4.472H19.655v-8.877zm89.778.357l-.004%208.746H76.55l-4.25%204.328%203.86%203.942h33.038v9.373l13.057-13.315-12.824-13.074zM22.377%2070.977l.002%209.287%209.264%209.256%2018.572-18.543H22.377zm31.713%200L31.639%2093.383l-9.262-9.248v22.677h22.21l-9.544-9.527%2022.695-22.65v-3.658H54.09zm17.256%200v4.175L92.56%2096.316l.964.973-8.61%208.596h21.562v-21.61l-8.24%208.414-.962.967-22.242-22.68h-3.687zm7.517%200l18.412%2018.767%209.202-9.379v-9.388H78.863zm-14.576.998l-3.822%203.814v33.787h-9.233l13.055%2013.028%2013.057-13.028h-8.717V76.31l-4.34-4.334zm-6.547%206.533l-18.816%2018.78%209.547%209.526h9.27V78.508zm13.606.512v27.8h8.756l9.55-9.533L71.346%2079.02z'/%3e%3c/svg%3e`,aa=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%20%3e%3cpath%20fill='%2310b982'%20d='M%20124.4375%2085.105469%20C%20126.746094%2078.496094%20128%2071.394531%20128%2064%20C%20128%2028.652344%2099.347656%200%2064%200%20C%2028.652344%200%200%2028.652344%200%2064%20C%200%2081.488281%207.015625%2097.339844%2018.386719%20108.890625%20L%2083.304688%2043.972656%20Z%20M%20112.746094%20105.46875%20L%2083.304688%2076.027344%20L%2037.199219%20122.132812%20C%2045.351562%20125.898438%2054.429688%20128%2064%20128%20C%2083.523438%20128%20101.007812%20119.257812%20112.746094%20105.46875%20Z%20M%20112.746094%20105.46875%20'/%3e%3c/svg%3e`,oa=`data:image/svg+xml,%3csvg%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M33.938.316a9.087%209.087%200%200%200-.981.067c-5.66.64-9.02%205.117-8.387%2011.3.629%204.692%205.66%208.743%2010.485%208.106%205.664-.856%209.437-5.547%208.808-11.09-.59-4.6-5.048-8.447-9.925-8.383zm65.158%204.307a8.923%208.923%200%200%200-.49.025c-5.454.426-9.227%205.329-8.81%2010.66.419%205.333%205.243%209.383%2010.696%208.958%205.035-.426%209.23-5.332%208.813-10.45-.41-5.165-5.144-9.325-10.21-9.193zm-47.899%202.63c-2.665-.06-4.71%201.698-5.865%205.071-2.516%207.465-7.34%2010.235-15.102%208.742-1.046-.214-2.097-.425-2.515-.425-3.985.64-6.293%202.984-6.922%206.183-.84%209.81%204.195%2016.844%2011.117%2022.602%207.34%206.398%2016.36%207.89%2025.797%207.465.84%200%201.68%200%201.887-.641.21-1.066-.836-1.066-1.469-1.277-4.402-1.922-9.016-3.414-13.004-6.188-3.984-2.769-8.598-5.117-10.277-10.445-1.258-4.051.422-7.676%204.406-8.957%203.566-1.281%207.133-1.281%2010.488%200%202.098.851%202.934.426%203.356-1.918.629-4.051%201.886-7.89%204.402-11.3%202.938-4.267%202.938-4.692-1.887-7.466-.21%200-.21-.215-.418-.215-1.442-.8-2.782-1.202-3.994-1.23zm29.592.354c-2.765-.032-5.766.906-7.77%202.584-13.632%2011.09-15.94%2029.641-8.18%2044.352.208.64.63%201.281%201.466.855v-.002c-.207-4.69-.418-9.38.422-13.86.84-5.118%201.675-10.235%204.824-14.497%203.773-5.332%209.648-5.121%2012.793.637%201.68%202.773%202.308%205.758%202.515%208.957%200%201.918.84%202.344%202.52%202.133%205.032-.852%2010.066-.852%2014.89%201.066.63.211%201.258.64%202.098%200%201.676-1.492%202.098-8.957%201.047-10.875-1.887-3.414-4.824-2.984-7.758-2.984-3.355.21-6.293-.856-8.601-3.625-2.098-2.559-2.727-5.758-3.145-8.957-.21-1.492-.422-2.774-1.68-3.84-1.283-1.306-3.29-1.918-5.44-1.944zM95.965%2047.4c-8.687-.15-17.27%203.253-23.996%209.49-.63.426-.84%201.067-.418%201.708%204.195-1.282%208.597-2.563%2013.21-2.774%204.825-.426%209.86-.851%2014.684%201.278%206.082%202.559%207.133%208.316%202.516%2012.796-2.098%202.133-4.824%203.625-7.758%204.477-1.68.426-1.89%201.281-1.262%202.984%201.891%204.692%203.149%209.598%202.52%2014.926-.211.856-.422%201.496.418%202.133%201.886%201.281%209.02%200%2010.488-1.492%202.727-2.559%201.676-5.543%201.047-8.317-.836-3.41-.418-6.609%201.469-9.382%201.887-2.77%204.613-4.051%207.55-5.329%201.258-.425%202.31-1.066%203.149-2.558%201.887-3.625-.422-9.809-3.988-12.797-6.055-4.758-12.873-7.025-19.63-7.143zm-74.285.13c-.39.014-.833.163-1.305.404-.84.425-1.68.851-2.309%201.28-5.453%203.41-6.082%207.677-1.468%2012.368%203.355%203.41%205.035%207.25%203.777%2011.941-.629%202.344-1.89%204.051-3.355%205.97-1.051%201.28-1.47%202.558-1.262%204.265.422%204.05%204.406%208.101%209.23%208.527%2013.422%201.281%2024.328-3.41%2031.88-14.926%202.519-3.624%204.405-7.675%205.245-11.941-.84-.211-1.05.215-1.68.43-4.823%205.117-9.859%2010.02-16.359%2013.433-2.515%201.278-5.242%202.344-8.18%202.344-4.613%200-7.34-2.984-6.921-7.676.21-3.84%201.68-7.25%204.195-10.023%201.258-1.492%201.258-2.344-.211-3.625-4.195-2.985-7.969-6.61-9.855-11.516-.264-.932-.771-1.281-1.422-1.256zM9.646%2060.872c-.336.006-.676.028-1.017.068-4.824.426-9.02%205.543-8.602%2010.66.423%205.335%205.453%209.6%2010.489%208.96%206.082-.426%209.23-6.399%209.02-11.301-.396-4.798-4.842-8.472-9.89-8.385zm60.016%202.867c-.262-.027-.523.08-.838.4%202.516%203.836%204.824%207.891%206.711%2012.153%201.68%204.692%203.567%209.383%202.938%2014.715-.63%206.398-5.875%209.168-11.328%205.969-2.727-1.493-4.825-3.625-6.5-6.184-1.051-1.492-2.098-1.492-3.356-.426-3.988%203.414-8.18%205.973-13.426%206.824-.836%200-1.675%200-2.097.852-.63%202.133%202.52%208.742%204.406%209.809%203.144%201.921%205.664%200%208.18-1.493%202.937-1.703%205.87-2.343%209.226-1.277%203.149%201.067%205.246%203.41%207.133%205.969.84%201.066%201.68%201.918%203.355%202.347%203.985%201.067%209.438-3.199%2011.118-7.464%206.293-16.418-.84-33.266-14.684-41.793-.314-.213-.576-.374-.838-.4zM118.7%2072.21c-.332-.005-.669.007-1.01.033-5.66.641-9.437%204.906-9.02%2010.664.422%205.328%205.036%209.38%2010.278%208.953%205.453-.426%209.442-5.117%209.02-10.875-.392-5.196-4.289-8.707-9.268-8.775zm-58.054%2035.643c-5.036%200-9.23%204.265-9.23%209.808%200%206.183%203.983%2010.024%2010.07%2010.024%204.82-.215%209.015-4.692%209.015-9.809%200-5.332-4.824-10.023-9.855-10.023z'/%3e%3c/svg%3e`,sa=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M61.113%204.886C55.82%2017.788%2052.63%2026.229%2046.738%2038.749c3.614%203.805%208.047%208.242%2015.246%2013.25-7.742-3.168-13.02-6.348-16.968-9.648-7.54%2015.644-19.352%2037.933-43.325%2080.77%2018.844-10.817%2033.45-17.485%2047.059-20.032a33.989%2033.989%200%200%201-.895-8.024l.024-.601c.297-12.004%206.578-21.238%2014.016-20.61%207.437.625%2013.222%2010.872%2012.921%2022.875-.054%202.262-.312%204.434-.761%206.45%2013.465%202.62%2027.914%209.273%2046.5%2019.941-3.664-6.707-6.934-12.758-10.059-18.52-4.922-3.792-10.055-8.726-20.523-14.074%207.195%201.864%2012.347%204.008%2016.363%206.407C74.578%2038.12%2072.004%2030.308%2061.113%204.886Zm0%200'/%3e%3cpath%20d='M121.14%20112.57v-3.243h-1.214v-.433h2.93v.433h-1.223v3.242h-.492M123.363%20112.57v-3.676h.735l.875%202.601c.082.242.14.426.175.543.043-.133.11-.328.2-.586l.882-2.558h.66v3.675h-.472v-3.078l-1.074%203.078h-.442l-1.066-3.129v3.13h-.473'/%3e%3c/svg%3e`,ca=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%2373ba25'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M58.777%2032.575c-9.624.045-21.95%201.594-37.058%2010.789l-.594.368c-9.478%205.854-16.018%2013.067-19.44%2021.454C.613%2067.82-.83%2073.776.599%2079.376c.617%202.449%201.767%204.911%203.315%207.113%203.496%204.978%209.372%208.28%2015.694%208.838%208.929.79%2015.686-3.18%2018.09-10.613%201.651-5.129%200-12.654-6.336-16.493-5.157-3.124-10.698-2.413-13.915-.31-2.786%201.832-4.366%204.677-4.34%207.804.062%205.543%204.886%208.488%208.356%208.497%201.008%200%202.019-.172%203.16-.541.408-.124.79-.276%201.21-.532l.13-.076.057-.04a2.817%202.817%200%200%200%201.265-2.33%202.749%202.749%200%200%200-.111-.771c-.408-1.403-1.811-2.25-3.262-1.988l-.195.044-.266.08-.386.133a7.621%207.621%200%200%201-1.522.213c-.408-.027-2.4-.616-2.4-2.782v-.027c0-.798.318-1.354.496-1.66.62-.964%202.322-1.906%204.62-1.712%203.012.258%205.186%201.79%206.629%204.677%201.336%202.685.985%205.986-.901%208.404-1.877%202.397-5.214%203.417-9.65%202.942-4.479-.489-8.263-3.04-10.38-7.007-2.076-3.882-2.187-8.484-.292-12.015%204.53-8.471%2013.085-8.383%2017.78-7.58%206.943%201.194%2014.842%207.536%2017.646%2014.857.452%201.166.683%202.094.883%202.941l.302%201.265%207.845%203.79c.168.083.227.11.293.061.084-.062.035-.226.035-.226-.049-.173-.164-.333-.342-2.507-.15-1.93-.453-7.21%202.232-9.824%201.043-1.024%202.632-1.939%203.887-2.227%205.138-1.247%2011.168-.386%2016.87%206.145%202.95%203.373%204.389%204.912%205.112%205.6%200%200%20.164.155.253.226.093.08.155.143.297.222.235.13%209.802%204.49%209.802%204.49s.111.053.195-.048.004-.204.004-.204c-.062-.072-6.06-7.747-4.996-14.07.843-5.033%204.89-4.58%2010.49-3.954%201.827.212%203.908.448%206.06.497%206.017.04%2012.497-1.06%2016.49-2.791%202.582-1.109%204.228-1.85%205.262-2.782.372-.301.563-.8.763-1.331l.142-.351c.168-.43.412-1.342.52-1.841.043-.219.097-.434-.09-.573-.164-.128-.55.102-.55.102-1.753%201.043-6.137%203.021-10.236%203.106-5.086.102-15.397-5.099-16.462-5.648l-2.157-5.05c7.375%204.81%2013.494%207.468%2018.175%207.88%205.214.458%209.278-2.356%2011.04-3.527.23-.156.46-.323.674-.488.04-.026.129-.107.115-.178-.293-1.81-3.012-10.583-5.076-12.69-.568-.577-1.02-1.14-1.939-1.677-7.454-4.3-25.14-6.895-25.966-7.01%200%200-.084-.019-.142.035-.046.044-.054.128-.054.128l-.08%204.034c-1.805-.602-14.936-4.801-27.239-5.223-2.61-.09-5.518-.244-8.725-.228Zm56.012%208.663c4.167.147%207.442%203.63%207.3%207.752a7.44%207.44%200%200%201-2.397%205.214%207.552%207.552%200%200%201-5.435%202.014c-4.162-.15-7.433-3.63-7.295-7.756a7.45%207.45%200%200%201%202.396-5.218%207.61%207.61%200%200%201%205.431-2.006zm-.066%202.206a5.242%205.242%200%200%200-3.78%201.397%205.146%205.146%200%200%200-1.67%203.634c-.097%202.885%202.185%205.311%205.09%205.418a5.316%205.316%200%200%200%203.79-1.407%205.146%205.146%200%200%200%201.664-3.634c.102-2.884-2.18-5.306-5.094-5.408zm.865%202.622c1.295%200%202.343.687%202.343%201.548%200%20.848-1.051%201.545-2.343%201.545-1.295%200-2.343-.697-2.343-1.545%200-.86%201.048-1.548%202.343-1.548zm-20.11%2037.09a1.647%201.647%200%200%200-1.654%201.65%201.647%201.647%200%200%200%201.655%201.66%201.655%201.655%200%200%200%20.004-3.31zm0%20.258h.005c.74%200%201.335.625%201.335%201.402%200%20.777-.595%201.402-1.335%201.393-.74%200-1.34-.616-1.34-1.402%200-.771.6-1.393%201.335-1.393zm-.084.47c-.221%200-.369.022-.528.044v1.842h.298v-.794h.208c.24%200%20.356.088.404.323.036.244.08.414.124.47h.31c-.031-.057-.07-.168-.119-.456-.035-.272-.147-.417-.31-.448v-.014c.2-.057.363-.21.363-.448%200-.177-.061-.302-.173-.381-.111-.08-.293-.138-.577-.138zm-.013.226c.333%200%20.453.16.453.324%200%20.227-.209.315-.453.315h-.217v-.625c.053-.01.12-.014.217-.014z'/%3e%3c/svg%3e`,la=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M97.905%2067.885c.174%2018.8%2016.494%2025.057%2016.674%2025.137-.138.44-2.607%208.916-8.597%2017.669-5.178%207.568-10.553%2015.108-19.018%2015.266-8.318.152-10.993-4.934-20.504-4.934-9.508%200-12.479%204.776-20.354%205.086-8.172.31-14.395-8.185-19.616-15.724C15.822%2094.961%207.669%2066.8%2018.616%2047.791c5.438-9.44%2015.158-15.417%2025.707-15.571%208.024-.153%2015.598%205.398%2020.503%205.398%204.902%200%2014.106-6.676%2023.782-5.696%204.051.169%2015.421%201.636%2022.722%2012.324-.587.365-13.566%207.921-13.425%2023.639M82.272%2021.719c4.338-5.251%207.258-12.563%206.462-19.836-6.254.251-13.816%204.167-18.301%209.416-4.02%204.647-7.54%2012.087-6.591%2019.216%206.971.54%2014.091-3.542%2018.43-8.796'/%3e%3c/svg%3e`,ua=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill='%230078d4'%20d='M67.328%2067.331h60.669V128H67.328zm-67.325%200h60.669V128H.003zM67.328%200h60.669v60.669H67.328zM.003%200h60.669v60.669H.003z'/%3e%3c/svg%3e`,da=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M113.823%20104.595c-1.795-1.478-3.629-2.921-5.308-4.525-1.87-1.785-3.045-3.944-2.789-6.678.147-1.573-.216-2.926-2.113-3.452.446-1.154.864-1.928%201.033-2.753.188-.92.178-1.887.204-2.834.264-9.96-3.334-18.691-8.663-26.835-2.454-3.748-5.017-7.429-7.633-11.066-4.092-5.688-5.559-12.078-5.633-18.981a47.564%2047.564%200%2000-1.081-9.475C80.527%2011.956%2077.291%207.233%2071.422%204.7c-4.497-1.942-9.152-2.327-13.901-1.084-6.901%201.805-11.074%206.934-10.996%2014.088.074%206.885.417%2013.779.922%2020.648.288%203.893-.312%207.252-2.895%2010.34-2.484%202.969-4.706%206.172-6.858%209.397-1.229%201.844-2.317%203.853-3.077%205.931-2.07%205.663-3.973%2011.373-7.276%2016.5-1.224%201.9-1.363%204.026-.494%206.199.225.563.363%201.429.089%201.882-2.354%203.907-5.011%207.345-10.066%208.095-3.976.591-4.172%201.314-4.051%205.413.1%203.337.061%206.705-.28%2010.021-.363%203.555.008%204.521%203.442%205.373%207.924%201.968%2015.913%203.647%2023.492%206.854%203.227%201.365%206.465.891%209.064-1.763%202.713-2.771%206.141-3.855%209.844-3.859%206.285-.005%2012.572.298%2018.86.369%201.702.02%202.679.653%203.364%202.199.84%201.893%202.26%203.284%204.445%203.526%204.193.462%208.013-.16%2011.19-3.359%203.918-3.948%208.436-7.066%2013.615-9.227%201.482-.619%202.878-1.592%204.103-2.648%202.231-1.922%202.113-3.146-.135-5zM62.426%2024.12c.758-2.601%202.537-4.289%205.243-4.801%202.276-.43%204.203.688%205.639%203.246%201.546%202.758%202.054%205.64.734%208.658-1.083%202.474-1.591%202.707-4.123%201.868-.474-.157-.937-.343-1.777-.652.708-.594%201.154-1.035%201.664-1.382%201.134-.772%201.452-1.858%201.346-3.148-.139-1.694-1.471-3.194-2.837-3.175-1.225.017-2.262%201.167-2.4%202.915-.086%201.089.095%202.199.173%203.589-3.446-1.023-4.711-3.525-3.662-7.118zm-12.75-2.251c1.274-1.928%203.197-2.314%205.101-1.024%202.029%201.376%203.547%205.256%202.763%207.576-.285.844-1.127%201.5-1.716%202.241l-.604-.374c-.23-1.253-.276-2.585-.757-3.733-.304-.728-1.257-1.184-1.919-1.762-.622.739-1.693%201.443-1.757%202.228-.088%201.084.477%202.28.969%203.331.311.661%201.001%201.145%201.713%201.916l-1.922%201.51c-3.018-2.7-3.915-8.82-1.871-11.909zM87.34%2086.075c-.203%202.604-.5%202.713-3.118%203.098-1.859.272-2.359.756-2.453%202.964a101.744%20101.744%200%2000-.012%207.753c.061%201.77-.537%203.158-1.755%204.393-6.764%206.856-14.845%2010.105-24.512%208.926-4.17-.509-6.896-3.047-9.097-6.639.98-.363%201.705-.607%202.412-.894%203.122-1.27%203.706-3.955%201.213-6.277-1.884-1.757-3.986-3.283-6.007-4.892-1.954-1.555-3.934-3.078-5.891-4.629-1.668-1.323-2.305-3.028-2.345-5.188-.094-5.182.972-10.03%203.138-14.747%201.932-4.209%203.429-8.617%205.239-12.885.935-2.202%201.906-4.455%203.278-6.388%201.319-1.854%202.134-3.669%201.988-5.94-.084-1.276-.016-2.562-.016-3.843l.707-.352c1.141.985%202.302%201.949%203.423%202.959%204.045%203.646%207.892%203.813%2012.319.67%201.888-1.341%203.93-2.47%205.927-3.652.497-.294%201.092-.423%201.934-.738%202.151%205.066%204.262%2010.033%206.375%2015%201.072%202.524%201.932%205.167%203.264%207.547%202.671%204.775%204.092%209.813%204.07%2015.272-.012%202.83.137%205.67-.081%208.482z'/%3e%3c/svg%3e`,fa=[[`server`,`Server`],[`linux`,`Linux`],[`amazonlinux`,`Amazon Linux`],[`ubuntu`,`Ubuntu`],[`debian`,`Debian`],[`redhat`,`Red Hat Enterprise Linux`],[`fedora`,`Fedora`],[`centos`,`CentOS`],[`rocky`,`Rocky Linux`],[`almalinux`,`AlmaLinux`],[`arch`,`Arch Linux`],[`alpine`,`Alpine Linux`],[`opensuse`,`openSUSE / SUSE`],[`freebsd`,`FreeBSD`],[`macos`,`macOS`],[`windows`,`Windows`]],pa={ubuntu:ea,debian:ta,redhat:na,fedora:ra,centos:ia,rocky:aa,almalinux:oa,arch:sa,opensuse:ca,macos:la,windows:ua,linux:da,amazonlinux:da,alpine:da};function ma({os:e,colour:t=``,compact:n=!1}){let r=C(),i=e===`server`?r(`host.osGeneric`):fa.find(([t])=>t===e)?.[1]??r(`host.osUnknown`),a=pa[e??``];return(0,z.jsxs)(`span`,{role:`img`,"aria-label":i,title:i,className:`relative grid ${n?`size-5`:`size-6`} shrink-0 place-items-center text-ink-muted`,children:[a===void 0?(0,z.jsx)(B,{name:`connections`,className:n?`size-4`:`size-5`}):(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`${n?`size-4`:`size-5`} bg-current [mask-position:center] [mask-repeat:no-repeat] [mask-size:contain]`,style:{maskImage:`url("${a}")`}}),t===``?null:(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border border-card`,style:{backgroundColor:t}})]})}function ha({open:e,anchorRef:t,menuRef:n}){(0,P.useLayoutEffect)(()=>{if(!e)return;let r=()=>{let e=t.current,r=n.current;if(e===null||r===null)return;let i=window.visualViewport,a=(i?.offsetLeft??0)+8,o=(i?.offsetTop??0)+8,s=Math.max(0,(i?.width??window.innerWidth)-16),c=Math.max(0,(i?.height??window.innerHeight)-16);r.style.maxWidth=`${s}px`,r.style.maxHeight=`${c}px`;let l=e.getBoundingClientRect(),u=r.getBoundingClientRect(),d=l.bottom+4+u.height<=o+c?l.bottom+4:l.top-u.height-4;r.style.left=`${Math.max(a,Math.min(l.right-u.width,a+s-u.width))}px`,r.style.top=`${Math.max(o,Math.min(d,o+c-u.height))}px`};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),window.visualViewport?.addEventListener(`resize`,r),window.visualViewport?.addEventListener(`scroll`,r),()=>{window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0),window.visualViewport?.removeEventListener(`resize`,r),window.visualViewport?.removeEventListener(`scroll`,r)}},[t,n,e])}function ga({alias:e,path:t,busy:n,opening:r=!1,onOpenSettings:i,onConnect:a}){let o=C(),[s,c]=(0,P.useState)(!1),l=(0,P.useRef)(null),u=(0,P.useRef)(null),d=(0,P.useRef)(null);tn({open:s,containerRefs:[l,d],onDismiss:()=>c(!1),returnFocusRef:u}),Cn({open:s,menuRef:d,onClose:()=>c(!1)}),ha({open:s,anchorRef:u,menuRef:d});let f=Ht({path:t,alias:e,panel:`Basic`,advanced:`Jump`});return(0,z.jsxs)(`div`,{ref:l,className:`relative shrink-0`,children:[(0,z.jsx)(`button`,{ref:u,type:`button`,"aria-label":o(`home.connectionActions`,{alias:e}),"aria-haspopup":`menu`,"aria-expanded":s,onClick:()=>c(e=>!e),className:`pointer-events-auto flex size-8 items-center justify-center rounded-md text-ink-muted hover:bg-hover hover:text-ink`,children:(0,z.jsx)(B,{name:`moreHorizontal`,className:`size-4`})}),s?(0,Wt.createPortal)((0,z.jsxs)(`div`,{ref:d,role:`menu`,className:`fixed z-50 w-56 overflow-y-auto rounded-lg border border-line bg-card p-1 shadow-lg`,children:[(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{c(!1),i(f)},className:`block min-h-10 w-full rounded-md px-3 py-2 text-left text-sm text-ink hover:bg-hover focus:bg-hover focus:outline-none md:min-h-0`,children:o(`home.openConnectionSettings`)}),(0,z.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:n,onClick:()=>{c(!1),a()},className:`block min-h-10 w-full rounded-md px-3 py-2 text-left text-sm text-ink hover:bg-hover focus:bg-hover focus:outline-none disabled:text-ink-faint md:min-h-0`,children:o(r?`home.opening`:`home.connect`)})]}),document.body):null]})}var _a=`sshc.home.quick-connect-view`;function va(){try{return window.localStorage.getItem(_a)===`list`?`list`:`panel`}catch{return`panel`}}function ya(e){try{window.localStorage.setItem(_a,e)}catch{}}function ba(e,t,n){let r=e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e;return r===``?``:`${t===``?``:`${t}@`}${r}${n===``?``:`:${n}`}`}function xa(e){return ba(e.host.hostName??e.identity.alias,e.host.user??``,e.host.port??`22`)}function Sa(e,t){let n=t.trim().toLocaleLowerCase();return n===``||[e.identity.alias,e.identity.path,e.group,xa(e),...e.host.patterns,...e.tags].some(e=>e.toLocaleLowerCase().includes(n))}function Ca(e,t){return t===``||e.group===t||e.group.startsWith(`${t}/`)}function wa({overview:e,recent:t=[],launching:n,onConnect:r,onOpenSettings:i}){let o=C(),[s,c]=(0,P.useState)(``),[l,u]=(0,P.useState)([]),[d,f]=(0,P.useState)(va),[p,m]=(0,P.useState)(``),h=(0,P.useRef)(`keyboard`),g=(0,P.useMemo)(()=>$i(e),[e]),_=(0,P.useMemo)(()=>new Map(t.map((e,t)=>[e.alias,{connection:e,position:t}])),[t]),v=(0,P.useMemo)(()=>new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}),[]),y=l.at(-1)??``,b=g.visibleChildrenByParent.get(y)??[];(0,P.useEffect)(()=>{l.every(e=>g.groupByName.has(e))||u([])},[l,g.groupByName]);let x=(0,P.useMemo)(()=>g.servers.filter(e=>Ca(e,y)&&Sa(e,s)).sort((e,t)=>{let n=_.get(e.identity.alias)?.position,r=_.get(t.identity.alias)?.position;return n!==void 0&&r!==void 0?n-r:n===void 0?r===void 0?v.compare(e.identity.alias,t.identity.alias):1:-1}),[v,y,g.servers,s,_]);function S(e){f(e),ya(e)}function w(e){let t=e.identity.alias,a=_.get(t)?.connection,s=xa(e),c=a===void 0?``:o(`home.lastConnected`,{at:Ta(a.lastConnectedAt)}),l=p===t,u=n===t,f=d===`panel`,g=()=>{n===``&&(m(t),r(t))};return(0,z.jsxs)(`li`,{"aria-busy":u,className:`relative min-w-0 rounded-lg border transition-colors ${l||u?`border-accent bg-select-fill`:`border-line bg-card hover:border-control-line hover:bg-hover`}`,children:[(0,z.jsxs)(`button`,{type:`button`,"data-touch-compact":!0,"aria-label":o(u?`home.openingConnection`:`home.connectGesture`,{alias:t}),"aria-pressed":l,disabled:n!==``,onPointerDown:e=>{h.current=e.pointerType},onClick:()=>{if(h.current===`mouse`){m(t);return}g()},onDoubleClick:()=>{h.current===`mouse`&&g()},onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),g())},className:`flex w-full min-w-0 items-center gap-3 rounded-lg py-3 pl-3 pr-14 text-left disabled:cursor-wait ${f?`min-h-24`:`min-h-20`}`,children:[(0,z.jsx)(ma,{os:e.os,colour:e.colour}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:`truncate text-sm font-semibold text-ink`,title:t,children:t}),e.duplicateAlias?(0,z.jsx)(`span`,{"aria-label":o(`browser.duplicateAlias`),className:`text-notice-ink`,children:`⧉`}):null]}),(0,z.jsx)(`span`,{className:`mt-1 block truncate font-mono text-xs text-ink-muted`,title:s,children:s}),(0,z.jsx)(`span`,{"aria-live":`polite`,children:u?(0,z.jsxs)(`span`,{className:`mt-1.5 flex items-center gap-1.5 text-xs text-ink-muted`,children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`size-3 shrink-0 animate-spin rounded-full border-2 border-current border-r-transparent motion-reduce:animate-none`}),o(`home.opening`)]}):e.group===``&&c===``?null:(0,z.jsxs)(`span`,{className:`mt-1.5 flex min-w-0 items-center gap-1.5 text-[11px] text-ink-faint`,children:[e.group===``?null:(0,z.jsx)(`span`,{className:`truncate`,title:e.group,children:e.group}),e.group===``||c===``?null:(0,z.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),c===``?null:(0,z.jsx)(`span`,{className:`truncate`,title:c,children:c})]})})]})]}),(0,z.jsx)(`div`,{className:`pointer-events-none absolute right-2 top-2`,children:(0,z.jsx)(ga,{alias:t,path:e.identity.path,busy:n!==``,opening:u,onOpenSettings:i,onConnect:g})})]},Yi(e.identity))}return(0,z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,z.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto] gap-2`,children:[(0,z.jsxs)(`label`,{className:`relative min-w-0`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:o(`home.search`)}),(0,z.jsx)(B,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint`}),(0,z.jsx)(`input`,{type:`search`,value:s,onChange:e=>c(e.currentTarget.value),placeholder:o(`home.searchPlaceholder`),className:`${E} min-h-10 w-full pl-9 md:min-h-0`})]}),(0,z.jsx)(`div`,{className:`flex`,children:(0,z.jsx)(a,{label:o(`home.viewMode`),value:d,options:[{value:`panel`,label:o(`home.panelView`)},{value:`list`,label:o(`home.listView`)}],onChange:S})})]}),b.length===0&&l.length===0?null:(0,z.jsxs)(`section`,{"aria-label":o(`home.groups`),className:`flex flex-col gap-2`,children:[l.length===0?null:(0,z.jsxs)(`nav`,{"aria-label":o(`home.groupBreadcrumb`),className:`flex min-w-0 items-center gap-1 text-xs text-ink-muted`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>u([]),className:`shrink-0 rounded px-1 py-0.5 hover:bg-card hover:text-ink`,children:o(`home.allGroups`)}),l.map((e,t)=>{let n=t===l.length-1;return(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`text-ink-faint`,children:`/`}),(0,z.jsx)(`button`,{type:`button`,"aria-current":n?`page`:void 0,onClick:()=>u(l.slice(0,t+1)),className:`truncate rounded px-1 py-0.5 hover:bg-card hover:text-ink ${n?`font-medium text-ink`:``}`,children:g.groupByName.get(e)?.label??e})]},e)})]}),b.length===0?null:(0,z.jsx)(`div`,{role:`group`,"aria-label":o(`home.groupFilter`),className:`flex flex-wrap gap-2`,children:b.map(e=>{let t=g.visibleChildrenByParent.get(e.name)?.length??0;return(0,z.jsxs)(`button`,{type:`button`,title:e.name,"aria-label":o(`home.openGroup`,{name:e.name,count:e.descendantCount}),onClick:()=>u([...l,e.name]),className:`flex min-h-9 min-w-0 max-w-full items-center gap-2 rounded-md border border-line bg-card px-3 py-1.5 text-left transition-colors hover:border-control-line hover:bg-hover`,children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${e.colour===``?`bg-accent`:``}`,style:e.colour===``?void 0:{backgroundColor:e.colour}}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium text-ink`,children:e.label}),(0,z.jsx)(`span`,{className:`shrink-0 font-mono text-xs tabular-nums text-ink-muted`,children:e.descendantCount}),t===0?null:(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-ink-faint`,children:`›`})]},e.name)})})]}),(0,z.jsx)(`h3`,{className:`text-xs font-semibold text-ink`,children:o(`home.connectionCount`,{count:x.length})}),x.length===0?(0,z.jsx)(`p`,{className:`border-y border-line bg-surface-subtle p-4 text-sm text-ink-muted`,children:g.servers.length===0?o(`home.noConnections`):o(`home.noMatches`)}):(0,z.jsx)(`ul`,{"aria-label":o(`home.connectionList`),className:d===`panel`?`grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3`:`flex flex-col gap-1`,children:x.map(w)})]})}function Ta(e){let t=new Date(e);return Number.isNaN(t.valueOf())?e:new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(t)}function Ea(e){if(e.pane!==void 0)return{pane:{id:e.pane.id,alias:e.pane.alias,...e.pane.kind===`shell`?{kind:e.pane.kind}:{}}};let t=e.split;return{split:{direction:t.direction,ratio:t.ratio,first:Ea(t.first),second:Ea(t.second)}}}function Da(e){let t=r(`TerminalWorkspace`,e);return{...t,layout:Ea(t.layout)}}var Oa={async list(){return r(`WorkspaceList`,await u.read(`/api/v1/workspaces`)).workspaces.map(Da)},async create(e){return Da(await u.mutate(`/api/v1/workspaces`,{method:`POST`,headers:c,body:JSON.stringify(e)}))},async update(e,t){return Da(await u.mutate(`/api/v1/workspaces/${encodeURIComponent(e)}`,{method:`PUT`,headers:c,body:JSON.stringify(t)}))},async remove(e){await u.mutate(`/api/v1/workspaces/${encodeURIComponent(e)}`,{method:`DELETE`})},async restore(e){return Da(r(`WorkspaceRestorePlan`,await u.mutate(`/api/v1/workspaces/${encodeURIComponent(e)}/restore`,{method:`POST`})).workspace)}};function ka(e,t){let n=za(e),r=Ma(n);return{root:n,focusedPaneId:r.includes(t)?t:r[0]??``}}function Aa(e){return{layout:Ba(e.root),focusedPaneId:e.focusedPaneId}}function ja(e,t){switch(t.type){case`focus`:return Ma(e.root).includes(t.paneId)?{...e,focusedPaneId:t.paneId}:e;case`split`:{if(Ma(e.root).length>=4||Ma(e.root).includes(t.pane.id)||!Va(t.pane))return e;let n=Ia(e.root,t.paneId,e=>({split:{direction:t.direction,ratio:50,first:{pane:e},second:{pane:{...t.pane,state:`reconnect_required`}}}}));return n===e.root?e:{root:n,focusedPaneId:t.pane.id}}case`dock-pane`:{if(!Va(t.pane)||t.pane.id===t.targetPaneId)return e;let n=Ua(e.root,t.pane.id);if(n===void 0&&Ma(e.root).length>=4)return e;let r=n===void 0?e.root:La(e.root,t.pane.id);if(r===null||Ua(r,t.targetPaneId)===void 0)return e;let i=t.edge===`left`||t.edge===`right`?`horizontal`:`vertical`,a=t.edge===`left`||t.edge===`top`,o=n??t.pane,s=n!==void 0&&Ma(e.root).length===2&&e.root.split?.direction===i?e.root.split.ratio:50,c=Ia(r,t.targetPaneId,e=>({split:{direction:i,ratio:s,first:a?{pane:o}:{pane:e},second:a?{pane:e}:{pane:o}}}));return c===r?e:{root:c,focusedPaneId:o.id}}case`resize-split`:{let n=Math.min(90,Math.max(10,Math.round(t.ratio))),r=Ra(e.root,t.path,n);return r===e.root?e:{...e,root:r}}case`close`:{let n=La(e.root,t.paneId);if(n===null||n===e.root)return e;let r=Ma(n);return{root:n,focusedPaneId:e.focusedPaneId===t.paneId?r[0]??``:e.focusedPaneId}}case`swap-panes`:{if(t.sourcePaneId===t.targetPaneId)return e;let n=Ua(e.root,t.sourcePaneId),r=Ua(e.root,t.targetPaneId);return n===void 0||r===void 0?e:{...e,root:Ha(e.root,e=>e.id===n.id?r:e.id===r.id?n:e)}}case`connection-starting`:return Fa(e,t.paneId,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`connecting`}));case`connection-started`:return t.sessionId===``?e:Fa(e,t.paneId,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`connected`,sessionId:t.sessionId}));case`connection-failed`:return Fa(e,t.paneId,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`failed`,problem:t.problem}));case`engine-restarted`:return{...e,root:Ha(e.root,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`reconnect_required`}))}}}function Ma(e){let t=[];return Wa(e,e=>t.push(e.id)),t}function Na(e){let t=[];return Wa(e,e=>{e.sessionId!==void 0&&t.push(e.sessionId)}),t}function Pa(e){return e.pane===void 0?Pa(e.split.first)+Pa(e.split.second):1}function Fa(e,t,n){let r=Ia(e.root,t,e=>({pane:n(e)}));return r===e.root?e:{...e,root:r}}function Ia(e,t,n){if(e.pane!==void 0)return e.pane.id===t?n(e.pane):e;let r=Ia(e.split.first,t,n);if(r!==e.split.first)return{split:{...e.split,first:r}};let i=Ia(e.split.second,t,n);return i===e.split.second?e:{split:{...e.split,second:i}}}function La(e,t){if(e.pane!==void 0)return e.pane.id===t?null:e;let n=La(e.split.first,t);if(n===null)return e.split.second;if(n!==e.split.first)return{split:{...e.split,first:n}};let r=La(e.split.second,t);return r===null?e.split.first:r===e.split.second?e:{split:{...e.split,second:r}}}function Ra(e,t,n){if(e.split===void 0)return e;if(t.length===0)return e.split.ratio===n?e:{split:{...e.split,ratio:n}};let[r,...i]=t;if(r===void 0)return e;let a=Ra(e.split[r],i,n);return a===e.split[r]?e:{split:{...e.split,[r]:a}}}function za(e){return e.pane===void 0?{split:{direction:e.split.direction,ratio:e.split.ratio,first:za(e.split.first),second:za(e.split.second)}}:{pane:{...e.pane,state:`reconnect_required`}}}function Ba(e){return e.pane===void 0?{split:{direction:e.split.direction,ratio:e.split.ratio,first:Ba(e.split.first),second:Ba(e.split.second)}}:{pane:{id:e.pane.id,alias:e.pane.alias,...e.pane.kind===void 0?{}:{kind:e.pane.kind}}}}function Va(e){return e.id!==``&&e.alias!==``&&(e.kind===void 0||e.kind===`shell`)}function Ha(e,t){return e.pane===void 0?{split:{...e.split,first:Ha(e.split.first,t),second:Ha(e.split.second,t)}}:{pane:t(e.pane)}}function Ua(e,t){return e.pane===void 0?Ua(e.split.first,t)??Ua(e.split.second,t):e.pane.id===t?e.pane:void 0}function Wa(e,t){if(e.pane!==void 0){t(e.pane);return}Wa(e.split.first,t),Wa(e.split.second,t)}var Ga=()=>Ni.overview(),Ka=()=>Ji.syncStatus(),qa=()=>hn.recentConnections(),Ja=()=>Oa.list(),Ya=e=>Be.openTerminalSession({kind:`ssh`,alias:e}),Xa=new Set([`group_empty`]);function Za({loadOverview:e=Ga,loadSync:t=Ka,loadRecent:n=qa,loadWorkspaces:r=Ja,launch:a=Ya,onNavigate:o,onNavigateLocation:s,onConsoleOpened:c,onOpenWorkspace:l=()=>void 0}){let u=C(),[d,f]=(0,P.useState)(null),[m,h]=(0,P.useState)(!0),[_,y]=(0,P.useState)(null),[b,x]=(0,P.useState)([]),[S,w]=(0,P.useState)([]),[T,E]=(0,P.useState)(``),D=(0,P.useRef)(!1),[O,k]=(0,P.useState)(``);(0,P.useEffect)(()=>{let i=!0;return Promise.allSettled([e(),t(),n(),r()]).then(([e,t,n,r])=>{i&&(e.status===`fulfilled`?f(e.value):k(u(`home.loadFailed`)),t.status===`fulfilled`&&y(t.value),n.status===`fulfilled`&&x(n.value.connections),r.status===`fulfilled`&&w(r.value),h(!1))}),()=>{i=!1}},[e,t,n,r,u]);async function A(e){if(!D.current){D.current=!0,E(e),k(``);try{let t=await a(e);c?.(t.session.id)}catch(e){k(i(e)===`terminal_session_limit`?u(`terminal.limitRefused`):u(`terminal.openFailed`))}finally{D.current=!1,E(``)}}}let ee=d===null?0:d.diagnostics.filter(e=>e.severity===`error`||e.severity===`warning`).length+d.notices.filter(e=>!Xa.has(e.code)).length,j=d?.pending?.length??0,te=ee+j;return(0,z.jsxs)(`section`,{"aria-labelledby":`home-heading`,className:`mx-auto flex w-full max-w-6xl flex-col gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line pb-3`,children:[(0,z.jsx)(`h2`,{id:`home-heading`,className:`text-xl font-semibold tracking-tight`,children:u(`home.heading`)}),(0,z.jsx)(v,{className:`min-h-10 md:min-h-0`,onClick:()=>o(`Connections`),children:u(`home.manageConnections`)})]}),O===``?null:(0,z.jsx)(g,{tone:`danger`,children:O}),(0,z.jsx)(`section`,{"aria-label":u(`home.quickConnect`),children:m?(0,z.jsx)(ai,{tone:`loading`,title:u(`home.loading`)}):d===null?null:(0,z.jsx)(wa,{overview:d,recent:b,launching:T,onConnect:e=>void A(e),onOpenSettings:s})}),te===0?null:(0,z.jsxs)(`section`,{"aria-label":u(`home.attention`),className:`flex flex-wrap items-center gap-x-4 gap-y-2 rounded-lg border border-notice-line bg-notice px-4 py-3`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 text-sm text-notice-ink`,children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full bg-notice-ink`}),(0,z.jsx)(`p`,{children:u(`home.workspaceAttention`,{count:te})})]}),ee===0?null:(0,z.jsx)(v,{onClick:()=>o(`Config`),children:u(`home.openConfig`)}),j===0?null:(0,z.jsx)(v,{onClick:()=>o(`History`),children:u(`home.recoverChanges`)})]}),S.length===0?null:(0,z.jsxs)(p,{as:`section`,"aria-labelledby":`saved-workspaces-heading`,radius:`sm`,children:[(0,z.jsxs)(`div`,{className:`border-b border-line px-4 py-3 sm:px-5`,children:[(0,z.jsx)(`h3`,{id:`saved-workspaces-heading`,className:`font-semibold`,children:u(`home.savedWorkspaces`)}),(0,z.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-muted`,children:u(`home.savedWorkspacesHint`)})]}),(0,z.jsx)(`ul`,{"aria-label":u(`home.savedWorkspaceList`),className:`divide-y divide-line`,children:S.map(e=>(0,z.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:px-5`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`p`,{className:`truncate text-sm font-semibold text-ink`,children:e.name}),(0,z.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-ink-muted`,children:[u(`home.workspacePanes`,{count:Pa(e.layout)}),` · `,(0,z.jsx)(`time`,{dateTime:e.updatedAt,children:u(`home.workspaceUpdated`,{at:Qa(e.updatedAt)})})]})]}),(0,z.jsx)(v,{kind:`primary`,className:`min-h-10 w-full shrink-0 sm:w-auto md:min-h-0`,onClick:()=>l(e.id),children:u(`home.openWorkspace`)})]},e.id))})]}),(0,z.jsxs)(`section`,{"aria-label":u(`home.sync`),className:`flex flex-wrap items-center gap-x-3 gap-y-2 border-t border-line pt-3 text-xs text-ink-muted`,children:[(0,z.jsx)(B,{name:`sync`,className:`size-4 shrink-0`}),(0,z.jsx)(`p`,{className:`min-w-0 flex-1`,children:_===null?u(`home.syncUnavailable`):_.configured?_.synced?u(`home.syncLast`,{at:_.lastSyncedAt===void 0?`—`:Qa(_.lastSyncedAt),count:_.fileCount??0}):u(`home.syncNever`):u(`home.syncNotConfigured`)}),(0,z.jsx)(v,{onClick:()=>o(`Sync`),children:u(`home.openSync`)})]})]})}function Qa(e){let t=new Date(e);return Number.isNaN(t.valueOf())?e:new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(t)}var $a={system:`shell.themeSystem`,light:`shell.themeLight`,dark:`shell.themeDark`},eo={en:`shell.languageEnglish`,ja:`shell.languageJapanese`};function to({groups:e,onNavigate:t}){let{t:n,locale:r,setLocale:i}=w(),{theme:a,setTheme:o}=st();function s(e,n){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),t(n))}return(0,z.jsxs)(`section`,{"aria-labelledby":`menu-heading`,className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,z.jsx)(`div`,{className:`border-b border-line pb-3`,children:(0,z.jsx)(`h2`,{id:`menu-heading`,className:`text-xl font-semibold tracking-tight text-ink`,children:n(`section.menu`)})}),(0,z.jsxs)(`div`,{className:`grid items-start gap-x-8 gap-y-7 lg:grid-cols-2 xl:grid-cols-3`,children:[e.map(e=>(0,z.jsxs)(`section`,{"aria-labelledby":`menu-${e.label}`,children:[(0,z.jsx)(`h3`,{id:`menu-${e.label}`,className:`px-1 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:n(e.label)}),(0,z.jsx)(`ul`,{className:`mt-2 overflow-hidden rounded border border-line bg-card`,children:e.items.map((e,t)=>{let r=n(e.label);return(0,z.jsx)(`li`,{className:t===0?``:`border-t border-line`,children:(0,z.jsxs)(`a`,{href:e.href,"aria-label":n(`menu.open`,{section:r}),onClick:t=>s(t,e.href),className:`group flex min-h-14 items-center gap-3 px-3 py-2.5 transition-colors hover:bg-hover`,children:[(0,z.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded bg-control text-ink-muted group-hover:text-ink`,children:(0,z.jsx)(B,{name:e.icon,className:`size-4`})}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-ink`,children:r}),(0,z.jsx)(B,{name:`chevronRight`,className:`size-4 shrink-0 text-ink-faint group-hover:text-ink-muted`})]})},e.key)})})]},e.label)),(0,z.jsxs)(`section`,{"aria-labelledby":`menu-display-settings`,children:[(0,z.jsx)(`h3`,{id:`menu-display-settings`,className:`px-1 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:n(`menu.displaySettings`)}),(0,z.jsxs)(`div`,{className:`mt-2 grid gap-4 rounded border border-line bg-card p-4`,children:[(0,z.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-ink-muted`,children:[n(`menu.theme`),(0,z.jsx)(`select`,{"aria-label":n(`menu.theme`),value:a,onChange:e=>o(e.target.value),className:`${O} h-10 w-full text-sm`,children:Je.map(e=>(0,z.jsx)(`option`,{value:e,children:n($a[e])},e))})]}),(0,z.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-ink-muted`,children:[n(`menu.language`),(0,z.jsx)(`select`,{"aria-label":n(`menu.language`),value:r,onChange:e=>i(e.target.value),className:`${O} h-10 w-full text-sm`,children:te.map(e=>(0,z.jsx)(`option`,{value:e,children:n(eo[e])},e))})]})]})]}),(0,z.jsxs)(`section`,{"aria-labelledby":`menu-others`,className:`grid gap-x-8 lg:col-span-2 lg:grid-cols-2 xl:col-span-3 xl:grid-cols-3`,children:[(0,z.jsx)(`h3`,{id:`menu-others`,className:`col-span-full px-1 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:n(`menu.others`)}),(0,z.jsx)(`ul`,{className:`mt-2 overflow-hidden rounded border border-line bg-card`,children:(0,z.jsx)(`li`,{children:(0,z.jsxs)(`a`,{href:At(`License`),onClick:e=>s(e,At(`License`)),"aria-label":n(`menu.open`,{section:n(`section.license`)}),className:`flex min-h-14 items-center gap-3 px-3 py-2.5 hover:bg-hover`,children:[(0,z.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded bg-control text-ink-muted`,children:(0,z.jsx)(B,{name:`inspector`,className:`size-4`})}),(0,z.jsx)(`span`,{className:`flex-1 text-sm font-medium text-ink`,children:n(`section.license`)}),(0,z.jsx)(B,{name:`chevronRight`,className:`size-4 text-ink-faint`})]})})})]})]})]})}var no=`modulepreload`,ro=function(e){return`/`+e},io={},ao=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=ro(t,n),t=s(t),t in io)return;io[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:no,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},oo=(0,P.lazy)(()=>ao(()=>import(`./LicensePage-CwJdmrxm.js`).then(e=>({default:e.LicensePage})),__vite__mapDeps([0,1,2]))),so=(0,P.lazy)(()=>ao(async()=>{let{ConnectionsPage:e}=await import(`./ConnectionsPage-BcsnqY3h.js`);return{ConnectionsPage:e}},__vite__mapDeps([3,1,4,2,5,6,7,8,9,10,11])).then(({ConnectionsPage:e})=>({default:e}))),co=(0,P.lazy)(()=>ao(async()=>{let{ConfigExplorer:e}=await import(`./ConfigExplorer-BB1e3kuF.js`);return{ConfigExplorer:e}},__vite__mapDeps([12,1,4,2,8,13])).then(({ConfigExplorer:e})=>({default:e}))),lo=(0,P.lazy)(()=>ao(async()=>{let{GroupsPanel:e}=await import(`./GroupsPanel-B9EFjIFq.js`);return{GroupsPanel:e}},__vite__mapDeps([14,1,4,2,7,8,13])).then(({GroupsPanel:e})=>({default:e}))),U=(0,P.lazy)(()=>ao(async()=>{let{HistoryPanel:e}=await import(`./HistoryPanel-D75T25CW.js`);return{HistoryPanel:e}},__vite__mapDeps([15,1,4,2,13])).then(({HistoryPanel:e})=>({default:e}))),W=(0,P.lazy)(()=>ao(async()=>{let{KeysScreen:e}=await import(`./KeysScreen-CtJ38_1X.js`);return{KeysScreen:e}},__vite__mapDeps([16,1,4,2,6,9,13,17])).then(({KeysScreen:e})=>({default:e}))),uo=(0,P.lazy)(()=>ao(async()=>{let{DiagnosticsPanel:e}=await import(`./DiagnosticsPanel-BHiHI9ah.js`);return{DiagnosticsPanel:e}},__vite__mapDeps([18,1,4,2,5,13])).then(({DiagnosticsPanel:e})=>({default:e}))),fo=(0,P.lazy)(()=>ao(async()=>{let{SecretsPanel:e}=await import(`./SecretsPanel-DwbwPwGg.js`);return{SecretsPanel:e}},__vite__mapDeps([19,1,4,2,6,13])).then(({SecretsPanel:e})=>({default:e}))),po=(0,P.lazy)(()=>ao(async()=>{let{SettingsPanel:e}=await import(`./SettingsPanel-tyxfeXty.js`);return{SettingsPanel:e}},__vite__mapDeps([20,1,4,2,10,11,13])).then(({SettingsPanel:e})=>({default:e}))),mo=(0,P.lazy)(()=>ao(async()=>{let{SyncPanel:e}=await import(`./SyncPanel-9DIuhm2Y.js`);return{SyncPanel:e}},__vite__mapDeps([21,1,4,2,13])).then(({SyncPanel:e})=>({default:e}))),ho=(0,P.lazy)(()=>ao(async()=>{let{KnownHostsPanel:e}=await import(`./KnownHostsPanel-CVuqmEac.js`);return{KnownHostsPanel:e}},__vite__mapDeps([22,1,4,2,13,17])).then(({KnownHostsPanel:e})=>({default:e}))),go=(0,P.lazy)(()=>ao(async()=>{let{RemoteKeyPanel:e}=await import(`./RemoteKeyPanel-S-URk5vh.js`);return{RemoteKeyPanel:e}},__vite__mapDeps([23,1,4,2,9,13])).then(({RemoteKeyPanel:e})=>({default:e}))),_o=(0,P.lazy)(()=>ao(async()=>{let{SFTPWorkspace:e}=await import(`./SFTPWorkspace-Cifnx1fQ.js`);return{SFTPWorkspace:e}},__vite__mapDeps([24,1,4,2,25,17])).then(({SFTPWorkspace:e})=>({default:e}))),vo=(0,P.lazy)(()=>ao(async()=>{let{SnippetsPanel:e}=await import(`./SnippetsPanel-DGx5bdAa.js`);return{SnippetsPanel:e}},__vite__mapDeps([26,1,4,2])).then(({SnippetsPanel:e})=>({default:e}))),G={Home:`section.home`,Menu:`section.menu`,Connections:`section.connections`,Terminal:`section.terminal`,Files:`section.files`,Snippets:`section.snippets`,Config:`section.config`,Groups:`section.groups`,Keys:`section.keys`,"Known Hosts":`section.knownHosts`,"Remote Keys":`section.remoteKeys`,Diagnostics:`section.diagnostics`,Passwords:`section.passwords`,"Key Passphrases":`section.keyPassphrases`,OTP:`section.otp`,Settings:`section.settings`,Sync:`section.sync`,History:`section.history`,License:`section.license`},yo={Home:`home`,Menu:`menu`,Connections:`connections`,Terminal:`terminal`,Files:`config`,Snippets:`terminal`,Config:`config`,Groups:`groups`,Keys:`keys`,"Known Hosts":`knownHosts`,"Remote Keys":`remoteKeys`,Diagnostics:`diagnostics`,Passwords:`secrets`,"Key Passphrases":`keys`,OTP:`secrets`,Settings:`settings`,Sync:`sync`,History:`history`,License:`inspector`},bo=[`Home`,`Connections`,`Files`],xo=`primary-navigation`,So=[{label:`shell.navStart`,sections:bo},{label:`shell.navConnections`,sections:[`Config`,`Groups`]},{label:`shell.navKeysHosts`,sections:[`Keys`,`Known Hosts`,`Remote Keys`]},{label:`shell.navMaintenance`,sections:[`Diagnostics`,`Snippets`,`Settings`,`Sync`,`History`]}];function Co(e){return e.map(e=>({key:e,label:G[e],icon:yo[e],href:At(e)}))}var wo=[...So.slice(1,3).map(e=>({label:e.label,items:Co(e.sections)})),{label:`shell.navVault`,items:Co([`Passwords`,`Key Passphrases`,`OTP`])},{label:`section.settings`,items:Ct.map(e=>({key:e,label:wt[e].label,icon:wt[e].icon,href:wt[e].path}))},{label:`shell.navMaintenance`,items:Co([`Diagnostics`,`Snippets`,`Sync`,`History`])}];function To(e){return e.section===`Terminal`?null:e.section===`Connections`?(0,z.jsx)(so,{onInspector:e.shell.onInspector,creationDraft:e.handoff.connectionDraft,onCreationDraftChange:e.handoff.onConnectionDraftChange,onNavigateForCreation:e.navigation.onNavigateForCreation,location:e.navigation.location,onNavigateLocation:e.navigation.onNavigateLocation,onNavigationBlockerChange:e.navigation.onNavigationBlockerChange,preferredKey:e.handoff.connectionKey,onPreferredKeyApplied:e.handoff.onConnectionKeyApplied,consoles:e.shell.consoles,onShowConsole:e.shell.onShowConsole}):(0,z.jsx)(`div`,{className:e.section===`Files`?`h-full overflow-hidden p-2 md:px-5 md:pb-5 md:pt-3`:`h-full overflow-y-auto p-4 md:p-5`,children:(0,z.jsx)(Eo,{...e})})}function Eo({section:e,navigation:t,handoff:n,shell:r,declared:i,sftpTarget:a,onSftpTargetHandled:o}){let{fileTarget:s,onNavigate:c,onNavigateLocation:l}=t,{onLock:u,onVaultChanged:d,onInspector:f,consoles:p,onShowConsole:m,onOpenWorkspace:h,onTerminalSettingsChange:g}=r;return e===`Home`?(0,z.jsx)(Za,{onNavigate:c,onNavigateLocation:l,onConsoleOpened:m,onOpenWorkspace:h}):e===`License`?(0,z.jsx)(oo,{}):e===`Menu`?(0,z.jsx)(to,{groups:wo,onNavigate:l}):e===`Config`?(0,z.jsx)(co,{target:s}):e===`Files`?(0,z.jsx)(_o,{aliases:i.knownAliases,hosts:i.hosts,target:a,onTargetHandled:o,onNavigationBlockerChange:t.onNavigationBlockerChange,onNavigateLocation:l,onOpenTerminal:async(e,t)=>{let n=await p.open({kind:`ssh`,alias:e,cwd:t});n!==null&&m(n.id)}}):e===`Snippets`?(0,z.jsx)(vo,{aliases:i.knownAliases,selectedSnippetId:new URLSearchParams(t.location.search).get(`snippet`)}):e===`Groups`?(0,z.jsx)(lo,{onInspector:f}):e===`Passwords`||e===`Key Passphrases`||e===`OTP`?(0,z.jsx)(fo,{kind:e===`Passwords`?`password`:e===`Key Passphrases`?`key_passphrase`:`totp`,onLock:u}):e===`Settings`?(0,z.jsx)(po,{page:Et(t.location.pathname)??`Engine`,consoles:p,onTerminalSettingsChange:g,onVaultChanged:d}):e===`Sync`?(0,z.jsx)(mo,{}):e===`History`?(0,z.jsx)(U,{}):e===`Keys`?(0,z.jsx)(W,{onInspector:f,groups:i.groups,onAssignGeneratedKey:n.onAssignGeneratedKey,onInstallGeneratedKey:n.onInstallGeneratedKey}):e===`Known Hosts`?(0,z.jsx)(ho,{}):e===`Remote Keys`?(0,z.jsx)(go,{hosts:i.knownAliases,preferredPublicKeyPath:n.publicKey?.publicRelativePath??null,onPreferredPublicKeyHandled:n.onPublicKeyHandled}):e===`Diagnostics`?(0,z.jsx)(uo,{hosts:i.knownAliases}):(0,z.jsx)(`section`,{"aria-labelledby":`section-heading`,className:`flex flex-col gap-4`,children:(0,z.jsx)(`h2`,{id:`section-heading`,className:`font-medium`,children:e})})}function Do(e){let t=s(e);return{snippetId:f(t.snippetId),evidence:f(t.evidence),reviewEvidence:f(t.reviewEvidence),actionToken:f(t.actionToken),actionExpiresAt:f(t.actionExpiresAt),targets:m(t.targets).map(e=>{let t=s(e);return{targetId:f(t.targetId),sessionId:f(t.sessionId),alias:f(t.alias),title:f(t.title),command:f(t.command)}})}}function Oo(e){return{results:m(s(e).results).map(e=>{let t=s(e),n=f(t.status);if(n!==`delivered`&&n!==`failed`)throw Error(`invalid_response`);return{targetId:f(t.targetId),sessionId:f(t.sessionId),alias:f(t.alias),title:f(t.title),status:n,...t.problem===void 0?{}:{problem:f(t.problem)}}})}}var ko={async preview(e){return Do(await u.mutate(`/api/v1/terminal/commands/preview`,{method:`POST`,headers:c,body:JSON.stringify(e)}))},async dispatch(e,t,n=!0){return Oo(await u.mutate(`/api/v1/terminal/commands`,{method:`POST`,headers:{...c,"X-SSHC-Action":e.actionToken},body:JSON.stringify({...t,submit:n,evidence:e.evidence})}))}};function Ao({paneTargets:e,onClose:t}){let n=C(),[r,o]=(0,P.useState)(`command`),[s,c]=(0,P.useState)(``),[l,u]=(0,P.useState)([]),[d,f]=(0,P.useState)(``),[p,m]=(0,P.useState)({}),[h,g]=(0,P.useState)(null),[_,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(``),[S,w]=(0,P.useState)(!1),T=(0,P.useRef)(0),E=(0,P.useRef)(null),D=(0,P.useMemo)(()=>l.find(e=>e.id===d)??null,[d,l]),O=(0,P.useMemo)(()=>e.filter(e=>e.connected&&e.sessionId!==void 0),[e]),k=e.map(e=>`${e.targetId}\u0000${e.sessionId??``}\u0000${e.alias}\u0000${e.title}\u0000${e.connected}\u0000${e.state}`).join(``);(0,P.useEffect)(()=>{ri.library().then(e=>{u(e.snippets),f(t=>t||e.snippets[0]?.id||``)}).catch(e=>x(i(e)||`snippet_failed`))},[]),(0,P.useEffect)(()=>{T.current+=1,g(null),y(null),w(!1)},[k]);function A(){T.current+=1,g(null),y(null),x(``),w(!1)}function ee(){let e=O.map(({targetId:e,sessionId:t})=>({targetId:e,sessionId:t}));return e.length===0?null:r===`command`?s.trim()===``?null:{command:s,targets:e,inputs:{}}:d===``?null:{snippetId:d,targets:e,inputs:p}}async function j(){let e=ee();if(e===null)return;let t=++T.current;w(!0),x(``),y(null);try{let n=await ko.preview(e);T.current===t&&g({request:e,preview:n})}catch(e){T.current===t&&x(i(e)||`terminal_command_failed`)}finally{T.current===t&&w(!1)}}async function te(){if(h===null)return;let e=++T.current;w(!0),x(``);try{let t=await ko.dispatch(h.preview,h.request);T.current===e&&(y(t),g(null))}catch(t){T.current===e&&x(i(t)||`terminal_command_failed`)}finally{T.current===e&&w(!1)}}function M(t){let r=e.find(e=>e.targetId===t.targetId),i=r===void 0?``:` · ${n(`workspace.paneNumber`,{number:r.paneNumber})}`;return`${t.alias} · ${t.title}${i}`}return(0,z.jsx)(rn,{labelledBy:`workspace-command-heading`,onDismiss:t,closeOnOutside:!0,initialFocusRef:E,panelClassName:`max-h-[90vh] w-full max-w-5xl overflow-auto rounded-lg p-4`,children:(0,z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsxs)(`div`,{className:`grow`,children:[(0,z.jsx)(`h2`,{id:`workspace-command-heading`,className:`text-base font-semibold`,children:n(`workspace.broadcastHeading`)}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:n(`workspace.broadcastDescription`)})]}),(0,z.jsx)(`button`,{ref:E,type:`button`,onClick:t,"aria-label":n(`workspace.commandClose`),className:`flex size-8 shrink-0 items-center justify-center rounded text-lg text-ink-muted hover:bg-select-fill`,children:`×`})]}),b===``?null:(0,z.jsx)(`p`,{role:`alert`,className:`rounded bg-notice px-3 py-2 text-xs text-notice-ink`,children:b}),(0,z.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[minmax(18rem,0.9fr)_minmax(20rem,1.1fr)]`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,z.jsx)(a,{label:n(`workspace.commandSource`),value:r,options:[{value:`command`,label:n(`workspace.adHocCommand`)},{value:`snippet`,label:n(`workspace.savedSnippet`)}],onChange:e=>{o(e),m({}),A()}}),r===`command`?(0,z.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[n(`workspace.command`),(0,z.jsx)(`textarea`,{rows:3,value:s,onChange:e=>{c(e.target.value),A()},placeholder:`uname -a`,className:`mt-1 block w-full rounded border border-control-line bg-control p-2 font-mono text-sm text-ink`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[n(`workspace.savedSnippet`),(0,z.jsxs)(`select`,{value:d,onChange:e=>{f(e.target.value),m({}),A()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[(0,z.jsx)(`option`,{value:``,children:n(`workspace.chooseSnippet`)}),l.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),D===null?null:(0,z.jsx)(`code`,{className:`whitespace-pre-wrap rounded bg-code-bg p-2 text-xs text-code-fg`,children:D.command}),D?.variables.map(e=>(0,z.jsxs)(`div`,{className:`text-xs text-ink-muted`,children:[(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`code`,{children:`{{${e.name}}}`}),e.description?` · ${e.description}`:``]}),e.type===`boolean`?(0,z.jsxs)(`select`,{"aria-label":e.name,value:p[e.name]??``,onChange:t=>{let n=t.target.value;m(t=>n===``?Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.name)):{...t,[e.name]:n}),A()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[(0,z.jsx)(`option`,{value:``,children:e.default===void 0?``:`${n(`workspace.useDefault`)} (${e.default})`}),(0,z.jsx)(`option`,{value:`true`,children:`true`}),(0,z.jsx)(`option`,{value:`false`,children:`false`})]}):e.type===`secret`?(0,z.jsx)(ct,{label:e.name,value:p[e.name]??``,placeholder:e.default===void 0?``:`${n(`workspace.useDefault`)}: ${e.default}`,onChange:t=>{m(n=>({...n,[e.name]:t})),A()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`}):(0,z.jsx)(`input`,{"aria-label":e.name,type:e.type===`integer`?`number`:`text`,value:p[e.name]??``,placeholder:e.default===void 0?``:`${n(`workspace.useDefault`)}: ${e.default}`,onChange:t=>{m(n=>({...n,[e.name]:t.target.value})),A()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]},e.name))]})]}),(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`text-xs font-medium`,children:n(`workspace.targetMode`)}),(0,z.jsx)(`span`,{className:`text-xs text-ink-muted`,children:n(`workspace.targetCount`,{count:O.length})})]}),(0,z.jsx)(`div`,{className:`grid max-h-36 grid-cols-1 gap-1 overflow-auto sm:grid-cols-2`,children:e.map(e=>(0,z.jsxs)(`div`,{className:`rounded border border-line px-2 py-1 text-xs ${e.connected?``:`opacity-60`}`,children:[(0,z.jsx)(`span`,{className:`font-medium`,children:e.alias}),(0,z.jsxs)(`span`,{className:`ml-2 text-ink-muted`,children:[e.title,` ·`,` `,n(`workspace.paneNumber`,{number:e.paneNumber})]}),e.connected?null:(0,z.jsx)(`span`,{className:`ml-2 text-notice-ink`,children:n(`workspace.targetSkipped`,{state:e.state})})]},e.targetId))}),(0,z.jsx)(`p`,{className:`text-xs leading-5 text-ink-muted`,children:n(`workspace.executionNotice`)}),(0,z.jsx)(v,{className:`self-start`,disabled:S||ee()===null,onClick:()=>void j(),children:n(`snippets.preview`)})]})]}),h===null?null:(0,z.jsxs)(`section`,{className:`rounded-lg border border-notice-line bg-notice p-3`,children:[(0,z.jsx)(`h3`,{className:`text-sm font-medium`,children:n(`workspace.previewHeading`)}),(0,z.jsx)(`div`,{className:`mt-2 grid max-h-48 gap-2 overflow-auto md:grid-cols-2`,children:h.preview.targets.map(e=>(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`truncate text-xs font-medium`,children:M(e)}),(0,z.jsx)(`pre`,{className:`mt-1 overflow-auto rounded bg-code-bg p-2 text-xs text-code-fg`,children:e.command})]},e.targetId))}),(0,z.jsx)(v,{kind:`primary`,className:`mt-3`,disabled:S,onClick:()=>void te(),children:n(`workspace.sendTargets`,{count:h.preview.targets.length})})]}),_===null?null:(0,z.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-3`,children:[(0,z.jsx)(`h3`,{className:`text-sm font-medium`,children:n(`workspace.deliveryResults`)}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:n(`workspace.deliveryNotice`)}),(0,z.jsx)(`div`,{className:`mt-2 grid max-h-56 gap-2 overflow-auto md:grid-cols-2`,children:_.results.map(e=>(0,z.jsxs)(`div`,{className:`min-w-0 rounded border border-line p-2`,children:[(0,z.jsxs)(`p`,{className:`text-xs font-medium`,children:[M(e),` ·`,` `,n(e.status===`delivered`?`workspace.delivered`:`workspace.deliveryFailed`)]}),e.problem?(0,z.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:e.problem}):null]},e.targetId))})]})]})})}var jo=`sshc.terminal.live-workspace.v1`;function Mo(){try{return window.sessionStorage}catch{return null}}function No(e,t,n,r=``){if(e!==null)try{let i=t===null?null:Fo(t.root);if(t===null||i===null||Ma(t.root).length<2){e.removeItem(jo);return}let a={version:1,root:i,focusedPaneId:t.focusedPaneId,focusModePaneId:n,...Lo(r)&&r.trim()!==``?{name:r.trim()}:{}};e.setItem(jo,JSON.stringify(a))}catch{}}function Po(e,t){if(e===null)return null;try{let n=e.getItem(jo);if(n===null||n.length>32768)return Wo(e);let r=Io(JSON.parse(n));if(r===null)return Wo(e);let i=zo(r.root,t);if(i===null||Vo(i)<2)return Wo(e);let a=new Set(Bo(i));return{root:i,focusedPaneId:a.has(r.focusedPaneId)?r.focusedPaneId:Bo(i)[0]??``,focusModePaneId:r.focusModePaneId!==null&&a.has(r.focusModePaneId)?r.focusModePaneId:null,name:r.name?.trim()??``}}catch{return Wo(e)}}function Fo(e){if(e.pane!==void 0)return e.pane.sessionId===void 0?null:{pane:{id:e.pane.id,sessionId:e.pane.sessionId}};let t=Fo(e.split.first),n=Fo(e.split.second);return t===null||n===null?null:{split:{direction:e.split.direction,ratio:e.split.ratio,first:t,second:n}}}function Io(e){if(!Uo(e)||e.version!==1||!Ho(e.focusedPaneId)||e.focusModePaneId!==null&&!Ho(e.focusModePaneId)||e.name!==void 0&&!Lo(e.name))return null;let t=new Set,n=new Set,r=Ro(e.root,0,t,n);return r===null||t.size<2||t.size>4?null:{version:1,root:r,focusedPaneId:e.focusedPaneId,focusModePaneId:e.focusModePaneId,...e.name===void 0?{}:{name:e.name.trim()}}}function Lo(e){return typeof e==`string`&&e.length<=256&&!/[\u0000-\u001f\u007f]/u.test(e)}function Ro(e,t,n,r){if(!Uo(e)||t>=4)return null;if(Uo(e.pane)){let t=e.pane.id,i=e.pane.sessionId;return!Ho(t)||!Ho(i)||n.has(t)||r.has(i)?null:(n.add(t),r.add(i),{pane:{id:t,sessionId:i}})}if(!Uo(e.split))return null;let i=e.split.direction,a=e.split.ratio;if(i!==`horizontal`&&i!==`vertical`||typeof a!=`number`||!Number.isFinite(a)||a<10||a>90)return null;let o=Ro(e.split.first,t+1,n,r),s=Ro(e.split.second,t+1,n,r);return o===null||s===null?null:{split:{direction:i,ratio:a,first:o,second:s}}}function zo(e,t){if(e.pane!==void 0)return t.has(e.pane.sessionId)?e:null;let n=zo(e.split.first,t),r=zo(e.split.second,t);return n===null?r:r===null?n:{split:{...e.split,first:n,second:r}}}function Bo(e){return e.pane===void 0?[...Bo(e.split.first),...Bo(e.split.second)]:[e.pane.id]}function Vo(e){return e.pane===void 0?Vo(e.split.first)+Vo(e.split.second):1}function Ho(e){return typeof e==`string`&&e.length>0&&e.length<=256&&!/[\u0000-\u001f\u007f]/u.test(e)}function Uo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wo(e){try{e.removeItem(jo)}catch{}return null}function Go({id:e,heading:t,description:n,label:r,initialValue:i=``,submitLabel:a,cancelLabel:o,validate:s,onSubmit:c,onCancel:l,inputMode:u,returnFocusRef:d}){let[f,p]=(0,P.useState)(i),[m,h]=(0,P.useState)(!1),g=(0,P.useRef)(null),_=f.trim(),y=(0,P.useMemo)(()=>s?.(_)??``,[_,s]),b=`${e}-error`,x=`${e}-input`,S=n===void 0?void 0:`${e}-description`;function C(){h(!0),y===``&&c(_)}return(0,z.jsxs)(rn,{labelledBy:e,...S===void 0?{}:{describedBy:S},onDismiss:l,initialFocusRef:g,...d===void 0?{}:{returnFocusRef:d},panelClassName:`flex w-full max-w-md flex-col gap-4 rounded-lg p-4 sm:p-5`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{id:e,className:`text-base font-semibold text-ink`,children:t}),n===void 0?null:(0,z.jsx)(`div`,{id:S,className:`mt-1 ${k}`,children:n})]}),(0,z.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),C()},children:[(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(`label`,{htmlFor:x,className:`text-xs font-medium tracking-wide text-ink-muted`,children:r}),(0,z.jsx)(`input`,{id:x,ref:g,value:f,inputMode:u,"aria-invalid":m&&y!==``,"aria-describedby":m&&y!==``?b:void 0,onChange:e=>p(e.target.value),className:E}),m&&y!==``?(0,z.jsx)(`span`,{id:b,role:`alert`,className:`text-xs text-danger`,children:y}):null]}),(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(v,{onClick:l,children:o}),(0,z.jsx)(v,{kind:`primary`,type:`submit`,children:a})]})]})]})}var Ko=5;function qo(e){return Number.isFinite(e)?Math.min(90,Math.max(10,Math.round(e))):50}function Jo({direction:e,ratio:t,label:n,onRatioChange:r}){let i=e===`horizontal`;function a(e){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.parentElement;if(t===null)return;e.currentTarget.setPointerCapture(e.pointerId);let n=e=>{let n=t.getBoundingClientRect(),a=i?n.width:n.height;a<=0||r(qo((i?e.clientX-n.left:e.clientY-n.top)/a*100))},a=()=>{window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a)};window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,a,{once:!0}),window.addEventListener(`pointercancel`,a,{once:!0})}function o(e){let n=e.key===(i?`ArrowLeft`:`ArrowUp`),a=e.key===(i?`ArrowRight`:`ArrowDown`);!n&&!a||(e.preventDefault(),r(qo(t+(n?-5:Ko))))}return(0,z.jsx)(`div`,{role:`separator`,tabIndex:0,"aria-label":n,"aria-orientation":i?`vertical`:`horizontal`,"aria-valuemin":10,"aria-valuemax":90,"aria-valuenow":t,onPointerDown:a,onKeyDown:o,className:`shrink-0 touch-none bg-line transition-colors hover:bg-accent focus:bg-accent focus:outline-none ${i?`w-1 cursor-col-resize`:`h-1 cursor-row-resize`}`})}function Yo(){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Xo(e,t){if(e.pane!==void 0){t(e.pane);return}Xo(e.split.first,t),Xo(e.split.second,t)}function Zo(e,t=Yo()){return{id:t,alias:e.kind===`ssh`?e.alias??e.title:`localhost`,...e.kind===`shell`?{kind:`shell`}:{},state:e.state===`connected`?`connected`:e.state===`exited`?`failed`:`connecting`,sessionId:e.id,...e.problem===``?{}:{problem:e.problem}}}function Qo(e,t=Yo()){let n=Zo(e,t);return ja(ka({pane:{id:n.id,alias:n.alias,...n.kind===void 0?{}:{kind:n.kind}}},t),{type:`connection-started`,paneId:t,sessionId:e.id})}function $o(e,t){return e.pane===void 0?$o(e.split.first,t)??$o(e.split.second,t):e.pane.id===t?e.pane:null}function es(e,t){return e.pane===void 0?es(e.split.first,t)??es(e.split.second,t):e.pane.sessionId===t?e.pane:null}function ts(e,t){if(e.pane!==void 0){let n=t.get(e.pane.sessionId);return n===void 0?null:{pane:Zo(n,e.pane.id)}}let n=ts(e.split.first,t),r=ts(e.split.second,t);return n===null?r:r===null?n:{split:{...e.split,first:n,second:r}}}function ns(e){let t=[];Xo(Aa(e).layout,e=>t.push(e.alias));let n=[...new Set(t)];return n.slice(0,2).join(` + `)+(n.length>2?` +${n.length-2}`:``)}function rs(e,t,n){return e===null?t===null?[]:[{targetId:t.id,sessionId:t.id,alias:t.kind===`ssh`?t.alias??t.title:`localhost`,title:t.title,paneNumber:1,connected:t.state===`connected`,state:t.state}]:Ma(e.root).map((t,r)=>{let i=$o(e.root,t);if(i===null)throw Error(`workspace pane disappeared`);let a=i.sessionId===void 0?void 0:n.get(i.sessionId),o=a?.state===`connected`;return{targetId:i.id,...a===void 0?{}:{sessionId:a.id},alias:i.alias,title:a?.title??i.alias,paneNumber:r+1,connected:o,state:a?.state??i.state}})}function is(e){let t=e.currentTarget.getBoundingClientRect(),n=[[`left`,Math.max(0,e.clientX-t.left)/Math.max(1,t.width)],[`right`,Math.max(0,t.right-e.clientX)/Math.max(1,t.width)],[`top`,Math.max(0,e.clientY-t.top)/Math.max(1,t.height)],[`bottom`,Math.max(0,t.bottom-e.clientY)/Math.max(1,t.height)]];return n.sort((e,t)=>e[1]-t[1]),n[0]?.[0]??`right`}function as(e){switch(e){case`left`:return`inset-y-0 left-0 w-1/2`;case`right`:return`inset-y-0 right-0 w-1/2`;case`top`:return`inset-x-0 top-0 h-1/2`;case`bottom`:return`inset-x-0 bottom-0 h-1/2`}}function os({edge:e}){let t=C()(e===`left`?`workspace.dock.left`:e===`right`?`workspace.dock.right`:e===`top`?`workspace.dock.top`:`workspace.dock.bottom`);return(0,z.jsx)(`div`,{"data-dock-preview":e,className:`pointer-events-none absolute z-10 grid place-items-center border-2 border-accent bg-accent/20 ${as(e)}`,children:(0,z.jsx)(`span`,{className:`rounded bg-toolbar px-3 py-2 text-xs font-medium shadow`,children:t})})}function ss(){let e=C();return(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,z.jsxs)(`section`,{className:`w-full max-w-md border-y border-line bg-surface-subtle p-6 text-center`,role:`status`,children:[(0,z.jsx)(Bn,{className:`mx-auto size-10`}),(0,z.jsx)(`h2`,{className:`mt-4 text-lg font-semibold tracking-tight text-ink`,children:e(`terminal.emptyHeading`)}),(0,z.jsx)(`p`,{className:`mx-auto mt-2 max-w-sm text-sm leading-6 text-ink-muted`,children:e(`terminal.emptyHint`)}),(0,z.jsxs)(`div`,{"aria-hidden":`true`,className:`mx-auto mt-4 max-w-xs rounded bg-term-bg px-4 py-3 text-left font-mono text-xs text-ink`,children:[(0,z.jsx)(`span`,{className:`text-live`,children:`$`}),` sshc host`,(0,z.jsx)(`span`,{className:`ml-1 inline-block h-3 w-1.5 translate-y-0.5 bg-ink`})]})]})})}function cs({displayName:e,paneCount:t,canBroadcast:n,onBroadcast:r,inFocusMode:i,onExitFocusMode:a,saved:o,selected:s,onSelect:c,canSave:l,onSave:u,onReopen:d,onDelete:f}){let p=C(),[m,h]=(0,P.useState)(!1),g=(0,P.useRef)(null);return tn({open:m,containerRefs:[g],onDismiss:()=>h(!1)}),(0,z.jsxs)(`div`,{"data-desktop-workspace-controls":!0,className:`hidden h-8 shrink-0 items-center gap-2 border-b border-line bg-toolbar px-2 md:flex`,children:[t>0?(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`max-w-52 truncate text-[11px] font-semibold text-ink`,children:e}),(0,z.jsx)(`span`,{className:`whitespace-nowrap text-[11px] text-ink-faint`,children:p(`workspace.groupCount`,{count:String(t)})})]}):null,(0,z.jsxs)(`div`,{ref:g,className:`group relative ml-auto`,children:[(0,z.jsx)(`button`,{type:`button`,"aria-label":p(`workspace.actions`),"aria-expanded":m,title:p(`workspace.actions`),onClick:()=>h(e=>!e),className:`flex size-6 items-center justify-center rounded text-ink-muted hover:bg-select-fill hover:text-ink`,children:(0,z.jsx)(B,{name:`moreHorizontal`,className:`size-3.5`})}),m?(0,z.jsxs)(`div`,{className:`absolute right-0 top-[calc(100%+0.35rem)] z-30 w-80 rounded border border-control-line bg-card p-3 shadow-xl`,children:[(0,z.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2 border-b border-hairline pb-3`,children:[(0,z.jsx)(v,{disabled:!n,onClick:()=>{h(!1),r()},children:p(`workspace.broadcastCommand`)}),i?(0,z.jsx)(v,{onClick:()=>{h(!1),a()},children:p(`workspace.exitFocusMode`)}):null]}),(0,z.jsx)(`h2`,{className:`text-sm font-semibold text-ink`,children:p(`workspace.savedLayouts`)}),(0,z.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-ink-muted`,children:p(`workspace.savedDescription`,{count:4})}),(0,z.jsxs)(`select`,{"aria-label":p(`workspace.saved`),value:s,onChange:e=>c(e.target.value),className:`mt-3 w-full rounded border border-control-line bg-control px-2 py-1.5 text-xs`,children:[(0,z.jsx)(`option`,{value:``,children:p(`workspace.new`)}),o.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,z.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,z.jsx)(v,{disabled:!l,onClick:u,children:p(`workspace.save`)}),(0,z.jsx)(v,{disabled:s===``,onClick:()=>d(s),children:p(`workspace.reopen`)}),(0,z.jsx)(`button`,{disabled:s===``,className:`px-2 text-xs text-danger disabled:opacity-40`,onClick:()=>f(s),children:p(`workspace.delete`)})]})]}):null]})]})}function ls({restoreRequest:e,onRestoreConsumed:t,onOpenAlias:n,onOpenShell:r,onClose:a,onActive:o,onBegin:s,setLayout:c,report:l}){let u=(0,P.useRef)(0),d=(0,P.useRef)(0),f=(0,P.useRef)(null),p=(0,P.useRef)(a);(0,P.useEffect)(()=>{p.current=a},[a]);let m=(0,P.useCallback)((e,t)=>(e.openedSessionIDs.delete(t)&&(e.cleanup=e.cleanup.then(()=>p.current(t)).catch(()=>void 0)),e.cleanup),[]),h=(0,P.useCallback)(e=>{for(let t of[...e.openedSessionIDs])m(e,t);return e.cleanup},[m]);(0,P.useEffect)(()=>()=>{d.current+=1;let e=f.current;f.current=null,e!==null&&h(e)},[h]);let g=(0,P.useCallback)(async e=>{if(e===``)return;let t=d.current+1;d.current=t;let a=f.current,u={generation:t,openedSessionIDs:new Set,cleanup:Promise.resolve()};f.current=u,a!==null&&h(a);let p=()=>u.generation===d.current,g=e=>{f.current===u&&(f.current=null),u.openedSessionIDs.clear(),l(e)};try{let t=await Oa.restore(e);if(!p())return;s(e);let i=ka(t.layout,t.focusedPaneId),a=[];if(Xo(t.layout,e=>{a.push(e),i=ja(i,{type:`connection-starting`,paneId:e.id})}),c(i),await Promise.all(a.map(async e=>{let i=e.kind===`shell`?await r():await n(e.alias);if(i===null){if(!p())return;c(t=>t===null?t:ja(t,{type:`connection-failed`,paneId:e.id,problem:`open_failed`}));return}if(u.openedSessionIDs.add(i.id),!p()){await m(u,i.id);return}c(t=>t===null?t:ja(t,{type:`connection-started`,paneId:e.id,sessionId:i.id})),e.id===t.focusedPaneId&&o(i.id)})),!p()){await h(u);return}g(``)}catch(e){if(!p()){await h(u);return}g(i(e)||`workspace_failed`)}},[o,s,n,r,l,h,m,c]);return(0,P.useEffect)(()=>{e===null||e.sequence<=u.current||(u.current=e.sequence,t(e.sequence),g(e.id))},[t,e,g]),g}function us({sessions:e,activeSessionId:t,onActive:n,onOpenAlias:r,onOpenShell:a,onClose:o,renderTerminal:s,restoreRequest:c=null,onRestoreConsumed:l=()=>void 0,renameRequest:u=null,onRenameConsumed:d=()=>void 0,onLiveWorkspaceChange:f=()=>void 0,sessionsLoaded:p=!0}){let m=C(),[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)([]),[y,b]=(0,P.useState)(``),[x,S]=(0,P.useState)(!1),[w,T]=(0,P.useState)(null),[E,D]=(0,P.useState)(null),[O,k]=(0,P.useState)(null),A=vi(`(max-width: 767px)`),[ee,j]=(0,P.useState)(``),[te,M]=(0,P.useState)(!1),[N,ne]=(0,P.useState)(``),[re,ie]=(0,P.useState)(!1),ae=(0,P.useRef)(0),oe=(0,P.useRef)(Yo()),F=(0,P.useMemo)(()=>Mo(),[]),I=ls({restoreRequest:c,onRestoreConsumed:l,onOpenAlias:r,onOpenShell:a,onClose:o,onActive:n,onBegin:(0,P.useCallback)(e=>{b(e),ne(``),T(null)},[]),setLayout:g,report:j}),L=e.find(e=>e.id===t)??null,se=(0,P.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),ce=(0,P.useMemo)(()=>h===null?[]:Na(h.root),[h]),le=h!==null&&(t===null||ce.includes(t)),R=le?h:null,ue=(0,P.useMemo)(()=>rs(R,L,se),[L,se,R]),de=ue.filter(e=>e.connected).length,fe=R===null?L===null?0:1:Ma(R.root).length,pe=(0,P.useMemo)(()=>{if(R===null)return L?.title??m(`workspace.live`);let e=N.trim();if(e!==``)return e;let t=_.find(e=>e.id===y)?.name.trim()??``;return t===``?ns(R)||m(`workspace.live`):t},[L?.title,N,_,y,m,R]);(0,P.useEffect)(()=>{Oa.list().then(v).catch(()=>void 0)},[]),(0,P.useEffect)(()=>(document.title=L===null?`sshc`:`${L.presentation?.displayTitle??L.title} · sshc`,()=>{document.title=`sshc`}),[L]),(0,P.useEffect)(()=>{if(!p||te)return;if(c!==null){M(!0);return}let e=Po(F,new Set(se.keys()));if(e!==null){let t=ts(e.root,se);if(t!==null&&Ma(t).length>1){let r=Ma(t).includes(e.focusedPaneId)?e.focusedPaneId:Ma(t)[0]??``;g({root:t,focusedPaneId:r}),T(e.focusModePaneId),ne(e.name);let i=$o(t,r)?.sessionId;i!==void 0&&n(i)}}M(!0)},[te,F,n,c,se,p]),(0,P.useEffect)(()=>{!p||!te||No(F,h,w,N)},[w,h,te,F,N,p]),(0,P.useEffect)(()=>{h===null&&te&&ne(``)},[h,te]),(0,P.useEffect)(()=>{E!==null&&(h===null||!Ma(h.root).includes(E))&&D(null)},[h,E]),(0,P.useEffect)(()=>{w!==null&&(h===null||!Ma(h.root).includes(w))&&T(null)},[w,h]),(0,P.useEffect)(()=>{if(h===null){f(null);return}let e=Na(h.root);if(e.length<2){f(null);return}let t=_.find(e=>e.id===y)?.name.trim()??``,n=ns(h),r=$o(h.root,h.focusedPaneId)?.sessionId??e[0]??``;f({id:oe.current,name:N.trim()||t||n||m(`workspace.live`),memberSessionIds:e,focusedSessionId:r})},[h,N,f,_,y,m]),(0,P.useEffect)(()=>{if(h===null)return;let t=window.setTimeout(()=>{let t=new Set(e.map(e=>e.id));g(e=>{if(e===null)return null;let n=e;for(let r of Ma(e.root)){let e=$o(n.root,r);e?.sessionId!==void 0&&!t.has(e.sessionId)&&(n=ja(n,{type:`close`,paneId:r}))}return Ma(n.root).length<2?null:n})},500);return()=>window.clearTimeout(t)},[h,e]),(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&T(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,P.useEffect)(()=>{if(h===null||t===null||!ce.includes(t))return;let e=es(h.root,t);e!==null&&e.id!==h.focusedPaneId&&g(t=>t===null?t:ja(t,{type:`focus`,paneId:e.id}))},[t,h,ce]);function me(e){g(t=>t===null?t:ja(t,e))}function he(e,t){e!==t&&me({type:`swap-panes`,sourcePaneId:e,targetPaneId:t}),D(null)}function ge(e){if(E===null){D(e);return}he(E,e)}function _e(e,t){e.stopPropagation(),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t);let n=h===null?void 0:$o(h.root,t)?.sessionId;n!==void 0&&e.dataTransfer.setData(un,n),D(t)}function ve(e,t,r,i){let a=se.get(e);if(a===void 0)return;if(i!==void 0){if(i.id===a.id)return;if(h!==null){j(m(`workspace.oneLiveOnly`));return}let e=Yo(),t=ja(Qo(i,e),{type:`dock-pane`,targetPaneId:e,edge:r,pane:Zo(a)});b(``),ne(``),g(t),j(``),n(a.id);return}if(h===null||!le)return;let o=es(h.root,a.id);if(o===null&&Ma(h.root).length>=4){j(m(`workspace.maxPanes`,{count:4}));return}let s=o??Zo(a);g(e=>e===null?e:ja(e,{type:`dock-pane`,targetPaneId:t,edge:r,pane:s})),j(``),n(a.id)}function ye(e,t){(e.dataTransfer.types?.includes(`application/x-sshc-console`)===!0||E!==null)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,k({paneId:t,edge:is(e)}))}function be(e,t){e.preventDefault(),e.stopPropagation();let n=e.dataTransfer.getData(`application/x-sshc-console`)||(E===null||h===null?``:$o(h.root,E)?.sessionId??``),r=O?.paneId===t?O.edge:is(e);n!==``&&ve(n,t,r),D(null),k(null)}function xe(e,t){e.preventDefault(),e.stopPropagation();let n=e.dataTransfer.getData(un);n!==``&&ve(n,t.id,is(e),t),k(null)}function Se(e){if(h!==null){if(Ma(h.root).length<=2){g(null),T(null),b(``),ne(``);return}me({type:`close`,paneId:e})}}async function Ce(e){let t=R??(L===null?null:Qo(L));if(t!==null)try{let n=Aa(t),r=y===``?await Oa.create({name:e,...n}):await Oa.update(y,{name:e,...n});b(r.id),ne(r.name),v(await Oa.list()),j(``)}catch(e){j(i(e)||`workspace_failed`)}}(0,P.useEffect)(()=>{if(u===null||u.sequence<=ae.current)return;ae.current=u.sequence,d(u.sequence);let e=u.name.trim();h!==null&&e!==``&&ne(e)},[h,d,u]);function we(e){return s(e)}function Te(e){let t=O?.paneId===e.id;return(0,z.jsxs)(`div`,{"data-single-terminal-drop-target":e.id,className:`relative flex h-full min-h-0 flex-col ${t?`ring-2 ring-inset ring-live`:``}`,onDragEnter:t=>{t.dataTransfer.types?.includes(`application/x-sshc-console`)===!0&&(t.preventDefault(),k({paneId:e.id,edge:is(t)}))},onDragOver:t=>{t.dataTransfer.types?.includes(`application/x-sshc-console`)===!0&&(t.preventDefault(),t.dataTransfer.dropEffect=`move`,k({paneId:e.id,edge:is(t)}))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||k(null)},onDrop:t=>xe(t,e),children:[we(e),t?(0,z.jsx)(os,{edge:O.edge}):null]})}function Ee(e,t=[]){if(e.pane!==void 0){let t=e.pane.sessionId===void 0?void 0:se.get(e.pane.sessionId),r=e.pane.kind===`shell`?t?.title??e.pane.alias:e.pane.alias,i=h!==null&&Ma(h.root).length>1,a=E===e.pane.id,o=O?.paneId===e.pane.id&&!a;return(0,z.jsxs)(`div`,{"data-workspace-pane":e.pane.id,"data-pane-alias":e.pane.alias,className:`relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border ${h?.focusedPaneId===e.pane.id?`border-accent`:`border-line`} ${a?`ring-2 ring-accent`:o?`ring-2 ring-live`:``}`,onPointerDown:()=>{me({type:`focus`,paneId:e.pane.id}),t!==void 0&&n(t.id)},onDragEnter:t=>ye(t,e.pane.id),onDragOver:t=>ye(t,e.pane.id),onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||k(t=>t?.paneId===e.pane.id?null:t)},onDrop:t=>be(t,e.pane.id),children:[i&&!A?(0,z.jsxs)(`div`,{"data-pane-toolbar":!0,className:`flex h-7 shrink-0 items-center gap-1 border-b border-line bg-toolbar px-1`,children:[(0,z.jsx)(`button`,{type:`button`,draggable:!0,"aria-pressed":a,"aria-label":m(a?`workspace.movePanePicked`:`workspace.movePane`,{alias:r}),title:m(`workspace.movePane`,{alias:r}),className:`flex size-6 shrink-0 cursor-grab items-center justify-center rounded text-xs text-ink-muted hover:bg-select-fill active:cursor-grabbing`,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),ge(e.pane.id)},onDragStart:t=>_e(t,e.pane.id),onDragEnd:()=>D(null),onKeyDown:e=>{e.key===`Escape`&&D(null)},children:(0,z.jsx)(B,{name:`movePane`,className:`size-3.5`})}),(0,z.jsx)(`span`,{className:`min-w-0 grow truncate text-xs font-medium text-ink-muted`,children:r}),(0,z.jsx)(`button`,{type:`button`,"aria-pressed":w===e.pane.id,"aria-label":m(w===e.pane.id?`workspace.exitFocusMode`:`workspace.focusMode`,{alias:r}),title:m(w===e.pane.id?`workspace.exitFocusMode`:`workspace.focusMode`,{alias:r}),className:`flex size-6 shrink-0 items-center justify-center rounded text-xs text-ink-muted hover:bg-select-fill`,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),T(t=>t===e.pane.id?null:e.pane.id)},children:(0,z.jsx)(B,{name:`focus`,className:`size-3.5`})}),(0,z.jsx)(`button`,{type:`button`,"aria-label":m(`workspace.detachPane`),title:m(`workspace.detachPane`),className:`flex size-6 shrink-0 items-center justify-center rounded text-sm text-ink-muted hover:bg-select-fill`,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),Se(e.pane.id)},children:(0,z.jsx)(B,{name:`close`,className:`size-3.5`})})]}):null,(0,z.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:t===void 0?(0,z.jsx)(`div`,{className:`grid h-full min-h-40 place-items-center text-sm text-ink-muted`,children:e.pane.state===`failed`?m(`terminal.openFailed`):m(`workspace.reconnecting`)}):we(t)}),o?(0,z.jsx)(os,{edge:O.edge}):null]},e.pane.id)}return(0,z.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-1 ${e.split.direction===`horizontal`?`flex-row`:`flex-col`}`,children:[(0,z.jsx)(`div`,{style:{flexBasis:`${e.split.ratio}%`},className:`flex min-h-0 min-w-0`,children:Ee(e.split.first,[...t,`first`])}),(0,z.jsx)(Jo,{direction:e.split.direction,ratio:e.split.ratio,label:m(`workspace.resizeSplit`),onRatioChange:e=>me({type:`resize-split`,path:t,ratio:e})}),(0,z.jsx)(`div`,{style:{flexBasis:`${100-e.split.ratio}%`},className:`flex min-h-0 min-w-0`,children:Ee(e.split.second,[...t,`second`])})]})}let De=L===null&&R===null,Oe=w===null||R===null?null:$o(R.root,w),ke=R===null?null:$o(R.root,R.focusedPaneId),Ae=A&&ke!==null?{pane:ke}:Oe===null?R?.root??null:{pane:Oe},je=R===null?[]:Ma(R.root).map(e=>$o(R.root,e)).filter(e=>e!==null);return(0,z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[fe===1?null:(0,z.jsx)(cs,{displayName:pe,paneCount:fe,canBroadcast:de>0,onBroadcast:()=>S(!0),inFocusMode:w!==null,onExitFocusMode:()=>T(null),saved:_,selected:y,onSelect:b,canSave:R!==null||L!==null,onSave:()=>ie(!0),onReopen:e=>void I(e),onDelete:e=>void Oa.remove(e).then(async()=>{b(``),v(await Oa.list())})}),x&&ue.length>0?(0,z.jsx)(Ao,{paneTargets:ue,onClose:()=>S(!1)}):null,re?(0,z.jsx)(Go,{id:`workspace-save-heading`,heading:m(`workspace.save`),label:m(`workspace.namePrompt`),initialValue:N.trim()||(_.find(e=>e.id===y)?.name??``),submitLabel:m(`workspace.saveConfirm`),cancelLabel:m(`workspace.cancel`),validate:e=>e===``?m(`workspace.nameRequired`):``,onSubmit:e=>{ie(!1),Ce(e)},onCancel:()=>ie(!1)}):null,ee===``?null:(0,z.jsx)(`p`,{role:`alert`,className:`bg-notice px-3 py-1 text-xs text-notice-ink`,children:ee}),A&&je.length>1?(0,z.jsx)(`nav`,{"aria-label":m(`workspace.mobilePaneSwitcher`),className:`flex shrink-0 gap-1 overflow-x-auto border-b border-line bg-toolbar px-2 py-1`,children:je.map(e=>(0,z.jsx)(`button`,{type:`button`,"aria-current":e.id===R?.focusedPaneId?`page`:void 0,className:`max-w-40 shrink-0 truncate rounded px-3 py-1.5 text-xs ${e.id===R?.focusedPaneId?`bg-select-fill text-ink`:`text-ink-muted`}`,onClick:()=>{me({type:`focus`,paneId:e.id}),e.sessionId!==void 0&&n(e.sessionId)},children:e.kind===`shell`&&e.sessionId!==void 0?se.get(e.sessionId)?.title??e.alias:e.alias},e.id))}):null,(0,z.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:De?(0,z.jsx)(ss,{}):R===null?L===null?null:Te(L):Ae===null?null:Ee(Ae)})]})}function ds(e,t){let n=n=>e?.[n]!==void 0&&e[n]!==``?e[n]:t?.[n]??``,r=e?.backgroundTint??t?.backgroundTint;return{palette:n(`palette`),font:n(`font`),background:n(`background`),tint:r}}function fs(e,t){let n={...e.appearance,...t},r=Object.fromEntries(Object.entries(n).filter(([,e])=>e!==void 0&&e!==``)),{appearance:i,...a}=e;return Object.keys(r).length===0?a:{...a,appearance:r}}function ps(e){let t={...e.palette===``?{}:{palette:e.palette},...e.font===``?{}:{font:e.font},...e.background===``?{}:{background:e.background},...e.background===``||e.tint===void 0?{}:{backgroundTint:e.tint}};return Object.keys(t).length===0?{}:{appearance:t}}var ms=(0,P.lazy)(()=>ao(async()=>{let{TerminalView:e}=await import(`./TerminalView-UxyIAgy5.js`);return{TerminalView:e}},__vite__mapDeps([27,1,4,2,25,11,28,29])).then(({TerminalView:e})=>({default:e})));function hs(e,t){return e===void 0?t:e===`allow`}function gs({visible:e,consoles:t,activeConsole:n,settings:r,hostAppearance:i,hostOSC52:a,onActive:o,onLiveWorkspaceChange:s,onOpenAlias:c,onOpenShell:l,restoreRequest:u,onRestoreConsumed:d,renameRequest:f,onRenameConsumed:p,onOpenRemotePath:m,onOSC52Change:h}){return(0,z.jsx)(us,{sessions:t.sessions,sessionsLoaded:t.loaded,activeSessionId:n,onActive:o,onOpenAlias:c,onOpenShell:l,onClose:t.close,restoreRequest:u,onRestoreConsumed:d,renameRequest:f,onRenameConsumed:p,onLiveWorkspaceChange:s,renderTerminal:o=>{let s=ds(o.alias===void 0?void 0:i.get(o.alias),r.appearance),c=hs(o.alias===void 0?void 0:a.get(o.alias),r.osc52??!1);return(0,z.jsx)(P.Suspense,{fallback:(0,z.jsx)(St,{kind:`terminal`}),children:(0,z.jsx)(ms,{session:o,searchShortcutActive:e&&n===o.id,...r.fontSize===void 0?{}:{fontSize:r.fontSize},...r.browserScrollbackLines===void 0?{}:{scrollbackLines:r.browserScrollbackLines},osc52Enabled:c,jisYenBackslash:r.jisYenBackslash??!1,onOsc52Change:e=>h(o,e),onForwardsChanged:t.refresh,...s.palette===``?{}:{palette:s.palette},...s.font===``?{}:{font:s.font},...s.background===``?{}:{background:s.background},...s.tint===void 0?{}:{tint:s.tint},copyOnSelect:r.copyOnSelect??!0,rightClickPaste:r.rightClickPaste??!0,webgl:r.webgl??!0,onExit:()=>t.markExited(o.id),onReconnect:()=>t.reconnect(o.id),onStopReconnect:()=>t.stopReconnect(o.id),onOpenRemotePath:m},o.id)})}})}function _s(e,t){let[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(new Map),[o,s]=(0,P.useState)(new Map),[c,l]=(0,P.useState)([]),[u,d]=(0,P.useState)([]),[f,p]=(0,P.useState)([]);return(0,P.useEffect)(()=>{if(!e)return;let t=!0;return Ni.overview().then(e=>{t&&(r((e.metadata.groups??[]).map(e=>e.name)),a(new Map((e.metadata.hosts??[]).flatMap(e=>e.appearance===void 0||e.identity.alias===``?[]:[[e.identity.alias,e.appearance]]))),s(new Map((e.metadata.hosts??[]).flatMap(e=>e.osc52===void 0||e.identity.alias===``?[]:[[e.identity.alias,e.osc52]]))),l([...new Set(e.hosts.map(e=>e.identity.alias).filter(e=>e!==``))]),d(e.hosts.filter(e=>e.identity.alias!==``)),p(e.files))}).catch(()=>void 0),()=>{t=!1}},[e,t]),{groups:n,hostAppearance:i,hostOSC52:o,setHostOSC52:s,knownAliases:c,hosts:u,files:f}}function vs({settings:e,setSettings:t,setHostPolicy:n}){return async function(r,i){if(r.kind!==`ssh`||r.alias===void 0){let n={...e};i?n.osc52=!0:delete n.osc52,await We.setTerminalSettings(n),t(n);return}let a=r.alias,o=await Ni.overview(),s=o.hosts.find(e=>e.identity.alias===a)?.identity;if(s===void 0)throw Error(`host_not_found`);let c=[...o.metadata.hosts??[]],l=c.findIndex(e=>e.identity.path===s.path&&e.identity.alias===s.alias),u={...l<0?{}:c[l],identity:s,osc52:i?`allow`:`deny`};l<0?c.push(u):c[l]=u,await Ni.save({kind:`metadata`,metadata:{...o.metadata,hosts:c}}),n(e=>new Map(e).set(a,u.osc52))}}function ys(e){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)(null),a=(0,P.useRef)(0),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(null),f=(0,P.useCallback)(()=>l(null),[]),p=(0,P.useCallback)(()=>d(null),[]);function m(t,r){n({path:t,line:r}),e(`Config`)}function h(t,n,r){a.current+=1,i({alias:t,path:n,action:r,request:a.current}),e(`Files`)}function g(e){i(t=>t?.request===e?null:t)}function _(t){l(t),e(`Connections`)}function v(t){d(t),e(`Remote Keys`)}return{fileTarget:t,sftpTarget:r,connectionDraft:o,setConnectionDraft:s,connectionKey:c,publicKey:u,consumeConnectionKey:f,consumePublicKey:p,openFile:m,openRemotePath:h,handleSftpTarget:g,assignGeneratedKey:_,installGeneratedKey:v}}function bs({enabled:e,shortcuts:t,terminalFace:n,orderedConsoles:r,activeConsole:i,navigate:a,showConsole:o,openPalette:s}){(0,P.useEffect)(()=>{function c(c){if(!e||le(c)===null)return;let l=n&&!c.altKey&&!c.shiftKey&&c.ctrlKey!==c.metaKey&&c.key.toLowerCase()===`f`;if(xe(c)){l&&!(c.target instanceof Element&&c.target.closest(`[data-shortcut-editor]`))&&(c.preventDefault(),c.stopImmediatePropagation());return}let u;if(be(c,`palette`,t))u=s;else if(be(c,`home`,t))u=()=>a(`Home`);else if(be(c,`sftp`,t))u=()=>a(`Files`);else if(r.length>0){let e=be(c,`nextSession`,t)?1:be(c,`previousSession`,t)?-1:0;e!==0&&(u=()=>{let t=r.findIndex(e=>e.id===i),n=r[t<0?e>0?0:r.length-1:(t+e+r.length)%r.length];n!==void 0&&o(n.id)})}u===void 0&&!l||(c.preventDefault(),c.stopImmediatePropagation(),c.repeat||u?.())}return document.addEventListener(`keydown`,c,!0),()=>document.removeEventListener(`keydown`,c,!0)},[e,t,a,r,i,o,n,s])}function xs({bootstrap:e,health:t,vault:n=qe.passwordVault}){let{t:r}=w();bi();let i=vi(gi),a=ye(),{resolved:o}=st(),{route:s,location:c,navigate:l,navigateLocation:u,setNavigationBlocker:d}=Fr(),f=s.kind===`section`?s.section:null,p=f===`Terminal`,m=mi({bootstrap:e,health:t,vault:n}),{state:h,vaultRecheck:g,failure:_,vaultExists:y,version:b,requestFailure:x,vaultMigration:S}=m;Ie(h===`ready`);let C=ys(l),T=_s(h===`ready`,f),[E,D]=(0,P.useState)(!1),O=(0,P.useRef)(null),k=(0,P.useRef)(null),[A,ee]=(0,P.useState)(Gn),[j,te]=(0,P.useState)(!1),[M,N]=(0,P.useState)(null),ne=(0,P.useRef)(null),re=(0,P.useRef)(null),ie=vi(`(max-width: 1023px)`),[ae,oe]=(0,P.useState)(!1),F=(0,P.useRef)(null);tn({open:E,containerRefs:[O,k],onDismiss:()=>D(!1),returnFocusRef:k,trapFocus:i}),tn({open:j&&M!==null&&ie,containerRefs:[ne,re],onDismiss:()=>te(!1),closeOnOutside:!1,returnFocusRef:re,initialFocusRef:ne,trapFocus:!0}),(0,P.useEffect)(()=>{Qn(o)},[o]),(0,P.useEffect)(()=>{h!==`ready`&&oe(!1)},[h]),(0,P.useEffect)(()=>{function e(e){ae?(e.preventDefault(),oe(!1)):E?(e.preventDefault(),D(!1)):j&&(e.preventDefault(),te(!1))}return window.addEventListener(`sshc-android-back`,e),()=>window.removeEventListener(`sshc-android-back`,e)},[ae,j,E]);function I(e){let t=Wn(e);ee(t),Kn(t)}let L=cn(Be,r,h===`ready`),se=(0,P.useCallback)(()=>D(!1),[]),{settings:ce,localShellProfiles:le,activeConsole:R,liveWorkspace:ue,restoreRequest:de,renameRequest:fe,orderedConsoles:pe,showConsole:me,openWorkspace:he,renameWorkspace:ge,openLocalShell:_e,duplicateConsole:ve,consumeRestore:be,consumeRename:xe,reorderConsoles:Se,setLiveWorkspace:Ce,setSettings:we}=hi({api:We,consoles:L,enabled:h===`ready`,section:f,navigate:l,closeNavigation:se}),Te=(0,P.useCallback)(()=>{F.current=document.activeElement instanceof HTMLElement?document.activeElement:null,oe(!0)},[]);bs({enabled:h===`ready`,shortcuts:a,terminalFace:p,orderedConsoles:pe,activeConsole:R,navigate:l,showConsole:me,openPalette:Te}),(0,P.useEffect)(()=>{if(h!==`ready`)return;let e=()=>{Er.reconcile().catch(()=>void 0)};e();let t=globalThis.setInterval(e,2e3);return()=>globalThis.clearInterval(t)},[h]);let Ee=Zr(L.sessions,p?R:null,r,me);(0,P.useEffect)(()=>{N(null)},[f]);let De=[{id:`new-connection`,label:r(`palette.newConnection`),detail:r(`palette.newConnectionDetail`),search:`new connection create host add 新規 接続 追加 作成`,run:()=>{C.setConnectionDraft({alias:``,group:``,hostName:``,user:``,port:``,authentication:`dedicated_password`,savedCredential:``,newCredential:``,keyID:``}),l(`Connections`)}},{id:`open-files`,label:r(`palette.openRemoteFiles`),detail:r(`palette.openRemoteFilesDetail`),search:`sftp files remote browse ファイル リモート 転送`,run:()=>l(`Files`)},{id:`open-shell`,label:r(`palette.openLocalShell`),detail:r(`palette.openLocalShellDetail`),search:`shell local terminal console シェル ローカル ターミナル`,run:()=>void _e()},...m.passwordless?[]:[{id:`lock-vault`,label:r(`palette.lockVault`),detail:r(`palette.lockVaultDetail`),search:`lock vault secure ロック 保管庫 施錠`,run:()=>{qe.lockVault().then(e=>{e.unlocked?m.openVault(e):m.lock()}).catch(()=>void 0)}}]];function Oe(e,t){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),l(t))}let ke=vs({settings:ce,setSettings:we,setHostPolicy:T.setHostOSC52});return h===`locked`?(0,z.jsx)(mt,{exists:y,passwordless:m.passwordless,version:b,onExists:m.markVaultExists,onOpen:m.openVault}):h===`error`?(0,z.jsx)(Si,{failure:_,requestFailure:x,version:b,onCloseFailure:m.clearRequestFailure}):h===`session-ended`?(0,z.jsx)(Ci,{}):(0,z.jsxs)(`div`,{className:`sshc-app flex h-screen flex-col bg-canvas text-ink`,"data-mobile":i,children:[(0,z.jsx)(_t,{}),(0,z.jsxs)(`div`,{className:`contents`,inert:h===`ready`&&g!==`idle`,"aria-hidden":h===`ready`&&g!==`idle`||void 0,children:[(0,z.jsx)(Ut,{route:s,navigationOpen:E,navigationId:xo,navigationToggleRef:k,onToggleNavigation:()=>D(e=>!e),inspector:M,inspectorOpen:j,inspectorToggleRef:re,onToggleInspector:()=>te(e=>!e),sectionLabels:G}),x===null?null:(0,z.jsx)(ft,{diagnostic:x,version:b,onClose:m.clearRequestFailure}),(0,z.jsxs)(`div`,{style:{"--navigation-width":`${A}px`},className:`sshc-app-layout grid min-h-0 flex-1 grid-cols-1 grid-rows-[minmax(0,1fr)] md:grid-cols-[var(--navigation-width)_minmax(0,1fr)] ${M!==null&&j?`lg:grid-cols-[var(--navigation-width)_minmax(0,1fr)_17rem]`:``}`,children:[E?(0,z.jsx)(`div`,{"aria-hidden":`true`,"data-navigation-backdrop":!0,onClick:()=>D(!1),className:`sshc-navigation-backdrop fixed inset-0 z-20 bg-canvas/70 md:hidden`}):null,(0,z.jsx)(Dr,{navigationRef:O,navigationId:xo,version:b,state:h,navigationOpen:E,mobileLayout:i,desktopWidth:A,onDesktopWidthChange:I,startSections:bo,section:f,sectionIcons:yo,sectionLabels:G,onNavigate:(e,t)=>{D(!1),Oe(e,t)},consoles:L,orderedConsoles:pe,activeConsole:R,liveWorkspace:ue,onRenameWorkspace:ge,unreadBySession:Ee,onShowConsole:me,onDuplicateConsole:e=>void ve(e),onReorderConsoles:Se,localShellProfiles:le,onOpenShell:e=>void _e(e),aliases:T.knownAliases,hosts:T.hosts,onConnect:e=>void(async()=>{let t=await L.open({kind:`ssh`,alias:e});t!==null&&me(t.id)})(),onOpenCommandPalette:()=>{F.current=k.current,D(!1),oe(!0)}}),(0,z.jsxs)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col overflow-hidden`,children:[M===null?null:(0,z.jsx)(`span`,{className:`absolute right-2 top-2 z-10 hidden md:block [&>button]:h-8 [&>button]:w-8 [&>button]:justify-center [&>button>span]:hidden`,children:(0,z.jsx)(yt,{label:M.label,open:j,attention:M.attention,onToggle:()=>te(e=>!e)})}),S===null?null:(0,z.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-notice-line bg-notice px-4 py-2 text-sm text-notice-ink`,children:[(0,z.jsx)(`p`,{className:`min-w-0 grow`,children:r(`lock.migrationCompleted`,{current:S.from,required:S.to})}),(0,z.jsx)(v,{className:`shrink-0`,onClick:m.clearVaultMigration,children:r(`lock.migrationDismiss`)})]}),C.connectionDraft!==null&&(f===`Groups`||f===`Keys`)?(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-notice-line bg-notice px-4 py-2 text-sm text-notice-ink`,children:[(0,z.jsx)(`p`,{className:`min-w-0 grow truncate`,children:r(`conn.createDraftWaiting`,{alias:C.connectionDraft.alias||r(`conn.createUntitledDraft`)})}),(0,z.jsx)(v,{className:`shrink-0`,onClick:()=>l(`Connections`),children:r(`conn.createReturnToDraft`)})]}):null,h===`ready`?(0,z.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden`,children:[p||R!==null?(0,z.jsx)(`div`,{className:p?`h-full`:`hidden`,children:(0,z.jsx)(gs,{visible:p,consoles:L,activeConsole:R,settings:ce,hostAppearance:T.hostAppearance,hostOSC52:T.hostOSC52,onActive:me,onLiveWorkspaceChange:Ce,onOpenAlias:e=>L.open({kind:`ssh`,alias:e}),onOpenShell:()=>L.open({kind:`shell`}),onOSC52Change:ke,onOpenRemotePath:C.openRemotePath,restoreRequest:de,onRestoreConsumed:be,renameRequest:fe,onRenameConsumed:xe})}):null,s.kind===`section`?(0,z.jsx)(P.Suspense,{fallback:(0,z.jsx)(St,{}),children:(0,z.jsx)(To,{section:s.section,navigation:{location:c,fileTarget:C.fileTarget,onNavigate:l,onNavigateLocation:u,onNavigateForCreation:e=>l(e),onOpenFile:C.openFile,onNavigationBlockerChange:d},handoff:{connectionKey:C.connectionKey,publicKey:C.publicKey,connectionDraft:C.connectionDraft,onAssignGeneratedKey:C.assignGeneratedKey,onInstallGeneratedKey:C.installGeneratedKey,onConnectionKeyApplied:C.consumeConnectionKey,onPublicKeyHandled:C.consumePublicKey,onConnectionDraftChange:C.setConnectionDraft},shell:{onLock:m.lock,onVaultChanged:m.openVault,onInspector:N,consoles:L,onShowConsole:me,onOpenWorkspace:he,onTerminalSettingsChange:async e=>{we(e),await L.refresh()}},declared:{groups:T.groups,knownAliases:T.knownAliases,hosts:T.hosts},sftpTarget:C.sftpTarget,onSftpTargetHandled:C.handleSftpTarget},s.section)}):(0,z.jsx)(Ti,{pathname:s.pathname,onGoHome:e=>Oe(e,`Home`)})]}):null]}),M!==null&&j?(0,z.jsx)(bt,{label:M.label,paneRef:ne,children:M.body}):null]}),h===`ready`&&i?(0,z.jsx)(`nav`,{"aria-label":r(`shell.mobileNavigation`),className:`sshc-mobile-navigation grid shrink-0 grid-cols-5 border-t border-line bg-toolbar`,children:[`Home`,`Connections`,`Files`,`Terminal`,`Menu`].map(e=>(0,z.jsxs)(`a`,{href:At(e),"aria-current":f===e?`page`:void 0,onClick:t=>{D(!1),Oe(t,e)},className:`relative flex min-h-13 min-w-0 flex-col items-center justify-center gap-0.5 px-1 py-1 text-[10px] transition-colors ${f===e?`bg-select-fill font-semibold text-accent`:`text-ink-muted active:bg-hover`}`,children:[f===e?(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-4 top-0 h-0.5 rounded-full bg-accent`}):null,(0,z.jsx)(B,{name:yo[e],className:`size-5`}),(0,z.jsx)(`span`,{className:`max-w-full truncate`,children:r(G[e])})]},e))}):null,h===`ready`?(0,z.jsx)($r,{}):null,h===`ready`?(0,z.jsx)(ci,{open:ae,commands:De,returnFocusRef:F,hosts:T.hosts,files:T.files,sessions:pe,unreadBySession:Ee,sectionLabels:G,onClose:()=>oe(!1),onConnect:async e=>{let t=await L.open({kind:`ssh`,alias:e});t!==null&&me(t.id)},onOpenHostSettings:e=>u(Ht({path:e.path,alias:e.alias,panel:`Basic`,advanced:`Jump`})),onOpenFile:e=>C.openFile(e,1),onNavigate:l,onOpenSnippet:e=>u(`${At(`Snippets`)}?snippet=${encodeURIComponent(e)}`),onOpenSession:me}):null]}),h===`ready`&&g!==`idle`?(0,z.jsx)(wi,{phase:g}):null]})}var Ss={en:{heading:`sshc stopped rendering`,note:`This is a defect. Copy the lines below into a report. They contain only the failure details.`,reload:`Reload`},ja:{heading:`sshc の画面を表示できませんでした`,note:`アプリの不具合です。下の内容にはエラー情報だけが含まれています。コピーして不具合報告に添えてください。`,reload:`再読み込み`}};function Cs(){try{return Ss[j()]}catch{return Ss.en}}var ws=class extends P.Component{state={message:``,stack:``};static getDerivedStateFromError(e){let t=e instanceof Error?e:Error(String(e));return{message:`${t.name}: ${t.message}`,stack:(t.stack??``).split(` -`).slice(1,6).join(` -`)}}componentDidCatch(e,t){console.error(`sshc stopped rendering`,e,t.componentStack)}render(){if(this.state.message===``)return this.props.children;let e=Cs();return(0,z.jsxs)(`main`,{style:Ts,children:[(0,z.jsx)(`h1`,{style:Es,children:e.heading}),(0,z.jsx)(`p`,{style:Ds,children:e.note}),(0,z.jsx)(`pre`,{style:Os,children:this.state.message}),this.state.stack===``?null:(0,z.jsx)(`pre`,{style:Os,children:this.state.stack}),(0,z.jsx)(`button`,{type:`button`,style:ks,onClick:()=>window.location.replace(window.location.pathname+window.location.search),children:e.reload})]})}},Ts={padding:`24px`,paddingTop:`48px`,display:`flex`,flexDirection:`column`,gap:`12px`,alignItems:`flex-start`,fontFamily:`system-ui, sans-serif`,color:`#111111`,background:`#ffffff`,minHeight:`100vh`},Es={fontSize:`16px`,fontWeight:600,margin:0},Ds={fontSize:`13px`,margin:0,lineHeight:1.5},Os={fontSize:`12px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,background:`#f3f3f3`,border:`1px solid #dddddd`,borderRadius:`6px`,padding:`8px`,margin:0,maxWidth:`100%`},ks={fontSize:`14px`,padding:`10px 16px`,borderRadius:`6px`,border:`1px solid #888888`,background:`#ffffff`},As=document.getElementById(`root`);if(!As)throw Error(`root element missing`);var js=x(window.location,window.history,window.fetch.bind(window));for(let e of[`dragover`,`drop`])window.addEventListener(e,e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()});`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{let e=window.trustedTypes,t=e?e.createPolicy(`sshc-service-worker`,{createScriptURL:e=>e}).createScriptURL(`/sw.js`):`/sw.js`;navigator.serviceWorker.register(t,{scope:`/`}).catch(()=>void 0)}),(0,oe.createRoot)(As).render((0,z.jsx)(P.StrictMode,{children:(0,z.jsx)(ws,{children:(0,z.jsx)(at,{children:(0,z.jsx)(T,{children:(0,z.jsx)(xs,{bootstrap:()=>js,health:()=>u.health()})})})})}));export{st as $,Hn as A,dn as B,Xr as C,Er as D,Ur as E,Cn as F,Ht as G,an as H,xn as I,B as J,Vt as K,gn as L,kn as M,An as N,ar as O,jn as P,ct as Q,fn as R,Ir as S,Kr as T,rn as U,ln as V,tn as W,ut as X,mt as Y,lt as Z,vi as _,Go as a,Me as at,Vr as b,ha as c,F as ct,Qi as d,le as dt,qe as et,Yi as f,xe as ft,yi as g,gi as h,qo as i,Fe as it,Rn as j,Vn as k,ma as l,be as lt,Ni as m,ie as mt,fs as n,Be as nt,ko as o,Pe as ot,Ji as p,ye as pt,wt as q,Jo as r,Ne as rt,ao as s,ke as st,ps as t,We as tt,fa as u,I as ut,ai as v,Hr as w,Gr as x,ri as y,pn as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-DtC-pXtZ.js b/internal/ui/dist/assets/index-DtC-pXtZ.js new file mode 100644 index 000000000..ee8ed3571 --- /dev/null +++ b/internal/ui/dist/assets/index-DtC-pXtZ.js @@ -0,0 +1,13 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LicensePage-4RM7GLPH.js","assets/jsx-runtime-BOsSdQ68.js","assets/form-zbLY2cuV.js","assets/ConnectionsPage-CTHBHqx2.js","assets/surface-DPFJ-mE2.js","assets/diagnostics-C7nSnivf.js","assets/credentials-HxEBLVTm.js","assets/rules-Bwt16Wjc.js","assets/SavePreview-BkzRFZRF.js","assets/useAsyncOperation-DcaEx5AT.js","assets/api-ic2UgGYC.js","assets/palettes-B33rdzLR.js","assets/fonts-Dday_bgd.js","assets/ConfigExplorer-D0QKY4pL.js","assets/page-BaebBDRI.js","assets/GroupsPanel-Dl838IU6.js","assets/HistoryPanel-D7zkZVvV.js","assets/KeysScreen-C8IdSb-o.js","assets/tableSort-Bd9PEJHh.js","assets/DiagnosticsPanel-BK7IKd4T.js","assets/SecretsPanel-DgaGrbjT.js","assets/SettingsPanel-fF4HOX9H.js","assets/SyncPanel-z52FlWen.js","assets/KnownHostsPanel-2G8g54MH.js","assets/RemoteKeyPanel-D45eirBG.js","assets/SFTPWorkspace-jSaRifyW.js","assets/clipboard-ObSO6ZLv.js","assets/SnippetsPanel-DhbUOOt2.js","assets/TerminalView-DZqn0XNz.js","assets/reducedMotion-XhcdVu33.js","assets/TerminalView-BrP-ENHg.css"])))=>i.map(i=>d[i]); +import{a as e,o as t,r as n,s as r,t as i}from"./jsx-runtime-BOsSdQ68.js";import{C as a,S as o,_ as s,a as c,b as l,c as u,f as d,h as f,l as p,m,n as h,o as g,p as _,r as v,s as y,t as b,u as x,v as S,w as C,x as w,y as T}from"./surface-DPFJ-mE2.js";import{_ as E,b as D,g as O,h as k,i as A,n as ee,r as j,s as M,t as N,u as P,v as te,y as ne}from"./form-zbLY2cuV.js";import{t as re}from"./clipboard-ObSO6ZLv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var ie=r((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ae=r(((e,t)=>{t.exports=ie()})),F=r((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=F()})),I=r((e=>{var n=ae(),r=t(),i=oe();function a(e){var t=`https://react.dev/errors/`+e;if(1re||(e.current=ne[re],ne[re]=null,re--)}function I(e,t){re++,ne[re]=e.current,e.current=t}var se=ie(null),L=ie(null),ce=ie(null),R=ie(null);function le(e,t){switch(I(ce,t),I(L,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}F(se),I(se,e)}function ue(){F(se),F(L),F(ce)}function de(e){e.memoizedState!==null&&I(R,e);var t=se.current,n=Hd(t,e.type);t!==n&&(I(L,e),I(se,n))}function z(e){L.current===e&&(F(se),F(L)),R.current===e&&(F(R),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var ye=Object.prototype.hasOwnProperty,be=n.unstable_scheduleCallback,xe=n.unstable_cancelCallback,Se=n.unstable_shouldYield,Ce=n.unstable_requestPaint,we=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,De=n.unstable_UserBlockingPriority,Oe=n.unstable_NormalPriority,ke=n.unstable_LowPriority,Ae=n.unstable_IdlePriority,je=n.log,Me=n.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function We(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.textContent,a=i.length;for(e=0;e=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nt(e.document)}return t}function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Er=on&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Nt(r)||(r=Dr,`selectionStart`in r&&Tr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),kr&&br(kr,r)||(kr=r,r=Ed(Or,`onSelect`),0>=o,i-=o,Ci=1<<32-Ie(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Ti(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),H&&Ti(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Ti(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),H&&Ti(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Ta(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=pi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ta(o),b(e,r,o,c)}if(M(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===x)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function U(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=ua;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Y&f)===f:(r&f)===f){f!==0&&f===la&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=N.T,s={};N.T=s,Ms(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,pa(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Cs(e).queue;bs(e,i,t,te,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return Qi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=U(n);var r=Ba(t,e,n);r!==null&&(hu(r,t,n),Va(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=$r(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,yr(s,o))return Qr(e,t,i,0),q===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(a(479))}else t=$r(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Is={readContext:Qi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Qi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,i=Do();if(H){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),q===null)throw Error(a(349));Y&127||Ro(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=q.identifierPrefix;if(H){var n=wi,r=Ci;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[B]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ce.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ai,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[B]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Fi(t,!0)}else e=Bd(e).createTextNode(r),e[B]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[B]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(a(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[B]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),i=!1}else i=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return ue(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return Ki(t.type),Ic(t),null;case 19:if(F(oo),r=t.memoizedState,r===null)return Ic(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return I(oo,oo.current&1|2),H&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>tu&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304)}else{if(!i)if(e=so(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return Ic(t),null}else 2*we()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=oo.current,I(oo,i?n&1|2:n&1),H&&Ti(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&F(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Ic(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Rc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return z(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(oo),null;case 4:return ue(),null;case 10:return Ki(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&F(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function zc(e,t){switch(Oi(t),t.tag){case 3:Ki(ia),ue();break;case 26:case 27:case 5:z(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:F(oo);break;case 10:Ki(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&F(ha);break;case 24:Ki(ia)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[at]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[B]=e,t[at]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=wr(e),Tr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[B]=e,_t(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Sr(s,h),v=Sr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,N.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(a(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{P.p=i,N.T=r,Vu(e,t)}}function Wu(e,t,n){t=hi(n,t),t=Xs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Ye(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=hi(n,e),n=Zs(2),r=Ba(t,n,2),r!==null&&(Qs(n,r,t,e),Ye(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>we()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=qe()),e=ei(e,t),e!==null&&(Ye(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return be(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=We(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=we(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=gt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);_t(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=gt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),_t(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=gt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),_t(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ce.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=gt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=gt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=gt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Ft(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),_t(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ft(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,_t(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),_t(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=I()}))(),L=t();function ce(e,t){let{intervalMs:n,enabled:r=!0,whileHidden:i=!1,immediately:a=!1}=t,o=(0,L.useRef)(e);o.current=e,(0,L.useEffect)(()=>{if(!r)return;let e=!1,t=()=>{if(e||!i&&document.visibilityState===`hidden`)return;e=!0;let t;try{t=o.current()}catch{e=!1;return}t instanceof Promise?t.catch(()=>void 0).finally(()=>{e=!1}):e=!1};a&&t();let s=window.setInterval(t,n);return()=>window.clearInterval(s)},[r,a,n,i])}var R={palette:[`Ctrl+K`,`Meta+K`],terminalSearch:[`Ctrl+F`,`Meta+F`],copy:[`Ctrl+Shift+C`,`Meta+C`],paste:[`Ctrl+V`,`Meta+V`,`Ctrl+Shift+V`],nextSession:[`Alt+PageDown`],previousSession:[`Alt+PageUp`],home:[],sftp:[]},le=Object.keys(R),ue=`sshc.shortcuts.v1`,de=`sshc-shortcuts-changed`,z=/^(?:[A-Z0-9]|F(?:[1-9]|1[0-2])|Arrow(?:Up|Down|Left|Right)|PageUp|PageDown|Home|End|Insert|Delete|Backspace|Enter|Tab|Escape|Space|[-=,.;/\[\]\\'`])$/;function fe(e){if(e.isComposing||e.keyCode===229||e.getModifierState(`AltGraph`)||[`Control`,`Shift`,`Alt`,`Meta`,`Dead`,`Unidentified`].includes(e.key)||!e.ctrlKey&&!e.metaKey&&!e.altKey&&!/^F([1-9]|1[0-2])$/.test(e.key))return null;let t=e.key===` `?`Space`:e.key.length===1?e.key.toUpperCase():e.key;return z.test(t)?[e.ctrlKey&&`Ctrl`,e.altKey&&`Alt`,e.shiftKey&&`Shift`,e.metaKey&&`Meta`,t].filter(Boolean).join(`+`):null}function pe(e){if(typeof e!=`string`)return!1;let t=e.split(`+`),n=t.pop()??``;return z.test(n)?fe(new KeyboardEvent(`keydown`,{key:n===`Space`?` `:n,ctrlKey:t.includes(`Ctrl`),altKey:t.includes(`Alt`),shiftKey:t.includes(`Shift`),metaKey:t.includes(`Meta`)}))===e:!1}function me(){return n(`sshc.shortcuts.v1`)??``}function he(e,t=!0){try{let n=JSON.parse(e);if(typeof n!=`object`||!n)return R;let r={...R};for(let e of le){let t=n[e];Array.isArray(t)&&t.length<=3&&t.every(pe)&&(r[e]=[...new Set(t)])}t&&r.paste.length===2&&r.paste.includes(`Ctrl+Shift+V`)&&r.paste.includes(`Meta+V`)&&!le.some(e=>e!==`paste`&&r[e].includes(`Ctrl+V`))&&(r.paste=R.paste);let i=Object.values(r).flat();return new Set(i).size===i.length?r:R}catch{return R}}var ge=`sshc.shortcuts.selected.v1`;function _e(){return n(ge)===null}function ve(){return he(me(),_e())}function ye(e){window.localStorage.setItem(ue,JSON.stringify(e)),window.dispatchEvent(new Event(de))}function be(e){return window.addEventListener(`storage`,e),window.addEventListener(de,e),()=>{window.removeEventListener(`storage`,e),window.removeEventListener(de,e)}}function xe(){let e=(0,L.useSyncExternalStore)(be,me,()=>``);return(0,L.useMemo)(()=>he(e,_e()),[e])}function Se(e,t,n){let r=fe(e);return r!==null&&(n??ve())[t].includes(r)}function Ce(e){return e.defaultPrevented||e.isComposing||e.keyCode===229||e.target instanceof Element&&e.target.closest(`[data-shortcut-editor]`)!==null||document.querySelector(`[role="dialog"][aria-modal="true"], dialog[open]`)!==null}var we=5e3,Te={presets:[],selected:`default`,loading:!0,busy:!1,error:!1},Ee=new Set,De=0,Oe=!1,ke=0,Ae=e=>{Te={...Te,...e},Ee.forEach(e=>e())},je=e=>(Ee.add(e),()=>{Ee.delete(e)}),Me=()=>(0,L.useSyncExternalStore)(je,()=>Te);async function Ne(e,t){await S.mutate(`/api/v1/metadata/shortcuts`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({base:e,presets:t})})}function Pe(t,n,r=!0){let i=n.find(e=>e.id===t),a=i?t:`default`,o=i?.bindings??R;r&&e(ge,a),JSON.stringify(ve())!==JSON.stringify(o)&&ye(o),Ae({selected:a})}function Fe(e){++ke,Pe(e,Te.presets)}async function Ie(){if(Oe||Te.busy)return;Oe=!0;let t=De,r=ke;try{let i=C(`Metadata`,await S.read(`/api/v1/metadata`));if(t!==De||r!==ke)return;let a=i.shortcutPresets??[],o=n(ge),s=o!==null||n(`sshc.shortcuts.v1`)!==null;if(o===null&&(o=s?`pending:${crypto.randomUUID()}`:`default`,s&&e(ge,o)),o.startsWith(`pending:`)){let e=o.slice(8);if(!a.some(t=>t.id===e)){let i=[...a,{id:e,name:`Imported shortcuts`,bindings:he(n(`sshc.shortcuts.v1`)??``)}];if(await Ne(a,i),t!==De||r!==ke)return;a=i}o=e}Pe(o,a,s),Ae({presets:a,loading:!1,error:!1})}catch{t===De&&Ae({loading:!1,error:!0})}finally{Oe=!1}}async function Le(e,t=Te.selected){if(Te.busy||Te.loading||Te.error)throw Error(`Presets are not ready; reload before saving`);++ke,Ae({busy:!0});try{await Ne(Te.presets,e),Ae({presets:e}),Pe(t,e)}catch(e){throw Ae({error:!0}),e}finally{Ae({busy:!1})}}async function Re(e){let t=Te.presets.find(e=>e.id===Te.selected),n=t?{...t,bindings:e}:{id:crypto.randomUUID(),name:`My shortcuts`,bindings:e};await Le(t?Te.presets.map(e=>e.id===n.id?n:e):[...Te.presets,n],n.id)}function ze(e){(0,L.useEffect)(()=>{if(!e)return;++De,Ae({loading:!0}),Ie();let t=()=>{Ie()};return window.addEventListener(`focus`,t),window.addEventListener(`storage`,t),()=>{++De,window.removeEventListener(`focus`,t),window.removeEventListener(`storage`,t)}},[e]),ce(Ie,{intervalMs:we,enabled:e,whileHidden:!0})}function Be(e){return C(`TerminalSessionList`,e)}function Ve(e){return C(`OpenTerminalSessionResponse`,e)}function He(e){return C(`TerminalStreamTicket`,e)}var Ue={async terminalSessions(){return Be(await S.read(`/api/v1/terminal/sessions`))},async openTerminalSession(e){return Ve(await m(`/api/v1/terminal/sessions`,e))},async terminalStreamTicket(e,t){let n=t===void 0?``:`?cursor=${encodeURIComponent(String(t))}`;return He(await _(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/stream${n}`))},async reconnectTerminalSession(e){return Be(await _(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/reconnect`))},async stopTerminalReconnect(e){return Be(await _(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/reconnect/stop`))},async startTerminalForward(e,t){return Be(await m(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/forwards`,t))},async stopTerminalForward(e,t){return Be(await S.mutate(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/forwards/${encodeURIComponent(t)}`,{method:`DELETE`}))},async renameTerminalSession(e,t){return Be(await f(`/api/v1/terminal/sessions/${encodeURIComponent(e)}/title`,{title:t}))},async closeTerminalSession(e){return Be(await S.mutate(`/api/v1/terminal/sessions/${encodeURIComponent(e)}`,{method:`DELETE`}))}};function We(e){let t=u(e);return{...typeof t.palette==`string`?{palette:t.palette}:{},...typeof t.font==`string`?{font:t.font}:{},...typeof t.background==`string`?{background:t.background}:{},...typeof t.backgroundTint==`number`?{backgroundTint:t.backgroundTint}:{}}}function Ge(e){return C(`LocalShellProfileList`,e)}function Ke(e){return C(`TerminalBackground`,e)}var qe={async terminalSettings(){let e=u(await S.read(`/api/v1/metadata`));if(e.embeddedTerminal===void 0)return{};let t=u(e.embeddedTerminal);return{...typeof t.startDirectory==`string`&&t.startDirectory!==``?{startDirectory:t.startDirectory}:{},...typeof t.maxSessions==`number`?{maxSessions:t.maxSessions}:{},...typeof t.scrollbackBytes==`number`?{scrollbackBytes:t.scrollbackBytes}:{},...typeof t.browserScrollbackLines==`number`&&t.browserScrollbackLines>=1e3&&t.browserScrollbackLines<=1e5?{browserScrollbackLines:t.browserScrollbackLines}:{},...typeof t.fontSize==`number`?{fontSize:t.fontSize}:{},...typeof t.verbosity==`number`?{verbosity:t.verbosity}:{},...typeof t.reconnect==`number`?{reconnect:t.reconnect}:{},...typeof t.copyOnSelect==`boolean`?{copyOnSelect:t.copyOnSelect}:{},...typeof t.rightClickPaste==`boolean`?{rightClickPaste:t.rightClickPaste}:{},...typeof t.webgl==`boolean`?{webgl:t.webgl}:{},...typeof t.osc52==`boolean`?{osc52:t.osc52}:{},...typeof t.jisYenBackslash==`boolean`?{jisYenBackslash:t.jisYenBackslash}:{},...typeof t.localShellProfile==`string`&&/^[a-z0-9-]{1,64}$/.test(t.localShellProfile)?{localShellProfile:t.localShellProfile}:{},...t.appearance===void 0?{}:{appearance:We(t.appearance)}}},async setTerminalSettings(e){await f(`/api/v1/metadata/terminal`,e)},async localShellProfiles(){return Ge(await S.read(`/api/v1/terminal/shell-profiles`))},async engineSettings(){let e=u(await S.read(`/api/v1/metadata`));if(e.engine===void 0)return{};let t=u(e.engine),n=typeof t.port==`number`?{port:t.port}:{};if(t.vaultAutoLock!==void 0){let e=u(t.vaultAutoLock),r=p(e.mode);if(r===`restart`)n.vaultAutoLock={mode:r};else if(r===`idle`){let t=y(e.value),i=p(e.unit);Number.isSafeInteger(t)&&t>=1&&t<=999&&(i===`minutes`||i===`hours`)&&(n.vaultAutoLock={mode:r,value:t,unit:i})}}return n},async setEngineSettings(e){await f(`/api/v1/metadata/engine`,e)},async terminalBackgrounds(){let e=u(await S.read(`/api/v1/terminal/backgrounds`));return{backgrounds:g(e.backgrounds).map(Ke),usedBytes:y(e.usedBytes),capacityBytes:y(e.capacityBytes),remainingBytes:y(e.remainingBytes)}},async addTerminalBackground(e,t){return Ke(await S.mutate(`/api/v1/terminal/backgrounds?name=${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:t}))},async setTerminalBackgroundCapacity(e){let t=u(await f(`/api/v1/terminal/backgrounds/capacity`,{capacityMiB:e}));return{backgrounds:g(t.backgrounds).map(Ke),usedBytes:y(t.usedBytes),capacityBytes:y(t.capacityBytes),remainingBytes:y(t.remainingBytes)}},async renameTerminalBackground(e,t){return Ke(await d(`/api/v1/terminal/backgrounds/${encodeURIComponent(e)}`,{name:t}))},async deleteTerminalBackground(e){await S.mutate(`/api/v1/terminal/backgrounds/${encodeURIComponent(e)}`,{method:`DELETE`})}};function Je(e){return C(`PasswordVaultStatus`,e)}function Ye(e){return C(`PasswordEligibility`,e)}var Xe={async passwordVault(){return Je(await S.read(`/api/v1/passwords`))},async initialiseVault(e){return Je(await m(`/api/v1/passwords/initialise`,{passphrase:e}))},async unlockVault(e){return Je(await m(`/api/v1/passwords/unlock`,{passphrase:e}))},async recoverCompatibleVault(e){return Je(await m(`/api/v1/passwords/recover-compatible-backup`,{passphrase:e}))},async resetUnsupportedVault(e){return Je(await m(`/api/v1/passwords/reset-unsupported`,{passphrase:e,acknowledged:!0}))},async lockVault(){return Je(await _(`/api/v1/passwords/lock`))},async changeMasterPassword(e,t){return{vault:Je(u(await m(`/api/v1/passwords/change`,{current:e,next:t})).vault)}},async passwordEligibility(e){return Ye(await S.read(`/api/v1/passwords/${encodeURIComponent(e)}/eligibility`))},async storePassword(e,t){return Je(await f(`/api/v1/passwords/${encodeURIComponent(e)}`,{password:t}))},async forgetPassword(e){return Je(await S.mutate(`/api/v1/passwords/${encodeURIComponent(e)}`,{method:`DELETE`}))}},Ze=[`system`,`light`,`dark`],Qe=`dark`,$e=`sshc.theme`;function et(e){return typeof e==`string`&&Ze.includes(e)}function tt(){let e=n($e);return et(e)?e:Qe}function nt(t){e($e,t)}function rt(e,t){return e===`system`?t?`dark`:`light`:e}function it(e,t){e.setAttribute(`data-theme`,t)}var B=i(),at=(0,L.createContext)(null),ot=`(prefers-color-scheme: dark)`;function st(){return typeof window.matchMedia==`function`&&window.matchMedia(ot).matches}function ct({children:e,initial:t}){let[n,r]=(0,L.useState)(()=>t??tt()),[i,a]=(0,L.useState)(()=>st());(0,L.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let e=window.matchMedia(ot),t=()=>a(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let o=rt(n,i);(0,L.useEffect)(()=>{it(document.documentElement,o)},[o]);let s=(0,L.useCallback)(e=>{r(e),nt(e)},[]),c=(0,L.useMemo)(()=>({theme:n,setTheme:s,resolved:o}),[n,s,o]);return(0,B.jsx)(at.Provider,{value:c,children:e})}var lt={theme:`dark`,setTheme:()=>void 0,resolved:`dark`};function ut(){return(0,L.useContext)(at)??lt}function dt({label:e,value:t,onChange:n,autoFocus:r,disabled:i=!1,initialShown:a=!1,className:o=A,placeholder:s}){let c=E(),[l,u]=(0,L.useState)(a);return(0,B.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-2`,children:[(0,B.jsx)(`input`,{type:l?`text`:`password`,"aria-label":e,value:t,autoFocus:r??!1,autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1,disabled:i,placeholder:s,onChange:e=>n(e.target.value),className:`${o} min-w-0 grow`}),(0,B.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>u(!l),"aria-pressed":l,"aria-label":c(l?`password.hideNamed`:`password.showNamed`,{label:e}),className:`whitespace-nowrap rounded border border-control-line px-2 py-1.5 text-xs text-ink-muted hover:bg-select-fill`,children:c(l?`password.hide`:`password.show`)})]})}function ft({label:e,value:t,onChange:n,hint:r,autoFocus:i,disabled:a=!1,initialShown:o=!1}){return(0,B.jsx)(ee,{label:e,interactiveChildren:!0,...r===void 0?{}:{hint:r},children:(0,B.jsx)(dt,{label:e,value:t,onChange:n,...i===void 0?{}:{autoFocus:i},disabled:a,initialShown:o})})}function pt({value:e,label:t,className:n}){let r=E(),[i,a]=(0,L.useState)(`idle`);(0,L.useEffect)(()=>{a(`idle`)},[e]);async function o(){try{await re.writeText(e),a(`copied`)}catch{a(`failed`)}}return(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:()=>void o(),className:n??`rounded border border-control-line px-2 py-1 text-xs`,children:r(`copy.button`,{label:r(t)})}),(0,B.jsx)(`span`,{"aria-live":`polite`,className:i===`failed`?`text-xs text-danger`:`text-xs text-ink-muted`,children:i===`copied`?r(`copy.done`):i===`failed`?r(`copy.refused`):``})]})}function mt(e,t){let n=[`Version: ${e||`unknown`}`,`Code: ${t.code}`,`HTTP: ${t.status===0?`network unavailable`:t.status}`,`Operation: ${t.method.toUpperCase()} ${t.path}`];return t.detail!==void 0&&n.push(`Detail: ${t.detail}`),n.join(` +`)}function ht({diagnostic:e,version:t,onClose:n}){let r=E(),i=mt(t,e);return(0,B.jsx)(`section`,{"aria-labelledby":`request-failure-heading`,className:`shrink-0 border-b border-danger/40 bg-danger/5 px-4 py-3`,children:(0,B.jsxs)(`div`,{className:`mx-auto flex max-w-5xl flex-col gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,B.jsx)(`h2`,{id:`request-failure-heading`,className:`text-sm font-semibold text-danger`,children:r(`diagnostic.requestFailed`)}),(0,B.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-ink-muted`,children:r(`diagnostic.requestFailedHint`,{code:e.code})})]}),(0,B.jsx)(`button`,{type:`button`,onClick:n,"aria-label":r(`diagnostic.dismiss`),className:`shrink-0 rounded border border-control-line px-2 py-1 text-xs text-ink-muted`,children:r(`diagnostic.dismiss`)})]}),(0,B.jsxs)(`details`,{className:`text-xs`,children:[(0,B.jsx)(`summary`,{className:`cursor-pointer text-ink-muted`,children:r(`diagnostic.showDetails`)}),(0,B.jsx)(`pre`,{className:`mt-2 max-h-36 overflow-auto whitespace-pre-wrap break-words rounded border border-line bg-card p-2 text-ink`,children:i}),(0,B.jsx)(`div`,{className:`mt-2`,children:(0,B.jsx)(pt,{value:i,label:`copy.diagnosticReport`})})]})]})})}var gt={system:`shell.themeSystem`,light:`shell.themeLight`,dark:`shell.themeDark`};function _t({exists:e,passwordless:t=!1,onOpen:n,onExists:r=()=>void 0,version:i=``,api:a=Xe}){let{locale:o,setLocale:c,t:l}=O(),{theme:u,setTheme:d}=ut(),[f,p]=(0,L.useState)(``),[m,h]=(0,L.useState)(``),[g,_]=(0,L.useState)(``),[y,x]=(0,L.useState)(null),[S,C]=(0,L.useState)(null),[w,T]=(0,L.useState)(!1),[E,k]=(0,L.useState)(!1),[A,ee]=(0,L.useState)(!1),M=e?t:A,P=!M&&[...f].length<(e?1:4),te=!e&&!M&&m!==f;async function re(){if(!(E||P||te)){k(!0),_(``),x(null),C(null),T(!1);try{let t=e?await a.unlockVault(M?``:f):await a.initialiseVault(M?``:f);p(``),h(``),n(t)}catch(t){let n=t instanceof s?t.code:`network_request_failed`,i=e?`/api/v1/passwords/unlock`:`/api/v1/passwords/initialise`;if(x({code:n,status:t instanceof s?t.status:0,method:`POST`,path:i,...t instanceof s&&typeof t.problem?.detail==`string`?{detail:t.problem.detail}:{}}),n===`vault_already_exists`)try{if((await a.passwordVault()).exists){p(``),h(``),r(),_(l(`lock.alreadyExists`));return}}catch{}switch(n){case`wrong_passphrase`:_(l(`lock.wrong`));break;case`passphrase_too_short`:_(l(`lock.tooShort`,{count:4}));break;case`vault_storage_permission_denied`:_(l(`lock.storagePermission`));break;case`vault_storage_full`:_(l(`lock.storageFull`));break;case`vault_storage_read_only`:_(l(`lock.storageReadOnly`));break;case`vault_storage_busy`:_(l(`lock.storageBusy`));break;case`vault_storage_io_failed`:_(l(`lock.storageIO`));break;case`vault_schema_older`:case`vault_schema_newer`:{let e=t instanceof s&&typeof t.problem?.currentVersion==`number`?t.problem.currentVersion:0,r=t instanceof s&&typeof t.problem?.requiredVersion==`number`?t.problem.requiredVersion:0,i=n===`vault_schema_older`?`older`:`newer`;C({kind:i,current:e,required:r}),_(l(i===`older`?`lock.schemaOlder`:`lock.schemaNewer`,{current:e,required:r}));break}case`vault_migration_failed`:{let e=t instanceof s&&typeof t.problem?.currentVersion==`number`?t.problem.currentVersion:0,n=t instanceof s&&typeof t.problem?.requiredVersion==`number`?t.problem.requiredVersion:0;_(l(`lock.migrationFailed`,{current:e,required:n}));break}case`vault_envelope_unsupported`:_(l(`lock.envelopeUnsupported`));break;default:_(l(`lock.failed`))}}finally{k(!1)}}}async function ie(){k(!0),_(``);try{let e=await a.recoverCompatibleVault(f);p(``),C(null),n(e)}catch(e){let t=e instanceof s?e.code:`network_request_failed`;_(l(t===`vault_compatible_backup_missing`?`lock.noCompatibleBackup`:`lock.recoveryFailed`))}finally{k(!1)}}async function ae(){if(w){k(!0),_(``);try{let e=await a.resetUnsupportedVault(f);p(``),C(null),T(!1),n(e)}catch{_(l(`lock.resetFailed`))}finally{k(!1)}}}return(0,B.jsx)(`main`,{className:`flex min-h-screen items-center justify-center bg-canvas p-4 md:p-6`,children:(0,B.jsxs)(`section`,{className:`w-full max-w-3xl overflow-hidden rounded-lg border border-control-line bg-card shadow-2xl`,children:[(0,B.jsxs)(`header`,{className:`flex flex-wrap items-center justify-end gap-3 border-b border-control-line bg-toolbar px-4 py-3`,children:[(0,B.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-medium text-ink-muted`,children:[(0,B.jsx)(`span`,{children:l(`shell.theme`)}),(0,B.jsx)(`select`,{"aria-label":l(`shell.themeMenu`),value:u,onChange:e=>d(e.target.value),className:`${j} min-h-9`,children:Ze.map(e=>(0,B.jsx)(`option`,{value:e,children:l(gt[e])},e))})]}),(0,B.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-medium text-ink-muted`,children:[(0,B.jsx)(`span`,{children:l(`shell.language`)}),(0,B.jsx)(`select`,{"aria-label":l(`shell.languageMenu`),value:o,onChange:e=>c(e.target.value),className:`${j} min-h-9`,children:D.map(e=>(0,B.jsx)(`option`,{value:e,children:l(ne[e])},e))})]})]}),y===null?null:(0,B.jsx)(ht,{diagnostic:y,version:i,onClose:()=>x(null)}),(0,B.jsxs)(`div`,{className:`grid md:grid-cols-[minmax(0,0.9fr)_minmax(20rem,1.1fr)]`,children:[(0,B.jsx)(`div`,{className:`flex min-h-60 flex-col justify-center gap-8 border-b border-control-line bg-toolbar p-7 md:border-b-0 md:border-r md:p-10`,children:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-ink`,children:l(`shell.title`)}),(0,B.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-ink-muted`,children:l(e?M?`lock.explainPasswordless`:`lock.explainOpen`:`lock.explainNew`)})]})}),(0,B.jsxs)(`form`,{className:`flex flex-col justify-center gap-4 p-7 md:p-10`,onSubmit:e=>{e.preventDefault(),re()},children:[e||M?null:(0,B.jsx)(`p`,{className:`rounded-lg bg-notice px-3 py-2 text-sm text-notice-ink`,children:l(`lock.noRecovery`)}),g===``?null:(0,B.jsx)(v,{tone:`danger`,children:g}),S===null?null:(0,B.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-md border border-control-line bg-toolbar p-4`,children:[(0,B.jsx)(`p`,{className:`text-sm leading-6 text-ink-muted`,children:l(`lock.schemaRecoveryHint`)}),(0,B.jsx)(b,{type:`button`,disabled:E||P,onClick:()=>void ie(),children:l(`lock.restoreCompatibleBackup`)}),(0,B.jsx)(N,{label:l(`lock.resetUnsupportedAcknowledge`),checked:w,onChange:T,tone:`danger`}),(0,B.jsx)(b,{kind:`danger`,type:`button`,disabled:E||P||!w,onClick:()=>void ae(),children:l(`lock.resetUnsupported`)})]}),e?null:(0,B.jsx)(N,{label:l(`lock.withoutPassword`),checked:A,onChange:ee}),M?(0,B.jsx)(`p`,{className:`text-sm text-ink-muted`,children:l(`lock.withoutPasswordHint`)}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ft,{label:l(`lock.password`),value:f,onChange:p,autoFocus:!0}),e?null:(0,B.jsx)(ft,{label:l(`lock.confirm`),value:m,onChange:h})]}),!e&&!M&&[...f].length>=4&&[...f].length<12?(0,B.jsx)(`p`,{className:`text-sm text-ink-muted`,children:l(`lock.shortPasswordHint`)}):null,(0,B.jsx)(b,{kind:`primary`,className:`self-start`,type:`submit`,disabled:E||P||te,children:l(e?`lock.open`:`lock.create`)})]})]})]})})}var vt=[`home`,`connections`,`config`,`groups`,`keys`,`knownHosts`,`remoteKeys`,`diagnostics`,`secrets`,`settings`,`notification`,`sync`,`history`,`inspector`,`moreHorizontal`,`terminal`,`movePane`,`focus`,`close`,`plus`,`menu`,`search`,`chevronRight`,`edit`,`copy`],yt={home:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M3 11.5L12 4l9 7.5`}),(0,B.jsx)(`path`,{d:`M5.5 10v10h13V10M9.5 20v-6h5v6`})]}),connections:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,B.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,B.jsx)(`path`,{d:`M6.6 7.5h.01M6.6 16.5h.01`})]}),config:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z`}),(0,B.jsx)(`path`,{d:`M14 3v5h5`})]}),groups:(0,B.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}),keys:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`3.5`}),(0,B.jsx)(`path`,{d:`M10 13L20 3M17 6l2 2M14 9l2 2`})]}),knownHosts:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6z`}),(0,B.jsx)(`path`,{d:`M9 12l2 2 4-4`})]}),remoteKeys:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M7.5 18a4 4 0 1 1 .6-7.95A5.5 5.5 0 0 1 18.6 11 3.5 3.5 0 0 1 18 18`}),(0,B.jsx)(`path`,{d:`M12 21v-7M9.5 16.5L12 14l2.5 2.5`})]}),diagnostics:(0,B.jsx)(`path`,{d:`M3 12h4l3 8 4-16 3 8h4`}),secrets:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`rect`,{x:`4`,y:`10`,width:`16`,height:`11`,rx:`2`}),(0,B.jsx)(`path`,{d:`M8 10V7a4 4 0 0 1 8 0v3`})]}),settings:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,B.jsx)(`path`,{d:`M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9L7 7M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1`})]}),notification:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9`}),(0,B.jsx)(`path`,{d:`M10 21h4`})]}),sync:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M20 11a8 8 0 0 0-13.7-4.6L4 8.5`}),(0,B.jsx)(`path`,{d:`M4 4.5v4h4`}),(0,B.jsx)(`path`,{d:`M4 13a8 8 0 0 0 13.7 4.6L20 15.5`}),(0,B.jsx)(`path`,{d:`M20 19.5v-4h-4`})]}),history:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,B.jsx)(`path`,{d:`M12 7v5l3 2`})]}),inspector:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,B.jsx)(`path`,{d:`M15 4v16`})]}),moreHorizontal:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`})]}),terminal:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,B.jsx)(`path`,{d:`M7 9.5l3 2.5-3 2.5M12.5 15.5h4.5`})]}),movePane:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`circle`,{cx:`8`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`16`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`8`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`16`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`8`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,B.jsx)(`circle`,{cx:`16`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),focus:(0,B.jsx)(`path`,{d:`M9 4H4v5M15 4h5v5M20 15v5h-5M9 20H4v-5`}),close:(0,B.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`}),plus:(0,B.jsx)(`path`,{d:`M12 5v14M5 12h14`}),menu:(0,B.jsx)(`path`,{d:`M4 7h16M4 12h16M4 17h16`}),search:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,B.jsx)(`path`,{d:`M16 16l4 4`})]}),chevronRight:(0,B.jsx)(`path`,{d:`M9 5l7 7-7 7`}),edit:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16z`}),(0,B.jsx)(`path`,{d:`M13.5 6.5l4 4M4 20l3.8-1`})]}),copy:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`rect`,{x:`8`,y:`8`,width:`12`,height:`12`,rx:`2`}),(0,B.jsx)(`path`,{d:`M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2`})]})};function bt(){return(0,B.jsx)(`svg`,{"aria-hidden":`true`,style:{display:`none`},children:vt.map(e=>(0,B.jsx)(`symbol`,{id:`icon-${e}`,viewBox:`0 0 24 24`,children:yt[e]},e))})}function V({name:e,className:t=`h-4 w-4`}){return(0,B.jsx)(`svg`,{"aria-hidden":`true`,className:`shrink-0 ${t}`,fill:`none`,stroke:`currentColor`,strokeWidth:1.7,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,B.jsx)(`use`,{href:`#icon-${e}`})})}var xt=`inspector`;function St({label:e,open:t,attention:n,onToggle:r,buttonRef:i}){let a=E(),o=a(t?`shell.inspectorHideNamed`:`shell.inspectorShowNamed`,{label:e});return(0,B.jsxs)(`button`,{ref:i,type:`button`,"aria-label":n?`${o} ${a(`shell.inspectorAttention`)}`:o,"aria-expanded":t,"aria-controls":xt,onClick:r,className:`relative flex items-center gap-1.5 rounded-md border border-control-line px-2 py-1 text-ink ${t?`bg-select-fill`:`bg-card`}`,children:[(0,B.jsx)(V,{name:`inspector`,className:`h-4 w-4`}),(0,B.jsx)(`span`,{className:`hidden max-w-44 truncate text-xs sm:inline`,children:e}),n?(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -right-1 -top-1 h-2 w-2 rounded-full border border-toolbar bg-notice-ink`}):null]})}function Ct({label:e,children:t,paneRef:n}){return(0,B.jsx)(`aside`,{ref:n,tabIndex:-1,id:xt,"aria-label":e,className:`fixed inset-0 z-10 overflow-y-auto bg-sidebar p-3 lg:relative lg:z-auto lg:border-l lg:border-line`,children:t})}function wt({className:e}){return(0,B.jsx)(`div`,{className:`sshc-skeleton rounded-md ${e}`})}function Tt({kind:e=`section`}){return e===`terminal`?(0,B.jsx)(`div`,{"aria-hidden":`true`,className:`h-full bg-term-bg p-5`,children:(0,B.jsxs)(`div`,{className:`flex max-w-3xl flex-col gap-3 opacity-55`,children:[(0,B.jsx)(wt,{className:`h-3 w-48`}),(0,B.jsx)(wt,{className:`h-3 w-72`}),(0,B.jsx)(wt,{className:`h-3 w-56`})]})}):(0,B.jsx)(`div`,{"aria-hidden":`true`,className:`h-full overflow-hidden p-6`,children:(0,B.jsxs)(`div`,{className:`mx-auto flex max-w-6xl flex-col gap-6`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(wt,{className:`h-7 w-52`}),(0,B.jsx)(wt,{className:`h-3.5 w-full max-w-xl`})]}),(0,B.jsx)(`div`,{className:`sshc-card grid gap-px overflow-hidden rounded-md bg-line sm:grid-cols-3`,children:Array.from({length:3},(e,t)=>(0,B.jsxs)(`div`,{className:`flex flex-col gap-3 bg-card p-4`,children:[(0,B.jsx)(wt,{className:`h-3 w-24`}),(0,B.jsx)(wt,{className:`h-6 w-16`})]},t))}),(0,B.jsxs)(`div`,{className:`sshc-card flex flex-col gap-4 rounded-md bg-card p-4`,children:[(0,B.jsx)(wt,{className:`h-4 w-36`}),(0,B.jsx)(wt,{className:`h-10 w-full`}),(0,B.jsx)(wt,{className:`h-14 w-full`}),(0,B.jsx)(wt,{className:`h-14 w-full`})]})]})})}var Et=[`Engine`,`Terminal`,`Shortcuts`,`Notifications`,`Connections`,`Password`],Dt={Engine:{path:`/settings/engine`,label:`engine.heading`,description:`settings.engineDescription`,icon:`settings`},Terminal:{path:`/settings/terminal`,label:`terminal.settingsHeading`,description:`settings.terminalDescription`,icon:`terminal`},Shortcuts:{path:`/settings/shortcuts`,label:`shortcuts.heading`,description:`shortcuts.description`,icon:`settings`},Notifications:{path:`/settings/notifications`,label:`terminal.browserNotificationsHeading`,description:`settings.notificationsDescription`,icon:`notification`},Connections:{path:`/settings/connections`,label:`desktop.closeAllHeading`,description:`settings.connectionsDescription`,icon:`connections`},Password:{path:`/settings/password`,label:`secrets.changeHeading`,description:`settings.passwordDescription`,icon:`secrets`}};function Ot(e){return Dt[e].path}function kt(e){return Et.find(t=>{let n=Ot(t);return e===n||e===`${n}/`})??null}function At(e){let t=kt(e);return t===null?null:Ot(t)}var jt=[`Home`,`Menu`,`Connections`,`Terminal`,`Files`,`Snippets`,`Config`,`Groups`,`Keys`,`Known Hosts`,`Remote Keys`,`Diagnostics`,`Passwords`,`Key Passphrases`,`OTP`,`Settings`,`Sync`,`History`,`License`],Mt={Home:`/`,Menu:`/menu`,Connections:`/connections`,Terminal:`/terminal`,Files:`/files`,Snippets:`/snippets`,Config:`/config`,Groups:`/groups`,Keys:`/keys`,"Known Hosts":`/known-hosts`,"Remote Keys":`/install-key`,Diagnostics:`/diagnostics`,Passwords:`/vault/passwords`,"Key Passphrases":`/vault/key-passphrases`,OTP:`/vault/otp`,Settings:`/settings/engine`,Sync:`/sync`,History:`/history`,License:`/license`};function Nt(e){return Mt[e]}function Pt(e){for(let t of jt){let n=Mt[t];if(e===n)return{kind:`section`,section:t,canonicalPath:n,canonical:!0};if(n!==`/`&&e===`${n}/`)return{kind:`section`,section:t,canonicalPath:n,canonical:!1}}let t=At(e);return t===null?e.startsWith(`/connections/`)?{kind:`section`,section:`Connections`,canonicalPath:Mt.Connections,canonical:!0}:{kind:`not-found`,pathname:e}:{kind:`section`,section:`Settings`,canonicalPath:t,canonical:e===t}}function Ft(e){return e===``||e.startsWith(`/`)||e.startsWith(`~`)||e.includes(`\0`)||e.includes(`\\`)?!1:e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)}function It(e){return e!==``&&!/[\p{Cc}]/u.test(e)}var Lt={Basic:`basic`,Analysis:`analysis`,Advanced:`advanced`,Sshc:`sshc`},Rt=new Map(Object.entries(Lt).map(([e,t])=>[t,e])),zt={Jump:`jump`,Forwards:`port-forwarding`,Directives:`directives`,Raw:`raw`},Bt=new Map(Object.entries(zt).map(([e,t])=>[t,e])),Vt=new Set([`path`,`host`,`panel`,`advanced`]);function Ht(e){let t=new Set;for(let n of e.keys()){if(!Vt.has(n)||t.has(n))return!1;t.add(n)}return!0}function Ut(e){let t=e.get(`path`),n=e.get(`host`),r=e.get(`panel`),i=e.get(`advanced`);if(t===null&&n===null&&r===null&&i===null)return null;if(t===null||n===null||r===null||!Ft(t)||!It(n))return!1;let a=Rt.get(r);if(a===void 0)return!1;if(a!==`Advanced`)return i===null&&{path:t,alias:n,panel:a,advanced:`Jump`};if(i===null)return!1;let o=Bt.get(i);return o!==void 0&&{path:t,alias:n,panel:a,advanced:o}}function Wt(e){if(e.pathname===`/connections`)return{kind:`redirect`,location:`/connections/servers`};let t=new URLSearchParams(e.search);if(!Ht(t))return{kind:`invalid`};let n=Ut(t);return e.pathname!==`/connections/servers`||n===!1?{kind:`invalid`}:{kind:`valid`,target:n}}function Gt(e){let t=new URLSearchParams;if(e===null)return`/connections/servers`;if(!Ft(e.path)||!It(e.alias))throw Error(`Unsafe connection target`);return t.set(`path`,e.path),t.set(`host`,e.alias),t.set(`panel`,Lt[e.panel]),e.panel===`Advanced`&&t.set(`advanced`,zt[e.advanced]),`/connections/servers?${t.toString()}`}function Kt({route:e,navigationOpen:t,navigationId:n,navigationToggleRef:r,onToggleNavigation:i,inspector:a,inspectorOpen:o,inspectorToggleRef:s,onToggleInspector:c,sectionLabels:l}){let{t:u}=O();return(0,B.jsxs)(`header`,{"data-app-header":!0,className:`sticky top-0 z-20 flex h-12 shrink-0 items-center gap-2 border-b border-line bg-toolbar px-2 md:hidden`,children:[(0,B.jsx)(`button`,{ref:r,type:`button`,"aria-label":u(`shell.navigationToggle`),"aria-expanded":t,"aria-controls":n,onClick:i,className:`grid h-10 w-10 shrink-0 place-items-center rounded text-ink-muted hover:bg-select-fill hover:text-ink`,children:(0,B.jsx)(V,{name:`menu`,className:`h-4 w-4`})}),(0,B.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-semibold`,children:e.kind===`section`&&e.section!==void 0?u(l[e.section]):u(`shell.pageNotFound`)}),a===null?null:(0,B.jsx)(`span`,{className:`shrink-0 [&>button]:h-10 [&>button]:min-w-10 [&>button]:justify-center`,children:(0,B.jsx)(St,{label:a.label,open:o,attention:a.attention,...s===void 0?{}:{buttonRef:s},onToggle:c})})]})}var qt=oe(),Jt=[];function Yt(){return Jt[Jt.length-1]}function Xt(e){if(e.closest(`[hidden], [inert], [aria-hidden="true"]`))return!1;for(let t=e;t;t=t.parentElement){let e=getComputedStyle(t);if(e.display===`none`||e.visibility===`hidden`)return!1}return!0}function Zt(e){return[...e.querySelectorAll(`a[href], button, input, select, textarea, [tabindex]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.tabIndex>=0&&Xt(e))}function Qt(e){let t=Yt(),n=e.target;t===void 0||!t.closeOnOutside||!(n instanceof Node)||t.containers().some(e=>e?.contains(n)===!0)||t.dismiss(`outside`)}function $t(e){let t=Yt();if(t===void 0)return;if(e.key===`Tab`&&t.trapFocus){let n=t.containers().flatMap(e=>e===null?[]:Zt(e)),r=n[0]??t.containers()[0]??null,i=n[n.length-1]??r;if(r===null||i===null)return;let a=document.activeElement;(e.shiftKey?a===r||!n.includes(a):a===i||!n.includes(a))&&(e.preventDefault(),(e.shiftKey?i:r).focus());return}if(e.key!==`Escape`)return;e.preventDefault(),e.stopImmediatePropagation();let n=t.restoreFocus();t.dismiss(`escape`),queueMicrotask(()=>{n?.isConnected===!0&&n.focus()})}function en(e){let t=Jt.reduce((e,t,n)=>t.trapFocus?n:e,-1),n=Jt[t];n===void 0||!(e.target instanceof Node)||Jt.slice(t).some(t=>t.containers().some(t=>t?.contains(e.target)))||(n.initialFocus()??n.containers()[0])?.focus()}function tn(e){let t=Yt();if(t===void 0)return;e.preventDefault(),e.stopImmediatePropagation();let n=t.restoreFocus();t.dismiss(`android-back`),queueMicrotask(()=>{n?.isConnected===!0&&n.focus()})}function nn(){Jt.length===1&&(document.addEventListener(`pointerdown`,Qt,!0),document.addEventListener(`keydown`,$t,!0),document.addEventListener(`focusin`,en,!0),window.addEventListener(`sshc-android-back`,tn,!0))}function rn(){Jt.length===0&&(document.removeEventListener(`pointerdown`,Qt,!0),document.removeEventListener(`keydown`,$t,!0),document.removeEventListener(`focusin`,en,!0),window.removeEventListener(`sshc-android-back`,tn,!0))}function an({open:e,containerRefs:t,onDismiss:n,closeOnOutside:r=!0,returnFocusRef:i,initialFocusRef:a,trapFocus:o=!1}){let s=(0,L.useRef)(Symbol(`dismissible-layer`)),c=(0,L.useRef)(t),l=(0,L.useRef)(n),u=(0,L.useRef)(i),d=(0,L.useRef)(a);c.current=t,l.current=n,u.current=i,d.current=a,(0,L.useEffect)(()=>{if(!e)return;let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n={id:s.current,containers:()=>c.current.map(e=>e.current),dismiss:e=>l.current(e),closeOnOutside:r,restoreFocus:()=>u.current?.current??t,initialFocus:()=>d.current?.current??null,trapFocus:o},i=n.containers(),a=Yt();return a?.trapFocus===!0&&t!==null&&a.containers().some(e=>e?.contains(t))||a?.dismiss(`superseded`),Jt.push(n),nn(),o&&(n.initialFocus()??n.containers().flatMap(e=>e===null?[]:Zt(e))[0]??n.containers()[0]??null)?.focus(),()=>{let e=n.restoreFocus(),t=Jt.findIndex(e=>e.id===n.id);t>=0&&Jt.splice(t,1),rn(),queueMicrotask(()=>{let t=document.activeElement,n=t instanceof Node&&i.some(e=>e?.contains(t)===!0);e?.isConnected===!0&&(t===document.body||n)&&e.focus()})}},[r,e,o])}var on={center:`items-center justify-center p-4`,sheet:`items-end justify-center p-3 sm:items-center`,palette:`items-start justify-center px-3 pt-[10vh] md:pt-[14vh]`};function sn({open:e=!0,labelledBy:t,describedBy:n,children:r,onDismiss:i,closeOnOutside:a=!1,initialFocusRef:o,returnFocusRef:s,placement:c=`center`,panelClassName:l=`w-full max-w-lg`,backdropClassName:u=``,zIndexClassName:d=`z-50`}){let f=(0,L.useRef)(null);return an({open:e,containerRefs:[f],onDismiss:i,closeOnOutside:a,...o===void 0?{}:{initialFocusRef:o},...s===void 0?{}:{returnFocusRef:s},trapFocus:!0}),e?(0,qt.createPortal)((0,B.jsx)(`div`,{"data-modal-placement":c,className:`sshc-modal-frame fixed inset-0 ${d} flex bg-canvas/80 backdrop-blur-[2px] ${on[c]} ${u}`,children:(0,B.jsx)(`section`,{ref:f,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":t,"aria-describedby":n,className:`sshc-card sshc-modal-panel border border-control-line bg-card shadow-2xl ${l}`,children:r})}),document.body):null}function cn({id:e,heading:t,body:n,confirmLabel:r,cancelLabel:i,onConfirm:a,onCancel:o,returnFocusRef:s,confirmKind:c=`danger`}){let l=(0,L.useRef)(null);return(0,B.jsxs)(sn,{labelledBy:e,onDismiss:o,initialFocusRef:l,...s===void 0?{}:{returnFocusRef:s},panelClassName:`flex w-full max-w-sm flex-col gap-3 rounded-lg p-4`,children:[(0,B.jsx)(`h2`,{id:e,className:`text-sm font-medium text-ink`,children:t}),n,(0,B.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,B.jsx)(b,{ref:l,onClick:o,className:`focus:outline-2 focus:outline-offset-2 focus:outline-accent`,children:i}),(0,B.jsx)(b,{kind:c,onClick:a,className:`focus:outline-2 focus:outline-offset-2 focus:outline-accent`,children:r})]})]})}var ln=500,un=2e3,dn=10,fn=100;function pn(e,t,n=!0){let[r,i]=(0,L.useState)([]),[a,o]=(0,L.useState)(0),[s,c]=(0,L.useState)(0),[l,u]=(0,L.useState)(``),[d,f]=(0,L.useState)(!1),p=(0,L.useRef)(0),m=(0,L.useRef)(0),h=s>0,g=(0,L.useCallback)(()=>{c(e=>e+1)},[]),_=(0,L.useCallback)(()=>{c(e=>Math.max(0,e-1))},[]),v=(0,L.useCallback)(()=>(p.current+=1,m.current+=1,m.current),[]),y=(0,L.useCallback)((e,t)=>t===m.current?(p.current+=1,i(e.sessions),o(e.maxSessions),!0):!1,[]),b=(0,L.useCallback)(async()=>{if(!n)return;let t=p.current+1;p.current=t;try{let n=await e.terminalSessions();if(t!==p.current)return;i(n.sessions),o(n.maxSessions)}catch{}finally{t===p.current&&f(!0)}},[e,n]),x=(0,L.useCallback)(async(e,t)=>{g();let n=v();try{let t=await e();return y(t,n)||await b(),!0}catch(e){return await t(e),!1}finally{_()}},[y,v,g,_,b]),S=(0,L.useCallback)(async e=>{u(t(mn(T(e)))),await b()},[b,t]);(0,L.useEffect)(()=>(b(),()=>{p.current+=1}),[b]),ce(b,{intervalMs:r.some(e=>e.state===`connecting`||e.state===`reconnecting`)?ln:un,enabled:n&&r.length>0,whileHidden:!0});let C=(0,L.useCallback)(async n=>{g(),v(),u(``);try{let t=await e.openTerminalSession(n);return await b(),t.session}catch(e){return u(t(mn(T(e)))),null}finally{_()}},[e,v,g,_,b,t]),w=(0,L.useCallback)(async n=>{await x(()=>e.closeTerminalSession(n),()=>u(t(`terminal.closeFailed`)))},[e,x,t]),E=(0,L.useCallback)(async t=>(u(``),x(()=>e.reconnectTerminalSession(t),S)),[e,x,S]),D=(0,L.useCallback)(async t=>(u(``),x(()=>e.stopTerminalReconnect(t),S)),[e,x,S]),O=(0,L.useCallback)(async()=>{g();let n=!1;try{let i=r;for(let t=0;t0;t+=1){t>0&&await new Promise(e=>setTimeout(e,fn));for(let t of i)try{let n=v(),r=await e.closeTerminalSession(t.id);y(r,n)||await b(),i=r.sessions}catch{n=!0}let r=v(),a=await e.terminalSessions().catch(()=>null);if(a===null)break;y(a,r)||await b(),i=a.sessions}n&&i.length>0&&u(t(`terminal.closeFailed`))}finally{_()}},[y,e,v,g,_,b,r,t]);return{sessions:r,maxSessions:a,busy:h,problem:l,loaded:d,rename:(0,L.useCallback)((n,r)=>x(()=>e.renameTerminalSession(n,r),()=>u(t(`terminal.renameFailed`))),[e,x,t]),unpinTitle:(0,L.useCallback)(n=>x(()=>e.renameTerminalSession(n,null),()=>u(t(`terminal.renameFailed`))),[e,x,t]),open:C,reconnect:E,stopReconnect:D,close:w,closeAll:O,refresh:b,markExited:(0,L.useCallback)(e=>{p.current+=1,m.current+=1,i(t=>t.map(t=>t.id===e&&t.exited===void 0?{...t,state:`exited`,exited:{code:0,signal:``,at:``}}:t))},[])}}function mn(e){switch(e){case`terminal_session_limit`:return`terminal.limitRefused`;case`alias_unresolvable`:return`terminal.unresolvable`;case`jump_depth_exceeded`:return`terminal.jumpDepthExceeded`;case`host_key_unknown`:return`terminal.hostKeyUnknown`;case`host_key_changed`:return`terminal.hostKeyChanged`;case`host_key_revoked`:return`terminal.hostKeyRevoked`;case`identity_unavailable`:return`terminal.identityUnavailable`;case`authentication_unavailable`:return`terminal.authenticationUnavailable`;case`authentication_cancelled`:return`terminal.authenticationCancelled`;case`key_passphrase_required`:return`terminal.keyPassphraseRequired`;case`reconnect_failed`:return`terminal.reconnectFailed`;case`reconnect_exhausted`:return`terminal.reconnectExhausted`;case`reconnect_stopped`:return`terminal.reconnectStopped`;case`terminal_not_reconnecting`:return`terminal.notReconnecting`;default:return`terminal.openFailed`}}var hn=`application/x-sshc-console`;function gn(e,t){let n=t.progress;if(n===void 0)return t.state===`connected`?e(`terminal.connected`):e(`terminal.connecting`);let r=n.alias||`${n.user}@${n.hostName}`,i=`${n.hop}/${n.hops}`;switch(n.phase){case`dialing`:return e(`terminal.progressDialing`,{target:r,position:i});case`host_key`:return e(`terminal.progressHostKey`,{target:r,position:i});case`authenticating`:return e(`terminal.progressAuthenticating`,{target:r,position:i});case`authenticated`:return e(`terminal.progressAuthenticated`,{target:r,position:i});case`opening_session`:return e(`terminal.progressOpeningSession`,{target:r,position:i})}}function _n(e){return e.presentation?.displayTitle??e.title}function vn(e,t){return e.kind===`ssh`?e.alias??e.title:t===void 0?`localhost`:t(`terminal.localhost`)}function yn(e){return C(`RecentConnectionList`,e)}var bn={async recentConnections(){return yn(await S.read(`/api/v1/connections/recent`))}};function xn(e){return e.trim().toLocaleLowerCase()}function Sn(e,t){return t===``||[e.alias,e.group,e.hostName,e.user,e.destination,e.path,...e.patterns??[],...e.tags??[]].some(e=>e!==void 0&&e.toLocaleLowerCase().includes(t))}function Cn(e,t,n,r){let i;switch(e.key){case`ArrowRight`:i=(t+1)%n.length;break;case`ArrowLeft`:i=(t-1+n.length)%n.length;break;case`Home`:i=0;break;case`End`:i=n.length-1;break;default:return}e.preventDefault(),(e.currentTarget.closest(`[role="tablist"]`)?.querySelectorAll(`[role="tab"]`))?.[i]?.focus();let a=n[i];a!==void 0&&r(a)}var wn=()=>bn.recentConnections(),Tn=[],En=[];function Dn(e,t){let n=new Map(t.map(e=>[e.identity.alias,e]));return e.map(e=>{let t=n.get(e);return{alias:e,group:t?.group??``,hostName:t?.hostName??``,user:t?.user??``}})}function On({open:e,heading:t,aliases:n,hosts:r=Tn,value:i=``,local:a=En,loadRecent:o=wn,initialFocus:s=`search`,returnFocusRef:c,onChoose:l,onChooseLocal:u,onClose:d}){let f=E(),[p,m]=(0,L.useState)(``),[h,g]=(0,L.useState)(`groups`),[_,v]=(0,L.useState)([]),y=(0,L.useRef)(null),b=(0,L.useRef)(null),x=(0,L.useMemo)(()=>Dn(n,r),[n,r]),S=(0,L.useMemo)(()=>new Map(x.map(e=>[e.alias,e])),[x]),C=xn(p),w=a.filter(e=>C===``||[e.label,e.detail,`local`].some(e=>e.toLocaleLowerCase().includes(C))),T=x.filter(e=>Sn(e,C)),D=_.flatMap(e=>{let t=S.get(e.alias);return t===void 0?[]:[{...t,lastConnectedAt:e.lastConnectedAt}]}),O=(0,L.useMemo)(()=>{let e=new Map;for(let t of T)e.set(t.group,[...e.get(t.group)??[],t]);return e},[T]),k=D.length===0?[`groups`]:[`recent`,`groups`];(0,L.useEffect)(()=>{if(!e)return;let t=!0;return o().then(e=>{t&&(v(e.connections),e.connections.some(e=>S.has(e.alias))&&g(`recent`))}).catch(()=>void 0),()=>{t=!1}},[e,o,S]);function A(){d(),m(``)}let ee=({key:e,name:t,detail:n,icon:r,current:i,label:a,choose:o})=>(0,B.jsxs)(`button`,{type:`button`,onClick:()=>{o(),m(``)},"aria-label":a,className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left hover:bg-select-fill focus:bg-select-fill focus:outline-none ${i?`bg-select-fill`:``}`,children:[(0,B.jsx)(V,{name:r,className:`size-4 shrink-0 text-accent`}),(0,B.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,B.jsx)(`span`,{className:`block truncate font-medium text-ink`,children:t}),(0,B.jsx)(`span`,{className:`block truncate text-xs text-ink-muted`,children:n||f(`sftp.hostNoDetails`)})]}),i?(0,B.jsx)(`span`,{className:`text-xs text-accent`,children:f(`sftp.hostCurrent`)}):null]},e),j=(e,t)=>ee({key:e.alias,name:e.alias,detail:t||e.hostName,icon:`terminal`,current:e.alias===i,choose:()=>l(e.alias)}),M=e=>ee({key:`local:${e.id}`,name:e.label,detail:e.detail,icon:`home`,current:e.current===!0,label:`${e.label}, ${e.detail}`,choose:()=>u?.(e.id)});return(0,B.jsxs)(sn,{open:e,labelledBy:`host-picker-heading`,onDismiss:A,closeOnOutside:!0,initialFocusRef:s===`close`?b:y,...c===void 0?{}:{returnFocusRef:c},placement:`palette`,panelClassName:`flex max-h-[76vh] w-full max-w-xl flex-col overflow-hidden rounded-xl`,children:[(0,B.jsxs)(`div`,{className:`border-b border-line p-3`,children:[(0,B.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,B.jsx)(`h2`,{id:`host-picker-heading`,className:`font-semibold`,children:t}),(0,B.jsx)(`button`,{ref:b,type:`button`,"aria-label":f(`sftp.closeHostPicker`),onClick:A,className:`flex size-8 items-center justify-center rounded text-ink-muted hover:bg-select-fill`,children:`×`})]}),(0,B.jsxs)(`label`,{className:`relative block`,children:[(0,B.jsx)(`span`,{className:`sr-only`,children:f(`sftp.searchHosts`)}),(0,B.jsx)(V,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-muted`}),(0,B.jsx)(`input`,{ref:y,type:`search`,"aria-label":f(`sftp.searchHosts`),value:p,onChange:e=>m(e.target.value),placeholder:f(`sftp.searchHostsPlaceholder`),className:`w-full rounded-md border border-control-line bg-control py-2 pl-9 pr-3 text-sm`})]}),C===``?(0,B.jsxs)(`div`,{className:`mt-3 flex gap-1 rounded-md bg-toolbar p-1`,role:`tablist`,"aria-label":f(`sftp.hostViews`),children:[(0,B.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":h===`recent`,tabIndex:h===`recent`?0:-1,disabled:D.length===0,onClick:()=>g(`recent`),onKeyDown:e=>Cn(e,0,k,g),className:`grow rounded px-3 py-1.5 text-sm disabled:text-ink-faint ${h===`recent`?`bg-card shadow-sm`:`text-ink-muted`}`,children:f(`sftp.recentHosts`)}),(0,B.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":h===`groups`,tabIndex:h===`groups`?0:-1,onClick:()=>g(`groups`),onKeyDown:e=>Cn(e,k.length-1,k,g),className:`grow rounded px-3 py-1.5 text-sm ${h===`groups`?`bg-card shadow-sm`:`text-ink-muted`}`,children:f(`sftp.hostGroups`)})]}):null]}),(0,B.jsxs)(`div`,{className:`min-h-0 overflow-y-auto p-2`,children:[w.length>0?(0,B.jsx)(`div`,{className:`mb-2 border-b border-line pb-2`,children:w.map(M)}):null,C===``?h===`recent`&&D.length>0?(0,B.jsxs)(`section`,{"aria-labelledby":`host-picker-recent-heading`,children:[(0,B.jsx)(`h3`,{id:`host-picker-recent-heading`,className:`px-3 py-2 text-xs font-medium uppercase tracking-wide text-ink-muted`,children:f(`sftp.recentHosts`)}),D.map(e=>j(e,f(`sftp.lastConnected`,{at:new Date(e.lastConnectedAt).toLocaleString()})))]}):[...O.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,B.jsxs)(`section`,{"aria-label":e||f(`sftp.ungroupedHosts`),className:`mb-2`,children:[(0,B.jsx)(`h3`,{className:`px-3 py-2 text-xs font-medium uppercase tracking-wide text-ink-muted`,children:e||f(`sftp.ungroupedHosts`)}),t.map(e=>j(e,e.hostName))]},e||`ungrouped`)):T.length===0&&w.length===0?(0,B.jsx)(`p`,{className:`p-4 text-center text-sm text-ink-muted`,children:f(`sftp.noHostMatches`)}):T.map(e=>j(e,e.group||e.hostName))]})]})}function kn(e){return[...e.querySelectorAll(`[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`)}function An({open:e,menuRef:t,onClose:n}){let r=(0,L.useRef)(n);r.current=n,(0,L.useEffect)(()=>{if(!e)return;let n=t.current;if(n===null)return;let i=n;kn(i)[0]?.focus();function a(e){let t=kn(i);if(t.length===0)return;let n=t.indexOf(document.activeElement),a=-1;if(e.key===`ArrowDown`)a=(n+1)%t.length;else if(e.key===`ArrowUp`)a=n<=0?t.length-1:n-1;else if(e.key===`Home`)a=0;else if(e.key===`End`)a=t.length-1;else if(e.key===`Tab`){queueMicrotask(()=>r.current());return}else return;e.preventDefault(),t[a]?.focus()}return i.addEventListener(`keydown`,a),()=>i.removeEventListener(`keydown`,a)},[t,e])}function jn(e,t){switch(t.kind){case`agent`:return e(`terminal.forwardAgent`);case`dynamic`:return e(`terminal.forwardDynamic`,{listen:t.listen});default:return e(`terminal.forwardLocal`,{listen:t.listen,to:t.to})}}function Mn({sessions:e,selected:t,maxSessions:n,busy:r,problem:i,workspace:a=null,unreadBySession:o=new Set,onSelect:s,onClose:c,onRename:l,onRenameWorkspace:u,onUnpinTitle:d,onDuplicate:f,onReorder:p,localShellProfiles:m=[],onOpenShell:h,aliases:g=[],hosts:_=[],onConnect:y}){let b=E(),[x,S]=(0,L.useState)(!1),C=(0,L.useRef)(null),w=(0,L.useMemo)(()=>{let e=m.filter(e=>e.id!=="default");return[{id:`default`,label:b(`terminal.openShell`),detail:b(`terminal.localhost`)},...e.map(e=>({id:e.id,label:`${b(`terminal.openShell`)} · ${e.label}`,detail:e.path}))]},[m,b]),[T,D]=(0,L.useState)(null),[O,k]=(0,L.useState)(`down`),[A,ee]=(0,L.useState)(null),[j,M]=(0,L.useState)(null),[N,P]=(0,L.useState)(``),[te,ne]=(0,L.useState)(!1),[re,ie]=(0,L.useState)(``),[ae,F]=(0,L.useState)(null),[oe,I]=(0,L.useState)(null),[se,ce]=(0,L.useState)(!1),[R,le]=(0,L.useState)(!1),[ue,de]=(0,L.useState)(!1),z=(0,L.useRef)(null),fe=(0,L.useRef)(null),pe=e.filter(e=>e.exited===void 0).length,me=n>0&&pe>=n,he=new Set(a?.memberSessionIds??[]),ge=a===null?[]:e.filter(e=>he.has(e.id)),_e=e.filter(e=>!he.has(e.id)),ve=a!==null&&se?[...ge,..._e]:_e;(0,L.useEffect)(()=>{T!==null&&!e.some(e=>e.id===T)&&D(null),j!==null&&!e.some(e=>e.id===j)&&M(null),a===null&&(le(!1),ne(!1))},[e,T,j,a]),an({open:T!==null||R,containerRefs:[z,fe],onDismiss:()=>{D(null),le(!1)},returnFocusRef:fe}),An({open:T!==null||R,menuRef:z,onClose:()=>{D(null),le(!1)}}),(0,L.useEffect)(()=>{function e(e){e.key===`Shift`&&de(!0)}function t(e){e.key===`Shift`&&de(!1)}function n(){de(!1)}function r(){document.hidden&&n()}return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,n),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,n),document.removeEventListener(`visibilitychange`,r)}},[]);function ye(t,n){let r=e.map(e=>e.id),i=r.indexOf(t),a=i+n;i<0||a<0||a>=r.length||(r.splice(a,0,...r.splice(i,1)),p(r),D(null))}function be(t){let n=ae;if(F(null),I(null),n===null||n===t)return;let r=e.map(e=>e.id).filter(e=>e!==n),i=t===null?r.length:r.indexOf(t);r.splice(i<0?r.length:i,0,n),p(r)}async function xe(t){let n=N.trim();M(null);let r=e.find(e=>e.id===t)?.title??``;n===``||n===r||await l(t,n)}function Se(){let e=re.trim();ne(!1),!(a===null||e===``||e===a.name)&&u(e)}return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[i===``?null:(0,B.jsx)(v,{tone:`danger`,compact:!0,children:i}),e.length===0?(0,B.jsx)(`p`,{className:`px-2 text-xs text-ink-muted`,children:b(`terminal.noSessions`)}):(0,B.jsxs)(`ul`,{"aria-label":b(`terminal.consoleList`),className:`flex flex-col gap-0.5`,onDragOver:e=>{e.dataTransfer.types.includes(`application/x-sshc-console`)&&e.preventDefault()},onDrop:()=>be(null),children:[a===null||ge.length<2?null:(0,B.jsxs)(`li`,{className:`relative rounded-lg border border-control-line bg-control/70 p-1`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1 rounded-md ${he.has(t??``)?`bg-select-fill`:``}`,children:[(0,B.jsx)(`button`,{type:`button`,"aria-label":b(se?`workspace.collapseGroup`:`workspace.expandGroup`,{name:a.name}),"aria-expanded":se,onClick:()=>ce(e=>!e),className:`flex size-7 shrink-0 items-center justify-center rounded text-ink-muted hover:bg-hover`,children:(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs`,children:se?`▾`:`▸`})}),te?(0,B.jsxs)(`div`,{className:`min-w-0 grow px-1 py-1`,children:[(0,B.jsx)(`input`,{autoFocus:!0,"aria-label":b(`workspace.renameLabel`,{name:a.name}),value:re,onChange:e=>ie(e.target.value),onBlur:Se,onKeyDown:e=>{e.key===`Enter`&&Se(),e.key===`Escape`&&ne(!1)},className:`w-full rounded border border-accent bg-card px-1 py-0.5 text-sm text-ink`}),(0,B.jsx)(`span`,{className:`block text-xs text-ink-faint`,children:b(`workspace.groupCount`,{count:String(ge.length)})})]}):(0,B.jsxs)(`button`,{type:`button`,"aria-label":a.name,onClick:()=>s(a.focusedSessionId),className:`min-w-0 grow px-1 py-1 text-left`,children:[(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,B.jsx)(`span`,{className:`block min-w-0 truncate text-sm font-medium text-ink`,children:a.name}),ge.some(e=>o.has(e.id))?(0,B.jsx)(`span`,{"aria-label":b(`terminal.unreadWorkspace`),className:`size-2 shrink-0 rounded-full bg-accent`}):null]}),(0,B.jsx)(`span`,{className:`block text-xs text-ink-faint`,children:b(`workspace.groupCount`,{count:String(ge.length)})})]}),(0,B.jsx)(`button`,{type:`button`,"aria-label":b(`workspace.rowMenu`,{name:a.name}),"aria-expanded":R,onClick:e=>{fe.current=e.currentTarget,D(null),le(e=>!e)},className:`hidden size-7 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover md:flex`,children:(0,B.jsx)(V,{name:`moreHorizontal`,className:`size-3.5`})})]}),R?(0,B.jsx)(`div`,{ref:z,role:`menu`,"aria-label":b(`workspace.rowMenu`,{name:a.name}),className:`absolute right-1 top-full z-10 mt-0.5 hidden w-48 rounded-lg border border-control-line bg-card p-1 shadow-lg md:block`,children:(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{ie(a.name),ne(!0),le(!1)},className:`block w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover`,children:b(`workspace.rename`)})}):null]}),ve.map(n=>{let i=e.findIndex(e=>e.id===n.id),a=n.state!==`exited`,l=vn(n,b),u=_n(n),p=o.has(n.id),m=n.problem===``?n.state===`reconnecting`?b(`terminal.reconnectingAttempt`,{attempt:String(n.reconnect?.attempt??1),limit:String(n.reconnect?.limit??1)}):a?n.state===`connecting`?gn(b,n):b(`terminal.connected`):b(`terminal.exitedWith`,{code:String(n.exited?.code??0)}):b(mn(n.problem)),h=(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1.5 size-1.5 shrink-0 rounded-full ${n.state===`reconnecting`||n.state===`connecting`?`bg-notice-ink`:a?`bg-live`:`bg-ink-faint`}`}),g=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`p`,{className:`truncate text-xs text-ink-faint`,children:b(`terminal.rowDetail`,{status:m,destination:l})}),(n.forwards??[]).map(e=>(0,B.jsx)(`p`,{className:`truncate text-xs ${e.problem===``?`text-ink-faint`:`text-notice-ink`}`,children:e.problem===``?jn(b,e):e.problem},`${e.kind}:${e.listen}:${e.to}`))]});return(0,B.jsxs)(`li`,{draggable:j===null,onDragStart:e=>{e.dataTransfer.setData(hn,n.id),e.dataTransfer.effectAllowed=`move`,F(n.id)},onDragEnd:()=>{F(null),I(null)},onDragOver:e=>{e.dataTransfer.types.includes(`application/x-sshc-console`)&&(e.preventDefault(),I(n.id))},onDrop:e=>{e.stopPropagation(),be(n.id)},className:`relative ${ae===n.id?`opacity-40`:``} ${he.has(n.id)?`ml-4 border-l border-line pl-1`:``}`,children:[oe===n.id&&ae!==n.id?(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-2 -top-px block h-0.5 rounded bg-accent`}):null,(0,B.jsxs)(`div`,{className:`relative flex items-start gap-2 rounded-md px-2 py-1.5 transition-colors ${ue?`bg-danger/10 hover:bg-danger/10`:n.id===t?`bg-select-fill`:`hover:bg-hover`}`,children:[j===n.id?(0,B.jsxs)(B.Fragment,{children:[h,(0,B.jsxs)(`div`,{className:`min-w-0 grow`,children:[(0,B.jsx)(`input`,{autoFocus:!0,"aria-label":b(`terminal.renameLabel`,{title:n.title}),value:N,onChange:e=>P(e.target.value),onBlur:()=>void xe(n.id),onKeyDown:e=>{e.key===`Enter`&&xe(n.id),e.key===`Escape`&&M(null)},className:`w-full rounded border border-accent bg-card px-1 py-0.5 text-sm text-ink`}),g]})]}):(0,B.jsxs)(`button`,{type:`button`,"aria-label":u,"aria-current":n.id===t?`true`:void 0,onClick:()=>s(n.id),className:`flex min-w-0 grow items-start gap-2 text-left after:absolute after:inset-0 after:rounded-md`,children:[h,(0,B.jsxs)(`span`,{className:`min-w-0 grow`,children:[(0,B.jsx)(`span`,{className:`block truncate text-sm ${n.id===t?`font-semibold text-accent`:`text-ink`}`,children:u}),g]})]}),p?(0,B.jsx)(`span`,{"aria-label":b(`terminal.unreadNotification`),title:b(`terminal.unreadNotification`),className:`mt-2 size-2 shrink-0 rounded-full bg-accent`}):null,(0,B.jsx)(`button`,{type:`button`,"aria-label":b(`terminal.rowMenu`,{title:n.title}),"aria-expanded":T===n.id,onClick:e=>{if(fe.current=e.currentTarget,T===n.id){D(null);return}let t=e.currentTarget.getBoundingClientRect(),r=e.currentTarget.closest(`[data-navigation-scroll]`)?.getBoundingClientRect(),i=r?.bottom??window.innerHeight,a=r?.top??0,o=i-t.bottom,s=t.top-a;k(o<132&&s>o?`up`:`down`),le(!1),D(n.id)},className:`relative mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none md:size-6`,children:(0,B.jsx)(V,{name:`moreHorizontal`,className:`size-3.5`})}),(0,B.jsx)(`button`,{type:`button`,"aria-label":b(`terminal.closeSession`,{title:n.title}),onClick:e=>{if(n.exited!==void 0||e.shiftKey||ue){c(n.id);return}ee(n)},className:`relative mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md text-ink-muted hover:bg-hover focus:bg-select-fill focus:outline-none md:size-6`,children:(0,B.jsx)(V,{name:`close`,className:`size-3.5`})})]}),T===n.id?(0,B.jsxs)(`div`,{ref:z,role:`menu`,"aria-label":b(`terminal.rowMenu`,{title:n.title}),className:`absolute right-1 z-10 w-48 rounded-lg border border-control-line bg-card p-1 shadow-lg ${O===`up`?`bottom-full mb-0.5`:`mt-0.5`}`,children:[(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{P(n.title),M(n.id),D(null)},className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none md:min-h-0`,children:b(`terminal.rename`)}),n.presentation?.titlePinned===!0?(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{d(n.id),D(null)},className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none md:min-h-0`,children:b(`terminal.unpinTitle`)}):null,(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:r||me,onClick:()=>{f(n.id),D(null)},className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:b(`terminal.duplicate`)}),(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:i===0,onClick:()=>ye(n.id,-1),className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:b(`terminal.moveUp`)}),(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:i===e.length-1,onClick:()=>ye(n.id,1),className:`block min-h-10 w-full rounded px-2 py-1.5 text-left text-xs text-ink hover:bg-hover focus:bg-select-fill focus:outline-none disabled:text-ink-faint md:min-h-0`,children:b(`terminal.moveDown`)})]}):null]},n.id)})]}),(0,B.jsxs)(`button`,{ref:C,type:`button`,disabled:r||me,onClick:()=>S(!0),className:`flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-ink hover:bg-hover disabled:text-ink-faint`,children:[(0,B.jsx)(V,{name:`plus`,className:`size-3.5`,"aria-hidden":`true`}),b(`terminal.newSession`)]}),(0,B.jsx)(On,{open:x,heading:b(`terminal.newSession`),aliases:g,hosts:_,local:w,returnFocusRef:C,onChoose:e=>{S(!1),y?.(e)},onChooseLocal:e=>{S(!1),h(e==="default"?void 0:e)},onClose:()=>S(!1)}),me?(0,B.jsx)(`p`,{className:`px-2 text-xs text-ink-muted`,children:b(`terminal.limitReached`,{max:n})}):null,A===null?null:(0,B.jsx)(Nn,{session:A,onCancel:()=>ee(null),onConfirm:()=>{c(A.id),ee(null)}})]})}function Nn({session:e,onCancel:t,onConfirm:n}){let r=E(),i=(e.forwards??[]).length;return(0,B.jsx)(cn,{id:`close-console-heading`,heading:r(`terminal.closeHeading`,{title:e.title}),body:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`terminal.closeBody`)}),i===0?null:(0,B.jsx)(`p`,{className:`text-sm text-ink-muted`,children:r(`terminal.closeForwards`,{count:String(i)})})]}),confirmLabel:r(`terminal.closeConfirm`),cancelLabel:r(`terminal.closeCancel`),onConfirm:n,onCancel:t})}function Pn(e){return C(`UpdateStatus`,e)}var Fn={async updateStatus(){return Pn(await S.read(`/api/v1/update`))}};function In(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function Ln(e){return e.ctrlKey||e.metaKey}function Rn(e,t,n,r){return!In(e)||e.length>zn?null:{kind:`url`,text:t||e,target:e,start:n,end:r}}var zn=4096,Bn=/https?:\/\/[^\s<>"'`]+/giu,Vn=/(?:^|[\s([{=])((?:\/[A-Za-z0-9._~@%+,:=-]+)+(?::\d+(?::\d+)?)?)/gu;function Hn(e){let t=e.length;for(;t>0&&/[.,;!?)]/u.test(e[t-1]??``);)--t;return e.slice(0,t)}function Un(e){return e.replace(/:\d+(?::\d+)?$/u,``)}function Wn(e,t,n){return e.some(e=>te.start)}function Gn(e,t){let n=[];for(let t of e.matchAll(Bn)){let e=Hn(t[0]??``),r=t.index??-1;r<0||e===``||e.length>zn||n.push({kind:`url`,text:e,target:e,start:r,end:r+e.length})}if(t)for(let t of e.matchAll(Vn)){let e=t[1]??``,r=Hn(e),i=t[0]??``,a=Math.max(0,i.length-e.length),o=(t.index??-1)+a,s=Un(r),c=o+r.length;o<0||s===``||s.length>zn||Wn(n,o,c)||n.push({kind:`remote-path`,text:r,target:s,start:o,end:c})}return n.sort((e,t)=>e.start-t.start||e.end-t.end)}function Kn({api:e=Fn,current:t=``,indicator:n}){let r=E(),[i,a]=(0,L.useState)(null);(0,L.useEffect)(()=>{let t=!0;return e.updateStatus().then(e=>{t&&a(e)}).catch(()=>void 0),()=>{t=!1}},[e]);let o=i?.current??t;return o===``?null:(0,B.jsxs)(`div`,{className:`border-t border-line px-2 py-2 text-xs text-ink-muted`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n,(0,B.jsx)(`p`,{children:r(`update.version`,{version:o})})]}),i===null||!i.available||i.pageUrl===void 0||!In(i.pageUrl)?null:(0,B.jsx)(`p`,{className:n===void 0?`mt-1`:`mt-1 pl-3.5`,children:(0,B.jsx)(`a`,{href:i.pageUrl,target:`_blank`,rel:`noreferrer noopener`,className:`text-ink underline underline-offset-2`,children:r(`update.available`,{version:i.latest??``})})})]})}function qn({className:e=`h-7 w-7`}){return(0,B.jsxs)(`svg`,{"aria-hidden":`true`,"data-sshc-brand-mark":`true`,className:`shrink-0 ${e}`,viewBox:`0 0 512 512`,children:[(0,B.jsx)(`rect`,{width:`512`,height:`512`,rx:`112`,fill:`var(--ui-brand-background)`}),(0,B.jsx)(`path`,{d:`M136 166H244L288 210H376V346H268L224 302H136Z`,fill:`none`,stroke:`var(--ui-brand-mark)`,strokeWidth:`28`,strokeLinejoin:`round`,strokeLinecap:`round`}),(0,B.jsx)(`rect`,{x:`304`,y:`248`,width:`24`,height:`52`,rx:`3`,fill:`var(--ui-brand-cursor)`})]})}function Jn({label:e,width:t,minimum:n,maximum:r,onWidthChange:i,className:a=`hidden md:flex`}){let o=(0,L.useRef)(null),s=(0,L.useRef)(t),c=(0,L.useRef)(null),l=(0,L.useRef)(``),u=e=>Number.isFinite(e)?Math.min(r,Math.max(n,Math.round(e))):t;(0,L.useEffect)(()=>{s.current=t},[t]),(0,L.useEffect)(()=>()=>{c.current!==null&&window.cancelAnimationFrame(c.current),o.current!==null&&(document.body.style.userSelect=l.current)},[]);function d(e){s.current=u(e),c.current===null&&(c.current=window.requestAnimationFrame(()=>{c.current=null,i(s.current)}))}function f(e){o.current?.pointerId===e&&(o.current=null,document.body.style.userSelect=l.current,c.current!==null&&(window.cancelAnimationFrame(c.current),c.current=null,i(s.current)))}function p(e){e.button!==0||o.current!==null||(e.preventDefault(),o.current={pointerId:e.pointerId,startX:e.clientX,startWidth:t},s.current=t,l.current=document.body.style.userSelect,document.body.style.userSelect=`none`,e.currentTarget.setPointerCapture(e.pointerId))}function m(e){let t=o.current;t===null||t.pointerId!==e.pointerId||d(t.startWidth+e.clientX-t.startX)}function h(e){let a=null,o=e.shiftKey?32:8;e.key===`ArrowLeft`&&(a=t-o),e.key===`ArrowRight`&&(a=t+o),e.key===`Home`&&(a=n),e.key===`End`&&(a=r),a!==null&&(e.preventDefault(),i(u(a)))}return(0,B.jsx)(`div`,{role:`separator`,"aria-label":e,"aria-orientation":`vertical`,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":t,tabIndex:0,onPointerDown:p,onPointerMove:m,onPointerUp:e=>f(e.pointerId),onPointerCancel:e=>f(e.pointerId),onLostPointerCapture:e=>f(e.pointerId),onKeyDown:h,className:`group absolute inset-y-0 right-0 z-10 w-2 cursor-col-resize touch-none items-center justify-center outline-none ${a}`,children:(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`h-full w-px bg-transparent transition-colors group-hover:bg-accent group-focus-visible:w-0.5 group-focus-visible:bg-accent`})})}var Yn={key:`sshc.navigation.width`,fallback:240,minimum:192,maximum:384},Xn=256*1024;function Zn(){let e=globalThis.crypto?.randomUUID?.();return e===void 0?`${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}_save`:e.replaceAll(`-`,``)}function Qn(e){let t=``;for(let n=0;n{let o=e=>{let t=e.detail;t?.requestId!==r||typeof t.status!=`string`||(window.removeEventListener(`sshc-android-save`,o),i(t.status))};window.addEventListener(`sshc-android-save`,o);let s=n.chooseSave(r,t,e.type||`application/octet-stream`);s!==``&&(window.removeEventListener(`sshc-android-save`,o),a(Error(s)))});if(i===`cancelled`)throw Error(`android_save_cancelled`);if(i!==`ready`)throw Error(`android_save_failed`);try{for(let t=0;tnull);throw new s(typeof e?.code==`string`?e.code:`sftp_failed`,r.status,null)}return{contentType:(r.headers.get(`Content-Type`)??``).split(`;`)[0]?.trim()??``,revision:r.headers.get(`ETag`)??``,blob:await r.blob()}},async readText(e,t){return C(`SFTPTextFile`,await S.read(ir(e,`text`,t)))},async saveText(e,t,n,r){return C(`SFTPTextFile`,await f(ir(e,`text`,t),{contents:n,expectedRevision:r}))},async mkdir(e,t){return ar(await m(`/api/v1/sftp/${encodeURIComponent(e)}/entries`,{path:t,type:`directory`}))},async createEmptyFile(e,t){return ar(await m(`/api/v1/sftp/${encodeURIComponent(e)}/entries`,{path:t,type:`file`},void 0,[`sftp_exists`,`sftp_failed`]))},async rename(e,t,n){return ar(await d(`/api/v1/sftp/${encodeURIComponent(e)}/entry`,{from:t,to:n}))},async remove(e,t){let n=await x(`sftp.delete`,`${e}:${t}`);await S.mutate(ir(e,`entry`,t),{method:`DELETE`,headers:{"X-SSHC-Action":n}})},async startUpload(e,t,n,r,i){return or(await m(`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}`,{path:n,size:r,sourceFingerprint:i},void 0,rr))},async appendUpload(e,t,n,r,i,a,o){let s=`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}?path=${encodeURIComponent(n)}&offset=${r}&total=${i}`;return or(await S.mutate(s,{method:`PATCH`,headers:{"Content-Type":`application/octet-stream`},body:a,...o===void 0?{}:{signal:o}},{locallyHandledCodes:rr}))},async appendUploadRange(e,t,n,r,i,a,o){let s=`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}?path=${encodeURIComponent(n)}&offset=${r}&total=${i}&range=true&length=${a.size}`;return or(await S.mutate(s,{method:`PATCH`,headers:{"Content-Type":`application/octet-stream`},body:a,...o===void 0?{}:{signal:o}},{locallyHandledCodes:rr}))},async completeUpload(e,t,n,r,i,a){await m(`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}/complete`,{path:n,size:r,expectedRevision:i,sourceFingerprint:a},void 0,rr)},async cancelUpload(e,t,n){await S.mutate(`/api/v1/sftp/${encodeURIComponent(e)}/uploads/${encodeURIComponent(t)}?path=${encodeURIComponent(n)}`,{method:`DELETE`},{locallyHandledCodes:rr})},async streamDownload(e,t,n,r,i,a){let o=!r&&i>0?{Range:`bytes=${i}-`,...a.revision===void 0?{}:{"If-Range":a.revision}}:void 0,s=`${ir(e,r?`archive`:`download`,n)}&jobId=${encodeURIComponent(t)}`,c=await S.send(s,{method:`GET`,...o===void 0?{}:{headers:o},...a.signal===void 0?{}:{signal:a.signal}},{locallyHandledCodes:rr});if(!c.ok||!r&&i>0&&c.status!==200&&c.status!==206)throw Error(`download_failed`);let l=Number(c.headers.get(`Content-Length`)),u=!r&&i>0&&c.status===200,d=u?0:i,f=Number.isFinite(l)&&l>=0?d+l:null,p=c.headers.get(`ETag`);if(!r&&p===null)throw Error(`download_revision_missing`);p!==null&&a.onRevision?.(p),u&&await a.onReset?.(f);let m=d;if(c.body===null){let e=new Uint8Array(await(await c.blob()).arrayBuffer());return m+=e.byteLength,await a.onChunk(e,f),{bytes:m,total:f}}let h=c.body.getReader();for(;;){let e=await h.read();if(e.done)break;m+=e.value.byteLength,await a.onChunk(e.value,f)}return{bytes:m,total:f}},async saveDownload(e,t,n){let r=new Blob(n,{type:t?`application/zip`:`application/octet-stream`}),i=e.split(`/`).filter(Boolean),a=`${i[i.length-1]??`download`}${t?`.zip`:``}`;if(await $n(r,a))return;let o=URL.createObjectURL(r),s=document.createElement(`a`);s.href=o,s.download=a,s.click(),globalThis.setTimeout(()=>URL.revokeObjectURL(o),3e4)},async chmod(e,t,n,r,i=!1){let a=await x(`sftp.chmod`,`${e}:${t}:${n}${i?`:recursive`:``}`);return ar(await d(`/api/v1/sftp/${encodeURIComponent(e)}/mode`,{path:t,mode:n,expectedRevision:r,recursive:i},a))}};function lr(e){return`sshc-sftp-${e}.part`}function ur(){return typeof globalThis.navigator?.storage?.getDirectory==`function`?globalThis.navigator.storage.getDirectory():null}var dr=class{sinks=new Map;get(e){return this.sinks.get(e)}async open(e){let t=this.sinks.get(e.id);if(t!==void 0)return t;try{let t=await ur();if(t===null)return null;let n=lr(e.id),r=await t.getFileHandle(n,{create:!0}),i=await r.createWritable({keepExistingData:!0}),a=(await r.getFile()).size,o=a<0||e.totalBytes>=0&&a>e.totalBytes||a!==e.transferredBytes&&e.downloadRevision===``;o&&await i.truncate(0);let s=o?0:a;await i.seek(s);let c={root:t,name:n,handle:r,writer:i,reset:o,position:s};return this.sinks.set(e.id,c),c}catch{return null}}markReset(e){let t=this.sinks.get(e);t!==void 0&&(t.reset=!0)}release(e){this.sinks.delete(e)}async discard(e){let t=this.sinks.get(e);if(this.sinks.delete(e),t!==void 0){await t.writer.close().catch(()=>void 0),await t.root.removeEntry(t.name).catch(()=>void 0);return}try{await(await ur())?.removeEntry(lr(e)).catch(()=>void 0)}catch{}}async removeOrphans(e){try{let t=await ur();if(t===null)return;let n=t.values();for await(let r of n){let n=/^sshc-sftp-(.+)\.part$/.exec(r.name)?.[1];n!==void 0&&!e.has(n)&&await t.removeEntry(r.name).catch(()=>void 0)}}catch{}}async checkpoint(e){if(await e.writer.close(),(await e.handle.getFile()).size!==e.position)throw Error(`sftp_download_checkpoint_failed`);e.writer=await e.handle.createWritable({keepExistingData:!0}),await e.writer.seek(e.position)}},fr=64<<20,pr=8<<20,mr=class{api;context;chunks=new Map;sinks=new dr;constructor(e,t){this.api=e,this.context=t}prepare(e){this.chunks.set(e,[])}restart(e){this.chunks.set(e,[]),this.sinks.markReset(e)}async discard(e){this.chunks.delete(e),await this.sinks.discard(e)}removeOrphans(e){return this.sinks.removeOrphans(e)}async run(e){let{ledger:t}=this.context,n=t.find(e);if(n===void 0)return;let r=await this.sinks.open(n),i=this.chunks.get(e)??[];this.chunks.set(e,i);let a=i.reduce((e,t)=>e+t.byteLength,0);if(r!==null&&r.position!==n.transferredBytes&&n.downloadRevision!==``)try{await this.api.checkpointDownload(e,r.position,n.downloadRevision),t.replace(e,{transferredBytes:r.position}),n=t.find(e)}catch{await r.writer.truncate(0),await r.writer.seek(0),r.position=0,r.reset=!0}if((r===null&&n.transferredBytes>0&&(a!==n.transferredBytes||n.downloadRevision===``)||r?.reset===!0)&&(i.length=0,a=0,r!==null&&(r.reset=!1),t.replace(e,{transferredBytes:0,downloadRevision:``,bytesPerSecond:0,remainingSeconds:-1}),await this.api.updateTransfer(e,`progress`,{transferredBytes:0,resetProgress:!0}),n=t.find(e),n===void 0))return;let o=r!==null&&n.kind===`file`&&n.downloadRevision!==``&&n.totalBytes>=0&&r.position===n.totalBytes,s=!o;if(o)try{await this.api.verifyDownload(n.alias,e,n.remotePath,n.downloadRevision),await this.api.checkpointDownload(e,r.position,n.downloadRevision),t.replace(e,{transferredBytes:r.position}),n=t.find(e)}catch{await r.writer.truncate(0),await r.writer.seek(0),r.position=0,await this.sinks.checkpoint(r),t.replace(e,{transferredBytes:0,downloadRevision:``,bytesPerSecond:0,remainingSeconds:-1}),await this.api.updateTransfer(e,`progress`,{transferredBytes:0,resetProgress:!0}),n=t.find(e),s=!0}if(s&&(a=await this.stream(e,r,i,a)),n=t.find(e),n===void 0||n.status!==`running`)return;if(r!==null){await r.writer.close(),this.sinks.release(e);let t=await r.handle.getFile();await this.api.saveDownload(n.remotePath,n.kind===`folder`,[t]),globalThis.setTimeout(()=>{r.root.removeEntry(r.name).catch(()=>void 0)},3e4)}else await this.api.saveDownload(n.remotePath,n.kind===`folder`,i.map(e=>new Uint8Array(e)));let c=await this.api.updateTransfer(e,`complete`);this.chunks.delete(e),t.replaceServer(c),t.notify(c)}async stream(e,t,n,r){let{ledger:i}=this.context,a=r,o=0,s=i.find(e)?.downloadRevision??``,c=t===null?a:t.position,l=0,u=null,d=t=>t??u??i.find(e)?.totalBytes??-1,f=async n=>{if(s===``)throw Error(`download_revision_missing`);t!==null&&await this.sinks.checkpoint(t);let r=await this.api.checkpointDownload(e,c,s);l=0,i.find(e)!==void 0&&this.context.progress(e,c,n??(r.totalBytes>=0?r.totalBytes:d(null)))};for(;;){let r=i.find(e);if(r===void 0||r.status!==`running`)return a;let p=this.context.arm(e);try{return await this.api.streamDownload(r.alias,e,r.remotePath,r.kind===`folder`,r.transferredBytes,{...r.downloadRevision===``?{}:{revision:r.downloadRevision},signal:p.signal,onRevision:t=>{s=t,i.replace(e,{downloadRevision:t})},onReset:async r=>{n.length=0,a=0,c=0,l=0,t!==null&&(await t.writer.truncate(0),await t.writer.seek(0),t.position=0,await this.sinks.checkpoint(t));let o=r??i.find(e)?.totalBytes??-1;i.replace(e,{transferredBytes:0,totalBytes:o,bytesPerSecond:0,remainingSeconds:-1})},onChunk:async(r,o)=>{if(s===``)throw Error(`download_revision_missing`);if(u=o,t!==null)await t.writer.write(new Uint8Array(r)),t.position+=r.byteLength,c=t.position;else{if(a+r.byteLength>fr)throw Error(`sftp_download_storage_unsupported`);n.push(r),a+=r.byteLength,c=a}if(l+=r.byteLength,l>=pr){await f(o);return}i.find(e)!==void 0&&this.context.progress(e,c,d(o))}}),l>0&&await f(u),a}catch(t){let n=i.find(e);if(n===void 0||n.status!==`running`||p.signal.aborted||n.kind===`folder`||o>=2)throw t;l>0&&await f(u),o+=1}}}},hr=class{jobs=[];notices=[];listeners=new Set;noticeListeners=new Set;mutationGeneration=0;snapshot(){return this.jobs}noticeSnapshot(){return this.notices}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}subscribeNotices(e){return this.noticeListeners.add(e),()=>this.noticeListeners.delete(e)}find(e){return this.jobs.find(t=>t.id===e)}replace(e,t){this.commit(this.jobs.map(n=>n.id===e?{...n,...t}:n))}replaceServer(e){this.mutationGeneration+=1,this.commit(this.jobs.some(t=>t.id===e.id)?this.jobs.map(t=>t.id===e.id?e:t):[...this.jobs,e])}generation(){return this.mutationGeneration}replaceAllServer(e){this.mutationGeneration+=1,this.commit(e)}adoptListing(e,t){return t===this.mutationGeneration?(this.commit(e),!0):!1}commit(e){this.jobs=e;for(let e of this.listeners)e()}notify(e){if(e.status!==`completed`&&e.status!==`failed`)return;let t={id:`${e.id}:${e.status}:${e.attempt}`,jobId:e.id,status:e.status,name:e.name,direction:e.direction,problem:e.problem};if(!this.notices.some(e=>e.id===t.id)){this.notices=[...this.notices.slice(-7),t],er(e.status);for(let e of this.noticeListeners)e()}}dismissNotice(e){this.notices=this.notices.filter(t=>t.id!==e);for(let e of this.noticeListeners)e()}},gr=class{now;samples=new Map;constructor(e){this.now=e}start(e,t){this.samples.set(e,{at:this.now(),bytes:t})}measure(e,t,n){let r=this.now(),i=this.samples.get(e.id)??{at:r,bytes:e.transferredBytes},a=Math.max((r-i.at)/1e3,0),o=e.bytesPerSecond;if(a>0){let n=Math.max(0,t-i.bytes)/a;o=o===0?n:o*.65+n*.35,this.samples.set(e.id,{at:r,bytes:t})}let s=n>=0?n:e.totalBytes,c=s>=0&&o>0?Math.max(0,Math.round((s-t)/o)):-1;return{transferredBytes:t,totalBytes:s,bytesPerSecond:o,remainingSeconds:c}}},_r=1<<20;async function vr(e,t,n=()=>!0){let r=[];for(let i=0;ii.set(e,8+t*32));let o=new Uint8Array(await globalThis.crypto.subtle.digest(`SHA-256`,i));if(t?.aborted||!n())throw new DOMException(`Transfer interrupted`,`AbortError`);return`tree-sha256:${[...o].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}async function yr(e){let t;for(let n=0;n<3;n+=1)try{return await e()}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;t=e,n<2&&await new Promise(e=>globalThis.setTimeout(e,250*2**n))}throw t}var br=class{api;context;files=new Map;constructor(e,t){this.api=e,this.context=t}has(e){return this.files.has(e)}get(e){return this.files.get(e)}attach(e,t){this.files.set(e,t)}detach(e){this.files.delete(e)}async run(e,t){let{ledger:n}=this.context,r=this.files.get(e),i=n.find(e);if(r===void 0||i===void 0)return;let a=await this.api.startUpload(i.alias,e,i.remotePath,i.totalBytes,t);if(n.replace(e,{transferredBytes:a.offset,expectedRevision:a.expectedRevision}),a.parallelism>1){await this.runParallel(e,r,a,t);return}let o=a.offset;for(;othis.api.appendUpload(i.alias,e,i.remotePath,o,r.size,r.slice(o,a),t.signal))).offset,this.context.progress(e,o,r.size)}i=n.find(e),!(i===void 0||i.status!==`running`)&&await this.complete(e,i.expectedRevision,t)}async runParallel(e,t,n,r){let{ledger:i}=this.context,a=[];for(let e=0;ee>=t.offset&&e+r<=t.offset+t.size)||a.push({offset:e,size:r})}let o=this.context.arm(e),s=0;await Promise.all(Array.from({length:Math.min(n.parallelism,a.length)},async()=>{for(;sthis.api.appendUploadRange(r.alias,e,r.remotePath,n.offset,t.size,t.slice(n.offset,n.offset+n.size),o.signal)),l=i.find(e)?.transferredBytes??0;this.context.progress(e,Math.max(l,c.offset),t.size)}}));let c=i.find(e);c===void 0||c.status!==`running`||await this.complete(e,n.expectedRevision,r)}async complete(e,t,n){let{ledger:r}=this.context,i=r.find(e);await this.api.completeUpload(i.alias,e,i.remotePath,i.totalBytes,t,n),this.files.delete(e),await this.context.reconcile();let a=r.find(e);a!==void 0&&r.notify(a)}},xr=200,Sr=100<<20,Cr=4,wr=32<<20,Tr=500;function Er(e){return globalThis.crypto?.randomUUID?.()??`${e}_${Date.now()}_${Math.random().toString(36).slice(2)}`}function Dr(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Or(e){return(T(e)||(e instanceof Error?e.message:``))===`sftp_transfer_not_found`}var kr=new class{api;now;ledger=new hr;uploads;downloads;speed;controllers=new Map;inFlight=new Set;uploadAdmissions=new Set;controlOperations=new Map;retryAfter=new Map;active=0;maxConcurrent;clearCompletedAfter=0;processingStopped=!1;largeFileThreshold=Sr;largeFileParallelism=Cr;largeFileChunkBytes=wr;constructor(e=cr,t=2,n=()=>Date.now()){this.api=e,this.now=n,this.maxConcurrent=t,this.speed=new gr(n);let r={ledger:this.ledger,arm:e=>{let t=new AbortController;return this.controllers.set(e,t),t},progress:(e,t,n)=>this.recordProgress(e,t,n),reconcile:()=>this.reconcile()};this.uploads=new br(e,r),this.downloads=new mr(e,r)}getSnapshot=()=>this.ledger.snapshot();getNoticeSnapshot=()=>this.ledger.noticeSnapshot();getMaxConcurrent=()=>this.maxConcurrent;getClearCompletedAfter=()=>this.clearCompletedAfter;getProcessingStopped=()=>this.processingStopped;getLargeFileThreshold=()=>this.largeFileThreshold;getLargeFileParallelism=()=>this.largeFileParallelism;getLargeFileChunkBytes=()=>this.largeFileChunkBytes;hasUploadSource=e=>this.uploads.has(e);subscribe=e=>this.ledger.subscribe(e);subscribeNotices=e=>this.ledger.subscribeNotices(e);async reconcile(){let e=this.ledger.generation(),t=await this.api.listTransfers(),n=new Set(t.jobs.map(e=>e.id));if(t.jobs.length>xr||n.size!==t.jobs.length)throw Error(`sftp_transfer_limit`);this.adoptQueue(t,e)&&(await this.downloads.removeOrphans(new Set(t.jobs.filter(e=>![`completed`,`cancelled`].includes(e.status)).map(e=>e.id))),this.kick())}async applySettings(e,t,n,r,i,a){let o=await this.api.updateTransferSettings({maxConcurrent:e,clearCompletedAfterSeconds:t,processingStopped:n,largeFileThresholdBytes:r,largeFileParallelism:i,largeFileChunkBytes:a});this.adoptQueue(o),this.kick()}async move(e,t){let n=this.ledger.find(e);n===void 0||n.status!==`queued`||this.adoptQueue(await this.api.moveTransfer(e,t))}reserveUploads(e){let t=this.pendingUploadCount(e);if(this.jobs.length+this.reservedUploads()+t>xr)throw Error(`sftp_transfer_limit`);let n=!1,r={count:t,release:()=>{n||(n=!0,this.uploadAdmissions.delete(r))}};return this.uploadAdmissions.add(r),r}async addUploads(e,t,n){let r=e.filter(e=>this.reattachable(e)===void 0),i=this.reservedUploads(n);if(n!==void 0&&(!this.uploadAdmissions.has(n)||r.length>n.count)||this.jobs.length+i+r.length>xr)throw Error(`sftp_transfer_limit`);n?.release();let a=t?.id??Er(`batch`),o=t?.name??e[0]?.localName??`upload`,s=t?.kind??(e.length>1?`folder`:`file`);for(let t of e){let e=this.reattachable(t);if(e!==void 0){await this.reattachUpload(e,t.file);continue}let n=Er(`transfer`),r=await this.api.createTransfer({id:n,batchId:a,batchName:o,batchKind:s,alias:t.alias,direction:`upload`,kind:`file`,name:t.localName,remotePath:t.remotePath,totalBytes:t.file.size,lastModified:t.file.lastModified,largeFileThresholdBytes:this.largeFileThreshold,largeFileParallelism:this.largeFileParallelism,largeFileChunkBytes:this.largeFileChunkBytes});this.uploads.attach(n,t.file),this.ledger.commit([...this.jobs,r])}return this.kick(),a}async addDownload(e,t,n,r){if(this.jobs.length+this.reservedUploads()>=xr)throw Error(`sftp_transfer_limit`);let i=Er(`transfer`),a=Dr(t),o=await this.api.createTransfer({id:i,batchId:Er(`batch`),batchName:a,batchKind:n,alias:e,direction:`download`,kind:n,name:a,remotePath:t,totalBytes:r,lastModified:0});return this.downloads.prepare(i),this.ledger.commit([...this.jobs,o]),this.kick(),i}async addRemoteTransfers(e,t){if(e.length===0)return[];if(this.jobs.length+this.reservedUploads()+e.length>xr)throw Error(`sftp_transfer_limit`);let n=Er(`remote_batch`),r=e.length===1?e[0].name:`${e.length} items`,i=e.length===1?e[0].kind:`folder`,a=[];for(let o of e){let e=Er(`remote`),s=await this.api.createTransfer({id:e,batchId:n,batchName:r,batchKind:i,alias:o.targetAlias,sourceAlias:o.sourceAlias,sourcePath:o.sourcePath,operation:t,overwrite:o.overwrite===!0,direction:`remote`,kind:o.kind,name:o.name,remotePath:o.targetPath,totalBytes:o.totalBytes,lastModified:0});this.ledger.commit([...this.jobs,s]),a.push(e)}return await this.reconcile(),a}async pause(e){let t=this.ledger.find(e);if(t===void 0||!t.allowedActions.includes(`pause`))return;this.controllers.get(e)?.abort();let n=this.api.updateTransfer(e,`pause`).then(e=>{this.ledger.replaceServer(e)});this.trackControl(e,n),await n}async resume(e){let t=this.ledger.find(e);if(t===void 0||!t.allowedActions.includes(`resume`)||!this.networkReady(t))return;let n=t.direction===`download`&&t.kind===`folder`;n&&(this.downloads.restart(e),this.ledger.replace(e,{transferredBytes:0,bytesPerSecond:0,remainingSeconds:-1}));let r=await this.api.updateTransfer(e,`resume`,{resetProgress:n});this.ledger.replaceServer(r),this.kick()}async retry(e){let t=this.ledger.find(e);if(t===void 0||!t.allowedActions.includes(`retry`)||!this.networkReady(t))return;let n=t.direction===`download`&&t.kind===`folder`;n&&this.downloads.restart(e);let r=await this.api.updateTransfer(e,`retry`,{resetProgress:n});this.ledger.replaceServer(r),this.kick()}async retryFailed(e){await Promise.all(this.jobs.filter(t=>t.batchId===e&&t.status===`failed`).map(e=>this.retry(e.id)))}async pauseAll(){await Promise.all([...this.jobs].filter(e=>e.allowedActions.includes(`pause`)).map(e=>this.pause(e.id)))}async resumeAll(){await Promise.all([...this.jobs].filter(e=>e.allowedActions.includes(`resume`)&&e.status!==`needs_overwrite`).map(e=>this.resume(e.id)))}async cancelAll(){let e;for(let t of[...this.jobs])if(this.ledger.find(t.id)?.allowedActions.includes(`cancel`))try{await this.cancel(t.id)}catch(t){e??=t}if(e!==void 0)throw e}async overwrite(e){let t=this.ledger.find(e);t===void 0||t.status!==`needs_overwrite`||await this.resume(e)}async cancel(e){let t=this.ledger.find(e);if(!(t===void 0||!t.allowedActions.includes(`cancel`))){if(this.controllers.get(e)?.abort(),t.direction===`upload`){try{await this.api.cancelUpload(t.alias,e,t.remotePath)}catch(t){if(Or(t)){this.uploads.detach(e),await this.reconcile();return}throw await this.reconcile().catch(()=>void 0),t}this.uploads.detach(e)}else{try{let t=await this.api.updateTransfer(e,`cancel`);this.ledger.replaceServer(t)}catch(e){if(!Or(e))throw e}await this.downloads.discard(e)}await this.reconcile()}}async clearFinished(){let e=this.jobs.filter(e=>e.status===`completed`||e.status===`cancelled`).map(e=>e.id);await this.api.clearFinishedTransfers(),this.ledger.commit(this.jobs.filter(e=>e.status!==`completed`&&e.status!==`cancelled`));for(let t of e)this.downloads.discard(t)}async remove(e){let t=this.ledger.find(e);t===void 0||!t.allowedActions.includes(`remove`)||(await this.api.removeTransfer(e),this.uploads.detach(e),await this.downloads.discard(e),this.ledger.commit(this.jobs.filter(t=>t.id!==e)))}async clearFailed(){let e;for(let t of[...this.jobs])if(!(t.status!==`failed`||!t.allowedActions.includes(`remove`)))try{await this.remove(t.id)}catch(t){e??=t}if(e!==void 0)throw e}dismissNotice(e){this.ledger.dismissNotice(e)}get jobs(){return this.ledger.snapshot()}adoptQueue(e,t){return this.maxConcurrent=e.maxConcurrent,this.clearCompletedAfter=e.clearCompletedAfterSeconds??0,this.processingStopped=e.processingStopped===!0,this.largeFileThreshold=e.largeFileThresholdBytes??Sr,this.largeFileParallelism=e.largeFileParallelism??Cr,this.largeFileChunkBytes=e.largeFileChunkBytes??wr,t===void 0?(this.ledger.replaceAllServer(e.jobs),!0):this.ledger.adoptListing(e.jobs,t)}networkReady(e){return e.direction===`remote`||e.direction===`download`||this.uploads.has(e.id)}reattachable(e){return this.jobs.find(t=>t.direction===`upload`&&!this.uploads.has(t.id)&&[`queued`,`running`,`paused`,`reattach`,`failed`,`needs_overwrite`].includes(t.status)&&t.alias===e.alias&&t.remotePath===e.remotePath&&t.totalBytes===e.file.size&&t.lastModified===e.file.lastModified)}async reattachUpload(e,t){this.uploads.attach(e.id,t),e.status===`running`?(await this.api.updateTransfer(e.id,`pause`),this.ledger.replaceServer(await this.api.updateTransfer(e.id,`resume`))):e.status===`paused`||e.status===`reattach`?this.ledger.replaceServer(await this.api.updateTransfer(e.id,`resume`)):e.status===`failed`&&this.ledger.replaceServer(await this.api.updateTransfer(e.id,`retry`))}pendingUploadCount(e){return e.filter(e=>this.reattachable(e)===void 0).length}reservedUploads(e){return[...this.uploadAdmissions].reduce((t,n)=>t+(n===e?0:n.count),0)}kick(){if(!this.processingStopped)for(;this.activee.status===`queued`&&e.direction!==`remote`&&!this.inFlight.has(e.id)&&(this.retryAfter.get(e.id)??0)<=this.now()&&this.networkReady(e));if(e===void 0)return;this.active+=1,this.inFlight.add(e.id),this.speed.start(e.id,e.transferredBytes),this.run(e.id).finally(()=>{--this.active,this.inFlight.delete(e.id),this.controllers.delete(e.id),this.kick()})}}async run(e){let t=this.ledger.find(e);if(t!==void 0)try{let n=``;if(t.direction===`upload`){let r=this.uploads.get(e);if(r===void 0)return;let i=new AbortController;this.controllers.set(e,i),n=await vr(r,i.signal,()=>this.ledger.find(e)?.status===`queued`);let a=this.ledger.find(e);if(a===void 0||a.status!==`queued`)return;if(a.sourceFingerprint&&a.sourceFingerprint!==n)throw Error(`sftp_upload_source_changed`);t=this.ledger.find(e)}if(!await this.prepareServer(t)||(t=this.ledger.find(e),t===void 0||t.status!==`running`))return;t.direction===`upload`?await this.uploads.run(e,n):await this.downloads.run(e)}catch(t){await this.settleFailure(e,t)}}async settleFailure(e,t){let n=this.ledger.find(e);if(n===void 0||n.status===`paused`||n.status===`cancelled`||t instanceof DOMException&&t.name===`AbortError`)return;let r=T(t)||(t instanceof Error?t.message:`sftp_failed`);if(r===`sftp_transfer_limit`||r===`sftp_transfer_state`){this.retryAfter.set(e,this.now()+Tr),await this.reconcile().catch(()=>void 0),globalThis.setTimeout(()=>{this.retryAfter.delete(e),this.kick()},Tr);return}if(r===`sftp_exists`&&n.direction===`upload`&&!n.overwrite){let t=await this.api.updateTransfer(e,`needs_overwrite`).catch(()=>null);t!==null&&this.ledger.replaceServer(t);return}let i=await this.api.updateTransfer(e,`fail`,{problem:r}).catch(()=>null);i===null?await this.reconcile().catch(()=>void 0):(this.ledger.replaceServer(i),this.ledger.notify(i))}async prepareServer(e){if(await this.controlOperations.get(e.id),this.ledger.find(e.id)?.status!==`queued`)return!1;let t=await this.api.updateTransfer(e.id,`start`);return this.retryAfter.delete(e.id),this.ledger.replaceServer(t),t.status===`running`}recordProgress(e,t,n){let r=this.ledger.find(e);r!==void 0&&this.ledger.replace(e,this.speed.measure(r,t,n))}trackControl(e,t){this.controlOperations.set(e,t);let n=()=>{this.controlOperations.get(e)===t&&this.controlOperations.delete(e)};t.then(n,n)}};function Ar({navigationRef:e,navigationId:t,version:n,state:r,navigationOpen:i,mobileLayout:a=!1,desktopWidth:o,onDesktopWidthChange:s,startSections:c,section:l,sectionIcons:u,sectionLabels:d,onNavigate:f,consoles:p,orderedConsoles:m,activeConsole:h,liveWorkspace:g,onRenameWorkspace:_,unreadBySession:v,onShowConsole:y,onDuplicateConsole:b,onReorderConsoles:x,localShellProfiles:S=[],onOpenShell:C,aliases:w=[],hosts:T=[],onConnect:D,onOpenCommandPalette:O}){let k=E(),A=xe(),ee=(0,L.useSyncExternalStore)(kr.subscribe,kr.getSnapshot).filter(e=>[`queued`,`running`,`paused`,`reattach`,`needs_overwrite`].includes(e.status)).length,j=e=>(0,B.jsx)(Mr,{name:e,section:l,sectionIcons:u,sectionLabels:d,onNavigate:f,attention:e===`Files`&&ee>0,attentionLabel:e===`Files`&&ee>0?k(`sftp.activeTransfers`,{count:ee}):void 0});return(0,B.jsxs)(`nav`,{ref:e,id:t,"aria-label":k(`shell.primaryNavigation`),"aria-hidden":a&&!i?!0:void 0,inert:a&&!i,"data-navigation-open":i,"data-app-navigation":!0,className:`fixed inset-y-0 left-0 z-30 flex min-h-0 w-72 max-w-[calc(100vw-2rem)] flex-col overflow-hidden border-r border-line bg-sidebar p-2 transition-transform motion-reduce:transition-none md:relative md:inset-auto md:z-auto md:flex md:w-auto md:max-w-none md:translate-x-0 md:shadow-none ${i?`translate-x-0 shadow-2xl`:`-translate-x-full shadow-none`}`,children:[(0,B.jsxs)(`div`,{"data-navigation-heading":!0,className:`mb-2 flex h-10 shrink-0 items-center gap-2 px-1`,children:[(0,B.jsx)(qn,{className:`h-6 w-6`}),(0,B.jsx)(`h1`,{className:`font-mono text-sm font-semibold tracking-tight`,children:k(`shell.title`)}),(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`h-4 w-px bg-line`}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-semibold`,children:k(l===null?`shell.pageNotFound`:d[l])})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:O,title:`${k(`palette.open`)} (${A.palette.join(` / `)})`,className:`mb-3 flex h-10 shrink-0 items-center gap-2 rounded-md border border-line bg-control px-2.5 text-sm text-ink-muted transition-colors hover:border-accent/60 hover:text-ink md:h-9 md:text-xs`,children:[(0,B.jsx)(V,{name:`search`,className:`h-4 w-4 shrink-0`}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:k(`palette.open`)}),(0,B.jsx)(`kbd`,{"aria-hidden":`true`,className:`hidden shrink-0 rounded border border-line px-1 py-0.5 font-mono text-[10px] text-ink-faint md:block`,children:A.palette[0]})]}),(0,B.jsx)(`div`,{className:`shrink-0`,children:(0,B.jsx)(Nr,{label:k(`shell.navStart`),children:c.map(e=>(0,B.jsx)(`li`,{children:j(e)},e))})}),(0,B.jsx)(`div`,{className:`mb-1 mt-1 shrink-0 border-b border-line pb-2`,children:j(`Menu`)}),(0,B.jsxs)(`div`,{"data-navigation-scroll":!0,className:`min-h-0 flex-1 overflow-y-auto pr-0.5 pt-2`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`block px-2 pb-1 text-[10px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:k(`shell.sessions`)}),(0,B.jsx)(Mn,{sessions:m,selected:l===`Terminal`?h:null,workspace:g,onRenameWorkspace:_,unreadBySession:v,maxSessions:p.maxSessions,busy:p.busy,problem:p.problem,onSelect:y,onClose:e=>void p.close(e),onRename:(e,t)=>p.rename(e,t),onUnpinTitle:e=>p.unpinTitle?.(e)??Promise.resolve(!1),onDuplicate:b,onReorder:x,localShellProfiles:S,onOpenShell:C,aliases:w,hosts:T,...D===void 0?{}:{onConnect:D}})]}),(0,B.jsxs)(`div`,{className:`shrink-0 pt-1 md:pt-2`,children:[(0,B.jsx)(`p`,{role:`status`,"data-session-status":!0,className:`sr-only`,children:r===`ready`?k(`shell.active`,{version:n}):k(`shell.starting`)}),(0,B.jsx)(Kn,{current:n,indicator:(0,B.jsx)(`span`,{"aria-hidden":`true`,"data-session-status-badge":!0,title:r===`ready`?k(`shell.active`,{version:n}):k(`shell.starting`),className:`size-1.5 shrink-0 rounded-full shadow-[0_0_0_3px_color-mix(in_srgb,var(--ui-live)_14%,transparent)] ${r===`ready`?`bg-live`:`bg-ink-faint`}`})})]}),(0,B.jsx)(jr,{width:o,onWidthChange:s})]})}function jr({width:e,onWidthChange:t}){return(0,B.jsx)(Jn,{label:E()(`shell.navigationResize`),width:e,minimum:Yn.minimum,maximum:Yn.maximum,onWidthChange:t})}function Mr({name:e,section:t,sectionIcons:n,sectionLabels:r,onNavigate:i,attention:a=!1,attentionLabel:o}){let s=E(),c=t===e;return(0,B.jsxs)(`a`,{href:Nt(e),"aria-current":c?`page`:void 0,onClick:t=>{i(t,e)},className:`group relative flex min-h-10 w-full items-center gap-2 overflow-hidden rounded-sm px-2 py-1 text-left text-sm transition-colors md:my-px md:min-h-8 md:gap-2.5 md:py-0.5 ${c?`bg-select-fill font-semibold text-accent`:`font-medium text-ink-muted hover:bg-hover hover:text-ink`}`,children:[c?(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-y-1 left-0 w-0.5 bg-accent`}):null,(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-6 w-6 shrink-0 place-items-center transition-colors md:h-5 md:w-5 ${c?`text-accent`:`text-ink-muted group-hover:text-ink`}`,children:(0,B.jsx)(V,{name:n[e],className:`h-4 w-4`})}),(0,B.jsx)(`span`,{className:`min-w-0 grow truncate`,children:s(r[e])}),a?(0,B.jsx)(`span`,{"aria-hidden":`true`,"data-sftp-transfer-indicator":!0,title:o,className:`mr-1 size-1.5 shrink-0 rounded-full bg-notice-ink shadow-[0_0_0_3px_color-mix(in_srgb,var(--ui-notice-ink)_12%,transparent)]`}):null]})}function Nr({label:e,children:t}){return(0,B.jsxs)(`div`,{className:`mb-1 md:mb-1.5`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`block px-2 pb-0.5 pt-0.5 text-[10px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:e}),(0,B.jsx)(`ul`,{"aria-label":e,children:t})]})}function Pr(e,t){return Number.isFinite(e)?Math.min(t.maximum,Math.max(t.minimum,Math.round(e))):t.fallback}function Fr(e){let t=n(e.key);return t===null||t.trim()===``?e.fallback:Pr(Number(t),e)}function Ir(t){let[n,r]=(0,L.useState)(()=>Fr(t));return[n,n=>{let i=Pr(n,t);r(i),e(t.key,String(i))}]}var Lr=`__sshcNavigationPoint`;function Rr(e){if(typeof e!=`object`||!e)return null;let t=e[Lr];return typeof t==`number`&&Number.isSafeInteger(t)?t:null}function zr(e,t){return{...typeof e==`object`&&e&&!Array.isArray(e)?e:{},[Lr]:t}}function Br(){return{pathname:window.location.pathname,search:window.location.search}}function Vr(){let[e,t]=(0,L.useState)(Br),n=(0,L.useRef)(e),r=(0,L.useRef)(null),i=(0,L.useRef)(null),a=(0,L.useRef)(null),o=(0,L.useMemo)(()=>Pt(e.pathname),[e.pathname]),s=(0,L.useCallback)(e=>{n.current=e,t(e)},[]),c=(0,L.useCallback)(e=>{r.current=e},[]);return(0,L.useEffect)(()=>{let e=Rr(window.history.state);e===null&&(e=0,window.history.replaceState(zr(window.history.state,e),``)),i.current=e;let t=()=>{let e=Br(),t=Rr(window.history.state);if(a.current!==null&&t===a.current){i.current=t,a.current=null;return}let o=Pt(e.pathname),c=o.kind===`section`&&!o.canonical?{pathname:o.canonicalPath,search:e.search}:e;if(r.current!==null&&!r.current(c)){let e=n.current,r=i.current;if(r!==null&&t!==null&&r!==t){a.current=r,window.history.go(r-t);return}window.history.replaceState(zr(window.history.state,r??0),``,`${e.pathname}${e.search}`);return}if(t!==null&&(i.current=t),o.kind===`section`&&!o.canonical){window.history.replaceState(zr(window.history.state,i.current??0),``,`${o.canonicalPath}${e.search}`),s({pathname:o.canonicalPath,search:e.search});return}s(e)};return t(),window.addEventListener(`popstate`,t),()=>window.removeEventListener(`popstate`,t)},[s]),{route:o,location:e,navigate:(0,L.useCallback)(e=>{let t=Nt(e),n={pathname:t,search:``};if(r.current!==null&&!r.current(n))return!1;if(window.location.pathname===t)(window.location.search!==``||window.location.hash!==``)&&window.history.replaceState(zr(window.history.state,i.current??0),``,t);else{let e=(i.current??0)+1;window.history.pushState(zr(null,e),``,t),i.current=e}return s(n),!0},[s]),navigateLocation:(0,L.useCallback)((e,t={})=>{let n=new URL(e,window.location.origin);if(n.origin!==window.location.origin)throw Error(`external navigation is not allowed`);let a={pathname:n.pathname,search:n.search};if(r.current!==null&&!r.current(a))return!1;let o=`${n.pathname}${n.search}`;if(o===`${window.location.pathname}${window.location.search}`)return!0;if(t.replace===!0)window.history.replaceState(zr(window.history.state,i.current??0),``,o);else{let e=(i.current??0)+1;window.history.pushState(zr(null,e),``,o),i.current=e}return s(a),!0},[s]),setNavigationBlocker:c}}var Hr=[`none`,`gentle`,`bell`,`pulse`],Ur=`sshc.terminal-notification-sound.v1`,Wr=new WeakMap,Gr={sound:`bell`,volume:60};function Kr(e){let t=e.Notification;return typeof t==`function`&&typeof t.requestPermission==`function`?t:null}function qr(e=window){return Kr(e)?.permission??`unsupported`}async function Jr(e=window){let t=Kr(e);return t===null?`unsupported`:t.permission==="default"?t.requestPermission():t.permission}function Yr(e,t=window){let n=Kr(t);if(n===null||n.permission!==`granted`)return!1;try{let r=new n(e.title,{body:e.body,tag:e.tag});return e.onClick!==void 0&&(r.onclick=()=>{try{t.focus()}catch{}e.onClick?.(),r.close()}),!0}catch{return!1}}function Xr(e){return typeof e==`string`&&Hr.includes(e)}function Zr(e=window){try{let t=JSON.parse(e.localStorage.getItem(Ur)??`null`);if(typeof t!=`object`||!t)return Gr;let n=t,r=typeof n.volume==`number`&&Number.isFinite(n.volume)?Math.max(0,Math.min(100,Math.round(n.volume))):Gr.volume;return{sound:Xr(n.sound)?n.sound:Gr.sound,volume:r}}catch{return Gr}}function Qr(e,t=window){try{t.localStorage.setItem(Ur,JSON.stringify(e))}catch{}}function $r(e){let t=Wr.get(e);if(t!==void 0&&t.state!==`closed`)return t;let n=e.AudioContext;if(n===void 0)return null;try{let t=new n;return Wr.set(e,t),t}catch{return null}}function ei(e=window){let t=$r(e);return t===null?!1:(t.state===`suspended`&&t.resume().catch(()=>void 0),!0)}function ti(e,t,n){if(n===void 0||(t.notificationVersion??0)<=n)return null;let r=t.lastNotification;if(r===void 0)return null;let i=_n(t),a=t.kind===`ssh`?t.alias:void 0;return{title:a===void 0||a===i?i:`${i}(${a})`,body:r.title!==``&&r.body!==``?`${r.title}\n${r.body}`:r.title||r.body||e(`terminal.notificationFallback`)}}function ni(e=Zr(),t=window){let n=e.sound;if(n===`none`||e.volume<=0)return!1;let r=$r(t);if(r===null)return!1;let i=()=>{let t=r.createGain(),i=n===`bell`?{type:`triangle`,frequencies:[880,1174],duration:.32,peak:.12}:n===`pulse`?{type:`sine`,frequencies:[660,660],duration:.24,peak:.1}:{type:`sine`,frequencies:[520,660],duration:.22,peak:.07},a=Math.max(1e-4,i.peak*e.volume/100);t.gain.setValueAtTime(1e-4,r.currentTime),t.gain.exponentialRampToValueAtTime(a,r.currentTime+.015),t.gain.exponentialRampToValueAtTime(1e-4,r.currentTime+i.duration),t.connect(r.destination),i.frequencies.forEach((e,n)=>{let a=r.createOscillator();a.type=i.type,a.frequency.value=e,a.connect(t),a.start(r.currentTime+n*i.duration/2),a.stop(r.currentTime+i.duration)})};try{return r.state===`suspended`?r.resume().then(i).catch(()=>void 0):i(),!0}catch{return!1}}function ri(e,t,n,r){let i=(0,L.useRef)(new Map),a=(0,L.useRef)(t),o=(0,L.useRef)(r),[s,c]=(0,L.useState)(()=>new Set);a.current=t,o.current=r,(0,L.useEffect)(()=>{let e=()=>{ei(),window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`keydown`,e,!0)};return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`keydown`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`keydown`,e,!0)}},[]);let l=(0,L.useCallback)(()=>{let e=a.current;e===null||document.hidden||c(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);return(0,L.useEffect)(()=>(l(),window.addEventListener(`focus`,l),document.addEventListener(`visibilitychange`,l),()=>{window.removeEventListener(`focus`,l),document.removeEventListener(`visibilitychange`,l)}),[t,l]),(0,L.useEffect)(()=>{let t=new Set(e.map(e=>e.id));for(let e of i.current.keys())t.has(e)||i.current.delete(e);for(let t of e){let e=i.current.get(t.id);if(i.current.set(t.id,t.notificationVersion??0),e===void 0)continue;let r=ti(n,t,e);r!==null&&((document.hidden||t.id!==a.current)&&c(e=>{if(e.has(t.id))return e;let n=new Set(e);return n.add(t.id),n}),document.hidden&&(ni(),Yr({title:r.title,body:r.body,tag:`sshc-terminal-${t.id}`,onClick:()=>o.current(t.id)})))}c(e=>[...e].every(e=>t.has(e))?e:new Set([...e].filter(e=>t.has(e))))},[e,n]),s}function ii(e,t,n,r=document.hidden){for(let i of e)t.has(i.id)||(t.add(i.id),r&&Yr({title:`sshc`,body:n(i.status===`completed`?`sftp.notice.completed`:`sftp.notice.failed`,{name:i.name,direction:n(i.direction===`upload`?`sftp.manager.upload`:`sftp.manager.download`),problem:i.problem}),tag:`sshc-transfer-${i.jobId}`}))}function ai(){let e=E(),t=(0,L.useSyncExternalStore)(kr.subscribeNotices,kr.getNoticeSnapshot),n=(0,L.useRef)(new Set);return(0,L.useEffect)(()=>{ii(t,n.current,e)},[t,e]),t.length===0?null:(0,B.jsx)(`aside`,{className:`pointer-events-none fixed right-4 top-20 z-50 flex w-[min(22rem,calc(100vw-2rem))] flex-col gap-2 md:bottom-4 md:top-auto`,"aria-label":e(`sftp.notice.heading`),"aria-live":`polite`,children:t.map(t=>(0,B.jsx)(`div`,{role:t.status===`failed`?`alert`:`status`,className:`rounded-lg border p-3 shadow-lg ${t.status===`failed`?`border-danger/40 bg-card text-danger`:`border-live/40 bg-card text-ink`}`,children:(0,B.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,B.jsx)(`p`,{className:`min-w-0 grow text-sm`,children:e(t.status===`completed`?`sftp.notice.completed`:`sftp.notice.failed`,{name:t.name,direction:e(t.direction===`upload`?`sftp.manager.upload`:`sftp.manager.download`),problem:t.problem})}),(0,B.jsx)(`button`,{type:`button`,className:`pointer-events-auto text-xs text-ink-muted`,"aria-label":e(`sftp.notice.dismiss`),onClick:()=>kr.dismissNotice(t.id),children:`×`})]})},t.id))})}function oi(e){return C(`Snippet`,e)}function si(e){return C(`SnippetJob`,e)}function ci(e){return C(`SnippetPreview`,e)}var li={async library(){return C(`SnippetLibrary`,await S.read(`/api/v1/snippets`))},async create(e){return oi(await m(`/api/v1/snippets`,e))},async update(e,t){return oi(await f(`/api/v1/snippets/${encodeURIComponent(e)}`,t))},async remove(e){await S.mutate(`/api/v1/snippets/${encodeURIComponent(e)}`,{method:`DELETE`})},async setStartup(e,t,n){await f(`/api/v1/snippets/startup/${encodeURIComponent(e)}`,{snippetId:t,inputs:n})},async preview(e,t,n){return ci(await m(`/api/v1/snippets/preview`,{snippetId:e,aliases:t,inputs:n}))},async start(e,t,n,r=4){return si(await m(`/api/v1/snippets/jobs`,{snippetId:e.snippetId,aliases:t,inputs:n,evidence:e.evidence,concurrency:r},e.actionToken))},async job(e){return si(await S.read(`/api/v1/snippets/jobs/${encodeURIComponent(e)}`))},async cancel(e){return si(await S.mutate(`/api/v1/snippets/jobs/${encodeURIComponent(e)}`,{method:`DELETE`}))}},ui={loading:`text-ink-muted`,empty:`text-ink-muted`,failed:`text-danger`};function di({tone:e,title:t,detail:n,action:r,icon:i,className:a=``}){return(0,B.jsxs)(`div`,{role:e===`failed`?`alert`:`status`,"aria-busy":e===`loading`,className:`flex min-h-32 flex-col items-center justify-center gap-2 px-4 py-8 text-center ${a}`,children:[i,(0,B.jsx)(`p`,{className:`text-sm ${ui[e]}`,children:t}),n===void 0?null:(0,B.jsx)(`p`,{className:`max-w-prose text-xs text-ink-faint`,children:n}),r]})}var fi=[`Connections`,`Config`,`Groups`,`Keys`,`Known Hosts`,`Remote Keys`,`Diagnostics`,`Passwords`,`Key Passphrases`,`OTP`,`Snippets`,`Settings`,`Sync`,`History`];function pi(e,t){let n=t.toLocaleLowerCase().trim().split(/\s+/).filter(Boolean);if(n.length===0)return!0;let r=`${e.label} ${e.detail} ${e.search}`.toLocaleLowerCase();return n.every(e=>r.includes(e))}function mi({open:e,commands:t=[],hosts:n,files:r,sessions:i,unreadBySession:a,sectionLabels:o,onClose:s,onConnect:c,onOpenHostSettings:l,onOpenFile:u,onNavigate:d,onOpenSnippet:f,onOpenSession:p,returnFocusRef:m}){let h=E(),g=(0,L.useRef)(null),[_,v]=(0,L.useState)(``),[y,b]=(0,L.useState)(0),[x,S]=(0,L.useState)([]),[C,w]=(0,L.useState)(!1);(0,L.useEffect)(()=>{if(!e)return;v(``),b(0),window.requestAnimationFrame(()=>g.current?.focus());let t=!0;return w(!0),li.library().then(e=>{t&&S(e.snippets)}).catch(()=>{t&&S([])}).finally(()=>{t&&w(!1)}),()=>{t=!1}},[e]);let T=(0,L.useMemo)(()=>[...t.map(e=>({id:`command:${e.id}`,kind:`command`,label:e.label,detail:e.detail,search:`${e.search} command action 実行 コマンド 操作`,action:e.run})),...n.map(e=>({id:`host:${e.identity.path}:${e.identity.alias}`,kind:`host`,label:h(`palette.connectHost`,{alias:e.identity.alias}),detail:e.file.path??e.file.absolute,search:`${e.identity.alias} ${e.identity.path} host connect ssh 接続 ホスト`,action:()=>c(e.identity.alias),host:e.identity})),...i.filter(e=>e.exited===void 0).map(e=>{let t=a.has(e.id),n=h(`terminal.connected`),r=vn(e,h);return{id:`session:${e.id}`,kind:`session`,label:_n(e),detail:h(`terminal.rowDetail`,{status:n,destination:r}),search:`session terminal console pane セッション ターミナル ${t?`@unread unread notification 未読 通知`:``}`,action:()=>p(e.id)}}),...r.map(e=>({id:`file:${e.file.path??e.file.absolute}`,kind:`file`,label:e.file.path??e.file.absolute,detail:e.file.absolute,search:`file config ssh 設定ファイル ${e.file.path??``}`,action:()=>u(e.file.path??e.file.absolute)})),...x.map(e=>({id:`snippet:${e.id}`,kind:`snippet`,label:e.name,detail:e.command,search:`snippet snippets スニペット ${e.description??``}`,action:()=>f(e.id)})),...fi.map(e=>({id:`setting:${e}`,kind:`setting`,label:h(o[e]),detail:h(`palette.openSection`),search:`${e} settings setting 設定`,action:()=>d(e)}))],[t,r,n,c,d,u,p,f,o,i,x,h,a]),D=(0,L.useMemo)(()=>T.filter(e=>pi(e,_)).slice(0,40),[T,_]);if((0,L.useEffect)(()=>{y>=D.length&&b(Math.max(0,D.length-1))},[y,D.length]),!e)return null;async function O(e){s(),await e.action()}function k(e){e.key===`ArrowDown`?(e.preventDefault(),b(e=>D.length===0?0:(e+1)%D.length)):e.key===`ArrowUp`?(e.preventDefault(),b(e=>D.length===0?0:(e-1+D.length)%D.length)):e.key===`Enter`&&D[y]!==void 0&&(e.preventDefault(),O(D[y]))}return(0,B.jsxs)(sn,{labelledBy:`command-palette-heading`,onDismiss:s,closeOnOutside:!0,initialFocusRef:g,...m===void 0?{}:{returnFocusRef:m},placement:`palette`,zIndexClassName:`z-[70]`,panelClassName:`flex max-h-[72vh] w-full max-w-2xl flex-col overflow-hidden rounded-lg`,children:[(0,B.jsx)(`h2`,{id:`command-palette-heading`,className:`sr-only`,children:h(`palette.heading`)}),(0,B.jsxs)(`label`,{className:`flex h-12 shrink-0 items-center gap-2 border-b border-line px-3`,children:[(0,B.jsx)(V,{name:`search`,className:`h-4 w-4 text-ink-muted`}),(0,B.jsx)(`span`,{className:`sr-only`,children:h(`palette.heading`)}),(0,B.jsx)(`input`,{ref:g,type:`search`,"aria-label":h(`palette.heading`),"aria-controls":`command-palette-results`,"aria-activedescendant":D[y]===void 0?void 0:`command-palette-option-${y}`,value:_,onChange:e=>{v(e.target.value),b(0)},onKeyDown:k,placeholder:h(`palette.placeholder`),className:`min-w-0 flex-1 bg-transparent text-sm text-ink outline-none placeholder:text-ink-faint`}),(0,B.jsx)(`kbd`,{className:`border border-line px-1.5 py-0.5 font-mono text-[10px] text-ink-muted`,children:`Esc`})]}),(0,B.jsxs)(`div`,{id:`command-palette-results`,role:`listbox`,"aria-label":h(`palette.results`),className:`min-h-0 overflow-y-auto p-1.5`,children:[D.map((e,t)=>(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsxs)(`button`,{id:`command-palette-option-${t}`,type:`button`,role:`option`,"aria-selected":y===t,onMouseEnter:()=>b(t),onClick:()=>void O(e),className:`grid w-full grid-cols-[4.5rem_minmax(0,1fr)] items-center gap-x-3 rounded px-2.5 py-2 text-left text-sm ${e.host===void 0?``:`pr-12`} ${y===t?`bg-select-fill`:`hover:bg-hover`}`,children:[(0,B.jsx)(`span`,{className:`row-span-2 font-mono text-[10px] uppercase tracking-wide text-ink-faint`,children:h(`palette.kind.${e.kind}`)}),(0,B.jsx)(`span`,{className:`truncate font-medium text-ink`,children:e.label}),(0,B.jsx)(`span`,{className:`truncate font-mono text-[11px] text-ink-muted`,children:e.detail})]}),e.host===void 0?null:(0,B.jsx)(`button`,{type:`button`,"aria-label":h(`palette.openHostSettings`,{alias:e.host.alias}),title:h(`home.openConnectionSettings`),onMouseEnter:()=>b(t),onClick:()=>{let t=e.host;t!==void 0&&(s(),l(t))},className:`absolute right-1.5 top-1/2 flex size-9 -translate-y-1/2 items-center justify-center rounded text-ink-muted hover:bg-surface hover:text-ink`,children:(0,B.jsx)(V,{name:`moreHorizontal`,className:`size-4`})})]},e.id)),D.length===0?(0,B.jsx)(di,{tone:C?`loading`:`empty`,title:h(C?`palette.loading`:`palette.empty`)}):null]}),(0,B.jsx)(`p`,{className:`shrink-0 border-t border-line px-3 py-2 text-[11px] text-ink-faint`,children:h(`palette.hint`)})]})}var hi=`sshc.vault-lock.v1`,gi=`locked`;function _i(){if(!(typeof BroadcastChannel>`u`))try{let e=new BroadcastChannel(hi);e.postMessage(gi),e.close()}catch{}}function vi(e){if(typeof BroadcastChannel>`u`)return()=>void 0;try{let t=new BroadcastChannel(hi),n=t=>{t.data===gi&&e()};return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),t.close()}}catch{return()=>void 0}}var yi=15e3;function bi({bootstrap:e,health:t,vault:n}){let[r,i]=(0,L.useState)(`starting`),[a,s]=(0,L.useState)(`idle`),[c,u]=(0,L.useState)(``),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(!1),[h,g]=(0,L.useState)(``),[_,v]=(0,L.useState)(null),[y,b]=(0,L.useState)(null);(0,L.useEffect)(()=>{let r=!0;return e().then(e=>r?(S.setCSRF(e.csrfToken),t()):null).then(e=>!r||e===null?null:(g(e.version),n())).then(e=>{!r||e===null||(f(e.exists),m(e.passwordless??!1),i(e.unlocked?`ready`:`locked`))}).catch(e=>{if(console.error(`sshc could not start its session`,e),!r)return;let t=T(e);if(e instanceof Error&&e.message===`session_expired`||t===`session_required`||t===`invalid_session`||t===`invalid_csrf`){i(`session-ended`);return}u(e instanceof Error?e.message:String(e)),i(`error`)}),()=>{r=!1,S.clear()}},[e,t,n]),(0,L.useEffect)(()=>{if(r!==`locked`||!d)return;let e=!0;return n().then(t=>{e&&m(t.passwordless??!1)}).catch(()=>void 0),()=>{e=!1}},[r,d,n]);let x=(0,L.useCallback)(()=>{f(!0),i(`locked`),_i()},[]);return(0,L.useEffect)(()=>{l(x);let e=vi(()=>{f(!0),i(`locked`)});return()=>{l(null),e()}},[x]),(0,L.useEffect)(()=>{if(r!==`ready`)return;let e=!0,t=!1,a=!1,o=async(r=!1)=>{if(r&&(a=!0,s(`checking`)),!t){t=!0;try{let t=await n();if(!e)return;if(m(t.passwordless??!1),!t.unlocked){f(t.exists),i(`locked`),_i();return}a&&(a=!1,s(`idle`))}catch{e&&a&&s(`retrying`)}finally{t=!1}}},c=window.setInterval(()=>void o(),yi),l=()=>{document.visibilityState===`visible`&&o(!0)},u=()=>{document.visibilityState===`visible`&&o()};return document.addEventListener(`visibilitychange`,l),window.addEventListener(`focus`,u),()=>{e=!1,window.clearInterval(c),document.removeEventListener(`visibilitychange`,l),window.removeEventListener(`focus`,u)}},[r,n]),(0,L.useEffect)(()=>(o(()=>i(`session-ended`)),()=>o(null)),[]),(0,L.useEffect)(()=>(w(v),()=>w(null)),[]),{state:r,vaultRecheck:a,failure:c,vaultExists:d,passwordless:p,version:h,requestFailure:_,vaultMigration:y,lock:x,markVaultExists:(0,L.useCallback)(()=>f(!0),[]),openVault:(0,L.useCallback)(e=>{m(e?.passwordless??!1),typeof e?.migratedFromVersion==`number`&&typeof e.migratedToVersion==`number`&&b({from:e.migratedFromVersion,to:e.migratedToVersion}),f(!0),s(`idle`),i(`ready`)},[]),clearRequestFailure:()=>v(null),clearVaultMigration:()=>b(null)}}function xi({api:e,consoles:t,enabled:n,section:r,navigate:i,closeNavigation:a}){let[o,s]=(0,L.useState)({}),[c,l]=(0,L.useState)([]),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)(null),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)([]),b=(0,L.useRef)(0),x=(0,L.useRef)(0),S=(0,L.useRef)(null);(0,L.useEffect)(()=>{if(!n)return;let t=!0;return e.terminalSettings().then(e=>{t&&s(e)}).catch(()=>void 0),e.localShellProfiles!==void 0&&e.localShellProfiles().then(e=>{t&&l(e.profiles)}).catch(()=>void 0),()=>{t=!1}},[e,n,r]),(0,L.useEffect)(()=>{if(u!==null){if(t.sessions.some(e=>e.id===u)){S.current=null;return}S.current!==u&&d(null)}},[t.sessions,u]),(0,L.useEffect)(()=>{u!==null||t.sessions.length===0||d(t.sessions[0]?.id??null)},[t.sessions,u]);let C=(0,L.useCallback)(e=>{S.current=e,d(e),a(),i(`Terminal`),t.refresh().finally(()=>{S.current===e&&(S.current=null)})},[a,t,i]),w=(0,L.useCallback)(e=>{b.current+=1,h({id:e,sequence:b.current}),i(`Terminal`)},[i]),T=(0,L.useCallback)(e=>{h(t=>t?.sequence===e?null:t)},[]),E=(0,L.useCallback)(e=>{x.current+=1,_({name:e,sequence:x.current}),a(),i(`Terminal`)},[a,i]),D=(0,L.useCallback)(e=>{_(t=>t?.sequence===e?null:t)},[]);return{settings:o,localShellProfiles:c,activeConsole:u,liveWorkspace:f,restoreRequest:m,renameRequest:g,orderedConsoles:(0,L.useMemo)(()=>{let e=new Map(v.map((e,t)=>[e,t]));return t.sessions.map((t,n)=>({session:t,rank:e.get(t.id)??v.length+n})).sort((e,t)=>e.rank-t.rank).map(e=>e.session)},[t.sessions,v]),showConsole:C,openWorkspace:w,renameWorkspace:E,openLocalShell:(0,L.useCallback)(async e=>{let n=await t.open({kind:`shell`,...e===void 0?{}:{profileId:e}});n!==null&&C(n.id)},[t,C]),duplicateConsole:(0,L.useCallback)(async e=>{let n=t.sessions.find(t=>t.id===e);if(n===void 0)return null;let r=await t.open(n.kind===`ssh`&&n.alias!==void 0?{kind:`ssh`,alias:n.alias}:{kind:`shell`});return r!==null&&C(r.id),r},[t,C]),consumeRestore:T,consumeRename:D,reorderConsoles:y,setLiveWorkspace:p,setSettings:s}}var Si=`(max-width: 767px), (pointer: coarse) and (max-width: 1023px)`;function Ci(e){return typeof window.matchMedia==`function`&&window.matchMedia(e).matches}function wi(e){let[t,n]=(0,L.useState)(()=>Ci(e));return(0,L.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}function Ti(e,t=680){let n=wi(Si),[r,i]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let n=e.current;if(n===null)return;let r=()=>i(n.clientWidth>0&&n.clientWidth`u`)return;let a=new ResizeObserver(r);return a.observe(n),()=>a.disconnect()},[e,t]),n||r}function Ei(){(0,L.useLayoutEffect)(()=>{let e=document.documentElement,t=window.visualViewport,n=window.innerHeight,r=window.innerWidth,i=!0,a;function o(){Math.abs(window.innerWidth-r)>80&&(r=window.innerWidth,n=window.innerHeight);let i=document.activeElement,o=i instanceof HTMLElement&&(i.matches(`input:not([type=checkbox]):not([type=radio]), textarea`)||i.isContentEditable);if(n=Math.max(n,window.innerHeight),t&&Math.abs(t.scale-1)>.01)return;let s=t?.height??window.innerHeight;e.style.setProperty(`--app-viewport-height`,`${s}px`),e.style.setProperty(`--app-viewport-top`,`${t?.offsetTop??0}px`);let c=o&&Math.max(n,window.innerHeight)-s>120;e.dataset.keyboardOpen=String(c),a!==void 0&&cancelAnimationFrame(a),c&&i instanceof HTMLElement&&!i.closest(`[data-terminal-host], .monaco-editor`)&&(a=requestAnimationFrame(()=>{document.activeElement===i&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`})}))}let s=()=>queueMicrotask(()=>{i&&o()});return o(),window.addEventListener(`resize`,o),t?.addEventListener(`resize`,o),t?.addEventListener(`scroll`,o),document.addEventListener(`focusin`,o),document.addEventListener(`focusout`,s),()=>{i=!1,a!==void 0&&cancelAnimationFrame(a),window.removeEventListener(`resize`,o),t?.removeEventListener(`resize`,o),t?.removeEventListener(`scroll`,o),document.removeEventListener(`focusin`,o),document.removeEventListener(`focusout`,s),e.style.removeProperty(`--app-viewport-height`),e.style.removeProperty(`--app-viewport-top`),delete e.dataset.keyboardOpen}},[])}function Di(){window.location.replace(window.location.pathname+window.location.search)}function Oi({failure:e,requestFailure:t,version:n,onCloseFailure:r}){let i=E();return(0,B.jsxs)(`div`,{className:`min-h-screen bg-canvas text-ink`,children:[t===null?null:(0,B.jsx)(ht,{diagnostic:t,version:n,onClose:r}),(0,B.jsxs)(`main`,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,B.jsx)(`h1`,{className:`text-base font-semibold`,children:i(`shell.title`)}),(0,B.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:i(`shell.bootstrapFailed`)}),e===``?null:(0,B.jsx)(`code`,{className:`max-w-full overflow-x-auto rounded-md border border-line bg-card px-2 py-1 text-xs`,children:e}),(0,B.jsx)(b,{kind:`primary`,onClick:Di,children:i(`shell.bootstrapRetry`)})]})]})}function ki(){let e=E();return(0,B.jsx)(`main`,{className:`grid min-h-screen place-items-center bg-canvas p-6 text-ink`,children:(0,B.jsxs)(h,{as:`section`,className:`flex w-full max-w-md flex-col items-start gap-4 p-6 sm:p-8`,children:[(0,B.jsx)(`h1`,{className:`text-lg font-semibold`,children:e(`shell.sessionEndedHeading`)}),(0,B.jsx)(`p`,{role:`alert`,className:`text-sm leading-6 text-ink-muted`,children:e(`shell.sessionEnded`)}),(0,B.jsx)(b,{kind:`primary`,onClick:Di,children:e(`shell.sessionReload`)})]})})}function Ai({phase:e}){let t=E();return(0,B.jsx)(`div`,{className:`fixed inset-0 z-[100] grid min-h-screen place-items-center bg-canvas p-6`,children:(0,B.jsxs)(h,{as:`section`,role:`status`,className:`w-full max-w-md p-6 sm:p-8`,children:[(0,B.jsx)(`h1`,{className:`text-lg font-semibold`,children:t(`shell.title`)}),(0,B.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-ink-muted`,children:t(e===`checking`?`shell.vaultChecking`:`shell.vaultCheckRetrying`)})]})})}function ji({pathname:e,onGoHome:t}){let n=E();return(0,B.jsx)(`div`,{className:`h-full overflow-y-auto p-4 md:p-5`,children:(0,B.jsxs)(`section`,{"aria-labelledby":`not-found-heading`,className:`flex max-w-2xl flex-col gap-3`,children:[(0,B.jsx)(`h2`,{id:`not-found-heading`,className:`font-medium`,children:n(`shell.pageNotFound`)}),(0,B.jsx)(`p`,{className:`text-sm text-ink-muted`,children:n(`shell.pageNotFoundDescription`)}),(0,B.jsx)(`code`,{className:`w-fit rounded-md border border-line bg-card px-2 py-1 text-sm`,children:e}),(0,B.jsx)(`a`,{href:Nt(`Home`),onClick:t,className:`${P} w-fit`,children:n(`shell.goHome`)})]})})}function H(e){return C(`Overview`,e)}function Mi(e){return C(`HostDetail`,e)}function Ni(e){return C(`FileContents`,e)}function Pi(e){return C(`SavePreview`,e)}function Fi(e){return C(`SaveResult`,e)}function Ii(e){return C(`CreateConnectionResponse`,e)}function Li(e){return C(`HistoryList`,e).entries}var Ri={async overview(){return H(await S.read(`/api/v1/config/overview`))},async host(e,t){let n=new URLSearchParams({path:e,alias:t});return Mi(await S.read(`/api/v1/config/host?${n.toString()}`))},async file(e){let t=new URLSearchParams({path:e});return Ni(await S.read(`/api/v1/config/file?${t.toString()}`))},async preview(e){return Pi(await m(`/api/v1/config/preview`,e))},async save(e){return Fi(await m(`/api/v1/config/save`,e))},async createConnection(e){return Ii(await m(`/api/v1/connections`,e))},async updateConnection(e){return Fi(await d(`/api/v1/connections`,e))},async renameGroup(e,t){return Fi(await m(`/api/v1/config/groups/rename`,{from:e,to:t}))},async deleteGroup(e,t){return Fi(await m(`/api/v1/config/groups/delete`,{name:e,destination:t}))},async history(){return Li(await S.read(`/api/v1/history`))},async restore(e,t){return Fi(await m(`/api/v1/history/restore`,{transactionId:e,path:t}))},async recover(e,t){await m(`/api/v1/history/recover`,{transactionId:e,action:t})}},zi=[`bucket_authentication_failed`,`bucket_access_denied`,`bucket_rate_limited`,`bucket_unavailable`,`bucket_refused`,`bucket_timeout`,`bucket_dns_failed`,`bucket_tls_failed`,`bucket_unreachable`,`snapshot_download_incomplete`,`snapshot_cost_refused`,`snapshot_schema_unsupported`,`snapshot_rejected`,`snapshot_too_large`,`wrong_passphrase`,`sync_ignore_invalid`],Bi=`sync.force_push`,Vi=`remote-workspace`;function Hi(e){return C(`SyncStatus`,e)}function Ui(e){return C(`SyncSetupCheckResponse`,e)}function Wi(e){return C(`SyncSetupResponse`,e)}function Gi(e){return C(`SyncKeyResponse`,e)}function Ki(e){return C(`PushResponse`,e)}function qi(e){return C(`SyncPushDraft`,e)}function Ji(e){return C(`SyncExclusions`,e)}function Yi(e){return C(`SyncBucketStatus`,e)}function Xi(e){return C(`SyncHistory`,e)}function Zi(e){return C(`SyncHistoryDiff`,e)}function Qi(e){return C(`PullResponse`,e)}var $i={async syncStatus(){return Hi(await S.read(`/api/v1/sync`))},async checkSyncSetup(e){return Ui(await m(`/api/v1/sync/setup/check`,e,void 0,zi))},async completeSyncSetup(e){return Wi(await f(`/api/v1/sync/setup`,e,zi))},async configureSync(e){return Hi(await f(`/api/v1/sync/settings`,e))},async syncExclusions(){return Ji(await S.read(`/api/v1/sync/exclusions`))},async saveSyncExclusions(e){return Ji(await f(`/api/v1/sync/exclusions`,{document:e},[`sync_ignore_invalid`]))},async syncPushDraft(){return qi(await S.read(`/api/v1/sync/push`))},async pushSnapshot(e){return Ki(await m(`/api/v1/sync/push`,{message:e}))},async forcePushSnapshot(e){let t=await x(Bi,Vi);return Ki(await m(`/api/v1/sync/force-push`,{message:e},t))},async syncBucketStatus(){return Yi(await S.read(`/api/v1/sync/bucket`))},async syncHistory(){return Xi(await S.read(`/api/v1/sync/history`))},async diffSyncHistory(e){return Zi(await m(`/api/v1/sync/history/diff`,{key:e}))},async pullSnapshot(e,t,n,r,i){if(e&&r===void 0)throw Error(`invalid_request`);return Qi(await m(`/api/v1/sync/pull`,{apply:e,...t===void 0?{}:{resolve:t},...n===void 0?{}:{historyKey:n},...i===void 0?{}:{acceptRemoteHead:i},...r===void 0?{}:{expectedETag:r.remoteETag,expectedRevision:r.remoteRevision}},void 0,[...zi,`sync_local_changed`,`sync_workspace_busy`]))},async setSyncKey(e,t){return Gi(await f(`/api/v1/sync/key`,{...e===void 0?{}:{key:e},...t===void 0?{}:{confirmHistoryLoss:t}}))},async setAutoSync(e){return Hi(await f(`/api/v1/sync/auto`,{enabled:e}))},async syncNow(){return Hi(await _(`/api/v1/sync/now`))}};function ea(e){return`${e.path}\u0000${e.alias}`}function ta(e,t){let n=e;for(;;){let e=n.lastIndexOf(`/`);if(e<0)return``;if(n=n.slice(0,e),t.has(n))return n}}function na(e,t){return e.group===t||e.group.startsWith(`${t}/`)}function ra(e){let t=new Map;for(let n of e)n.identity.alias!==``&&t.set(n.identity.alias,(t.get(n.identity.alias)??0)+1);return new Set([...t].filter(([,e])=>e>1).map(([e])=>e))}function ia(e){let t=new Map((e.metadata.hosts??[]).map(e=>[ea(e.identity),e])),n=ra(e.hosts),r=e.hosts.map((e,t)=>({host:e,sourceOrder:t})).filter(({host:e})=>e.identity.alias!==``).map(({host:e,sourceOrder:r})=>{let i=t.get(ea(e.identity));return{host:e,identity:e.identity,group:e.group??``,tags:i?.tags??[],colour:i?.colour??``,os:i?.os||i?.detectedOS||``,order:i?.order??0,duplicateAlias:n.has(e.identity.alias),sourceOrder:r}}).sort((e,t)=>e.order-t.order||e.sourceOrder-t.sourceOrder).map(({sourceOrder:e,...t})=>t),i=new Set(e.groups.map(e=>e.name)),a=new Map((e.metadata.groups??[]).filter(e=>i.has(e.name)).map(e=>[e.name,e])),o=e.groups.map((e,t)=>{let n=a.get(e.name),o=r.filter(t=>na(t,e.name));return{name:e.name,label:e.name.slice(e.name.lastIndexOf(`/`)+1),parent:ta(e.name,i),hidden:n?.hidden===!0,colour:n?.colour??e.colour??``,order:n?.order??e.order??0,descendantCount:o.length,sourceOrder:t}}).sort((e,t)=>e.order-t.order||e.sourceOrder-t.sourceOrder).map(({sourceOrder:e,...t})=>t),s=new Map(o.map(e=>[e.name,e])),c=new Map;c.set(``,r.filter(e=>e.group===``));for(let e of o)c.set(e.name,r.filter(t=>t.group===e.name));let l=new Map;for(let e of o){let t=l.get(e.parent)??[];t.push(e),l.set(e.parent,t)}let u=new Map,d=e=>{let t=u.get(e);if(t!==void 0)return t;let n=(l.get(e)??[]).flatMap(e=>{let t=c.get(e.name)??[];return e.hidden&&t.length===0?d(e.name):[e]});return u.set(e,n),n};d(``);for(let e of o)d(e.name);return{servers:r,groups:o,duplicateAliases:n,groupByName:s,visibleChildrenByParent:u}}var aa=`data:image/svg+xml,%3csvg%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M24%200v128h80.662V0H24zm53.22%2055.023c4.613%200%208.35%203.768%208.35%208.416%200%204.648-3.737%208.416-8.35%208.416-4.61%200-8.35-3.768-8.35-8.416%200-4.648%203.74-8.416%208.35-8.416zm-11.486.854c.653.004%201.309.033%201.965.086a12.213%2012.213%200%2000-2.533%206.824c-6.573.122-12.64%203.392-16.398%208.842a11.834%2011.834%200%2000-3.815-1.549%2011.785%2011.785%200%2000-2.52-.271c-.21%200-.421.002-.634.015l-.004.002c4.872-8.663%2014.146-14.006%2023.94-13.949zm22.594%2012.328a27.771%2027.771%200%20013.938%2020.963%2027.677%2027.677%200%2001-5.303%2011.342l.002.006-.004-.004.002-.002a12.092%2012.092%200%2000-3.996-6.268%2020.658%2020.658%200%20002.597-6.52%2020.736%2020.736%200%2000-1.93-13.976%2012.1%2012.1%200%20004.694-5.54zM42.443%2073.48c4.611%200%208.35%203.768%208.35%208.416%200%204.648-3.739%208.416-8.35%208.416-4.612%200-8.35-3.768-8.35-8.416%200-4.648%203.738-8.416%208.35-8.416zm4.963%2019.417c2.826%205.492%207.853%209.364%2013.87%2010.663l.001-.004a20.048%2020.048%200%20002.05.336%2012.107%2012.107%200%20002.443%207.037%2027.24%2027.24%200%2001-5.93-.614c-8.903-1.924-16.153-8.07-19.572-16.535a11.934%2011.934%200%20007.138-.883zm27.936%202.291c4.612%200%208.35%203.769%208.35%208.417%200%204.647-3.738%208.416-8.35%208.416-4.611%200-8.352-3.769-8.352-8.416%200-4.648%203.74-8.416%208.352-8.416z'/%3e%3c/svg%3e`,oa=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill='%23A80030'%20d='M76.77%2068.974a27.05%2027.05%200%20002.008-1.729c-1.667.408-3.363.417-5.073.261-2.049.028.388%201.056%203.065%201.468zm7.94-4.212c1.222-1.685%202.111-3.53%202.425-5.438-.274%201.359-1.011%202.534-1.707%203.773-3.833%202.414-.36-1.433-.002-2.895-4.12%205.188-.566%203.111-.716%204.56zm4.063-10.57c.248-3.693-.727-2.525-1.055-1.117.383.199.685%202.603%201.055%201.117zM65.93%203.722c1.094.196%202.365.347%202.186.608%201.197-.262%201.469-.504-2.186-.608zm2.133.704l.053-.095-.773.159zM65.27%2080.73c-2.951-1.381-5.653-3.468-7.874-6.021%201.178%201.726%202.451%203.403%204.096%204.721-2.783-.942-6.499-6.742-7.584-6.978%204.796%208.587%2019.457%2015.059%2027.135%2011.848-3.553.13-8.065.073-12.057-1.402-1.536-.791-3.573-2.355-3.589-2.869-.077.201-.206.4-.127.701zm.156-.797l-.03.097.03-.097zm44.049-33.588c.033-1.882.523-.986.713-1.449-.37-.213-1.339-1.656-1.93-4.424.428-.651%201.143%201.686%201.726%201.781-.375-2.201-1.02-3.878-1.045-5.568-1.7-3.553-.602.474-1.981-1.525-1.81-5.646%201.502-1.311%201.725-3.875%202.743%203.974%204.308%2010.134%205.026%2012.685-.549-3.11-1.433-6.123-2.514-9.04.833.352-1.342-6.399%201.083-1.929-2.591-9.531-11.085-18.436-18.901-22.614.956.875%202.164%201.975%201.73%202.146-3.887-2.314-3.204-2.495-3.76-3.472-3.167-1.288-3.375.103-5.472.002-5.968-3.165-7.118-2.829-12.611-4.813l.251%201.168c-3.955-1.317-4.607.5-8.88.004-.261-.203%201.369-.735%202.71-.93-3.823.504-3.644-.753-7.384.139.921-.646%201.896-1.075%202.879-1.625-3.116.189-7.441%201.814-6.106.336C51.65%205.613%2042.619%208.798%2037.551%2013.55l-.159-1.065C35.07%2015.272%2027.266%2020.81%2026.645%2024.42l-.621.145c-1.209%202.046-1.991%204.365-2.949%206.47-1.581%202.693-2.317%201.036-2.091%201.459-3.109%206.302-4.653%2011.598-5.986%2015.94.951%201.421.022%208.553.382%2014.26-1.561%2028.19%2019.784%2055.559%2043.115%2061.879%203.42%201.222%208.506%201.176%2012.832%201.302-5.105-1.46-5.765-.773-10.735-2.508-3.587-1.689-4.373-3.617-6.914-5.821l1.006%201.777c-4.982-1.763-2.897-2.182-6.951-3.466l1.074-1.402c-1.615-.123-4.277-2.721-5.004-4.161l-1.767.069c-2.122-2.618-3.253-4.505-3.171-5.967l-.571%201.018c-.647-1.111-7.807-9.822-4.092-7.793-.691-.632-1.608-1.028-2.603-2.835l.756-.865c-1.788-2.299-3.291-5.249-3.177-6.231.954%201.289%201.616%201.529%202.271%201.75-4.515-11.204-4.768-.618-8.188-11.405l.723-.058c-.555-.836-.891-1.743-1.337-2.633l.314-3.138c-3.25-3.759-.91-15.982-.44-22.686.325-2.727%202.713-5.628%204.529-10.178l-1.106-.191c2.115-3.69%2012.079-14.82%2016.693-14.247%202.235-2.809-.443-.01-.88-.718%204.91-5.082%206.453-3.591%209.767-4.504%203.573-2.121-3.066.827-1.373-.809%206.178-1.578%204.378-3.587%2012.438-4.388.851.484-1.973.747-2.682%201.375%205.148-2.518%2016.289-1.946%2023.525%201.397%208.397%203.925%2017.832%2015.525%2018.204%2026.439l.423.113c-.213%204.339.665%209.356-.858%2013.965l1.037-2.182c.121%203.316-.971%204.925-1.955%207.773l-1.772.884c-1.45%202.817.14%201.789-.897%204.03-2.265%202.013-6.871%206.298-8.345%206.689-1.077-.024.729-1.269.964-1.759-3.029%202.082-2.431%203.125-7.065%204.39l-.136-.302C71.6%2082.675%2055.72%2072.017%2055.93%2057.475c-.123.924-.347.692-.601%201.067-.589-7.483%203.456-14.998%2010.278-18.065%206.674-3.305%2014.497-1.948%2019.276%202.507-2.625-3.44-7.851-7.085-14.046-6.744-6.066.096-11.742%203.952-13.636%208.137-3.109%201.957-3.469%207.544-4.824%208.565-1.822%2013.394%203.428%2019.179%2012.309%2025.985.718.484.801.757.739%201.005l.011-.02c10.477%203.915%2021.301%202.966%2030.366-4.302%202.306-1.796%204.825-4.852%205.553-4.895-1.096%201.649.188.793-.655%202.249%202.298-3.707-.999-1.509%202.375-6.401l1.247%201.716c-.463-3.075%203.819-6.812%203.385-11.676.982-1.488%201.097%201.601.053%205.024%201.446-3.798.381-4.408.754-7.542.401%201.053.928%202.173%201.199%203.284-.943-3.67.967-6.181%201.439-8.313-.462-.204-1.451%201.624-1.677-2.711zM51.037%2071.758c1.348%201.831%202.417%203.814%204.138%205.245-1.238-2.417-2.157-3.415-3.85-6.683l-.288%201.438zm3.473-1.563c-.713-.789-1.136-1.738-1.608-2.685.453%201.663%201.377%203.091%202.239%204.545l-.631-1.86zm52.5-.093a35.857%2035.857%200%20003.875-12.16l-.302.756a36.496%2036.496%200%2001-3.573%2011.404zM71.214%202.126c-1.917.161-3.825.257-5.709.499l.83.114c1.387-.509%203.408-.279%204.879-.613zM18.227%2030.775c1.424-3.207-.395-1.149-.552-2.007.221%202.846-2.19%203.924.552%202.007zm-2.838%207.237c-1.775%202.269-.817%202.752-1.004%204.296.642-1.972.76-3.156%201.004-4.296z'/%3e%3c/svg%3e`,sa=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M77.6%2092.4c-.1%200-.1%200-.1.1-.8.9-1.2%201.3-1.7%201.7-1.4%201.1-3-.1-4-.7-2.3-1.3-4.1-.5-4.6.5-.4%201%20.1%202.3%201.3%202.1%201.7-.2%201.8%200%203.1.8%202.4%201.5%204.1.7%204.9%200%20.7-.6%201.1-1.1%201.5-1.8.7-1.3.1-2.4-.2-2.7h-.2zM74.9%2017h-.4c-.7%200-1.4.3-2.1.4-2.4.2-4.5%201-5.9%201.7-.1%200-.1-.1-.1-.1l.2-.1%201.2.2c3.9-.4%207.1.4%207.3%201.6.1.9-1.6%201.9-4.1%202.5-.1%200-.2.2-.2.3%200%20.1.1.3.2.3%201%20.3%202.3.5%203.6.5%204%20.1%207.3-1.6%207.3-3.5.2-1.8-3-3.8-7-3.8zM64%201.8C29.5%201.8%201.6%2029.7%201.6%2064.1c0%207%201.1%2013.9%203.3%2019.9h4.3c3.8%200%207.4-.9%2010.4-2.4.8-.4%201.6-.6%202.5-.6%201.9%200%203.6.8%204.6%202.5.9%201.6%201.7%202.5%202.8%203.1.9.6%202.1%201%203.8%201%20.8%200%202.1-.2%202.4-1.1.4-1-.1-1.7-1.3-2.2-1.7-.7-2.1-1.7-3-3.3-.9-1.6-2.8-2.4-3.1-5.4-.3-3%202-6.7%206.6-5.5%203.3.9%205.4%204.9%206.2%206.3.4.7%201.9%201.6%203.1.5%201.2-1.1%202.3-1.1%203.2.3.8%201.2%206.4%208.7%2012.5%208.9%206.2.2%209.5-1.4%2012.2-1.3%201.9.1%202.8%201%203.9%201.2%201.9.3%203.2-1.4%205.3-1.3%201.7.1%203.5%201.2%205.4%201.2s5.9-2.3%205.8-1.3c-.1%201.7-1.4%204.6-1.7%206-.2.9%200%203.2-.6%205.1-.5%201.9-2.2%204.2-2.7%204.9-1.5%202.3-2.6%203-3.9%205.4-1.4%202.7-3.7%205.2-4.3%206-.8%201%204.3%200%206.1-1.7%201.5-1.4%204.2-5.8%208.5-6.8%202.9-.6%203.4-1.7%203.1-2.8-.1-.1-.1-.3-.1-.4%200-.4.2-.7.6-.9%203-1.2%207-2%2011.4-2%202.6%200%205.1.3%207.5.9%206.3-9.8%2010-21.4%2010-33.9%200-34.6-27.9-62.6-62.4-62.6zM114.8%2063c-3%2016.4-29.9%2021.9-56%2014-25-7.5-46.8-22.5-44.3-31.3%201.5-5.1%209.6-7.3%2020.4-6.1-1.6%203.3-1.5%207.3%205.6%2011.7%208.8%205%2023.6%209.2%2027.6%208.8%201.5-.1%202.8-.9%201.5-1.8-1.3-.9-2.5-2.7-3.3-5.8-.4-1.7-.9-4.2-10.3-6-20.2-3.9-19.4-9.6-18.8-12.8%200%200%201.8-8.1%202.5-10.9.7-2.8%202.7-9.3%2015.7-6.4%207.5%201.7%2011.6-.4%2013.6-.9%205.6-1.4%2011.9-.4%2015.3%203.1%203.6%203.7%208.5%2014.9%2010.8%2023.4%201.2%204.3.9%206.3.3%207.8-.4%201-.7%201.6-2.2%204.1-.3.4%200%20.9.5.6%203.9-2%204.8-4.7%205.4-6.7%2010.7%202.2%2017%207.7%2015.7%2015.2zM57.6%2027.5c-3%200-5.2.4-7.1.4s-3.4-1.3-4-2.2c-.6-.7-2.4-1.4-3.3.9-1%202.3.8%204.7%202.3%205%200%200%202.5%204.7%204.4%202.6%201.3-1.4%202.1-2.2%209.3-2.7%203.4-.3%203.8-1%203.7-1.9-.2-1-2.3-2.1-5.3-2.1z'%20fill='%23E93442'/%3e%3c/svg%3e`,ca=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M64.219%201.266C29.605%201.266%201.563%2029.434%201.5%2064.207h-.012v48.723H1.5c.016%207.886%206.383%2014.273%2014.242%2014.273h48.465c34.621-.023%2062.656-28.187%2062.656-62.945%200-34.774-28.054-62.942-62.718-62.942zm12.738%2025.918c10.527%200%2020.465%208.093%2020.465%2019.261%200%201.035.008%202.07-.164%203.246-.29%202.97-2.992%205.106-5.938%204.688-2.941-.426-4.941-3.23-4.394-6.168.05-.336.066-.863.066-1.766%200-6.332-5.156-8.773-10.031-8.773-4.875%200-9.27%204.117-9.277%208.773.082%205.387%200%2010.727%200%2016.114l9.05-.07c7.067-.145%207.149%2010.538.082%2010.488l-9.125.066c-.023%204.336.032%203.55.012%205.734%200%200%20.074%205.297-.082%209.313-1.094%2011.8-11.094%2021.23-23.113%2021.23-12.746%200-23.242-10.457-23.242-23.28.382-13.188%2010.859-23.567%2024.05-23.446l7.36-.055v10.469l-7.36.066h-.035c-7.25.215-13.465%205.16-13.582%2012.957a12.765%2012.765%200%200012.805%2012.797c7.086%200%2012.758-5.18%2012.758-12.781l-.012-39.649c.004-.738.027-1.324.11-2.132%201.195-9.7%209.831-17.09%2019.609-17.09zm0%200'%20fill='%2351a2da'/%3e%3c/svg%3e`,la=`data:image/svg+xml,%3csvg%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M64.633%205.723l-12.62%2012.863h8.444v33.818l4.176%204.258%204.13-4.207V18.811h8.71L64.633%205.723zM22.37%2021.355l.002%2022.903%209.266-9.246L53.633%2056.97h4.105v-3.418l-21.92-22.358%209.66-9.84H22.372zm26.938%200l-9.65%209.838%2018.08%2018.44V21.355h-8.43zm22.177.215l-.002%2028.108L89.61%2031.195l-9.43-9.625h-8.695zm13.395.883l8.566%208.742-21.96%2022.399v3.597h3.933l21.855-22.29%209.438%209.62V22.453H84.88zm12.394%2016.361l-18.02%2018.377h27.459V48.43l-9.438-9.616zm-65.632.069l-9.272%209.256v8.832h27.39L31.643%2038.883zM19.654%2050.846L6.28%2064.196%2019.654%2077.55v-9.328H52.98l4.03-4.028-4.49-4.472H19.655v-8.877zm89.778.357l-.004%208.746H76.55l-4.25%204.328%203.86%203.942h33.038v9.373l13.057-13.315-12.824-13.074zM22.377%2070.977l.002%209.287%209.264%209.256%2018.572-18.543H22.377zm31.713%200L31.639%2093.383l-9.262-9.248v22.677h22.21l-9.544-9.527%2022.695-22.65v-3.658H54.09zm17.256%200v4.175L92.56%2096.316l.964.973-8.61%208.596h21.562v-21.61l-8.24%208.414-.962.967-22.242-22.68h-3.687zm7.517%200l18.412%2018.767%209.202-9.379v-9.388H78.863zm-14.576.998l-3.822%203.814v33.787h-9.233l13.055%2013.028%2013.057-13.028h-8.717V76.31l-4.34-4.334zm-6.547%206.533l-18.816%2018.78%209.547%209.526h9.27V78.508zm13.606.512v27.8h8.756l9.55-9.533L71.346%2079.02z'/%3e%3c/svg%3e`,ua=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%20%3e%3cpath%20fill='%2310b982'%20d='M%20124.4375%2085.105469%20C%20126.746094%2078.496094%20128%2071.394531%20128%2064%20C%20128%2028.652344%2099.347656%200%2064%200%20C%2028.652344%200%200%2028.652344%200%2064%20C%200%2081.488281%207.015625%2097.339844%2018.386719%20108.890625%20L%2083.304688%2043.972656%20Z%20M%20112.746094%20105.46875%20L%2083.304688%2076.027344%20L%2037.199219%20122.132812%20C%2045.351562%20125.898438%2054.429688%20128%2064%20128%20C%2083.523438%20128%20101.007812%20119.257812%20112.746094%20105.46875%20Z%20M%20112.746094%20105.46875%20'/%3e%3c/svg%3e`,da=`data:image/svg+xml,%3csvg%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M33.938.316a9.087%209.087%200%200%200-.981.067c-5.66.64-9.02%205.117-8.387%2011.3.629%204.692%205.66%208.743%2010.485%208.106%205.664-.856%209.437-5.547%208.808-11.09-.59-4.6-5.048-8.447-9.925-8.383zm65.158%204.307a8.923%208.923%200%200%200-.49.025c-5.454.426-9.227%205.329-8.81%2010.66.419%205.333%205.243%209.383%2010.696%208.958%205.035-.426%209.23-5.332%208.813-10.45-.41-5.165-5.144-9.325-10.21-9.193zm-47.899%202.63c-2.665-.06-4.71%201.698-5.865%205.071-2.516%207.465-7.34%2010.235-15.102%208.742-1.046-.214-2.097-.425-2.515-.425-3.985.64-6.293%202.984-6.922%206.183-.84%209.81%204.195%2016.844%2011.117%2022.602%207.34%206.398%2016.36%207.89%2025.797%207.465.84%200%201.68%200%201.887-.641.21-1.066-.836-1.066-1.469-1.277-4.402-1.922-9.016-3.414-13.004-6.188-3.984-2.769-8.598-5.117-10.277-10.445-1.258-4.051.422-7.676%204.406-8.957%203.566-1.281%207.133-1.281%2010.488%200%202.098.851%202.934.426%203.356-1.918.629-4.051%201.886-7.89%204.402-11.3%202.938-4.267%202.938-4.692-1.887-7.466-.21%200-.21-.215-.418-.215-1.442-.8-2.782-1.202-3.994-1.23zm29.592.354c-2.765-.032-5.766.906-7.77%202.584-13.632%2011.09-15.94%2029.641-8.18%2044.352.208.64.63%201.281%201.466.855v-.002c-.207-4.69-.418-9.38.422-13.86.84-5.118%201.675-10.235%204.824-14.497%203.773-5.332%209.648-5.121%2012.793.637%201.68%202.773%202.308%205.758%202.515%208.957%200%201.918.84%202.344%202.52%202.133%205.032-.852%2010.066-.852%2014.89%201.066.63.211%201.258.64%202.098%200%201.676-1.492%202.098-8.957%201.047-10.875-1.887-3.414-4.824-2.984-7.758-2.984-3.355.21-6.293-.856-8.601-3.625-2.098-2.559-2.727-5.758-3.145-8.957-.21-1.492-.422-2.774-1.68-3.84-1.283-1.306-3.29-1.918-5.44-1.944zM95.965%2047.4c-8.687-.15-17.27%203.253-23.996%209.49-.63.426-.84%201.067-.418%201.708%204.195-1.282%208.597-2.563%2013.21-2.774%204.825-.426%209.86-.851%2014.684%201.278%206.082%202.559%207.133%208.316%202.516%2012.796-2.098%202.133-4.824%203.625-7.758%204.477-1.68.426-1.89%201.281-1.262%202.984%201.891%204.692%203.149%209.598%202.52%2014.926-.211.856-.422%201.496.418%202.133%201.886%201.281%209.02%200%2010.488-1.492%202.727-2.559%201.676-5.543%201.047-8.317-.836-3.41-.418-6.609%201.469-9.382%201.887-2.77%204.613-4.051%207.55-5.329%201.258-.425%202.31-1.066%203.149-2.558%201.887-3.625-.422-9.809-3.988-12.797-6.055-4.758-12.873-7.025-19.63-7.143zm-74.285.13c-.39.014-.833.163-1.305.404-.84.425-1.68.851-2.309%201.28-5.453%203.41-6.082%207.677-1.468%2012.368%203.355%203.41%205.035%207.25%203.777%2011.941-.629%202.344-1.89%204.051-3.355%205.97-1.051%201.28-1.47%202.558-1.262%204.265.422%204.05%204.406%208.101%209.23%208.527%2013.422%201.281%2024.328-3.41%2031.88-14.926%202.519-3.624%204.405-7.675%205.245-11.941-.84-.211-1.05.215-1.68.43-4.823%205.117-9.859%2010.02-16.359%2013.433-2.515%201.278-5.242%202.344-8.18%202.344-4.613%200-7.34-2.984-6.921-7.676.21-3.84%201.68-7.25%204.195-10.023%201.258-1.492%201.258-2.344-.211-3.625-4.195-2.985-7.969-6.61-9.855-11.516-.264-.932-.771-1.281-1.422-1.256zM9.646%2060.872c-.336.006-.676.028-1.017.068-4.824.426-9.02%205.543-8.602%2010.66.423%205.335%205.453%209.6%2010.489%208.96%206.082-.426%209.23-6.399%209.02-11.301-.396-4.798-4.842-8.472-9.89-8.385zm60.016%202.867c-.262-.027-.523.08-.838.4%202.516%203.836%204.824%207.891%206.711%2012.153%201.68%204.692%203.567%209.383%202.938%2014.715-.63%206.398-5.875%209.168-11.328%205.969-2.727-1.493-4.825-3.625-6.5-6.184-1.051-1.492-2.098-1.492-3.356-.426-3.988%203.414-8.18%205.973-13.426%206.824-.836%200-1.675%200-2.097.852-.63%202.133%202.52%208.742%204.406%209.809%203.144%201.921%205.664%200%208.18-1.493%202.937-1.703%205.87-2.343%209.226-1.277%203.149%201.067%205.246%203.41%207.133%205.969.84%201.066%201.68%201.918%203.355%202.347%203.985%201.067%209.438-3.199%2011.118-7.464%206.293-16.418-.84-33.266-14.684-41.793-.314-.213-.576-.374-.838-.4zM118.7%2072.21c-.332-.005-.669.007-1.01.033-5.66.641-9.437%204.906-9.02%2010.664.422%205.328%205.036%209.38%2010.278%208.953%205.453-.426%209.442-5.117%209.02-10.875-.392-5.196-4.289-8.707-9.268-8.775zm-58.054%2035.643c-5.036%200-9.23%204.265-9.23%209.808%200%206.183%203.983%2010.024%2010.07%2010.024%204.82-.215%209.015-4.692%209.015-9.809%200-5.332-4.824-10.023-9.855-10.023z'/%3e%3c/svg%3e`,fa=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M61.113%204.886C55.82%2017.788%2052.63%2026.229%2046.738%2038.749c3.614%203.805%208.047%208.242%2015.246%2013.25-7.742-3.168-13.02-6.348-16.968-9.648-7.54%2015.644-19.352%2037.933-43.325%2080.77%2018.844-10.817%2033.45-17.485%2047.059-20.032a33.989%2033.989%200%200%201-.895-8.024l.024-.601c.297-12.004%206.578-21.238%2014.016-20.61%207.437.625%2013.222%2010.872%2012.921%2022.875-.054%202.262-.312%204.434-.761%206.45%2013.465%202.62%2027.914%209.273%2046.5%2019.941-3.664-6.707-6.934-12.758-10.059-18.52-4.922-3.792-10.055-8.726-20.523-14.074%207.195%201.864%2012.347%204.008%2016.363%206.407C74.578%2038.12%2072.004%2030.308%2061.113%204.886Zm0%200'/%3e%3cpath%20d='M121.14%20112.57v-3.243h-1.214v-.433h2.93v.433h-1.223v3.242h-.492M123.363%20112.57v-3.676h.735l.875%202.601c.082.242.14.426.175.543.043-.133.11-.328.2-.586l.882-2.558h.66v3.675h-.472v-3.078l-1.074%203.078h-.442l-1.066-3.129v3.13h-.473'/%3e%3c/svg%3e`,pa=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%2373ba25'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M58.777%2032.575c-9.624.045-21.95%201.594-37.058%2010.789l-.594.368c-9.478%205.854-16.018%2013.067-19.44%2021.454C.613%2067.82-.83%2073.776.599%2079.376c.617%202.449%201.767%204.911%203.315%207.113%203.496%204.978%209.372%208.28%2015.694%208.838%208.929.79%2015.686-3.18%2018.09-10.613%201.651-5.129%200-12.654-6.336-16.493-5.157-3.124-10.698-2.413-13.915-.31-2.786%201.832-4.366%204.677-4.34%207.804.062%205.543%204.886%208.488%208.356%208.497%201.008%200%202.019-.172%203.16-.541.408-.124.79-.276%201.21-.532l.13-.076.057-.04a2.817%202.817%200%200%200%201.265-2.33%202.749%202.749%200%200%200-.111-.771c-.408-1.403-1.811-2.25-3.262-1.988l-.195.044-.266.08-.386.133a7.621%207.621%200%200%201-1.522.213c-.408-.027-2.4-.616-2.4-2.782v-.027c0-.798.318-1.354.496-1.66.62-.964%202.322-1.906%204.62-1.712%203.012.258%205.186%201.79%206.629%204.677%201.336%202.685.985%205.986-.901%208.404-1.877%202.397-5.214%203.417-9.65%202.942-4.479-.489-8.263-3.04-10.38-7.007-2.076-3.882-2.187-8.484-.292-12.015%204.53-8.471%2013.085-8.383%2017.78-7.58%206.943%201.194%2014.842%207.536%2017.646%2014.857.452%201.166.683%202.094.883%202.941l.302%201.265%207.845%203.79c.168.083.227.11.293.061.084-.062.035-.226.035-.226-.049-.173-.164-.333-.342-2.507-.15-1.93-.453-7.21%202.232-9.824%201.043-1.024%202.632-1.939%203.887-2.227%205.138-1.247%2011.168-.386%2016.87%206.145%202.95%203.373%204.389%204.912%205.112%205.6%200%200%20.164.155.253.226.093.08.155.143.297.222.235.13%209.802%204.49%209.802%204.49s.111.053.195-.048.004-.204.004-.204c-.062-.072-6.06-7.747-4.996-14.07.843-5.033%204.89-4.58%2010.49-3.954%201.827.212%203.908.448%206.06.497%206.017.04%2012.497-1.06%2016.49-2.791%202.582-1.109%204.228-1.85%205.262-2.782.372-.301.563-.8.763-1.331l.142-.351c.168-.43.412-1.342.52-1.841.043-.219.097-.434-.09-.573-.164-.128-.55.102-.55.102-1.753%201.043-6.137%203.021-10.236%203.106-5.086.102-15.397-5.099-16.462-5.648l-2.157-5.05c7.375%204.81%2013.494%207.468%2018.175%207.88%205.214.458%209.278-2.356%2011.04-3.527.23-.156.46-.323.674-.488.04-.026.129-.107.115-.178-.293-1.81-3.012-10.583-5.076-12.69-.568-.577-1.02-1.14-1.939-1.677-7.454-4.3-25.14-6.895-25.966-7.01%200%200-.084-.019-.142.035-.046.044-.054.128-.054.128l-.08%204.034c-1.805-.602-14.936-4.801-27.239-5.223-2.61-.09-5.518-.244-8.725-.228Zm56.012%208.663c4.167.147%207.442%203.63%207.3%207.752a7.44%207.44%200%200%201-2.397%205.214%207.552%207.552%200%200%201-5.435%202.014c-4.162-.15-7.433-3.63-7.295-7.756a7.45%207.45%200%200%201%202.396-5.218%207.61%207.61%200%200%201%205.431-2.006zm-.066%202.206a5.242%205.242%200%200%200-3.78%201.397%205.146%205.146%200%200%200-1.67%203.634c-.097%202.885%202.185%205.311%205.09%205.418a5.316%205.316%200%200%200%203.79-1.407%205.146%205.146%200%200%200%201.664-3.634c.102-2.884-2.18-5.306-5.094-5.408zm.865%202.622c1.295%200%202.343.687%202.343%201.548%200%20.848-1.051%201.545-2.343%201.545-1.295%200-2.343-.697-2.343-1.545%200-.86%201.048-1.548%202.343-1.548zm-20.11%2037.09a1.647%201.647%200%200%200-1.654%201.65%201.647%201.647%200%200%200%201.655%201.66%201.655%201.655%200%200%200%20.004-3.31zm0%20.258h.005c.74%200%201.335.625%201.335%201.402%200%20.777-.595%201.402-1.335%201.393-.74%200-1.34-.616-1.34-1.402%200-.771.6-1.393%201.335-1.393zm-.084.47c-.221%200-.369.022-.528.044v1.842h.298v-.794h.208c.24%200%20.356.088.404.323.036.244.08.414.124.47h.31c-.031-.057-.07-.168-.119-.456-.035-.272-.147-.417-.31-.448v-.014c.2-.057.363-.21.363-.448%200-.177-.061-.302-.173-.381-.111-.08-.293-.138-.577-.138zm-.013.226c.333%200%20.453.16.453.324%200%20.227-.209.315-.453.315h-.217v-.625c.053-.01.12-.014.217-.014z'/%3e%3c/svg%3e`,ma=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20d='M97.905%2067.885c.174%2018.8%2016.494%2025.057%2016.674%2025.137-.138.44-2.607%208.916-8.597%2017.669-5.178%207.568-10.553%2015.108-19.018%2015.266-8.318.152-10.993-4.934-20.504-4.934-9.508%200-12.479%204.776-20.354%205.086-8.172.31-14.395-8.185-19.616-15.724C15.822%2094.961%207.669%2066.8%2018.616%2047.791c5.438-9.44%2015.158-15.417%2025.707-15.571%208.024-.153%2015.598%205.398%2020.503%205.398%204.902%200%2014.106-6.676%2023.782-5.696%204.051.169%2015.421%201.636%2022.722%2012.324-.587.365-13.566%207.921-13.425%2023.639M82.272%2021.719c4.338-5.251%207.258-12.563%206.462-19.836-6.254.251-13.816%204.167-18.301%209.416-4.02%204.647-7.54%2012.087-6.591%2019.216%206.971.54%2014.091-3.542%2018.43-8.796'/%3e%3c/svg%3e`,ha=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill='%230078d4'%20d='M67.328%2067.331h60.669V128H67.328zm-67.325%200h60.669V128H.003zM67.328%200h60.669v60.669H67.328zM.003%200h60.669v60.669H.003z'/%3e%3c/svg%3e`,ga=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M113.823%20104.595c-1.795-1.478-3.629-2.921-5.308-4.525-1.87-1.785-3.045-3.944-2.789-6.678.147-1.573-.216-2.926-2.113-3.452.446-1.154.864-1.928%201.033-2.753.188-.92.178-1.887.204-2.834.264-9.96-3.334-18.691-8.663-26.835-2.454-3.748-5.017-7.429-7.633-11.066-4.092-5.688-5.559-12.078-5.633-18.981a47.564%2047.564%200%2000-1.081-9.475C80.527%2011.956%2077.291%207.233%2071.422%204.7c-4.497-1.942-9.152-2.327-13.901-1.084-6.901%201.805-11.074%206.934-10.996%2014.088.074%206.885.417%2013.779.922%2020.648.288%203.893-.312%207.252-2.895%2010.34-2.484%202.969-4.706%206.172-6.858%209.397-1.229%201.844-2.317%203.853-3.077%205.931-2.07%205.663-3.973%2011.373-7.276%2016.5-1.224%201.9-1.363%204.026-.494%206.199.225.563.363%201.429.089%201.882-2.354%203.907-5.011%207.345-10.066%208.095-3.976.591-4.172%201.314-4.051%205.413.1%203.337.061%206.705-.28%2010.021-.363%203.555.008%204.521%203.442%205.373%207.924%201.968%2015.913%203.647%2023.492%206.854%203.227%201.365%206.465.891%209.064-1.763%202.713-2.771%206.141-3.855%209.844-3.859%206.285-.005%2012.572.298%2018.86.369%201.702.02%202.679.653%203.364%202.199.84%201.893%202.26%203.284%204.445%203.526%204.193.462%208.013-.16%2011.19-3.359%203.918-3.948%208.436-7.066%2013.615-9.227%201.482-.619%202.878-1.592%204.103-2.648%202.231-1.922%202.113-3.146-.135-5zM62.426%2024.12c.758-2.601%202.537-4.289%205.243-4.801%202.276-.43%204.203.688%205.639%203.246%201.546%202.758%202.054%205.64.734%208.658-1.083%202.474-1.591%202.707-4.123%201.868-.474-.157-.937-.343-1.777-.652.708-.594%201.154-1.035%201.664-1.382%201.134-.772%201.452-1.858%201.346-3.148-.139-1.694-1.471-3.194-2.837-3.175-1.225.017-2.262%201.167-2.4%202.915-.086%201.089.095%202.199.173%203.589-3.446-1.023-4.711-3.525-3.662-7.118zm-12.75-2.251c1.274-1.928%203.197-2.314%205.101-1.024%202.029%201.376%203.547%205.256%202.763%207.576-.285.844-1.127%201.5-1.716%202.241l-.604-.374c-.23-1.253-.276-2.585-.757-3.733-.304-.728-1.257-1.184-1.919-1.762-.622.739-1.693%201.443-1.757%202.228-.088%201.084.477%202.28.969%203.331.311.661%201.001%201.145%201.713%201.916l-1.922%201.51c-3.018-2.7-3.915-8.82-1.871-11.909zM87.34%2086.075c-.203%202.604-.5%202.713-3.118%203.098-1.859.272-2.359.756-2.453%202.964a101.744%20101.744%200%2000-.012%207.753c.061%201.77-.537%203.158-1.755%204.393-6.764%206.856-14.845%2010.105-24.512%208.926-4.17-.509-6.896-3.047-9.097-6.639.98-.363%201.705-.607%202.412-.894%203.122-1.27%203.706-3.955%201.213-6.277-1.884-1.757-3.986-3.283-6.007-4.892-1.954-1.555-3.934-3.078-5.891-4.629-1.668-1.323-2.305-3.028-2.345-5.188-.094-5.182.972-10.03%203.138-14.747%201.932-4.209%203.429-8.617%205.239-12.885.935-2.202%201.906-4.455%203.278-6.388%201.319-1.854%202.134-3.669%201.988-5.94-.084-1.276-.016-2.562-.016-3.843l.707-.352c1.141.985%202.302%201.949%203.423%202.959%204.045%203.646%207.892%203.813%2012.319.67%201.888-1.341%203.93-2.47%205.927-3.652.497-.294%201.092-.423%201.934-.738%202.151%205.066%204.262%2010.033%206.375%2015%201.072%202.524%201.932%205.167%203.264%207.547%202.671%204.775%204.092%209.813%204.07%2015.272-.012%202.83.137%205.67-.081%208.482z'/%3e%3c/svg%3e`,_a=[[`server`,`Server`],[`linux`,`Linux`],[`amazonlinux`,`Amazon Linux`],[`ubuntu`,`Ubuntu`],[`debian`,`Debian`],[`redhat`,`Red Hat Enterprise Linux`],[`fedora`,`Fedora`],[`centos`,`CentOS`],[`rocky`,`Rocky Linux`],[`almalinux`,`AlmaLinux`],[`arch`,`Arch Linux`],[`alpine`,`Alpine Linux`],[`opensuse`,`openSUSE / SUSE`],[`freebsd`,`FreeBSD`],[`macos`,`macOS`],[`windows`,`Windows`]],va={ubuntu:aa,debian:oa,redhat:sa,fedora:ca,centos:la,rocky:ua,almalinux:da,arch:fa,opensuse:pa,macos:ma,windows:ha,linux:ga,amazonlinux:ga,alpine:ga};function ya({os:e,colour:t=``,compact:n=!1}){let r=E(),i=e===`server`?r(`host.osGeneric`):_a.find(([t])=>t===e)?.[1]??r(`host.osUnknown`),a=va[e??``];return(0,B.jsxs)(`span`,{role:`img`,"aria-label":i,title:i,className:`relative grid ${n?`size-5`:`size-6`} shrink-0 place-items-center text-ink-muted`,children:[a===void 0?(0,B.jsx)(V,{name:`connections`,className:n?`size-4`:`size-5`}):(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`${n?`size-4`:`size-5`} bg-current [mask-position:center] [mask-repeat:no-repeat] [mask-size:contain]`,style:{maskImage:`url("${a}")`}}),t===``?null:(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border border-card`,style:{backgroundColor:t}})]})}function ba({open:e,anchorRef:t,menuRef:n}){(0,L.useLayoutEffect)(()=>{if(!e)return;let r=()=>{let e=t.current,r=n.current;if(e===null||r===null)return;let i=window.visualViewport,a=(i?.offsetLeft??0)+8,o=(i?.offsetTop??0)+8,s=Math.max(0,(i?.width??window.innerWidth)-16),c=Math.max(0,(i?.height??window.innerHeight)-16);r.style.maxWidth=`${s}px`,r.style.maxHeight=`${c}px`;let l=e.getBoundingClientRect(),u=r.getBoundingClientRect(),d=l.bottom+4+u.height<=o+c?l.bottom+4:l.top-u.height-4;r.style.left=`${Math.max(a,Math.min(l.right-u.width,a+s-u.width))}px`,r.style.top=`${Math.max(o,Math.min(d,o+c-u.height))}px`};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),window.visualViewport?.addEventListener(`resize`,r),window.visualViewport?.addEventListener(`scroll`,r),()=>{window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0),window.visualViewport?.removeEventListener(`resize`,r),window.visualViewport?.removeEventListener(`scroll`,r)}},[t,n,e])}function xa({alias:e,path:t,busy:n,opening:r=!1,onOpenSettings:i,onConnect:a}){let o=E(),[s,c]=(0,L.useState)(!1),l=(0,L.useRef)(null),u=(0,L.useRef)(null),d=(0,L.useRef)(null);an({open:s,containerRefs:[l,d],onDismiss:()=>c(!1),returnFocusRef:u}),An({open:s,menuRef:d,onClose:()=>c(!1)}),ba({open:s,anchorRef:u,menuRef:d});let f=Gt({path:t,alias:e,panel:`Basic`,advanced:`Jump`});return(0,B.jsxs)(`div`,{ref:l,className:`relative shrink-0`,children:[(0,B.jsx)(`button`,{ref:u,type:`button`,"aria-label":o(`home.connectionActions`,{alias:e}),"aria-haspopup":`menu`,"aria-expanded":s,onClick:()=>c(e=>!e),className:`pointer-events-auto flex size-8 items-center justify-center rounded-md text-ink-muted hover:bg-hover hover:text-ink`,children:(0,B.jsx)(V,{name:`moreHorizontal`,className:`size-4`})}),s?(0,qt.createPortal)((0,B.jsxs)(`div`,{ref:d,role:`menu`,className:`fixed z-50 w-56 overflow-y-auto rounded-lg border border-line bg-card p-1 shadow-lg`,children:[(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{c(!1),i(f)},className:`block min-h-10 w-full rounded-md px-3 py-2 text-left text-sm text-ink hover:bg-hover focus:bg-hover focus:outline-none md:min-h-0`,children:o(`home.openConnectionSettings`)}),(0,B.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:n,onClick:()=>{c(!1),a()},className:`block min-h-10 w-full rounded-md px-3 py-2 text-left text-sm text-ink hover:bg-hover focus:bg-hover focus:outline-none disabled:text-ink-faint md:min-h-0`,children:o(r?`home.opening`:`home.connect`)})]}),document.body):null]})}var Sa=[`B`,`KiB`,`MiB`,`GiB`,`TiB`],Ca=[`B`,`kB`,`MB`,`GB`,`TB`];function wa(e,t={}){let n=t.decimal?Ca:Sa,r=t.decimal?1e3:1024,i=Math.max(0,e),a=0;for(;i>=r&&aia(e),[e]),_=(0,L.useMemo)(()=>new Map(t.map((e,t)=>[e.alias,{connection:e,position:t}])),[t]),v=(0,L.useMemo)(()=>new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}),[]),y=l.at(-1)??``,b=g.visibleChildrenByParent.get(y)??[];(0,L.useEffect)(()=>{l.every(e=>g.groupByName.has(e))||u([])},[l,g.groupByName]);let x=(0,L.useMemo)(()=>g.servers.filter(e=>Ma(e,y)&&ja(e,o)).sort((e,t)=>{let n=_.get(e.identity.alias)?.position,r=_.get(t.identity.alias)?.position;return n!==void 0&&r!==void 0?n-r:n===void 0?r===void 0?v.compare(e.identity.alias,t.identity.alias):1:-1}),[v,y,g.servers,o,_]);function S(e){f(e),Oa(e)}function C(e){let t=e.identity.alias,o=_.get(t)?.connection,s=Aa(e),c=o===void 0?``:a(`home.lastConnected`,{at:Ta(o.lastConnectedAt)}),l=p===t,u=n===t,f=d===`panel`,g=()=>{n===``&&(m(t),r(t))};return(0,B.jsxs)(`li`,{"aria-busy":u,className:`relative min-w-0 rounded-lg border transition-colors ${l||u?`border-accent bg-select-fill`:`border-line bg-card hover:border-control-line hover:bg-hover`}`,children:[(0,B.jsxs)(`button`,{type:`button`,"data-touch-compact":!0,"aria-label":a(u?`home.openingConnection`:`home.connectGesture`,{alias:t}),"aria-pressed":l,disabled:n!==``,onPointerDown:e=>{h.current=e.pointerType},onClick:()=>{if(h.current===`mouse`){m(t);return}g()},onDoubleClick:()=>{h.current===`mouse`&&g()},onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),g())},className:`flex w-full min-w-0 items-center gap-3 rounded-lg py-3 pl-3 pr-14 text-left disabled:cursor-wait ${f?`min-h-24`:`min-h-20`}`,children:[(0,B.jsx)(ya,{os:e.os,colour:e.colour}),(0,B.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,B.jsx)(`span`,{className:`truncate text-sm font-semibold text-ink`,title:t,children:t}),e.duplicateAlias?(0,B.jsx)(`span`,{"aria-label":a(`browser.duplicateAlias`),className:`text-notice-ink`,children:`⧉`}):null]}),(0,B.jsx)(`span`,{className:`mt-1 block truncate font-mono text-xs text-ink-muted`,title:s,children:s}),(0,B.jsx)(`span`,{"aria-live":`polite`,children:u?(0,B.jsxs)(`span`,{className:`mt-1.5 flex items-center gap-1.5 text-xs text-ink-muted`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`size-3 shrink-0 animate-spin rounded-full border-2 border-current border-r-transparent motion-reduce:animate-none`}),a(`home.opening`)]}):e.group===``&&c===``?null:(0,B.jsxs)(`span`,{className:`mt-1.5 flex min-w-0 items-center gap-1.5 text-[11px] text-ink-faint`,children:[e.group===``?null:(0,B.jsx)(`span`,{className:`truncate`,title:e.group,children:e.group}),e.group===``||c===``?null:(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),c===``?null:(0,B.jsx)(`span`,{className:`truncate`,title:c,children:c})]})})]})]}),(0,B.jsx)(`div`,{className:`pointer-events-none absolute right-2 top-2`,children:(0,B.jsx)(xa,{alias:t,path:e.identity.path,busy:n!==``,opening:u,onOpenSettings:i,onConnect:g})})]},ea(e.identity))}return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto] gap-2`,children:[(0,B.jsxs)(`label`,{className:`relative min-w-0`,children:[(0,B.jsx)(`span`,{className:`sr-only`,children:a(`home.search`)}),(0,B.jsx)(V,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint`}),(0,B.jsx)(`input`,{type:`search`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:a(`home.searchPlaceholder`),className:`${A} min-h-10 w-full pl-9 md:min-h-0`})]}),(0,B.jsx)(`div`,{className:`flex`,children:(0,B.jsx)(c,{label:a(`home.viewMode`),value:d,options:[{value:`panel`,label:a(`home.panelView`)},{value:`list`,label:a(`home.listView`)}],onChange:S})})]}),b.length===0&&l.length===0?null:(0,B.jsxs)(`section`,{"aria-label":a(`home.groups`),className:`flex flex-col gap-2`,children:[l.length===0?null:(0,B.jsxs)(`nav`,{"aria-label":a(`home.groupBreadcrumb`),className:`flex min-w-0 items-center gap-1 text-xs text-ink-muted`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:()=>u([]),className:`shrink-0 rounded px-1 py-0.5 hover:bg-card hover:text-ink`,children:a(`home.allGroups`)}),l.map((e,t)=>{let n=t===l.length-1;return(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`text-ink-faint`,children:`/`}),(0,B.jsx)(`button`,{type:`button`,"aria-current":n?`page`:void 0,onClick:()=>u(l.slice(0,t+1)),className:`truncate rounded px-1 py-0.5 hover:bg-card hover:text-ink ${n?`font-medium text-ink`:``}`,children:g.groupByName.get(e)?.label??e})]},e)})]}),b.length===0?null:(0,B.jsx)(`div`,{role:`group`,"aria-label":a(`home.groupFilter`),className:`flex flex-wrap gap-2`,children:b.map(e=>{let t=g.visibleChildrenByParent.get(e.name)?.length??0;return(0,B.jsxs)(`button`,{type:`button`,title:e.name,"aria-label":a(`home.openGroup`,{name:e.name,count:e.descendantCount}),onClick:()=>u([...l,e.name]),className:`flex min-h-9 min-w-0 max-w-full items-center gap-2 rounded-md border border-line bg-card px-3 py-1.5 text-left transition-colors hover:border-control-line hover:bg-hover`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${e.colour===``?`bg-accent`:``}`,style:e.colour===``?void 0:{backgroundColor:e.colour}}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium text-ink`,children:e.label}),(0,B.jsx)(`span`,{className:`shrink-0 font-mono text-xs tabular-nums text-ink-muted`,children:e.descendantCount}),t===0?null:(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-ink-faint`,children:`›`})]},e.name)})})]}),(0,B.jsx)(`h3`,{className:`text-xs font-semibold text-ink`,children:a(`home.connectionCount`,{count:x.length})}),x.length===0?(0,B.jsx)(`p`,{className:`border-y border-line bg-surface-subtle p-4 text-sm text-ink-muted`,children:g.servers.length===0?a(`home.noConnections`):a(`home.noMatches`)}):(0,B.jsx)(`ul`,{"aria-label":a(`home.connectionList`),className:d===`panel`?`grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3`:`flex flex-col gap-1`,children:x.map(C)})]})}function Pa(e){if(e.pane!==void 0)return{pane:{id:e.pane.id,alias:e.pane.alias,...e.pane.kind===`shell`?{kind:e.pane.kind}:{}}};let t=e.split;return{split:{direction:t.direction,ratio:t.ratio,first:Pa(t.first),second:Pa(t.second)}}}function Fa(e){let t=C(`TerminalWorkspace`,e);return{...t,layout:Pa(t.layout)}}var Ia={async list(){return C(`WorkspaceList`,await S.read(`/api/v1/workspaces`)).workspaces.map(Fa)},async create(e){return Fa(await m(`/api/v1/workspaces`,e))},async update(e,t){return Fa(await f(`/api/v1/workspaces/${encodeURIComponent(e)}`,t))},async remove(e){await S.mutate(`/api/v1/workspaces/${encodeURIComponent(e)}`,{method:`DELETE`})},async restore(e){return Fa(C(`WorkspaceRestorePlan`,await S.mutate(`/api/v1/workspaces/${encodeURIComponent(e)}/restore`,{method:`POST`})).workspace)}};function La(e,t){let n=Ka(e),r=U(n);return{root:n,focusedPaneId:r.includes(t)?t:r[0]??``}}function Ra(e){return{layout:qa(e.root),focusedPaneId:e.focusedPaneId}}function za(e,t){switch(t.type){case`focus`:return U(e.root).includes(t.paneId)?{...e,focusedPaneId:t.paneId}:e;case`split`:{if(U(e.root).length>=4||U(e.root).includes(t.pane.id)||!Ja(t.pane))return e;let n=Ua(e.root,t.paneId,e=>({split:{direction:t.direction,ratio:50,first:{pane:e},second:{pane:{...t.pane,state:`reconnect_required`}}}}));return n===e.root?e:{root:n,focusedPaneId:t.pane.id}}case`dock-pane`:{if(!Ja(t.pane)||t.pane.id===t.targetPaneId)return e;let n=Xa(e.root,t.pane.id);if(n===void 0&&U(e.root).length>=4)return e;let r=n===void 0?e.root:Wa(e.root,t.pane.id);if(r===null||Xa(r,t.targetPaneId)===void 0)return e;let i=t.edge===`left`||t.edge===`right`?`horizontal`:`vertical`,a=t.edge===`left`||t.edge===`top`,o=n??t.pane,s=n!==void 0&&U(e.root).length===2&&e.root.split?.direction===i?e.root.split.ratio:50,c=Ua(r,t.targetPaneId,e=>({split:{direction:i,ratio:s,first:a?{pane:o}:{pane:e},second:a?{pane:e}:{pane:o}}}));return c===r?e:{root:c,focusedPaneId:o.id}}case`resize-split`:{let n=Math.min(90,Math.max(10,Math.round(t.ratio))),r=Ga(e.root,t.path,n);return r===e.root?e:{...e,root:r}}case`close`:{let n=Wa(e.root,t.paneId);if(n===null||n===e.root)return e;let r=U(n);return{root:n,focusedPaneId:e.focusedPaneId===t.paneId?r[0]??``:e.focusedPaneId}}case`swap-panes`:{if(t.sourcePaneId===t.targetPaneId)return e;let n=Xa(e.root,t.sourcePaneId),r=Xa(e.root,t.targetPaneId);return n===void 0||r===void 0?e:{...e,root:Ya(e.root,e=>e.id===n.id?r:e.id===r.id?n:e)}}case`connection-starting`:return Ha(e,t.paneId,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`connecting`}));case`connection-started`:return t.sessionId===``?e:Ha(e,t.paneId,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`connected`,sessionId:t.sessionId}));case`connection-failed`:return Ha(e,t.paneId,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`failed`,problem:t.problem}));case`engine-restarted`:return{...e,root:Ya(e.root,e=>({id:e.id,alias:e.alias,...e.kind===void 0?{}:{kind:e.kind},state:`reconnect_required`}))}}}function U(e){let t=[];return Za(e,e=>t.push(e.id)),t}function Ba(e){let t=[];return Za(e,e=>{e.sessionId!==void 0&&t.push(e.sessionId)}),t}function Va(e){return e.pane===void 0?Va(e.split.first)+Va(e.split.second):1}function Ha(e,t,n){let r=Ua(e.root,t,e=>({pane:n(e)}));return r===e.root?e:{...e,root:r}}function Ua(e,t,n){if(e.pane!==void 0)return e.pane.id===t?n(e.pane):e;let r=Ua(e.split.first,t,n);if(r!==e.split.first)return{split:{...e.split,first:r}};let i=Ua(e.split.second,t,n);return i===e.split.second?e:{split:{...e.split,second:i}}}function Wa(e,t){if(e.pane!==void 0)return e.pane.id===t?null:e;let n=Wa(e.split.first,t);if(n===null)return e.split.second;if(n!==e.split.first)return{split:{...e.split,first:n}};let r=Wa(e.split.second,t);return r===null?e.split.first:r===e.split.second?e:{split:{...e.split,second:r}}}function Ga(e,t,n){if(e.split===void 0)return e;if(t.length===0)return e.split.ratio===n?e:{split:{...e.split,ratio:n}};let[r,...i]=t;if(r===void 0)return e;let a=Ga(e.split[r],i,n);return a===e.split[r]?e:{split:{...e.split,[r]:a}}}function Ka(e){return e.pane===void 0?{split:{direction:e.split.direction,ratio:e.split.ratio,first:Ka(e.split.first),second:Ka(e.split.second)}}:{pane:{...e.pane,state:`reconnect_required`}}}function qa(e){return e.pane===void 0?{split:{direction:e.split.direction,ratio:e.split.ratio,first:qa(e.split.first),second:qa(e.split.second)}}:{pane:{id:e.pane.id,alias:e.pane.alias,...e.pane.kind===void 0?{}:{kind:e.pane.kind}}}}function Ja(e){return e.id!==``&&e.alias!==``&&(e.kind===void 0||e.kind===`shell`)}function Ya(e,t){return e.pane===void 0?{split:{...e.split,first:Ya(e.split.first,t),second:Ya(e.split.second,t)}}:{pane:t(e.pane)}}function Xa(e,t){return e.pane===void 0?Xa(e.split.first,t)??Xa(e.split.second,t):e.pane.id===t?e.pane:void 0}function Za(e,t){if(e.pane!==void 0){t(e.pane);return}Za(e.split.first,t),Za(e.split.second,t)}var Qa=()=>Ri.overview(),$a=()=>$i.syncStatus(),eo=()=>bn.recentConnections(),to=()=>Ia.list(),no=e=>Ue.openTerminalSession({kind:`ssh`,alias:e}),ro=new Set([`group_empty`]);function io({loadOverview:e=Qa,loadSync:t=$a,loadRecent:n=eo,loadWorkspaces:r=to,launch:i=no,onNavigate:a,onNavigateLocation:o,onConsoleOpened:s,onOpenWorkspace:c=()=>void 0}){let l=E(),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(!0),[m,g]=(0,L.useState)(null),[_,y]=(0,L.useState)([]),[x,S]=(0,L.useState)([]),[C,w]=(0,L.useState)(``),D=(0,L.useRef)(!1),[O,k]=(0,L.useState)(``);(0,L.useEffect)(()=>{let i=!0;return Promise.allSettled([e(),t(),n(),r()]).then(([e,t,n,r])=>{i&&(e.status===`fulfilled`?d(e.value):k(l(`home.loadFailed`)),t.status===`fulfilled`&&g(t.value),n.status===`fulfilled`&&y(n.value.connections),r.status===`fulfilled`&&S(r.value),p(!1))}),()=>{i=!1}},[e,t,n,r,l]);async function A(e){if(!D.current){D.current=!0,w(e),k(``);try{let t=await i(e);s?.(t.session.id)}catch(e){k(T(e)===`terminal_session_limit`?l(`terminal.limitRefused`):l(`terminal.openFailed`))}finally{D.current=!1,w(``)}}}let ee=u===null?0:u.diagnostics.filter(e=>e.severity===`error`||e.severity===`warning`).length+u.notices.filter(e=>!ro.has(e.code)).length,j=u?.pending?.length??0,M=ee+j;return(0,B.jsxs)(`section`,{"aria-labelledby":`home-heading`,className:`mx-auto flex w-full max-w-6xl flex-col gap-4`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-line pb-3`,children:[(0,B.jsx)(`h2`,{id:`home-heading`,className:`text-xl font-semibold tracking-tight`,children:l(`home.heading`)}),(0,B.jsx)(b,{className:`min-h-10 md:min-h-0`,onClick:()=>a(`Connections`),children:l(`home.manageConnections`)})]}),O===``?null:(0,B.jsx)(v,{tone:`danger`,children:O}),(0,B.jsx)(`section`,{"aria-label":l(`home.quickConnect`),children:f?(0,B.jsx)(di,{tone:`loading`,title:l(`home.loading`)}):u===null?null:(0,B.jsx)(Na,{overview:u,recent:_,launching:C,onConnect:e=>void A(e),onOpenSettings:o})}),M===0?null:(0,B.jsxs)(`section`,{"aria-label":l(`home.attention`),className:`flex flex-wrap items-center gap-x-4 gap-y-2 rounded-lg border border-notice-line bg-notice px-4 py-3`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 text-sm text-notice-ink`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full bg-notice-ink`}),(0,B.jsx)(`p`,{children:l(`home.workspaceAttention`,{count:M})})]}),ee===0?null:(0,B.jsx)(b,{onClick:()=>a(`Config`),children:l(`home.openConfig`)}),j===0?null:(0,B.jsx)(b,{onClick:()=>a(`History`),children:l(`home.recoverChanges`)})]}),x.length===0?null:(0,B.jsxs)(h,{as:`section`,"aria-labelledby":`saved-workspaces-heading`,radius:`sm`,children:[(0,B.jsxs)(`div`,{className:`border-b border-line px-4 py-3 sm:px-5`,children:[(0,B.jsx)(`h3`,{id:`saved-workspaces-heading`,className:`font-semibold`,children:l(`home.savedWorkspaces`)}),(0,B.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-muted`,children:l(`home.savedWorkspacesHint`)})]}),(0,B.jsx)(`ul`,{"aria-label":l(`home.savedWorkspaceList`),className:`divide-y divide-line`,children:x.map(e=>(0,B.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:px-5`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`p`,{className:`truncate text-sm font-semibold text-ink`,children:e.name}),(0,B.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-ink-muted`,children:[l(`home.workspacePanes`,{count:Va(e.layout)}),` · `,(0,B.jsx)(`time`,{dateTime:e.updatedAt,children:l(`home.workspaceUpdated`,{at:Ta(e.updatedAt)})})]})]}),(0,B.jsx)(b,{kind:`primary`,className:`min-h-10 w-full shrink-0 sm:w-auto md:min-h-0`,onClick:()=>c(e.id),children:l(`home.openWorkspace`)})]},e.id))})]}),(0,B.jsxs)(`section`,{"aria-label":l(`home.sync`),className:`flex flex-wrap items-center gap-x-3 gap-y-2 border-t border-line pt-3 text-xs text-ink-muted`,children:[(0,B.jsx)(V,{name:`sync`,className:`size-4 shrink-0`}),(0,B.jsx)(`p`,{className:`min-w-0 flex-1`,children:m===null?l(`home.syncUnavailable`):m.configured?m.synced?l(`home.syncLast`,{at:m.lastSyncedAt===void 0?`—`:Ta(m.lastSyncedAt),count:m.fileCount??0}):l(`home.syncNever`):l(`home.syncNotConfigured`)}),(0,B.jsx)(b,{onClick:()=>a(`Sync`),children:l(`home.openSync`)})]})]})}var ao={system:`shell.themeSystem`,light:`shell.themeLight`,dark:`shell.themeDark`};function oo({groups:e,onNavigate:t}){let{t:n,locale:r,setLocale:i}=O(),{theme:a,setTheme:o}=ut();function s(e,n){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),t(n))}return(0,B.jsxs)(`section`,{"aria-labelledby":`menu-heading`,className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,B.jsx)(`div`,{className:`border-b border-line pb-3`,children:(0,B.jsx)(`h2`,{id:`menu-heading`,className:`text-xl font-semibold tracking-tight text-ink`,children:n(`section.menu`)})}),(0,B.jsxs)(`div`,{className:`grid items-start gap-x-8 gap-y-7 lg:grid-cols-2 xl:grid-cols-3`,children:[e.map(e=>(0,B.jsxs)(`section`,{"aria-labelledby":`menu-${e.label}`,children:[(0,B.jsx)(`h3`,{id:`menu-${e.label}`,className:`px-1 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:n(e.label)}),(0,B.jsx)(`ul`,{className:`mt-2 overflow-hidden rounded border border-line bg-card`,children:e.items.map((e,t)=>{let r=n(e.label);return(0,B.jsx)(`li`,{className:t===0?``:`border-t border-line`,children:(0,B.jsxs)(`a`,{href:e.href,"aria-label":n(`menu.open`,{section:r}),onClick:t=>s(t,e.href),className:`group flex min-h-14 items-center gap-3 px-3 py-2.5 transition-colors hover:bg-hover`,children:[(0,B.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded bg-control text-ink-muted group-hover:text-ink`,children:(0,B.jsx)(V,{name:e.icon,className:`size-4`})}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-ink`,children:r}),(0,B.jsx)(V,{name:`chevronRight`,className:`size-4 shrink-0 text-ink-faint group-hover:text-ink-muted`})]})},e.key)})})]},e.label)),(0,B.jsxs)(`section`,{"aria-labelledby":`menu-display-settings`,children:[(0,B.jsx)(`h3`,{id:`menu-display-settings`,className:`px-1 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:n(`menu.displaySettings`)}),(0,B.jsxs)(`div`,{className:`mt-2 grid gap-4 rounded border border-line bg-card p-4`,children:[(0,B.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-ink-muted`,children:[n(`menu.theme`),(0,B.jsx)(`select`,{"aria-label":n(`menu.theme`),value:a,onChange:e=>o(e.target.value),className:`${j} h-10 w-full text-sm`,children:Ze.map(e=>(0,B.jsx)(`option`,{value:e,children:n(ao[e])},e))})]}),(0,B.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-ink-muted`,children:[n(`menu.language`),(0,B.jsx)(`select`,{"aria-label":n(`menu.language`),value:r,onChange:e=>i(e.target.value),className:`${j} h-10 w-full text-sm`,children:D.map(e=>(0,B.jsx)(`option`,{value:e,children:n(ne[e])},e))})]})]})]}),(0,B.jsxs)(`section`,{"aria-labelledby":`menu-others`,className:`grid gap-x-8 lg:col-span-2 lg:grid-cols-2 xl:col-span-3 xl:grid-cols-3`,children:[(0,B.jsx)(`h3`,{id:`menu-others`,className:`col-span-full px-1 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-faint`,children:n(`menu.others`)}),(0,B.jsx)(`ul`,{className:`mt-2 overflow-hidden rounded border border-line bg-card`,children:(0,B.jsx)(`li`,{children:(0,B.jsxs)(`a`,{href:Nt(`License`),onClick:e=>s(e,Nt(`License`)),"aria-label":n(`menu.open`,{section:n(`section.license`)}),className:`flex min-h-14 items-center gap-3 px-3 py-2.5 hover:bg-hover`,children:[(0,B.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded bg-control text-ink-muted`,children:(0,B.jsx)(V,{name:`inspector`,className:`size-4`})}),(0,B.jsx)(`span`,{className:`flex-1 text-sm font-medium text-ink`,children:n(`section.license`)}),(0,B.jsx)(V,{name:`chevronRight`,className:`size-4 text-ink-faint`})]})})})]})]})]})}var so=`modulepreload`,co=function(e){return`/`+e},W={},G=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=co(t,n),t=s(t),t in W)return;W[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:so,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},lo=(0,L.lazy)(()=>G(()=>import(`./LicensePage-4RM7GLPH.js`).then(e=>({default:e.LicensePage})),__vite__mapDeps([0,1,2]))),uo=(0,L.lazy)(()=>G(async()=>{let{ConnectionsPage:e}=await import(`./ConnectionsPage-CTHBHqx2.js`);return{ConnectionsPage:e}},__vite__mapDeps([3,1,4,2,5,6,7,8,9,10,11,12])).then(({ConnectionsPage:e})=>({default:e}))),fo=(0,L.lazy)(()=>G(async()=>{let{ConfigExplorer:e}=await import(`./ConfigExplorer-D0QKY4pL.js`);return{ConfigExplorer:e}},__vite__mapDeps([13,1,4,2,8,14])).then(({ConfigExplorer:e})=>({default:e}))),po=(0,L.lazy)(()=>G(async()=>{let{GroupsPanel:e}=await import(`./GroupsPanel-Dl838IU6.js`);return{GroupsPanel:e}},__vite__mapDeps([15,1,4,2,7,8,14])).then(({GroupsPanel:e})=>({default:e}))),mo=(0,L.lazy)(()=>G(async()=>{let{HistoryPanel:e}=await import(`./HistoryPanel-D7zkZVvV.js`);return{HistoryPanel:e}},__vite__mapDeps([16,1,4,2,14])).then(({HistoryPanel:e})=>({default:e}))),ho=(0,L.lazy)(()=>G(async()=>{let{KeysScreen:e}=await import(`./KeysScreen-C8IdSb-o.js`);return{KeysScreen:e}},__vite__mapDeps([17,1,4,2,6,10,14,18])).then(({KeysScreen:e})=>({default:e}))),go=(0,L.lazy)(()=>G(async()=>{let{DiagnosticsPanel:e}=await import(`./DiagnosticsPanel-BK7IKd4T.js`);return{DiagnosticsPanel:e}},__vite__mapDeps([19,1,4,2,5,9,14])).then(({DiagnosticsPanel:e})=>({default:e}))),_o=(0,L.lazy)(()=>G(async()=>{let{SecretsPanel:e}=await import(`./SecretsPanel-DgaGrbjT.js`);return{SecretsPanel:e}},__vite__mapDeps([20,1,4,2,6,14])).then(({SecretsPanel:e})=>({default:e}))),vo=(0,L.lazy)(()=>G(async()=>{let{SettingsPanel:e}=await import(`./SettingsPanel-fF4HOX9H.js`);return{SettingsPanel:e}},__vite__mapDeps([21,1,4,2,9,11,12,14])).then(({SettingsPanel:e})=>({default:e}))),yo=(0,L.lazy)(()=>G(async()=>{let{SyncPanel:e}=await import(`./SyncPanel-z52FlWen.js`);return{SyncPanel:e}},__vite__mapDeps([22,1,4,2,9,14])).then(({SyncPanel:e})=>({default:e}))),bo=(0,L.lazy)(()=>G(async()=>{let{KnownHostsPanel:e}=await import(`./KnownHostsPanel-2G8g54MH.js`);return{KnownHostsPanel:e}},__vite__mapDeps([23,1,4,2,14,18])).then(({KnownHostsPanel:e})=>({default:e}))),xo=(0,L.lazy)(()=>G(async()=>{let{RemoteKeyPanel:e}=await import(`./RemoteKeyPanel-D45eirBG.js`);return{RemoteKeyPanel:e}},__vite__mapDeps([24,1,4,2,10,14])).then(({RemoteKeyPanel:e})=>({default:e}))),So=(0,L.lazy)(()=>G(async()=>{let{SFTPWorkspace:e}=await import(`./SFTPWorkspace-jSaRifyW.js`);return{SFTPWorkspace:e}},__vite__mapDeps([25,1,4,2,26,18])).then(({SFTPWorkspace:e})=>({default:e}))),Co=(0,L.lazy)(()=>G(async()=>{let{SnippetsPanel:e}=await import(`./SnippetsPanel-DhbUOOt2.js`);return{SnippetsPanel:e}},__vite__mapDeps([27,1,4,2])).then(({SnippetsPanel:e})=>({default:e}))),wo={Home:`section.home`,Menu:`section.menu`,Connections:`section.connections`,Terminal:`section.terminal`,Files:`section.files`,Snippets:`section.snippets`,Config:`section.config`,Groups:`section.groups`,Keys:`section.keys`,"Known Hosts":`section.knownHosts`,"Remote Keys":`section.remoteKeys`,Diagnostics:`section.diagnostics`,Passwords:`section.passwords`,"Key Passphrases":`section.keyPassphrases`,OTP:`section.otp`,Settings:`section.settings`,Sync:`section.sync`,History:`section.history`,License:`section.license`},To={Home:`home`,Menu:`menu`,Connections:`connections`,Terminal:`terminal`,Files:`config`,Snippets:`terminal`,Config:`config`,Groups:`groups`,Keys:`keys`,"Known Hosts":`knownHosts`,"Remote Keys":`remoteKeys`,Diagnostics:`diagnostics`,Passwords:`secrets`,"Key Passphrases":`keys`,OTP:`secrets`,Settings:`settings`,Sync:`sync`,History:`history`,License:`inspector`},Eo=[`Home`,`Connections`,`Files`],Do=`primary-navigation`,Oo=[{label:`shell.navStart`,sections:Eo},{label:`shell.navConnections`,sections:[`Config`,`Groups`]},{label:`shell.navKeysHosts`,sections:[`Keys`,`Known Hosts`,`Remote Keys`]},{label:`shell.navMaintenance`,sections:[`Diagnostics`,`Snippets`,`Settings`,`Sync`,`History`]}];function ko(e){return e.map(e=>({key:e,label:wo[e],icon:To[e],href:Nt(e)}))}var Ao=[...Oo.slice(1,3).map(e=>({label:e.label,items:ko(e.sections)})),{label:`shell.navVault`,items:ko([`Passwords`,`Key Passphrases`,`OTP`])},{label:`section.settings`,items:Et.map(e=>({key:e,label:Dt[e].label,icon:Dt[e].icon,href:Dt[e].path}))},{label:`shell.navMaintenance`,items:ko([`Diagnostics`,`Snippets`,`Sync`,`History`])}];function jo(e){return e.section===`Terminal`?null:e.section===`Connections`?(0,B.jsx)(uo,{onInspector:e.shell.onInspector,creationDraft:e.handoff.connectionDraft,onCreationDraftChange:e.handoff.onConnectionDraftChange,onNavigateForCreation:e.navigation.onNavigateForCreation,location:e.navigation.location,onNavigateLocation:e.navigation.onNavigateLocation,onNavigationBlockerChange:e.navigation.onNavigationBlockerChange,preferredKey:e.handoff.connectionKey,onPreferredKeyApplied:e.handoff.onConnectionKeyApplied,consoles:e.shell.consoles,onShowConsole:e.shell.onShowConsole}):(0,B.jsx)(`div`,{className:e.section===`Files`?`h-full overflow-hidden p-2 md:px-5 md:pb-5 md:pt-3`:`h-full overflow-y-auto p-4 md:p-5`,children:(0,B.jsx)(Mo,{...e})})}function Mo({section:e,navigation:t,handoff:n,shell:r,declared:i,sftpTarget:a,onSftpTargetHandled:o}){let{fileTarget:s,onNavigate:c,onNavigateLocation:l}=t,{onLock:u,onVaultChanged:d,onInspector:f,consoles:p,onShowConsole:m,onOpenWorkspace:h,onTerminalSettingsChange:g}=r;return e===`Home`?(0,B.jsx)(io,{onNavigate:c,onNavigateLocation:l,onConsoleOpened:m,onOpenWorkspace:h}):e===`License`?(0,B.jsx)(lo,{}):e===`Menu`?(0,B.jsx)(oo,{groups:Ao,onNavigate:l}):e===`Config`?(0,B.jsx)(fo,{target:s}):e===`Files`?(0,B.jsx)(So,{aliases:i.knownAliases,hosts:i.hosts,target:a,onTargetHandled:o,onNavigationBlockerChange:t.onNavigationBlockerChange,onNavigateLocation:l,onOpenTerminal:async(e,t)=>{let n=await p.open({kind:`ssh`,alias:e,cwd:t});n!==null&&m(n.id)}}):e===`Snippets`?(0,B.jsx)(Co,{aliases:i.knownAliases,selectedSnippetId:new URLSearchParams(t.location.search).get(`snippet`)}):e===`Groups`?(0,B.jsx)(po,{onInspector:f}):e===`Passwords`||e===`Key Passphrases`||e===`OTP`?(0,B.jsx)(_o,{kind:e===`Passwords`?`password`:e===`Key Passphrases`?`key_passphrase`:`totp`,onLock:u}):e===`Settings`?(0,B.jsx)(vo,{page:kt(t.location.pathname)??`Engine`,consoles:p,onTerminalSettingsChange:g,onVaultChanged:d}):e===`Sync`?(0,B.jsx)(yo,{}):e===`History`?(0,B.jsx)(mo,{}):e===`Keys`?(0,B.jsx)(ho,{onInspector:f,groups:i.groups,onAssignGeneratedKey:n.onAssignGeneratedKey,onInstallGeneratedKey:n.onInstallGeneratedKey}):e===`Known Hosts`?(0,B.jsx)(bo,{}):e===`Remote Keys`?(0,B.jsx)(xo,{hosts:i.knownAliases,preferredPublicKeyPath:n.publicKey?.publicRelativePath??null,onPreferredPublicKeyHandled:n.onPublicKeyHandled}):e===`Diagnostics`?(0,B.jsx)(go,{hosts:i.knownAliases}):(0,B.jsx)(`section`,{"aria-labelledby":`section-heading`,className:`flex flex-col gap-4`,children:(0,B.jsx)(`h2`,{id:`section-heading`,className:`font-medium`,children:e})})}function No(e){let t=u(e);return{snippetId:p(t.snippetId),evidence:p(t.evidence),reviewEvidence:p(t.reviewEvidence),actionToken:p(t.actionToken),actionExpiresAt:p(t.actionExpiresAt),targets:g(t.targets).map(e=>{let t=u(e);return{targetId:p(t.targetId),sessionId:p(t.sessionId),alias:p(t.alias),title:p(t.title),command:p(t.command)}})}}function Po(e){return{results:g(u(e).results).map(e=>{let t=u(e),n=p(t.status);if(n!==`delivered`&&n!==`failed`)throw Error(`invalid_response`);return{targetId:p(t.targetId),sessionId:p(t.sessionId),alias:p(t.alias),title:p(t.title),status:n,...t.problem===void 0?{}:{problem:p(t.problem)}}})}}var Fo={async preview(e){return No(await m(`/api/v1/terminal/commands/preview`,e))},async dispatch(e,t,n=!0){return Po(await m(`/api/v1/terminal/commands`,{...t,submit:n,evidence:e.evidence},e.actionToken))}};function Io({paneTargets:e,onClose:t}){let n=E(),[r,i]=(0,L.useState)(`command`),[a,o]=(0,L.useState)(``),[s,l]=(0,L.useState)([]),[u,d]=(0,L.useState)(``),[f,p]=(0,L.useState)({}),[m,h]=(0,L.useState)(null),[g,_]=(0,L.useState)(null),[y,x]=(0,L.useState)(``),[S,C]=(0,L.useState)(!1),w=(0,L.useRef)(0),D=(0,L.useRef)(null),O=(0,L.useMemo)(()=>s.find(e=>e.id===u)??null,[u,s]),k=(0,L.useMemo)(()=>e.filter(e=>e.connected&&e.sessionId!==void 0),[e]),A=e.map(e=>`${e.targetId}\u0000${e.sessionId??``}\u0000${e.alias}\u0000${e.title}\u0000${e.connected}\u0000${e.state}`).join(``);(0,L.useEffect)(()=>{li.library().then(e=>{l(e.snippets),d(t=>t||e.snippets[0]?.id||``)}).catch(e=>x(T(e)||`snippet_failed`))},[]),(0,L.useEffect)(()=>{w.current+=1,h(null),_(null),C(!1)},[A]);function ee(){w.current+=1,h(null),_(null),x(``),C(!1)}function j(){let e=k.map(({targetId:e,sessionId:t})=>({targetId:e,sessionId:t}));return e.length===0?null:r===`command`?a.trim()===``?null:{command:a,targets:e,inputs:{}}:u===``?null:{snippetId:u,targets:e,inputs:f}}async function M(){let e=j();if(e===null)return;let t=++w.current;C(!0),x(``),_(null);try{let n=await Fo.preview(e);w.current===t&&h({request:e,preview:n})}catch(e){w.current===t&&x(T(e)||`terminal_command_failed`)}finally{w.current===t&&C(!1)}}async function N(){if(m===null)return;let e=++w.current;C(!0),x(``);try{let t=await Fo.dispatch(m.preview,m.request);w.current===e&&(_(t),h(null))}catch(t){w.current===e&&x(T(t)||`terminal_command_failed`)}finally{w.current===e&&C(!1)}}function P(t){let r=e.find(e=>e.targetId===t.targetId),i=r===void 0?``:` · ${n(`workspace.paneNumber`,{number:r.paneNumber})}`;return`${t.alias} · ${t.title}${i}`}return(0,B.jsx)(sn,{labelledBy:`workspace-command-heading`,onDismiss:t,closeOnOutside:!0,initialFocusRef:D,panelClassName:`max-h-[90vh] w-full max-w-5xl overflow-auto rounded-lg p-4`,children:(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsxs)(`div`,{className:`grow`,children:[(0,B.jsx)(`h2`,{id:`workspace-command-heading`,className:`text-base font-semibold`,children:n(`workspace.broadcastHeading`)}),(0,B.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:n(`workspace.broadcastDescription`)})]}),(0,B.jsx)(`button`,{ref:D,type:`button`,onClick:t,"aria-label":n(`workspace.commandClose`),className:`flex size-8 shrink-0 items-center justify-center rounded text-lg text-ink-muted hover:bg-select-fill`,children:`×`})]}),y===``?null:(0,B.jsx)(v,{tone:`danger`,compact:!0,children:y}),(0,B.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[minmax(18rem,0.9fr)_minmax(20rem,1.1fr)]`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,B.jsx)(c,{label:n(`workspace.commandSource`),value:r,options:[{value:`command`,label:n(`workspace.adHocCommand`)},{value:`snippet`,label:n(`workspace.savedSnippet`)}],onChange:e=>{i(e),p({}),ee()}}),r===`command`?(0,B.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[n(`workspace.command`),(0,B.jsx)(`textarea`,{rows:3,value:a,onChange:e=>{o(e.target.value),ee()},placeholder:`uname -a`,className:`mt-1 block w-full rounded border border-control-line bg-control p-2 font-mono text-sm text-ink`})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`label`,{className:`text-xs text-ink-muted`,children:[n(`workspace.savedSnippet`),(0,B.jsxs)(`select`,{value:u,onChange:e=>{d(e.target.value),p({}),ee()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[(0,B.jsx)(`option`,{value:``,children:n(`workspace.chooseSnippet`)}),s.map(e=>(0,B.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),O===null?null:(0,B.jsx)(`code`,{className:`whitespace-pre-wrap rounded bg-code-bg p-2 text-xs text-code-fg`,children:O.command}),O?.variables.map(e=>(0,B.jsxs)(`div`,{className:`text-xs text-ink-muted`,children:[(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`code`,{children:`{{${e.name}}}`}),e.description?` · ${e.description}`:``]}),e.type===`boolean`?(0,B.jsxs)(`select`,{"aria-label":e.name,value:f[e.name]??``,onChange:t=>{let n=t.target.value;p(t=>n===``?Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.name)):{...t,[e.name]:n}),ee()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`,children:[(0,B.jsx)(`option`,{value:``,children:e.default===void 0?``:`${n(`workspace.useDefault`)} (${e.default})`}),(0,B.jsx)(`option`,{value:`true`,children:`true`}),(0,B.jsx)(`option`,{value:`false`,children:`false`})]}):e.type===`secret`?(0,B.jsx)(dt,{label:e.name,value:f[e.name]??``,placeholder:e.default===void 0?``:`${n(`workspace.useDefault`)}: ${e.default}`,onChange:t=>{p(n=>({...n,[e.name]:t})),ee()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`}):(0,B.jsx)(`input`,{"aria-label":e.name,type:e.type===`integer`?`number`:`text`,value:f[e.name]??``,placeholder:e.default===void 0?``:`${n(`workspace.useDefault`)}: ${e.default}`,onChange:t=>{p(n=>({...n,[e.name]:t.target.value})),ee()},className:`mt-1 block w-full rounded border border-control-line bg-control px-2 py-1.5 text-sm`})]},e.name))]})]}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsx)(`span`,{className:`text-xs font-medium`,children:n(`workspace.targetMode`)}),(0,B.jsx)(`span`,{className:`text-xs text-ink-muted`,children:n(`workspace.targetCount`,{count:k.length})})]}),(0,B.jsx)(`div`,{className:`grid max-h-36 grid-cols-1 gap-1 overflow-auto sm:grid-cols-2`,children:e.map(e=>(0,B.jsxs)(`div`,{className:`rounded border border-line px-2 py-1 text-xs ${e.connected?``:`opacity-60`}`,children:[(0,B.jsx)(`span`,{className:`font-medium`,children:e.alias}),(0,B.jsxs)(`span`,{className:`ml-2 text-ink-muted`,children:[e.title,` ·`,` `,n(`workspace.paneNumber`,{number:e.paneNumber})]}),e.connected?null:(0,B.jsx)(`span`,{className:`ml-2 text-notice-ink`,children:n(`workspace.targetSkipped`,{state:e.state})})]},e.targetId))}),(0,B.jsx)(`p`,{className:`text-xs leading-5 text-ink-muted`,children:n(`workspace.executionNotice`)}),(0,B.jsx)(b,{className:`self-start`,disabled:S||j()===null,onClick:()=>void M(),children:n(`snippets.preview`)})]})]}),m===null?null:(0,B.jsxs)(`section`,{className:`rounded-lg border border-notice-line bg-notice p-3`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-medium`,children:n(`workspace.previewHeading`)}),(0,B.jsx)(`div`,{className:`mt-2 grid max-h-48 gap-2 overflow-auto md:grid-cols-2`,children:m.preview.targets.map(e=>(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`p`,{className:`truncate text-xs font-medium`,children:P(e)}),(0,B.jsx)(`pre`,{className:`mt-1 overflow-auto rounded bg-code-bg p-2 text-xs text-code-fg`,children:e.command})]},e.targetId))}),(0,B.jsx)(b,{kind:`primary`,className:`mt-3`,disabled:S,onClick:()=>void N(),children:n(`workspace.sendTargets`,{count:m.preview.targets.length})})]}),g===null?null:(0,B.jsxs)(`section`,{className:`rounded-lg border border-line bg-card p-3`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-medium`,children:n(`workspace.deliveryResults`)}),(0,B.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:n(`workspace.deliveryNotice`)}),(0,B.jsx)(`div`,{className:`mt-2 grid max-h-56 gap-2 overflow-auto md:grid-cols-2`,children:g.results.map(e=>(0,B.jsxs)(`div`,{className:`min-w-0 rounded border border-line p-2`,children:[(0,B.jsxs)(`p`,{className:`text-xs font-medium`,children:[P(e),` ·`,` `,n(e.status===`delivered`?`workspace.delivered`:`workspace.deliveryFailed`)]}),e.problem?(0,B.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:e.problem}):null]},e.targetId))})]})]})})}var Lo=`sshc.terminal.live-workspace.v1`;function Ro(){try{return window.sessionStorage}catch{return null}}function zo(e,t,n,r=``){if(e!==null)try{let i=t===null?null:Vo(t.root);if(t===null||i===null||U(t.root).length<2){e.removeItem(Lo);return}let a={version:1,root:i,focusedPaneId:t.focusedPaneId,focusModePaneId:n,...Uo(r)&&r.trim()!==``?{name:r.trim()}:{}};e.setItem(Lo,JSON.stringify(a))}catch{}}function Bo(e,t){if(e===null)return null;try{let n=e.getItem(Lo);if(n===null||n.length>32768)return Xo(e);let r=Ho(JSON.parse(n));if(r===null)return Xo(e);let i=Go(r.root,t);if(i===null||qo(i)<2)return Xo(e);let a=new Set(Ko(i));return{root:i,focusedPaneId:a.has(r.focusedPaneId)?r.focusedPaneId:Ko(i)[0]??``,focusModePaneId:r.focusModePaneId!==null&&a.has(r.focusModePaneId)?r.focusModePaneId:null,name:r.name?.trim()??``}}catch{return Xo(e)}}function Vo(e){if(e.pane!==void 0)return e.pane.sessionId===void 0?null:{pane:{id:e.pane.id,sessionId:e.pane.sessionId}};let t=Vo(e.split.first),n=Vo(e.split.second);return t===null||n===null?null:{split:{direction:e.split.direction,ratio:e.split.ratio,first:t,second:n}}}function Ho(e){if(!Yo(e)||e.version!==1||!Jo(e.focusedPaneId)||e.focusModePaneId!==null&&!Jo(e.focusModePaneId)||e.name!==void 0&&!Uo(e.name))return null;let t=new Set,n=new Set,r=Wo(e.root,0,t,n);return r===null||t.size<2||t.size>4?null:{version:1,root:r,focusedPaneId:e.focusedPaneId,focusModePaneId:e.focusModePaneId,...e.name===void 0?{}:{name:e.name.trim()}}}function Uo(e){return typeof e==`string`&&e.length<=256&&!/[\u0000-\u001f\u007f]/u.test(e)}function Wo(e,t,n,r){if(!Yo(e)||t>=4)return null;if(Yo(e.pane)){let t=e.pane.id,i=e.pane.sessionId;return!Jo(t)||!Jo(i)||n.has(t)||r.has(i)?null:(n.add(t),r.add(i),{pane:{id:t,sessionId:i}})}if(!Yo(e.split))return null;let i=e.split.direction,a=e.split.ratio;if(i!==`horizontal`&&i!==`vertical`||typeof a!=`number`||!Number.isFinite(a)||a<10||a>90)return null;let o=Wo(e.split.first,t+1,n,r),s=Wo(e.split.second,t+1,n,r);return o===null||s===null?null:{split:{direction:i,ratio:a,first:o,second:s}}}function Go(e,t){if(e.pane!==void 0)return t.has(e.pane.sessionId)?e:null;let n=Go(e.split.first,t),r=Go(e.split.second,t);return n===null?r:r===null?n:{split:{...e.split,first:n,second:r}}}function Ko(e){return e.pane===void 0?[...Ko(e.split.first),...Ko(e.split.second)]:[e.pane.id]}function qo(e){return e.pane===void 0?qo(e.split.first)+qo(e.split.second):1}function Jo(e){return typeof e==`string`&&e.length>0&&e.length<=256&&!/[\u0000-\u001f\u007f]/u.test(e)}function Yo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Xo(e){try{e.removeItem(Lo)}catch{}return null}function Zo({id:e,heading:t,description:n,label:r,initialValue:i=``,submitLabel:a,cancelLabel:o,validate:s,onSubmit:c,onCancel:l,inputMode:u,returnFocusRef:d}){let[f,p]=(0,L.useState)(i),[m,h]=(0,L.useState)(!1),g=(0,L.useRef)(null),_=f.trim(),v=(0,L.useMemo)(()=>s?.(_)??``,[_,s]),y=`${e}-error`,x=`${e}-input`,S=n===void 0?void 0:`${e}-description`;function C(){h(!0),v===``&&c(_)}return(0,B.jsxs)(sn,{labelledBy:e,...S===void 0?{}:{describedBy:S},onDismiss:l,initialFocusRef:g,...d===void 0?{}:{returnFocusRef:d},panelClassName:`flex w-full max-w-md flex-col gap-4 rounded-lg p-4 sm:p-5`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h2`,{id:e,className:`text-base font-semibold text-ink`,children:t}),n===void 0?null:(0,B.jsx)(`div`,{id:S,className:`mt-1 ${M}`,children:n})]}),(0,B.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),C()},children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`label`,{htmlFor:x,className:`text-xs font-medium tracking-wide text-ink-muted`,children:r}),(0,B.jsx)(`input`,{id:x,ref:g,value:f,inputMode:u,"aria-invalid":m&&v!==``,"aria-describedby":m&&v!==``?y:void 0,onChange:e=>p(e.target.value),className:A}),m&&v!==``?(0,B.jsx)(`span`,{id:y,role:`alert`,className:`text-xs text-danger`,children:v}):null]}),(0,B.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,B.jsx)(b,{onClick:l,children:o}),(0,B.jsx)(b,{kind:`primary`,type:`submit`,children:a})]})]})]})}var Qo=5;function $o(e){return Number.isFinite(e)?Math.min(90,Math.max(10,Math.round(e))):50}function es({direction:e,ratio:t,label:n,onRatioChange:r}){let i=e===`horizontal`;function a(e){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.parentElement;if(t===null)return;e.currentTarget.setPointerCapture(e.pointerId);let n=e=>{let n=t.getBoundingClientRect(),a=i?n.width:n.height;a<=0||r($o((i?e.clientX-n.left:e.clientY-n.top)/a*100))},a=()=>{window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a)};window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,a,{once:!0}),window.addEventListener(`pointercancel`,a,{once:!0})}function o(e){let n=e.key===(i?`ArrowLeft`:`ArrowUp`),a=e.key===(i?`ArrowRight`:`ArrowDown`);!n&&!a||(e.preventDefault(),r($o(t+(n?-5:Qo))))}return(0,B.jsx)(`div`,{role:`separator`,tabIndex:0,"aria-label":n,"aria-orientation":i?`vertical`:`horizontal`,"aria-valuemin":10,"aria-valuemax":90,"aria-valuenow":t,onPointerDown:a,onKeyDown:o,className:`shrink-0 touch-none bg-line transition-colors hover:bg-accent focus:bg-accent focus:outline-none ${i?`w-1 cursor-col-resize`:`h-1 cursor-row-resize`}`})}function ts(){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function ns(e,t){if(e.pane!==void 0){t(e.pane);return}ns(e.split.first,t),ns(e.split.second,t)}function rs(e,t=ts()){return{id:t,alias:vn(e),...e.kind===`shell`?{kind:`shell`}:{},state:e.state===`connected`?`connected`:e.state===`exited`?`failed`:`connecting`,sessionId:e.id,...e.problem===``?{}:{problem:e.problem}}}function is(e,t=ts()){let n=rs(e,t);return za(La({pane:{id:n.id,alias:n.alias,...n.kind===void 0?{}:{kind:n.kind}}},t),{type:`connection-started`,paneId:t,sessionId:e.id})}function as(e,t){return e.pane===void 0?as(e.split.first,t)??as(e.split.second,t):e.pane.id===t?e.pane:null}function os(e,t){return e.pane===void 0?os(e.split.first,t)??os(e.split.second,t):e.pane.sessionId===t?e.pane:null}function ss(e,t){if(e.pane!==void 0){let n=t.get(e.pane.sessionId);return n===void 0?null:{pane:rs(n,e.pane.id)}}let n=ss(e.split.first,t),r=ss(e.split.second,t);return n===null?r:r===null?n:{split:{...e.split,first:n,second:r}}}function cs(e){let t=[];ns(Ra(e).layout,e=>t.push(e.alias));let n=[...new Set(t)];return n.slice(0,2).join(` + `)+(n.length>2?` +${n.length-2}`:``)}function ls(e,t,n){return e===null?t===null?[]:[{targetId:t.id,sessionId:t.id,alias:vn(t),title:t.title,paneNumber:1,connected:t.state===`connected`,state:t.state}]:U(e.root).map((t,r)=>{let i=as(e.root,t);if(i===null)throw Error(`workspace pane disappeared`);let a=i.sessionId===void 0?void 0:n.get(i.sessionId),o=a?.state===`connected`;return{targetId:i.id,...a===void 0?{}:{sessionId:a.id},alias:i.alias,title:a?.title??i.alias,paneNumber:r+1,connected:o,state:a?.state??i.state}})}function us(e){let t=e.currentTarget.getBoundingClientRect(),n=[[`left`,Math.max(0,e.clientX-t.left)/Math.max(1,t.width)],[`right`,Math.max(0,t.right-e.clientX)/Math.max(1,t.width)],[`top`,Math.max(0,e.clientY-t.top)/Math.max(1,t.height)],[`bottom`,Math.max(0,t.bottom-e.clientY)/Math.max(1,t.height)]];return n.sort((e,t)=>e[1]-t[1]),n[0]?.[0]??`right`}function ds(e){switch(e){case`left`:return`inset-y-0 left-0 w-1/2`;case`right`:return`inset-y-0 right-0 w-1/2`;case`top`:return`inset-x-0 top-0 h-1/2`;case`bottom`:return`inset-x-0 bottom-0 h-1/2`}}function fs({edge:e}){let t=E()(e===`left`?`workspace.dock.left`:e===`right`?`workspace.dock.right`:e===`top`?`workspace.dock.top`:`workspace.dock.bottom`);return(0,B.jsx)(`div`,{"data-dock-preview":e,className:`pointer-events-none absolute z-10 grid place-items-center border-2 border-accent bg-accent/20 ${ds(e)}`,children:(0,B.jsx)(`span`,{className:`rounded bg-toolbar px-3 py-2 text-xs font-medium shadow`,children:t})})}function ps(){let e=E();return(0,B.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,B.jsxs)(`section`,{className:`w-full max-w-md border-y border-line bg-surface-subtle p-6 text-center`,role:`status`,children:[(0,B.jsx)(qn,{className:`mx-auto size-10`}),(0,B.jsx)(`h2`,{className:`mt-4 text-lg font-semibold tracking-tight text-ink`,children:e(`terminal.emptyHeading`)}),(0,B.jsx)(`p`,{className:`mx-auto mt-2 max-w-sm text-sm leading-6 text-ink-muted`,children:e(`terminal.emptyHint`)}),(0,B.jsxs)(`div`,{"aria-hidden":`true`,className:`mx-auto mt-4 max-w-xs rounded bg-term-bg px-4 py-3 text-left font-mono text-xs text-ink`,children:[(0,B.jsx)(`span`,{className:`text-live`,children:`$`}),` sshc host`,(0,B.jsx)(`span`,{className:`ml-1 inline-block h-3 w-1.5 translate-y-0.5 bg-ink`})]})]})})}function ms({displayName:e,paneCount:t,canBroadcast:n,onBroadcast:r,inFocusMode:i,onExitFocusMode:a,saved:o,selected:s,onSelect:c,canSave:l,onSave:u,onReopen:d,onDelete:f}){let p=E(),[m,h]=(0,L.useState)(!1),g=(0,L.useRef)(null);return an({open:m,containerRefs:[g],onDismiss:()=>h(!1)}),(0,B.jsxs)(`div`,{"data-desktop-workspace-controls":!0,className:`hidden h-8 shrink-0 items-center gap-2 border-b border-line bg-toolbar px-2 md:flex`,children:[t>0?(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,B.jsx)(`span`,{className:`max-w-52 truncate text-[11px] font-semibold text-ink`,children:e}),(0,B.jsx)(`span`,{className:`whitespace-nowrap text-[11px] text-ink-faint`,children:p(`workspace.groupCount`,{count:String(t)})})]}):null,(0,B.jsxs)(`div`,{ref:g,className:`group relative ml-auto`,children:[(0,B.jsx)(`button`,{type:`button`,"aria-label":p(`workspace.actions`),"aria-expanded":m,title:p(`workspace.actions`),onClick:()=>h(e=>!e),className:`flex size-6 items-center justify-center rounded text-ink-muted hover:bg-select-fill hover:text-ink`,children:(0,B.jsx)(V,{name:`moreHorizontal`,className:`size-3.5`})}),m?(0,B.jsxs)(`div`,{className:`absolute right-0 top-[calc(100%+0.35rem)] z-30 w-80 rounded border border-control-line bg-card p-3 shadow-xl`,children:[(0,B.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2 border-b border-hairline pb-3`,children:[(0,B.jsx)(b,{disabled:!n,onClick:()=>{h(!1),r()},children:p(`workspace.broadcastCommand`)}),i?(0,B.jsx)(b,{onClick:()=>{h(!1),a()},children:p(`workspace.exitFocusMode`)}):null]}),(0,B.jsx)(`h2`,{className:`text-sm font-semibold text-ink`,children:p(`workspace.savedLayouts`)}),(0,B.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-ink-muted`,children:p(`workspace.savedDescription`,{count:4})}),(0,B.jsxs)(`select`,{"aria-label":p(`workspace.saved`),value:s,onChange:e=>c(e.target.value),className:`mt-3 w-full rounded border border-control-line bg-control px-2 py-1.5 text-xs`,children:[(0,B.jsx)(`option`,{value:``,children:p(`workspace.new`)}),o.map(e=>(0,B.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,B.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,B.jsx)(b,{disabled:!l,onClick:u,children:p(`workspace.save`)}),(0,B.jsx)(b,{disabled:s===``,onClick:()=>d(s),children:p(`workspace.reopen`)}),(0,B.jsx)(`button`,{disabled:s===``,className:`px-2 text-xs text-danger disabled:opacity-40`,onClick:()=>f(s),children:p(`workspace.delete`)})]})]}):null]})]})}function hs({restoreRequest:e,onRestoreConsumed:t,onOpenAlias:n,onOpenShell:r,onClose:i,onActive:a,onBegin:o,setLayout:s,report:c}){let l=(0,L.useRef)(0),u=(0,L.useRef)(0),d=(0,L.useRef)(null),f=(0,L.useRef)(i);(0,L.useEffect)(()=>{f.current=i},[i]);let p=(0,L.useCallback)((e,t)=>(e.openedSessionIDs.delete(t)&&(e.cleanup=e.cleanup.then(()=>f.current(t)).catch(()=>void 0)),e.cleanup),[]),m=(0,L.useCallback)(e=>{for(let t of[...e.openedSessionIDs])p(e,t);return e.cleanup},[p]);(0,L.useEffect)(()=>()=>{u.current+=1;let e=d.current;d.current=null,e!==null&&m(e)},[m]);let h=(0,L.useCallback)(async e=>{if(e===``)return;let t=u.current+1;u.current=t;let i=d.current,l={generation:t,openedSessionIDs:new Set,cleanup:Promise.resolve()};d.current=l,i!==null&&m(i);let f=()=>l.generation===u.current,h=e=>{d.current===l&&(d.current=null),l.openedSessionIDs.clear(),c(e)};try{let t=await Ia.restore(e);if(!f())return;o(e);let i=La(t.layout,t.focusedPaneId),c=[];if(ns(t.layout,e=>{c.push(e),i=za(i,{type:`connection-starting`,paneId:e.id})}),s(i),await Promise.all(c.map(async e=>{let i=e.kind===`shell`?await r():await n(e.alias);if(i===null){if(!f())return;s(t=>t===null?t:za(t,{type:`connection-failed`,paneId:e.id,problem:`open_failed`}));return}if(l.openedSessionIDs.add(i.id),!f()){await p(l,i.id);return}s(t=>t===null?t:za(t,{type:`connection-started`,paneId:e.id,sessionId:i.id})),e.id===t.focusedPaneId&&a(i.id)})),!f()){await m(l);return}h(``)}catch(e){if(!f()){await m(l);return}h(T(e)||`workspace_failed`)}},[a,o,n,r,c,m,p,s]);return(0,L.useEffect)(()=>{e===null||e.sequence<=l.current||(l.current=e.sequence,t(e.sequence),h(e.id))},[t,e,h]),h}function gs({sessions:e,activeSessionId:t,onActive:n,onOpenAlias:r,onOpenShell:i,onClose:a,renderTerminal:o,restoreRequest:s=null,onRestoreConsumed:c=()=>void 0,renameRequest:l=null,onRenameConsumed:u=()=>void 0,onLiveWorkspaceChange:d=()=>void 0,sessionsLoaded:f=!0}){let p=E(),[m,h]=(0,L.useState)(null),[g,_]=(0,L.useState)([]),[y,b]=(0,L.useState)(``),[x,S]=(0,L.useState)(!1),[C,w]=(0,L.useState)(null),[D,O]=(0,L.useState)(null),[k,A]=(0,L.useState)(null),ee=wi(`(max-width: 767px)`),[j,M]=(0,L.useState)(``),[N,P]=(0,L.useState)(!1),[te,ne]=(0,L.useState)(``),[re,ie]=(0,L.useState)(!1),[ae,F]=(0,L.useState)(null),oe=(0,L.useRef)(0),I=(0,L.useRef)(ts()),se=(0,L.useMemo)(()=>Ro(),[]),ce=hs({restoreRequest:s,onRestoreConsumed:c,onOpenAlias:r,onOpenShell:i,onClose:a,onActive:n,onBegin:(0,L.useCallback)(e=>{b(e),ne(``),w(null)},[]),setLayout:h,report:M}),R=e.find(e=>e.id===t)??null,le=(0,L.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),ue=(0,L.useMemo)(()=>m===null?[]:Ba(m.root),[m]),de=m!==null&&(t===null||ue.includes(t)),z=de?m:null,fe=(0,L.useMemo)(()=>ls(z,R,le),[R,le,z]),pe=fe.filter(e=>e.connected).length,me=z===null?R===null?0:1:U(z.root).length,he=(0,L.useMemo)(()=>{if(z===null)return R?.title??p(`workspace.live`);let e=te.trim();if(e!==``)return e;let t=g.find(e=>e.id===y)?.name.trim()??``;return t===``?cs(z)||p(`workspace.live`):t},[R?.title,te,g,y,p,z]);(0,L.useEffect)(()=>{Ia.list().then(_).catch(()=>void 0)},[]),(0,L.useEffect)(()=>(document.title=R===null?`sshc`:`${R.presentation?.displayTitle??R.title} · sshc`,()=>{document.title=`sshc`}),[R]),(0,L.useEffect)(()=>{if(!f||N)return;if(s!==null){P(!0);return}let e=Bo(se,new Set(le.keys()));if(e!==null){let t=ss(e.root,le);if(t!==null&&U(t).length>1){let r=U(t).includes(e.focusedPaneId)?e.focusedPaneId:U(t)[0]??``;h({root:t,focusedPaneId:r}),w(e.focusModePaneId),ne(e.name);let i=as(t,r)?.sessionId;i!==void 0&&n(i)}}P(!0)},[N,se,n,s,le,f]),(0,L.useEffect)(()=>{!f||!N||zo(se,m,C,te)},[C,m,N,se,te,f]),(0,L.useEffect)(()=>{m===null&&N&&ne(``)},[m,N]),(0,L.useEffect)(()=>{D!==null&&(m===null||!U(m.root).includes(D))&&O(null)},[m,D]),(0,L.useEffect)(()=>{C!==null&&(m===null||!U(m.root).includes(C))&&w(null)},[C,m]),(0,L.useEffect)(()=>{if(m===null){d(null);return}let e=Ba(m.root);if(e.length<2){d(null);return}let t=g.find(e=>e.id===y)?.name.trim()??``,n=cs(m),r=as(m.root,m.focusedPaneId)?.sessionId??e[0]??``;d({id:I.current,name:te.trim()||t||n||p(`workspace.live`),memberSessionIds:e,focusedSessionId:r})},[m,te,d,g,y,p]),(0,L.useEffect)(()=>{if(m===null)return;let t=window.setTimeout(()=>{let t=new Set(e.map(e=>e.id));h(e=>{if(e===null)return null;let n=e;for(let r of U(e.root)){let e=as(n.root,r);e?.sessionId!==void 0&&!t.has(e.sessionId)&&(n=za(n,{type:`close`,paneId:r}))}return U(n.root).length<2?null:n})},500);return()=>window.clearTimeout(t)},[m,e]),(0,L.useEffect)(()=>{let e=e=>{e.key===`Escape`&&w(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,L.useEffect)(()=>{if(m===null||t===null||!ue.includes(t))return;let e=os(m.root,t);e!==null&&e.id!==m.focusedPaneId&&h(t=>t===null?t:za(t,{type:`focus`,paneId:e.id}))},[t,m,ue]);function ge(e){h(t=>t===null?t:za(t,e))}function _e(e,t){e!==t&&ge({type:`swap-panes`,sourcePaneId:e,targetPaneId:t}),O(null)}function ve(e){if(D===null){O(e);return}_e(D,e)}function ye(e,t){e.stopPropagation(),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t);let n=m===null?void 0:as(m.root,t)?.sessionId;n!==void 0&&e.dataTransfer.setData(hn,n),O(t)}function be(e,t,r,i){let a=le.get(e);if(a===void 0)return;if(i!==void 0){if(i.id===a.id)return;if(m!==null){M(p(`workspace.oneLiveOnly`));return}let e=ts(),t=za(is(i,e),{type:`dock-pane`,targetPaneId:e,edge:r,pane:rs(a)});b(``),ne(``),h(t),M(``),n(a.id);return}if(m===null||!de)return;let o=os(m.root,a.id);if(o===null&&U(m.root).length>=4){M(p(`workspace.maxPanes`,{count:4}));return}let s=o??rs(a);h(e=>e===null?e:za(e,{type:`dock-pane`,targetPaneId:t,edge:r,pane:s})),M(``),n(a.id)}function xe(e,t){(e.dataTransfer.types?.includes(`application/x-sshc-console`)===!0||D!==null)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,A({paneId:t,edge:us(e)}))}function Se(e,t){e.preventDefault(),e.stopPropagation();let n=e.dataTransfer.getData(`application/x-sshc-console`)||(D===null||m===null?``:as(m.root,D)?.sessionId??``),r=k?.paneId===t?k.edge:us(e);n!==``&&be(n,t,r),O(null),A(null)}function Ce(e,t){e.preventDefault(),e.stopPropagation();let n=e.dataTransfer.getData(hn);n!==``&&be(n,t.id,us(e),t),A(null)}function we(e){if(m!==null){if(U(m.root).length<=2){h(null),w(null),b(``),ne(``);return}ge({type:`close`,paneId:e})}}async function Te(e){let t=z??(R===null?null:is(R));if(t!==null)try{let n=Ra(t),r=y===``?await Ia.create({name:e,...n}):await Ia.update(y,{name:e,...n});b(r.id),ne(r.name),_(await Ia.list()),M(``)}catch(e){M(T(e)||`workspace_failed`)}}async function Ee(e){try{await Ia.remove(e),b(``),_(await Ia.list()),M(``)}catch(e){M(T(e)||`workspace_failed`)}}(0,L.useEffect)(()=>{if(l===null||l.sequence<=oe.current)return;oe.current=l.sequence,u(l.sequence);let e=l.name.trim();m!==null&&e!==``&&ne(e)},[m,u,l]);function De(e){return o(e)}function Oe(e){let t=k?.paneId===e.id;return(0,B.jsxs)(`div`,{"data-single-terminal-drop-target":e.id,className:`relative flex h-full min-h-0 flex-col ${t?`ring-2 ring-inset ring-live`:``}`,onDragEnter:t=>{t.dataTransfer.types?.includes(`application/x-sshc-console`)===!0&&(t.preventDefault(),A({paneId:e.id,edge:us(t)}))},onDragOver:t=>{t.dataTransfer.types?.includes(`application/x-sshc-console`)===!0&&(t.preventDefault(),t.dataTransfer.dropEffect=`move`,A({paneId:e.id,edge:us(t)}))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||A(null)},onDrop:t=>Ce(t,e),children:[De(e),t?(0,B.jsx)(fs,{edge:k.edge}):null]})}function ke(e,t=[]){if(e.pane!==void 0){let t=e.pane.sessionId===void 0?void 0:le.get(e.pane.sessionId),r=e.pane.kind===`shell`?t?.title??e.pane.alias:e.pane.alias,i=m!==null&&U(m.root).length>1,a=D===e.pane.id,o=k?.paneId===e.pane.id&&!a;return(0,B.jsxs)(`div`,{"data-workspace-pane":e.pane.id,"data-pane-alias":e.pane.alias,className:`relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border ${m?.focusedPaneId===e.pane.id?`border-accent`:`border-line`} ${a?`ring-2 ring-accent`:o?`ring-2 ring-live`:``}`,onPointerDown:()=>{ge({type:`focus`,paneId:e.pane.id}),t!==void 0&&n(t.id)},onDragEnter:t=>xe(t,e.pane.id),onDragOver:t=>xe(t,e.pane.id),onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||A(t=>t?.paneId===e.pane.id?null:t)},onDrop:t=>Se(t,e.pane.id),children:[i&&!ee?(0,B.jsxs)(`div`,{"data-pane-toolbar":!0,className:`flex h-7 shrink-0 items-center gap-1 border-b border-line bg-toolbar px-1`,children:[(0,B.jsx)(`button`,{type:`button`,draggable:!0,"aria-pressed":a,"aria-label":p(a?`workspace.movePanePicked`:`workspace.movePane`,{alias:r}),title:p(`workspace.movePane`,{alias:r}),className:`flex size-6 shrink-0 cursor-grab items-center justify-center rounded text-xs text-ink-muted hover:bg-select-fill active:cursor-grabbing`,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),ve(e.pane.id)},onDragStart:t=>ye(t,e.pane.id),onDragEnd:()=>O(null),onKeyDown:e=>{e.key===`Escape`&&O(null)},children:(0,B.jsx)(V,{name:`movePane`,className:`size-3.5`})}),(0,B.jsx)(`span`,{className:`min-w-0 grow truncate text-xs font-medium text-ink-muted`,children:r}),(0,B.jsx)(`button`,{type:`button`,"aria-pressed":C===e.pane.id,"aria-label":p(C===e.pane.id?`workspace.exitFocusMode`:`workspace.focusMode`,{alias:r}),title:p(C===e.pane.id?`workspace.exitFocusMode`:`workspace.focusMode`,{alias:r}),className:`flex size-6 shrink-0 items-center justify-center rounded text-xs text-ink-muted hover:bg-select-fill`,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),w(t=>t===e.pane.id?null:e.pane.id)},children:(0,B.jsx)(V,{name:`focus`,className:`size-3.5`})}),(0,B.jsx)(`button`,{type:`button`,"aria-label":p(`workspace.detachPane`),title:p(`workspace.detachPane`),className:`flex size-6 shrink-0 items-center justify-center rounded text-sm text-ink-muted hover:bg-select-fill`,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),we(e.pane.id)},children:(0,B.jsx)(V,{name:`close`,className:`size-3.5`})})]}):null,(0,B.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:t===void 0?(0,B.jsx)(`div`,{className:`grid h-full min-h-40 place-items-center text-sm text-ink-muted`,children:e.pane.state===`failed`?p(`terminal.openFailed`):p(`workspace.reconnecting`)}):De(t)}),o?(0,B.jsx)(fs,{edge:k.edge}):null]},e.pane.id)}return(0,B.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-1 ${e.split.direction===`horizontal`?`flex-row`:`flex-col`}`,children:[(0,B.jsx)(`div`,{style:{flexBasis:`${e.split.ratio}%`},className:`flex min-h-0 min-w-0`,children:ke(e.split.first,[...t,`first`])}),(0,B.jsx)(es,{direction:e.split.direction,ratio:e.split.ratio,label:p(`workspace.resizeSplit`),onRatioChange:e=>ge({type:`resize-split`,path:t,ratio:e})}),(0,B.jsx)(`div`,{style:{flexBasis:`${100-e.split.ratio}%`},className:`flex min-h-0 min-w-0`,children:ke(e.split.second,[...t,`second`])})]})}let Ae=R===null&&z===null,je=C===null||z===null?null:as(z.root,C),Me=z===null?null:as(z.root,z.focusedPaneId),Ne=ee&&Me!==null?{pane:Me}:je===null?z?.root??null:{pane:je},Pe=z===null?[]:U(z.root).map(e=>as(z.root,e)).filter(e=>e!==null);return(0,B.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[me===1?null:(0,B.jsx)(ms,{displayName:he,paneCount:me,canBroadcast:pe>0,onBroadcast:()=>S(!0),inFocusMode:C!==null,onExitFocusMode:()=>w(null),saved:g,selected:y,onSelect:b,canSave:z!==null||R!==null,onSave:()=>ie(!0),onReopen:e=>void ce(e),onDelete:e=>F(g.find(t=>t.id===e)??null)}),x&&fe.length>0?(0,B.jsx)(Io,{paneTargets:fe,onClose:()=>S(!1)}):null,re?(0,B.jsx)(Zo,{id:`workspace-save-heading`,heading:p(`workspace.save`),label:p(`workspace.namePrompt`),initialValue:te.trim()||(g.find(e=>e.id===y)?.name??``),submitLabel:p(`workspace.saveConfirm`),cancelLabel:p(`workspace.cancel`),validate:e=>e===``?p(`workspace.nameRequired`):``,onSubmit:e=>{ie(!1),Te(e)},onCancel:()=>ie(!1)}):null,ae===null?null:(0,B.jsx)(cn,{id:`workspace-delete-heading`,heading:p(`workspace.deleteHeading`,{name:ae.name}),body:(0,B.jsx)(`p`,{className:`text-sm text-ink-muted`,children:p(`workspace.deleteBody`)}),confirmLabel:p(`workspace.confirmDelete`),cancelLabel:p(`workspace.cancel`),onCancel:()=>F(null),onConfirm:()=>{F(null),Ee(ae.id)}}),j===``?null:(0,B.jsx)(v,{tone:`danger`,compact:!0,children:j}),ee&&Pe.length>1?(0,B.jsx)(`nav`,{"aria-label":p(`workspace.mobilePaneSwitcher`),className:`flex shrink-0 gap-1 overflow-x-auto border-b border-line bg-toolbar px-2 py-1`,children:Pe.map(e=>(0,B.jsx)(`button`,{type:`button`,"aria-current":e.id===z?.focusedPaneId?`page`:void 0,className:`max-w-40 shrink-0 truncate rounded px-3 py-1.5 text-xs ${e.id===z?.focusedPaneId?`bg-select-fill text-ink`:`text-ink-muted`}`,onClick:()=>{ge({type:`focus`,paneId:e.id}),e.sessionId!==void 0&&n(e.sessionId)},children:e.kind===`shell`&&e.sessionId!==void 0?le.get(e.sessionId)?.title??e.alias:e.alias},e.id))}):null,(0,B.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:Ae?(0,B.jsx)(ps,{}):z===null?R===null?null:Oe(R):Ne===null?null:ke(Ne)})]})}function _s(e,t){let n=n=>e?.[n]!==void 0&&e[n]!==``?e[n]:t?.[n]??``,r=e?.backgroundTint??t?.backgroundTint;return{palette:n(`palette`),font:n(`font`),background:n(`background`),tint:r}}function vs(e,t){let n={...e.appearance,...t},r=Object.fromEntries(Object.entries(n).filter(([,e])=>e!==void 0&&e!==``)),{appearance:i,...a}=e;return Object.keys(r).length===0?a:{...a,appearance:r}}function ys(e){let t={...e.palette===``?{}:{palette:e.palette},...e.font===``?{}:{font:e.font},...e.background===``?{}:{background:e.background},...e.background===``||e.tint===void 0?{}:{backgroundTint:e.tint}};return Object.keys(t).length===0?{}:{appearance:t}}var bs=(0,L.lazy)(()=>G(async()=>{let{TerminalView:e}=await import(`./TerminalView-DZqn0XNz.js`);return{TerminalView:e}},__vite__mapDeps([28,1,4,2,26,12,29,30])).then(({TerminalView:e})=>({default:e})));function xs(e,t){return e===void 0?t:e===`allow`}function Ss({visible:e,consoles:t,activeConsole:n,settings:r,hostAppearance:i,hostOSC52:a,onActive:o,onLiveWorkspaceChange:s,onOpenAlias:c,onOpenShell:l,restoreRequest:u,onRestoreConsumed:d,renameRequest:f,onRenameConsumed:p,onOpenRemotePath:m,onOSC52Change:h}){return(0,B.jsx)(gs,{sessions:t.sessions,sessionsLoaded:t.loaded,activeSessionId:n,onActive:o,onOpenAlias:c,onOpenShell:l,onClose:t.close,restoreRequest:u,onRestoreConsumed:d,renameRequest:f,onRenameConsumed:p,onLiveWorkspaceChange:s,renderTerminal:o=>{let s=_s(o.alias===void 0?void 0:i.get(o.alias),r.appearance),c=xs(o.alias===void 0?void 0:a.get(o.alias),r.osc52??!1);return(0,B.jsx)(L.Suspense,{fallback:(0,B.jsx)(Tt,{kind:`terminal`}),children:(0,B.jsx)(bs,{session:o,searchShortcutActive:e&&n===o.id,...r.fontSize===void 0?{}:{fontSize:r.fontSize},...r.browserScrollbackLines===void 0?{}:{scrollbackLines:r.browserScrollbackLines},osc52Enabled:c,jisYenBackslash:r.jisYenBackslash??!1,onOsc52Change:e=>h(o,e),onForwardsChanged:t.refresh,...s.palette===``?{}:{palette:s.palette},...s.font===``?{}:{font:s.font},...s.background===``?{}:{background:s.background},...s.tint===void 0?{}:{tint:s.tint},copyOnSelect:r.copyOnSelect??!0,rightClickPaste:r.rightClickPaste??!0,webgl:r.webgl??!0,onExit:()=>t.markExited(o.id),onReconnect:()=>t.reconnect(o.id),onStopReconnect:()=>t.stopReconnect(o.id),onOpenRemotePath:m},o.id)})}})}function Cs(e,t){let[n,r]=(0,L.useState)([]),[i,a]=(0,L.useState)(new Map),[o,s]=(0,L.useState)(new Map),[c,l]=(0,L.useState)([]),[u,d]=(0,L.useState)([]),[f,p]=(0,L.useState)([]);return(0,L.useEffect)(()=>{if(!e)return;let t=!0;return Ri.overview().then(e=>{t&&(r((e.metadata.groups??[]).map(e=>e.name)),a(new Map((e.metadata.hosts??[]).flatMap(e=>e.appearance===void 0||e.identity.alias===``?[]:[[e.identity.alias,e.appearance]]))),s(new Map((e.metadata.hosts??[]).flatMap(e=>e.osc52===void 0||e.identity.alias===``?[]:[[e.identity.alias,e.osc52]]))),l([...new Set(e.hosts.map(e=>e.identity.alias).filter(e=>e!==``))]),d(e.hosts.filter(e=>e.identity.alias!==``)),p(e.files))}).catch(()=>void 0),()=>{t=!1}},[e,t]),{groups:n,hostAppearance:i,hostOSC52:o,setHostOSC52:s,knownAliases:c,hosts:u,files:f}}function ws({settings:e,setSettings:t,setHostPolicy:n}){return async function(r,i){if(r.kind!==`ssh`||r.alias===void 0){let n={...e};i?n.osc52=!0:delete n.osc52,await qe.setTerminalSettings(n),t(n);return}let a=r.alias,o=await Ri.overview(),s=o.hosts.find(e=>e.identity.alias===a)?.identity;if(s===void 0)throw Error(`host_not_found`);let c=[...o.metadata.hosts??[]],l=c.findIndex(e=>e.identity.path===s.path&&e.identity.alias===s.alias),u={...l<0?{}:c[l],identity:s,osc52:i?`allow`:`deny`};l<0?c.push(u):c[l]=u,await Ri.save({kind:`metadata`,metadata:{...o.metadata,hosts:c}}),n(e=>new Map(e).set(a,u.osc52))}}function Ts(e){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null),a=(0,L.useRef)(0),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(null),f=(0,L.useCallback)(()=>l(null),[]),p=(0,L.useCallback)(()=>d(null),[]);function m(t,r){n({path:t,line:r}),e(`Config`)}function h(t,n,r){a.current+=1,i({alias:t,path:n,action:r,request:a.current}),e(`Files`)}function g(e){i(t=>t?.request===e?null:t)}function _(t){l(t),e(`Connections`)}function v(t){d(t),e(`Remote Keys`)}return{fileTarget:t,sftpTarget:r,connectionDraft:o,setConnectionDraft:s,connectionKey:c,publicKey:u,consumeConnectionKey:f,consumePublicKey:p,openFile:m,openRemotePath:h,handleSftpTarget:g,assignGeneratedKey:_,installGeneratedKey:v}}function Es({enabled:e,shortcuts:t,terminalFace:n,orderedConsoles:r,activeConsole:i,navigate:a,showConsole:o,openPalette:s}){(0,L.useEffect)(()=>{function c(c){if(!e||fe(c)===null)return;let l=n&&!c.altKey&&!c.shiftKey&&c.ctrlKey!==c.metaKey&&c.key.toLowerCase()===`f`;if(Ce(c)){l&&!(c.target instanceof Element&&c.target.closest(`[data-shortcut-editor]`))&&(c.preventDefault(),c.stopImmediatePropagation());return}let u;if(Se(c,`palette`,t))u=s;else if(Se(c,`home`,t))u=()=>a(`Home`);else if(Se(c,`sftp`,t))u=()=>a(`Files`);else if(r.length>0){let e=Se(c,`nextSession`,t)?1:Se(c,`previousSession`,t)?-1:0;e!==0&&(u=()=>{let t=r.findIndex(e=>e.id===i),n=r[t<0?e>0?0:r.length-1:(t+e+r.length)%r.length];n!==void 0&&o(n.id)})}u===void 0&&!l||(c.preventDefault(),c.stopImmediatePropagation(),c.repeat||u?.())}return document.addEventListener(`keydown`,c,!0),()=>document.removeEventListener(`keydown`,c,!0)},[e,t,a,r,i,o,n,s])}var Ds=2e3;function Os({bootstrap:e,health:t,vault:n=Xe.passwordVault}){let{t:r}=O();Ei();let i=wi(Si),a=xe(),{resolved:o}=ut(),{route:s,location:c,navigate:l,navigateLocation:u,setNavigationBlocker:d}=Vr(),f=s.kind===`section`?s.section:null,p=f===`Terminal`,m=bi({bootstrap:e,health:t,vault:n}),{state:h,vaultRecheck:g,failure:_,vaultExists:v,version:y,requestFailure:x,vaultMigration:S}=m;ze(h===`ready`);let C=Ts(l),w=Cs(h===`ready`,f),[T,E]=(0,L.useState)(!1),D=(0,L.useRef)(null),k=(0,L.useRef)(null),[A,ee]=Ir(Yn),[j,M]=(0,L.useState)(!1),[N,P]=(0,L.useState)(null),te=(0,L.useRef)(null),ne=(0,L.useRef)(null),re=wi(`(max-width: 1023px)`),[ie,ae]=(0,L.useState)(!1),F=(0,L.useRef)(null);an({open:T,containerRefs:[D,k],onDismiss:()=>E(!1),returnFocusRef:k,trapFocus:i}),an({open:j&&N!==null&&re,containerRefs:[te,ne],onDismiss:()=>M(!1),closeOnOutside:!1,returnFocusRef:ne,initialFocusRef:te,trapFocus:!0}),(0,L.useEffect)(()=>{tr(o)},[o]),(0,L.useEffect)(()=>{h!==`ready`&&ae(!1)},[h]),(0,L.useEffect)(()=>{function e(e){ie?(e.preventDefault(),ae(!1)):T?(e.preventDefault(),E(!1)):j&&(e.preventDefault(),M(!1))}return window.addEventListener(`sshc-android-back`,e),()=>window.removeEventListener(`sshc-android-back`,e)},[ie,j,T]);let oe=pn(Ue,r,h===`ready`),I=(0,L.useCallback)(()=>E(!1),[]),{settings:se,localShellProfiles:R,activeConsole:le,liveWorkspace:ue,restoreRequest:de,renameRequest:z,orderedConsoles:fe,showConsole:pe,openWorkspace:me,renameWorkspace:he,openLocalShell:ge,duplicateConsole:_e,consumeRestore:ve,consumeRename:ye,reorderConsoles:be,setLiveWorkspace:Se,setSettings:Ce}=xi({api:qe,consoles:oe,enabled:h===`ready`,section:f,navigate:l,closeNavigation:I}),we=(0,L.useCallback)(()=>{F.current=document.activeElement instanceof HTMLElement?document.activeElement:null,ae(!0)},[]);Es({enabled:h===`ready`,shortcuts:a,terminalFace:p,orderedConsoles:fe,activeConsole:le,navigate:l,showConsole:pe,openPalette:we}),ce(()=>kr.reconcile(),{intervalMs:Ds,enabled:h===`ready`,whileHidden:!0,immediately:!0});let Te=ri(oe.sessions,p?le:null,r,pe);(0,L.useEffect)(()=>{P(null)},[f]);let Ee=[{id:`new-connection`,label:r(`palette.newConnection`),detail:r(`palette.newConnectionDetail`),search:`new connection create host add 新規 接続 追加 作成`,run:()=>{C.setConnectionDraft({alias:``,group:``,hostName:``,user:``,port:``,authentication:`dedicated_password`,savedCredential:``,newCredential:``,keyID:``}),l(`Connections`)}},{id:`open-files`,label:r(`palette.openRemoteFiles`),detail:r(`palette.openRemoteFilesDetail`),search:`sftp files remote browse ファイル リモート 転送`,run:()=>l(`Files`)},{id:`open-shell`,label:r(`palette.openLocalShell`),detail:r(`palette.openLocalShellDetail`),search:`shell local terminal console シェル ローカル ターミナル`,run:()=>void ge()},...m.passwordless?[]:[{id:`lock-vault`,label:r(`palette.lockVault`),detail:r(`palette.lockVaultDetail`),search:`lock vault secure ロック 保管庫 施錠`,run:()=>{Xe.lockVault().then(e=>{e.unlocked?m.openVault(e):m.lock()}).catch(()=>void 0)}}]];function De(e,t){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),l(t))}let Oe=ws({settings:se,setSettings:Ce,setHostPolicy:w.setHostOSC52});return h===`locked`?(0,B.jsx)(_t,{exists:v,passwordless:m.passwordless,version:y,onExists:m.markVaultExists,onOpen:m.openVault}):h===`error`?(0,B.jsx)(Oi,{failure:_,requestFailure:x,version:y,onCloseFailure:m.clearRequestFailure}):h===`session-ended`?(0,B.jsx)(ki,{}):(0,B.jsxs)(`div`,{className:`sshc-app flex h-screen flex-col bg-canvas text-ink`,"data-mobile":i,children:[(0,B.jsx)(bt,{}),(0,B.jsxs)(`div`,{className:`contents`,inert:h===`ready`&&g!==`idle`,"aria-hidden":h===`ready`&&g!==`idle`||void 0,children:[(0,B.jsx)(Kt,{route:s,navigationOpen:T,navigationId:Do,navigationToggleRef:k,onToggleNavigation:()=>E(e=>!e),inspector:N,inspectorOpen:j,inspectorToggleRef:ne,onToggleInspector:()=>M(e=>!e),sectionLabels:wo}),x===null?null:(0,B.jsx)(ht,{diagnostic:x,version:y,onClose:m.clearRequestFailure}),(0,B.jsxs)(`div`,{style:{"--navigation-width":`${A}px`},className:`sshc-app-layout grid min-h-0 flex-1 grid-cols-1 grid-rows-[minmax(0,1fr)] md:grid-cols-[var(--navigation-width)_minmax(0,1fr)] ${N!==null&&j?`lg:grid-cols-[var(--navigation-width)_minmax(0,1fr)_17rem]`:``}`,children:[T?(0,B.jsx)(`div`,{"aria-hidden":`true`,"data-navigation-backdrop":!0,onClick:()=>E(!1),className:`sshc-navigation-backdrop fixed inset-0 z-20 bg-canvas/70 md:hidden`}):null,(0,B.jsx)(Ar,{navigationRef:D,navigationId:Do,version:y,state:h,navigationOpen:T,mobileLayout:i,desktopWidth:A,onDesktopWidthChange:ee,startSections:Eo,section:f,sectionIcons:To,sectionLabels:wo,onNavigate:(e,t)=>{E(!1),De(e,t)},consoles:oe,orderedConsoles:fe,activeConsole:le,liveWorkspace:ue,onRenameWorkspace:he,unreadBySession:Te,onShowConsole:pe,onDuplicateConsole:e=>void _e(e),onReorderConsoles:be,localShellProfiles:R,onOpenShell:e=>void ge(e),aliases:w.knownAliases,hosts:w.hosts,onConnect:e=>void(async()=>{let t=await oe.open({kind:`ssh`,alias:e});t!==null&&pe(t.id)})(),onOpenCommandPalette:()=>{F.current=k.current,E(!1),ae(!0)}}),(0,B.jsxs)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col overflow-hidden`,children:[N===null?null:(0,B.jsx)(`span`,{className:`absolute right-2 top-2 z-10 hidden md:block [&>button]:h-8 [&>button]:w-8 [&>button]:justify-center [&>button>span]:hidden`,children:(0,B.jsx)(St,{label:N.label,open:j,attention:N.attention,onToggle:()=>M(e=>!e)})}),S===null?null:(0,B.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-notice-line bg-notice px-4 py-2 text-sm text-notice-ink`,children:[(0,B.jsx)(`p`,{className:`min-w-0 grow`,children:r(`lock.migrationCompleted`,{current:S.from,required:S.to})}),(0,B.jsx)(b,{className:`shrink-0`,onClick:m.clearVaultMigration,children:r(`lock.migrationDismiss`)})]}),C.connectionDraft!==null&&(f===`Groups`||f===`Keys`)?(0,B.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-notice-line bg-notice px-4 py-2 text-sm text-notice-ink`,children:[(0,B.jsx)(`p`,{className:`min-w-0 grow truncate`,children:r(`conn.createDraftWaiting`,{alias:C.connectionDraft.alias||r(`conn.createUntitledDraft`)})}),(0,B.jsx)(b,{className:`shrink-0`,onClick:()=>l(`Connections`),children:r(`conn.createReturnToDraft`)})]}):null,h===`ready`?(0,B.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden`,children:[p||le!==null?(0,B.jsx)(`div`,{className:p?`h-full`:`hidden`,children:(0,B.jsx)(Ss,{visible:p,consoles:oe,activeConsole:le,settings:se,hostAppearance:w.hostAppearance,hostOSC52:w.hostOSC52,onActive:pe,onLiveWorkspaceChange:Se,onOpenAlias:e=>oe.open({kind:`ssh`,alias:e}),onOpenShell:()=>oe.open({kind:`shell`}),onOSC52Change:Oe,onOpenRemotePath:C.openRemotePath,restoreRequest:de,onRestoreConsumed:ve,renameRequest:z,onRenameConsumed:ye})}):null,s.kind===`section`?(0,B.jsx)(L.Suspense,{fallback:(0,B.jsx)(Tt,{}),children:(0,B.jsx)(jo,{section:s.section,navigation:{location:c,fileTarget:C.fileTarget,onNavigate:l,onNavigateLocation:u,onNavigateForCreation:e=>l(e),onOpenFile:C.openFile,onNavigationBlockerChange:d},handoff:{connectionKey:C.connectionKey,publicKey:C.publicKey,connectionDraft:C.connectionDraft,onAssignGeneratedKey:C.assignGeneratedKey,onInstallGeneratedKey:C.installGeneratedKey,onConnectionKeyApplied:C.consumeConnectionKey,onPublicKeyHandled:C.consumePublicKey,onConnectionDraftChange:C.setConnectionDraft},shell:{onLock:m.lock,onVaultChanged:m.openVault,onInspector:P,consoles:oe,onShowConsole:pe,onOpenWorkspace:me,onTerminalSettingsChange:async e=>{Ce(e),await oe.refresh()}},declared:{groups:w.groups,knownAliases:w.knownAliases,hosts:w.hosts},sftpTarget:C.sftpTarget,onSftpTargetHandled:C.handleSftpTarget},s.section)}):(0,B.jsx)(ji,{pathname:s.pathname,onGoHome:e=>De(e,`Home`)})]}):null]}),N!==null&&j?(0,B.jsx)(Ct,{label:N.label,paneRef:te,children:N.body}):null]}),h===`ready`&&i?(0,B.jsx)(`nav`,{"aria-label":r(`shell.mobileNavigation`),className:`sshc-mobile-navigation grid shrink-0 grid-cols-5 border-t border-line bg-toolbar`,children:[`Home`,`Connections`,`Files`,`Terminal`,`Menu`].map(e=>(0,B.jsxs)(`a`,{href:Nt(e),"aria-current":f===e?`page`:void 0,onClick:t=>{E(!1),De(t,e)},className:`relative flex min-h-13 min-w-0 flex-col items-center justify-center gap-0.5 px-1 py-1 text-[10px] transition-colors ${f===e?`bg-select-fill font-semibold text-accent`:`text-ink-muted active:bg-hover`}`,children:[f===e?(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-4 top-0 h-0.5 rounded-full bg-accent`}):null,(0,B.jsx)(V,{name:To[e],className:`size-5`}),(0,B.jsx)(`span`,{className:`max-w-full truncate`,children:r(wo[e])})]},e))}):null,h===`ready`?(0,B.jsx)(ai,{}):null,h===`ready`?(0,B.jsx)(mi,{open:ie,commands:Ee,returnFocusRef:F,hosts:w.hosts,files:w.files,sessions:fe,unreadBySession:Te,sectionLabels:wo,onClose:()=>ae(!1),onConnect:async e=>{let t=await oe.open({kind:`ssh`,alias:e});t!==null&&pe(t.id)},onOpenHostSettings:e=>u(Gt({path:e.path,alias:e.alias,panel:`Basic`,advanced:`Jump`})),onOpenFile:e=>C.openFile(e,1),onNavigate:l,onOpenSnippet:e=>u(`${Nt(`Snippets`)}?snippet=${encodeURIComponent(e)}`),onOpenSession:pe}):null]}),h===`ready`&&g!==`idle`?(0,B.jsx)(Ai,{phase:g}):null]})}var ks={en:{heading:`sshc stopped rendering`,note:`This is a defect. Copy the lines below into a report. They contain only the failure details.`,reload:`Reload`},ja:{heading:`sshc の画面を表示できませんでした`,note:`アプリの不具合です。下の内容にはエラー情報だけが含まれています。コピーして不具合報告に添えてください。`,reload:`再読み込み`}};function As(){try{return ks[te()]}catch{return ks.en}}var js=class extends L.Component{state={message:``,stack:``};static getDerivedStateFromError(e){let t=e instanceof Error?e:Error(String(e));return{message:`${t.name}: ${t.message}`,stack:(t.stack??``).split(` +`).slice(1,6).join(` +`)}}componentDidCatch(e,t){console.error(`sshc stopped rendering`,e,t.componentStack)}render(){if(this.state.message===``)return this.props.children;let e=As();return(0,B.jsxs)(`main`,{style:Ms,children:[(0,B.jsx)(`h1`,{style:Ns,children:e.heading}),(0,B.jsx)(`p`,{style:Ps,children:e.note}),(0,B.jsx)(`pre`,{style:Fs,children:this.state.message}),this.state.stack===``?null:(0,B.jsx)(`pre`,{style:Fs,children:this.state.stack}),(0,B.jsx)(`button`,{type:`button`,style:Is,onClick:()=>window.location.replace(window.location.pathname+window.location.search),children:e.reload})]})}},Ms={padding:`24px`,paddingTop:`48px`,display:`flex`,flexDirection:`column`,gap:`12px`,alignItems:`flex-start`,fontFamily:`system-ui, sans-serif`,color:`#111111`,background:`#ffffff`,minHeight:`100vh`},Ns={fontSize:`16px`,fontWeight:600,margin:0},Ps={fontSize:`13px`,margin:0,lineHeight:1.5},Fs={fontSize:`12px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,background:`#f3f3f3`,border:`1px solid #dddddd`,borderRadius:`6px`,padding:`8px`,margin:0,maxWidth:`100%`},Is={fontSize:`14px`,padding:`10px 16px`,borderRadius:`6px`,border:`1px solid #888888`,background:`#ffffff`},Ls=document.getElementById(`root`);if(!Ls)throw Error(`root element missing`);var Rs=a(window.location,window.history,window.fetch.bind(window));for(let e of[`dragover`,`drop`])window.addEventListener(e,e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()});`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{let e=window.trustedTypes,t=e?e.createPolicy(`sshc-service-worker`,{createScriptURL:e=>e}).createScriptURL(`/sw.js`):`/sw.js`;navigator.serviceWorker.register(t,{scope:`/`}).catch(()=>void 0)}),(0,se.createRoot)(Ls).render((0,B.jsx)(L.StrictMode,{children:(0,B.jsx)(js,{children:(0,B.jsx)(ct,{children:(0,B.jsx)(k,{children:(0,B.jsx)(Os,{bootstrap:()=>Rs,health:()=>S.health()})})})})}));export{V as $,Ir as A,Cn as B,qr as C,Jr as D,ni as E,In as F,gn as G,xn as H,Ln as I,sn as J,mn as K,Rn as L,cr as M,Jn as N,Qr as O,Gn as P,Dt as Q,An as R,li as S,Hr as T,_n as U,Sn as V,vn as W,Gt as X,an as Y,Wt as Z,Ri as _,Ce as _t,Zo as a,Xe as at,wi as b,oe as bt,wa as c,Ie as ct,ya as d,Le as dt,_t as et,_a as f,Me as ft,$i as g,fe as gt,ta as h,le as ht,$o as i,ut as it,kr as j,Yr as k,Ta as l,Re as lt,ea as m,Se as mt,vs as n,ft as nt,Fo as o,qe as ot,ra as p,R as pt,cn as q,es as r,dt as rt,G as s,Ue as st,ys as t,pt as tt,ba as u,Fe as ut,Si as v,xe as vt,Zr as w,di as x,Ti as y,ce as yt,On as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/javascript-CbZk-tvH.js b/internal/ui/dist/assets/javascript-CT0_diQI.js similarity index 90% rename from internal/ui/dist/assets/javascript-CbZk-tvH.js rename to internal/ui/dist/assets/javascript-CT0_diQI.js index 59fdb1b25..ea11ab5bc 100644 --- a/internal/ui/dist/assets/javascript-CbZk-tvH.js +++ b/internal/ui/dist/assets/javascript-CT0_diQI.js @@ -1 +1 @@ -import{conf as e,language as t}from"./typescript-CKpXzKI4.js";var n=e,r={defaultToken:`invalid`,tokenPostfix:`.js`,keywords:`break.case.catch.class.continue.const.constructor.debugger.default.delete.do.else.export.extends.false.finally.for.from.function.get.if.import.in.instanceof.let.new.null.return.set.static.super.switch.symbol.this.throw.true.try.typeof.undefined.var.void.while.with.yield.async.await.of`.split(`.`),typeKeywords:[],operators:t.operators,symbols:t.symbols,escapes:t.escapes,digits:t.digits,octaldigits:t.octaldigits,binarydigits:t.binarydigits,hexdigits:t.hexdigits,regexpctl:t.regexpctl,regexpesc:t.regexpesc,tokenizer:t.tokenizer};export{n as conf,r as language}; \ No newline at end of file +import{conf as e,language as t}from"./typescript-BGLra-jT.js";var n=e,r={defaultToken:`invalid`,tokenPostfix:`.js`,keywords:`break.case.catch.class.continue.const.constructor.debugger.default.delete.do.else.export.extends.false.finally.for.from.function.get.if.import.in.instanceof.let.new.null.return.set.static.super.switch.symbol.this.throw.true.try.typeof.undefined.var.void.while.with.yield.async.await.of`.split(`.`),typeKeywords:[],operators:t.operators,symbols:t.symbols,escapes:t.escapes,digits:t.digits,octaldigits:t.octaldigits,binarydigits:t.binarydigits,hexdigits:t.hexdigits,regexpctl:t.regexpctl,regexpesc:t.regexpesc,tokenizer:t.tokenizer};export{n as conf,r as language}; \ No newline at end of file diff --git a/internal/ui/dist/assets/jsonMode-zGNRG1gJ.js b/internal/ui/dist/assets/jsonMode-C7dCI1gT.js similarity index 99% rename from internal/ui/dist/assets/jsonMode-zGNRG1gJ.js rename to internal/ui/dist/assets/jsonMode-C7dCI1gT.js index 4c097a52c..36b6c2146 100644 --- a/internal/ui/dist/assets/jsonMode-zGNRG1gJ.js +++ b/internal/ui/dist/assets/jsonMode-C7dCI1gT.js @@ -1,4 +1,4 @@ -import{$ as e,$a as t,$c as n,$d as r,$i as i,$l as a,$n as o,$o as s,$r as c,$s as l,$t as u,$u as d,A as f,Aa as p,Ac as m,Ad as h,Ai as g,Al as _,An as v,Ao as y,Ar as b,As as ee,At as te,Au as x,B as ne,Ba as S,Bc as re,Bd as ie,Bi as ae,Bl as oe,Bn as se,Bo as ce,Br as le,Bs as C,Bt as ue,Bu as w,C as de,Ca as fe,Cc as pe,Cd as T,Ci as me,Cl as he,Cn as ge,Co as _e,Cr as ve,Cs as ye,Ct as be,Cu as xe,D as Se,Da as Ce,Dc as we,Dd as Te,Di as Ee,Dl as De,Dn as Oe,Do as ke,Dr as Ae,Ds as je,Dt as Me,Du as Ne,E as Pe,Ea as Fe,Ec as Ie,Ed as Le,Ei as Re,El as ze,En as Be,Eo as Ve,Er as He,Es as Ue,Et as We,Eu as Ge,F as Ke,Fa as qe,Fc as Je,Fd as Ye,Fi as Xe,Fl as Ze,Fn as Qe,Fo as $e,Fr as et,Fs as E,Ft as tt,Fu as nt,G as rt,Ga as it,Gc as at,Gd as ot,Gi as st,Gl as ct,Gn as lt,Go as ut,Gr as dt,Gs as ft,Gt as pt,Gu as mt,H as ht,Ha as gt,Hc as _t,Hd as vt,Hi as yt,Hl as bt,Hn as xt,Ho as St,Hr as Ct,Hs as wt,Ht as Tt,Hu as Et,I as Dt,Ia as Ot,Ic as D,Id as kt,Ii as At,Il as jt,In as Mt,Io as Nt,Ir as Pt,Is as Ft,It,Iu as Lt,J as Rt,Ja as zt,Jc as Bt,Jd as Vt,Ji as Ht,Jl as Ut,Jn as Wt,Jo as Gt,Jr as O,Js as Kt,Jt as qt,Ju as Jt,K as Yt,Ka as Xt,Kc as Zt,Kd as Qt,Ki as $t,Kl as en,Kn as tn,Ko as nn,Kr as rn,Ks as k,Kt as an,L as on,La as sn,Lc as cn,Ld as ln,Li as un,Ll as dn,Ln as fn,Lo as pn,Lr as mn,Ls as hn,Lt as gn,Lu as _n,M as vn,Ma as yn,Mc as bn,Md as xn,Mi as Sn,Ml as Cn,Mn as wn,Mo as Tn,Mr as En,Ms as Dn,Mt as On,Mu as A,N as kn,Na as An,Nc as jn,Nd as Mn,Ni as Nn,Nl as Pn,Nn as Fn,No as In,Nr as Ln,Ns as Rn,Nt as zn,Nu as j,O as Bn,Oa as Vn,Oc as Hn,Od as Un,Oi as Wn,Ol as Gn,On as Kn,Oo as qn,Or as Jn,Os as Yn,Ot as Xn,Ou as Zn,P as Qn,Pa as $n,Pc as er,Pd as tr,Pi as nr,Pl as rr,Pn as ir,Po as ar,Pr as or,Ps as sr,Pt as cr,Pu as lr,Q as ur,Qa as dr,Qc as fr,Qd as pr,Qi as mr,Ql as hr,Qn as gr,Qo as _r,Qr as vr,Qs as yr,Qt as br,Qu as xr,Ra as Sr,Rc as Cr,Rd as wr,Ri as Tr,Rl as Er,Rn as Dr,Ro as Or,Rr as kr,Rs as Ar,Rt as jr,Ru as Mr,S as Nr,Sa as Pr,Sc as Fr,Sd as M,Si as Ir,Sl as Lr,Sn as Rr,So as zr,Sr as Br,Ss as Vr,St as Hr,Su as Ur,T as Wr,Ta as Gr,Tc as Kr,Td as qr,Ti as Jr,Tl as Yr,Tn as Xr,To as Zr,Tr as Qr,Ts as $r,Tt as ei,Tu as ti,U as ni,Ua as ri,Uc as ii,Ud as ai,Ui as oi,Ul as si,Un as ci,Uo as li,Ur as ui,Us as di,Ut as fi,Uu as pi,V as mi,Va as hi,Vc as gi,Vd as _i,Vi as vi,Vl as yi,Vn as bi,Vo as xi,Vr as Si,Vs as Ci,Vt as wi,Vu as Ti,W as Ei,Wa as Di,Wc as Oi,Wd as ki,Wi as Ai,Wl as ji,Wn as Mi,Wo as Ni,Wr as Pi,Ws as N,Wt as Fi,Wu as Ii,X as Li,Xa as Ri,Xc as zi,Xd as Bi,Xi as Vi,Xl as Hi,Xn as Ui,Xo as Wi,Xr as Gi,Xs as Ki,Xt as qi,Xu as Ji,Y as Yi,Ya as Xi,Yc as Zi,Yd as Qi,Yi as $i,Yl as ea,Yn as ta,Yo as na,Yr as ra,Ys as P,Yt as ia,Yu as aa,Z as oa,Za as sa,Zc as ca,Zd as la,Zi as ua,Zl as da,Zn as fa,Zo as pa,Zr as ma,Zs as ha,Zt as ga,Zu as F,_ as _a,_a as va,_c as I,_d as ya,_i as ba,_l as xa,_n as Sa,_o as Ca,_r as wa,_s as Ta,_t as Ea,_u as Da,a as Oa,aa as ka,ac as Aa,ad as ja,af as Ma,ai as Na,al as Pa,an as Fa,ao as Ia,ar as La,as as Ra,at as za,au as Ba,b as Va,ba as Ha,bc as Ua,bd as Wa,bi as Ga,bl as Ka,bn as qa,bo as Ja,br as Ya,bs as Xa,bt as Za,bu as Qa,c as $a,ca as eo,cc as to,cd as no,cf as ro,ci as io,cl as ao,cn as oo,co as so,cr as co,cs as L,ct as lo,cu as uo,d as fo,da as po,dc as mo,dd as ho,di as go,dl as _o,dn as vo,do as R,dr as yo,ds as bo,dt as xo,du as So,ea as Co,ec as wo,ed as To,ef as Eo,ei as Do,el as Oo,en as ko,eo as Ao,er as jo,es as Mo,et as No,eu as Po,f as Fo,fa as Io,fc as Lo,fd as Ro,fi as zo,fl as Bo,fn as Vo,fo as Ho,fr as Uo,fs as Wo,ft as Go,fu as Ko,g as qo,ga as Jo,gc as Yo,gd as Xo,gi as Zo,gl as Qo,gn as $o,go as es,gr as ts,gs as ns,gt as rs,gu as is,h as as,ha as os,hc as ss,hd as cs,hi as ls,hl as us,hn as ds,ho as fs,hr as ps,hs as ms,ht as hs,hu as gs,i as _s,ia as vs,ic as ys,id as bs,if as xs,ii as Ss,il as z,in as Cs,io as ws,ir as Ts,is as Es,it as Ds,iu as Os,j as ks,ja as As,jc as js,jd as Ms,ji as Ns,jl as Ps,jn as Fs,jo as Is,jr as Ls,js as Rs,jt as zs,ju as B,k as Bs,ka as Vs,kc as Hs,kd as Us,ki as Ws,kl as Gs,kn as Ks,ko as qs,kr as Js,ks as Ys,kt as Xs,ku as Zs,l as Qs,la as $s,lc as ec,ld as tc,lf as nc,li as rc,ll as ic,ln as ac,lo as oc,lr as sc,ls as V,lt as cc,lu as lc,m as uc,ma as dc,mc as H,md as fc,mi as pc,ml as mc,mn as hc,mo as gc,mr as _c,ms as vc,mt as yc,mu as bc,n as xc,na as Sc,nc as Cc,nd as U,nf as wc,ni as Tc,nl as Ec,nn as Dc,no as Oc,nr as kc,ns as Ac,nt as jc,nu as Mc,o as Nc,oa as Pc,oc as Fc,od as Ic,of as Lc,oi as Rc,ol as zc,on as Bc,oo as Vc,or as Hc,os as Uc,ot as Wc,ou as Gc,p as Kc,pa as qc,pc as Jc,pd as Yc,pi as Xc,pl as Zc,pn as Qc,po as $c,pr as el,ps as tl,pt as nl,pu as rl,q as il,qa as al,qc as ol,qd as sl,qi as cl,ql as ll,qn as ul,qo as dl,qr as fl,qs as pl,qt as ml,qu as hl,r as gl,ra as _l,rc as W,rd as G,rf as vl,ri as yl,rl as bl,rn as xl,ro as Sl,rr as Cl,rs as K,rt as wl,ru as Tl,s as El,sa as Dl,sc as q,sd as Ol,sf as kl,si as Al,sl as J,sn as jl,so as Ml,sr as Nl,ss as Pl,st as Fl,su as Il,ta as Ll,tc as Rl,td as zl,tf as Bl,ti as Vl,tl as Hl,tn as Ul,to as Wl,tr as Gl,ts as Kl,tt as ql,tu as Jl,u as Yl,ua as Xl,uc as Zl,ud as Ql,uf as $l,ui as eu,ul as tu,un as nu,uo as ru,ur as Y,us as X,ut as iu,uu as au,v as ou,va as su,vc as cu,vd as lu,vi as uu,vl as du,vn as fu,vo as pu,vr as mu,vs as hu,vt as gu,vu as _u,w as vu,wa as yu,wc as bu,wd as xu,wi as Su,wl as Cu,wn as wu,wo as Tu,wr as Eu,ws as Du,wt as Ou,wu as ku,x as Au,xa as ju,xc as Mu,xd as Nu,xi as Pu,xl as Fu,xn as Iu,xo as Lu,xr as Ru,xs as zu,xt as Bu,xu as Vu,y as Hu,ya as Uu,yc as Wu,yd as Gu,yi as Ku,yl as qu,yn as Ju,yo as Yu,yr as Xu,ys as Zu,yt as Qu,yu as $u,z as ed,za as td,zc as nd,zd as rd,zi as id,zl as ad,zn as od,zo as sd,zr as cd,zs as ld,zt as ud,zu as dd}from"./editor.api-BUrKrayv.js";var fd=class extends Rn{constructor(){super({id:`diffEditor.toggleCollapseUnchangedRegions`,title:T(101,`Toggle Collapse Unchanged Regions`),icon:x.map,toggled:N.has(`config.diffEditor.hideUnchangedRegions.enabled`),precondition:N.has(`isInDiffEditor`),menu:{when:N.has(`isInDiffEditor`),id:E.EditorTitle,order:22,group:`navigation`}})}run(e,...t){let n=e.get(Mo),r=!n.getValue(`diffEditor.hideUnchangedRegions.enabled`);n.updateValue(`diffEditor.hideUnchangedRegions.enabled`,r)}},pd=class extends Rn{constructor(){super({id:`diffEditor.toggleShowMovedCodeBlocks`,title:T(102,`Toggle Show Moved Code Blocks`),precondition:N.has(`isInDiffEditor`)})}run(e,...t){let n=e.get(Mo),r=!n.getValue(`diffEditor.experimental.showMoves`);n.updateValue(`diffEditor.experimental.showMoves`,r)}},md=class extends Rn{constructor(){super({id:`diffEditor.toggleUseInlineViewWhenSpaceIsLimited`,title:T(103,`Toggle Use Inline View When Space Is Limited`),precondition:N.has(`isInDiffEditor`)})}run(e,...t){let n=e.get(Mo),r=!n.getValue(`diffEditor.useInlineViewWhenSpaceIsLimited`);n.updateValue(`diffEditor.useInlineViewWhenSpaceIsLimited`,r)}},hd=T(104,`Diff Editor`),gd=class extends Es{constructor(){super({id:`diffEditor.switchSide`,title:T(105,`Switch Side`),icon:x.arrowSwap,precondition:N.has(`isInDiffEditor`),f1:!0,category:hd})}runEditorCommand(e,t,n){let r=Td(e);if(r instanceof _a){if(n&&n.dryRun)return{destinationSelection:r.mapToOtherSide().destinationSelection};r.switchSide()}}},_d=class extends Es{constructor(){super({id:`diffEditor.exitCompareMove`,title:T(106,`Exit Compare Move`),icon:x.close,precondition:O.comparingMovedCode,f1:!1,category:hd,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){let r=Td(e);r instanceof _a&&r.exitCompareMove()}},vd=class extends Es{constructor(){super({id:`diffEditor.collapseAllUnchangedRegions`,title:T(107,`Collapse All Unchanged Regions`),icon:x.fold,precondition:N.has(`isInDiffEditor`),f1:!0,category:hd})}runEditorCommand(e,t,...n){let r=Td(e);r instanceof _a&&r.collapseAllUnchangedRegions()}},yd=class extends Es{constructor(){super({id:`diffEditor.showAllUnchangedRegions`,title:T(108,`Show All Unchanged Regions`),icon:x.unfold,precondition:N.has(`isInDiffEditor`),f1:!0,category:hd})}runEditorCommand(e,t,...n){let r=Td(e);r instanceof _a&&r.showAllUnchangedRegions()}},bd=class extends Rn{constructor(){super({id:`diffEditor.revert`,title:T(109,`Revert`),f1:!0,category:hd,precondition:N.has(`isInDiffEditor`)})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){let t=Td(e);t instanceof _a&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){let n=wd(e,t.originalUri,t.modifiedUri);n instanceof _a&&n.revertRangeMappings(t.mapping.innerChanges??[])}},xd=T(110,`Accessible Diff Viewer`),Sd=class e extends Rn{static{this.id=`editor.action.accessibleDiffViewer.next`}constructor(){super({id:e.id,title:T(111,`Go to Next Difference`),category:xd,precondition:N.has(`isInDiffEditor`),keybinding:{primary:65,weight:100},f1:!0})}run(e){Td(e)?.accessibleDiffViewerNext()}},Cd=class e extends Rn{static{this.id=`editor.action.accessibleDiffViewer.prev`}constructor(){super({id:e.id,title:T(112,`Go to Previous Difference`),category:xd,precondition:N.has(`isInDiffEditor`),keybinding:{primary:1089,weight:100},f1:!0})}run(e){Td(e)?.accessibleDiffViewerPrev()}};function wd(e,t,n){return e.get(Cc).listDiffEditors().find(e=>{let r=e.getModifiedEditor(),i=e.getOriginalEditor();return r&&r.getModel()?.uri.toString()===n.toString()&&i&&i.getModel()?.uri.toString()===t.toString()})||null}function Td(e){let t=e.get(Cc).listDiffEditors(),n=Ua();if(n){for(let e of t)if(e.getContainerDomNode().contains(n))return e}return null}C(fd),C(pd),C(md),hn.appendMenuItem(E.EditorTitle,{command:{id:new md().desc.id,title:M(135,`Use Inline View When Space Is Limited`),toggled:N.has(`config.diffEditor.useInlineViewWhenSpaceIsLimited`),precondition:N.has(`isInDiffEditor`)},order:11,group:`1_diff`,when:N.and(O.diffEditorRenderSideBySideInlineBreakpointReached,N.has(`isInDiffEditor`))}),hn.appendMenuItem(E.EditorTitle,{command:{id:new pd().desc.id,title:M(136,`Show Moved Code Blocks`),icon:x.move,toggled:di.create(`config.diffEditor.experimental.showMoves`,!0),precondition:N.has(`isInDiffEditor`)},order:10,group:`1_diff`,when:N.has(`isInDiffEditor`)}),C(bd);for(let e of[{icon:x.arrowRight,key:O.diffEditorInlineMode.toNegated()},{icon:x.discard,key:O.diffEditorInlineMode}])hn.appendMenuItem(E.DiffEditorHunkToolbar,{command:{id:new bd().desc.id,title:M(137,`Revert Block`),icon:e.icon},when:N.and(O.diffEditorModifiedWritable,e.key),order:5,group:`primary`}),hn.appendMenuItem(E.DiffEditorSelectionToolbar,{command:{id:new bd().desc.id,title:M(138,`Revert Selection`),icon:e.icon},when:N.and(O.diffEditorModifiedWritable,e.key),order:5,group:`primary`});C(gd),C(_d),C(vd),C(yd),hn.appendMenuItem(E.EditorTitle,{command:{id:Sd.id,title:M(139,`Open Accessible Diff Viewer`),precondition:N.has(`isInDiffEditor`)},order:10,group:`2_diff`,when:N.and(O.accessibleDiffViewerVisible.negate(),N.has(`isInDiffEditor`))}),pl.registerCommandAlias(`editor.action.diffReview.next`,Sd.id),C(Sd),pl.registerCommandAlias(`editor.action.diffReview.prev`,Cd.id),C(Cd);var Ed=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Dd=function(e,t){return function(n,r){t(n,r,e)}},Od,kd=new k(`selectionAnchorSet`,!1),Ad=class{static{Od=this}static{this.ID=`editor.contrib.selectionAnchorController`}static get(e){return e.getContribution(Od.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=kd.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(B.fromPositions(e,e),{description:`selection-anchor`,stickiness:1,hoverMessage:new Mt().appendText(M(834,`Selection Anchor`)),className:`selection-anchor`})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),sa(M(835,`Anchor set at {0}:{1}`,e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(B.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Ad=Od=Ed([Dd(1,ft)],Ad);var jd=class extends K{constructor(){super({id:`editor.action.setSelectionAnchor`,label:T(836,`Set Selection Anchor`),precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:Mr(2089,2080),weight:100}})}async run(e,t){Ad.get(t)?.setSelectionAnchor()}},Md=class extends K{constructor(){super({id:`editor.action.goToSelectionAnchor`,label:T(837,`Go to Selection Anchor`),precondition:kd})}async run(e,t){Ad.get(t)?.goToSelectionAnchor()}},Nd=class extends K{constructor(){super({id:`editor.action.selectFromAnchorToCursor`,label:T(838,`Select from Anchor to Cursor`),precondition:kd,kbOpts:{kbExpr:O.editorTextFocus,primary:Mr(2089,2089),weight:100}})}async run(e,t){Ad.get(t)?.selectFromAnchorToCursor()}},Pd=class extends K{constructor(){super({id:`editor.action.cancelSelectionAnchor`,label:T(839,`Cancel Selection Anchor`),precondition:kd,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}async run(e,t){Ad.get(t)?.cancelSelectionAnchor()}};X(Ad.ID,Ad,4),L(jd),L(Md),L(Nd),L(Pd);var Fd=S(`editorOverviewRuler.bracketMatchForeground`,`#A0A0A0`,M(840,`Overview ruler marker color for matching brackets.`)),Id=class extends K{constructor(){super({id:`editor.action.jumpToBracket`,label:T(842,`Go to Bracket`),precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){Bd.get(t)?.jumpToBracket()}},Ld=class extends K{constructor(){super({id:`editor.action.selectToBracket`,label:T(843,`Select to Bracket`),precondition:void 0,metadata:{description:T(844,`Select the text inside and including the brackets or curly braces`),args:[{name:`args`,schema:{type:`object`,properties:{selectBrackets:{type:`boolean`,default:!0}}}}]}})}run(e,t,n){let r=!0;n&&n.selectBrackets===!1&&(r=!1),Bd.get(t)?.selectToBracket(r)}},Rd=class extends K{constructor(){super({id:`editor.action.removeBrackets`,label:T(845,`Remove Brackets`),precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){Bd.get(t)?.removeBrackets(this.id)}},zd=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},Bd=class e extends U{static{this.ID=`editor.contrib.bracketMatchingController`}static get(t){return t.getContribution(e.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Gs(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(e=>{this._matchBrackets!==`never`&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(e=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(t=>{let n=t.getStartPosition(),r=e.bracketPairs.matchBracket(n),i=null;if(r)r[0].containsPosition(n)&&!r[1].containsPosition(n)?i=r[1].getStartPosition():r[1].containsPosition(n)&&(i=r[0].getStartPosition());else{let t=e.bracketPairs.findEnclosingBrackets(n);if(t)i=t[1].getStartPosition();else{let t=e.bracketPairs.findNextBracket(n);t&&t.range&&(i=t.range.getStartPosition())}}return i?new B(i.lineNumber,i.column,i.lineNumber,i.column):new B(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let i=r.getStartPosition(),a=t.bracketPairs.matchBracket(i);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(i),!a)){let e=t.bracketPairs.findNextBracket(i);e&&e.range&&(a=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(A.compareRangesUsingStarts);let[t,n]=a;if(o=e?t.getStartPosition():t.getEndPosition(),s=e?n.getEndPosition():n.getStartPosition(),n.containsPosition(i)){let e=o;o=s,s=e}}o&&s&&n.push(new B(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),i=t.bracketPairs.matchBracket(r);i||=t.bracketPairs.findEnclosingBrackets(r),i&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:i[0],text:``},{range:i[1],text:``}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Y.register({description:`bracket-match-overview`,stickiness:1,className:`bracket-match`,inlineClassName:`bracket-match-inline`,overviewRuler:{color:rn(Fd),position:ce.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Y.register({description:`bracket-match-no-overview`,stickiness:1,className:`bracket-match`,inlineClassName:`bracket-match-inline`})}_updateBrackets(){if(this._matchBrackets===`never`)return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getSelections();if(t.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let n=this._editor.getModel(),r=n.getVersionId(),i=[];this._lastVersionId===r&&(i=this._lastBracketsData);let a=[],o=0;for(let e=0,n=t.length;e1&&a.sort(j.compare);let s=[],c=0,l=0,u=i.length;for(let t=0,r=a.length;t{let n=e.getColor(Si);n&&t.addRule(`.monaco-editor .bracket-match-inline { color: ${n} !important; }`)});var Vd=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,i=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&i===e.getLineMaxColumn(n)))if(this._isMovingLeft){let a=new A(n,r-1,n,r),o=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new A(n,i,n,i),o)}else{let a=new A(n,i,n,i+1),o=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new A(n,r,n,r),o)}}computeCursorState(e,t){return this._isMovingLeft?new B(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new B(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}},Hd=class extends K{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let e of r)n.push(new Vd(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},Ud=class extends Hd{constructor(){super(!0,{id:`editor.action.moveCarretLeftAction`,label:T(846,`Move Selected Text Left`),precondition:O.writable})}},Wd=class extends Hd{constructor(){super(!1,{id:`editor.action.moveCarretRightAction`,label:T(847,`Move Selected Text Right`),precondition:O.writable})}};L(Ud),L(Wd),L(class extends K{constructor(){super({id:`editor.action.transposeLetters`,label:T(848,`Transpose Letters`),precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],i=t.getSelections();for(let e of i){if(!e.isEmpty())continue;let t=e.startLineNumber,i=e.startColumn,a=n.getLineMaxColumn(t);if(t===1&&(i===1||i===2&&a===2))continue;let o=i===a?e.getPosition():Na.rightPosition(n,e.getPosition().lineNumber,e.getPosition().column),s=Na.leftPosition(n,o),c=Na.leftPosition(n,s),l=n.getValueInRange(A.fromPositions(c,s)),u=n.getValueInRange(A.fromPositions(s,o)),d=A.fromPositions(c,o);r.push(new Rc(d,u+l))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}});var Gd=class e{static{this.sep=`.`}static{this.None=new e(`@@none@@`)}static{this.Empty=new e(``)}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(t){return this.equals(t)||this.value===``||t.value.startsWith(this.value+e.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...t){return new e((this.value?[this.value,...t]:t).join(e.sep))}},Kd=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qd=function(e,t){return function(n,r){t(n,r,e)}},Jd=Y.register({description:`inline-progress-widget`,stickiness:1,showIfCollapsed:!0,after:{content:`\xA0`,inlineClassName:`inline-editor-progress-decoration`,inlineClassNameAffectsLetterSpacing:!0}}),Yd=class e extends U{static{this.baseId=`editor.widget.inlineProgressWidget`}constructor(e,t,n,r,i){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=q(`.inline-progress-widget`),this.domNode.role=`button`,this.domNode.title=e;let t=q(`span.icon`);this.domNode.append(t),t.classList.add(...P.asClassNameArray(x.loading),`codicon-modifier-spin`);let n=()=>{let e=this.editor.getOption(75);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};n(),this._register(this.editor.onDidChangeConfiguration(e=>{(e.hasChanged(61)||e.hasChanged(75))&&n()})),this._register(H(this.domNode,Zl.CLICK,e=>{this.delegate.cancel()}))}getId(){return e.baseId+`.`+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}},Xd=class extends U{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new bs),this._currentWidget=this._register(new bs),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,n,r,i){let a=this._operationIdPool++;this._currentOperation=a,this.clear(),this._showPromise.value=Pn(()=>{let n=A.fromPositions(e);this._currentDecorations.set([{range:n,options:Jd}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(Yd,this.id,this._editor,n,t,r))},i??this._showDelay);try{return await n}finally{this._currentOperation===a&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Xd=Kd([qd(2,W)],Xd);var Zd=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Qd=function(e,t){return function(n,r){t(n,r,e)}},$d,ef=class{static{$d=this}static{this.ID=`editor.contrib.messageController`}static{this.MESSAGE_VISIBLE=new k(`messageVisible`,!1,M(1333,`Whether the editor is currently showing an inline message`))}static get(e){return e.getContribution($d.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new bs,this._messageListeners=new G,this._mouseOverMessage=!1,this._editor=e,this._visible=$d.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(sa(od(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),od(e)){let n=this._messageListeners.add(Fs(e,{actionHandler:(e,t)=>{this.closeMessage(),Kn(this._openerService,e,t.isTrusted)}}));this._messageWidget.value=new tf(this._editor,t,n.element)}else this._messageWidget.value=new tf(this._editor,t,e);this._messageListeners.add(xr.debounce(this._editor.onDidBlurEditorText,(e,t)=>t,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&jn(Ua(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(H(this._messageWidget.value.getDomNode(),Zl.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(H(this._messageWidget.value.getDomNode(),Zl.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(e=>{e.target.position&&(n?n.containsPosition(e.target.position)||this.closeMessage():n=new A(t.lineNumber-3,1,e.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(tf.fadeOut(this._messageWidget.value))}};ef=$d=Zd([Qd(1,ft),Qd(2,Ks)],ef),V(new(Ra.bindToContribution(ef.get))({id:`leaveEditorMessage`,precondition:ef.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));var tf=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener(`animationend`,t)},n=setTimeout(t,110);return e.getDomNode().addEventListener(`animationend`,t),e.getDomNode().classList.add(`fadeOut`),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement(`div`),this._domNode.classList.add(`monaco-editor-overlaymessage`),this._domNode.style.marginLeft=`-6px`;let i=document.createElement(`div`);i.classList.add(`anchor`,`top`),this._domNode.appendChild(i);let a=document.createElement(`div`);typeof r==`string`?(a.classList.add(`message`),a.textContent=r):(r.classList.add(`message`),a.appendChild(r)),this._domNode.appendChild(a);let o=document.createElement(`div`);o.classList.add(`anchor`,`below`),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add(`fadeIn`)}dispose(){this._editor.removeContentWidget(this)}getId(){return`messageoverlay`}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle(`below`,e===2)}};X(ef.ID,ef,4);var nf=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},rf=function(e,t){return function(n,r){t(n,r,e)}},af=class{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,n,r,i){let a=await this.getEdit(n,i);if(a)return{edits:[{insertText:a.insertText,title:a.title,kind:a.kind,handledMimeType:a.handledMimeType,yieldTo:a.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,n,r){let i=await this.getEdit(n,r);if(i)return{edits:[{insertText:i.insertText,title:i.title,kind:i.kind,handledMimeType:i.handledMimeType,yieldTo:i.yieldTo}],dispose(){}}}},of=class e extends af{static{this.id=`text`}constructor(){super(Gd.Empty.append(`text`,`plain`)),this.id=e.id,this.dropMimeTypes=[pa.text],this.pasteMimeTypes=[pa.text]}async getEdit(e,t){let n=e.get(pa.text);if(!n||e.has(pa.uriList))return;let r=await n.asString();return{handledMimeType:pa.text,title:M(965,`Insert Plain Text`),insertText:r,kind:this.kind}}},sf=class extends af{constructor(){super(Gd.Empty.append(`uri`,`path`,`absolute`)),this.dropMimeTypes=[pa.uriList],this.pasteMimeTypes=[pa.uriList]}async getEdit(e,t){let n=await uf(e);if(!n.length||t.isCancellationRequested)return;let r=0,i=n.map(({uri:e,originalText:t})=>e.scheme===he.file?e.fsPath:(r++,t)).join(` `),a;return a=r>0?n.length>1?M(966,`Insert Uris`):M(967,`Insert Uri`):n.length>1?M(968,`Insert Paths`):M(969,`Insert Path`),{handledMimeType:pa.uriList,insertText:i,title:a,kind:this.kind}}},cf=class extends af{constructor(e){super(Gd.Empty.append(`uri`,`path`,`relative`)),this._workspaceContextService=e,this.dropMimeTypes=[pa.uriList],this.pasteMimeTypes=[pa.uriList]}async getEdit(e,t){let n=await uf(e);if(!n.length||t.isCancellationRequested)return;let r=pr(n.map(({uri:e})=>{let t=this._workspaceContextService.getWorkspaceFolder(e);return t?Yn(t.uri,e):void 0}));if(r.length)return{handledMimeType:pa.uriList,insertText:r.join(` `),title:n.length>1?M(970,`Insert Relative Paths`):M(971,`Insert Relative Path`),kind:this.kind}}};cf=nf([rf(0,lo)],cf);var lf=class{constructor(){this.kind=new Gd(`html`),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=[`text/html`],this._yieldTo=[{mimeType:pa.text}]}async provideDocumentPasteEdits(e,t,n,r,i){if(r.triggerKind!==bc.PasteAs&&!r.only?.contains(this.kind))return;let a=await n.get(`text/html`)?.asString();if(!(!a||i.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:M(972,`Insert HTML`),kind:this.kind}]}}};async function uf(e){let t=e.get(pa.uriList);if(!t)return[];let n=await t.asString(),r=[];for(let e of Zo.parse(n))try{r.push({uri:lr.parse(e),originalText:e})}catch{}return r}var df={scheme:`*`,hasAccessToAllModels:!0},ff=class extends U{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(df,new of)),this._register(e.documentDropEditProvider.register(df,new sf)),this._register(e.documentDropEditProvider.register(df,new cf(t)))}};ff=nf([rf(0,R),rf(1,lo)],ff);var pf=class extends U{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(df,new of)),this._register(e.documentPasteEditProvider.register(df,new sf)),this._register(e.documentPasteEditProvider.register(df,new cf(t))),this._register(e.documentPasteEditProvider.register(df,new lf))}};pf=nf([rf(0,R),rf(1,lo)],pf);var mf=class e{constructor(){this.value=``,this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let t=this.pos,n=0,r=this.value.charCodeAt(t),i;if(i=e._table[r],typeof i==`number`)return this.pos+=1,{type:i,pos:t,len:1};if(e.isDigitCharacter(r)){i=8;do n+=1,r=this.value.charCodeAt(t+n);while(e.isDigitCharacter(r));return this.pos+=n,{type:i,pos:t,len:n}}if(e.isVariableCharacter(r)){i=9;do r=this.value.charCodeAt(t+ ++n);while(e.isVariableCharacter(r)||e.isDigitCharacter(r));return this.pos+=n,{type:i,pos:t,len:n}}i=10;do n+=1,r=this.value.charCodeAt(t+n);while(!isNaN(r)&&e._table[r]===void 0&&!e.isDigitCharacter(r)&&!e.isVariableCharacter(r));return this.pos+=n,{type:i,pos:t,len:n}}},hf=class{constructor(){this._children=[]}appendChild(e){return e instanceof gf&&this._children[this._children.length-1]instanceof gf?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),i=n.children.slice(0);i.splice(r,1,...t),n._children=i,(function e(t,n){for(let r of t)r.parent=n,e(r.children,r)})(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof wf)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),``)}len(){return 0}},gf=class e extends hf{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new e(this.value)}},_f=class extends hf{},vf=class e extends _f{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index)}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof yf?this._children[0]:void 0}clone(){let t=new e(this.index);return this.transform&&(t.transform=this.transform.clone()),t._children=this.children.map(e=>e.clone()),t}},yf=class e extends hf{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof gf&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let t=new e;return this.options.forEach(t.appendChild,t),t}},bf=class e extends hf{constructor(){super(...arguments),this.regexp=RegExp(``)}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(e=>e instanceof xf&&!!e.elseValue)&&(r=this._replace([])),r}_replace(e){let t=``;for(let n of this._children)if(n instanceof xf){let r=e[n.index]||``;r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return``}clone(){let t=new e;return t.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?`i`:``)+(this.regexp.global?`g`:``)),t._children=this.children.map(e=>e.clone()),t}},xf=class e extends hf{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName===`upcase`?e?e.toLocaleUpperCase():``:this.shorthandName===`downcase`?e?e.toLocaleLowerCase():``:this.shorthandName===`capitalize`?e?e[0].toLocaleUpperCase()+e.substr(1):``:this.shorthandName===`pascalcase`?e?this._toPascalCase(e):``:this.shorthandName===`camelcase`?e?this._toCamelCase(e):``:this.shorthandName===`kebabcase`?e?this._toKebabCase(e):``:this.shorthandName===`snakecase`?e?this._toSnakeCase(e):``:e&&typeof this.ifValue==`string`?this.ifValue:!e&&typeof this.elseValue==`string`?this.elseValue:e||``}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,``).replace(/[\s_]+/g,`-`);let t=e.trim().replace(/^_+|_+$/g,``),n=t.match(/\p{Lu}{2,}(?=\p{Lu}\p{Ll}+[0-9]*|[\s_-]|$)|\p{Lu}?\p{Ll}+[0-9]*|\p{Lu}(?=\p{Lu}\p{Ll})|\p{Lu}(?=[\s_-]|$)|[0-9]+/gu);return n?n.map(e=>e.toLowerCase()).join(`-`):t.split(/[\s_-]+/).filter(e=>e.length>0).map(e=>e.toLowerCase()).join(`-`)}_toPascalCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map(e=>e.charAt(0).toUpperCase()+e.substr(1)).join(``):e}_toCamelCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map((e,t)=>t===0?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1)).join(``):e}_toSnakeCase(e){return e.replace(/(\p{Ll})(\p{Lu})/gu,`$1_$2`).replace(/[\s\-]+/g,`_`).toLowerCase()}clone(){return new e(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Sf=class e extends _f{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||``)),t===void 0?!1:(this._children=[new gf(t)],!0)}clone(){let t=new e(this.name);return this.transform&&(t.transform=this.transform.clone()),t._children=this.children.map(e=>e.clone()),t}};function Cf(e,t){let n=[...e];for(;n.length>0;){let e=n.shift();if(!t(e))break;n.unshift(...e.children)}}var wf=class e extends hf{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof vf&&(e.push(n),t=!t||t.indexr===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return Cf([e],e=>(t+=e.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof vf&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Sf&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let t=new e;return t._children=this.children.map(e=>e.clone()),t}walk(e){Cf(this.children,e)}},Tf=class{constructor(){this._scanner=new mf,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,`\\$&`)}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new wf;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n??!1,t??!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,i=[];t.walk(e=>(e instanceof vf&&(e.isFinalTabstop?r.set(0,void 0):!r.has(e.index)&&e.children.length>0?r.set(e.index,e.children):i.push(e)),!0));let a=(e,n)=>{let i=r.get(e.index);if(!i)return;let o=new vf(e.index);o.transform=e.transform;for(let e of i){let t=e.clone();o.appendChild(t),t instanceof vf&&r.has(t.index)&&!n.has(t.index)&&(n.add(t.index),a(t,n),n.delete(t.index))}t.replace(e,[o])},o=new Set;for(let e of i)a(e,o);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(e=>e.index===0)||e.appendChild(new vf(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let e=this._scanner.next();if(e.type!==0&&e.type!==4&&e.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,`$1`);return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new gf(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new vf(Number(t)):new Sf(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let r=new vf(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new gf("${"+t+`:`)),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){let t=new yf;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(t),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else if(this._accept(6))return this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1);else if(this._accept(4))return e.appendChild(r),!0;else return this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;n.push(e)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new gf(n.join(``))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let r=new Sf(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new gf("${"+t+`:`)),r.children.forEach(e.appendChild,e),!0}else if(this._accept(6))return this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1);else if(this._accept(4))return e.appendChild(r),!0;else return this._backTo(n)}_parseTransform(e){let t=new bf,n=``,r=``;for(;!this._accept(6);){let e;if(e=this._accept(5,!0)){e=this._accept(6,!0)||e,n+=e;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let e;if(e=this._accept(5,!0)){e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new gf(e));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(!r)return this._backTo(t),!1;if(!n||this._accept(4))return e.appendChild(new xf(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return!n||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new xf(Number(r),n)),!0)}else if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new xf(Number(r),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new xf(Number(r),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let n=this._until(4);if(n)return e.appendChild(new xf(Number(r),void 0,t,n)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new xf(Number(r),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type===14?!1:(e.appendChild(new gf(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}};function Ef(e,t,n){return(typeof n.insertText==`string`?n.insertText===``:n.insertText.snippet===``)?{edits:n.additionalEdit?.edits??[]}:{edits:[...t.map(t=>new Wc(e,{range:t,text:typeof n.insertText==`string`?Tf.escape(n.insertText)+`$0`:n.insertText.snippet,insertAsSnippet:!0})),...n.additionalEdit?.edits??[]]}}function Df(e){function t(e,t){return`mimeType`in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}let n=new Map;for(let r of e)for(let i of r.yieldTo??[])for(let a of e)if(a!==r&&t(i,a)){let e=n.get(r);e||(e=[],n.set(r,e)),e.push(a)}if(!n.size)return Array.from(e);let r=new Set,i=[];function a(e){if(!e.length)return[];let t=e[0];if(i.includes(t))return console.warn(`Yield to cycle detected`,t),e;if(r.has(t))return a(e.slice(1));let o=[],s=n.get(t);return s&&(i.push(t),o=a(s),i.pop()),r.add(t),[...o,t,...a(e.slice(1))]}return a(Array.from(e))}function Of(e,t){return t&&(e.stack||e.stacktrace)?M(33,`{0}: {1}`,Af(e),kf(e.stack)||kf(e.stacktrace)):Af(e)}function kf(e){return Array.isArray(e)?e.join(` +import{$ as e,$a as t,$c as n,$d as r,$i as i,$l as a,$n as o,$o as s,$r as c,$s as l,$t as u,$u as d,A as f,Aa as p,Ac as m,Ad as h,Ai as g,Al as _,An as v,Ao as y,Ar as b,As as ee,At as te,Au as x,B as ne,Ba as S,Bc as re,Bd as ie,Bi as ae,Bl as oe,Bn as se,Bo as ce,Br as le,Bs as C,Bt as ue,Bu as w,C as de,Ca as fe,Cc as pe,Cd as T,Ci as me,Cl as he,Cn as ge,Co as _e,Cr as ve,Cs as ye,Ct as be,Cu as xe,D as Se,Da as Ce,Dc as we,Dd as Te,Di as Ee,Dl as De,Dn as Oe,Do as ke,Dr as Ae,Ds as je,Dt as Me,Du as Ne,E as Pe,Ea as Fe,Ec as Ie,Ed as Le,Ei as Re,El as ze,En as Be,Eo as Ve,Er as He,Es as Ue,Et as We,Eu as Ge,F as Ke,Fa as qe,Fc as Je,Fd as Ye,Fi as Xe,Fl as Ze,Fn as Qe,Fo as $e,Fr as et,Fs as E,Ft as tt,Fu as nt,G as rt,Ga as it,Gc as at,Gd as ot,Gi as st,Gl as ct,Gn as lt,Go as ut,Gr as dt,Gs as ft,Gt as pt,Gu as mt,H as ht,Ha as gt,Hc as _t,Hd as vt,Hi as yt,Hl as bt,Hn as xt,Ho as St,Hr as Ct,Hs as wt,Ht as Tt,Hu as Et,I as Dt,Ia as Ot,Ic as D,Id as kt,Ii as At,Il as jt,In as Mt,Io as Nt,Ir as Pt,Is as Ft,It,Iu as Lt,J as Rt,Ja as zt,Jc as Bt,Jd as Vt,Ji as Ht,Jl as Ut,Jn as Wt,Jo as Gt,Jr as O,Js as Kt,Jt as qt,Ju as Jt,K as Yt,Ka as Xt,Kc as Zt,Kd as Qt,Ki as $t,Kl as en,Kn as tn,Ko as nn,Kr as rn,Ks as k,Kt as an,L as on,La as sn,Lc as cn,Ld as ln,Li as un,Ll as dn,Ln as fn,Lo as pn,Lr as mn,Ls as hn,Lt as gn,Lu as _n,M as vn,Ma as yn,Mc as bn,Md as xn,Mi as Sn,Ml as Cn,Mn as wn,Mo as Tn,Mr as En,Ms as Dn,Mt as On,Mu as A,N as kn,Na as An,Nc as jn,Nd as Mn,Ni as Nn,Nl as Pn,Nn as Fn,No as In,Nr as Ln,Ns as Rn,Nt as zn,Nu as j,O as Bn,Oa as Vn,Oc as Hn,Od as Un,Oi as Wn,Ol as Gn,On as Kn,Oo as qn,Or as Jn,Os as Yn,Ot as Xn,Ou as Zn,P as Qn,Pa as $n,Pc as er,Pd as tr,Pi as nr,Pl as rr,Pn as ir,Po as ar,Pr as or,Ps as sr,Pt as cr,Pu as lr,Q as ur,Qa as dr,Qc as fr,Qd as pr,Qi as mr,Ql as hr,Qn as gr,Qo as _r,Qr as vr,Qs as yr,Qt as br,Qu as xr,Ra as Sr,Rc as Cr,Rd as wr,Ri as Tr,Rl as Er,Rn as Dr,Ro as Or,Rr as kr,Rs as Ar,Rt as jr,Ru as Mr,S as Nr,Sa as Pr,Sc as Fr,Sd as M,Si as Ir,Sl as Lr,Sn as Rr,So as zr,Sr as Br,Ss as Vr,St as Hr,Su as Ur,T as Wr,Ta as Gr,Tc as Kr,Td as qr,Ti as Jr,Tl as Yr,Tn as Xr,To as Zr,Tr as Qr,Ts as $r,Tt as ei,Tu as ti,U as ni,Ua as ri,Uc as ii,Ud as ai,Ui as oi,Ul as si,Un as ci,Uo as li,Ur as ui,Us as di,Ut as fi,Uu as pi,V as mi,Va as hi,Vc as gi,Vd as _i,Vi as vi,Vl as yi,Vn as bi,Vo as xi,Vr as Si,Vs as Ci,Vt as wi,Vu as Ti,W as Ei,Wa as Di,Wc as Oi,Wd as ki,Wi as Ai,Wl as ji,Wn as Mi,Wo as Ni,Wr as Pi,Ws as N,Wt as Fi,Wu as Ii,X as Li,Xa as Ri,Xc as zi,Xd as Bi,Xi as Vi,Xl as Hi,Xn as Ui,Xo as Wi,Xr as Gi,Xs as Ki,Xt as qi,Xu as Ji,Y as Yi,Ya as Xi,Yc as Zi,Yd as Qi,Yi as $i,Yl as ea,Yn as ta,Yo as na,Yr as ra,Ys as P,Yt as ia,Yu as aa,Z as oa,Za as sa,Zc as ca,Zd as la,Zi as ua,Zl as da,Zn as fa,Zo as pa,Zr as ma,Zs as ha,Zt as ga,Zu as F,_ as _a,_a as va,_c as I,_d as ya,_i as ba,_l as xa,_n as Sa,_o as Ca,_r as wa,_s as Ta,_t as Ea,_u as Da,a as Oa,aa as ka,ac as Aa,ad as ja,af as Ma,ai as Na,al as Pa,an as Fa,ao as Ia,ar as La,as as Ra,at as za,au as Ba,b as Va,ba as Ha,bc as Ua,bd as Wa,bi as Ga,bl as Ka,bn as qa,bo as Ja,br as Ya,bs as Xa,bt as Za,bu as Qa,c as $a,ca as eo,cc as to,cd as no,cf as ro,ci as io,cl as ao,cn as oo,co as so,cr as co,cs as L,ct as lo,cu as uo,d as fo,da as po,dc as mo,dd as ho,di as go,dl as _o,dn as vo,do as R,dr as yo,ds as bo,dt as xo,du as So,ea as Co,ec as wo,ed as To,ef as Eo,ei as Do,el as Oo,en as ko,eo as Ao,er as jo,es as Mo,et as No,eu as Po,f as Fo,fa as Io,fc as Lo,fd as Ro,fi as zo,fl as Bo,fn as Vo,fo as Ho,fr as Uo,fs as Wo,ft as Go,fu as Ko,g as qo,ga as Jo,gc as Yo,gd as Xo,gi as Zo,gl as Qo,gn as $o,go as es,gr as ts,gs as ns,gt as rs,gu as is,h as as,ha as os,hc as ss,hd as cs,hi as ls,hl as us,hn as ds,ho as fs,hr as ps,hs as ms,ht as hs,hu as gs,i as _s,ia as vs,ic as ys,id as bs,if as xs,ii as Ss,il as z,in as Cs,io as ws,ir as Ts,is as Es,it as Ds,iu as Os,j as ks,ja as As,jc as js,jd as Ms,ji as Ns,jl as Ps,jn as Fs,jo as Is,jr as Ls,js as Rs,jt as zs,ju as B,k as Bs,ka as Vs,kc as Hs,kd as Us,ki as Ws,kl as Gs,kn as Ks,ko as qs,kr as Js,ks as Ys,kt as Xs,ku as Zs,l as Qs,la as $s,lc as ec,ld as tc,lf as nc,li as rc,ll as ic,ln as ac,lo as oc,lr as sc,ls as V,lt as cc,lu as lc,m as uc,ma as dc,mc as H,md as fc,mi as pc,ml as mc,mn as hc,mo as gc,mr as _c,ms as vc,mt as yc,mu as bc,n as xc,na as Sc,nc as Cc,nd as U,nf as wc,ni as Tc,nl as Ec,nn as Dc,no as Oc,nr as kc,ns as Ac,nt as jc,nu as Mc,o as Nc,oa as Pc,oc as Fc,od as Ic,of as Lc,oi as Rc,ol as zc,on as Bc,oo as Vc,or as Hc,os as Uc,ot as Wc,ou as Gc,p as Kc,pa as qc,pc as Jc,pd as Yc,pi as Xc,pl as Zc,pn as Qc,po as $c,pr as el,ps as tl,pt as nl,pu as rl,q as il,qa as al,qc as ol,qd as sl,qi as cl,ql as ll,qn as ul,qo as dl,qr as fl,qs as pl,qt as ml,qu as hl,r as gl,ra as _l,rc as W,rd as G,rf as vl,ri as yl,rl as bl,rn as xl,ro as Sl,rr as Cl,rs as K,rt as wl,ru as Tl,s as El,sa as Dl,sc as q,sd as Ol,sf as kl,si as Al,sl as J,sn as jl,so as Ml,sr as Nl,ss as Pl,st as Fl,su as Il,ta as Ll,tc as Rl,td as zl,tf as Bl,ti as Vl,tl as Hl,tn as Ul,to as Wl,tr as Gl,ts as Kl,tt as ql,tu as Jl,u as Yl,ua as Xl,uc as Zl,ud as Ql,uf as $l,ui as eu,ul as tu,un as nu,uo as ru,ur as Y,us as X,ut as iu,uu as au,v as ou,va as su,vc as cu,vd as lu,vi as uu,vl as du,vn as fu,vo as pu,vr as mu,vs as hu,vt as gu,vu as _u,w as vu,wa as yu,wc as bu,wd as xu,wi as Su,wl as Cu,wn as wu,wo as Tu,wr as Eu,ws as Du,wt as Ou,wu as ku,x as Au,xa as ju,xc as Mu,xd as Nu,xi as Pu,xl as Fu,xn as Iu,xo as Lu,xr as Ru,xs as zu,xt as Bu,xu as Vu,y as Hu,ya as Uu,yc as Wu,yd as Gu,yi as Ku,yl as qu,yn as Ju,yo as Yu,yr as Xu,ys as Zu,yt as Qu,yu as $u,z as ed,za as td,zc as nd,zd as rd,zi as id,zl as ad,zn as od,zo as sd,zr as cd,zs as ld,zt as ud,zu as dd}from"./editor.api-BJ0kNDCq.js";var fd=class extends Rn{constructor(){super({id:`diffEditor.toggleCollapseUnchangedRegions`,title:T(101,`Toggle Collapse Unchanged Regions`),icon:x.map,toggled:N.has(`config.diffEditor.hideUnchangedRegions.enabled`),precondition:N.has(`isInDiffEditor`),menu:{when:N.has(`isInDiffEditor`),id:E.EditorTitle,order:22,group:`navigation`}})}run(e,...t){let n=e.get(Mo),r=!n.getValue(`diffEditor.hideUnchangedRegions.enabled`);n.updateValue(`diffEditor.hideUnchangedRegions.enabled`,r)}},pd=class extends Rn{constructor(){super({id:`diffEditor.toggleShowMovedCodeBlocks`,title:T(102,`Toggle Show Moved Code Blocks`),precondition:N.has(`isInDiffEditor`)})}run(e,...t){let n=e.get(Mo),r=!n.getValue(`diffEditor.experimental.showMoves`);n.updateValue(`diffEditor.experimental.showMoves`,r)}},md=class extends Rn{constructor(){super({id:`diffEditor.toggleUseInlineViewWhenSpaceIsLimited`,title:T(103,`Toggle Use Inline View When Space Is Limited`),precondition:N.has(`isInDiffEditor`)})}run(e,...t){let n=e.get(Mo),r=!n.getValue(`diffEditor.useInlineViewWhenSpaceIsLimited`);n.updateValue(`diffEditor.useInlineViewWhenSpaceIsLimited`,r)}},hd=T(104,`Diff Editor`),gd=class extends Es{constructor(){super({id:`diffEditor.switchSide`,title:T(105,`Switch Side`),icon:x.arrowSwap,precondition:N.has(`isInDiffEditor`),f1:!0,category:hd})}runEditorCommand(e,t,n){let r=Td(e);if(r instanceof _a){if(n&&n.dryRun)return{destinationSelection:r.mapToOtherSide().destinationSelection};r.switchSide()}}},_d=class extends Es{constructor(){super({id:`diffEditor.exitCompareMove`,title:T(106,`Exit Compare Move`),icon:x.close,precondition:O.comparingMovedCode,f1:!1,category:hd,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){let r=Td(e);r instanceof _a&&r.exitCompareMove()}},vd=class extends Es{constructor(){super({id:`diffEditor.collapseAllUnchangedRegions`,title:T(107,`Collapse All Unchanged Regions`),icon:x.fold,precondition:N.has(`isInDiffEditor`),f1:!0,category:hd})}runEditorCommand(e,t,...n){let r=Td(e);r instanceof _a&&r.collapseAllUnchangedRegions()}},yd=class extends Es{constructor(){super({id:`diffEditor.showAllUnchangedRegions`,title:T(108,`Show All Unchanged Regions`),icon:x.unfold,precondition:N.has(`isInDiffEditor`),f1:!0,category:hd})}runEditorCommand(e,t,...n){let r=Td(e);r instanceof _a&&r.showAllUnchangedRegions()}},bd=class extends Rn{constructor(){super({id:`diffEditor.revert`,title:T(109,`Revert`),f1:!0,category:hd,precondition:N.has(`isInDiffEditor`)})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){let t=Td(e);t instanceof _a&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){let n=wd(e,t.originalUri,t.modifiedUri);n instanceof _a&&n.revertRangeMappings(t.mapping.innerChanges??[])}},xd=T(110,`Accessible Diff Viewer`),Sd=class e extends Rn{static{this.id=`editor.action.accessibleDiffViewer.next`}constructor(){super({id:e.id,title:T(111,`Go to Next Difference`),category:xd,precondition:N.has(`isInDiffEditor`),keybinding:{primary:65,weight:100},f1:!0})}run(e){Td(e)?.accessibleDiffViewerNext()}},Cd=class e extends Rn{static{this.id=`editor.action.accessibleDiffViewer.prev`}constructor(){super({id:e.id,title:T(112,`Go to Previous Difference`),category:xd,precondition:N.has(`isInDiffEditor`),keybinding:{primary:1089,weight:100},f1:!0})}run(e){Td(e)?.accessibleDiffViewerPrev()}};function wd(e,t,n){return e.get(Cc).listDiffEditors().find(e=>{let r=e.getModifiedEditor(),i=e.getOriginalEditor();return r&&r.getModel()?.uri.toString()===n.toString()&&i&&i.getModel()?.uri.toString()===t.toString()})||null}function Td(e){let t=e.get(Cc).listDiffEditors(),n=Ua();if(n){for(let e of t)if(e.getContainerDomNode().contains(n))return e}return null}C(fd),C(pd),C(md),hn.appendMenuItem(E.EditorTitle,{command:{id:new md().desc.id,title:M(135,`Use Inline View When Space Is Limited`),toggled:N.has(`config.diffEditor.useInlineViewWhenSpaceIsLimited`),precondition:N.has(`isInDiffEditor`)},order:11,group:`1_diff`,when:N.and(O.diffEditorRenderSideBySideInlineBreakpointReached,N.has(`isInDiffEditor`))}),hn.appendMenuItem(E.EditorTitle,{command:{id:new pd().desc.id,title:M(136,`Show Moved Code Blocks`),icon:x.move,toggled:di.create(`config.diffEditor.experimental.showMoves`,!0),precondition:N.has(`isInDiffEditor`)},order:10,group:`1_diff`,when:N.has(`isInDiffEditor`)}),C(bd);for(let e of[{icon:x.arrowRight,key:O.diffEditorInlineMode.toNegated()},{icon:x.discard,key:O.diffEditorInlineMode}])hn.appendMenuItem(E.DiffEditorHunkToolbar,{command:{id:new bd().desc.id,title:M(137,`Revert Block`),icon:e.icon},when:N.and(O.diffEditorModifiedWritable,e.key),order:5,group:`primary`}),hn.appendMenuItem(E.DiffEditorSelectionToolbar,{command:{id:new bd().desc.id,title:M(138,`Revert Selection`),icon:e.icon},when:N.and(O.diffEditorModifiedWritable,e.key),order:5,group:`primary`});C(gd),C(_d),C(vd),C(yd),hn.appendMenuItem(E.EditorTitle,{command:{id:Sd.id,title:M(139,`Open Accessible Diff Viewer`),precondition:N.has(`isInDiffEditor`)},order:10,group:`2_diff`,when:N.and(O.accessibleDiffViewerVisible.negate(),N.has(`isInDiffEditor`))}),pl.registerCommandAlias(`editor.action.diffReview.next`,Sd.id),C(Sd),pl.registerCommandAlias(`editor.action.diffReview.prev`,Cd.id),C(Cd);var Ed=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Dd=function(e,t){return function(n,r){t(n,r,e)}},Od,kd=new k(`selectionAnchorSet`,!1),Ad=class{static{Od=this}static{this.ID=`editor.contrib.selectionAnchorController`}static get(e){return e.getContribution(Od.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=kd.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(B.fromPositions(e,e),{description:`selection-anchor`,stickiness:1,hoverMessage:new Mt().appendText(M(834,`Selection Anchor`)),className:`selection-anchor`})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),sa(M(835,`Anchor set at {0}:{1}`,e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(B.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Ad=Od=Ed([Dd(1,ft)],Ad);var jd=class extends K{constructor(){super({id:`editor.action.setSelectionAnchor`,label:T(836,`Set Selection Anchor`),precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:Mr(2089,2080),weight:100}})}async run(e,t){Ad.get(t)?.setSelectionAnchor()}},Md=class extends K{constructor(){super({id:`editor.action.goToSelectionAnchor`,label:T(837,`Go to Selection Anchor`),precondition:kd})}async run(e,t){Ad.get(t)?.goToSelectionAnchor()}},Nd=class extends K{constructor(){super({id:`editor.action.selectFromAnchorToCursor`,label:T(838,`Select from Anchor to Cursor`),precondition:kd,kbOpts:{kbExpr:O.editorTextFocus,primary:Mr(2089,2089),weight:100}})}async run(e,t){Ad.get(t)?.selectFromAnchorToCursor()}},Pd=class extends K{constructor(){super({id:`editor.action.cancelSelectionAnchor`,label:T(839,`Cancel Selection Anchor`),precondition:kd,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}async run(e,t){Ad.get(t)?.cancelSelectionAnchor()}};X(Ad.ID,Ad,4),L(jd),L(Md),L(Nd),L(Pd);var Fd=S(`editorOverviewRuler.bracketMatchForeground`,`#A0A0A0`,M(840,`Overview ruler marker color for matching brackets.`)),Id=class extends K{constructor(){super({id:`editor.action.jumpToBracket`,label:T(842,`Go to Bracket`),precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){Bd.get(t)?.jumpToBracket()}},Ld=class extends K{constructor(){super({id:`editor.action.selectToBracket`,label:T(843,`Select to Bracket`),precondition:void 0,metadata:{description:T(844,`Select the text inside and including the brackets or curly braces`),args:[{name:`args`,schema:{type:`object`,properties:{selectBrackets:{type:`boolean`,default:!0}}}}]}})}run(e,t,n){let r=!0;n&&n.selectBrackets===!1&&(r=!1),Bd.get(t)?.selectToBracket(r)}},Rd=class extends K{constructor(){super({id:`editor.action.removeBrackets`,label:T(845,`Remove Brackets`),precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){Bd.get(t)?.removeBrackets(this.id)}},zd=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},Bd=class e extends U{static{this.ID=`editor.contrib.bracketMatchingController`}static get(t){return t.getContribution(e.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Gs(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(e=>{this._matchBrackets!==`never`&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(e=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(t=>{let n=t.getStartPosition(),r=e.bracketPairs.matchBracket(n),i=null;if(r)r[0].containsPosition(n)&&!r[1].containsPosition(n)?i=r[1].getStartPosition():r[1].containsPosition(n)&&(i=r[0].getStartPosition());else{let t=e.bracketPairs.findEnclosingBrackets(n);if(t)i=t[1].getStartPosition();else{let t=e.bracketPairs.findNextBracket(n);t&&t.range&&(i=t.range.getStartPosition())}}return i?new B(i.lineNumber,i.column,i.lineNumber,i.column):new B(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let i=r.getStartPosition(),a=t.bracketPairs.matchBracket(i);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(i),!a)){let e=t.bracketPairs.findNextBracket(i);e&&e.range&&(a=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(A.compareRangesUsingStarts);let[t,n]=a;if(o=e?t.getStartPosition():t.getEndPosition(),s=e?n.getEndPosition():n.getStartPosition(),n.containsPosition(i)){let e=o;o=s,s=e}}o&&s&&n.push(new B(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),i=t.bracketPairs.matchBracket(r);i||=t.bracketPairs.findEnclosingBrackets(r),i&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:i[0],text:``},{range:i[1],text:``}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Y.register({description:`bracket-match-overview`,stickiness:1,className:`bracket-match`,inlineClassName:`bracket-match-inline`,overviewRuler:{color:rn(Fd),position:ce.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Y.register({description:`bracket-match-no-overview`,stickiness:1,className:`bracket-match`,inlineClassName:`bracket-match-inline`})}_updateBrackets(){if(this._matchBrackets===`never`)return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getSelections();if(t.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let n=this._editor.getModel(),r=n.getVersionId(),i=[];this._lastVersionId===r&&(i=this._lastBracketsData);let a=[],o=0;for(let e=0,n=t.length;e1&&a.sort(j.compare);let s=[],c=0,l=0,u=i.length;for(let t=0,r=a.length;t{let n=e.getColor(Si);n&&t.addRule(`.monaco-editor .bracket-match-inline { color: ${n} !important; }`)});var Vd=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,i=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&i===e.getLineMaxColumn(n)))if(this._isMovingLeft){let a=new A(n,r-1,n,r),o=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new A(n,i,n,i),o)}else{let a=new A(n,i,n,i+1),o=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new A(n,r,n,r),o)}}computeCursorState(e,t){return this._isMovingLeft?new B(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new B(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}},Hd=class extends K{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let e of r)n.push(new Vd(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},Ud=class extends Hd{constructor(){super(!0,{id:`editor.action.moveCarretLeftAction`,label:T(846,`Move Selected Text Left`),precondition:O.writable})}},Wd=class extends Hd{constructor(){super(!1,{id:`editor.action.moveCarretRightAction`,label:T(847,`Move Selected Text Right`),precondition:O.writable})}};L(Ud),L(Wd),L(class extends K{constructor(){super({id:`editor.action.transposeLetters`,label:T(848,`Transpose Letters`),precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],i=t.getSelections();for(let e of i){if(!e.isEmpty())continue;let t=e.startLineNumber,i=e.startColumn,a=n.getLineMaxColumn(t);if(t===1&&(i===1||i===2&&a===2))continue;let o=i===a?e.getPosition():Na.rightPosition(n,e.getPosition().lineNumber,e.getPosition().column),s=Na.leftPosition(n,o),c=Na.leftPosition(n,s),l=n.getValueInRange(A.fromPositions(c,s)),u=n.getValueInRange(A.fromPositions(s,o)),d=A.fromPositions(c,o);r.push(new Rc(d,u+l))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}});var Gd=class e{static{this.sep=`.`}static{this.None=new e(`@@none@@`)}static{this.Empty=new e(``)}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(t){return this.equals(t)||this.value===``||t.value.startsWith(this.value+e.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...t){return new e((this.value?[this.value,...t]:t).join(e.sep))}},Kd=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qd=function(e,t){return function(n,r){t(n,r,e)}},Jd=Y.register({description:`inline-progress-widget`,stickiness:1,showIfCollapsed:!0,after:{content:`\xA0`,inlineClassName:`inline-editor-progress-decoration`,inlineClassNameAffectsLetterSpacing:!0}}),Yd=class e extends U{static{this.baseId=`editor.widget.inlineProgressWidget`}constructor(e,t,n,r,i){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=q(`.inline-progress-widget`),this.domNode.role=`button`,this.domNode.title=e;let t=q(`span.icon`);this.domNode.append(t),t.classList.add(...P.asClassNameArray(x.loading),`codicon-modifier-spin`);let n=()=>{let e=this.editor.getOption(75);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};n(),this._register(this.editor.onDidChangeConfiguration(e=>{(e.hasChanged(61)||e.hasChanged(75))&&n()})),this._register(H(this.domNode,Zl.CLICK,e=>{this.delegate.cancel()}))}getId(){return e.baseId+`.`+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}},Xd=class extends U{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new bs),this._currentWidget=this._register(new bs),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,n,r,i){let a=this._operationIdPool++;this._currentOperation=a,this.clear(),this._showPromise.value=Pn(()=>{let n=A.fromPositions(e);this._currentDecorations.set([{range:n,options:Jd}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(Yd,this.id,this._editor,n,t,r))},i??this._showDelay);try{return await n}finally{this._currentOperation===a&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Xd=Kd([qd(2,W)],Xd);var Zd=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Qd=function(e,t){return function(n,r){t(n,r,e)}},$d,ef=class{static{$d=this}static{this.ID=`editor.contrib.messageController`}static{this.MESSAGE_VISIBLE=new k(`messageVisible`,!1,M(1333,`Whether the editor is currently showing an inline message`))}static get(e){return e.getContribution($d.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new bs,this._messageListeners=new G,this._mouseOverMessage=!1,this._editor=e,this._visible=$d.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(sa(od(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),od(e)){let n=this._messageListeners.add(Fs(e,{actionHandler:(e,t)=>{this.closeMessage(),Kn(this._openerService,e,t.isTrusted)}}));this._messageWidget.value=new tf(this._editor,t,n.element)}else this._messageWidget.value=new tf(this._editor,t,e);this._messageListeners.add(xr.debounce(this._editor.onDidBlurEditorText,(e,t)=>t,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&jn(Ua(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(H(this._messageWidget.value.getDomNode(),Zl.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(H(this._messageWidget.value.getDomNode(),Zl.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(e=>{e.target.position&&(n?n.containsPosition(e.target.position)||this.closeMessage():n=new A(t.lineNumber-3,1,e.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(tf.fadeOut(this._messageWidget.value))}};ef=$d=Zd([Qd(1,ft),Qd(2,Ks)],ef),V(new(Ra.bindToContribution(ef.get))({id:`leaveEditorMessage`,precondition:ef.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));var tf=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener(`animationend`,t)},n=setTimeout(t,110);return e.getDomNode().addEventListener(`animationend`,t),e.getDomNode().classList.add(`fadeOut`),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement(`div`),this._domNode.classList.add(`monaco-editor-overlaymessage`),this._domNode.style.marginLeft=`-6px`;let i=document.createElement(`div`);i.classList.add(`anchor`,`top`),this._domNode.appendChild(i);let a=document.createElement(`div`);typeof r==`string`?(a.classList.add(`message`),a.textContent=r):(r.classList.add(`message`),a.appendChild(r)),this._domNode.appendChild(a);let o=document.createElement(`div`);o.classList.add(`anchor`,`below`),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add(`fadeIn`)}dispose(){this._editor.removeContentWidget(this)}getId(){return`messageoverlay`}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle(`below`,e===2)}};X(ef.ID,ef,4);var nf=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},rf=function(e,t){return function(n,r){t(n,r,e)}},af=class{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,n,r,i){let a=await this.getEdit(n,i);if(a)return{edits:[{insertText:a.insertText,title:a.title,kind:a.kind,handledMimeType:a.handledMimeType,yieldTo:a.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,n,r){let i=await this.getEdit(n,r);if(i)return{edits:[{insertText:i.insertText,title:i.title,kind:i.kind,handledMimeType:i.handledMimeType,yieldTo:i.yieldTo}],dispose(){}}}},of=class e extends af{static{this.id=`text`}constructor(){super(Gd.Empty.append(`text`,`plain`)),this.id=e.id,this.dropMimeTypes=[pa.text],this.pasteMimeTypes=[pa.text]}async getEdit(e,t){let n=e.get(pa.text);if(!n||e.has(pa.uriList))return;let r=await n.asString();return{handledMimeType:pa.text,title:M(965,`Insert Plain Text`),insertText:r,kind:this.kind}}},sf=class extends af{constructor(){super(Gd.Empty.append(`uri`,`path`,`absolute`)),this.dropMimeTypes=[pa.uriList],this.pasteMimeTypes=[pa.uriList]}async getEdit(e,t){let n=await uf(e);if(!n.length||t.isCancellationRequested)return;let r=0,i=n.map(({uri:e,originalText:t})=>e.scheme===he.file?e.fsPath:(r++,t)).join(` `),a;return a=r>0?n.length>1?M(966,`Insert Uris`):M(967,`Insert Uri`):n.length>1?M(968,`Insert Paths`):M(969,`Insert Path`),{handledMimeType:pa.uriList,insertText:i,title:a,kind:this.kind}}},cf=class extends af{constructor(e){super(Gd.Empty.append(`uri`,`path`,`relative`)),this._workspaceContextService=e,this.dropMimeTypes=[pa.uriList],this.pasteMimeTypes=[pa.uriList]}async getEdit(e,t){let n=await uf(e);if(!n.length||t.isCancellationRequested)return;let r=pr(n.map(({uri:e})=>{let t=this._workspaceContextService.getWorkspaceFolder(e);return t?Yn(t.uri,e):void 0}));if(r.length)return{handledMimeType:pa.uriList,insertText:r.join(` `),title:n.length>1?M(970,`Insert Relative Paths`):M(971,`Insert Relative Path`),kind:this.kind}}};cf=nf([rf(0,lo)],cf);var lf=class{constructor(){this.kind=new Gd(`html`),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=[`text/html`],this._yieldTo=[{mimeType:pa.text}]}async provideDocumentPasteEdits(e,t,n,r,i){if(r.triggerKind!==bc.PasteAs&&!r.only?.contains(this.kind))return;let a=await n.get(`text/html`)?.asString();if(!(!a||i.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:M(972,`Insert HTML`),kind:this.kind}]}}};async function uf(e){let t=e.get(pa.uriList);if(!t)return[];let n=await t.asString(),r=[];for(let e of Zo.parse(n))try{r.push({uri:lr.parse(e),originalText:e})}catch{}return r}var df={scheme:`*`,hasAccessToAllModels:!0},ff=class extends U{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(df,new of)),this._register(e.documentDropEditProvider.register(df,new sf)),this._register(e.documentDropEditProvider.register(df,new cf(t)))}};ff=nf([rf(0,R),rf(1,lo)],ff);var pf=class extends U{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(df,new of)),this._register(e.documentPasteEditProvider.register(df,new sf)),this._register(e.documentPasteEditProvider.register(df,new cf(t))),this._register(e.documentPasteEditProvider.register(df,new lf))}};pf=nf([rf(0,R),rf(1,lo)],pf);var mf=class e{constructor(){this.value=``,this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let t=this.pos,n=0,r=this.value.charCodeAt(t),i;if(i=e._table[r],typeof i==`number`)return this.pos+=1,{type:i,pos:t,len:1};if(e.isDigitCharacter(r)){i=8;do n+=1,r=this.value.charCodeAt(t+n);while(e.isDigitCharacter(r));return this.pos+=n,{type:i,pos:t,len:n}}if(e.isVariableCharacter(r)){i=9;do r=this.value.charCodeAt(t+ ++n);while(e.isVariableCharacter(r)||e.isDigitCharacter(r));return this.pos+=n,{type:i,pos:t,len:n}}i=10;do n+=1,r=this.value.charCodeAt(t+n);while(!isNaN(r)&&e._table[r]===void 0&&!e.isDigitCharacter(r)&&!e.isVariableCharacter(r));return this.pos+=n,{type:i,pos:t,len:n}}},hf=class{constructor(){this._children=[]}appendChild(e){return e instanceof gf&&this._children[this._children.length-1]instanceof gf?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),i=n.children.slice(0);i.splice(r,1,...t),n._children=i,(function e(t,n){for(let r of t)r.parent=n,e(r.children,r)})(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof wf)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),``)}len(){return 0}},gf=class e extends hf{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new e(this.value)}},_f=class extends hf{},vf=class e extends _f{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index)}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof yf?this._children[0]:void 0}clone(){let t=new e(this.index);return this.transform&&(t.transform=this.transform.clone()),t._children=this.children.map(e=>e.clone()),t}},yf=class e extends hf{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof gf&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let t=new e;return this.options.forEach(t.appendChild,t),t}},bf=class e extends hf{constructor(){super(...arguments),this.regexp=RegExp(``)}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(e=>e instanceof xf&&!!e.elseValue)&&(r=this._replace([])),r}_replace(e){let t=``;for(let n of this._children)if(n instanceof xf){let r=e[n.index]||``;r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return``}clone(){let t=new e;return t.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?`i`:``)+(this.regexp.global?`g`:``)),t._children=this.children.map(e=>e.clone()),t}},xf=class e extends hf{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName===`upcase`?e?e.toLocaleUpperCase():``:this.shorthandName===`downcase`?e?e.toLocaleLowerCase():``:this.shorthandName===`capitalize`?e?e[0].toLocaleUpperCase()+e.substr(1):``:this.shorthandName===`pascalcase`?e?this._toPascalCase(e):``:this.shorthandName===`camelcase`?e?this._toCamelCase(e):``:this.shorthandName===`kebabcase`?e?this._toKebabCase(e):``:this.shorthandName===`snakecase`?e?this._toSnakeCase(e):``:e&&typeof this.ifValue==`string`?this.ifValue:!e&&typeof this.elseValue==`string`?this.elseValue:e||``}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,``).replace(/[\s_]+/g,`-`);let t=e.trim().replace(/^_+|_+$/g,``),n=t.match(/\p{Lu}{2,}(?=\p{Lu}\p{Ll}+[0-9]*|[\s_-]|$)|\p{Lu}?\p{Ll}+[0-9]*|\p{Lu}(?=\p{Lu}\p{Ll})|\p{Lu}(?=[\s_-]|$)|[0-9]+/gu);return n?n.map(e=>e.toLowerCase()).join(`-`):t.split(/[\s_-]+/).filter(e=>e.length>0).map(e=>e.toLowerCase()).join(`-`)}_toPascalCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map(e=>e.charAt(0).toUpperCase()+e.substr(1)).join(``):e}_toCamelCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map((e,t)=>t===0?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1)).join(``):e}_toSnakeCase(e){return e.replace(/(\p{Ll})(\p{Lu})/gu,`$1_$2`).replace(/[\s\-]+/g,`_`).toLowerCase()}clone(){return new e(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Sf=class e extends _f{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||``)),t===void 0?!1:(this._children=[new gf(t)],!0)}clone(){let t=new e(this.name);return this.transform&&(t.transform=this.transform.clone()),t._children=this.children.map(e=>e.clone()),t}};function Cf(e,t){let n=[...e];for(;n.length>0;){let e=n.shift();if(!t(e))break;n.unshift(...e.children)}}var wf=class e extends hf{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof vf&&(e.push(n),t=!t||t.indexr===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return Cf([e],e=>(t+=e.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof vf&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Sf&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let t=new e;return t._children=this.children.map(e=>e.clone()),t}walk(e){Cf(this.children,e)}},Tf=class{constructor(){this._scanner=new mf,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,`\\$&`)}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new wf;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n??!1,t??!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,i=[];t.walk(e=>(e instanceof vf&&(e.isFinalTabstop?r.set(0,void 0):!r.has(e.index)&&e.children.length>0?r.set(e.index,e.children):i.push(e)),!0));let a=(e,n)=>{let i=r.get(e.index);if(!i)return;let o=new vf(e.index);o.transform=e.transform;for(let e of i){let t=e.clone();o.appendChild(t),t instanceof vf&&r.has(t.index)&&!n.has(t.index)&&(n.add(t.index),a(t,n),n.delete(t.index))}t.replace(e,[o])},o=new Set;for(let e of i)a(e,o);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(e=>e.index===0)||e.appendChild(new vf(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let e=this._scanner.next();if(e.type!==0&&e.type!==4&&e.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,`$1`);return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new gf(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new vf(Number(t)):new Sf(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let r=new vf(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new gf("${"+t+`:`)),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){let t=new yf;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(t),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else if(this._accept(6))return this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1);else if(this._accept(4))return e.appendChild(r),!0;else return this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;n.push(e)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new gf(n.join(``))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let r=new Sf(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new gf("${"+t+`:`)),r.children.forEach(e.appendChild,e),!0}else if(this._accept(6))return this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1);else if(this._accept(4))return e.appendChild(r),!0;else return this._backTo(n)}_parseTransform(e){let t=new bf,n=``,r=``;for(;!this._accept(6);){let e;if(e=this._accept(5,!0)){e=this._accept(6,!0)||e,n+=e;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let e;if(e=this._accept(5,!0)){e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new gf(e));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(!r)return this._backTo(t),!1;if(!n||this._accept(4))return e.appendChild(new xf(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return!n||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new xf(Number(r),n)),!0)}else if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new xf(Number(r),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new xf(Number(r),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let n=this._until(4);if(n)return e.appendChild(new xf(Number(r),void 0,t,n)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new xf(Number(r),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type===14?!1:(e.appendChild(new gf(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}};function Ef(e,t,n){return(typeof n.insertText==`string`?n.insertText===``:n.insertText.snippet===``)?{edits:n.additionalEdit?.edits??[]}:{edits:[...t.map(t=>new Wc(e,{range:t,text:typeof n.insertText==`string`?Tf.escape(n.insertText)+`$0`:n.insertText.snippet,insertAsSnippet:!0})),...n.additionalEdit?.edits??[]]}}function Df(e){function t(e,t){return`mimeType`in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}let n=new Map;for(let r of e)for(let i of r.yieldTo??[])for(let a of e)if(a!==r&&t(i,a)){let e=n.get(r);e||(e=[],n.set(r,e)),e.push(a)}if(!n.size)return Array.from(e);let r=new Set,i=[];function a(e){if(!e.length)return[];let t=e[0];if(i.includes(t))return console.warn(`Yield to cycle detected`,t),e;if(r.has(t))return a(e.slice(1));let o=[],s=n.get(t);return s&&(i.push(t),o=a(s),i.pop()),r.add(t),[...o,t,...a(e.slice(1))]}return a(Array.from(e))}function Of(e,t){return t&&(e.stack||e.stacktrace)?M(33,`{0}: {1}`,Af(e),kf(e.stack)||kf(e.stacktrace)):Af(e)}function kf(e){return Array.isArray(e)?e.join(` `):e}function Af(e){return e.code===`ERR_UNC_HOST_NOT_ALLOWED`?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof e.code==`string`&&typeof e.errno==`number`&&typeof e.syscall==`string`?M(34,`A system error occurred ({0})`,e.message):e.message||M(35,`An unknown error occurred. Please consult the log for more details.`)}function jf(e=null,t=!1){if(!e)return M(36,`An unknown error occurred. Please consult the log for more details.`);if(Array.isArray(e)){let n=pr(e),r=jf(n[0],t);return n.length>1?M(37,`{0} ({1} errors in total)`,r,n.length):r}if(tr(e))return e;if(e.detail){let n=e.detail;if(n.error)return Of(n.error,t);if(n.exception)return Of(n.exception,t)}return e.stack?Of(e,t):e.message?e.message:M(38,`An unknown error occurred. Please consult the log for more details.`)}var Mf=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Nf=function(e,t){return function(n,r){t(n,r,e)}},Pf,Ff=`acceptSelectedCodeAction`,If=`previewSelectedCodeAction`,Lf=class{get templateId(){return`header`}renderTemplate(e){e.classList.add(`group-header`);let t=document.createElement(`span`);return e.append(t),{container:e,text:t}}renderElement(e,t,n){n.text.textContent=e.group?.title??e.label??``}disposeTemplate(e){}},Rf=class{get templateId(){return`separator`}renderTemplate(e){e.classList.add(`separator`);let t=document.createElement(`span`);return e.append(t),{container:e,text:t}}renderElement(e,t,n){n.text.textContent=e.label??``}disposeTemplate(e){}},zf=class{get templateId(){return`action`}constructor(e,t,n,r,i,a,o,s,c){this._supportsPreview=e,this._onRemoveItem=t,this._onShowSubmenu=n,this._hasAnySubmenuActions=r,this._groupTitleByIndex=i,this._linkHandler=a,this._hideDefaultKeybindingTooltip=o,this._keybindingService=s,this._openerService=c}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement(`div`);t.className=`icon`,e.append(t);let n=document.createElement(`span`);n.className=`title`,e.append(n);let r=document.createElement(`span`);r.className=`action-item-badge`,e.append(r);let i=document.createElement(`span`);i.className=`description`,e.append(i);let a=document.createElement(`span`);a.className=`group-title`,e.append(a);let o=document.createElement(`span`);o.className=`detail`,e.append(o);let s=new mi(e,Ro),c=document.createElement(`div`);c.className=`action-list-item-toolbar`,e.append(c);let l=document.createElement(`div`);return l.className=`action-list-submenu-indicator`,e.append(l),{container:e,icon:t,text:n,detail:o,badge:r,description:i,groupTitle:a,keybinding:s,toolbar:c,submenuIndicator:l,elementDisposables:new G}}renderElement(e,t,n){if(n.elementDisposables.clear(),e.group?.icon?(n.icon.className=P.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=sn(e.group.icon.color.id))):(n.icon.className=P.asClassName(x.lightBulb),n.icon.style.color=`var(--vscode-editorLightBulb-foreground)`),!e.item||!e.label)return;if(re(!e.hideIcon,n.icon),e.isSectionToggle){let t=e.group?.icon===x.chevronDown;n.container.setAttribute(`aria-expanded`,String(t))}else n.container.removeAttribute(`aria-expanded`);if(n.previousClassName&&n.container.classList.remove(n.previousClassName),n.container.classList.toggle(`action-list-custom`,!!e.className),e.className&&n.container.classList.add(e.className),n.previousClassName=e.className,n.text.textContent=Gf(e.label),e.badge?(n.badge.textContent=e.badge,n.badge.style.display=``):(n.badge.textContent=``,n.badge.style.display=`none`),e.keybinding)n.description.textContent=e.keybinding.getLabel(),n.description.style.display=`inline`,n.description.style.letterSpacing=`0.5px`;else if(e.description){if(cu(n.description),typeof e.description==`string`)n.description.textContent=Gf(e.description);else{let t=Fs(e.description,{actionHandler:t=>{let n=lr.parse(t);this._linkHandler?this._linkHandler(n,e):this._openerService.open(n,{allowCommands:!0})}});n.elementDisposables.add(t),n.description.appendChild(t.element)}n.description.style.display=`inline`}else n.description.textContent=``,n.description.style.display=`none`;let r=this._groupTitleByIndex.get(t);r?(n.groupTitle.textContent=r,n.groupTitle.style.display=``):(n.groupTitle.textContent=``,n.groupTitle.style.display=`none`),e.detail?(n.detail.textContent=Gf(e.detail),n.detail.style.display=``):(n.detail.textContent=``,n.detail.style.display=`none`);let i=this._keybindingService.lookupKeybinding(Ff)?.getLabel(),a=this._keybindingService.lookupKeybinding(If)?.getLabel();n.container.classList.toggle(`option-disabled`,!!e.disabled),e.hover===void 0?e.tooltip?n.container.title=e.tooltip:e.disabled?n.container.title=e.label:this._hideDefaultKeybindingTooltip?n.container.title=``:i&&a?this._supportsPreview&&e.canPreview?n.container.title=M(1705,`{0} to Apply, {1} to Preview`,i,a):n.container.title=M(1706,`{0} to Apply`,i):n.container.title=``:n.container.title=``,cu(n.toolbar);let o=[...e.toolbarActions??[]];if(e.onRemove&&o.push(l({id:`actionList.remove`,label:M(1707,`Remove`),class:P.asClassName(x.close),run:async()=>{await e.onRemove(),this._onRemoveItem?.(e)}})),n.container.classList.toggle(`has-toolbar`,o.length>0),o.length>0){let e=new jr(n.toolbar);n.elementDisposables.add(e),e.push(o,{icon:!0,label:!1})}e.submenuActions?.length&&!e.hover?.content?(n.submenuIndicator.className=`action-list-submenu-indicator has-submenu `+P.asClassName(x.chevronRight),n.submenuIndicator.style.display=``,n.submenuIndicator.style.visibility=``,n.elementDisposables.add(H(n.submenuIndicator,Zl.CLICK,t=>{t.stopPropagation(),this._onShowSubmenu?.(e)}))):this._hasAnySubmenuActions?(n.submenuIndicator.className=`action-list-submenu-indicator`,n.submenuIndicator.style.display=``,n.submenuIndicator.style.visibility=`hidden`):(n.submenuIndicator.className=`action-list-submenu-indicator`,n.submenuIndicator.style.display=`none`)}disposeTemplate(e){e.keybinding.dispose(),e.elementDisposables.dispose()}};zf=Mf([Nf(7,Ae),Nf(8,Ks)],zf);var Bf=class extends UIEvent{constructor(){super(`acceptSelectedAction`)}},Vf=class extends UIEvent{constructor(){super(`previewSelectedAction`)}};function Hf(e){if(e.kind===`action`)return e.label}var Uf=Pf=class extends U{constructor(e,t,n,r,i,a,o,s,c){if(super(),this._supportsPreview=t,this._delegate=r,this._options=a,this._keybindingService=o,this._openerService=s,this._instantiationService=c,this._headerLineHeight=24,this._separatorLineHeight=8,this.cts=this._register(new Ti),this._submenuDisposables=this._register(new G),this._collapsedSections=new Set,this._filterText=``,this._suppressHover=!1,this._hasLaidOut=!1,this._filterCts=this._register(new bs),this._groupTitleByIndex=new Map,this._onDidRequestLayout=this._register(new F),this.onDidRequestLayout=this._onDidRequestLayout.event,this.domNode=document.createElement(`div`),this.domNode.classList.add(`actionList`),this._options?.inlineDescription&&this.domNode.classList.add(`inline-description`),this._options?.className){let e=this._options.className.split(/\s+/).filter(e=>e.length>0);e.length>0&&this.domNode.classList.add(...e)}if(this._actionLineHeight=24,this._submenuContainer=document.createElement(`div`),this._submenuContainer.className=`action-list-submenu-panel action-widget`,this._submenuContainer.style.display=`none`,this._submenuContainer.tabIndex=-1,this.domNode.append(this._submenuContainer),this._register(H(this._submenuContainer,`mouseenter`,()=>{this._cancelSubmenuHide()})),this._register(H(this._submenuContainer,`mouseleave`,()=>{this._scheduleSubmenuHide()})),this._register(tc(()=>{this._cancelSubmenuHide(),this._cancelSubmenuShow()})),this._options?.collapsedByDefault)for(let e of this._options.collapsedByDefault)this._collapsedSections.add(e);let l={getHeight:e=>this._getItemHeight(e),getTemplateId:e=>e.kind},u=(this._options?.reserveSubmenuSpace??!0)&&n.some(e=>!!e.submenuActions?.length&&!e.hover?.content);if(this._list=this._register(new br(e,this.domNode,l,[new zf(this._supportsPreview,e=>this._removeItem(e),e=>this._showSubmenuForItem(e),u,this._groupTitleByIndex,this._options?.linkHandler,this._options?.hideDefaultKeybindingTooltip??!1,this._keybindingService,this._openerService),new Lf,new Rf],{keyboardSupport:!1,typeNavigationEnabled:!this._options?.showFilter,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Hf},accessibilityProvider:{getAriaLabel:e=>{if(e.kind===`action`){let t=e.label?Gf(e?.label):``;if(e.detail&&(t=t+`, `+Gf(e.detail)),e.ariaDescription)t=t+`, `+Gf(e.ariaDescription);else if(e.description){let n=typeof e.description==`string`?e.description:e.description.value;t=t+`, `+Gf(n)}if(e.hover?.content&&!e.ariaDescription&&!e.description){let n=e.hover.content,r=typeof n==`string`?n:od(n)?n.value:er(n)?n.textContent??void 0:void 0;r&&(!e.detail||Gf(e.detail)!==Gf(r))&&(t=t+`, `+Gf(r))}return e.group?.title&&(t=t+`, `+e.group.title),e.disabled&&(t=M(1708,`{0}, Disabled Reason: {1}`,t,e.disabled)),e.submenuActions?.length&&(t=M(1709,`{0}, use right arrow to access options`,t)),t}return null},getWidgetAriaLabel:()=>M(1710,`Action Widget`),getRole:e=>{switch(e.kind){case`action`:return`option`;case`separator`:return`separator`;default:return`separator`}},getWidgetRole:()=>`listbox`,...i}})),this._list.style(ml),this._register(this._list.onMouseClick(e=>this.onListClick(e))),this._register(this._list.onMouseOver(e=>this.onListHover(e))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(e=>this.onListSelection(e))),this._allMenuItems=[...n],this._options?.showFilter||this._options?.secondaryHeading){this._filterContainer=document.createElement(`div`),this._filterContainer.className=`action-list-filter`;let e=I(this._filterContainer,q(`.action-list-filter-row`));if(this._options?.showFilter){this._filterInput=document.createElement(`input`),this._filterInput.type=`text`,this._filterInput.className=`action-list-filter-input`,this._filterInput.placeholder=this._options?.filterPlaceholder??M(1711,`Search...`),this._filterInput.setAttribute(`aria-label`,M(1712,`Filter items`)),e.appendChild(this._filterInput);let t=this._options?.filterActions??[];if(t.length>0){let n=I(e,q(`.action-list-filter-actions`));this._register(new jr(n)).push(t,{icon:!0,label:!1})}this._register(H(this._filterInput,`input`,()=>{this._filterText=this._filterInput.value,this._applyOrUpdateFilter()}))}if(this._options?.secondaryHeading){let t=I(e,q(`.action-list-filter-label`));t.textContent=this._options.secondaryHeading}}if(this._options?.footerText&&(this._footerContainer=document.createElement(`div`),this._footerContainer.className=`action-list-footer`,this._footerContainer.textContent=this._options.footerText),this._options?.headerText){if(this._headerContainer=document.createElement(`div`),this._headerContainer.className=`action-list-header`,this._options.headerIcon){let e=I(this._headerContainer,q(`span.action-list-header-icon`));e.classList.add(...P.asClassNameArray(this._options.headerIcon)),e.setAttribute(`aria-hidden`,`true`)}let e=I(this._headerContainer,q(`span.action-list-header-text`));e.textContent=this._options.headerText}this._applyFilter(),this._list.length&&this._focusCheckedOrFirst(),this._register(H(this.domNode,`keydown`,e=>{if(e.key===`ArrowRight`){let t=this._list.getFocus();if(t.length>0){let n=this._list.element(t[0]);if(n?.submenuActions?.length){ec.stop(e,!0);let r=this._getRowElement(t[0]);r&&(this._showSubmenuForElement(n,r),this._currentSubmenuWidget?.focus())}}}})),this._filterInput&&this._register(H(this.domNode,`keydown`,e=>{this._filterInput&&!bn(this._filterInput)&&e.key.length===1&&e.key!==` `&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(this._filterInput.focus(),this._filterInput.value=e.key,this._filterText=e.key,this._applyOrUpdateFilter(),e.preventDefault(),e.stopPropagation())}))}_toggleSection(e){this._collapsedSections.has(e)?this._collapsedSections.delete(e):this._collapsedSections.add(e),this._options?.onDidToggleSection?.(e,this._collapsedSections.has(e)),this._applyFilter()}_applyOrUpdateFilter(){if(!this._delegate.onFilter){this._applyFilter();return}let e=this._filterText;this._filterCts.value?.cancel();let t=new Ti;this._filterCts.value=t,this._delegate.onFilter(e,t.token).then(e=>{t.token.isCancellationRequested||(this._allMenuItems=[...e],this._applyFilter(!0))}).catch(()=>{})}_applyFilter(e=!1,t=!0){let n=e?``:this._filterText.toLowerCase(),r=!e&&n.length>0,i=[],a=this._list.getFocus(),o;if(a.length>0&&(o=this._list.element(a[0])),r){let e,t=[],r=!1,a=()=>{e&&r&&i.push(e),i.push(...t),e=void 0,t=[],r=!1},o=e=>{let t=(e.label??``).toLowerCase(),r=typeof e.description==`string`?e.description:e.description?.value??``;return t.includes(n)||r.toLowerCase().includes(n)};for(let n of this._allMenuItems)if(n.kind!==`header`){if(n.kind===`separator`){a(),e=n.label?n:void 0;continue}if(n.showAlways){t.push(n);continue}n.isSectionToggle||o(n)&&(r=!0,t.push(n))}a()}else for(let e of this._allMenuItems){if(e.kind===`header`){i.push(e);continue}if(e.kind===`separator`){if(e.section&&this._collapsedSections.has(e.section))continue;i.push(e);continue}if(e.isSectionToggle&&e.section){let t=this._collapsedSections.has(e.section);i.push({...e,group:{...e.group,icon:t?x.chevronRight:x.chevronDown}});continue}e.section&&this._collapsedSections.has(e.section)||i.push(e)}let s=[],c=!1;for(let e=0;e=0;e--){if(i[e].kind===`action`){u=!0;continue}i[e].kind===`separator`&&(l[e]=u,u=!1)}for(let e=i.length-1;e>=0;e--){let t=i[e];if(t.kind!==`separator`)continue;let n=l[e],r=!t.label&&!s[e];(!n||r)&&i.splice(e,1)}this._options?.showGroupTitleOnFirstItem&&this._recomputeGroupTitles(i);let d=this._filterInput&&bn(this._filterInput);if(this._list.splice(0,this._list.length,i),t&&this._onDidRequestLayout.fire(),d)this._filterInput?.focus(),this._focusCheckedOrFirst();else if(this._hasLaidOut&&o){let e=o.item?.id;if(e){for(let t=0;t0)return this._list.element(e[0])}_focusCheckedOrFirst(){this._suppressHover=!0;try{for(let e=0;e0&&this._list.reveal(e[0])}finally{this._suppressHover=!1}}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._filterCts.value?.cancel(),this._filterCts.clear(),this._hideSubmenu()}clearFilter(){return this._filterInput&&this._filterText?(this._filterInput.value=``,this._filterText=``,this._applyOrUpdateFilter(),!0):!1}get hasDynamicHeight(){return this._options?.showFilter?!0:this._allMenuItems.some(e=>e.isSectionToggle)}get lineHeight(){return this._actionLineHeight}_getItemHeight(e){switch(e.kind){case`header`:return this._headerLineHeight;case`separator`:return e.label?this._actionLineHeight:this._separatorLineHeight;default:return e.detail?this._options?.detailItemHeight??48:this._actionLineHeight}}computeFullHeight(){let e=0;for(let t of this._allMenuItems)e+=this._getItemHeight(t);return e}computeListHeight(){let e=this._list.length,t=0;for(let n=0;nMath.min(Math.max(e,n),i),o=n,s=this._allMenuItems.length;if(s>=50)return a(380);if(s>t){let e=[];for(let n=0;n0){this._list.focusPrevious(1,!1,void 0,this.focusCondition);let t=this._list.getFocus();t.length>0&&t[0]>=e[0]?this._filterInput.focus():t.length>0&&this._list.reveal(t[0])}else{this._list.focusLast(void 0,this.focusCondition);let e=this._list.getFocus();e.length>0&&this._list.reveal(e[0])}return}let e=this._list.getFocus();this._list.focusPrevious(1,!0,void 0,this.focusCondition);let t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]>e[0]){this._list.setFocus([]),this._filterInput.focus();return}this._list.reveal(t[0])}}focusNext(){if(this._filterInput&&bn(this._filterInput)){if(this._list.domFocus(),this._list.getFocus().length>0){this._list.focusNext(1,!1,void 0,this.focusCondition);let e=this._list.getFocus();e.length>0&&this._list.reveal(e[0])}else{this._list.focusFirst(void 0,this.focusCondition);let e=this._list.getFocus();e.length>0&&this._list.reveal(e[0])}return}let e=this._list.getFocus();this._list.focusNext(1,!0,void 0,this.focusCondition);let t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]{this._toggleSection(e)});return}if(Je(e.browserEvent)){let t=e.browserEvent.target;if(er(t)&&(t.closest(`.action-list-item-toolbar`)||t.closest(`.action-list-submenu-indicator`))){this._list.setSelection([]);return}}if(t.item&&this.focusCondition(t)){let n=e.browserEvent instanceof Vf;this._delegate.onSelect(t.item,n&&this._supportsPreview)}else this._list.setSelection([])}onFocus(){let e=this._list.getFocus();if(e.length===0)return;let t=e[0],n=this._list.element(t);this._delegate.onFocus?.(n.item),this._suppressHover||this._showHoverForElement(n,t)}_removeItem(e){let t=this._allMenuItems.indexOf(e);t>=0&&(this._allMenuItems.splice(t,1),this._applyFilter())}_recomputeGroupTitles(e){this._groupTitleByIndex.clear();let t=new Set;for(let n=0;n=0){let n=this._getRowElement(t);n&&this._showSubmenuForElement(e,n)}}_showSubmenuForElement(e,t){if(this._currentSubmenuElement===e)return;this._submenuDisposables.clear(),this._currentSubmenuElement=e,this._clearSubmenuContainer();let n,r=e.hover?.content;if(r){if(er(r))n=r,e.hover?.disposable&&this._register(e.hover.disposable);else{let t=typeof r==`string`?new Mt(r):r,i=this._options?.linkHandler,a=Fs(t,{actionHandler:t=>{let n=lr.parse(t);i?i(n,e):this._openerService.open(n,{allowCommands:!0})}});this._submenuDisposables.add(a),n=a.element}n.classList.add(`action-list-submenu-hover-header`),e.submenuActions?.length&&n.classList.add(`has-submenu`),this._submenuContainer.appendChild(n)}let i=!!e.submenuActions?.length;this._submenuContainer.style.display=``,this._submenuContainer.style.position=`absolute`,this._submenuContainer.removeAttribute(`role`);let a=t.getBoundingClientRect(),o=this.domNode.getBoundingClientRect(),s=Hs(this.domNode),c=0,l=n?n.offsetWidth:0;if(i){let t=[],n=e.submenuActions.filter(e=>e instanceof yr).filter(e=>e.actions.length>0);for(let e=0;e{},onSelect:e=>{e.run();let t=this._currentSubmenuElement?.item;this._hideSubmenu(),t&&this._delegate.onSelect(t),this.hide()}},void 0,void 0));this._submenuContainer.appendChild(r.domNode),this._currentSubmenuWidget=r,r.clearFocus(),c=r.computeListHeight(),r.layout(c);let i=r.computeMaxWidth(0);l=Math.max(l,i),r.layout(c,l),r.domNode.style.width=`${l}px`,this._submenuDisposables.add(H(r.domNode,`keydown`,e=>{if(e.key===`ArrowLeft`||e.key===`Escape`)ec.stop(e,!0),this._hideSubmenu(),this._list.domFocus();else if(e.key===`Enter`){ec.stop(e,!0);let t=r.getFocusedElement();if(t?.item){t.item.run();let e=this._currentSubmenuElement?.item;this._hideSubmenu(),e&&this._delegate.onSelect(e),this.hide()}}else e.key===`ArrowDown`?(ec.stop(e,!0),r.focusNext()):e.key===`ArrowUp`&&(ec.stop(e,!0),r.focusPrevious())}))}let u=s.innerWidth-a.right,d=o.left,f=l+10;u>=f||u>=d?this._submenuContainer.style.left=`${o.right-o.left+4}px`:this._submenuContainer.style.left=`${-f-4}px`;let p=n?n.offsetHeight:0,m=c+p,h=s.innerHeight,g=a.height,_=a.top-o.top+(g-m)/2,v=o.top+_+m;v>h&&(_-=v-h+8),o.top+_<0&&(_=-o.top),this._submenuContainer.style.top=`${_}px`}_hideSubmenu(){this._cancelSubmenuHide(),this._cancelSubmenuShow(),this._submenuDisposables.clear(),this._currentSubmenuWidget=void 0,this._currentSubmenuElement=void 0,this._clearSubmenuContainer(),this._submenuContainer.style.display=`none`}_clearSubmenuContainer(){this._submenuContainer.contains(Ua())&&this._list.domFocus(),cu(this._submenuContainer)}_scheduleSubmenuHide(){this._cancelSubmenuHide(),this._submenuHideTimeout=setTimeout(()=>{this._hideSubmenu()},300)}_cancelSubmenuHide(){this._submenuHideTimeout!==void 0&&(clearTimeout(this._submenuHideTimeout),this._submenuHideTimeout=void 0)}_scheduleSubmenuShow(e,t){this._cancelSubmenuShow(),this._submenuShowTimeout=setTimeout(()=>{this._submenuShowTimeout=void 0;let n=typeof t==`number`?this._getRowElement(t):null;n&&this._showSubmenuForElement(e,n)},500)}_cancelSubmenuShow(){this._submenuShowTimeout!==void 0&&(clearTimeout(this._submenuShowTimeout),this._submenuShowTimeout=void 0)}async onListHover(e){let t=e.element;if(t&&t.item&&this.focusCondition(t)){if(er(e.browserEvent.target)&&e.browserEvent.target.closest(`.action-list-item-toolbar`)!==null){t.submenuActions?.length||this._cancelSubmenuShow(),this._list.setFocus([]);return}let n=!!(t.submenuActions?.length||t.hover?.content);if(n&&(this._suppressHover=!0),this._list.setFocus(typeof e.index==`number`?[e.index]:[]),n&&(this._suppressHover=!1),n){this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._hideSubmenu(),this._scheduleSubmenuShow(t,e.index));return}if(this._currentSubmenuElement===t?this._cancelSubmenuHide():(this._cancelSubmenuShow(),this._hideSubmenu()),this._delegate.onHover&&!t.disabled&&t.kind===`action`&&this._currentSubmenuElement!==t){let n=await this._delegate.onHover(t.item,this.cts.token),r=n?n.canPreview:void 0;r!==t.canPreview&&(t.canPreview=r,typeof e.index==`number`&&(this._list.splice(e.index,1,[t]),this._list.setFocus([e.index])))}}else t&&t.hover?.content&&typeof e.index==`number`&&(this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._hideSubmenu(),this._scheduleSubmenuShow(t,e.index)))}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Uf=Pf=Mf([Nf(6,Ae),Nf(7,Ks),Nf(8,W)],Uf);var Wf=class extends U{get domNode(){return this._widget.domNode}get filterContainer(){return this._widget.filterContainer}get footerContainer(){return this._widget.footerContainer}get headerContainer(){return this._widget.headerContainer}get filterInput(){return this._widget.filterInput}get anchorPosition(){if(this._showAbove!==void 0)return+!!this._showAbove}constructor(e,t,n,r,i,a,o,s,c,l){super(),this._contextViewService=s,this._layoutService=c,this._lastMinWidth=0,this._hasLaidOut=!1,this._anchor=o,this._widget=this._register(l.createInstance(Uf,e,t,n,r,i,a)),this._register(this._widget.onDidRequestLayout(()=>{this._hasLaidOut&&(this.layout(this._lastMinWidth),this._contextViewService.layout())}))}focus(){this._widget.focus()}hide(e){this._widget.hide(e),this._contextViewService.hideContextView()}clearFilter(){return this._widget.clearFilter()}focusPrevious(){this._widget.focusPrevious()}focusNext(){this._widget.focusNext()}collapseFocusedSection(){this._widget.collapseFocusedSection()}expandFocusedSection(){this._widget.expandFocusedSection()}toggleFocusedSection(){return this._widget.toggleFocusedSection()}acceptSelected(e){this._widget.acceptSelected(e)}hasDynamicHeight(){return this._widget.hasDynamicHeight}computeActionWidgetVerticalChromeHeight(){let e=this.domNode.parentElement?.closest(`.action-widget`);if(!e)return 0;let t=Hs(e).getComputedStyle(e),n=e=>Number.parseFloat(e)||0;return n(t.paddingTop)+n(t.paddingBottom)+n(t.borderTopWidth)+n(t.borderBottomWidth)}computeHeight(){let e=this._widget.computeListHeight(),t=this._widget.filterContainer?36:0,n=this._widget.footerContainer?32:0,r=this._widget.headerContainer?this._widget.headerContainer.offsetHeight||36:0,i=t+n+r,a=Hs(this.domNode),o;if(this.hasDynamicHeight()){let e=a.innerHeight,t=Be(this._anchor),n=t.top-a.pageYOffset,r=e-n-t.height-30,s=n;if(this._showAbove===void 0){let e=i+this._widget.computeFullHeight();this._showAbove=e>r&&s>r}o=Math.max(0,(this._showAbove?s:r)-this.computeActionWidgetVerticalChromeHeight())}else{let e=this._layoutService.getContainer(a).clientHeight,t=this.domNode.getBoundingClientRect().top;o=t>0?e-t-10:e*.7}let s=Math.floor(a.innerHeight*.6),c=this._widget.lineHeight,l=Math.min(Math.max(o,c*3+i),s);return Math.min(e+i,l)-i}layout(e){this._hasLaidOut=!0,this._lastMinWidth=e;let t=this.computeHeight();this._widget.layout(t);let n=this._widget.computeMaxWidth(e);return this._cachedMaxWidth=n,this._widget.layout(t,this._cachedMaxWidth),this._cachedMaxWidth}};Wf=Mf([Nf(7,Cl),Nf(8,Xr),Nf(9,W)],Wf);function Gf(e){return e.replace(/\r\n|\r|\n/g,` `)}var Kf=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qf=function(e,t){return function(n,r){t(n,r,e)}};S(`actionBar.toggledBackground`,ae,M(1713,`Background color for toggled action items in action bar.`));var Jf={Visible:new k(`codeActionMenuVisible`,!1,M(1714,`Whether the action widget list is visible`)),FilterFocused:new k(`codeActionMenuFilterFocused`,!1,M(1715,`Whether the action widget filter input is focused`))},Yf=ys(`actionWidgetService`),Xf=class extends U{get isVisible(){return Jf.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new bs)}show(e,t,n,r,i,a,o,s,c){let l=Jf.Visible.bindTo(this._contextKeyService),u=this._instantiationService.createInstance(Wf,e,t,n,r,s,c,i);this._contextViewService.showContextView({getAnchor:()=>i,render:e=>(l.set(!0),this._renderWidget(e,u,o??[])),onHide:e=>{l.reset(),this._onWidgetClosed(e)},get anchorPosition(){return u.anchorPosition}},a,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}collapseSection(){this._list?.value?.collapseFocusedSection()}expandSection(){this._list?.value?.expandFocusedSection()}toggleSection(){return this._list?.value?.toggleFocusedSection()??!1}clearFilter(){return this._list?.value?.clearFilter()??!1}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,n){let r=document.createElement(`div`);if(r.classList.add(`action-widget`),e.appendChild(r),this._list.value=t,this._list.value)this._list.value.headerContainer&&r.appendChild(this._list.value.headerContainer),this._list.value.filterContainer&&r.appendChild(this._list.value.filterContainer),r.appendChild(this._list.value.domNode),this._list.value.footerContainer&&r.appendChild(this._list.value.footerContainer);else throw Error(`List has no value`);let i=new G,a=this._list.value.headerContainer;a&&i.add(Jc(a,e=>e.preventDefault()));let o=document.createElement(`div`),s=e.appendChild(o);s.classList.add(`context-view-block`),i.add(Jc(s,e=>e.stopPropagation()));let c=document.createElement(`div`),l=e.appendChild(c);l.classList.add(`context-view-pointerBlock`),i.add(H(l,Zl.POINTER_MOVE,()=>l.remove())),i.add(Jc(l,()=>l.remove()));let u=0;if(n.length){let e=this._createActionBar(`.action-widget-action-bar`,n);e&&(r.appendChild(e.getContainer().parentElement),i.add(e),u=e.getContainer().offsetWidth)}let d=this._list.value?.layout(u);r.style.width=`${d}px`,this._list.value?.focus();let f=Jf.FilterFocused.bindTo(this._contextKeyService);if(i.add({dispose:()=>f.reset()}),this._list.value?.filterInput){let e=this._list.value.filterInput;i.add(H(e,`focus`,()=>f.set(!0))),i.add(H(e,`blur`,()=>f.set(!1)))}let p=i.add(ii(e));return i.add(p.onDidBlur(()=>{let e=Ua();e?.closest(`.action-widget-hover`)||e?.closest(`.action-list-submenu-panel`)||this.hide(!0)})),i}_createActionBar(e,t){if(!t.length)return;let n=new jr(q(e));return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};Xf=Kf([qf(0,Cl),qf(1,ft),qf(2,W)],Xf),_r(Yf,Xf,1);var Zf=1100;C(class extends Rn{constructor(){super({id:`hideCodeActionWidget`,title:T(1716,`Hide action widget`),precondition:Jf.Visible,keybinding:{weight:Zf,primary:9,secondary:[1033]}})}run(e){e.get(Yf).hide(!0)}}),C(class extends Rn{constructor(){super({id:`clearFilterCodeActionWidget`,title:T(1717,`Clear action widget filter`),precondition:N.and(Jf.Visible,Jf.FilterFocused),keybinding:{weight:1101,primary:9}})}run(e){let t=e.get(Yf);t instanceof Xf&&(t.clearFilter()||t.hide(!0))}}),C(class extends Rn{constructor(){super({id:`selectPrevCodeAction`,title:T(1718,`Select previous action`),precondition:Jf.Visible,keybinding:{weight:Zf,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){let t=e.get(Yf);t instanceof Xf&&t.focusPrevious()}}),C(class extends Rn{constructor(){super({id:`selectNextCodeAction`,title:T(1719,`Select next action`),precondition:Jf.Visible,keybinding:{weight:Zf,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){let t=e.get(Yf);t instanceof Xf&&t.focusNext()}}),C(class extends Rn{constructor(){super({id:`collapseSectionCodeAction`,title:T(1720,`Collapse section`),precondition:N.and(Jf.Visible,Jf.FilterFocused.negate()),keybinding:{weight:Zf,primary:15}})}run(e){let t=e.get(Yf);t instanceof Xf&&t.collapseSection()}}),C(class extends Rn{constructor(){super({id:`expandSectionCodeAction`,title:T(1721,`Expand section`),precondition:N.and(Jf.Visible,Jf.FilterFocused.negate()),keybinding:{weight:Zf,primary:17}})}run(e){let t=e.get(Yf);t instanceof Xf&&t.expandSection()}}),C(class extends Rn{constructor(){super({id:`toggleSectionCodeAction`,title:T(1722,`Toggle section`),precondition:N.and(Jf.Visible,Jf.FilterFocused.negate()),keybinding:{weight:Zf,primary:10}})}run(e){let t=e.get(Yf);t instanceof Xf&&(t.toggleSection()||t.acceptSelected())}}),C(class extends Rn{constructor(){super({id:Ff,title:T(1723,`Accept selected action`),precondition:Jf.Visible,keybinding:{weight:Zf,primary:3,secondary:[2137]}})}run(e){let t=e.get(Yf);t instanceof Xf&&t.acceptSelected()}}),C(class extends Rn{constructor(){super({id:If,title:T(1724,`Preview selected action`),precondition:Jf.Visible,keybinding:{weight:Zf,primary:2051}})}run(e){let t=e.get(Yf);t instanceof Xf&&t.acceptSelected(!0)}});var Qf=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},$f=function(e,t){return function(n,r){t(n,r,e)}},ep,tp=class extends U{static{ep=this}static{this.baseId=`editor.widget.postEditWidget`}constructor(e,t,n,r,i,a,o,s,c,l,u){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=i,this.edits=a,this.onSelectNewEdit=o,this.additionalActions=s,this._keybindingService=l,this._actionWidgetService=u,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(tc(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(tc((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(e=>{this.dispose()})),this._register(xr.runAndSubscribe(l.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){this.button.element.title=this._keybindingService.appendKeybinding(this.showCommand.label,this.showCommand.id)}create(){this.domNode=q(`.post-edit-widget`),this.button=this._register(new Yt(this.domNode,{supportIcons:!0})),this.button.label=`$(insert)`,this._register(H(this.domNode,Zl.CLICK,()=>this.showSelector()))}getId(){return ep.baseId+`.`+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){let e=bu(this.button.element),t={x:e.left+e.width,y:e.top+e.height};this._actionWidgetService.show(`postEditWidget`,!1,this.edits.allEdits.map((e,t)=>({kind:`action`,item:e,label:e.title,disabled:!1,canPreview:!1,group:{title:``,icon:P.fromId(t===this.edits.activeEditIndex?x.check.id:x.blank.id)}})),{onHide:()=>{this.editor.focus()},onSelect:e=>{this._actionWidgetService.hide(!1);let t=this.edits.allEdits.findIndex(t=>t===e);if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}},t,this.editor.getDomNode()??void 0,this.additionalActions)}};tp=ep=Qf([$f(8,ft),$f(9,Ae),$f(10,Yf)],tp);var np=class extends U{constructor(e,t,n,r,i,a,o,s){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=r,this._getAdditionalActions=i,this._instantiationService=a,this._bulkEditService=o,this._notificationService=s,this._currentWidget=this._register(new bs),this._register(xr.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,n,r,i){if(!e.length||!this._editor.hasModel())return;let a=this._editor.getModel(),o=t.allEdits.at(t.activeEditIndex);if(!o)return;let s=async a=>{let o=this._editor.getModel();o&&(await o.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:a,allEdits:t.allEdits},n,r,i))},c=(r,i)=>{ki(r)||(this._notificationService.error(i),n&&this.show(e[0],t,s))},l=new Fo(this._editor,3,void 0,i),u;try{u=await jt(r(o,l.token),l.token)}catch(e){return c(e,M(976,`Error resolving edit '{0}': {1}`,o.title,jf(e)))}finally{l.dispose()}if(i.isCancellationRequested)return;let d=Ef(a.uri,e,u),f=e[0],p=a.deltaDecorations([],[{range:f,options:{description:`paste-line-suffix`,stickiness:0}}]);this._editor.focus();let m,h;try{m=await this._bulkEditService.apply(d,{editor:this._editor,token:i}),h=a.getDecorationRange(p[0])}catch(e){return c(e,M(977,`Error applying edit '{0}': {1}`,o.title,jf(e)))}finally{a.deltaDecorations(p,[])}i.isCancellationRequested||n&&m.isApplied&&t.allEdits.length>1&&this.show(h??f,t,s)}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(tp,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n,this._getAdditionalActions()))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};np=Qf([$f(5,W),$f(6,za),$f(7,En)],np);var rp=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ip=function(e,t){return function(n,r){t(n,r,e)}},ap,op=`editor.changePasteType`,sp=`editor.pasteAs.preferences`,cp=new k(`pasteWidgetVisible`,!1,M(956,`Whether the paste widget is showing`)),lp=`application/vnd.code.copymetadata`,up=class extends U{static{ap=this}static{this.ID=`editor.contrib.copyPasteActionController`}static get(e){return e.getContribution(ap.ID)}constructor(e,t,n,r,i,a,o,s,c,l){super(),this._logService=n,this._bulkEditService=r,this._clipboardService=i,this._commandService=a,this._configService=o,this._languageFeaturesService=s,this._quickInputService=c,this._progressService=l,this._editor=e,this._register(e.onWillCopy(e=>this.handleCopy(e))),this._register(e.onWillCut(e=>this.handleCopy(e))),this._register(e.onWillPaste(e=>this.handlePaste(e))),this._pasteProgressManager=this._register(new Xd(`pasteIntoEditor`,e,t)),this._postPasteWidgetManager=this._register(t.createInstance(np,`pasteIntoEditor`,e,cp,{id:op,label:M(957,`Show paste options...`)},()=>ap._configureDefaultAction?[ap._configureDefaultAction]:[]))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}async pasteAs(e){this._logService.trace(`CopyPasteController.pasteAs`),this._editor.focus();try{this._logService.trace(`Before calling editor.action.clipboardPasteAction`),this._pasteAsActionContext={preferred:e},await this._commandService.executeCommand(`editor.action.clipboardPasteAction`)}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(97).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(this._logService.trace(`CopyPasteController#handleCopy`),!this._editor.hasTextFocus()||(this._clipboardService.clearInternalState?.(),!this.isPasteAsEnabled()))return;let t=this._editor.getModel(),n=this._editor._getViewModel(),r=this._editor.getSelections();if(!t||!n||!r?.length)return;let i={multicursorText:e.dataToCopy.multicursorText??null,pasteOnNewLine:e.dataToCopy.isFromEmptySelection,mode:null},a=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(e=>!!e.prepareDocumentPaste);if(!a.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:i});return}let o=new ba,s=a.flatMap(e=>e.copyMimeTypes??[]),c=Pu();this.setCopyMetadata(e.clipboardData,{id:c,providerCopyMimeTypes:s,defaultPastePayload:i});let l=a.map(n=>({providerMimeTypes:n.copyMimeTypes,operation:Cn(r=>n.prepareDocumentPaste(t,e.dataToCopy.sourceRanges,o,r).catch(e=>{console.error(e)}))}));ap._currentCopyOperation?.operations.forEach(e=>e.operation.cancel()),ap._currentCopyOperation={handle:c,operations:l}}async handlePaste(e){if(this._logService.trace(`CopyPasteController#handlePaste for id : `,e.metadata?.id),!this._editor.hasTextFocus())return;let t=e.toExternalVSDataTransfer();if(!t)return;t.delete(lp),ef.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;let n=this._editor.getModel(),r=this._editor.getSelections();if(!r?.length||!n||this._editor.getOption(104)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;let i=this.fetchCopyMetadata(e);this._logService.trace(`CopyPasteController#handlePaste with metadata : `,i?.id,` and text.length : `,e.clipboardData.getData(`text/plain`).length);let a=Array.from(e.clipboardData.files).map(e=>e.type),o=[...e.clipboardData.types,...a,...i?.providerCopyMimeTypes??[],pa.uriList],s=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(e=>{let t=this._pasteAsActionContext?.preferred;return t&&!this.providerMatchesPreference(e,t)?!1:e.pasteMimeTypes?.some(e=>Ku(e,o))});if(!s.length){this._pasteAsActionContext?.preferred&&(this.showPasteAsNoEditMessage(r,this._pasteAsActionContext.preferred),e.setHandled());return}e.setHandled(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,s,r,t,i):this.doPasteInline(s,r,t,i,e.browserEvent)}showPasteAsNoEditMessage(e,t){let n=`only`in t?t.only.value:`preferences`in t?t.preferences.length?t.preferences.map(e=>e.value).join(`, `):M(958,`empty`):t.providerId;ef.get(this._editor)?.showMessage(M(959,`No paste edits for '{0}' found`,n),e[0].getStartPosition())}doPasteInline(e,t,n,r,i){this._logService.trace(`CopyPasteController#doPasteInline`);let a=this._editor;if(!a.hasModel())return;let o=new Fo(a,3,void 0),s=Cn(async a=>{let c=this._editor;if(!c.hasModel())return;let l=c.getModel(),u=new G,d=u.add(new Ti(a));u.add(o.token.onCancellationRequested(()=>d.cancel()));let f=d.token;try{if(await this.mergeInDataFromCopy(e,n,r,f),f.isCancellationRequested)return;let a=e.filter(e=>this.isSupportedPasteProvider(e,n));if(!a.length||a.length===1&&a[0]instanceof of)return this.applyDefaultPasteHandler(n,r,f,i);let o={triggerKind:bc.Automatic},s=await this.getPasteEdits(a,n,l,t,o,f);if(u.add(s),f.isCancellationRequested)return;if(s.edits.length===1&&s.edits[0].provider instanceof of)return this.applyDefaultPasteHandler(n,r,f,i);if(s.edits.length){let e=c.getOption(97).showPasteSelector===`afterPaste`;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:this.getInitialActiveEditIndex(l,s.edits),allEdits:s.edits},e,async(e,n)=>{if(!e.provider.resolveDocumentPasteEdit)return e;let r=e.provider.resolveDocumentPasteEdit(e,n),i=new De,a=await this._pasteProgressManager.showWhile(t[0].getEndPosition(),M(960,`Resolving paste edit for '{0}'. Click to cancel`,e.title),Ze(Promise.race([i.p,r]),n),{cancel:()=>i.cancel()},0);return a&&(e.insertText=a.insertText,e.additionalEdit=a.additionalEdit),e},f)}await this.applyDefaultPasteHandler(n,r,f,i)}finally{u.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),M(961,`Running paste handlers. Click to cancel and do basic paste`),s,{cancel:async()=>{s.cancel(),!o.token.isCancellationRequested&&await this.applyDefaultPasteHandler(n,r,o.token,i)}}).finally(()=>{o.dispose()}),this._currentPasteOperation=s}showPasteAsPick(e,t,n,r,i){this._logService.trace(`CopyPasteController#showPasteAsPick`);let a=Cn(async o=>{let s=this._editor;if(!s.hasModel())return;let c=s.getModel(),l=new G,u=l.add(new Fo(s,3,void 0,o));try{if(await this.mergeInDataFromCopy(t,r,i,u.token),u.token.isCancellationRequested)return;let a=t.filter(t=>this.isSupportedPasteProvider(t,r,e));e&&(a=a.filter(t=>this.providerMatchesPreference(t,e)));let o={triggerKind:bc.PasteAs,only:e&&`only`in e?e.only:void 0},s=l.add(await this.getPasteEdits(a,r,c,n,o,u.token));if(u.token.isCancellationRequested)return;if(e&&(s={edits:s.edits.filter(t=>`only`in e?e.only.contains(t.kind):`preferences`in e?e.preferences.some(e=>e.contains(t.kind)):e.providerId===t.provider.id),dispose:s.dispose}),!s.edits.length){e&&this.showPasteAsNoEditMessage(n,e);return}let d;if(e)d=s.edits.at(0);else{let e={id:`editor.pasteAs.default`,label:M(962,`Configure default paste action`),edit:void 0},t=await this._quickInputService.pick([...s.edits.map(e=>({label:e.title,description:e.kind?.value,edit:e})),...ap._configureDefaultAction?[kt({type:`separator`}),{label:ap._configureDefaultAction.label,edit:void 0}]:[]],{placeHolder:M(963,`Select Paste Action`)});if(t===e){ap._configureDefaultAction?.run();return}d=t?.edit}if(!d)return;let f=Ef(c.uri,n,d);await this._bulkEditService.apply(f,{editor:this._editor})}finally{l.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:M(964,`Running paste handlers`)},()=>a)}setCopyMetadata(e,t){this._logService.trace(`CopyPasteController#setCopyMetadata new id : `,t.id),e.setData(lp,JSON.stringify(t))}fetchCopyMetadata(e){this._logService.trace(`CopyPasteController#fetchCopyMetadata`);let t=e.clipboardData.getData(lp);if(t)try{return JSON.parse(t)}catch{return}if(e.metadata)return{defaultPastePayload:{mode:e.metadata.mode,multicursorText:e.metadata.multicursorText??null,pasteOnNewLine:!!e.metadata.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,n,r){if(this._logService.trace(`CopyPasteController#mergeInDataFromCopy with metadata : `,n?.id),n?.id&&ap._currentCopyOperation?.handle===n.id){let n=ap._currentCopyOperation.operations.filter(t=>e.some(e=>e.pasteMimeTypes.some(e=>Ku(e,t.providerMimeTypes)))).map(e=>e.operation),i=await Promise.all(n);if(r.isCancellationRequested)return;for(let e of i.reverse())if(e)for(let[n,r]of e)t.replace(n,r)}if(!t.has(pa.uriList)){let e=await this._clipboardService.readResources();if(r.isCancellationRequested)return;e.length&&t.append(pa.uriList,uu(Zo.create(e)))}}async getPasteEdits(e,t,n,r,i,a){let o=new G;return{edits:Df(pr(await Ze(Promise.all(e.map(async e=>{try{let s=await e.provideDocumentPasteEdits?.(n,r,t,i,a);return s&&o.add(s),s?.edits?.map(t=>({...t,provider:e}))}catch(e){ki(e)||console.error(e);return}})),a)??[]).flat().filter(e=>!i.only||i.only.contains(e.kind))),dispose:()=>o.dispose()}}async applyDefaultPasteHandler(e,t,n,r){let i=await(e.get(pa.text)??e.get(`text`))?.asString()??``;if(n.isCancellationRequested)return;let a={clipboardEvent:r,text:i,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._logService.trace(`CopyPasteController#applyDefaultPasteHandler for id : `,t?.id),this._editor.trigger(`keyboard`,`paste`,a)}isSupportedPasteProvider(e,t,n){return e.pasteMimeTypes?.some(e=>t.matches(e))?!n||this.providerMatchesPreference(e,n):!1}providerMatchesPreference(e,t){return`only`in t?e.providedPasteEditKinds.some(e=>t.only.contains(e)):`preferences`in t?e.providedPasteEditKinds.some(e=>t.preferences.some(t=>t.contains(e))):e.id===t.providerId}getInitialActiveEditIndex(e,t){let n=this._configService.getValue(sp,{resource:e.uri});for(let e of Array.isArray(n)?n:[]){let n=new Gd(e),r=t.findIndex(e=>n.contains(e.kind));if(r>=0)return r}return 0}};up=ap=rp([ip(1,W),ip(2,ms),ip(3,za),ip(4,Bc),ip(5,Kt),ip(6,Mo),ip(7,R),ip(8,qa),ip(9,hs)],up);var dp=`9_cutcopypaste`,fp=ya||document.queryCommandSupported(`cut`),pp=ya||document.queryCommandSupported(`copy`),mp=navigator.clipboard===void 0||yi?document.queryCommandSupported(`paste`):!0;function hp(e){return e.register(),e}var gp=fp?hp(new Uc({id:`editor.action.clipboardCutAction`,precondition:void 0,kbOpts:ya?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:E.MenubarEditMenu,group:`2_ccp`,title:M(849,`Cu&&t`),order:1},{menuId:E.EditorContext,group:dp,title:M(850,`Cut`),when:O.writable,order:1},{menuId:E.CommandPalette,group:``,title:M(851,`Cut`),order:1},{menuId:E.SimpleEditorContext,group:dp,title:M(852,`Cut`),when:O.writable,order:1}]})):void 0,_p=pp?hp(new Uc({id:`editor.action.clipboardCopyAction`,precondition:void 0,kbOpts:ya?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:E.MenubarEditMenu,group:`2_ccp`,title:M(853,`&&Copy`),order:2},{menuId:E.EditorContext,group:dp,title:M(854,`Copy`),order:2},{menuId:E.CommandPalette,group:``,title:M(855,`Copy`),order:1},{menuId:E.SimpleEditorContext,group:dp,title:M(856,`Copy`),order:2}]})):void 0;hn.appendMenuItem(E.MenubarEditMenu,{submenu:E.MenubarCopy,title:T(861,`Copy As`),group:`2_ccp`,order:3}),hn.appendMenuItem(E.EditorContext,{submenu:E.EditorContextCopy,title:T(862,`Copy As`),group:dp,order:3}),hn.appendMenuItem(E.EditorContext,{submenu:E.EditorContextShare,title:T(863,`Share`),group:`11_share`,order:-1,when:N.and(N.notEquals(`resourceScheme`,`output`),O.editorTextFocus)}),hn.appendMenuItem(E.ExplorerContext,{submenu:E.ExplorerContextShare,title:T(864,`Share`),group:`11_share`,order:-1});var vp=mp?hp(new Uc({id:`editor.action.clipboardPasteAction`,precondition:void 0,kbOpts:ya?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:E.MenubarEditMenu,group:`2_ccp`,title:M(857,`&&Paste`),order:4},{menuId:E.EditorContext,group:dp,title:M(858,`Paste`),when:O.writable,order:4},{menuId:E.CommandPalette,group:``,title:M(859,`Paste`),order:1},{menuId:E.SimpleEditorContext,group:dp,title:M(860,`Paste`),when:O.writable,order:4}]})):void 0,yp=class extends K{constructor(){super({id:`editor.action.clipboardCopyWithSyntaxHighlightingAction`,label:T(865,`Copy with Syntax Highlighting`),precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,weight:100}})}run(e,t){let n=e.get(ms),r=e.get(Bc);n.trace(`ExecCommandCopyWithSyntaxHighlightingAction#run`),t.hasModel()&&(!t.getOption(45)&&t.getSelection().isEmpty()||(go.forceCopyWithSyntaxHighlighting=!0,t.focus(),n.trace(`ExecCommandCopyWithSyntaxHighlightingAction (before execCommand copy)`),bp(t,r),n.trace(`ExecCommandCopyWithSyntaxHighlightingAction (after execCommand copy)`),go.forceCopyWithSyntaxHighlighting=!1))}};function bp(e,t){if(go.electronBugWorkaroundCopyEventHasFired=!1,e.getContainerDomNode().ownerDocument.execCommand(`copy`),ya&&go.electronBugWorkaroundCopyEventHasFired===!1){let{dataToCopy:n}=Xc(e._getViewModel(),void 0,yi);t.writeText(n.text)}}function xp(e,t){e&&(e.addImplementation(1e4,`code-editor`,(e,n)=>{let r=e.get(ms),i=e.get(Bc);r.trace(`registerExecCommandImpl (addImplementation code-editor for : `,t,`)`);let a=e.get(Cc).getFocusedCodeEditor();if(a&&a.hasTextFocus()&&a.hasModel()){let e=a.getOption(45),n=a.getSelection();return n&&n.isEmpty()&&!e||(a.getOption(170)&&t===`cut`?(Sp(a),r.trace(`registerExecCommandImpl (before execCommand copy)`),bp(a,i),a.trigger(void 0,`cut`,void 0),r.trace(`registerExecCommandImpl (after execCommand copy)`)):(Sp(a),r.trace(`registerExecCommandImpl (before execCommand `+t+`)`),t===`copy`?bp(a,i):a.getContainerDomNode().ownerDocument.execCommand(t),r.trace(`registerExecCommandImpl (after execCommand `+t+`)`))),!0}return!1}),e.addImplementation(0,`generic-dom`,(e,n)=>{let r=e.get(ms);return r.trace(`registerExecCommandImpl (addImplementation generic-dom for : `,t,`)`),r.trace(`registerExecCommandImpl (before execCommand `+t+`)`),Wu().execCommand(t),r.trace(`registerExecCommandImpl (after execCommand `+t+`)`),!0}))}function Sp(e){if(e.getOption(170)){let t=He.get(e.getId());t&&t.handleWillCopy()}}xp(gp,`cut`),xp(_p,`copy`),vp&&(vp.addImplementation(1e4,`code-editor`,(e,t)=>{let n=e.get(ms);n.trace(`registerExecCommandImpl (addImplementation code-editor for : paste)`);let r=e.get(Cc),i=e.get(Bc),a=r.getFocusedCodeEditor();if(a&&a.hasModel()&&a.hasTextFocus()){if(a.getOption(170)){let e=He.get(a.getId());e&&e.handleWillPaste()}n.trace(`registerExecCommandImpl (before triggerPaste)`);let e=i.triggerPaste(Mu().vscodeWindowId);return e?(n.trace(`registerExecCommandImpl (triggerPaste defined)`),e.then(async()=>(n.trace(`registerExecCommandImpl (after triggerPaste)`),up.get(a)?.finishedPaste()??Promise.resolve()))):(n.trace(`registerExecCommandImpl (triggerPaste undefined)`),lu?(n.trace(`registerExecCommandImpl (Paste handling on web)`),(async()=>{let e=await i.readText();if(e!==``){let t=zo.INSTANCE.get(e),r=!1,i=null,o=null;t&&(r=a.getOption(45)&&!!t.isFromEmptySelection,i=t.multicursorText===void 0?null:t.multicursorText,o=t.mode),n.trace(`registerExecCommandImpl (clipboardText.length : `,e.length,` id : `,t?.id,`)`),a.trigger(`keyboard`,`paste`,{text:e,pasteOnNewLine:r,multicursorText:i,mode:o})}})()):!0)}return!1}),vp.addImplementation(0,`generic-dom`,(e,t)=>(e.get(ms).trace(`registerExecCommandImpl (addImplementation generic-dom for : paste)`),e.get(Bc).triggerPaste(Mu().vscodeWindowId)??!1))),pp&&L(yp);var Cp=new class{constructor(){this.QuickFix=new Gd(`quickfix`),this.Refactor=new Gd(`refactor`),this.RefactorExtract=this.Refactor.append(`extract`),this.RefactorInline=this.Refactor.append(`inline`),this.RefactorMove=this.Refactor.append(`move`),this.RefactorRewrite=this.Refactor.append(`rewrite`),this.Notebook=new Gd(`notebook`),this.Source=new Gd(`source`),this.SourceOrganizeImports=this.Source.append(`organizeImports`),this.SourceFixAll=this.Source.append(`fixAll`),this.SurroundWith=this.Refactor.append(`surround`)}},wp;(function(e){e.Refactor=`refactor`,e.RefactorPreview=`refactor preview`,e.Lightbulb=`lightbulb`,e.Default=`other (default)`,e.SourceAction=`source action`,e.QuickFix=`quick fix action`,e.FixAll=`fix all`,e.OrganizeImports=`organize imports`,e.AutoFix=`auto fix`,e.QuickFixHover=`quick fix hover window`,e.OnSave=`save participants`,e.ProblemsView=`problems view`})(wp||={});function Tp(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some(n=>Dp(t,n,e.include))||!e.includeSourceActions&&Cp.Source.contains(t))}function Ep(e,t){let n=t.kind?new Gd(t.kind):void 0;return!(e.include&&(!n||!e.include.contains(n))||e.excludes&&n&&e.excludes.some(t=>Dp(n,t,e.include))||!e.includeSourceActions&&n&&Cp.Source.contains(n)||e.onlyIncludePreferredActions&&!t.isPreferred)}function Dp(e,t,n){return!(!t.contains(e)||n&&t.contains(n))}var Op=class e{static fromUser(t,n){return!t||typeof t!=`object`?new e(n.kind,n.apply,!1):new e(e.getKindFromUser(t,n.kind),e.getApplyFromUser(t,n.apply),e.getPreferredUser(t))}static getApplyFromUser(e,t){switch(typeof e.apply==`string`?e.apply.toLowerCase():``){case`first`:return`first`;case`never`:return`never`;case`ifsingle`:return`ifSingle`;default:return t}}static getKindFromUser(e,t){return typeof e.kind==`string`?new Gd(e.kind):t}static getPreferredUser(e){return typeof e.preferred==`boolean`&&e.preferred}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},kp=class{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){Qt(e)}t&&(this.action.edit=t.edit)}return this}},Ap=`editor.action.codeAction`,jp=`editor.action.quickFix`,Mp=`editor.action.autoFix`,Np=`editor.action.refactor`,Pp=`editor.action.sourceAction`,Fp=`editor.action.organizeImports`,Ip=`editor.action.fixAll`,Lp=1e3,Rp=class e extends U{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:t},{action:n}){return t.isAI&&!n.isAI?1:!t.isAI&&n.isAI?-1:Ma(t.diagnostics)?Ma(n.diagnostics)?e.codeActionsPreferredComparator(t,n):-1:Ma(n.diagnostics)?1:e.codeActionsPreferredComparator(t,n)}constructor(t,n,r){super(),this.documentation=n,this._register(r),this.allActions=[...t].sort(e.codeActionsComparator),this.validActions=this.allActions.filter(({action:e})=>!e.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Cp.QuickFix.contains(new Gd(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}},zp={actions:[],documentation:void 0};async function Bp(e,t,n,r,i,a){let o=r.filter||{},s={...o,excludes:[...o.excludes||[],Cp.Notebook]},c={only:o.include?.value,trigger:r.type},l=new Kc(t,a),u=Vp(e,t,r.type===2?s:o),d=new G,f=u.map(async e=>{let r=setTimeout(()=>i.report(e),1250);try{let r=await e.provideCodeActions(t,n,c,l.token);if(l.token.isCancellationRequested)return r?.dispose(),zp;r&&d.add(r);let i=(r?.actions||[]).filter(e=>e&&Ep(o,e)),a=Up(e,i,o.include);return{actions:i.map(t=>new kp(t,e)),documentation:a}}catch(e){if(ki(e))throw e;return Qt(e),zp}finally{clearTimeout(r)}}),p=e.onDidChange(()=>{wc(e.all(t),u)||l.cancel()});try{let n=await Promise.all(f),i=n.map(e=>e.actions).flat(),a=new Rp(i,[...pr(n.map(e=>e.documentation)),...Hp(e,t,r,i)],d);return d.add(a),a}catch(e){throw d.dispose(),e}finally{p.dispose(),l.dispose()}}function Vp(e,t,n){return e.all(t).filter(e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some(e=>Tp(n,new Gd(e))))}function*Hp(e,t,n,r){if(t&&r.length)for(let i of e.all(t))i._getAdditionalMenuItems&&(yield*i._getAdditionalMenuItems?.({trigger:n.type,only:n.filter?.include?.value},r.map(e=>e.action)))}function Up(e,t,n){if(!e.documentation)return;let r=e.documentation.map(e=>({kind:new Gd(e.kind),command:e.command}));if(n){let e;for(let t of r)t.kind.contains(n)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return e?.command}for(let e of t)if(e.kind){for(let t of r)if(t.kind.contains(new Gd(e.kind)))return t.command}}var Wp;(function(e){e.OnSave=`onSave`,e.FromProblemsView=`fromProblemsView`,e.FromCodeActions=`fromCodeActions`,e.FromAILightbulb=`fromAILightbulb`,e.FromProblemsHover=`fromProblemsHover`})(Wp||={});async function Gp(e,t,n,r,i=w.None){let a=e.get(za),o=e.get(Kt),s=e.get(Dn),c=e.get(En),l=e.get(oo);if(s.publicLog2(`codeAction.applyCodeAction`,{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:n}),l.playSignal(jl.codeActionTriggered),await t.resolve(i),!i.isCancellationRequested&&!(t.action.edit?.edits.length&&!(await a.apply(t.action.edit,{editor:r?.editor,label:t.action.title,quotableLabel:t.action.title,code:`undoredo.codeAction`,respectAutoSaveConfig:n!==Wp.OnSave,showPreview:r?.preview,reason:Br.codeAction({kind:t.action.kind,providerId:xe.fromExtensionId(t.provider?.extensionId)})})).isApplied)){if(t.action.command)try{await o.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){let t=Kp(e);c.error(typeof t==`string`?t:M(866,`An unknown error occurred while applying the code action`))}setTimeout(()=>l.playSignal(jl.codeActionApplied),Lp)}}function Kp(e){if(typeof e==`string`)return e;if(e instanceof Error&&typeof e.message==`string`)return e.message}pl.registerCommand(`_executeCodeActionProvider`,async function(e,t,n,r,i){if(!(t instanceof lr))throw ai();let{codeActionProvider:a}=e.get(R),o=e.get(Rl).getModel(t);if(!o)throw ai();let s=B.isISelection(n)?B.liftSelection(n):A.isIRange(n)?o.validateRange(n):void 0;if(!s)throw ai();let c=typeof r==`string`?new Gd(r):void 0,l=await Bp(a,o,s,{type:1,triggerAction:wp.Default,filter:{includeSourceActions:!0,include:c}},rs.None,w.None),u=[],d=Math.min(l.validActions.length,typeof i==`number`?i:0);for(let e=0;ee.action)}finally{setTimeout(()=>l.dispose(),100)}});var qp=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jp=function(e,t){return function(n,r){t(n,r,e)}},Yp,Xp=class{static{Yp=this}static{this.codeActionCommands=[Np,Ap,Pp,Fp,Ip]}constructor(e){this.keybindingService=e}getResolver(){let e=new uo(()=>this.keybindingService.getKeybindings().filter(e=>Yp.codeActionCommands.indexOf(e.command)>=0).filter(e=>e.resolvedKeybinding).map(e=>{let t=e.commandArgs;return e.command===`editor.action.organizeImports`?t={kind:Cp.SourceOrganizeImports.value}:e.command===`editor.action.fixAll`&&(t={kind:Cp.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...Op.fromUser(t,{kind:Gd.None,apply:`never`})}}));return t=>{if(t.kind)return this.bestKeybindingForCodeAction(t,e.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Gd(e.kind);return t.filter(e=>e.kind.contains(n)).filter(t=>!t.preferred||e.isPreferred).reduceRight((e,t)=>e?e.kind.contains(t.kind)?t:e:t,void 0)}};Xp=Yp=qp([Jp(0,Ae)],Xp),S(`symbolIcon.arrayForeground`,qe,M(1547,`The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.booleanForeground`,qe,M(1548,`The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.classForeground`,{dark:`#EE9D28`,light:`#D67E00`,hcDark:`#EE9D28`,hcLight:`#D67E00`},M(1549,`The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.colorForeground`,qe,M(1550,`The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.constantForeground`,qe,M(1551,`The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.constructorForeground`,{dark:`#B180D7`,light:`#652D90`,hcDark:`#B180D7`,hcLight:`#652D90`},M(1552,`The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.enumeratorForeground`,{dark:`#EE9D28`,light:`#D67E00`,hcDark:`#EE9D28`,hcLight:`#D67E00`},M(1553,`The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.enumeratorMemberForeground`,{dark:`#75BEFF`,light:`#007ACC`,hcDark:`#75BEFF`,hcLight:`#007ACC`},M(1554,`The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.eventForeground`,{dark:`#EE9D28`,light:`#D67E00`,hcDark:`#EE9D28`,hcLight:`#D67E00`},M(1555,`The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.fieldForeground`,{dark:`#75BEFF`,light:`#007ACC`,hcDark:`#75BEFF`,hcLight:`#007ACC`},M(1556,`The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.fileForeground`,qe,M(1557,`The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.folderForeground`,qe,M(1558,`The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.functionForeground`,{dark:`#B180D7`,light:`#652D90`,hcDark:`#B180D7`,hcLight:`#652D90`},M(1559,`The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.interfaceForeground`,{dark:`#75BEFF`,light:`#007ACC`,hcDark:`#75BEFF`,hcLight:`#007ACC`},M(1560,`The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.keyForeground`,qe,M(1561,`The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.keywordForeground`,qe,M(1562,`The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.methodForeground`,{dark:`#B180D7`,light:`#652D90`,hcDark:`#B180D7`,hcLight:`#652D90`},M(1563,`The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.moduleForeground`,qe,M(1564,`The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.namespaceForeground`,qe,M(1565,`The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.nullForeground`,qe,M(1566,`The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.numberForeground`,qe,M(1567,`The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.objectForeground`,qe,M(1568,`The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.operatorForeground`,qe,M(1569,`The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.packageForeground`,qe,M(1570,`The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.propertyForeground`,qe,M(1571,`The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.referenceForeground`,qe,M(1572,`The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.snippetForeground`,qe,M(1573,`The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.stringForeground`,qe,M(1574,`The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.structForeground`,qe,M(1575,`The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.textForeground`,qe,M(1576,`The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.typeParameterForeground`,qe,M(1577,`The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.unitForeground`,qe,M(1578,`The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`)),S(`symbolIcon.variableForeground`,{dark:`#75BEFF`,light:`#007ACC`,hcDark:`#75BEFF`,hcLight:`#007ACC`},M(1579,`The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget.`));var Zp=Object.freeze({kind:Gd.Empty,title:M(902,`More Actions...`)}),Qp=Object.freeze([{kind:Cp.QuickFix,title:M(903,`Quick Fix`)},{kind:Cp.RefactorExtract,title:M(904,`Extract`),icon:x.wrench},{kind:Cp.RefactorInline,title:M(905,`Inline`),icon:x.wrench},{kind:Cp.RefactorRewrite,title:M(906,`Rewrite`),icon:x.wrench},{kind:Cp.RefactorMove,title:M(907,`Move`),icon:x.wrench},{kind:Cp.SurroundWith,title:M(908,`Surround With`),icon:x.surroundWith},{kind:Cp.Source,title:M(909,`Source Action`),icon:x.symbolFile},Zp]);function $p(e,t,n){if(!t)return e.map(e=>({kind:`action`,item:e,group:Zp,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!e.action.edit?.edits.length}));let r=Qp.map(e=>({group:e,actions:[]}));for(let t of e){let e=t.action.kind?new Gd(t.action.kind):Gd.None;for(let n of r)if(n.group.kind.contains(e)){n.actions.push(t);break}}let i=[];for(let e of r)if(e.actions.length){i.push({kind:`header`,group:e.group});for(let t of e.actions){let r=e.group;i.push({kind:`action`,item:t,group:t.action.isAI?{title:r.title,kind:r.kind,icon:x.sparkle}:r,label:t.action.title,disabled:!!t.action.disabled,keybinding:n(t.action)})}}return i}var em=new k(`supportedCodeAction`,``),tm=class extends U{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new _),this.ignoreLightbulbOff=!1,this._register(this._markerService.onMarkerChanged(e=>this._onMarkerChanges(e))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(e=>$r(e,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:wp.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getSelection();if(e.type===1)return t;let n=this._editor.getOption(73).enabled;if(!(n===mt.Off&&!this.ignoreLightbulbOff)){if(n===mt.Off||n===mt.On)return t;if(n===mt.OnCode){if(!t.isEmpty())return t;let e=this._editor.getModel(),{lineNumber:n,column:r}=t.getPosition(),i=e.getLineContent(n);if(i.length===0)return;if(r===1){if(/\s/.test(i[0]))return}else if(r===e.getLineMaxColumn(n)){if(/\s/.test(i[i.length-1]))return}else if(/\s/.test(i[r-2])&&/\s/.test(i[r-1]))return}return t}}},nm;(function(e){e.Empty={type:0};class t{constructor(e,t,n){this.trigger=e,this.position=t,this._cancellablePromise=n,this.type=1,this.actions=n.catch(e=>{if(ki(e))return rm;throw e})}cancel(){this._cancellablePromise.cancel()}}e.Triggered=t})(nm||={});var rm=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1}),im=class extends U{constructor(e,t,n,r,i,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=i,this._configurationService=a,this._codeActionOracle=this._register(new bs),this._state=nm.Empty,this._onDidChangeState=this._register(new F),this.onDidChangeState=this._onDidChangeState.event,this.codeActionsDisposable=this._register(new bs),this._disposed=!1,this._ignoreLightbulbOff=!1,this._supportedCodeActions=em.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(73)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(nm.Empty,!0))}_settingEnabledNearbyQuickfixes(){let e=this._editor?.getModel();return this._configurationService?this._configurationService.getValue(`editor.codeActionWidget.includeNearbyQuickFixes`,{resource:e?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(nm.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(104)){let t=this._registry.all(e).flatMap(e=>e.providedCodeActionKinds??[]);this._supportedCodeActions.set(t.join(` `));let n=new tm(this._editor,this._markerService,t=>{if(!t){this.setState(nm.Empty);return}let n=t.selection.getStartPosition(),r=Cn(async n=>{if(this._settingEnabledNearbyQuickfixes()&&t.trigger.type===1&&(t.trigger.triggerAction===wp.QuickFix||t.trigger.filter?.include?.contains(Cp.QuickFix))){let r=await Bp(this._registry,e,t.selection,t.trigger,rs.None,n);this.codeActionsDisposable.value=r;let i=[...r.allActions];if(n.isCancellationRequested)return r.dispose(),rm;let a=r.validActions?.some(e=>e.action.kind&&Cp.QuickFix.contains(new Gd(e.action.kind))&&!e.action.isAI),o=this._markerService.read({resource:e.uri});if(a){for(let e of r.validActions)e.action.command?.arguments?.some(e=>typeof e==`string`&&e.includes(`_typescript.applyFixAllCodeAction`))&&(e.action.diagnostics=[...o.filter(e=>e.relatedInformation)]);return{validActions:r.validActions,allActions:i,documentation:r.documentation,hasAutoFix:r.hasAutoFix,hasAIFix:r.hasAIFix,allAIFixes:r.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=r}}}else if(!a&&o.length>0){let a=t.selection.getPosition(),s=a,c=Number.MAX_VALUE,l=[...r.validActions];for(let u of o){let d=u.endColumn,f=u.endLineNumber,p=u.startLineNumber;if(f===a.lineNumber||p===a.lineNumber){s=new j(f,d);let u={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:t.trigger.filter?.include?t.trigger.filter?.include:Cp.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:t.trigger.context?.notAvailableMessage||``,position:s}},p=new B(s.lineNumber,s.column,s.lineNumber,s.column),m=await Bp(this._registry,e,p,u,rs.None,n);if(n.isCancellationRequested)return m.dispose(),rm;if(m.validActions.length!==0){for(let e of m.validActions)e.action.command?.arguments?.some(e=>typeof e==`string`&&e.includes(`_typescript.applyFixAllCodeAction`))&&(e.action.diagnostics=[...o.filter(e=>e.relatedInformation)]);r.allActions.length===0&&i.push(...m.allActions),Math.abs(a.column-d)n.findIndex(t=>t.action.title===e.action.title)===t);return u.sort((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0),{validActions:u,allActions:i,documentation:r.documentation,hasAutoFix:r.hasAutoFix,hasAIFix:r.hasAIFix,allAIFixes:r.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=r}}}}if(t.trigger.type===1){let r=await Bp(this._registry,e,t.selection,t.trigger,rs.None,n);return this.codeActionsDisposable.value=r,r}let r=await Bp(this._registry,e,t.selection,t.trigger,rs.None,n);return this.codeActionsDisposable.value=r,r});t.trigger.type===1&&this._progressService?.showWhile(r,250);let i=new nm.Triggered(t.trigger,n,r),a=!1;this._state.type===1&&(a=this._state.trigger.type===1&&i.type===1&&i.trigger.type===2&&this._state.position!==i.position),a?setTimeout(()=>{this.setState(i)},500):this.setState(i)},void 0);n.ignoreLightbulbOff=this._ignoreLightbulbOff,this._codeActionOracle.value=n,this._codeActionOracle.value.trigger({type:2,triggerAction:wp.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.trigger(e),this.codeActionsDisposable.dispose()}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}},am=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},om=function(e,t){return function(n,r){t(n,r,e)}},sm,cm=ed(`gutter-lightbulb`,x.lightBulb,M(910,`Icon which spawns code actions menu from the gutter when there is no space in the editor.`)),lm=ed(`gutter-lightbulb-auto-fix`,x.lightbulbAutofix,M(911,`Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.`)),um=ed(`gutter-lightbulb-sparkle`,x.lightbulbSparkle,M(912,`Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.`)),dm=ed(`gutter-lightbulb-aifix-auto-fix`,x.lightbulbSparkleAutofix,M(913,`Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.`)),fm=ed(`gutter-lightbulb-sparkle-filled`,x.sparkleFilled,M(914,`Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.`)),pm;(function(e){e.Hidden={type:0};class t{constructor(e,t,n,r){this.actions=e,this.trigger=t,this.editorPosition=n,this.widgetPosition=r,this.type=1}}e.Showing=t})(pm||={});function mm(e,t,n,r,i=!1){if(e.validActions.length<=0)return;let a,o=!1;e.allAIFixes?(a=i?fm:x.sparkleFilled,e.validActions.length===1&&(o=!0)):a=e.hasAutoFix?e.hasAIFix?i?dm:x.lightbulbSparkleAutofix:i?lm:x.lightbulbAutofix:e.hasAIFix?i?um:x.lightbulbSparkle:i?cm:x.lightBulb;let s;return s=o?M(915,`Run: {0}`,e.validActions[0].action.title):e.hasAutoFix&&n?M(916,`Show Code Actions. Preferred Quick Fix Available ({0})`,n):!e.hasAutoFix&&r?M(917,`Show Code Actions ({0})`,r):M(918,`Show Code Actions`),{actions:e,trigger:t,icon:a,autoRun:o,title:s,isGutter:i}}var hm=class extends U{static{sm=this}static{this.GUTTER_DECORATION=Y.register({description:`codicon-gutter-lightbulb-decoration`,glyphMarginClassName:P.asClassName(x.lightBulb),glyphMargin:{position:Or.Left},stickiness:1})}static{this.ID=`editor.contrib.lightbulbWidget`}static{this._posPref=[0]}static _computeLightBulbInfo(e,t,n,r){if(e.type===1)return mm(e.actions,e.trigger,n,r,t)}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this.onlyWithEmptySelection=!1,this._onClick=this._register(new F),this.onClick=this._onClick.event,this._state=Oo(this,pm.Hidden),this._gutterState=Oo(this,pm.Hidden),this._combinedInfo=J(this,e=>{let t=this._gutterState.read(e);if(t.type===1)return sm._computeLightBulbInfo(t,!0,this._preferredKbLabel.read(e),this._quickFixKbLabel.read(e));let n=this._state.read(e);if(n.type===1)return sm._computeLightBulbInfo(n,!1,this._preferredKbLabel.read(e),this._quickFixKbLabel.read(e))}),this._iconClasses=[],this.lightbulbClasses=[`codicon-`+cm.id,`codicon-`+dm.id,`codicon-`+lm.id,`codicon-`+um.id,`codicon-`+fm.id],this._preferredKbLabel=Oo(this,void 0),this._quickFixKbLabel=Oo(this,void 0),this.gutterDecoration=sm.GUTTER_DECORATION,this._domNode=q(`div.lightBulbWidget`),this._domNode.role=`listbox`,this._register(Wn.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(e=>{let t=this._editor.getModel(),n=this._state.get();(n.type!==1||!t||n.editorPosition.lineNumber>=t.getLineCount())&&this.hide();let r=this._gutterState.get();(r.type!==1||!t||r.editorPosition.lineNumber>=t.getLineCount())&&this.gutterHide()})),this._register(ss(this._domNode,e=>{let t=this._state.get();if(t.type!==1)return;this._editor.focus(),e.preventDefault();let{top:n,height:r}=bu(this._domNode),i=this._editor.getOption(75),a=Math.floor(i/3);t.widgetPosition.position!==null&&t.widgetPosition.position.lineNumber{(e.buttons&1)==1&&this.hide()})),this._register(xr.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel.set(this._keybindingService.lookupKeybinding(`editor.action.autoFix`)?.getLabel()??void 0,void 0),this._quickFixKbLabel.set(this._keybindingService.lookupKeybinding(`editor.action.quickFix`)?.getLabel()??void 0,void 0)})),this._register(z(e=>{let t=this._combinedInfo.read(e);this._updateLightBulbTitleAndIcon(t),this._updateGutterDecorationOptions(t)})),this._register(this._editor.onMouseDown(async e=>{if(!e.target.element||!this.lightbulbClasses.some(t=>e.target.element&&e.target.element.classList.contains(t)))return;let t=this._gutterState.get();if(t.type!==1)return;this._editor.focus();let{top:n,height:r}=bu(e.target.element),i=this._editor.getOption(75),a=Math.floor(i/3);t.widgetPosition.position!==null&&t.widgetPosition.position.lineNumber22,u=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),d=this._editor.getLineDecorations(i),f=!1;if(d)for(let e of d){let t=e.options.glyphMarginClassName;if(t&&!this.lightbulbClasses.some(e=>t.includes(e))){f=!0;break}}let p=i,m=1;if(!l){let o=e=>{let t=r.getLineContent(e);return/^\s*$|^\s+/.test(t)||t.length<=m};if(i>1&&!u(i-1)){let a=i===r.getLineCount(),s=i>1&&o(i-1),c=!a&&o(i+1),l=o(i),u=!c&&!s;if(!c&&!s&&!f)return this._gutterState.set(new pm.Showing(e,t,n,{position:{lineNumber:p,column:m},preference:sm._posPref}),void 0),this.renderGutterLightbub(),this.hide();s||a||s&&!l?--p:(c||u&&l)&&(p+=1)}else if(i===1&&(i===r.getLineCount()||!o(i+1)&&!o(i)))if(this._gutterState.set(new pm.Showing(e,t,n,{position:{lineNumber:p,column:m},preference:sm._posPref}),void 0),f)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(i{this._gutterDecorationID=t.addDecoration(new A(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(t=>{t.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,t){this._editor.changeDecorations(n=>{n.changeDecoration(e,new A(t,0,t,0)),n.changeDecorationOptions(e,this.gutterDecoration)})}};hm=sm=am([om(1,Ae)],hm);var gm=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_m=function(e,t){return function(n,r){t(n,r,e)}},vm,ym=`quickfix-edit-highlight`,bm=class extends U{static{vm=this}static{this.ID=`editor.contrib.codeActionController`}static get(e){return e.getContribution(vm.ID)}constructor(e,t,n,r,i,a,o,s,c,l,u,d){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=c,this._instantiationService=l,this._progressService=u,this._keybindingService=d,this._activeCodeActions=this._register(new bs),this._showDisabled=!1,this._disposed=!1,this._onlyLightBulbWithEmptySelection=!1,this._lightBulbInfoObs=Oo(this,void 0),this._preferredKbLabel=Oo(this,void 0),this._quickFixKbLabel=Oo(this,void 0),this._editor=e,this._model=this._register(new im(this._editor,i.codeActionProvider,t,n,a,s)),this._register(this._model.onDidChangeState(e=>this.update(e))),this._register(xr.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel.set(this._keybindingService.lookupKeybinding(`editor.action.autoFix`)?.getLabel()??void 0,void 0),this._quickFixKbLabel.set(this._keybindingService.lookupKeybinding(`editor.action.quickFix`)?.getLabel()??void 0,void 0)})),this._lightBulbWidget=new uo(()=>{let e=this._editor.getContribution(hm.ID);return e&&(this._register(e.onClick(e=>this.showCodeActionsFromLightbulb(e.actions,e))),e.onlyWithEmptySelection=this._onlyLightBulbWithEmptySelection),e}),this._resolver=r.createInstance(Xp),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){let t=e.validActions[0],n=t.action.command;n&&n.id===`inlineChat.start`&&n.arguments&&n.arguments.length>=1&&n.arguments[0]&&(n.arguments[0]={...n.arguments[0],autoSend:!1}),await this.applyCodeAction(t,!1,!1,Wp.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){if(!this._editor.hasModel())return;ef.get(this._editor)?.closeMessage();let i=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:i}})}_trigger(e){return this._model.trigger(e)}async applyCodeAction(e,t,n,r){let i=this._progressService.show(!0,500);try{await this._instantiationService.invokeFunction(Gp,e,r,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:wp.QuickFix,filter:{}}),i.done()}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(e.type!==1){this.hideLightBulbWidget(),this._lightBulbInfoObs.set(void 0,void 0);return}let t;try{t=await e.actions}catch(e){ot(e);return}if(!this._disposed&&this._editor.getSelection()?.startLineNumber===e.position.lineNumber)if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),this._lightBulbInfoObs.set(mm(t,e.trigger,this._preferredKbLabel.get(),this._quickFixKbLabel.get()),void 0),e.trigger.type===1){if(e.trigger.filter?.include){let n=this.tryGetValidActionToApply(e.trigger,t);if(n){try{this.hideLightBulbWidget(),await this.applyCodeAction(n,!1,!1,Wp.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){let n=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(n&&n.action.disabled){ef.get(this._editor)?.showMessage(n.action.disabled,e.trigger.context.position),t.dispose();return}}}let n=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!n&&!t.validActions.length)){ef.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,t.dispose();return}this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:n,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply===`first`&&t.validActions.length===0||e.autoApply===`ifSingle`&&t.allActions.length===1))return t.allActions.find(({action:e})=>e.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply===`first`&&t.validActions.length>0||e.autoApply===`ifSingle`&&t.validActions.length===1))return t.validActions[0]}static{this.DECORATION=Y.register({description:`quickfix-highlight`,className:ym})}async showCodeActionList(e,t,n){let r=this._editor.createDecorationsCollection(),i=this._editor.getDomNode();if(!i)return;let a=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!a.length)return;let o=j.isIPosition(t)?this.toCoords(t):t;this._actionWidgetService.show(`codeActionWidget`,!0,$p(a,this._shouldShowHeaders(),this._resolver.getResolver()),{onSelect:async(e,t)=>{this.applyCodeAction(e,!0,!!t,n.fromLightbulb?Wp.FromAILightbulb:Wp.FromCodeActions),this._actionWidgetService.hide(!1),r.clear()},onHide:e=>{this._editor?.focus(),r.clear()},onHover:async(e,t)=>{if(t.isCancellationRequested)return;let n=!1,r=e.action.kind;if(r){let e=new Gd(r);n=[Cp.RefactorExtract,Cp.RefactorInline,Cp.RefactorRewrite,Cp.RefactorMove,Cp.Source].some(t=>t.contains(e))}return{canPreview:n||!!e.action.edit?.edits.length}},onFocus:e=>{if(e&&e.action){let t=e.action.ranges,n=e.action.diagnostics;if(r.clear(),t&&t.length>0){let e=n&&n?.length>1?n.map(e=>({range:e,options:vm.DECORATION})):t.map(e=>({range:e,options:vm.DECORATION}));r.set(e)}else if(n&&n.length>0){let e=n.map(e=>({range:e,options:vm.DECORATION}));r.set(e);let t=n[0];if(t.startLineNumber&&t.startColumn){let e=this._editor.getModel()?.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn})?.word;dr(M(899,`Context: {0} at line {1} and column {2}.`,e,t.startLineNumber,t.startColumn))}}}else r.clear()}},o,i,this._getActionBarActions(e,t,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=bu(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}}_shouldShowHeaders(){let e=this._editor?.getModel();return this._configurationService.getValue(`editor.codeActionWidget.showHeaders`,{resource:e?.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(e=>({id:e.id,label:e.title,tooltip:e.tooltip??``,class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(e.id,...e.arguments??[])}));return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:`hideMoreActions`,label:M(900,`Hide Disabled`),enabled:!0,tooltip:``,class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:`showMoreActions`,label:M(901,`Show Disabled`),enabled:!0,tooltip:``,class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};bm=vm=gm([_m(1,gu),_m(2,ft),_m(3,W),_m(4,R),_m(5,yc),_m(6,Kt),_m(7,Mo),_m(8,Yf),_m(9,W),_m(10,yc),_m(11,Ae)],bm),dt((e,t)=>{((e,n)=>{n&&t.addRule(`.monaco-editor ${e} { background-color: ${n}; }`)})(`.quickfix-edit-highlight`,e.getColor(ka));let n=e.getColor(Pc);n&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Sn(e.type)?`dotted`:`solid`} ${n}; box-sizing: border-box; }`)});function xm(e){return N.regex(em.keys()[0],RegExp(`(\\s|^)`+ea(e.value)+`\\b`))}var Sm={type:`object`,defaultSnippets:[{body:{kind:``}}],properties:{kind:{type:`string`,description:M(867,`Kind of the code action to run.`)},apply:{type:`string`,description:M(868,`Controls when the returned actions are applied.`),default:`ifSingle`,enum:[`first`,`ifSingle`,`never`],enumDescriptions:[M(869,`Always apply the first returned code action.`),M(870,`Apply the first returned code action if it is the only one.`),M(871,`Do not apply the returned code actions.`)]},preferred:{type:`boolean`,default:!1,description:M(872,`Controls if only preferred code actions should be returned.`)}}};function Cm(e,t,n,r,i=wp.Default){e.hasModel()&&bm.get(e)?.manualTriggerAtCurrentPosition(t,i,n,r)}var wm=class extends Es{constructor(){super({id:jp,title:T(889,`Quick Fix...`),precondition:N.and(O.writable,O.hasCodeActionsProvider),icon:x.lightBulb,f1:!0,keybinding:{when:O.textInputFocus,primary:2137,weight:100},menu:{id:E.InlineChatEditorAffordance,group:`1_quickfix`,order:0,when:N.and(O.writable,O.hasCodeActionsProvider)}})}runEditorCommand(e,t){return Cm(t,M(873,`No code actions available`),void 0,void 0,wp.QuickFix)}},Tm=class extends Ra{constructor(){super({id:Ap,precondition:N.and(O.writable,O.hasCodeActionsProvider),metadata:{description:`Trigger a code action`,args:[{name:`args`,schema:Sm}]}})}runEditorCommand(e,t,n){let r=Op.fromUser(n,{kind:Gd.Empty,apply:`ifSingle`});return Cm(t,typeof n?.kind==`string`?r.preferred?M(874,`No preferred code actions for '{0}' available`,n.kind):M(875,`No code actions for '{0}' available`,n.kind):r.preferred?M(876,`No preferred code actions available`):M(877,`No code actions available`),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},Em=class extends K{constructor(){super({id:Np,label:T(890,`Refactor...`),precondition:N.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:`1_modification`,order:2,when:N.and(O.writable,xm(Cp.Refactor))},metadata:{description:`Refactor...`,args:[{name:`args`,schema:Sm}]}})}run(e,t,n){let r=Op.fromUser(n,{kind:Cp.Refactor,apply:`never`});return Cm(t,typeof n?.kind==`string`?r.preferred?M(878,`No preferred refactorings for '{0}' available`,n.kind):M(879,`No refactorings for '{0}' available`,n.kind):r.preferred?M(880,`No preferred refactorings available`):M(881,`No refactorings available`),{include:Cp.Refactor.contains(r.kind)?r.kind:Gd.None,onlyIncludePreferredActions:r.preferred},r.apply,wp.Refactor)}},Dm=class extends K{constructor(){super({id:Pp,label:T(891,`Source Action...`),precondition:N.and(O.writable,O.hasCodeActionsProvider),contextMenuOpts:{group:`1_modification`,order:2.1,when:N.and(O.writable,xm(Cp.Source))},metadata:{description:`Source Action...`,args:[{name:`args`,schema:Sm}]}})}run(e,t,n){let r=Op.fromUser(n,{kind:Cp.Source,apply:`never`});return Cm(t,typeof n?.kind==`string`?r.preferred?M(882,`No preferred source actions for '{0}' available`,n.kind):M(883,`No source actions for '{0}' available`,n.kind):r.preferred?M(884,`No preferred source actions available`):M(885,`No source actions available`),{include:Cp.Source.contains(r.kind)?r.kind:Gd.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,wp.SourceAction)}},Om=class extends K{constructor(){super({id:Fp,label:T(892,`Organize Imports`),precondition:N.and(O.writable,xm(Cp.SourceOrganizeImports)),kbOpts:{kbExpr:O.textInputFocus,primary:1581,weight:100},metadata:{description:T(893,`Organize imports in the current file. Also called 'Optimize Imports' by some tools`)}})}run(e,t){return Cm(t,M(886,`No organize imports action available`),{include:Cp.SourceOrganizeImports,includeSourceActions:!0},`ifSingle`,wp.OrganizeImports)}},km=class extends K{constructor(){super({id:Ip,label:T(894,`Fix All`),precondition:N.and(O.writable,xm(Cp.SourceFixAll))})}run(e,t){return Cm(t,M(887,`No fix all action available`),{include:Cp.SourceFixAll,includeSourceActions:!0},`ifSingle`,wp.FixAll)}},Am=class extends K{constructor(){super({id:Mp,label:T(895,`Auto Fix...`),precondition:N.and(O.writable,xm(Cp.QuickFix)),kbOpts:{kbExpr:O.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Cm(t,M(888,`No auto fixes available`),{include:Cp.QuickFix,onlyIncludePreferredActions:!0},`ifSingle`,wp.AutoFix)}};X(bm.ID,bm,3),X(hm.ID,hm,4),C(wm),L(Em),L(Dm),L(Om),L(Am),L(km),V(new Tm),wt.as(na.Configuration).registerConfiguration({...wl,properties:{"editor.codeActionWidget.showHeaders":{type:`boolean`,scope:6,description:M(896,`Enable/disable showing group headers in the Code Action menu.`),default:!0}}}),wt.as(na.Configuration).registerConfiguration({...wl,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:`boolean`,scope:6,description:M(897,`Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic.`),default:!0}}}),wt.as(na.Configuration).registerConfiguration({...wl,properties:{"editor.codeActions.triggerOnFocusChange":{type:`boolean`,scope:6,markdownDescription:M(898,`Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.`,"`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}});var jm=class e{constructor(){this.lenses=[]}static{this.Empty=new e}dispose(){this._store?.dispose()}get isDisposed(){return this._store?.isDisposed??!1}add(e,t){no(e)&&(this._store??=new G,this._store.add(e));for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};async function Mm(e,t,n){let r=e.ordered(t),i=new Map,a=new jm,o=r.map(async(e,r)=>{i.set(e,r);try{let r=await Promise.resolve(e.provideCodeLenses(t,n));r&&a.add(r,e)}catch(e){Qt(e)}});return await Promise.all(o),n.isCancellationRequested?(a.dispose(),jm.Empty):(a.lenses=a.lenses.sort((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:i.get(e.provider)i.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn)),a)}pl.registerCommand(`_executeCodeLensProvider`,function(e,...t){let[n,r]=t;Un(lr.isUri(n)),Un(typeof r==`number`||!r);let{codeLensProvider:i}=e.get(R),a=e.get(Rl).getModel(n);if(!a)throw ai();let o=[],s=new G;return Mm(i,a,w.None).then(e=>{s.add(e);let t=[];for(let n of e.lenses)r==null||n.symbol.command?o.push(n.symbol):r-->0&&n.provider.resolveCodeLens&&t.push(Promise.resolve(n.provider.resolveCodeLens(a,n.symbol,w.None)).then(e=>o.push(e||n.symbol)));return Promise.all(t)}).then(()=>o).finally(()=>{setTimeout(()=>s.dispose(),100)})});var Nm=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Pm=function(e,t){return function(n,r){t(n,r,e)}},Fm=ys(`ICodeLensCache`),Im=class{constructor(e,t){this.lineCount=e,this.data=t}},Lm=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw Error(`not supported`)}},this._cache=new ee(20,.75),nd(au,()=>e.remove(`codelens/cache`,1));let t=`codelens/cache2`,n=e.get(t,1,`{}`);this._deserialize(n);let r=xr.filter(e.onWillSaveState,e=>e.reason===Ju.SHUTDOWN);xr.once(r)(n=>{e.store(t,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(e=>({range:e.symbol.range,command:e.symbol.command&&{id:``,title:e.symbol.command?.title}})),r=new jm;r.add({lenses:n},this._fakeProvider);let i=new Im(e.getLineCount(),r);this._cache.set(e.uri.toString(),i)}get(e){let t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){let e=Object.create(null);for(let[t,n]of this._cache){let r=new Set;for(let e of n.data.lenses)r.add(e.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let e in t){let n=t[e],r=[];for(let e of n.lines)r.push({range:new A(e,1,e,11)});let i=new jm;i.add({lenses:r},this._fakeProvider),this._cache.set(e,new Im(n.lineCount,i))}}catch{}}};Lm=Nm([Pm(0,fu)],Lm),_r(Fm,Lm,1);var Rm=class{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement(`div`)}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute(`monaco-visible-view-zone`)}},zm=class e{static{this._idPool=0}constructor(t,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=t,this._id=`codelens.widget-${e._idPool++}`,this.updatePosition(n),this._domNode=document.createElement(`span`),this._domNode.className=`codelens-decoration`}withCommands(t,n){this._commands.clear();let r=[],i=!1;for(let n=0;n{e.symbol.command&&s.push(e.symbol),n.addDecoration({range:e.symbol.range,options:Vm},e=>this._decorationIds[t]=e),o=o?A.plusRange(o,e.symbol.range):A.lift(e.symbol.range)}),this._viewZone=new Rm(o.startLineNumber-1,i,a),this._viewZoneId=r.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new zm(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&=(this._editor.removeContentWidget(this._contentWidget),void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{let n=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(n&&A.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((e,n)=>{t.addDecoration({range:e.symbol.range,options:Vm},e=>this._decorationIds[n]=e)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Wm=function(e,t){return function(n,r){t(n,r,e)}},Gm=class{static{this.ID=`css.editor.codeLens`}constructor(e,t,n,r,i,a){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=i,this._codeLensCache=a,this._disposables=new G,this._localToDispose=new G,this._lenses=[],this._oldCodeLensModels=new G,this._provideCodeLensDebounce=n.for(t.codeLensProvider,`CodeLensProvide`,{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,`CodeLensResolve`,{min:250,salt:`resolve`}),this._resolveCodeLensesScheduler=new Gs(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{(e.hasChanged(59)||e.hasChanged(25)||e.hasChanged(24))&&this._updateLensStyle(),e.hasChanged(23)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._localToDispose.dispose(),this._disposables.dispose(),this._resolveCodeLensesScheduler.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(75)/this._editor.getOption(61)),t=this._editor.getOption(25);return(!t||t<5)&&(t=this._editor.getOption(61)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(24),r=this._editor.getOption(59),{style:i}=this._editor.getContainerDomNode();i.setProperty(`--vscode-editorCodeLens-lineHeight`,`${e}px`),i.setProperty(`--vscode-editorCodeLens-fontSize`,`${t}px`),i.setProperty(`--vscode-editorCodeLens-fontFeatureSettings`,r.fontFeatureSettings),n&&(i.setProperty(`--vscode-editorCodeLens-fontFamily`,n),i.setProperty(`--vscode-editorCodeLens-fontFamilyDefault`,aa.fontFamily)),this._editor.changeViewZones(t=>{for(let n of this._lenses)n.updateHeight(e,t)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(23)||e.isTooLargeForTokenization())return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&Pn(()=>{let n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(let t of this._languageFeaturesService.codeLensProvider.all(e))if(typeof t.onDidChange==`function`){let e=t.onDidChange(()=>n.schedule());this._localToDispose.add(e)}let n=new Gs(()=>{let t=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=Cn(t=>Mm(this._languageFeaturesService.codeLensProvider,e,t)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);let i=this._provideCodeLensDebounce.update(e,Date.now()-t);n.delay=i,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},ot)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(tc(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{let n=[],r=-1;this._lenses.forEach(e=>{!e.isValid()||r===e.getLineNumber()?n.push(e):(e.update(t),r=e.getLineNumber())});let i=new Bm;n.forEach(e=>{e.dispose(i,t),this._lenses.splice(this._lenses.indexOf(e),1)}),i.commit(e)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(tc(()=>{if(this._editor.getModel()){let e=vn.capture(this._editor);this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{this._disposeAllLenses(e,t)})}),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(e=>{if(e.target.type!==9)return;let t=e.target.element;if(t?.tagName===`SPAN`&&(t=t.parentElement),t?.tagName===`A`)for(let e of this._lenses){let n=e.getCommand(t);if(n){this._commandService.executeCommand(n.id,...n.arguments||[]).catch(e=>this._notificationService.error(e));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new Bm;for(let e of this._lenses)e.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let i of e.lenses){let e=i.symbol.range.startLineNumber;e<1||e>t||(r&&r[r.length-1].symbol.range.startLineNumber===e?r.push(i):(r=[i],n.push(r)))}if(!n.length&&!this._lenses.length)return;let i=vn.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{let r=new Bm,i=0,o=0;for(;othis._resolveCodeLensesInViewportSoon())),i++,o++)}for(;ithis._resolveCodeLensesInViewportSoon())),o++;r.commit(e)})}),i.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;let e=this._editor.getModel();if(!e)return;let t=[],n=[];if(this._lenses.forEach(r=>{let i=r.computeIfNecessary(e);i&&(t.push(i),n.push(r))}),t.length===0){this._oldCodeLensModels.clear();return}let r=Date.now(),i=Cn(r=>{let i=t.map((t,i)=>{let a=Array(t.length),o=t.map((t,n)=>!t.symbol.command&&typeof t.provider.resolveCodeLens==`function`?Promise.resolve(t.provider.resolveCodeLens(e,t.symbol,r)).then(e=>{a[n]=e},Qt):(a[n]=t.symbol,Promise.resolve(void 0)));return Promise.all(o).then(()=>{!r.isCancellationRequested&&!n[i].isDisposed()&&n[i].updateCommands(a)})});return Promise.all(i)});this._resolveCodeLensesPromise=i,this._resolveCodeLensesPromise.then(()=>{let t=this._resolveCodeLensesDebounce.update(e,Date.now()-r);this._resolveCodeLensesScheduler.delay=t,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),i===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},e=>{ot(e),i===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};Gm=Um([Wm(1,R),Wm(2,Vo),Wm(3,Kt),Wm(4,En),Wm(5,Fm)],Gm),X(Gm.ID,Gm,1),L(class extends K{constructor(){super({id:`codelens.showLensesInCurrentLine`,precondition:O.hasCodeLensProvider,label:T(920,`Show CodeLens Commands for Current Line`)})}async run(e,t){if(!t.hasModel())return;let n=e.get(qa),r=e.get(Kt),i=e.get(En),a=t.getSelection().positionLineNumber,o=t.getContribution(Gm.ID);if(!o)return;let s=await o.getModel();if(!s)return;let c=[];for(let e of s.lenses)e.symbol.command&&e.symbol.range.startLineNumber===a&&c.push({label:e.symbol.command.title,command:e.symbol.command});if(c.length===0)return;let l=await n.pick(c,{canPickMany:!1,placeHolder:M(919,`Select a command`)});if(!l)return;let u=l.command;if(s.isDisposed){let e=(await o.getModel())?.lenses.find(e=>e.symbol.range.startLineNumber===a&&e.symbol.command?.title===u.title);if(!e||!e.symbol.command)return;u=e.symbol.command}try{await r.executeCommand(u.id,...u.arguments||[])}catch(e){i.error(e)}}});var Km=class{constructor(e,t,n,r){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}},qm=class{constructor(e,t,n,r,i,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=r,this.initialMousePosY=i,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},Jm=class{constructor(e,t){this.renderedHoverParts=e,this.disposables=t}dispose(){for(let e of this.renderedHoverParts)e.dispose();this.disposables?.dispose()}},Ym=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}},Xm=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Zm=function(e,t){return function(n,r){t(n,r,e)}},Qm=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,n){let r=t.range,i=t.color,a=new $c(new fs(Math.round(255*i.red),Math.round(255*i.green),Math.round(255*i.blue),i.alpha)),o=$c.Format.CSS.formatRGB(a),s=$c.Format.CSS.formatHSL(a),c=$c.Format.CSS.formatHexA(a,!0),l=[];return l.push({label:o,textEdit:{range:r,text:o}}),l.push({label:s,textEdit:{range:r,text:s}}),l.push({label:c,textEdit:{range:r,text:c}}),l}};Qm=Xm([Zm(0,Ri)],Qm);var $m=class extends U{constructor(e,t){super(),this._register(e.colorProvider.register(`*`,new Qm(t)))}};$m=Xm([Zm(0,R),Zm(1,Ri)],$m);async function eh(e,t,n,r=`auto`){return ah(new nh,e,t,n,r)}function th(e,t,n,r){return Promise.resolve(n.provideColorPresentations(e,t,r))}var nh=class{constructor(){}async compute(e,t,n,r){let i=await e.provideDocumentColors(t,n);if(Array.isArray(i))for(let t of i)r.push({colorInfo:t,provider:e});return Array.isArray(i)}},rh=class{constructor(){}async compute(e,t,n,r){let i=await e.provideDocumentColors(t,n);if(Array.isArray(i))for(let e of i)r.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(i)}},ih=class{constructor(e){this.colorInfo=e}async compute(e,t,n,r){let i=await e.provideColorPresentations(t,this.colorInfo,w.None);return Array.isArray(i)&&r.push(...i),Array.isArray(i)}};async function ah(e,t,n,r,i){let a=!1,o,s=[],c=t.ordered(n);for(let t=c.length-1;t>=0;t--){let l=c[t];if(i!==`always`&&l instanceof Qm)o=l;else try{await e.compute(l,n,r,s)&&(a=!0)}catch(e){Qt(e)}}return a?s:o&&i!==`never`?(await e.compute(o,n,r,s),s):[]}function oh(e,t){let{colorProvider:n}=e.get(R),r=e.get(Rl).getModel(t);if(!r)throw ai();return{model:r,colorProviderRegistry:n,defaultColorDecoratorsEnablement:e.get(Mo).getValue(`editor.defaultColorDecorators`,{resource:t})}}var sh=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ch=function(e,t){return function(n,r){t(n,r,e)}},lh,uh=Object.create({}),dh=class extends U{static{lh=this}static{this.ID=`editor.contrib.colorDetector`}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new G),this._decorationsIds=[],this._colorDatas=new Map,this._decoratorLimitReporter=this._register(new fh),this._colorDecorationClassRefs=this._register(new G),this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=this._register(new Nn(this._editor)),this._debounceInformation=r.for(n.colorProvider,`Document Colors`,{min:lh.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(e=>{let t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167);let n=t!==this._isColorDecoratorsEnabled||e.hasChanged(27),r=e.hasChanged(167);(n||r)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n==`object`){let e=n.colorDecorators;if(e&&e.enable!==void 0&&!e.enable)return e.enable}return this._editor.getOption(26)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new _,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=Cn(async e=>{let t=this._editor.getModel();if(!t)return[];let n=new To(!1),r=await eh(this._languageFeaturesService.colorProvider,t,e,this._defaultColorDecoratorsEnablement);return this._debounceInformation.update(t,n.elapsed()),r});try{let e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){ot(e)}}stop(){this._timeoutTimer&&=(this._timeoutTimer.cancel(),null),this._computePromise&&=(this._computePromise.cancel(),null),this._localToDispose.clear()}updateDecorations(e){let t=e.map(e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:Y.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((t,n)=>this._colorDatas.set(t,e[n]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(27);for(let r=0;rthis._colorDatas.has(e.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};dh=lh=sh([ch(1,Mo),ch(2,R),ch(3,Vo)],dh);var fh=class extends U{constructor(){super(...arguments),this._onDidChange=this._register(new F),this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},ph=`editor.action.showHover`,mh=`editor.action.showDefinitionPreviewHover`,hh=`editor.action.hideHover`,gh=`editor.action.scrollUpHover`,_h=`editor.action.scrollDownHover`,vh=`editor.action.scrollLeftHover`,yh=`editor.action.scrollRightHover`,bh=`editor.action.pageUpHover`,xh=`editor.action.pageDownHover`,Sh=`editor.action.goToTopHover`,Ch=`editor.action.goToBottomHover`,wh=`editor.action.increaseHoverVerbosityLevel`,Th=M(1145,`Increase Hover Verbosity Level`),Eh=`editor.action.decreaseHoverVerbosityLevel`,Dh=M(1146,`Decrease Hover Verbosity Level`),Oh=`editor.action.hideLongLineWarningHover`,kh=`editor.action.inlineSuggest.commit`,Ah=`editor.action.inlineSuggest.commitAlternativeAction`,jh=`editor.action.inlineSuggest.showPrevious`,Mh=`editor.action.inlineSuggest.showNext`,Nh=`editor.action.inlineSuggest.jump`,Ph=`editor.action.inlineSuggest.hide`,Fh=`editor.action.inlineSuggest.toggleShowCollapsed`,Ih=`editor.action.inlineSuggest.renameSymbol`,Lh=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Rh=function(e,t){return function(n,r){t(n,r,e)}},zh,Bh=class extends U{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=ca(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).showToolbar===`always`),this.sessionPosition=void 0,this.position=J(this,e=>{let t=this.model.read(e)?.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||t.parts.length===0)return this.sessionPosition=void 0,null;let n=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);let r=new j(t.lineNumber,Math.min(n,this.sessionPosition?.column??2**53-1));return this.sessionPosition=r,r}),this._register(zc((t,n)=>{let r=this.model.read(t);if(!r||!this.alwaysShowToolbar.read(t))return;let i=J(t=>{let n=t.store.add(this.instantiationService.createInstance(Uh.hot.read(t),this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands,r.warning,()=>{}));return e.addContentWidget(n),t.store.add(tc(()=>e.removeContentWidget(n))),t.store.add(z(e=>{this.position.read(e)&&r.lastTriggerKind.read(e)!==Qa.Explicit&&r.triggerExplicitly()})),n}),a=Zt(this,(e,t)=>!!this.position.read(e)||!!t);n.add(z(e=>{a.read(e)&&i.read(e)}))}))}};Bh=Lh([Rh(2,W)],Bh);var Vh=ed(`inline-suggestion-hints-next`,x.chevronRight,M(1250,`Icon for show next parameter hint.`)),Hh=ed(`inline-suggestion-hints-previous`,x.chevronLeft,M(1251,`Icon for show previous parameter hint.`)),Uh=class extends U{static{zh=this}static{this.hot=Ke(this)}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,n){let r=new Ki(e,t,n,!0,()=>this._commandService.executeCommand(e));return r.tooltip=this.keybindingService.appendKeybinding(t,e,this._contextKeyService),r}constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=i,this._extraCommands=a,this._warning=o,this._relayout=s,this._commandService=c,this.keybindingService=u,this._contextKeyService=d,this._menuService=f,this.id=`InlineSuggestionHintsContentWidget${zh.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._warningMessageContentNode=J(e=>{let t=this._warning.read(e);if(t)return typeof t.message==`string`?t.message:e.store.add(Fs(t.message)).element}),this._warningMessageNode=D.div({class:`warningMessage`,style:{maxWidth:400,margin:4,marginBottom:4,display:J(e=>this._warning.read(e)?`block`:`none`)}},[this._warningMessageContentNode]).keepUpdated(this._store),this.nodes=m(`div.inlineSuggestionsHints`,{className:this.withBorder?`monaco-hover monaco-hover-content`:``},[this._warningMessageNode.element,m(`div@toolBar`)]),this.previousAction=this._register(this.createCommandAction(jh,M(1252,`Previous`),P.asClassName(Hh))),this.availableSuggestionCountAction=this._register(new Ki(`inlineSuggestionHints.availableSuggestionCount`,``,void 0,!1)),this.nextAction=this._register(this.createCommandAction(Mh,M(1253,`Next`),P.asClassName(Vh))),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(E.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Gs(()=>{this.availableSuggestionCountAction.label=``},100)),this.disableButtonsDebounced=this._register(new Gs(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this._register(z(e=>{this._warningMessageContentNode.read(e),this._warningMessageNode.readEffect(e),this._relayout()})),this.toolBar=this._register(l.createInstance(Kh,this.nodes.toolBar,E.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith(`primary`)},actionViewItemProvider:(e,t)=>{if(e instanceof Ft)return l.createInstance(Gh,e,void 0);if(e===this.availableSuggestionCountAction){let t=new Wh(void 0,e,{label:!0,icon:!1});return t.setClass(`availableSuggestionCount`),t}},telemetrySource:`InlineSuggestionToolbar`})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(e=>{zh._dropDownVisible=e})),this._register(z(e=>{this._position.read(e),this.editor.layoutContentWidget(this)})),this._register(z(e=>{let t=this._suggestionCount.read(e),n=this._currentSuggestionIdx.read(e);t===void 0?this.clearAvailableSuggestionCountLabelDebounced.schedule():(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${n+1}/${t}`),t!==void 0&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(z(e=>{let t=this._extraCommands.read(e).map(e=>({class:void 0,id:e.command.id,enabled:!0,tooltip:e.command.tooltip||``,label:e.command.title,run:()=>this._commandService.executeCommand(e.command.id,...e.command.arguments??[])}));for(let[e,n]of this.inlineCompletionsActionsMenus.getActions())for(let e of n)e instanceof Ft&&t.push(e);t.length>0&&t.unshift(new ha),this.toolBar.setAdditionalSecondaryActions(t)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Uh=zh=Lh([Rh(8,Kt),Rh(9,W),Rh(10,Ae),Rh(11,ft),Rh(12,sr)],Uh);var Wh=class extends ga{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}},Gh=class extends ud{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService,!0);if(!e)return super.updateLabel();if(this.label){let t=m(`div.keybinding`).root;this._register(new mi(t,Ro,{disableTitle:!0,...ht})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add(`inlineSuggestionStatusBarItemLabel`)}}updateTooltip(){}},Kh=class extends Au{constructor(e,t,n,r,i,a,o,s,c){super(e,{resetMenu:t,...n},r,i,a,o,s,c),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=i,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this.additionalPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){let{primary:e,secondary:t}=Tt(this.menu.getActions(this.options2?.menuOptions),this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions);t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),e.push(...this.additionalPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){wc(this.prependedPrimaryActions,e,(e,t)=>e===t)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){wc(this.additionalActions,e,(e,t)=>e===t)||(this.additionalActions=e,this.updateToolbar())}};Kh=Lh([Rh(3,sr),Rh(4,ft),Rh(5,kc),Rh(6,Ae),Rh(7,Kt),Rh(8,Dn)],Kh);function qh(e,t,n){let r=bu(e);return!(tr.left+r.width-3||nr.top+r.height-3)}function Jh(e,t,n){return e===`on`||e!==`off`&&Yh(t,n.event)}function Yh(e,t){return e===`altKey`?t.ctrlKey||t.metaKey:t.altKey}var Xh=class{constructor(e,t,n,r){this.value=e,this.isComplete=t,this.hasLoadingMessage=n,this.options=r}},Zh=class extends U{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new F),this.onResult=this._onResult.event,this._asyncComputationScheduler=this._register(new Qh(e=>this._triggerAsyncComputation(e),0)),this._syncComputationScheduler=this._register(new Qh(e=>this._triggerSyncComputation(e),0)),this._loadingMessageScheduler=this._register(new Qh(e=>this._triggerLoadingMessage(e),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&=(this._asyncIterable.cancel(),null),this._options=void 0,super.dispose()}get _hoverTime(){return this._editor.getOption(69).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t){this._options=t,this._state=e,this._fireResult(t)}_triggerAsyncComputation(e){this._setState(2,e),this._syncComputationScheduler.schedule(e,this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Ps(t=>this._computer.computeAsync(e,t)),(async()=>{try{for await(let t of this._asyncIterable)t&&(this._result.push(t),this._fireResult(e));this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0,e)}catch(e){ot(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(e){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync(e))),this._setState(this._asyncIterableDone?0:3,e)}_triggerLoadingMessage(e){this._state===3&&this._setState(4,e)}_fireResult(e){if(this._state===1||this._state===2)return;let t=this._state===0,n=this._state===4;this._onResult.fire(new Xh(this._result.slice(0),t,n,e))}start(e,t){if(e===0)this._state===0&&(this._setState(1,t),this._asyncComputationScheduler.schedule(t,this._firstWaitTime),this._loadingMessageScheduler.schedule(t,this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(t),this._syncComputationScheduler.cancel(),this._triggerSyncComputation(t);break;case 2:this._syncComputationScheduler.cancel(),this._triggerSyncComputation(t);break}}cancel(){this._asyncComputationScheduler.cancel(),this._syncComputationScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&=(this._asyncIterable.cancel(),null),this._result=[],this._options=void 0,this._state=0}get options(){return this._options}},Qh=class extends U{constructor(e,t){super(),this._scheduler=this._register(new Gs(()=>e(this._options),t))}schedule(e,t){this._options=e,this._scheduler.schedule(t)}cancel(){this._scheduler.cancel()}},$h=class{get onDidWillResize(){return this._onDidWillResize.event}get onDidResize(){return this._onDidResize.event}constructor(){this._onDidWillResize=new F,this._onDidResize=new F,this._sashListener=new G,this._size=new to(0,0),this._minSize=new to(0,0),this._maxSize=new to(2**53-1,2**53-1),this.domNode=document.createElement(`div`),this._eastSash=new cr(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new cr(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new cr(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:zn.North}),this._southSash=new cr(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:zn.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(xr.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(xr.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(r=>{e&&(n=r.currentX-r.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(r=>{e&&(n=-(r.currentX-r.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(r=>{e&&(t=-(r.currentY-r.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(r=>{e&&(t=r.currentY-r.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(xr.any(this._eastSash.onDidReset,this._westSash.onDidReset)(e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(xr.any(this._northSash.onDidReset,this._southSash.onDidReset)(e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:r}=this._minSize,{height:i,width:a}=this._maxSize;e=Math.max(n,Math.min(i,e)),t=Math.max(r,Math.min(a,t));let o=new to(t,e);to.equals(o,this._size)||(this.domNode.style.height=e+`px`,this.domNode.style.width=t+`px`,this._size=o,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}},eg=30,tg=24,ng=class extends U{constructor(e,t=new to(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new $h),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position=`absolute`,this._resizableNode.minSize=to.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(e=>{this._resize(new to(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?j.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!(!t||!n))return bu(t).top+n.top-eg}_availableVerticalSpaceBelow(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;let r=bu(t),i=Fr(t.ownerDocument.body),a=r.top+n.top+n.height;return i.height-a-tg}_findPositionPreference(e,t){let n=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),r=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),i=Math.min(e,Math.min(Math.max(r,n),e)),a;return a=this._editor.getOption(69).above?i<=r?1:2:i<=n?2:1,a===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),a}_resize(e){this._resizableNode.layout(e.height,e.width)}},rg=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ig=function(e,t){return function(n,r){t(n,r,e)}},ag,og=30,sg=class extends ng{static{ag=this}static{this.ID=`editor.contrib.resizableContentHoverWidget`}static{this._lastDimensions=new to(0,0)}get isVisibleFromKeyboard(){return this._renderedHover?.source===2}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,n,r,i){let a=new to(150,e.getOption(75)+8);super(e,a),this._configurationService=n,this._accessibilityService=r,this._keybindingService=i,this._hover=this._register(new o(!0)),this._onDidResize=this._register(new F),this.onDidResize=this._onDidResize.event,this._onDidScroll=this._register(new F),this.onDidScroll=this._onDidScroll.event,this._onContentsChanged=this._register(new F),this.onContentsChanged=this._onContentsChanged.event,this._minimumSize=a,this._hoverVisibleKey=O.hoverVisible.bindTo(t),this._hoverFocusedKey=O.hoverFocused.bindTo(t),I(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex=`50`,this._resizableNode.domNode.className=`monaco-resizable-hover`,this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()}));let s=this._register(ii(this._resizableNode.domNode));this._register(s.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(s.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._register(this._hover.scrollbar.onScroll(e=>{this._onDidScroll.fire(e)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return ag.ID}static _applyDimensions(e,t,n){let r=typeof t==`number`?`${t}px`:t,i=typeof n==`number`?`${n}px`:n;e.style.width=r,e.style.height=i}_setContentsDomNodeDimensions(e,t){let n=this._hover.contentsDomNode;return ag._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){let n=this._hover.containerDomNode;return ag._applyDimensions(n,e,t)}_setScrollableElementDimensions(e,t){let n=this._hover.scrollbar.getDomNode();return ag._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContainerDomNodeDimensions(e,t),this._setScrollableElementDimensions(e,t),this._setContentsDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){let r=typeof t==`number`?`${t}px`:t,i=typeof n==`number`?`${n}px`:n;e.style.maxWidth=r,e.style.maxHeight=i}_setHoverWidgetMaxDimensions(e,t){ag._applyMaxDimensions(this._hover.contentsDomNode,e,t),ag._applyMaxDimensions(this._hover.scrollbar.getDomNode(),e,t),ag._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty(`--vscode-hover-maxWidth`,typeof e==`number`?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions(`none`,`none`),this._setHoverWidgetDimensions(e.width,e.height)}_updateResizableNodeMaxDimensions(){let e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new to(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){ag._lastDimensions=new to(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){let e=this._renderedHover?.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){let e=this._findAvailableSpaceVertically();if(!e)return;let t=this._hover.contentsDomNode.children.length-1;return Array.from(this._hover.contentsDomNode.children).forEach(e=>{t+=e.clientHeight}),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty(`--vscode-hover-whiteSpace`,`nowrap`),this._hover.containerDomNode.style.setProperty(`--vscode-hover-sourceWhiteSpace`,`nowrap`);let e=Array.from(this._hover.contentsDomNode.children).some(e=>e.scrollWidth>e.clientWidth);return this._hover.containerDomNode.style.removeProperty(`--vscode-hover-whiteSpace`),this._hover.containerDomNode.style.removeProperty(`--vscode-hover-sourceWhiteSpace`),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;let e=this._isHoverTextOverflowing(),t=this._contentWidth===void 0?0:this._contentWidth;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,r),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle(`hidden`,!e)}_updateFont(){let{fontSize:e,lineHeight:t}=this._editor.getOption(59),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName(`code`)).forEach(e=>this._editor.applyFontInfo(e))}_updateContent(e){let t=this._hover.contentsDomNode;t.style.paddingBottom=``,t.textContent=``,t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){let e=Math.max(this._editor.getLayoutInfo().height/4,250,ag._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,750,ag._lastDimensions.width);this._resizableNode.maxSize=new to(t,e),this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this.handleContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);let t=we(this._hover.containerDomNode),n=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,n)??1,this.handleContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();let r=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&Gl(this._configurationService.getValue(`accessibility.verbosity.hover`)===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding(`editor.action.accessibleView`)?.getAriaLabel()??``);r&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+`, `+r)}hide(){if(!this._renderedHover)return;let e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new to(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){let e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions(`auto`,`auto`),this._updateMaxDimensions()}setMinimumDimensions(e){this._minimumSize=new to(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){let e=this._contentWidth===void 0?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new to(e,this._minimumSize.height)}handleContentsChanged(){this._removeConstraintsRenderNormally();let e=this._hover.contentsDomNode,t=we(e),n=Hn(e)+2;if(this._resizableNode.layout(t,n),this._setHoverWidgetDimensions(n,t),t=we(e),n=Hn(e),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(t,n),this._renderedHover?.showAtPosition){let e=we(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._renderedHover.showAtPosition)}this._layoutContentWidget(),this._onContentsChanged.fire()}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-og})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+og})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};sg=ag=rg([ig(1,ft),ig(2,Mo),ig(3,al),ig(4,Ae)],sg);function cg(e,t,n,r,i,a){let o=n+i/2,s=r+a/2,c=Math.max(Math.abs(e-o)-i/2,0),l=Math.max(Math.abs(t-s)-a/2,0);return Math.sqrt(c*c+l*l)}var lg=class e{constructor(e,t){this._editor=e,this._participants=t}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];let n=e.getModel(),r=t.range.startLineNumber;if(r>n.getLineCount())return[];let i=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(e=>{if(e.options.isWholeLine)return!0;let n=e.range.startLineNumber===r?e.range.startColumn:1,a=e.range.endLineNumber===r?e.range.endColumn:i;if(e.options.showIfCollapsed){if(n>t.range.startColumn+1||t.range.endColumn-1>a)return!1}else if(n>t.range.startColumn||t.range.endColumn>a)return!1;return!0})}computeAsync(t,n){let r=t.anchor;if(!this._editor.hasModel()||!r)return ze.EMPTY;let i=e._getLineDecorations(this._editor,r);return ze.merge(this._participants.map(e=>e.computeAsync?e.computeAsync(r,i,t.source,n):ze.EMPTY))}computeSync(t){if(!this._editor.hasModel())return[];let n=t.anchor,r=e._getLineDecorations(this._editor,n),i=[];for(let e of this._participants)i=i.concat(e.computeSync(n,r,t.source));return pr(i)}},ug=class{constructor(e,t,n){this.hoverParts=e,this.isComplete=t,this.options=n}filter(e){let t=this.hoverParts.filter(t=>t.isValidForHoverAnchor(e));return t.length===this.hoverParts.length?this:new dg(this,t,this.isComplete,this.options)}},dg=class extends ug{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}},fg=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},pg=function(e,t){return function(n,r){t(n,r,e)}},mg=q,hg=class extends U{get hasContent(){return this._hasContent}constructor(e,t){super(),this._keybindingService=e,this._hoverService=t,this.actions=[],this._hasContent=!1,this.hoverElement=mg(`div.hover-row.status-bar`),this.hoverElement.tabIndex=0,this.actionsElement=I(this.hoverElement,mg(`div.actions`))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;this._hasContent=!0;let r=this._register(gr.render(this.actionsElement,e,n));return this._register(this._hoverService.setupManagedHover(Ul(`element`),r.actionContainer,r.actionRenderedLabel)),this.actions.push(r),r}append(e){let t=I(this.actionsElement,e);return this._hasContent=!0,t}};hg=fg([pg(0,Ae),pg(1,Ts)],hg);var gg=class e{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){let e=this._findScopeDecorationIds.map(e=>this._editor.getModel().getDecorationRange(e)).filter(e=>!!e);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e{if(this._highlightedDecorationId!==null&&(t.changeDecorationOptions(this._highlightedDecorationId,e._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),n!==null&&(this._highlightedDecorationId=n,t.changeDecorationOptions(this._highlightedDecorationId,e._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(t.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),n!==null){let r=this._editor.getModel().getDecorationRange(n);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){let e=r.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);r=new A(r.startLineNumber,r.startColumn,e,t)}this._rangeHighlightDecorationId=t.addDecoration(r,e._RANGE_HIGHLIGHT_DECORATION)}}),r}set(t,n){this._editor.changeDecorations(r=>{let i=e._FIND_MATCH_DECORATION,a=[];if(t.length>1e3){i=e._FIND_MATCH_NO_OVERVIEW_DECORATION;let n=this._editor.getModel().getLineCount(),r=this._editor.getLayoutInfo().height/n,o=Math.max(2,Math.ceil(3/r)),s=t[0].range.startLineNumber,c=t[0].range.endLineNumber;for(let n=1,r=t.length;n=r.startLineNumber?r.endLineNumber>c&&(c=r.endLineNumber):(a.push({range:new A(s,1,c,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),s=r.startLineNumber,c=r.endLineNumber)}a.push({range:new A(s,1,c,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=Array(t.length);for(let e=0,n=t.length;er.removeDecoration(e)),this._findScopeDecorationIds=[]),n?.length&&(this._findScopeDecorationIds=n.map(t=>r.addDecoration(t,e._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)&&(r.endLineNumbere.column)))return r}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber||!(r.startColumn0){let e=[];for(let t=0;tA.compareRangesUsingStarts(e.range,t.range));let n=[],r=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}else return t}function yg(e,t,n){return e[0].indexOf(n)!==-1&&t.indexOf(n)!==-1&&e[0].split(n).length===t.split(n).length}function bg(e,t,n){let r=t.split(n),i=e[0].split(n),a=``;return r.forEach((e,t)=>{a+=vg([i[t]],e)+n}),a.slice(0,-1)}var xg=class{constructor(e){this.staticValue=e,this.kind=0}},Sg=class{constructor(e){this.pieces=e,this.kind=1}},Cg=class e{static fromStaticValue(t){return new e([wg.staticValue(t)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new xg(``):e.length===1&&e[0].staticValue!==null?this._state=new xg(e[0].staticValue):this._state=new Sg(e)}buildReplaceString(t,n){if(this._state.kind===0)return n?vg(t,this._state.staticValue):this._state.staticValue;let r=``;for(let n=0,i=this._state.pieces.length;n0){let e=[],t=i.caseOps.length,n=0;for(let r=0,o=a.length;r=t){e.push(a.slice(r));break}switch(i.caseOps[n]){case`U`:e.push(a[r].toUpperCase());break;case`u`:e.push(a[r].toUpperCase()),n++;break;case`L`:e.push(a[r].toLowerCase());break;case`l`:e.push(a[r].toLowerCase()),n++;break;default:e.push(a[r])}}a=e.join(``)}r+=a}return r}static _substitute(e,t){if(t===null)return``;if(e===0)return t[0];let n=``;for(;e>0;){if(e=i)break;let a=e.charCodeAt(r);switch(a){case 92:n.emitUnchanged(r-1),n.emitStatic(`\\`,r+1);break;case 110:n.emitUnchanged(r-1),n.emitStatic(` diff --git a/internal/ui/dist/assets/jsx-runtime-QtymfJMM.js b/internal/ui/dist/assets/jsx-runtime-BOsSdQ68.js similarity index 91% rename from internal/ui/dist/assets/jsx-runtime-QtymfJMM.js rename to internal/ui/dist/assets/jsx-runtime-BOsSdQ68.js index edc9406c7..d1ac33f09 100644 --- a/internal/ui/dist/assets/jsx-runtime-QtymfJMM.js +++ b/internal/ui/dist/assets/jsx-runtime-BOsSdQ68.js @@ -1 +1 @@ -var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{n.exports=t()})),r=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),i=e(((e,t)=>{t.exports=r()}));export{n,e as r,i as t}; \ No newline at end of file +var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{n.exports=t()}));function r(e){try{return window.localStorage.getItem(e)}catch{return null}}function i(e,t){try{window.localStorage.setItem(e,t)}catch{}}function a(e,t=null){let n=r(e);if(n===null)return t;try{return JSON.parse(n)}catch{return t}}function o(e,t){i(e,JSON.stringify(t))}var s=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),c=e(((e,t)=>{t.exports=s()}));export{i as a,o as i,a as n,n as o,r,e as s,c as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/page-CiAVS9qS.js b/internal/ui/dist/assets/page-BaebBDRI.js similarity index 96% rename from internal/ui/dist/assets/page-CiAVS9qS.js rename to internal/ui/dist/assets/page-BaebBDRI.js index 9646ecb72..a996e0bb0 100644 --- a/internal/ui/dist/assets/page-CiAVS9qS.js +++ b/internal/ui/dist/assets/page-BaebBDRI.js @@ -1 +1 @@ -import{t as e}from"./jsx-runtime-QtymfJMM.js";var t=e();function n({title:e,description:n,actions:r}){return(0,t.jsxs)(`header`,{className:`flex flex-wrap items-end justify-between gap-3 border-b border-line pb-3`,children:[(0,t.jsxs)(`div`,{className:`min-w-0`,children:[(0,t.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight text-ink`,children:e}),(0,t.jsx)(`p`,{className:`mt-1 max-w-3xl text-sm leading-5 text-ink-muted`,children:n})]}),r===void 0?null:(0,t.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap gap-2 sm:w-auto sm:shrink-0`,children:r})]})}function r({label:e,value:n,detail:r,attention:i=!1,compact:a=!1,icon:o,className:s=``}){return(0,t.jsxs)(`div`,{className:`${a?`flex items-center justify-between gap-4 px-4 py-2.5`:o===void 0?`px-4 py-3.5`:`flex items-center gap-3 px-4 py-3.5`} ${i?`bg-notice`:`bg-card`} ${s}`,children:[o===void 0?null:(0,t.jsx)(`span`,{className:`grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-surface text-accent`,children:o}),(0,t.jsxs)(`div`,{className:o===void 0?`contents`:`min-w-0 grow`,children:[(0,t.jsx)(`dt`,{className:`text-xs font-medium tracking-wide ${i?`text-notice-ink`:`text-ink-muted`}`,children:e}),(0,t.jsx)(`dd`,{className:`${a?`font-mono text-sm`:`mt-1 text-xl tracking-tight`} font-semibold ${i?`text-notice-ink`:`text-ink`}`,children:n}),r===void 0?null:(0,t.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:r})]})]})}function i({children:e,className:n=``,...r}){return(0,t.jsx)(`dl`,{className:`sshc-card grid gap-px overflow-hidden rounded-lg bg-line sm:grid-cols-2 lg:grid-cols-3 ${n}`,...r,children:e})}export{i as n,n as r,r as t}; \ No newline at end of file +import{t as e}from"./jsx-runtime-BOsSdQ68.js";var t=e();function n({title:e,description:n,actions:r}){return(0,t.jsxs)(`header`,{className:`flex flex-wrap items-end justify-between gap-3 border-b border-line pb-3`,children:[(0,t.jsxs)(`div`,{className:`min-w-0`,children:[(0,t.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight text-ink`,children:e}),(0,t.jsx)(`p`,{className:`mt-1 max-w-3xl text-sm leading-5 text-ink-muted`,children:n})]}),r===void 0?null:(0,t.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap gap-2 sm:w-auto sm:shrink-0`,children:r})]})}function r({label:e,value:n,detail:r,attention:i=!1,compact:a=!1,icon:o,className:s=``}){return(0,t.jsxs)(`div`,{className:`${a?`flex items-center justify-between gap-4 px-4 py-2.5`:o===void 0?`px-4 py-3.5`:`flex items-center gap-3 px-4 py-3.5`} ${i?`bg-notice`:`bg-card`} ${s}`,children:[o===void 0?null:(0,t.jsx)(`span`,{className:`grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-surface text-accent`,children:o}),(0,t.jsxs)(`div`,{className:o===void 0?`contents`:`min-w-0 grow`,children:[(0,t.jsx)(`dt`,{className:`text-xs font-medium tracking-wide ${i?`text-notice-ink`:`text-ink-muted`}`,children:e}),(0,t.jsx)(`dd`,{className:`${a?`font-mono text-sm`:`mt-1 text-xl tracking-tight`} font-semibold ${i?`text-notice-ink`:`text-ink`}`,children:n}),r===void 0?null:(0,t.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:r})]})]})}function i({children:e,className:n=``,...r}){return(0,t.jsx)(`dl`,{className:`sshc-card grid gap-px overflow-hidden rounded-lg bg-line sm:grid-cols-2 lg:grid-cols-3 ${n}`,...r,children:e})}export{i as n,n as r,r as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/palettes--8RhxKto.js b/internal/ui/dist/assets/palettes--8RhxKto.js deleted file mode 100644 index da4e84cf6..000000000 --- a/internal/ui/dist/assets/palettes--8RhxKto.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{_ as n,t as r}from"./surface-Ck_FblzE.js";import{_ as i,i as a}from"./form-C1olpQVF.js";import{H as o,J as s,U as c,a as l,tt as u}from"./index-DJ8h9zNi.js";import{r as d}from"./fonts-CUObG_Dx.js";var f=t();function p({choices:e,value:t,onChange:n,unchosen:r}){return(0,f.jsxs)(`select`,{className:a,value:t,onChange:e=>n(e.target.value),children:[(0,f.jsx)(`option`,{value:``,children:r}),e.map(e=>(0,f.jsx)(`option`,{value:e.name,children:e.label},e.name))]})}var m=e(),h=1<<20;function g({value:e,onChange:t,tint:d,onTintChange:p,unchosen:g,api:y=u}){let b=i(),[x,S]=(0,m.useState)([]),[C,ee]=(0,m.useState)(0),[w,T]=(0,m.useState)(16*h),[E,D]=(0,m.useState)(`16`),[O,k]=(0,m.useState)(``),[A,j]=(0,m.useState)(``),[M,N]=(0,m.useState)(null),[P,F]=(0,m.useState)(null),[I,L]=(0,m.useState)(!1),[R,z]=(0,m.useState)(e),[B,V]=(0,m.useState)(``),[H,U]=(0,m.useState)(!1),W=(0,m.useRef)(null),G=(0,m.useRef)(null),K=(0,m.useCallback)(e=>{S(e.backgrounds),ee(e.usedBytes),T(e.capacityBytes),D(String(Math.round(e.capacityBytes/h)))},[]),q=(0,m.useCallback)(async()=>K(await y.terminalBackgrounds()),[y,K]);(0,m.useEffect)(()=>{q().catch(()=>void 0)},[q]);let J=(0,m.useMemo)(()=>{let e=B.trim().toLocaleLowerCase();return e===``?x:x.filter(t=>t.name.toLocaleLowerCase().includes(e))},[B,x]);async function Y(e){U(!0),k(``);try{let t=await y.addTerminalBackground(e.name,e);await q(),z(t.name)}catch(e){let t=n(e);k(b(t===`background_too_large`?`terminal.backgroundTooLarge`:t===`backgrounds_full`?`terminal.backgroundsFull`:t===`not_an_image`?`terminal.backgroundNotAnImage`:`terminal.backgroundFailed`))}finally{U(!1)}}async function X(){let e=Number(E);if(!Number.isSafeInteger(e)||e<1||e>1024){k(b(`terminal.backgroundCapacityInvalid`));return}U(!0),k(``);try{K(await y.setTerminalBackgroundCapacity(e))}catch{k(b(`terminal.backgroundCapacityFailed`))}finally{U(!1)}}async function Z(n){U(!0),k(``);try{await y.deleteTerminalBackground(n),R===n&&z(``),e===n&&t(``),F(null),await q()}catch{k(b(`terminal.backgroundFailed`))}finally{U(!1)}}async function Q(r){if(M!==null){U(!0),j(``);try{let n=await y.renameTerminalBackground(M.name,r);R===M.name&&z(n.name),e===M.name&&t(n.name),N(null),await q()}catch(e){j(n(e)===`background_already_exists`?b(`terminal.backgroundRenameExists`):b(`terminal.backgroundRenameFailed`))}finally{U(!1)}}}let $=x.find(t=>t.name===e);return(0,f.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,f.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-3 rounded-md bg-surface-subtle p-2.5 sm:flex-nowrap`,children:[$===void 0?(0,f.jsx)(`div`,{className:`flex size-14 shrink-0 items-center justify-center rounded-md bg-control text-ink-faint`,children:(0,f.jsx)(s,{name:`config`,className:`size-5`})}):(0,f.jsx)(v,{name:$.name,chosen:!0,className:`size-14 rounded-md`}),(0,f.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,f.jsx)(`p`,{className:`truncate text-sm font-medium text-ink`,children:$?.name??g}),(0,f.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-faint`,children:$===void 0?b(`terminal.backgroundNotSelected`):_($.bytes)})]}),(0,f.jsx)(r,{ref:G,onClick:()=>{z(e),k(``),L(!0)},children:b(`terminal.backgroundChoose`)}),e===``?null:(0,f.jsx)(r,{onClick:()=>t(``),children:b(`terminal.backgroundClear`)})]}),e===``?null:(0,f.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,f.jsxs)(`span`,{className:`text-xs text-ink-muted`,children:[b(`terminal.tintLabel`),` · `,d??``]}),(0,f.jsx)(`input`,{type:`range`,min:0,max:100,step:5,value:d??55,onChange:e=>p(Number(e.target.value))}),(0,f.jsx)(`span`,{className:`text-xs text-ink-faint`,children:b(`terminal.tintHint`)})]}),I?(0,f.jsxs)(c,{labelledBy:`terminal-background-library-heading`,onDismiss:()=>L(!1),returnFocusRef:G,placement:`sheet`,panelClassName:`flex max-h-[92vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg`,children:[(0,f.jsxs)(`header`,{className:`flex items-center gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,f.jsx)(`h3`,{id:`terminal-background-library-heading`,className:`min-w-0 flex-1 text-sm font-semibold text-ink`,children:b(`terminal.backgroundLibrary`)}),(0,f.jsx)(r,{onClick:()=>L(!1),children:b(`terminal.backgroundClose`)})]}),(0,f.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-auto p-4`,children:[(0,f.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,f.jsxs)(`label`,{className:`relative min-w-0 flex-1`,children:[(0,f.jsx)(`span`,{className:`sr-only`,children:b(`terminal.backgroundSearch`)}),(0,f.jsx)(s,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint`}),(0,f.jsx)(`input`,{type:`search`,value:B,onChange:e=>V(e.target.value),className:`${a} pl-9`,placeholder:b(`terminal.backgroundSearch`)})]}),(0,f.jsx)(`input`,{ref:W,type:`file`,className:`hidden`,accept:`image/png,image/jpeg,image/webp,image/gif`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t!==void 0&&Y(t)}}),(0,f.jsx)(r,{kind:`primary`,onClick:()=>W.current?.click(),disabled:H,children:b(`terminal.backgroundAdd`)})]}),J.length===0?(0,f.jsxs)(`div`,{className:`flex min-h-48 flex-col items-center justify-center rounded-md bg-surface-subtle px-4 text-center`,children:[(0,f.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:b(`terminal.backgroundEmpty`)}),(0,f.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:b(`terminal.backgroundEmptyHint`)})]}):(0,f.jsx)(`ul`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4`,children:J.map(e=>(0,f.jsxs)(`li`,{className:`relative overflow-hidden rounded-md bg-surface-subtle ring-1 ${R===e.name?`ring-accent`:`ring-hairline`}`,children:[(0,f.jsxs)(`button`,{type:`button`,onClick:()=>z(e.name),className:`block w-full text-left`,children:[(0,f.jsx)(v,{name:e.name,chosen:R===e.name,className:`aspect-video w-full`}),(0,f.jsxs)(`span`,{className:`block px-2.5 pb-2.5 pt-2`,children:[(0,f.jsx)(`span`,{className:`block truncate text-sm font-medium text-ink`,children:e.name}),(0,f.jsx)(`span`,{className:`mt-0.5 block text-xs text-ink-faint`,children:_(e.bytes)})]})]}),(0,f.jsxs)(`details`,{className:`absolute right-2 top-2`,children:[(0,f.jsx)(`summary`,{"aria-label":b(`terminal.backgroundActions`,{name:e.name}),className:`flex size-8 cursor-pointer list-none items-center justify-center rounded-md bg-canvas/80 text-ink shadow-sm marker:hidden hover:bg-card`,children:(0,f.jsx)(s,{name:`moreHorizontal`,className:`size-4`})}),(0,f.jsxs)(`div`,{className:`absolute right-0 top-9 z-10 min-w-36 rounded-md border border-line bg-card p-1 shadow-xl`,children:[(0,f.jsx)(`button`,{type:`button`,className:`block w-full rounded px-2.5 py-2 text-left text-sm text-ink hover:bg-select-fill`,onClick:()=>{j(``),N(e)},children:b(`terminal.backgroundRenameAction`)}),(0,f.jsx)(`button`,{type:`button`,className:`block w-full rounded px-2.5 py-2 text-left text-sm text-danger hover:bg-select-fill`,onClick:()=>F(e),children:b(`terminal.backgroundDeleteAction`)})]})]})]},e.name))}),(0,f.jsxs)(`section`,{className:`rounded-md bg-surface-subtle p-3`,"aria-label":b(`terminal.backgroundCapacityHeading`),children:[(0,f.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-end`,children:[(0,f.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,f.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs text-ink-muted`,children:[(0,f.jsx)(`span`,{children:b(`terminal.backgroundCapacityUsage`,{used:_(C),capacity:_(w)})}),(0,f.jsxs)(`span`,{children:[Math.min(100,Math.round(C/Math.max(w,1)*100)),`%`]})]}),(0,f.jsx)(`div`,{className:`mt-2 h-1.5 overflow-hidden rounded-full bg-control`,children:(0,f.jsx)(`div`,{className:`h-full rounded-full bg-accent`,style:{width:`${Math.min(100,C/Math.max(w,1)*100)}%`}})})]}),(0,f.jsxs)(`label`,{className:`flex items-end gap-2`,children:[(0,f.jsxs)(`span`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:[b(`terminal.backgroundCapacityLabel`),(0,f.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,f.jsx)(`input`,{type:`number`,min:1,max:1024,value:E,onChange:e=>D(e.target.value),className:`${a} w-24`}),(0,f.jsx)(`span`,{children:`MiB`})]})]}),(0,f.jsx)(r,{disabled:H||E===String(Math.round(w/h)),onClick:()=>void X(),children:b(`terminal.backgroundCapacitySave`)})]})]}),(0,f.jsx)(`p`,{className:`mt-2 text-xs text-ink-faint`,children:b(`terminal.backgroundCapacityHint`)})]}),O===``?null:(0,f.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:O})]}),(0,f.jsxs)(`footer`,{className:`flex items-center justify-between gap-3 border-t border-line bg-toolbar px-4 py-3`,children:[(0,f.jsx)(`button`,{type:`button`,className:`text-sm text-ink-muted hover:text-ink`,onClick:()=>z(``),children:b(`terminal.backgroundUseNone`)}),(0,f.jsx)(r,{kind:`primary`,disabled:H,onClick:()=>{t(R),L(!1)},children:b(`terminal.backgroundUse`)})]})]}):null,M===null?null:(0,f.jsx)(l,{id:`terminal-background-rename`,heading:b(`terminal.backgroundRenameHeading`),description:A===``?b(`terminal.backgroundRenameHint`):(0,f.jsx)(`span`,{role:`alert`,className:`text-danger`,children:A}),label:b(`terminal.backgroundRenameLabel`),initialValue:M.name,submitLabel:b(`terminal.backgroundRenameSubmit`),cancelLabel:b(`terminal.backgroundRenameCancel`),validate:e=>e===``?b(`terminal.backgroundRenameRequired`):``,onSubmit:e=>void Q(e),onCancel:()=>{j(``),N(null)}},M.name),P===null?null:(0,f.jsx)(o,{id:`terminal-background-delete`,heading:b(`terminal.backgroundDeleteHeading`),body:(0,f.jsx)(`p`,{className:`text-sm text-ink-muted`,children:b(`terminal.backgroundDeleteHint`,{name:P.name})}),confirmLabel:b(`terminal.backgroundDeleteAction`),cancelLabel:b(`terminal.backgroundRenameCancel`),onConfirm:()=>void Z(P.name),onCancel:()=>F(null)})]})}function _(e){return e>=1<<30?`${(e/(1<<30)).toFixed(1)} GiB`:e>=h?`${(e/h).toFixed(e>=10*h?0:1)} MiB`:e>=1024?`${Math.round(e/1024)} KiB`:`${e} B`}function v({name:e,chosen:t,className:n=`h-16 w-24 rounded-md`}){let r=d(e);return r===``?(0,f.jsx)(`div`,{className:`${n} bg-control`}):(0,f.jsx)(`img`,{src:r,alt:e,className:`${n} object-cover ${t?`brightness-105`:``}`})}var y=[{name:`solarized-dark`,label:`Solarized Dark`},{name:`solarized-light`,label:`Solarized Light`},{name:`dracula`,label:`Dracula`},{name:`nord`,label:`Nord`},{name:`gruvbox-dark`,label:`Gruvbox Dark`},{name:`one-dark`,label:`One Dark`}];export{g as n,p as r,y as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/palettes-B33rdzLR.js b/internal/ui/dist/assets/palettes-B33rdzLR.js new file mode 100644 index 000000000..01763316e --- /dev/null +++ b/internal/ui/dist/assets/palettes-B33rdzLR.js @@ -0,0 +1 @@ +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{t as n,y as r}from"./surface-DPFJ-mE2.js";import{_ as i,i as a}from"./form-zbLY2cuV.js";import{$ as o,J as s,a as c,c as l,ot as u,q as d}from"./index-DtC-pXtZ.js";import{r as f}from"./fonts-Dday_bgd.js";var p=t();function m({choices:e,value:t,onChange:n,unchosen:r}){return(0,p.jsxs)(`select`,{className:a,value:t,onChange:e=>n(e.target.value),children:[(0,p.jsx)(`option`,{value:``,children:r}),e.map(e=>(0,p.jsx)(`option`,{value:e.name,children:e.label},e.name))]})}var h=e(),g=1<<20;function _({value:e,onChange:t,tint:f,onTintChange:m,unchosen:_,api:y=u}){let b=i(),[x,S]=(0,h.useState)([]),[C,ee]=(0,h.useState)(0),[w,T]=(0,h.useState)(16*g),[E,D]=(0,h.useState)(`16`),[O,k]=(0,h.useState)(``),[A,j]=(0,h.useState)(``),[M,N]=(0,h.useState)(null),[P,F]=(0,h.useState)(null),[I,L]=(0,h.useState)(!1),[R,z]=(0,h.useState)(e),[B,V]=(0,h.useState)(``),[H,U]=(0,h.useState)(!1),W=(0,h.useRef)(null),G=(0,h.useRef)(null),K=(0,h.useCallback)(e=>{S(e.backgrounds),ee(e.usedBytes),T(e.capacityBytes),D(String(Math.round(e.capacityBytes/g)))},[]),q=(0,h.useCallback)(async()=>K(await y.terminalBackgrounds()),[y,K]);(0,h.useEffect)(()=>{q().catch(()=>void 0)},[q]);let J=(0,h.useMemo)(()=>{let e=B.trim().toLocaleLowerCase();return e===``?x:x.filter(t=>t.name.toLocaleLowerCase().includes(e))},[B,x]);async function Y(e){U(!0),k(``);try{let t=await y.addTerminalBackground(e.name,e);await q(),z(t.name)}catch(e){let t=r(e);k(b(t===`background_too_large`?`terminal.backgroundTooLarge`:t===`backgrounds_full`?`terminal.backgroundsFull`:t===`not_an_image`?`terminal.backgroundNotAnImage`:`terminal.backgroundFailed`))}finally{U(!1)}}async function X(){let e=Number(E);if(!Number.isSafeInteger(e)||e<1||e>1024){k(b(`terminal.backgroundCapacityInvalid`));return}U(!0),k(``);try{K(await y.setTerminalBackgroundCapacity(e))}catch{k(b(`terminal.backgroundCapacityFailed`))}finally{U(!1)}}async function Z(n){U(!0),k(``);try{await y.deleteTerminalBackground(n),R===n&&z(``),e===n&&t(``),F(null),await q()}catch{k(b(`terminal.backgroundFailed`))}finally{U(!1)}}async function Q(n){if(M!==null){U(!0),j(``);try{let r=await y.renameTerminalBackground(M.name,n);R===M.name&&z(r.name),e===M.name&&t(r.name),N(null),await q()}catch(e){j(r(e)===`background_already_exists`?b(`terminal.backgroundRenameExists`):b(`terminal.backgroundRenameFailed`))}finally{U(!1)}}}let $=x.find(t=>t.name===e);return(0,p.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,p.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-3 rounded-md bg-surface-subtle p-2.5 sm:flex-nowrap`,children:[$===void 0?(0,p.jsx)(`div`,{className:`flex size-14 shrink-0 items-center justify-center rounded-md bg-control text-ink-faint`,children:(0,p.jsx)(o,{name:`config`,className:`size-5`})}):(0,p.jsx)(v,{name:$.name,chosen:!0,className:`size-14 rounded-md`}),(0,p.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,p.jsx)(`p`,{className:`truncate text-sm font-medium text-ink`,children:$?.name??_}),(0,p.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-faint`,children:$===void 0?b(`terminal.backgroundNotSelected`):l($.bytes)})]}),(0,p.jsx)(n,{ref:G,onClick:()=>{z(e),k(``),L(!0)},children:b(`terminal.backgroundChoose`)}),e===``?null:(0,p.jsx)(n,{onClick:()=>t(``),children:b(`terminal.backgroundClear`)})]}),e===``?null:(0,p.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,p.jsxs)(`span`,{className:`text-xs text-ink-muted`,children:[b(`terminal.tintLabel`),` · `,f??``]}),(0,p.jsx)(`input`,{type:`range`,min:0,max:100,step:5,value:f??55,onChange:e=>m(Number(e.target.value))}),(0,p.jsx)(`span`,{className:`text-xs text-ink-faint`,children:b(`terminal.tintHint`)})]}),I?(0,p.jsxs)(s,{labelledBy:`terminal-background-library-heading`,onDismiss:()=>L(!1),returnFocusRef:G,placement:`sheet`,panelClassName:`flex max-h-[92vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg`,children:[(0,p.jsxs)(`header`,{className:`flex items-center gap-3 border-b border-line bg-toolbar px-4 py-3`,children:[(0,p.jsx)(`h3`,{id:`terminal-background-library-heading`,className:`min-w-0 flex-1 text-sm font-semibold text-ink`,children:b(`terminal.backgroundLibrary`)}),(0,p.jsx)(n,{onClick:()=>L(!1),children:b(`terminal.backgroundClose`)})]}),(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-auto p-4`,children:[(0,p.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,p.jsxs)(`label`,{className:`relative min-w-0 flex-1`,children:[(0,p.jsx)(`span`,{className:`sr-only`,children:b(`terminal.backgroundSearch`)}),(0,p.jsx)(o,{name:`search`,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint`}),(0,p.jsx)(`input`,{type:`search`,value:B,onChange:e=>V(e.target.value),className:`${a} pl-9`,placeholder:b(`terminal.backgroundSearch`)})]}),(0,p.jsx)(`input`,{ref:W,type:`file`,className:`hidden`,accept:`image/png,image/jpeg,image/webp,image/gif`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t!==void 0&&Y(t)}}),(0,p.jsx)(n,{kind:`primary`,onClick:()=>W.current?.click(),disabled:H,children:b(`terminal.backgroundAdd`)})]}),J.length===0?(0,p.jsxs)(`div`,{className:`flex min-h-48 flex-col items-center justify-center rounded-md bg-surface-subtle px-4 text-center`,children:[(0,p.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:b(`terminal.backgroundEmpty`)}),(0,p.jsx)(`p`,{className:`mt-1 text-xs text-ink-muted`,children:b(`terminal.backgroundEmptyHint`)})]}):(0,p.jsx)(`ul`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4`,children:J.map(e=>(0,p.jsxs)(`li`,{className:`relative overflow-hidden rounded-md bg-surface-subtle ring-1 ${R===e.name?`ring-accent`:`ring-hairline`}`,children:[(0,p.jsxs)(`button`,{type:`button`,onClick:()=>z(e.name),className:`block w-full text-left`,children:[(0,p.jsx)(v,{name:e.name,chosen:R===e.name,className:`aspect-video w-full`}),(0,p.jsxs)(`span`,{className:`block px-2.5 pb-2.5 pt-2`,children:[(0,p.jsx)(`span`,{className:`block truncate text-sm font-medium text-ink`,children:e.name}),(0,p.jsx)(`span`,{className:`mt-0.5 block text-xs text-ink-faint`,children:l(e.bytes)})]})]}),(0,p.jsxs)(`details`,{className:`absolute right-2 top-2`,children:[(0,p.jsx)(`summary`,{"aria-label":b(`terminal.backgroundActions`,{name:e.name}),className:`flex size-8 cursor-pointer list-none items-center justify-center rounded-md bg-canvas/80 text-ink shadow-sm marker:hidden hover:bg-card`,children:(0,p.jsx)(o,{name:`moreHorizontal`,className:`size-4`})}),(0,p.jsxs)(`div`,{className:`absolute right-0 top-9 z-10 min-w-36 rounded-md border border-line bg-card p-1 shadow-xl`,children:[(0,p.jsx)(`button`,{type:`button`,className:`block w-full rounded px-2.5 py-2 text-left text-sm text-ink hover:bg-select-fill`,onClick:()=>{j(``),N(e)},children:b(`terminal.backgroundRenameAction`)}),(0,p.jsx)(`button`,{type:`button`,className:`block w-full rounded px-2.5 py-2 text-left text-sm text-danger hover:bg-select-fill`,onClick:()=>F(e),children:b(`terminal.backgroundDeleteAction`)})]})]})]},e.name))}),(0,p.jsxs)(`section`,{className:`rounded-md bg-surface-subtle p-3`,"aria-label":b(`terminal.backgroundCapacityHeading`),children:[(0,p.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-end`,children:[(0,p.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,p.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs text-ink-muted`,children:[(0,p.jsx)(`span`,{children:b(`terminal.backgroundCapacityUsage`,{used:l(C),capacity:l(w)})}),(0,p.jsxs)(`span`,{children:[Math.min(100,Math.round(C/Math.max(w,1)*100)),`%`]})]}),(0,p.jsx)(`div`,{className:`mt-2 h-1.5 overflow-hidden rounded-full bg-control`,children:(0,p.jsx)(`div`,{className:`h-full rounded-full bg-accent`,style:{width:`${Math.min(100,C/Math.max(w,1)*100)}%`}})})]}),(0,p.jsxs)(`label`,{className:`flex items-end gap-2`,children:[(0,p.jsxs)(`span`,{className:`flex flex-col gap-1 text-xs text-ink-muted`,children:[b(`terminal.backgroundCapacityLabel`),(0,p.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,p.jsx)(`input`,{type:`number`,min:1,max:1024,value:E,onChange:e=>D(e.target.value),className:`${a} w-24`}),(0,p.jsx)(`span`,{children:`MiB`})]})]}),(0,p.jsx)(n,{disabled:H||E===String(Math.round(w/g)),onClick:()=>void X(),children:b(`terminal.backgroundCapacitySave`)})]})]}),(0,p.jsx)(`p`,{className:`mt-2 text-xs text-ink-faint`,children:b(`terminal.backgroundCapacityHint`)})]}),O===``?null:(0,p.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:O})]}),(0,p.jsxs)(`footer`,{className:`flex items-center justify-between gap-3 border-t border-line bg-toolbar px-4 py-3`,children:[(0,p.jsx)(`button`,{type:`button`,className:`text-sm text-ink-muted hover:text-ink`,onClick:()=>z(``),children:b(`terminal.backgroundUseNone`)}),(0,p.jsx)(n,{kind:`primary`,disabled:H,onClick:()=>{t(R),L(!1)},children:b(`terminal.backgroundUse`)})]})]}):null,M===null?null:(0,p.jsx)(c,{id:`terminal-background-rename`,heading:b(`terminal.backgroundRenameHeading`),description:A===``?b(`terminal.backgroundRenameHint`):(0,p.jsx)(`span`,{role:`alert`,className:`text-danger`,children:A}),label:b(`terminal.backgroundRenameLabel`),initialValue:M.name,submitLabel:b(`terminal.backgroundRenameSubmit`),cancelLabel:b(`terminal.backgroundRenameCancel`),validate:e=>e===``?b(`terminal.backgroundRenameRequired`):``,onSubmit:e=>void Q(e),onCancel:()=>{j(``),N(null)}},M.name),P===null?null:(0,p.jsx)(d,{id:`terminal-background-delete`,heading:b(`terminal.backgroundDeleteHeading`),body:(0,p.jsx)(`p`,{className:`text-sm text-ink-muted`,children:b(`terminal.backgroundDeleteHint`,{name:P.name})}),confirmLabel:b(`terminal.backgroundDeleteAction`),cancelLabel:b(`terminal.backgroundRenameCancel`),onConfirm:()=>void Z(P.name),onCancel:()=>F(null)})]})}function v({name:e,chosen:t,className:n=`h-16 w-24 rounded-md`}){let r=f(e);return r===``?(0,p.jsx)(`div`,{className:`${n} bg-control`}):(0,p.jsx)(`img`,{src:r,alt:e,className:`${n} object-cover ${t?`brightness-105`:``}`})}var y=[{name:`solarized-dark`,label:`Solarized Dark`},{name:`solarized-light`,label:`Solarized Light`},{name:`dracula`,label:`Dracula`},{name:`nord`,label:`Nord`},{name:`gruvbox-dark`,label:`Gruvbox Dark`},{name:`one-dark`,label:`One Dark`}];export{_ as n,m as r,y as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/python-Br794m9x.js b/internal/ui/dist/assets/python-DviOXdGw.js similarity index 98% rename from internal/ui/dist/assets/python-Br794m9x.js rename to internal/ui/dist/assets/python-DviOXdGw.js index 9fb3a9cb7..e5dedc2dc 100644 --- a/internal/ui/dist/assets/python-Br794m9x.js +++ b/internal/ui/dist/assets/python-DviOXdGw.js @@ -1 +1 @@ -import{o as e}from"./editor.api-BUrKrayv.js";var t={comments:{lineComment:`#`,blockComment:[`'''`,`'''`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$`),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:RegExp(`^\\s*#region\\b`),end:RegExp(`^\\s*#endregion\\b`)}}},n={defaultToken:``,tokenPostfix:`.python`,keywords:`False.None.True._.and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.exec.finally.for.from.global.if.import.in.is.lambda.match.nonlocal.not.or.pass.print.raise.return.try.type.while.with.yield.int.float.long.complex.hex.abs.all.any.apply.basestring.bin.bool.buffer.bytearray.callable.chr.classmethod.cmp.coerce.compile.complex.delattr.dict.dir.divmod.enumerate.eval.execfile.file.filter.format.frozenset.getattr.globals.hasattr.hash.help.id.input.intern.isinstance.issubclass.iter.len.locals.list.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.reversed.range.raw_input.reduce.reload.repr.reversed.round.self.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.unichr.unicode.vars.xrange.zip.__dict__.__methods__.__members__.__class__.__bases__.__name__.__mro__.__subclasses__.__init__.__import__`.split(`.`),brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.bracket`},{open:`(`,close:`)`,token:`delimiter.parenthesis`}],tokenizer:{root:[{include:`@whitespace`},{include:`@numbers`},{include:`@strings`},[/[,:;]/,`delimiter`],[/[{}\[\]()]/,`@brackets`],[/@[a-zA-Z_]\w*/,`tag`],[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}]],whitespace:[[/\s+/,`white`],[/(^#.*$)/,`comment`],[/'''/,`string`,`@endDocString`],[/"""/,`string`,`@endDblDocString`]],endDocString:[[/[^']+/,`string`],[/\\'/,`string`],[/'''/,`string`,`@popall`],[/'/,`string`]],endDblDocString:[[/[^"]+/,`string`],[/\\"/,`string`],[/"""/,`string`,`@popall`],[/"/,`string`]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,`number.hex`],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,`number`]],strings:[[/'$/,`string.escape`,`@popall`],[/f'{1,3}/,`string.escape`,`@fStringBody`],[/'/,`string.escape`,`@stringBody`],[/"$/,`string.escape`,`@popall`],[/f"{1,3}/,`string.escape`,`@fDblStringBody`],[/"/,`string.escape`,`@dblStringBody`]],fStringBody:[[/[^\\'\{\}]+$/,`string`,`@popall`],[/[^\\'\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],stringBody:[[/[^\\']+$/,`string`,`@popall`],[/[^\\']+/,`string`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],fDblStringBody:[[/[^\\"\{\}]+$/,`string`,`@popall`],[/[^\\"\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],dblStringBody:[[/[^\\"]+$/,`string`,`@popall`],[/[^\\"]+/,`string`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],fStringDetail:[[/[:][^}]+/,`string`],[/[!][ars]/,`string`],[/=/,`string`],[/\}/,`identifier`,`@pop`]]}};export{t as conf,n as language}; \ No newline at end of file +import{o as e}from"./editor.api-BJ0kNDCq.js";var t={comments:{lineComment:`#`,blockComment:[`'''`,`'''`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$`),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:RegExp(`^\\s*#region\\b`),end:RegExp(`^\\s*#endregion\\b`)}}},n={defaultToken:``,tokenPostfix:`.python`,keywords:`False.None.True._.and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.exec.finally.for.from.global.if.import.in.is.lambda.match.nonlocal.not.or.pass.print.raise.return.try.type.while.with.yield.int.float.long.complex.hex.abs.all.any.apply.basestring.bin.bool.buffer.bytearray.callable.chr.classmethod.cmp.coerce.compile.complex.delattr.dict.dir.divmod.enumerate.eval.execfile.file.filter.format.frozenset.getattr.globals.hasattr.hash.help.id.input.intern.isinstance.issubclass.iter.len.locals.list.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.reversed.range.raw_input.reduce.reload.repr.reversed.round.self.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.unichr.unicode.vars.xrange.zip.__dict__.__methods__.__members__.__class__.__bases__.__name__.__mro__.__subclasses__.__init__.__import__`.split(`.`),brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.bracket`},{open:`(`,close:`)`,token:`delimiter.parenthesis`}],tokenizer:{root:[{include:`@whitespace`},{include:`@numbers`},{include:`@strings`},[/[,:;]/,`delimiter`],[/[{}\[\]()]/,`@brackets`],[/@[a-zA-Z_]\w*/,`tag`],[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}]],whitespace:[[/\s+/,`white`],[/(^#.*$)/,`comment`],[/'''/,`string`,`@endDocString`],[/"""/,`string`,`@endDblDocString`]],endDocString:[[/[^']+/,`string`],[/\\'/,`string`],[/'''/,`string`,`@popall`],[/'/,`string`]],endDblDocString:[[/[^"]+/,`string`],[/\\"/,`string`],[/"""/,`string`,`@popall`],[/"/,`string`]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,`number.hex`],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,`number`]],strings:[[/'$/,`string.escape`,`@popall`],[/f'{1,3}/,`string.escape`,`@fStringBody`],[/'/,`string.escape`,`@stringBody`],[/"$/,`string.escape`,`@popall`],[/f"{1,3}/,`string.escape`,`@fDblStringBody`],[/"/,`string.escape`,`@dblStringBody`]],fStringBody:[[/[^\\'\{\}]+$/,`string`,`@popall`],[/[^\\'\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],stringBody:[[/[^\\']+$/,`string`,`@popall`],[/[^\\']+/,`string`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],fDblStringBody:[[/[^\\"\{\}]+$/,`string`,`@popall`],[/[^\\"\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],dblStringBody:[[/[^\\"]+$/,`string`,`@popall`],[/[^\\"]+/,`string`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],fStringDetail:[[/[:][^}]+/,`string`],[/[!][ars]/,`string`],[/=/,`string`],[/\}/,`identifier`,`@pop`]]}};export{t as conf,n as language}; \ No newline at end of file diff --git a/internal/ui/dist/assets/surface-Ck_FblzE.js b/internal/ui/dist/assets/surface-DPFJ-mE2.js similarity index 89% rename from internal/ui/dist/assets/surface-Ck_FblzE.js rename to internal/ui/dist/assets/surface-DPFJ-mE2.js index a44fd4660..3cabd9cc3 100644 --- a/internal/ui/dist/assets/surface-Ck_FblzE.js +++ b/internal/ui/dist/assets/surface-DPFJ-mE2.js @@ -1 +1 @@ -import{n as e,t}from"./jsx-runtime-QtymfJMM.js";import{a as n,l as r,s as i,u as a}from"./form-C1olpQVF.js";var o={AgentIdentitiesResponse:{additionalProperties:!1,properties:{agentAvailable:{type:`boolean`},id:{type:`string`},identities:{items:{$ref:`#/components/schemas/AgentIdentity`},type:`array`}},required:[`id`,`agentAvailable`,`identities`],type:`object`},AgentIdentity:{additionalProperties:!1,properties:{algorithm:{type:`string`},bits:{type:`integer`},comment:{type:`string`},fingerprint:{type:`string`}},required:[`bits`,`fingerprint`,`comment`,`algorithm`],type:`object`},AliasRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`}},required:[`alias`],type:`object`},AssignCredentialRequest:{additionalProperties:!1,properties:{name:{maxLength:128,minLength:1,type:`string`},subject:{maxLength:4096,minLength:1,type:`string`}},required:[`subject`,`name`],type:`object`},AuthenticationRequest:{additionalProperties:!1,properties:{acknowledgeExecutable:{type:`boolean`},alias:{maxLength:64,minLength:1,type:`string`}},required:[`alias`,`acknowledgeExecutable`],type:`object`},AuthenticationResponse:{additionalProperties:!1,properties:{authenticated:{type:`boolean`},detail:{type:`string`},elapsedMs:{type:`integer`},method:{type:`string`},outcome:{type:`string`},truncated:{type:`boolean`}},required:[`outcome`,`authenticated`,`method`,`detail`,`truncated`,`elapsedMs`],type:`object`},AutoSync:{additionalProperties:!1,properties:{at:{type:`string`},detail:{type:`string`},enabled:{type:`boolean`},phase:{enum:[`idle`,`running`,`blocked`,`failed`],type:`string`}},required:[`enabled`,`phase`],type:`object`},AutoSyncRequest:{additionalProperties:!1,properties:{enabled:{type:`boolean`}},required:[`enabled`],type:`object`},BackgroundSettings:{additionalProperties:!1,properties:{capacityMiB:{maximum:1024,minimum:1,type:`integer`}},type:`object`},BootstrapResponse:{additionalProperties:!1,properties:{browserToken:{maxLength:43,minLength:43,pattern:`^[A-Za-z0-9_-]{43}$`,type:`string`},csrfToken:{maxLength:43,minLength:43,pattern:`^[A-Za-z0-9_-]{43}$`,type:`string`}},required:[`csrfToken`],type:`object`},ChangeMasterPasswordRequest:{additionalProperties:!1,properties:{current:{maxLength:1024,type:`string`},next:{maxLength:1024,type:`string`}},required:[`current`,`next`],type:`object`},ChangeMasterPasswordResult:{additionalProperties:!1,properties:{vault:{$ref:`#/components/schemas/PasswordVaultStatus`}},required:[`vault`],type:`object`},ChangePassphraseRequest:{additionalProperties:!1,properties:{currentPassphrase:{maxLength:1024,type:`string`},newPassphrase:{maxLength:1024,type:`string`},unencrypted:{type:`boolean`}},required:[`currentPassphrase`,`newPassphrase`,`unencrypted`],type:`object`},ChangePassphraseResponse:{additionalProperties:!1,properties:{encrypted:{type:`boolean`},id:{type:`string`},notes:{items:{type:`string`},type:`array`},relativePath:{type:`string`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`encrypted`,`notes`,`transactionId`],type:`object`},ChangedResponse:{additionalProperties:!1,properties:{changed:{type:`boolean`}},required:[`changed`],type:`object`},ComplexityNote:{additionalProperties:!1,properties:{code:{type:`string`},condition:{type:`string`},detail:{type:`string`},line:{type:`integer`},path:{type:`string`}},required:[`code`,`path`,`line`,`condition`,`detail`],type:`object`},ConfigCheckResponse:{additionalProperties:!1,properties:{diagnostics:{items:{$ref:`#/components/schemas/ConfigDiagnostic`},type:`array`},files:{items:{$ref:`#/components/schemas/ConfigFileSummary`},type:`array`},root:{type:`string`}},required:[`root`,`files`,`diagnostics`],type:`object`},ConfigDiagnostic:{additionalProperties:!1,properties:{code:{type:`string`},detail:{type:`string`},line:{type:`integer`},path:{type:`string`},severity:{type:`string`}},required:[`severity`,`code`,`path`,`line`,`detail`],type:`object`},ConfigFileSummary:{additionalProperties:!1,properties:{editable:{type:`boolean`},includes:{type:`integer`},loads:{type:`integer`},missing:{type:`boolean`},path:{type:`string`}},required:[`path`,`editable`,`missing`,`loads`,`includes`],type:`object`},ConflictReport:{additionalProperties:!1,properties:{baseDigest:{type:`string`},diskDigest:{type:`string`},externalChange:{items:{$ref:`#/components/schemas/DiffLine`},type:`array`},localChange:{items:{$ref:`#/components/schemas/DiffLine`},type:`array`},path:{type:`string`}},required:[`path`,`externalChange`,`localChange`],type:`object`},ConnectionIdentityFileChange:{discriminator:{mapping:{inherit:`#/components/schemas/ConnectionInherit`,set:`#/components/schemas/ConnectionIdentityFileSet`},propertyName:`action`},oneOf:[{$ref:`#/components/schemas/ConnectionIdentityFileSet`},{$ref:`#/components/schemas/ConnectionInherit`}],"x-go-type":`json.RawMessage`},ConnectionIdentityFileSet:{additionalProperties:!1,properties:{action:{enum:[`set`],type:`string`,"x-go-type":`string`},keyId:{maxLength:32,minLength:32,type:`string`}},required:[`action`,`keyId`],type:`object`},ConnectionInherit:{additionalProperties:!1,properties:{action:{enum:[`inherit`],type:`string`,"x-go-type":`string`}},required:[`action`],type:`object`},ConnectionKeyPassphraseSetDedicated:{additionalProperties:!1,properties:{keyId:{maxLength:32,minLength:32,type:`string`},kind:{enum:[`set_dedicated`],type:`string`,"x-go-type":`string`},passphrase:{maxLength:1024,minLength:1,type:`string`}},required:[`kind`,`keyId`,`passphrase`],type:`object`},ConnectionKeyPassphraseUnchanged:{additionalProperties:!1,properties:{kind:{enum:[`unchanged`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},ConnectionPortChange:{discriminator:{mapping:{inherit:`#/components/schemas/ConnectionInherit`,set:`#/components/schemas/ConnectionPortSet`},propertyName:`action`},oneOf:[{$ref:`#/components/schemas/ConnectionPortSet`},{$ref:`#/components/schemas/ConnectionInherit`}],"x-go-type":`json.RawMessage`},ConnectionPortSet:{additionalProperties:!1,properties:{action:{enum:[`set`],type:`string`,"x-go-type":`string`},value:{maximum:65535,minimum:1,type:`integer`}},required:[`action`,`value`],type:`object`},ConnectionStringChange:{discriminator:{mapping:{inherit:`#/components/schemas/ConnectionInherit`,set:`#/components/schemas/ConnectionStringSet`},propertyName:`action`},oneOf:[{$ref:`#/components/schemas/ConnectionStringSet`},{$ref:`#/components/schemas/ConnectionInherit`}],"x-go-type":`json.RawMessage`},ConnectionStringSet:{additionalProperties:!1,properties:{action:{enum:[`set`],type:`string`,"x-go-type":`string`},value:{maxLength:255,type:`string`}},required:[`action`,`value`],type:`object`},CreateConnectionAuthentication:{discriminator:{mapping:{dedicated_password:`#/components/schemas/CreateDedicatedPasswordAuthentication`,identity_file:`#/components/schemas/CreateIdentityFileAuthentication`,new_shared_password:`#/components/schemas/CreateNewSharedPasswordAuthentication`,saved_password:`#/components/schemas/CreateSavedPasswordAuthentication`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/CreateDedicatedPasswordAuthentication`},{$ref:`#/components/schemas/CreateSavedPasswordAuthentication`},{$ref:`#/components/schemas/CreateNewSharedPasswordAuthentication`},{$ref:`#/components/schemas/CreateIdentityFileAuthentication`}],"x-go-type":`json.RawMessage`},CreateConnectionRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},authentication:{$ref:`#/components/schemas/CreateConnectionAuthentication`},group:{maxLength:400,type:`string`},hostName:{maxLength:255,minLength:1,type:`string`},port:{maximum:65535,minimum:1,type:`integer`},user:{maxLength:255,type:`string`}},required:[`alias`,`hostName`,`authentication`],type:`object`},CreateConnectionResponse:{additionalProperties:!1,properties:{identity:{$ref:`#/components/schemas/HostIdentity`},preview:{$ref:`#/components/schemas/SavePreview`},transactionId:{type:`string`}},required:[`transactionId`,`identity`,`preview`],type:`object`},CreateDedicatedPasswordAuthentication:{additionalProperties:!1,properties:{kind:{enum:[`dedicated_password`],type:`string`,"x-go-type":`string`},password:{maxLength:1024,minLength:1,type:`string`}},required:[`kind`,`password`],type:`object`},CreateIdentityFileAuthentication:{additionalProperties:!1,properties:{keyId:{maxLength:32,minLength:32,type:`string`},kind:{enum:[`identity_file`],type:`string`,"x-go-type":`string`}},required:[`kind`,`keyId`],type:`object`},CreateNewSharedPasswordAuthentication:{additionalProperties:!1,properties:{credential:{maxLength:128,minLength:1,type:`string`},kind:{enum:[`new_shared_password`],type:`string`,"x-go-type":`string`},password:{maxLength:1024,minLength:1,type:`string`}},required:[`kind`,`credential`,`password`],type:`object`},CreateSavedPasswordAuthentication:{additionalProperties:!1,properties:{credential:{maxLength:128,minLength:1,type:`string`},kind:{enum:[`saved_password`],type:`string`,"x-go-type":`string`}},required:[`kind`,`credential`],type:`object`},Credential:{additionalProperties:!1,properties:{hosts:{items:{type:`string`},type:`array`},kind:{enum:[`password`,`key_passphrase`,`totp`],type:`string`},name:{type:`string`},uses:{items:{type:`string`},type:`array`}},required:[`kind`,`name`,`uses`,`hosts`],type:`object`},CredentialList:{additionalProperties:!1,properties:{credentials:{items:{$ref:`#/components/schemas/Credential`},type:`array`},dedicatedKeyPassphrases:{items:{$ref:`#/components/schemas/DedicatedKeyPassphraseUsage`},type:`array`},keyHostUsageComplete:{type:`boolean`}},required:[`credentials`,`dedicatedKeyPassphrases`,`keyHostUsageComplete`],type:`object`},DedicatedKeyPassphraseUsage:{additionalProperties:!1,properties:{hosts:{items:{type:`string`},type:`array`},key:{type:`string`}},required:[`key`,`hosts`],type:`object`},Diagnostic:{additionalProperties:!1,properties:{absolute:{type:`string`},code:{type:`string`},detail:{type:`string`},external:{type:`boolean`},line:{type:`integer`},path:{type:`string`},severity:{type:`string`}},required:[`severity`,`code`],type:`object`},DiffLine:{additionalProperties:!1,properties:{newLine:{type:`integer`},oldLine:{type:`integer`},op:{type:`string`},text:{type:`string`}},required:[`op`,`text`],type:`object`},EditRequest:{additionalProperties:!1,properties:{alias:{type:`string`},base:{type:`string`},comment:{type:`string`},destinationBase:{type:`string`},destinationGroup:{maxLength:400,type:`string`},destinationPath:{type:`string`},fields:{items:{$ref:`#/components/schemas/FieldEdit`},type:`array`},kind:{type:`string`},metadata:{$ref:`#/components/schemas/Metadata`},newAlias:{type:`string`},path:{type:`string`},raw:{type:`string`}},required:[`kind`],type:`object`},Effective:{additionalProperties:!1,properties:{alias:{type:`string`},entries:{items:{$ref:`#/components/schemas/EffectiveEntry`},type:`array`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`}},required:[`alias`,`entries`],type:`object`},EffectiveChange:{additionalProperties:!1,properties:{after:{items:{type:`string`},type:`array`},afterSources:{items:{$ref:`#/components/schemas/Source`},type:`array`},before:{items:{type:`string`},type:`array`},beforeSources:{items:{$ref:`#/components/schemas/Source`},type:`array`},keyword:{type:`string`}},required:[`keyword`,`before`,`after`],type:`object`},EffectiveDiff:{additionalProperties:!1,properties:{alias:{type:`string`},changes:{items:{$ref:`#/components/schemas/EffectiveChange`},type:`array`}},required:[`alias`,`changes`],type:`object`},EffectiveEntry:{additionalProperties:!1,properties:{keyword:{type:`string`},source:{$ref:`#/components/schemas/Source`},values:{items:{type:`string`},type:`array`}},required:[`keyword`,`values`,`source`],type:`object`},EffectiveResponse:{additionalProperties:!1,properties:{alias:{type:`string`},complexities:{items:{$ref:`#/components/schemas/ComplexityNote`},type:`array`},executableDirectives:{items:{$ref:`#/components/schemas/ExecutableDirective`},type:`array`},route:{items:{$ref:`#/components/schemas/JumpStage`},type:`array`},sources:{items:{$ref:`#/components/schemas/ValueSource`},type:`array`},tokenWarning:{type:`string`}},required:[`alias`,`tokenWarning`,`executableDirectives`,`sources`,`complexities`,`route`],type:`object`},EmbeddedTerminal:{additionalProperties:!1,properties:{appearance:{$ref:`#/components/schemas/TerminalAppearance`},browserScrollbackLines:{maximum:1e5,minimum:1e3,type:`integer`},copyOnSelect:{type:`boolean`},fontSize:{maximum:32,minimum:8,type:`integer`},jisYenBackslash:{type:`boolean`},localShellProfile:{pattern:`^[a-z0-9-]{1,64}$`,type:`string`},maxSessions:{maximum:200,minimum:1,type:`integer`},osc52:{type:`boolean`},reconnect:{maximum:5,minimum:0,type:`integer`},rightClickPaste:{type:`boolean`},scrollbackBytes:{maximum:4194304,minimum:16384,type:`integer`},startDirectory:{maxLength:4096,type:`string`},verbosity:{maximum:3,minimum:0,type:`integer`},webgl:{type:`boolean`}},type:`object`},EngineSettings:{additionalProperties:!1,properties:{port:{maximum:65535,minimum:1024,type:`integer`},vaultAutoLock:{$ref:`#/components/schemas/VaultAutoLockSettings`}},type:`object`},ExecutableDirective:{additionalProperties:!1,properties:{command:{type:`string`},condition:{type:`string`},keyword:{type:`string`},line:{type:`integer`},onConnect:{type:`boolean`},onEvaluate:{type:`boolean`},overridable:{type:`boolean`},path:{type:`string`}},required:[`keyword`,`command`,`path`,`line`,`condition`,`onEvaluate`,`onConnect`,`overridable`],type:`object`},FieldEdit:{additionalProperties:!1,properties:{action:{type:`string`},keyword:{type:`string`},line:{type:`integer`},values:{items:{type:`string`},type:`array`}},required:[`action`],type:`object`},FileContents:{additionalProperties:!1,properties:{contents:{type:`string`},digest:{type:`string`},editable:{type:`boolean`},exists:{type:`boolean`},file:{$ref:`#/components/schemas/FileRef`}},required:[`file`,`contents`,`digest`,`editable`,`exists`],type:`object`},FileDiff:{additionalProperties:!1,properties:{created:{type:`boolean`},lines:{items:{$ref:`#/components/schemas/DiffLine`},type:`array`},newDigest:{type:`string`},oldDigest:{type:`string`},path:{type:`string`},removed:{type:`boolean`},truncated:{type:`boolean`}},required:[`path`,`lines`],type:`object`},FileNode:{additionalProperties:!1,properties:{editable:{type:`boolean`},file:{$ref:`#/components/schemas/FileRef`},includes:{items:{$ref:`#/components/schemas/IncludeReference`},type:`array`},loads:{type:`integer`},missing:{type:`boolean`}},required:[`file`,`editable`,`loads`],type:`object`},FileRef:{additionalProperties:!1,properties:{absolute:{type:`string`},external:{type:`boolean`},path:{type:`string`}},required:[`absolute`],type:`object`},FileTransferSettings:{additionalProperties:!1,properties:{clearCompletedAfterSeconds:{maximum:86400,minimum:0,type:`integer`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},maxConcurrent:{maximum:8,minimum:1,type:`integer`},processingStopped:{type:`boolean`}},type:`object`},FormField:{additionalProperties:!1,properties:{category:{type:`string`},dangerous:{type:`boolean`},duplicate:{type:`boolean`},editable:{type:`boolean`},keyword:{type:`string`},line:{type:`integer`},values:{items:{type:`string`},type:`array`}},required:[`line`,`keyword`,`values`,`category`,`editable`],type:`object`},GenerateKeyRequest:{additionalProperties:!1,properties:{algorithm:{maxLength:16,minLength:1,type:`string`},bits:{type:`integer`},comment:{maxLength:127,type:`string`},fileName:{maxLength:64,minLength:1,type:`string`},group:{maxLength:400,type:`string`},passphrase:{maxLength:1024,type:`string`},unencrypted:{type:`boolean`}},required:[`algorithm`,`fileName`,`comment`,`passphrase`,`unencrypted`],type:`object`},GenerateKeyResponse:{additionalProperties:!1,properties:{bits:{type:`integer`},encrypted:{type:`boolean`},fingerprint:{type:`string`},id:{type:`string`},keyType:{type:`string`},publicRelativePath:{type:`string`},relativePath:{type:`string`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`publicRelativePath`,`fingerprint`,`keyType`,`bits`,`encrypted`,`transactionId`],type:`object`},GroupDeleteRequest:{additionalProperties:!1,properties:{destination:{maxLength:400,type:`string`},name:{maxLength:400,minLength:1,type:`string`}},required:[`name`],type:`object`},GroupMetadata:{additionalProperties:!1,properties:{colour:{type:`string`},hidden:{type:`boolean`},name:{type:`string`},note:{type:`string`},order:{type:`integer`},settings:{items:{$ref:`#/components/schemas/Setting`},type:`array`}},required:[`name`],type:`object`},GroupRenameRequest:{additionalProperties:!1,properties:{from:{maxLength:400,minLength:1,type:`string`},to:{maxLength:400,minLength:1,type:`string`}},required:[`from`,`to`],type:`object`},GroupView:{additionalProperties:!1,properties:{colour:{type:`string`},directory:{type:`string`},directoryPresent:{type:`boolean`},keyDirectory:{type:`string`},memberCount:{type:`integer`},name:{type:`string`},note:{type:`string`},order:{type:`integer`},parent:{type:`string`},settings:{items:{$ref:`#/components/schemas/Setting`},type:`array`}},required:[`name`,`directory`,`keyDirectory`,`memberCount`,`directoryPresent`],type:`object`},HardwareCommandRequest:{additionalProperties:!1,properties:{algorithm:{maxLength:16,minLength:1,type:`string`},comment:{maxLength:127,type:`string`},fileName:{maxLength:64,minLength:1,type:`string`},group:{maxLength:400,type:`string`}},required:[`algorithm`,`fileName`,`comment`],type:`object`},HardwareCommandResponse:{additionalProperties:!1,properties:{algorithm:{type:`string`},command:{items:{type:`string`},type:`array`},note:{type:`string`}},required:[`algorithm`,`command`,`note`],type:`object`},HealthResponse:{additionalProperties:!1,properties:{status:{enum:[`ok`],type:`string`,"x-go-type":`string`},version:{minLength:1,type:`string`}},required:[`status`,`version`],type:`object`},HistoryEntry:{additionalProperties:!1,properties:{finishedAt:{type:`string`},id:{type:`string`},operation:{type:`string`},paths:{items:{type:`string`},type:`array`},restorable:{items:{type:`string`},type:`array`},startedAt:{type:`string`},status:{type:`string`}},required:[`id`,`operation`,`status`,`startedAt`,`paths`],type:`object`},HistoryList:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/HistoryEntry`},type:`array`}},required:[`entries`],type:`object`},HostDetail:{additionalProperties:!1,properties:{effective:{$ref:`#/components/schemas/Effective`},file:{$ref:`#/components/schemas/FileContents`},form:{$ref:`#/components/schemas/HostForm`},metadata:{$ref:`#/components/schemas/HostMetadata`}},required:[`form`,`metadata`,`effective`,`file`],type:`object`},HostEntry:{additionalProperties:!1,properties:{duplicate:{type:`boolean`},editable:{type:`boolean`},file:{$ref:`#/components/schemas/FileRef`},group:{type:`string`},hostName:{description:`Resolved SSH destination hostname used by this alias.`,type:`string`},identity:{$ref:`#/components/schemas/HostIdentity`},line:{type:`integer`},negated:{type:`boolean`},patterns:{items:{type:`string`},type:`array`},port:{description:`Resolved SSH port used by this alias.`,type:`string`},user:{description:`Resolved remote account used by this alias.`,type:`string`},wildcard:{type:`boolean`}},required:[`identity`,`file`,`line`,`patterns`,`editable`],type:`object`},HostForm:{additionalProperties:!1,properties:{comment:{description:`The comment lines attached above the Host line, with the '#' markers stripped. Empty when the block has none. ssh_config has no trailing comment syntax, so only whole lines are ever attached.`,type:`string`},commentLines:{description:`How many physical lines the attached comment occupies. A client rewriting the whole file needs the count to include those lines; it cannot be derived from comment, whose markers and indentation were stripped.`,type:`integer`},entry:{$ref:`#/components/schemas/HostEntry`},fields:{items:{$ref:`#/components/schemas/FormField`},type:`array`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`},raw:{type:`string`}},required:[`entry`,`fields`,`raw`,`comment`,`commentLines`],type:`object`},HostIdentity:{additionalProperties:!1,properties:{alias:{type:`string`},path:{type:`string`}},required:[`path`,`alias`],type:`object`},HostMetadata:{additionalProperties:!1,properties:{appearance:{$ref:`#/components/schemas/TerminalAppearance`},colour:{type:`string`},detectedOS:{description:`Last operating system detected after connecting.`,enum:[``,`server`,`linux`,`amazonlinux`,`ubuntu`,`debian`,`redhat`,`fedora`,`centos`,`rocky`,`almalinux`,`arch`,`alpine`,`opensuse`,`freebsd`,`macos`,`windows`],type:`string`},detectedOSBinding:{maxLength:64,type:`string`},encoding:{description:`Text encoding used by this SSH terminal. Omitted means UTF-8.`,enum:[`utf-8`,`shift_jis`,`euc-jp`,`iso-2022-jp`],type:`string`},identity:{$ref:`#/components/schemas/HostIdentity`},note:{type:`string`},order:{type:`integer`},orphan:{type:`boolean`},os:{description:`Home icon override. Empty or omitted enables automatic detection.`,enum:[``,`server`,`linux`,`amazonlinux`,`ubuntu`,`debian`,`redhat`,`fedora`,`centos`,`rocky`,`almalinux`,`arch`,`alpine`,`opensuse`,`freebsd`,`macos`,`windows`],type:`string`},osc52:{description:`Per-connection OSC 52 override. Omitted inherits the terminal default.`,enum:[`allow`,`deny`],type:`string`},tags:{items:{type:`string`},type:`array`}},required:[`identity`],type:`object`},IncludeReference:{additionalProperties:!1,properties:{condition:{type:`string`},line:{type:`integer`},matches:{items:{$ref:`#/components/schemas/FileRef`},type:`array`},pattern:{type:`string`}},required:[`line`,`pattern`],type:`object`},IssueActionRequest:{additionalProperties:!1,properties:{kind:{maxLength:64,minLength:1,type:`string`},target:{maxLength:4352,minLength:1,type:`string`}},required:[`kind`,`target`],type:`object`},IssueActionResponse:{additionalProperties:!1,properties:{expiresAt:{minLength:1,type:`string`},token:{maxLength:43,minLength:43,type:`string`}},required:[`token`,`expiresAt`],type:`object`},JumpStage:{additionalProperties:!1,properties:{complex:{type:`boolean`},depth:{type:`integer`},hop:{type:`string`},hostname:{type:`string`},order:{type:`integer`},parent:{type:`string`},port:{type:`string`},user:{type:`string`}},required:[`order`,`depth`,`parent`,`hop`,`hostname`,`user`,`port`,`complex`],type:`object`},KeyAlgorithmsResponse:{additionalProperties:!1,properties:{source:{type:`string`},variants:{items:{$ref:`#/components/schemas/KeyVariant`},type:`array`}},required:[`variants`,`source`],type:`object`},KeyCertificate:{additionalProperties:!1,properties:{keyId:{type:`string`},neverExpires:{type:`boolean`},principals:{items:{type:`string`},type:`array`},signedKeyFingerprint:{type:`string`},signedKeyType:{type:`string`},validBefore:{type:`integer`}},required:[`keyId`,`principals`,`validBefore`,`neverExpires`,`signedKeyType`,`signedKeyFingerprint`],type:`object`},KeyInventoryResponse:{additionalProperties:!1,properties:{agentAvailable:{type:`boolean`},agentDelegations:{items:{$ref:`#/components/schemas/KeyReference`},type:`array`},agentIdentities:{items:{$ref:`#/components/schemas/AgentIdentity`},type:`array`},items:{items:{$ref:`#/components/schemas/KeyItem`},type:`array`},unreadable:{items:{$ref:`#/components/schemas/UnreadableFile`},type:`array`},unresolvedReferences:{items:{$ref:`#/components/schemas/UnresolvedReference`},type:`array`}},required:[`items`,`unreadable`,`agentDelegations`,`unresolvedReferences`,`agentAvailable`,`agentIdentities`],type:`object`},KeyItem:{additionalProperties:!1,properties:{algorithm:{type:`string`},bits:{type:`integer`},certificate:{$ref:`#/components/schemas/KeyCertificate`},comment:{type:`string`},container:{type:`string`},encrypted:{type:`boolean`},fingerprint:{type:`string`},id:{type:`string`},keyType:{type:`string`},kind:{type:`string`},notes:{items:{type:`string`},type:`array`},permission:{type:`string`},permissionRisk:{type:`boolean`},references:{items:{$ref:`#/components/schemas/KeyReference`},type:`array`},relativePath:{type:`string`},sizeBytes:{type:`integer`}},required:[`id`,`relativePath`,`kind`,`container`,`algorithm`,`keyType`,`bits`,`encrypted`,`fingerprint`,`comment`,`permission`,`permissionRisk`,`sizeBytes`,`references`,`notes`],type:`object`},KeyReference:{additionalProperties:!1,properties:{condition:{type:`string`},configPath:{type:`string`},directive:{type:`string`},hostPatterns:{items:{type:`string`},type:`array`},line:{type:`integer`},value:{type:`string`}},required:[`directive`,`configPath`,`line`,`condition`,`hostPatterns`,`value`],type:`object`},KeyVariant:{additionalProperties:!1,properties:{algorithm:{type:`string`},bits:{type:`integer`},inProcess:{type:`boolean`},label:{type:`string`},reason:{type:`string`}},required:[`algorithm`,`bits`,`label`,`inProcess`,`reason`],type:`object`},KnownHostCandidate:{additionalProperties:!1,properties:{fingerprint:{type:`string`},host:{type:`string`},key:{type:`string`},keyType:{type:`string`},port:{type:`integer`},verified:{type:`boolean`}},required:[`host`,`port`,`keyType`,`key`,`fingerprint`,`verified`],type:`object`},KnownHostEntry:{additionalProperties:!1,properties:{comment:{type:`string`},digest:{type:`string`},fingerprint:{type:`string`},hashed:{type:`boolean`},hosts:{items:{type:`string`},type:`array`},keyType:{type:`string`},line:{type:`integer`},marker:{type:`string`}},required:[`line`,`digest`,`marker`,`hosts`,`hashed`,`keyType`,`fingerprint`,`comment`],type:`object`},KnownHostTarget:{additionalProperties:!1,properties:{digest:{maxLength:64,minLength:64,type:`string`},line:{type:`integer`}},required:[`line`,`digest`],type:`object`},KnownHostsAddRequest:{additionalProperties:!1,properties:{acknowledged:{type:`boolean`},expectedFingerprint:{maxLength:128,type:`string`},host:{maxLength:255,minLength:1,type:`string`},key:{maxLength:4096,minLength:1,type:`string`},keyType:{maxLength:64,minLength:1,type:`string`},port:{type:`integer`}},required:[`host`,`port`,`keyType`,`key`,`expectedFingerprint`,`acknowledged`],type:`object`},KnownHostsChangeResponse:{additionalProperties:!1,properties:{changed:{type:`boolean`},transactionId:{type:`string`}},required:[`changed`,`transactionId`],type:`object`},KnownHostsDeleteRequest:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/KnownHostTarget`},type:`array`}},required:[`entries`],type:`object`},KnownHostsResponse:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/KnownHostEntry`},type:`array`},path:{type:`string`}},required:[`path`,`entries`],type:`object`},KnownHostsScanRequest:{additionalProperties:!1,properties:{host:{maxLength:255,minLength:1,type:`string`},port:{type:`integer`}},required:[`host`,`port`],type:`object`},KnownHostsScanResponse:{additionalProperties:!1,properties:{candidates:{items:{$ref:`#/components/schemas/KnownHostCandidate`},type:`array`},notice:{type:`string`}},required:[`notice`,`candidates`],type:`object`},LocalShellProfile:{additionalProperties:!1,properties:{arguments:{items:{type:`string`},type:`array`},default:{type:`boolean`},id:{type:`string`},label:{type:`string`},path:{type:`string`}},required:[`id`,`label`,`path`,`arguments`,`default`],type:`object`},LocalShellProfileList:{additionalProperties:!1,properties:{profiles:{items:{$ref:`#/components/schemas/LocalShellProfile`},type:`array`}},required:[`profiles`],type:`object`},Metadata:{additionalProperties:!1,properties:{backgrounds:{$ref:`#/components/schemas/BackgroundSettings`},embeddedTerminal:{$ref:`#/components/schemas/EmbeddedTerminal`},engine:{$ref:`#/components/schemas/EngineSettings`},fileTransfers:{$ref:`#/components/schemas/FileTransferSettings`},groups:{items:{$ref:`#/components/schemas/GroupMetadata`},type:`array`},groupsFile:{type:`string`},hosts:{items:{$ref:`#/components/schemas/HostMetadata`},type:`array`},schemaVersion:{type:`integer`},shortcutPresets:{items:{$ref:`#/components/schemas/ShortcutPreset`},maxItems:64,type:`array`}},required:[`schemaVersion`],type:`object`},Notice:{additionalProperties:!1,properties:{code:{type:`string`},detail:{type:`string`},line:{type:`integer`},path:{type:`string`}},required:[`code`],type:`object`},OpenTerminalSessionRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},cols:{maximum:1e3,minimum:1,type:`integer`},cwd:{maxLength:4096,minLength:1,type:`string`},kind:{enum:[`ssh`,`shell`],type:`string`},profileId:{pattern:`^[a-z0-9-]{1,64}$`,type:`string`},rows:{maximum:1e3,minimum:1,type:`integer`}},required:[`kind`],type:`object`},OpenTerminalSessionResponse:{additionalProperties:!1,properties:{session:{$ref:`#/components/schemas/TerminalSession`},streamTicket:{type:`string`}},required:[`session`,`streamTicket`],type:`object`},Overview:{additionalProperties:!1,properties:{diagnostics:{items:{$ref:`#/components/schemas/Diagnostic`},type:`array`},entry:{$ref:`#/components/schemas/FileRef`},files:{items:{$ref:`#/components/schemas/FileNode`},type:`array`},groups:{items:{$ref:`#/components/schemas/GroupView`},type:`array`},hosts:{items:{$ref:`#/components/schemas/HostEntry`},type:`array`},metadata:{$ref:`#/components/schemas/Metadata`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`},pending:{items:{$ref:`#/components/schemas/PendingTransaction`},type:`array`}},required:[`entry`,`files`,`hosts`,`groups`,`metadata`,`diagnostics`,`notices`],type:`object`},PassphraseRequest:{additionalProperties:!1,properties:{passphrase:{maxLength:1024,type:`string`}},required:[`passphrase`],type:`object`},PasswordEligibility:{additionalProperties:!1,properties:{alias:{type:`string`},blockers:{items:{$ref:`#/components/schemas/Notice`},type:`array`},hostName:{type:`string`},passwordBinding:{enum:[`unavailable`,`none`,`current`,`stale`],type:`string`},port:{type:`string`},storable:{type:`boolean`},totpBinding:{enum:[`unavailable`,`none`,`current`,`stale`],type:`string`},warnings:{items:{$ref:`#/components/schemas/Notice`},type:`array`}},required:[`alias`,`storable`,`blockers`,`warnings`],type:`object`},PasswordVaultStatus:{additionalProperties:!1,properties:{aliases:{items:{type:`string`},type:`array`},dedicatedKeyPassphrases:{items:{type:`string`},type:`array`},exists:{type:`boolean`},migratedFromVersion:{type:`integer`},migratedToVersion:{type:`integer`},minPassphraseLength:{type:`integer`},passwordless:{type:`boolean`},unlocked:{type:`boolean`}},required:[`exists`,`unlocked`,`aliases`,`dedicatedKeyPassphrases`],type:`object`},PendingTransaction:{additionalProperties:!1,properties:{canComplete:{type:`boolean`},committed:{type:`integer`},id:{type:`string`},operation:{type:`string`},paths:{items:{type:`string`},type:`array`},startedAt:{type:`string`},status:{type:`string`}},required:[`id`,`operation`,`status`,`startedAt`,`committed`,`paths`,`canComplete`],type:`object`},Problem:{additionalProperties:!1,properties:{blockers:{items:{type:`string`},type:`array`},code:{type:`string`},column:{type:`integer`},conflict:{$ref:`#/components/schemas/ConflictReport`},currentVersion:{minimum:0,type:`integer`},detail:{type:`string`},diagnostics:{items:{$ref:`#/components/schemas/Diagnostic`},type:`array`},line:{type:`integer`},message:{type:`string`},path:{type:`string`},requiredVersion:{minimum:1,type:`integer`}},required:[`code`,`message`],type:`object`},PublicKeyResponse:{additionalProperties:!1,properties:{comment:{type:`string`},fingerprint:{type:`string`},id:{type:`string`},publicKey:{type:`string`},relativePath:{type:`string`}},required:[`id`,`relativePath`,`publicKey`,`fingerprint`,`comment`],type:`object`},PullRequest:{additionalProperties:!1,properties:{acceptRemoteHead:{type:`boolean`},apply:{type:`boolean`},expectedETag:{maxLength:1024,type:`string`},expectedRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},historyKey:{maxLength:1024,minLength:1,type:`string`},resolve:{enum:[`local`,`remote`],type:`string`}},type:`object`},PullResponse:{additionalProperties:!1,properties:{applied:{type:`boolean`},completedAt:{type:`string`},conflicts:{items:{$ref:`#/components/schemas/SyncConflict`},type:`array`},downloadedBytes:{format:`int64`,minimum:0,type:`integer`},origin:{type:`string`},remoteETag:{type:`string`},remoteRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},removed:{items:{type:`string`},type:`array`},summary:{$ref:`#/components/schemas/SnapshotSummary`},written:{items:{type:`string`},type:`array`}},required:[`applied`,`conflicts`,`written`,`removed`,`summary`,`downloadedBytes`,`completedAt`,`remoteETag`,`remoteRevision`],type:`object`},PurgeTrashResponse:{additionalProperties:!1,properties:{entryId:{type:`string`},removed:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`entryId`,`removed`,`transactionId`],type:`object`},PushResponse:{additionalProperties:!1,properties:{result:{$ref:`#/components/schemas/PushResult`},status:{$ref:`#/components/schemas/SyncStatus`}},required:[`status`,`result`],type:`object`},PushResult:{additionalProperties:!1,properties:{completedAt:{type:`string`},objectCount:{minimum:0,type:`integer`},summary:{$ref:`#/components/schemas/SnapshotSummary`},uploadedBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`summary`,`objectCount`,`uploadedBytes`,`completedAt`],type:`object`},ReachabilityResponse:{additionalProperties:!1,properties:{address:{type:`string`},detail:{type:`string`},elapsedMs:{type:`integer`},notice:{type:`string`},outcome:{type:`string`}},required:[`address`,`outcome`,`elapsedMs`,`detail`,`notice`],type:`object`},RecentConnection:{additionalProperties:!1,properties:{alias:{type:`string`},hostName:{type:`string`},lastConnectedAt:{format:`date-time`,type:`string`},port:{type:`string`},user:{type:`string`}},required:[`alias`,`hostName`,`user`,`port`,`lastConnectedAt`],type:`object`},RecentConnectionList:{additionalProperties:!1,properties:{connections:{items:{$ref:`#/components/schemas/RecentConnection`},maxItems:20,type:`array`}},required:[`connections`],type:`object`},RecoverRequest:{additionalProperties:!1,properties:{action:{maxLength:16,minLength:1,type:`string`},transactionId:{maxLength:128,minLength:1,type:`string`}},required:[`transactionId`,`action`],type:`object`},RecoverResponse:{additionalProperties:!1,properties:{status:{enum:[`ok`],type:`string`,"x-go-type":`string`}},required:[`status`],type:`object`},RegisterKeyRequest:{additionalProperties:!1,properties:{lifetimeSeconds:{type:`integer`},passphrase:{maxLength:1024,type:`string`}},required:[`passphrase`,`lifetimeSeconds`],type:`object`},RegisterKeyResponse:{additionalProperties:!1,properties:{fingerprint:{type:`string`},id:{type:`string`},identities:{items:{$ref:`#/components/schemas/AgentIdentity`},type:`array`},lifetimeSeconds:{type:`integer`},relativePath:{type:`string`}},required:[`id`,`relativePath`,`fingerprint`,`lifetimeSeconds`,`identities`],type:`object`},RelocateKeyRequest:{additionalProperties:!1,properties:{group:{maxLength:400,type:`string`},newName:{maxLength:64,minLength:1,type:`string`}},type:`object`},RelocateKeyResponse:{additionalProperties:!1,properties:{blockers:{items:{type:`string`},type:`array`},files:{items:{$ref:`#/components/schemas/RelocatedKeyFile`},type:`array`},group:{type:`string`},id:{type:`string`},notes:{items:{type:`string`},type:`array`},references:{items:{$ref:`#/components/schemas/RewrittenKeyReference`},type:`array`},relativePath:{type:`string`},skipped:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`group`,`files`,`references`,`skipped`,`notes`,`blockers`,`transactionId`],type:`object`},RelocatedKeyFile:{additionalProperties:!1,properties:{from:{type:`string`},to:{type:`string`}},required:[`from`,`to`],type:`object`},RemoteKeyPlan:{additionalProperties:!1,properties:{actionExpiresAt:{type:`string`},actionToken:{type:`string`},alias:{type:`string`},executableDirectives:{items:{$ref:`#/components/schemas/ExecutableDirective`},type:`array`},fingerprint:{type:`string`},hostname:{type:`string`},keyLine:{type:`string`},keyPath:{type:`string`},manual:{items:{type:`string`},type:`array`},port:{type:`string`},remotePath:{type:`string`},routine:{type:`string`},supported:{type:`boolean`},user:{type:`string`},valuesFrom:{type:`string`}},required:[`alias`,`user`,`hostname`,`port`,`valuesFrom`,`fingerprint`,`keyPath`,`keyLine`,`remotePath`,`routine`,`supported`,`manual`,`executableDirectives`,`actionToken`,`actionExpiresAt`],type:`object`},RemoteKeyPlanRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},keyPath:{maxLength:4096,type:`string`},publicKey:{maxLength:4096,minLength:1,type:`string`}},required:[`alias`,`keyPath`,`publicKey`],type:`object`},RemoteKeyRegisterRequest:{additionalProperties:!1,properties:{acknowledgeExecutable:{type:`boolean`},alias:{maxLength:64,minLength:1,type:`string`},keyPath:{maxLength:4096,type:`string`},publicKey:{maxLength:4096,minLength:1,type:`string`}},required:[`alias`,`keyPath`,`publicKey`,`acknowledgeExecutable`],type:`object`},RemoteKeyRegisterResponse:{additionalProperties:!1,properties:{exitCode:{type:`integer`},outcome:{type:`string`},stderr:{type:`string`},truncated:{type:`boolean`}},required:[`outcome`,`exitCode`,`stderr`,`truncated`],type:`object`},RenameTerminalBackgroundRequest:{additionalProperties:!1,properties:{name:{maxLength:128,minLength:1,type:`string`}},required:[`name`],type:`object`},RenameTerminalSessionRequest:{additionalProperties:!1,properties:{title:{maxLength:64,minLength:1,type:`string`}},required:[`title`],type:`object`},ResetUnsupportedVaultRequest:{additionalProperties:!1,properties:{acknowledged:{type:`boolean`},passphrase:{maxLength:1024,type:`string`}},required:[`passphrase`,`acknowledged`],type:`object`},RestoreRequest:{additionalProperties:!1,properties:{path:{maxLength:512,minLength:1,type:`string`},transactionId:{maxLength:128,minLength:1,type:`string`}},required:[`transactionId`,`path`],type:`object`},RestoreTrashResponse:{additionalProperties:!1,properties:{blockers:{items:{type:`string`},type:`array`},entryId:{type:`string`},restored:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`entryId`,`restored`,`blockers`,`transactionId`],type:`object`},RevealCredentialResponse:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`},secret:{type:`string`}},required:[`kind`,`name`,`secret`],type:`object`},RevealPrivateKeyResponse:{additionalProperties:!1,properties:{encrypted:{type:`boolean`},fingerprint:{type:`string`},id:{type:`string`},privateKey:{type:`string`},relativePath:{type:`string`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`privateKey`,`encrypted`,`fingerprint`,`transactionId`],type:`object`},RewrittenKeyReference:{additionalProperties:!1,properties:{configPath:{type:`string`},directive:{type:`string`},from:{type:`string`},line:{type:`integer`},to:{type:`string`}},required:[`directive`,`configPath`,`line`,`from`,`to`],type:`object`},SFTPChmodRequest:{additionalProperties:!1,properties:{expectedRevision:{minLength:1,type:`string`},mode:{pattern:`^0?[0-7]{3}$`,type:`string`},path:{type:`string`},recursive:{type:`boolean`}},required:[`path`,`mode`,`expectedRevision`,`recursive`],type:`object`},SFTPCompleteUploadRequest:{additionalProperties:!1,properties:{expectedRevision:{minLength:1,type:`string`},path:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`},sourceFingerprint:{pattern:`^tree-sha256:[0-9a-f]{64}$`,type:`string`}},required:[`path`,`size`,`expectedRevision`,`sourceFingerprint`],type:`object`},SFTPCreateEntryRequest:{additionalProperties:!1,properties:{path:{type:`string`},type:{enum:[`directory`,`file`],type:`string`}},required:[`path`,`type`],type:`object`},SFTPCreateTransferJobRequest:{additionalProperties:!1,properties:{alias:{maxLength:255,minLength:1,type:`string`},batchId:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},batchKind:{enum:[`file`,`folder`],type:`string`},batchName:{maxLength:1024,minLength:1,type:`string`},direction:{enum:[`upload`,`download`,`remote`],type:`string`},id:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},kind:{enum:[`file`,`folder`],type:`string`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},lastModified:{format:`int64`,minimum:0,type:`integer`},name:{maxLength:1024,minLength:1,type:`string`},operation:{enum:[``,`copy`,`move`,`delete`,`get`,`put`],type:`string`},overwrite:{type:`boolean`},remotePath:{minLength:1,type:`string`},sourceAlias:{maxLength:255,type:`string`},sourcePath:{type:`string`},totalBytes:{format:`int64`,minimum:-1,type:`integer`}},required:[`id`,`batchId`,`batchName`,`batchKind`,`alias`,`sourceAlias`,`sourcePath`,`operation`,`overwrite`,`direction`,`kind`,`name`,`remotePath`,`totalBytes`,`lastModified`],type:`object`},SFTPDirectoryComparison:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPDirectoryDifference`},maxItems:2e4,type:`array`},leftPath:{type:`string`},rightPath:{type:`string`}},required:[`leftPath`,`rightPath`,`entries`],type:`object`},SFTPDirectoryDifference:{additionalProperties:!1,properties:{left:{$ref:`#/components/schemas/SFTPEntry`},relativePath:{type:`string`},right:{$ref:`#/components/schemas/SFTPEntry`},status:{enum:[`same`,`different`,`left_only`,`right_only`,`type_mismatch`],type:`string`}},required:[`relativePath`,`status`],type:`object`},SFTPDirectoryStats:{additionalProperties:!1,properties:{bytes:{format:`int64`,minimum:0,type:`integer`},directories:{minimum:1,type:`integer`},files:{minimum:0,type:`integer`},path:{type:`string`},truncated:{type:`boolean`}},required:[`path`,`bytes`,`files`,`directories`,`truncated`],type:`object`},SFTPDownloadCheckpointRequest:{additionalProperties:!1,properties:{offset:{format:`int64`,minimum:0,type:`integer`},revision:{maxLength:256,minLength:1,type:`string`}},required:[`offset`,`revision`],type:`object`},SFTPDownloadPartProgress:{additionalProperties:!1,properties:{index:{maximum:127,minimum:0,type:`integer`},totalBytes:{format:`int64`,minimum:0,type:`integer`},transferredBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`index`,`transferredBytes`,`totalBytes`],type:`object`,"x-sshc-less-than-or-equal":[[`transferredBytes`,`totalBytes`]]},SFTPEntry:{additionalProperties:!1,properties:{linkTarget:{type:`string`},mode:{type:`string`},modifiedAt:{format:`date-time`,type:`string`},name:{type:`string`},path:{type:`string`},revision:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`},targetType:{enum:[`file`,`directory`,`other`],type:`string`},type:{enum:[`file`,`directory`,`symlink`,`other`],type:`string`}},required:[`name`,`path`,`type`,`size`,`mode`,`modifiedAt`,`revision`],type:`object`},SFTPListing:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPEntry`},type:`array`},path:{type:`string`}},required:[`path`,`entries`],type:`object`},SFTPLocalListing:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPEntry`},type:`array`},home:{type:`string`},path:{type:`string`}},required:[`path`,`home`,`entries`],type:`object`},SFTPRenameRequest:{additionalProperties:!1,properties:{from:{type:`string`},to:{type:`string`}},required:[`from`,`to`],type:`object`},SFTPResumableUpload:{additionalProperties:!1,properties:{chunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},completedRanges:{items:{$ref:`#/components/schemas/SFTPUploadRange`},maxItems:65536,type:`array`},expectedRevision:{type:`string`},id:{type:`string`},offset:{format:`int64`,minimum:0,type:`integer`},parallelism:{maximum:128,minimum:1,type:`integer`},path:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`}},required:[`id`,`path`,`offset`,`size`,`expectedRevision`,`completedRanges`,`parallelism`,`chunkBytes`],type:`object`},SFTPSaveTextRequest:{additionalProperties:!1,properties:{contents:{maxLength:2097152,type:`string`},expectedRevision:{minLength:1,type:`string`}},required:[`contents`,`expectedRevision`],type:`object`},SFTPSearchResult:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPEntry`},maxItems:200,type:`array`},path:{type:`string`},query:{type:`string`},truncated:{type:`boolean`}},required:[`path`,`query`,`truncated`,`entries`],type:`object`},SFTPStartUploadRequest:{additionalProperties:!1,properties:{path:{type:`string`},size:{format:`int64`,maximum:549755813888,minimum:0,type:`integer`},sourceFingerprint:{pattern:`^tree-sha256:[0-9a-f]{64}$`,type:`string`}},required:[`path`,`size`,`sourceFingerprint`],type:`object`},SFTPTextFile:{additionalProperties:!1,properties:{contents:{maxLength:2097152,type:`string`},entry:{$ref:`#/components/schemas/SFTPEntry`},revision:{type:`string`}},required:[`entry`,`contents`,`revision`],type:`object`},SFTPTransfer:{additionalProperties:!1,properties:{bytes:{format:`int64`,minimum:0,type:`integer`},path:{type:`string`},revision:{type:`string`}},required:[`path`,`bytes`,`revision`],type:`object`},SFTPTransferJob:{additionalProperties:!1,properties:{alias:{maxLength:255,minLength:1,type:`string`},allowedActions:{items:{enum:[`pause`,`resume`,`retry`,`cancel`,`remove`],type:`string`},maxItems:3,type:`array`,uniqueItems:!0},attempt:{minimum:1,type:`integer`},batchId:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},batchKind:{enum:[`file`,`folder`],type:`string`},batchName:{maxLength:1024,minLength:1,type:`string`},bytesPerSecond:{format:`double`,minimum:0,type:`number`},createdAt:{format:`date-time`,type:`string`},direction:{enum:[`upload`,`download`,`remote`],type:`string`},downloadParts:{items:{$ref:`#/components/schemas/SFTPDownloadPartProgress`},maxItems:128,type:`array`},downloadRevision:{maxLength:256,type:`string`},expectedRevision:{maxLength:256,type:`string`},id:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},kind:{enum:[`file`,`folder`],type:`string`},lastModified:{format:`int64`,minimum:0,type:`integer`},name:{maxLength:1024,minLength:1,type:`string`},operation:{enum:[``,`copy`,`move`,`delete`,`get`,`put`],type:`string`},overwrite:{type:`boolean`},problem:{maxLength:128,type:`string`},remainingSeconds:{format:`int64`,minimum:-1,type:`integer`},remotePath:{minLength:1,type:`string`},sourceAlias:{maxLength:255,type:`string`},sourceFingerprint:{maxLength:128,type:`string`},sourcePath:{type:`string`},status:{enum:[`queued`,`running`,`paused`,`reattach`,`needs_overwrite`,`completed`,`failed`,`cancelled`],type:`string`},totalBytes:{format:`int64`,minimum:-1,type:`integer`},transferredBytes:{format:`int64`,minimum:0,type:`integer`},updatedAt:{format:`date-time`,type:`string`}},required:`id.batchId.batchName.batchKind.alias.sourceAlias.sourcePath.operation.direction.kind.name.remotePath.totalBytes.transferredBytes.bytesPerSecond.remainingSeconds.status.allowedActions.attempt.problem.lastModified.expectedRevision.sourceFingerprint.overwrite.downloadRevision.downloadParts.createdAt.updatedAt`.split(`.`),type:`object`},SFTPTransferJobActionRequest:{additionalProperties:!1,properties:{action:{enum:[`start`,`pause`,`resume`,`retry`,`cancel`,`progress`,`complete`,`fail`,`needs_overwrite`],type:`string`},problem:{maxLength:128,type:`string`},resetProgress:{type:`boolean`},totalBytes:{format:`int64`,minimum:0,type:`integer`},transferredBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`action`],type:`object`},SFTPTransferJobList:{additionalProperties:!1,properties:{clearCompletedAfterSeconds:{maximum:86400,minimum:0,type:`integer`},jobs:{items:{$ref:`#/components/schemas/SFTPTransferJob`},maxItems:200,type:`array`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},maxConcurrent:{maximum:8,minimum:1,type:`integer`},processingStopped:{type:`boolean`}},required:[`maxConcurrent`,`clearCompletedAfterSeconds`,`processingStopped`,`largeFileThresholdBytes`,`largeFileParallelism`,`largeFileChunkBytes`,`jobs`],type:`object`},SFTPTransferQueueMoveRequest:{additionalProperties:!1,properties:{move:{enum:[`up`,`down`,`top`,`bottom`],type:`string`}},required:[`move`],type:`object`},SFTPTransferSettingsRequest:{additionalProperties:!1,properties:{clearCompletedAfterSeconds:{maximum:86400,minimum:0,type:`integer`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},maxConcurrent:{maximum:8,minimum:1,type:`integer`},processingStopped:{type:`boolean`}},required:[`maxConcurrent`,`clearCompletedAfterSeconds`,`processingStopped`,`largeFileThresholdBytes`,`largeFileParallelism`,`largeFileChunkBytes`],type:`object`},SFTPUploadRange:{additionalProperties:!1,properties:{offset:{format:`int64`,minimum:0,type:`integer`},size:{format:`int64`,maximum:4294967296,minimum:1,type:`integer`}},required:[`offset`,`size`],type:`object`},SavePreview:{additionalProperties:!1,properties:{diffs:{items:{$ref:`#/components/schemas/FileDiff`},type:`array`},effective:{items:{$ref:`#/components/schemas/EffectiveDiff`},type:`array`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`},operation:{type:`string`}},required:[`operation`,`diffs`],type:`object`},SaveResult:{additionalProperties:!1,properties:{preview:{$ref:`#/components/schemas/SavePreview`},transactionId:{type:`string`},written:{items:{type:`string`},type:`array`}},required:[`transactionId`,`written`,`preview`],type:`object`},SetTerminalSessionTitleRequest:{additionalProperties:!1,properties:{title:{maxLength:64,minLength:1,nullable:!0,type:`string`}},required:[`title`],type:`object`},Setting:{additionalProperties:!1,properties:{keyword:{type:`string`},values:{items:{type:`string`},type:`array`}},required:[`keyword`,`values`],type:`object`},SettingsSaveResult:{additionalProperties:!1,properties:{transactionId:{type:`string`},written:{items:{type:`string`},type:`array`}},required:[`transactionId`,`written`],type:`object`},ShortcutPreset:{additionalProperties:!1,properties:{bindings:{additionalProperties:!1,properties:{copy:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},home:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},nextSession:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},palette:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},paste:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},previousSession:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},sftp:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},terminalSearch:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`}},required:[`palette`,`terminalSearch`,`copy`,`paste`,`nextSession`,`previousSession`,`home`,`sftp`],type:`object`},id:{pattern:`^[a-zA-Z0-9-]{1,64}$`,type:`string`},name:{maxLength:80,minLength:1,type:`string`}},required:[`id`,`name`,`bindings`],type:`object`},SnapshotSummary:{additionalProperties:!1,properties:{createdAt:{type:`string`},fileCount:{minimum:0,type:`integer`},snapshotBytes:{format:`int64`,minimum:0,type:`integer`},sourceBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`createdAt`,`fileCount`,`sourceBytes`,`snapshotBytes`],type:`object`},Snippet:{additionalProperties:!1,properties:{command:{maxLength:65536,minLength:1,type:`string`},createdAt:{format:`date-time`,type:`string`},description:{maxLength:2048,type:`string`},id:{type:`string`},name:{maxLength:96,minLength:1,type:`string`},updatedAt:{format:`date-time`,type:`string`},variables:{items:{$ref:`#/components/schemas/SnippetVariable`},maxItems:32,type:`array`}},required:[`name`,`description`,`command`,`variables`,`id`,`createdAt`,`updatedAt`],type:`object`},SnippetDraft:{additionalProperties:!1,properties:{command:{maxLength:65536,minLength:1,type:`string`},description:{maxLength:2048,type:`string`},name:{maxLength:96,minLength:1,type:`string`},variables:{items:{$ref:`#/components/schemas/SnippetVariable`},maxItems:32,type:`array`}},required:[`name`,`description`,`command`,`variables`],type:`object`},SnippetExecuteRequest:{additionalProperties:!1,description:`Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.`,properties:{aliases:{items:{type:`string`},maxItems:64,minItems:1,type:`array`},command:{maxLength:65536,minLength:1,type:`string`},concurrency:{maximum:8,minimum:1,type:`integer`},evidence:{type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/SnippetExecutionTarget`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`,`evidence`,`concurrency`],type:`object`,"x-sshc-exactly-one":[[`snippetId`,`command`],[`aliases`,`targets`]]},SnippetExecutionTarget:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},targetId:{maxLength:255,minLength:1,type:`string`}},required:[`targetId`,`alias`],type:`object`},SnippetJob:{additionalProperties:!1,properties:{finishedAt:{format:`date-time`,type:`string`},id:{type:`string`},results:{items:{$ref:`#/components/schemas/SnippetTargetResult`},type:`array`},startedAt:{format:`date-time`,type:`string`},status:{enum:[`running`,`completed`,`cancelled`],type:`string`}},required:[`id`,`status`,`startedAt`,`results`],type:`object`},SnippetLibrary:{additionalProperties:!1,properties:{snippets:{items:{$ref:`#/components/schemas/Snippet`},type:`array`},startup:{items:{$ref:`#/components/schemas/StartupSnippet`},type:`array`}},required:[`snippets`,`startup`],type:`object`},SnippetPreview:{additionalProperties:!1,properties:{actionExpiresAt:{format:`date-time`,type:`string`},actionToken:{type:`string`},evidence:{type:`string`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/SnippetPreviewTarget`},type:`array`}},required:[`snippetId`,`evidence`,`targets`,`actionToken`,`actionExpiresAt`],type:`object`},SnippetPreviewRequest:{additionalProperties:!1,description:`Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.`,properties:{aliases:{items:{type:`string`},maxItems:64,minItems:1,type:`array`},command:{maxLength:65536,minLength:1,type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/SnippetExecutionTarget`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`],type:`object`,"x-sshc-exactly-one":[[`snippetId`,`command`],[`aliases`,`targets`]]},SnippetPreviewTarget:{additionalProperties:!1,properties:{command:{type:`string`},target:{additionalProperties:!1,properties:{alias:{type:`string`},hostName:{type:`string`},port:{type:`string`},route:{items:{properties:{alias:{type:`string`},authentication:{items:{type:`string`},type:`array`},hostKeyAlgorithms:{items:{type:`string`},type:`array`},hostName:{type:`string`},identitiesOnly:{type:`boolean`},identityFiles:{items:{type:`string`},type:`array`},port:{type:`string`},proxyCommand:{type:`string`},strictHostKey:{type:`string`},user:{type:`string`}},required:[`alias`,`hostName`,`user`,`port`,`strictHostKey`,`authentication`],type:`object`},type:`array`},user:{type:`string`}},required:[`alias`,`hostName`,`user`,`port`],type:`object`},targetId:{type:`string`}},required:[`targetId`,`target`,`command`],type:`object`},SnippetTargetResult:{additionalProperties:!1,properties:{alias:{type:`string`},exitCode:{type:`integer`},problem:{type:`string`},status:{enum:[`queued`,`running`,`succeeded`,`failed`,`cancelled`],type:`string`},stderr:{type:`string`},stdout:{type:`string`},targetId:{type:`string`},truncated:{type:`boolean`}},required:[`targetId`,`alias`,`status`],type:`object`},SnippetVariable:{additionalProperties:!1,properties:{default:{type:`string`},description:{type:`string`},name:{type:`string`},required:{type:`boolean`},type:{enum:[`string`,`integer`,`boolean`,`secret`],type:`string`}},required:[`name`,`type`],type:`object`},Source:{additionalProperties:!1,properties:{absolute:{type:`string`},condition:{type:`string`},line:{type:`integer`},path:{type:`string`}},type:`object`},StartTerminalForwardRequest:{additionalProperties:!1,properties:{destination:{maxLength:512,type:`string`},kind:{pattern:`^(local|dynamic)$`,type:`string`},listenPort:{maximum:65535,minimum:1,type:`integer`}},required:[`kind`,`listenPort`],type:`object`},StartupSnippet:{additionalProperties:!1,properties:{alias:{type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`}},required:[`alias`,`snippetId`],type:`object`},StartupSnippetRequest:{additionalProperties:!1,properties:{inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`}},required:[`snippetId`,`inputs`],type:`object`},StoreCredentialRequest:{additionalProperties:!1,properties:{secret:{maxLength:1024,minLength:1,type:`string`}},required:[`secret`],type:`object`},StorePasswordRequest:{additionalProperties:!1,properties:{password:{maxLength:1024,minLength:1,type:`string`}},required:[`password`],type:`object`},SyncBucketObject:{additionalProperties:!1,properties:{key:{minLength:1,type:`string`},lastModified:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`}},required:[`key`,`size`],type:`object`},SyncBucketStatus:{additionalProperties:!1,properties:{checkedAt:{type:`string`},history:{items:{$ref:`#/components/schemas/SyncBucketObject`},maxItems:1e4,type:`array`},historyTruncated:{type:`boolean`},live:{$ref:`#/components/schemas/SyncBucketObject`},localIsLive:{type:`boolean`}},required:[`checkedAt`,`localIsLive`,`history`,`historyTruncated`],type:`object`},SyncConflict:{additionalProperties:!1,properties:{baseMode:{pattern:`^0[67]00$`,type:`string`},changedHere:{type:`boolean`},changedThere:{type:`boolean`},localMode:{pattern:`^0[67]00$`,type:`string`},path:{type:`string`},remoteMode:{pattern:`^0[67]00$`,type:`string`}},required:[`path`,`changedHere`,`changedThere`],type:`object`},SyncDirection:{enum:[`both`,`push`,`pull`],type:`string`},SyncExclusionCandidate:{additionalProperties:!1,properties:{ignored:{type:`boolean`},path:{maxLength:4096,minLength:1,type:`string`}},required:[`path`,`ignored`],type:`object`},SyncExclusions:{additionalProperties:!1,properties:{candidates:{items:{$ref:`#/components/schemas/SyncExclusionCandidate`},maxItems:4096,type:`array`},document:{maxLength:32768,type:`string`},usingDefaults:{type:`boolean`}},required:[`document`,`usingDefaults`,`candidates`],type:`object`},SyncExclusionsRequest:{additionalProperties:!1,properties:{document:{maxLength:32768,type:`string`}},required:[`document`],type:`object`},SyncHistory:{additionalProperties:!1,properties:{checkedAt:{type:`string`},downloadTruncated:{type:`boolean`},downloadedBytes:{format:`int64`,maximum:134217728,minimum:0,type:`integer`},headRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},historyTruncated:{type:`boolean`},revisions:{items:{$ref:`#/components/schemas/SyncHistoryRevision`},maxItems:50,type:`array`},skipped:{maximum:50,minimum:0,type:`integer`}},required:[`checkedAt`,`headRevision`,`revisions`,`historyTruncated`,`downloadTruncated`,`downloadedBytes`,`skipped`],type:`object`},SyncHistoryDiff:{additionalProperties:!1,properties:{added:{items:{type:`string`},type:`array`},downloadedBytes:{format:`int64`,minimum:0,type:`integer`},fromRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},modified:{items:{type:`string`},type:`array`},removed:{items:{type:`string`},type:`array`},toRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`}},required:[`fromRevision`,`toRevision`,`added`,`modified`,`removed`,`downloadedBytes`],type:`object`},SyncHistoryDiffRequest:{additionalProperties:!1,properties:{key:{maxLength:1024,minLength:1,type:`string`}},required:[`key`],type:`object`},SyncHistoryRelation:{enum:[`head`,`ancestor`,`branch`],type:`string`},SyncHistoryRevision:{additionalProperties:!1,properties:{createdAt:{type:`string`},fileCount:{maximum:4096,minimum:0,type:`integer`},key:{maxLength:1024,minLength:1,type:`string`},lastModified:{type:`string`},message:{maxLength:240,minLength:1,type:`string`},origin:{type:`string`},parentRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},relation:{$ref:`#/components/schemas/SyncHistoryRelation`},revision:{pattern:`^[0-9a-f]{64}$`,type:`string`},size:{format:`int64`,minimum:0,type:`integer`}},required:[`key`,`revision`,`message`,`createdAt`,`origin`,`fileCount`,`size`,`relation`],type:`object`},SyncKeyRequest:{additionalProperties:!1,properties:{confirmHistoryLoss:{type:`boolean`},key:{maxLength:1024,minLength:1,type:`string`}},type:`object`},SyncKeyResponse:{additionalProperties:!1,properties:{key:{type:`string`}},required:[`key`],type:`object`},SyncOperation:{additionalProperties:!1,properties:{completedAt:{type:`string`},downloadedBytes:{format:`int64`,minimum:0,type:`integer`},kind:{$ref:`#/components/schemas/SyncOperationKind`},objectCount:{minimum:0,type:`integer`},removed:{minimum:0,type:`integer`},summary:{$ref:`#/components/schemas/SnapshotSummary`},uploadedBytes:{format:`int64`,minimum:0,type:`integer`},written:{minimum:0,type:`integer`}},required:[`kind`,`summary`,`completedAt`],type:`object`},SyncOperationKind:{enum:[`push`,`apply`],type:`string`},SyncPushDraft:{additionalProperties:!1,properties:{added:{maximum:4096,minimum:0,type:`integer`},message:{maxLength:240,minLength:1,type:`string`},modified:{maximum:4096,minimum:0,type:`integer`},removed:{maximum:4096,minimum:0,type:`integer`}},required:[`message`,`added`,`modified`,`removed`],type:`object`},SyncPushRequest:{additionalProperties:!1,properties:{message:{maxLength:240,minLength:1,type:`string`}},required:[`message`],type:`object`},SyncSettingsRequest:{additionalProperties:!1,properties:{accessKeyId:{maxLength:512,minLength:1,type:`string`},bucket:{maxLength:255,minLength:1,type:`string`},direction:{$ref:`#/components/schemas/SyncDirection`},endpoint:{maxLength:2048,minLength:1,type:`string`},path:{maxLength:255,type:`string`},region:{maxLength:64,type:`string`},secretAccessKey:{maxLength:512,minLength:1,type:`string`}},required:[`endpoint`,`bucket`,`accessKeyId`,`secretAccessKey`,`direction`],type:`object`},SyncSetupCheckRequest:{additionalProperties:!1,properties:{accessKeyId:{maxLength:512,minLength:1,type:`string`},bucket:{maxLength:255,minLength:1,type:`string`},endpoint:{maxLength:2048,minLength:1,type:`string`},path:{maxLength:255,type:`string`},region:{maxLength:64,type:`string`},reuseCredentials:{type:`boolean`},secretAccessKey:{maxLength:512,minLength:1,type:`string`}},required:[`endpoint`,`bucket`,`reuseCredentials`],type:`object`},SyncSetupCheckResponse:{additionalProperties:!1,properties:{checkedAt:{type:`string`},etag:{maxLength:1024,minLength:1,type:`string`},historyPresent:{type:`boolean`},state:{$ref:`#/components/schemas/SyncSetupTargetState`}},required:[`state`,`historyPresent`,`checkedAt`],type:`object`},SyncSetupRequest:{additionalProperties:!1,properties:{accessKeyId:{maxLength:512,minLength:1,type:`string`},bucket:{maxLength:255,minLength:1,type:`string`},direction:{$ref:`#/components/schemas/SyncDirection`},endpoint:{maxLength:2048,minLength:1,type:`string`},expectedETag:{maxLength:1024,minLength:1,type:`string`},expectedState:{$ref:`#/components/schemas/SyncSetupTargetState`},historyPresent:{type:`boolean`},key:{maxLength:1024,type:`string`},path:{maxLength:255,type:`string`},region:{maxLength:64,type:`string`},reuseCredentials:{type:`boolean`},reuseKey:{type:`boolean`},secretAccessKey:{maxLength:512,minLength:1,type:`string`}},required:[`endpoint`,`bucket`,`direction`,`expectedState`,`historyPresent`,`key`,`reuseCredentials`,`reuseKey`],type:`object`},SyncSetupResponse:{additionalProperties:!1,properties:{generatedKey:{minLength:1,type:`string`},status:{$ref:`#/components/schemas/SyncStatus`}},required:[`status`],type:`object`},SyncSetupTargetState:{enum:[`empty`,`existing`,`incomplete`],type:`string`},SyncStatus:{additionalProperties:!1,properties:{accessKeySuffix:{maxLength:5,type:`string`},auto:{$ref:`#/components/schemas/AutoSync`},bucket:{type:`string`},configured:{type:`boolean`},direction:{$ref:`#/components/schemas/SyncDirection`},endpoint:{type:`string`},fileCount:{type:`integer`},keyConfigured:{type:`boolean`},lastOperation:{$ref:`#/components/schemas/SyncOperation`},lastSyncedAt:{type:`string`},locked:{type:`boolean`},origin:{type:`string`},path:{type:`string`},region:{type:`string`},synced:{type:`boolean`}},required:[`configured`,`locked`,`endpoint`,`bucket`,`synced`,`direction`,`keyConfigured`,`auto`],type:`object`},TOTPCodeSet:{additionalProperties:!1,properties:{current:{pattern:`^[0-9]{6,8}$`,type:`string`},next:{pattern:`^[0-9]{6,8}$`,type:`string`},periodSeconds:{maximum:300,minimum:5,type:`integer`},previous:{pattern:`^[0-9]{6,8}$`,type:`string`},remainingSeconds:{maximum:300,minimum:1,type:`integer`}},required:[`previous`,`current`,`next`,`periodSeconds`,`remainingSeconds`],type:`object`},TerminalAppearance:{additionalProperties:!1,properties:{background:{maxLength:128,type:`string`},backgroundTint:{maximum:100,minimum:0,type:`integer`},font:{maxLength:64,type:`string`},palette:{maxLength:64,type:`string`}},type:`object`},TerminalBackground:{additionalProperties:!1,properties:{bytes:{type:`integer`},name:{type:`string`},type:{type:`string`}},required:[`name`,`bytes`,`type`],type:`object`},TerminalBackgroundCapacityRequest:{additionalProperties:!1,properties:{capacityMiB:{maximum:1024,minimum:1,type:`integer`}},required:[`capacityMiB`],type:`object`},TerminalBackgroundList:{additionalProperties:!1,properties:{backgrounds:{items:{$ref:`#/components/schemas/TerminalBackground`},type:`array`},capacityBytes:{type:`integer`},remainingBytes:{type:`integer`},usedBytes:{type:`integer`}},required:[`backgrounds`,`usedBytes`,`capacityBytes`,`remainingBytes`],type:`object`},TerminalCommandDispatchRequest:{additionalProperties:!1,properties:{command:{maxLength:4095,minLength:1,type:`string`},evidence:{maxLength:64,minLength:64,type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`},submit:{description:`Send Enter after the command. Defaults to true.`,type:`boolean`},targets:{items:{$ref:`#/components/schemas/TerminalCommandTargetRequest`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`,`targets`,`evidence`],type:`object`},TerminalCommandDispatchResponse:{additionalProperties:!1,properties:{results:{items:{$ref:`#/components/schemas/TerminalCommandResult`},type:`array`}},required:[`results`],type:`object`},TerminalCommandPreview:{additionalProperties:!1,properties:{actionExpiresAt:{type:`string`},actionToken:{type:`string`},evidence:{type:`string`},reviewEvidence:{description:`Stable evidence for the displayed redacted command and exact targets, independent of whether Enter will be sent.`,type:`string`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/TerminalCommandPreviewTarget`},type:`array`}},required:[`snippetId`,`evidence`,`reviewEvidence`,`actionToken`,`actionExpiresAt`,`targets`],type:`object`},TerminalCommandPreviewRequest:{additionalProperties:!1,properties:{command:{maxLength:4095,minLength:1,type:`string`},expectedReviewEvidence:{description:`Refuse to issue an action if the redacted command or exact target changed since the displayed passive preview.`,maxLength:64,minLength:64,type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},issueAction:{description:`Issue a one-time execution token. Defaults to true for compatibility; passive previews should set false.`,type:`boolean`},revealCommand:{description:`Return the expanded command for an explicit insert, run, or copy action. Normal previews remain redacted.`,type:`boolean`},snippetId:{type:`string`},submit:{description:`Bind the preview to sending Enter after the command. Defaults to true.`,type:`boolean`},targets:{items:{$ref:`#/components/schemas/TerminalCommandTargetRequest`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`,`targets`],type:`object`},TerminalCommandPreviewTarget:{additionalProperties:!1,properties:{alias:{type:`string`},command:{type:`string`},sessionId:{type:`string`},targetId:{type:`string`},title:{type:`string`}},required:[`targetId`,`sessionId`,`alias`,`title`,`command`],type:`object`},TerminalCommandResult:{additionalProperties:!1,properties:{alias:{type:`string`},problem:{type:`string`},sessionId:{type:`string`},status:{enum:[`delivered`,`failed`],type:`string`},targetId:{type:`string`},title:{type:`string`}},required:[`targetId`,`sessionId`,`alias`,`title`,`status`],type:`object`},TerminalCommandTargetRequest:{additionalProperties:!1,properties:{sessionId:{maxLength:64,minLength:1,type:`string`},targetId:{maxLength:255,minLength:1,type:`string`}},required:[`targetId`,`sessionId`],type:`object`},TerminalConnectionProgress:{additionalProperties:!1,properties:{alias:{type:`string`},hop:{minimum:1,type:`integer`},hops:{minimum:1,type:`integer`},hostName:{type:`string`},phase:{enum:[`dialing`,`host_key`,`authenticating`,`authenticated`,`opening_session`],type:`string`},user:{type:`string`}},required:[`phase`,`alias`,`hostName`,`user`,`hop`,`hops`],type:`object`,"x-sshc-less-than-or-equal":[[`hop`,`hops`]]},TerminalControlCursor:{additionalProperties:!1,properties:{end:{description:`Monotonic end of the raw transcript; greater than next means unread bytes remain.`,format:`uint64`,minimum:0,type:`integer`},next:{format:`uint64`,minimum:0,type:`integer`},requested:{format:`uint64`,minimum:0,type:`integer`},start:{format:`uint64`,minimum:0,type:`integer`},truncated:{type:`boolean`}},required:[`requested`,`start`,`next`,`end`,`truncated`],type:`object`},TerminalControlResponse:{additionalProperties:!1,properties:{cursor:{$ref:`#/components/schemas/TerminalControlCursor`},generation:{format:`uint64`,minimum:1,type:`integer`},output:{description:`Bounded transcript with terminal escape and control sequences removed.`,type:`string`},session:{$ref:`#/components/schemas/TerminalSession`},state:{enum:[`connecting`,`connected`,`reconnecting`,`exited`],type:`string`}},required:[`session`,`generation`,`state`,`cursor`,`output`],type:`object`},TerminalExit:{additionalProperties:!1,properties:{at:{type:`string`},code:{type:`integer`},signal:{type:`string`}},required:[`code`,`signal`,`at`],type:`object`},TerminalForward:{additionalProperties:!1,properties:{id:{maxLength:64,minLength:1,type:`string`},kind:{pattern:`^(local|dynamic|agent)$`,type:`string`},listen:{type:`string`},problem:{type:`string`},temporary:{type:`boolean`},to:{type:`string`}},required:[`id`,`kind`,`listen`,`to`,`problem`,`temporary`],type:`object`},TerminalNotification:{additionalProperties:!1,properties:{body:{type:`string`},occurredAt:{format:`date-time`,type:`string`},title:{type:`string`}},required:[`title`,`body`,`occurredAt`],type:`object`},TerminalPresentation:{additionalProperties:!1,properties:{displayTitle:{type:`string`},titlePinned:{type:`boolean`},titleSource:{enum:[`user`,`terminal`,`connection`,`fallback`],type:`string`}},required:[`displayTitle`,`titleSource`,`titlePinned`],type:`object`},TerminalReconnect:{additionalProperties:!1,properties:{attempt:{maximum:5,minimum:1,type:`integer`},limit:{maximum:5,minimum:1,type:`integer`},problem:{type:`string`},retryAt:{format:`date-time`,type:`string`}},required:[`attempt`,`limit`,`retryAt`,`problem`],type:`object`,"x-sshc-less-than-or-equal":[[`attempt`,`limit`]]},TerminalSession:{additionalProperties:!1,properties:{alias:{type:`string`},exited:{$ref:`#/components/schemas/TerminalExit`},forwards:{items:{$ref:`#/components/schemas/TerminalForward`},type:`array`},id:{type:`string`},kind:{enum:[`ssh`,`shell`],type:`string`},lastNotification:{$ref:`#/components/schemas/TerminalNotification`},notificationVersion:{minimum:0,type:`integer`},presentation:{$ref:`#/components/schemas/TerminalPresentation`},problem:{type:`string`},progress:{$ref:`#/components/schemas/TerminalConnectionProgress`},reconnect:{$ref:`#/components/schemas/TerminalReconnect`},startedAt:{type:`string`},state:{enum:[`connecting`,`connected`,`reconnecting`,`exited`],type:`string`},title:{type:`string`}},required:[`id`,`kind`,`title`,`startedAt`,`state`,`problem`],type:`object`},TerminalSessionList:{additionalProperties:!1,properties:{maxSessions:{maximum:200,minimum:0,type:`integer`},sessions:{items:{$ref:`#/components/schemas/TerminalSession`},type:`array`}},required:[`sessions`,`maxSessions`],type:`object`},TerminalSettings:{additionalProperties:!1,properties:{appearance:{$ref:`#/components/schemas/TerminalAppearance`},browserScrollbackLines:{maximum:1e5,minimum:1e3,type:`integer`},copyOnSelect:{type:`boolean`},fontSize:{maximum:32,minimum:8,type:`integer`},jisYenBackslash:{type:`boolean`},localShellProfile:{pattern:`^[a-z0-9-]{1,64}$`,type:`string`},maxSessions:{maximum:200,minimum:1,type:`integer`},osc52:{type:`boolean`},reconnect:{maximum:5,minimum:0,type:`integer`},rightClickPaste:{type:`boolean`},scrollbackBytes:{maximum:4194304,minimum:16384,type:`integer`},startDirectory:{maxLength:4096,type:`string`},verbosity:{maximum:3,minimum:0,type:`integer`},webgl:{type:`boolean`}},type:`object`},TerminalStreamTicket:{additionalProperties:!1,properties:{streamTicket:{type:`string`}},required:[`streamTicket`],type:`object`},TerminalWorkspace:{additionalProperties:!1,properties:{createdAt:{format:`date-time`,type:`string`},focusedPaneId:{type:`string`},id:{type:`string`},layout:{$ref:`#/components/schemas/WorkspaceNode`},name:{maxLength:80,minLength:1,type:`string`},updatedAt:{format:`date-time`,type:`string`}},required:[`name`,`layout`,`focusedPaneId`,`id`,`createdAt`,`updatedAt`],type:`object`},TrashEntrySummary:{additionalProperties:!1,properties:{ageDays:{type:`integer`},blockers:{items:{type:`string`},type:`array`},deletedAt:{type:`string`},files:{items:{$ref:`#/components/schemas/TrashFileSummary`},type:`array`},id:{type:`string`},restorable:{type:`boolean`},stale:{type:`boolean`}},required:[`id`,`deletedAt`,`ageDays`,`stale`,`files`,`restorable`,`blockers`],type:`object`},TrashFileSummary:{additionalProperties:!1,properties:{fingerprint:{type:`string`},kind:{type:`string`},originalRelativePath:{type:`string`},permission:{type:`string`},trashRelativePath:{type:`string`}},required:[`originalRelativePath`,`trashRelativePath`,`kind`,`fingerprint`,`permission`],type:`object`},TrashKeyResponse:{additionalProperties:!1,properties:{entryId:{type:`string`},files:{items:{$ref:`#/components/schemas/TrashFileSummary`},type:`array`},skipped:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`entryId`,`files`,`skipped`,`transactionId`],type:`object`},TrashListResponse:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/TrashEntrySummary`},type:`array`},retentionDays:{type:`integer`}},required:[`entries`,`retentionDays`],type:`object`},UnreadableFile:{additionalProperties:!1,properties:{reason:{type:`string`},relativePath:{type:`string`}},required:[`relativePath`,`reason`],type:`object`},UnresolvedReference:{additionalProperties:!1,properties:{configPath:{type:`string`},directive:{type:`string`},line:{type:`integer`},reason:{type:`string`},value:{type:`string`}},required:[`directive`,`value`,`configPath`,`line`,`reason`],type:`object`},UpdateConnectionKeyPassphrase:{discriminator:{mapping:{set_dedicated:`#/components/schemas/ConnectionKeyPassphraseSetDedicated`,unchanged:`#/components/schemas/ConnectionKeyPassphraseUnchanged`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/ConnectionKeyPassphraseUnchanged`},{$ref:`#/components/schemas/ConnectionKeyPassphraseSetDedicated`}],"x-go-type":`json.RawMessage`},UpdateConnectionPassword:{discriminator:{mapping:{confirm_route:`#/components/schemas/UpdatePasswordConfirmRoute`,dedicated_password:`#/components/schemas/CreateDedicatedPasswordAuthentication`,new_shared_password:`#/components/schemas/CreateNewSharedPasswordAuthentication`,remove:`#/components/schemas/UpdatePasswordRemove`,saved_password:`#/components/schemas/CreateSavedPasswordAuthentication`,unchanged:`#/components/schemas/UpdatePasswordUnchanged`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/UpdatePasswordUnchanged`},{$ref:`#/components/schemas/CreateDedicatedPasswordAuthentication`},{$ref:`#/components/schemas/CreateSavedPasswordAuthentication`},{$ref:`#/components/schemas/CreateNewSharedPasswordAuthentication`},{$ref:`#/components/schemas/UpdatePasswordConfirmRoute`},{$ref:`#/components/schemas/UpdatePasswordRemove`}],"x-go-type":`json.RawMessage`},UpdateConnectionRequest:{additionalProperties:!1,properties:{base:{maxLength:1048576,type:`string`},hostName:{$ref:`#/components/schemas/ConnectionStringChange`},identity:{$ref:`#/components/schemas/HostIdentity`},identityFile:{$ref:`#/components/schemas/ConnectionIdentityFileChange`},keyPassphrase:{$ref:`#/components/schemas/UpdateConnectionKeyPassphrase`},password:{$ref:`#/components/schemas/UpdateConnectionPassword`},port:{$ref:`#/components/schemas/ConnectionPortChange`},totp:{$ref:`#/components/schemas/UpdateConnectionTOTP`},user:{$ref:`#/components/schemas/ConnectionStringChange`}},required:[`identity`,`base`,`password`,`keyPassphrase`,`totp`],type:`object`},UpdateConnectionTOTP:{discriminator:{mapping:{confirm_route:`#/components/schemas/UpdateTOTPConfirmRoute`,remove:`#/components/schemas/UpdateTOTPRemove`,saved_totp:`#/components/schemas/UpdateTOTPSaved`,unchanged:`#/components/schemas/UpdateTOTPUnchanged`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/UpdateTOTPUnchanged`},{$ref:`#/components/schemas/UpdateTOTPSaved`},{$ref:`#/components/schemas/UpdateTOTPConfirmRoute`},{$ref:`#/components/schemas/UpdateTOTPRemove`}],"x-go-type":`json.RawMessage`},UpdateCredentialRequest:{additionalProperties:!1,properties:{name:{maxLength:128,minLength:1,type:`string`},secret:{maxLength:1024,minLength:1,type:`string`}},required:[`name`,`secret`],type:`object`},UpdatePasswordConfirmRoute:{additionalProperties:!1,properties:{kind:{enum:[`confirm_route`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdatePasswordRemove:{additionalProperties:!1,properties:{kind:{enum:[`remove`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdatePasswordUnchanged:{additionalProperties:!1,properties:{kind:{enum:[`unchanged`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdateStatus:{additionalProperties:!1,properties:{available:{type:`boolean`},current:{type:`string`},latest:{type:`string`},pageUrl:{type:`string`}},required:[`current`,`available`],type:`object`},UpdateTOTPConfirmRoute:{additionalProperties:!1,properties:{kind:{enum:[`confirm_route`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdateTOTPRemove:{additionalProperties:!1,properties:{kind:{enum:[`remove`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdateTOTPSaved:{additionalProperties:!1,properties:{credential:{maxLength:128,minLength:1,type:`string`},kind:{enum:[`saved_totp`],type:`string`,"x-go-type":`string`}},required:[`kind`,`credential`],type:`object`},UpdateTOTPUnchanged:{additionalProperties:!1,properties:{kind:{enum:[`unchanged`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},ValueSource:{additionalProperties:!1,properties:{condition:{type:`string`},keyword:{type:`string`},kind:{type:`string`},line:{type:`integer`},path:{type:`string`},value:{type:`string`},winner:{type:`boolean`}},required:[`keyword`,`value`,`path`,`line`,`condition`,`kind`,`winner`],type:`object`},VaultAutoLockSettings:{additionalProperties:!1,properties:{mode:{description:`idleは無操作時間後、restartは手動ロックまたはengine終了時だけロックする。`,enum:[`idle`,`restart`],type:`string`},unit:{enum:[`minutes`,`hours`],type:`string`},value:{maximum:999,minimum:1,type:`integer`}},required:[`mode`],type:`object`},WorkspaceDefinition:{additionalProperties:!1,properties:{focusedPaneId:{type:`string`},layout:{$ref:`#/components/schemas/WorkspaceNode`},name:{maxLength:80,minLength:1,type:`string`}},required:[`name`,`layout`,`focusedPaneId`],type:`object`},WorkspaceList:{additionalProperties:!1,properties:{workspaces:{items:{$ref:`#/components/schemas/TerminalWorkspace`},type:`array`}},required:[`workspaces`],type:`object`},WorkspaceNode:{additionalProperties:!1,properties:{pane:{$ref:`#/components/schemas/WorkspacePane`},split:{$ref:`#/components/schemas/WorkspaceSplit`}},type:`object`,"x-sshc-exactly-one":[[`pane`,`split`]]},WorkspacePane:{additionalProperties:!1,properties:{alias:{type:`string`},id:{type:`string`},kind:{description:`Omitted by legacy SSH-only workspaces and interpreted as ssh.`,enum:[`ssh`,`shell`],type:`string`}},required:[`id`,`alias`],type:`object`},WorkspaceReconnectPane:{additionalProperties:!1,properties:{alias:{type:`string`},kind:{enum:[`ssh`,`shell`],type:`string`},paneId:{type:`string`},state:{enum:[`reconnect_required`],type:`string`}},required:[`paneId`,`alias`,`kind`,`state`],type:`object`},WorkspaceRestorePlan:{additionalProperties:!1,properties:{panes:{items:{$ref:`#/components/schemas/WorkspaceReconnectPane`},type:`array`},workspace:{$ref:`#/components/schemas/TerminalWorkspace`}},required:[`workspace`,`panes`],type:`object`},WorkspaceSplit:{additionalProperties:!1,properties:{direction:{enum:[`horizontal`,`vertical`],type:`string`},first:{$ref:`#/components/schemas/WorkspaceNode`},ratio:{maximum:90,minimum:10,type:`integer`},second:{$ref:`#/components/schemas/WorkspaceNode`}},required:[`direction`,`ratio`,`first`,`second`],type:`object`}},s=[{method:`POST`,path:`/api/v1/actions`,requestRequired:!0,request:{$ref:`#/components/schemas/IssueActionRequest`},responses:{201:{$ref:`#/components/schemas/IssueActionResponse`}}},{method:`GET`,path:`/api/v1/config/file`,responses:{200:{$ref:`#/components/schemas/FileContents`}}},{method:`POST`,path:`/api/v1/config/groups/delete`,requestRequired:!0,request:{$ref:`#/components/schemas/GroupDeleteRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`POST`,path:`/api/v1/config/groups/rename`,requestRequired:!0,request:{$ref:`#/components/schemas/GroupRenameRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`GET`,path:`/api/v1/config/host`,responses:{200:{$ref:`#/components/schemas/HostDetail`}}},{method:`GET`,path:`/api/v1/config/overview`,responses:{200:{$ref:`#/components/schemas/Overview`}}},{method:`POST`,path:`/api/v1/config/preview`,requestRequired:!0,request:{$ref:`#/components/schemas/EditRequest`},responses:{200:{$ref:`#/components/schemas/SavePreview`}}},{method:`POST`,path:`/api/v1/config/save`,requestRequired:!0,request:{$ref:`#/components/schemas/EditRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`PATCH`,path:`/api/v1/connections`,requestRequired:!0,request:{$ref:`#/components/schemas/UpdateConnectionRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`POST`,path:`/api/v1/connections`,requestRequired:!0,request:{$ref:`#/components/schemas/CreateConnectionRequest`},responses:{201:{$ref:`#/components/schemas/CreateConnectionResponse`}}},{method:`GET`,path:`/api/v1/connections/recent`,responses:{200:{$ref:`#/components/schemas/RecentConnectionList`}}},{method:`GET`,path:`/api/v1/credentials`,responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`POST`,path:`/api/v1/credentials/totp/{name}/codes`,responses:{200:{$ref:`#/components/schemas/TOTPCodeSet`}}},{method:`PUT`,path:`/api/v1/credentials/{kind}/assign`,requestRequired:!0,request:{$ref:`#/components/schemas/AssignCredentialRequest`},responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`DELETE`,path:`/api/v1/credentials/{kind}/assign/{subject}`,responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`DELETE`,path:`/api/v1/credentials/{kind}/{name}`,responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`PATCH`,path:`/api/v1/credentials/{kind}/{name}`,requestRequired:!0,request:{$ref:`#/components/schemas/UpdateCredentialRequest`},responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`PUT`,path:`/api/v1/credentials/{kind}/{name}`,requestRequired:!0,request:{$ref:`#/components/schemas/StoreCredentialRequest`},responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`POST`,path:`/api/v1/credentials/{kind}/{name}/reveal`,responses:{200:{$ref:`#/components/schemas/RevealCredentialResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/authentication`,requestRequired:!0,request:{$ref:`#/components/schemas/AuthenticationRequest`},responses:{200:{$ref:`#/components/schemas/AuthenticationResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/config`,responses:{200:{$ref:`#/components/schemas/ConfigCheckResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/effective`,requestRequired:!0,request:{$ref:`#/components/schemas/AliasRequest`},responses:{200:{$ref:`#/components/schemas/EffectiveResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/reachability`,requestRequired:!0,request:{$ref:`#/components/schemas/AliasRequest`},responses:{200:{$ref:`#/components/schemas/ReachabilityResponse`}}},{method:`GET`,path:`/api/v1/health`,responses:{200:{$ref:`#/components/schemas/HealthResponse`}}},{method:`GET`,path:`/api/v1/history`,responses:{200:{$ref:`#/components/schemas/HistoryList`}}},{method:`POST`,path:`/api/v1/history/recover`,requestRequired:!0,request:{$ref:`#/components/schemas/RecoverRequest`},responses:{200:{$ref:`#/components/schemas/RecoverResponse`}}},{method:`POST`,path:`/api/v1/history/restore`,requestRequired:!0,request:{$ref:`#/components/schemas/RestoreRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`GET`,path:`/api/v1/keys`,responses:{200:{$ref:`#/components/schemas/KeyInventoryResponse`}}},{method:`POST`,path:`/api/v1/keys`,requestRequired:!0,request:{$ref:`#/components/schemas/GenerateKeyRequest`},responses:{201:{$ref:`#/components/schemas/GenerateKeyResponse`}}},{method:`GET`,path:`/api/v1/keys/algorithms`,responses:{200:{$ref:`#/components/schemas/KeyAlgorithmsResponse`}}},{method:`POST`,path:`/api/v1/keys/hardware-command`,requestRequired:!0,request:{$ref:`#/components/schemas/HardwareCommandRequest`},responses:{200:{$ref:`#/components/schemas/HardwareCommandResponse`}}},{method:`DELETE`,path:`/api/v1/keys/{keyId}/agent`,responses:{200:{$ref:`#/components/schemas/AgentIdentitiesResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/agent`,requestRequired:!0,request:{$ref:`#/components/schemas/RegisterKeyRequest`},responses:{200:{$ref:`#/components/schemas/RegisterKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/location`,requestRequired:!0,request:{$ref:`#/components/schemas/RelocateKeyRequest`},responses:{200:{$ref:`#/components/schemas/RelocateKeyResponse`},409:{$ref:`#/components/schemas/RelocateKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/passphrase`,requestRequired:!0,request:{$ref:`#/components/schemas/ChangePassphraseRequest`},responses:{200:{$ref:`#/components/schemas/ChangePassphraseResponse`}}},{method:`GET`,path:`/api/v1/keys/{keyId}/public`,responses:{200:{$ref:`#/components/schemas/PublicKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/reveal`,responses:{200:{$ref:`#/components/schemas/RevealPrivateKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/trash`,responses:{200:{$ref:`#/components/schemas/TrashKeyResponse`}}},{method:`GET`,path:`/api/v1/known-hosts`,responses:{200:{$ref:`#/components/schemas/KnownHostsResponse`}}},{method:`POST`,path:`/api/v1/known-hosts/add`,requestRequired:!0,request:{$ref:`#/components/schemas/KnownHostsAddRequest`},responses:{200:{$ref:`#/components/schemas/KnownHostsChangeResponse`}}},{method:`POST`,path:`/api/v1/known-hosts/delete`,requestRequired:!0,request:{$ref:`#/components/schemas/KnownHostsDeleteRequest`},responses:{200:{$ref:`#/components/schemas/KnownHostsChangeResponse`}}},{method:`POST`,path:`/api/v1/known-hosts/scan`,requestRequired:!0,request:{$ref:`#/components/schemas/KnownHostsScanRequest`},responses:{200:{$ref:`#/components/schemas/KnownHostsScanResponse`}}},{method:`GET`,path:`/api/v1/metadata`,responses:{200:{$ref:`#/components/schemas/Metadata`}}},{method:`PUT`,path:`/api/v1/metadata/engine`,requestRequired:!0,request:{$ref:`#/components/schemas/EngineSettings`},responses:{200:{$ref:`#/components/schemas/SettingsSaveResult`}}},{method:`PUT`,path:`/api/v1/metadata/shortcuts`,requestRequired:!0,request:{additionalProperties:!1,properties:{base:{items:{$ref:`#/components/schemas/ShortcutPreset`},maxItems:64,type:`array`},presets:{items:{$ref:`#/components/schemas/ShortcutPreset`},maxItems:64,type:`array`}},required:[`base`,`presets`],type:`object`},responses:{200:{$ref:`#/components/schemas/SettingsSaveResult`}}},{method:`PUT`,path:`/api/v1/metadata/terminal`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalSettings`},responses:{200:{$ref:`#/components/schemas/SettingsSaveResult`}}},{method:`GET`,path:`/api/v1/passwords`,responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/change`,requestRequired:!0,request:{$ref:`#/components/schemas/ChangeMasterPasswordRequest`},responses:{200:{$ref:`#/components/schemas/ChangeMasterPasswordResult`}}},{method:`POST`,path:`/api/v1/passwords/initialise`,requestRequired:!0,request:{$ref:`#/components/schemas/PassphraseRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/lock`,responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/recover-compatible-backup`,requestRequired:!0,request:{$ref:`#/components/schemas/PassphraseRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/reset-unsupported`,requestRequired:!0,request:{$ref:`#/components/schemas/ResetUnsupportedVaultRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/unlock`,requestRequired:!0,request:{$ref:`#/components/schemas/PassphraseRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`DELETE`,path:`/api/v1/passwords/{alias}`,responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`PUT`,path:`/api/v1/passwords/{alias}`,requestRequired:!0,request:{$ref:`#/components/schemas/StorePasswordRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`GET`,path:`/api/v1/passwords/{alias}/eligibility`,responses:{200:{$ref:`#/components/schemas/PasswordEligibility`}}},{method:`POST`,path:`/api/v1/remote-keys/plan`,requestRequired:!0,request:{$ref:`#/components/schemas/RemoteKeyPlanRequest`},responses:{200:{$ref:`#/components/schemas/RemoteKeyPlan`}}},{method:`POST`,path:`/api/v1/remote-keys/register`,requestRequired:!0,request:{$ref:`#/components/schemas/RemoteKeyRegisterRequest`},responses:{200:{$ref:`#/components/schemas/RemoteKeyRegisterResponse`}}},{method:`POST`,path:`/api/v1/session/bootstrap`,responses:{200:{$ref:`#/components/schemas/BootstrapResponse`}}},{method:`POST`,path:`/api/v1/session/recover`,responses:{200:{$ref:`#/components/schemas/BootstrapResponse`}}},{method:`POST`,path:`/api/v1/session/renew`,responses:{200:{$ref:`#/components/schemas/BootstrapResponse`}}},{method:`GET`,path:`/api/v1/sftp/compare`,responses:{200:{$ref:`#/components/schemas/SFTPDirectoryComparison`}}},{method:`GET`,path:`/api/v1/sftp/local/entries`,responses:{200:{$ref:`#/components/schemas/SFTPLocalListing`}}},{method:`GET`,path:`/api/v1/sftp/transfers`,responses:{200:{$ref:`#/components/schemas/SFTPTransferJobList`}}},{method:`POST`,path:`/api/v1/sftp/transfers`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPCreateTransferJobRequest`},responses:{201:{$ref:`#/components/schemas/SFTPTransferJob`}}},{method:`DELETE`,path:`/api/v1/sftp/transfers/finished`,responses:{},noContent:[`204`]},{method:`PUT`,path:`/api/v1/sftp/transfers/settings`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPTransferSettingsRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJobList`}}},{method:`DELETE`,path:`/api/v1/sftp/transfers/{id}`,responses:{},noContent:[`204`]},{method:`POST`,path:`/api/v1/sftp/transfers/{id}/actions`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPTransferJobActionRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJob`}}},{method:`POST`,path:`/api/v1/sftp/transfers/{id}/download-checkpoint`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPDownloadCheckpointRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJob`}}},{method:`POST`,path:`/api/v1/sftp/transfers/{id}/queue-position`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPTransferQueueMoveRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJobList`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/archive`,responses:{}},{method:`GET`,path:`/api/v1/sftp/{alias}/download`,responses:{},noContent:[`204`]},{method:`GET`,path:`/api/v1/sftp/{alias}/entries`,responses:{200:{$ref:`#/components/schemas/SFTPListing`}}},{method:`POST`,path:`/api/v1/sftp/{alias}/entries`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPCreateEntryRequest`},responses:{201:{$ref:`#/components/schemas/SFTPEntry`}}},{method:`DELETE`,path:`/api/v1/sftp/{alias}/entry`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`PATCH`,path:`/api/v1/sftp/{alias}/entry`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPRenameRequest`},responses:{200:{$ref:`#/components/schemas/SFTPEntry`}}},{method:`PATCH`,path:`/api/v1/sftp/{alias}/mode`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPChmodRequest`},responses:{200:{$ref:`#/components/schemas/SFTPEntry`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/preview`,responses:{}},{method:`GET`,path:`/api/v1/sftp/{alias}/search`,responses:{200:{$ref:`#/components/schemas/SFTPSearchResult`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/stats`,responses:{200:{$ref:`#/components/schemas/SFTPDirectoryStats`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/text`,responses:{200:{$ref:`#/components/schemas/SFTPTextFile`}}},{method:`PUT`,path:`/api/v1/sftp/{alias}/text`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPSaveTextRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTextFile`}}},{method:`DELETE`,path:`/api/v1/sftp/{alias}/uploads/{id}`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`PATCH`,path:`/api/v1/sftp/{alias}/uploads/{id}`,requestRequired:!0,responses:{200:{$ref:`#/components/schemas/SFTPResumableUpload`}}},{method:`POST`,path:`/api/v1/sftp/{alias}/uploads/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPStartUploadRequest`},responses:{200:{$ref:`#/components/schemas/SFTPResumableUpload`}}},{method:`POST`,path:`/api/v1/sftp/{alias}/uploads/{id}/complete`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPCompleteUploadRequest`},responses:{201:{$ref:`#/components/schemas/SFTPTransfer`}}},{method:`GET`,path:`/api/v1/snippets`,responses:{200:{$ref:`#/components/schemas/SnippetLibrary`}}},{method:`POST`,path:`/api/v1/snippets`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetDraft`},responses:{201:{$ref:`#/components/schemas/Snippet`}}},{method:`POST`,path:`/api/v1/snippets/jobs`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetExecuteRequest`},responses:{202:{$ref:`#/components/schemas/SnippetJob`}}},{method:`DELETE`,path:`/api/v1/snippets/jobs/{id}`,responses:{202:{$ref:`#/components/schemas/SnippetJob`}}},{method:`GET`,path:`/api/v1/snippets/jobs/{id}`,responses:{200:{$ref:`#/components/schemas/SnippetJob`}}},{method:`POST`,path:`/api/v1/snippets/preview`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetPreviewRequest`},responses:{200:{$ref:`#/components/schemas/SnippetPreview`}}},{method:`PUT`,path:`/api/v1/snippets/startup/{alias}`,requestRequired:!0,request:{$ref:`#/components/schemas/StartupSnippetRequest`},responses:{200:{$ref:`#/components/schemas/SnippetLibrary`}}},{method:`DELETE`,path:`/api/v1/snippets/{id}`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`PUT`,path:`/api/v1/snippets/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetDraft`},responses:{200:{$ref:`#/components/schemas/Snippet`}}},{method:`GET`,path:`/api/v1/sync`,responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`PUT`,path:`/api/v1/sync/auto`,requestRequired:!0,request:{$ref:`#/components/schemas/AutoSyncRequest`},responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`GET`,path:`/api/v1/sync/bucket`,responses:{200:{$ref:`#/components/schemas/SyncBucketStatus`}}},{method:`GET`,path:`/api/v1/sync/exclusions`,responses:{200:{$ref:`#/components/schemas/SyncExclusions`}}},{method:`PUT`,path:`/api/v1/sync/exclusions`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncExclusionsRequest`},responses:{200:{$ref:`#/components/schemas/SyncExclusions`}}},{method:`POST`,path:`/api/v1/sync/force-push`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncPushRequest`},responses:{200:{$ref:`#/components/schemas/PushResponse`}}},{method:`GET`,path:`/api/v1/sync/history`,responses:{200:{$ref:`#/components/schemas/SyncHistory`}}},{method:`POST`,path:`/api/v1/sync/history/diff`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncHistoryDiffRequest`},responses:{200:{$ref:`#/components/schemas/SyncHistoryDiff`}}},{method:`PUT`,path:`/api/v1/sync/key`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncKeyRequest`},responses:{200:{$ref:`#/components/schemas/SyncKeyResponse`}}},{method:`POST`,path:`/api/v1/sync/now`,responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`POST`,path:`/api/v1/sync/pull`,requestRequired:!0,request:{$ref:`#/components/schemas/PullRequest`},responses:{200:{$ref:`#/components/schemas/PullResponse`}}},{method:`GET`,path:`/api/v1/sync/push`,responses:{200:{$ref:`#/components/schemas/SyncPushDraft`}}},{method:`POST`,path:`/api/v1/sync/push`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncPushRequest`},responses:{200:{$ref:`#/components/schemas/PushResponse`}}},{method:`PUT`,path:`/api/v1/sync/settings`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncSettingsRequest`},responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`PUT`,path:`/api/v1/sync/setup`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncSetupRequest`},responses:{200:{$ref:`#/components/schemas/SyncSetupResponse`}}},{method:`POST`,path:`/api/v1/sync/setup/check`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncSetupCheckRequest`},responses:{200:{$ref:`#/components/schemas/SyncSetupCheckResponse`}}},{method:`GET`,path:`/api/v1/terminal/backgrounds`,responses:{200:{$ref:`#/components/schemas/TerminalBackgroundList`}}},{method:`POST`,path:`/api/v1/terminal/backgrounds`,requestRequired:!0,responses:{201:{$ref:`#/components/schemas/TerminalBackground`}}},{method:`PUT`,path:`/api/v1/terminal/backgrounds/capacity`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalBackgroundCapacityRequest`},responses:{200:{$ref:`#/components/schemas/TerminalBackgroundList`}}},{method:`DELETE`,path:`/api/v1/terminal/backgrounds/{name}`,responses:{},noContent:[`204`]},{method:`GET`,path:`/api/v1/terminal/backgrounds/{name}`,responses:{}},{method:`PATCH`,path:`/api/v1/terminal/backgrounds/{name}`,requestRequired:!0,request:{$ref:`#/components/schemas/RenameTerminalBackgroundRequest`},responses:{200:{$ref:`#/components/schemas/TerminalBackground`}}},{method:`POST`,path:`/api/v1/terminal/commands`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalCommandDispatchRequest`},responses:{200:{$ref:`#/components/schemas/TerminalCommandDispatchResponse`}}},{method:`POST`,path:`/api/v1/terminal/commands/preview`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalCommandPreviewRequest`},responses:{200:{$ref:`#/components/schemas/TerminalCommandPreview`}}},{method:`GET`,path:`/api/v1/terminal/sessions`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions`,requestRequired:!0,request:{$ref:`#/components/schemas/OpenTerminalSessionRequest`},responses:{201:{$ref:`#/components/schemas/OpenTerminalSessionResponse`}}},{method:`DELETE`,path:`/api/v1/terminal/sessions/{id}`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`PATCH`,path:`/api/v1/terminal/sessions/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/RenameTerminalSessionRequest`},responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`GET`,path:`/api/v1/terminal/sessions/{id}/control`,responses:{200:{$ref:`#/components/schemas/TerminalControlResponse`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/forwards`,requestRequired:!0,request:{$ref:`#/components/schemas/StartTerminalForwardRequest`},responses:{201:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`DELETE`,path:`/api/v1/terminal/sessions/{id}/forwards/{forwardId}`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/reconnect`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/reconnect/stop`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/stream`,responses:{201:{$ref:`#/components/schemas/TerminalStreamTicket`}}},{method:`PUT`,path:`/api/v1/terminal/sessions/{id}/title`,requestRequired:!0,request:{$ref:`#/components/schemas/SetTerminalSessionTitleRequest`},responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`GET`,path:`/api/v1/terminal/shell-profiles`,responses:{200:{$ref:`#/components/schemas/LocalShellProfileList`}}},{method:`GET`,path:`/api/v1/trash`,responses:{200:{$ref:`#/components/schemas/TrashListResponse`}}},{method:`DELETE`,path:`/api/v1/trash/{entryId}`,responses:{200:{$ref:`#/components/schemas/PurgeTrashResponse`}}},{method:`POST`,path:`/api/v1/trash/{entryId}/restore`,responses:{200:{$ref:`#/components/schemas/RestoreTrashResponse`},409:{$ref:`#/components/schemas/RestoreTrashResponse`}}},{method:`GET`,path:`/api/v1/update`,responses:{200:{$ref:`#/components/schemas/UpdateStatus`}}},{method:`GET`,path:`/api/v1/workspaces`,responses:{200:{$ref:`#/components/schemas/WorkspaceList`}}},{method:`POST`,path:`/api/v1/workspaces`,requestRequired:!0,request:{$ref:`#/components/schemas/WorkspaceDefinition`},responses:{201:{$ref:`#/components/schemas/TerminalWorkspace`}}},{method:`DELETE`,path:`/api/v1/workspaces/{id}`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`GET`,path:`/api/v1/workspaces/{id}`,responses:{200:{$ref:`#/components/schemas/TerminalWorkspace`}}},{method:`PUT`,path:`/api/v1/workspaces/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/WorkspaceDefinition`},responses:{200:{$ref:`#/components/schemas/TerminalWorkspace`}}},{method:`POST`,path:`/api/v1/workspaces/{id}/restore`,responses:{200:{$ref:`#/components/schemas/WorkspaceRestorePlan`}}}];function c(){throw Error(`invalid_response`)}function l(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function u(e){let t=e.$ref;return typeof t==`string`?t.startsWith(`#/components/schemas/`)?o[t.slice(21)]??c():c():e}function d(e,t){return e===void 0||e===`binary`||e!==`date-time`||/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(t)&&Number.isFinite(Date.parse(t))}function f(e,t,n=0){n>128&&c();let r=u(e);if(t===null&&r.nullable===!0)return;let i=r.oneOf;if(Array.isArray(i)){let e=0;for(let r of i)try{f(r,t,n+1),e++}catch{}e!==1&&c();return}let a=r.anyOf;if(Array.isArray(a)){for(let e of a)try{f(e,t,n+1);return}catch{}c()}let o=r.allOf;if(Array.isArray(o)){for(let e of o)f(e,t,n+1);return}let s=r.enum;switch(Array.isArray(s)&&!s.some(e=>Object.is(e,t))&&c(),r.type){case`string`:typeof t!=`string`&&c(),typeof r.minLength==`number`&&t.lengthr.maxLength&&c(),typeof r.pattern==`string`&&!new RegExp(r.pattern,`u`).test(t)&&c(),d(r.format,t)||c();return;case`integer`:(typeof t!=`number`||!Number.isSafeInteger(t))&&c(),r.format===`uint64`&&t<0&&c(),p(r,t);return;case`number`:(typeof t!=`number`||!Number.isFinite(t))&&c(),p(r,t);return;case`boolean`:typeof t!=`boolean`&&c();return;case`array`:if(Array.isArray(t)||c(),typeof r.minItems==`number`&&t.lengthr.maxItems&&c(),r.uniqueItems===!0){let e=t.map(e=>JSON.stringify(e));new Set(e).size!==e.length&&c()}if(l(r.items)!==null)for(let e of t)f(r.items,e,n+1);return;case`object`:case void 0:ee(r,t,n);return;default:c()}}function p(e,t){typeof e.minimum==`number`&&te.maximum&&c(),typeof e.exclusiveMinimum==`number`&&t<=e.exclusiveMinimum&&c(),typeof e.exclusiveMaximum==`number`&&t>=e.exclusiveMaximum&&c()}function ee(e,t,n){let r=l(t);r===null&&c();let i=l(e.properties)??{},a=Array.isArray(e.required)?e.required:[];for(let e of a)(typeof e!=`string`||!Object.hasOwn(r,e))&&c();for(let[t,a]of Object.entries(r)){let r=i[t];if(l(r)!==null){f(r,a,n+1);continue}e.additionalProperties===!1&&c(),l(e.additionalProperties)!==null&&f(e.additionalProperties,a,n+1)}let o=e[`x-sshc-less-than-or-equal`];if(Array.isArray(o))for(let e of o){(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`||typeof e[1]!=`string`)&&c();let t=r[e[0]],n=r[e[1]];(typeof t!=`number`||typeof n!=`number`||t>n)&&c()}let s=e[`x-sshc-exactly-one`];if(Array.isArray(s))for(let e of s)(!Array.isArray(e)||e.length<2||e.some(e=>typeof e!=`string`))&&c(),e.filter(e=>Object.hasOwn(r,e)).length!==1&&c()}function m(e,t){let n=e.split(`/`),r=t.split(`/`);return n.length===r.length&&n.every((e,t)=>/^\{[^}]+\}$/.test(e)?(r[t]?.length??0)>0:e===r[t])}function h(e,t){return s.find(n=>n.method===e.toUpperCase()&&m(n.path,t))}function g(e,t){return f(o[e],t),t}function _(e,t,n){let r=h(e,t);r!==void 0&&(r.request===void 0&&c(),f(r.request,n))}function v(e,t,n,r){let i=h(e,t);if(i===void 0)return r;if(i.noContent?.includes(String(n))===!0)return r!==void 0&&c(),r;let a=i?.responses[String(n)]??i?.responses.default;return a===void 0&&c(),f(a,r),r}var y=`sshc.session.csrf`,b=`sshc.browser.registration.v1`;function x(e){return typeof e==`string`&&/^[A-Za-z0-9_-]{43}$/.test(e)}function te(e=window.sessionStorage){try{let t=e.getItem(y);if(x(t))return t;t!==null&&e.removeItem(y)}catch{}return``}function S(e,t=window.sessionStorage){if(x(e))try{t.setItem(y,e)}catch{}}function C(e=window.sessionStorage){try{e.removeItem(y)}catch{}}function w(e=window.localStorage){try{let t=e.getItem(b);if(x(t))return t;t!==null&&e.removeItem(b)}catch{}return``}function T(e,t=window.localStorage){if(x(e))try{t.setItem(b,e)}catch{}}function E(e=window.localStorage){try{e.removeItem(b)}catch{}}function D(e){try{return g(`BootstrapResponse`,e),!0}catch{return!1}}async function O(e){let t=w();if(t===``)throw Error(`session_expired`);let n=await e(`/api/v1/session/recover`,{method:`POST`,credentials:`same-origin`,headers:{"X-SSHC-Browser":t}});if(!n.ok)throw n.status===401&&E(),Error(`session_expired`);let r=await n.json();if(!D(r))throw Error(`invalid_bootstrap_response`);return r.browserToken!==void 0&&T(r.browserToken),S(r.csrfToken),{csrfToken:r.csrfToken}}async function ne(e,t,n){let r=new URLSearchParams(e.hash.replace(/^#/,``)).get(`bootstrap`)??``;if(r===``){let e=te();if(e!==``){let t=await n(`/api/v1/session/renew`,{method:`POST`,credentials:`same-origin`,headers:{"X-SSHC-CSRF":e}});if(t.ok){let e=await t.json();if(!D(e))throw C(),Error(`invalid_bootstrap_response`);return S(e.csrfToken),{csrfToken:e.csrfToken}}C()}return O(n)}if(!/^[A-Za-z0-9_-]{43}$/.test(r))throw Error(`invalid_bootstrap_fragment`);t.replaceState(null,``,`${e.pathname}${e.search}`);let i={"X-SSHC-Bootstrap":r},a=w();a!==``&&(i[`X-SSHC-Browser`]=a);let o=await n(`/api/v1/session/bootstrap`,{method:`POST`,credentials:`same-origin`,headers:i});if(!o.ok){if((o.status===401||o.status===409)&&w()!==``)return O(n);throw Error(`bootstrap_rejected`)}let s=await o.json();if(!D(s))throw Error(`invalid_bootstrap_response`);return s.browserToken!==void 0&&T(s.browserToken),S(s.csrfToken),{csrfToken:s.csrfToken}}var k=class extends Error{code;status;problem;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=e,this.status=t,this.problem=n}};function A(e){return e instanceof k?e.code:``}async function j(e){try{return g(`Problem`,await e.json())}catch{return null}}var M=null,N=null,P=null,F=new WeakSet;function re(e){M=e}function ie(e){N=e}function ae(e){P=e}function I(e){try{return new URL(e,window.location.origin).pathname}catch{return`/api`}}function L(e){[`vault_locked`,`session_required`,`invalid_session`,`invalid_csrf`].includes(e.code)||e.status>=400&&e.status<500||e.code!==`update_check_failed`&&P?.(e)}function R(e,t){L({code:`network_request_failed`,status:0,method:e,path:I(t)})}function z(e,t,n,r){if(F.has(e))return;F.add(e);let i=t?.code??`request_failed`,a=t?.detail;L({code:i,status:e.status,method:n,path:I(r),...typeof a==`string`&&a!==``?{detail:a}:{}})}async function B(e,t,n,r={}){let i=await j(e),a=i?.code??`request_failed`;return a===`vault_locked`&&M?.(),r.locallyHandledCodes?.includes(a)||z(e,i,t,n),new k(a,e.status,i)}function oe(e){try{return g(`HealthResponse`,e)}catch{throw Error(`invalid_health_response`)}}var V=null,H=null;function U(e){try{return g(`BootstrapResponse`,e),!0}catch{return!1}}function W(e){return new URL(e,window.location.origin).pathname}async function G(e,t,n){let r=await e.json();return v(t,W(n),e.status,r)}function K(e,t,n){if(!new Headers(n.headers).get(`Content-Type`)?.toLowerCase().startsWith(`application/json`)||typeof n.body!=`string`)return;let r;try{r=JSON.parse(n.body)}catch{throw Error(`invalid_request`)}_(e,W(t),r)}function q(e){e!==void 0&&V!==e||(V=null,C(),N?.())}async function se(e){if(V!==e)return V!==null;if(H?.token===e)return H.promise;let t=Symbol(`csrf-renewal`),n=(async()=>{try{let t=await fetch(`/api/v1/session/renew`,{method:`POST`,credentials:`same-origin`,headers:{"X-SSHC-CSRF":e}});if(V!==e)return V!==null;if(!t.ok)return q(e),!1;let n=await G(t,`POST`,`/api/v1/session/renew`);return U(n)?(V=n.csrfToken,S(n.csrfToken),!0):(q(e),!1)}catch{return q(e),!1}finally{H?.attempt===t&&(H=null)}})();return H={token:e,attempt:t,promise:n},n}async function ce(e){return e.status!==401&&e.status!==403?``:(await j(e.clone()))?.code??``}async function J(e,t,n,r=!0){let i=new Headers(t.headers);i.set(`X-SSHC-CSRF`,n);let a=await fetch(e,{...t,credentials:`same-origin`,headers:i}),o=await ce(a);if(a.status===401&&(o===`session_required`||o===`invalid_session`)){let i=V;return r&&i!==null&&i!==n?J(e,t,i,!1):(q(n),a)}if(a.status!==403||o!==`invalid_csrf`)return a;if(!r)return q(n),a;if(V===n&&!await se(n))return a;let s=V;return s===null?a:J(e,t,s,!1)}var Y={setCSRF(e){V=e},clear(){V=null,H=null,C()},async health(){let e;try{e=await fetch(`/api/v1/health`,{credentials:`same-origin`})}catch(e){throw R(`GET`,`/api/v1/health`),e}if(!e.ok)throw await B(e,`GET`,`/api/v1/health`);return oe(await e.json())},async read(e,t={}){if(!V)throw Error(`csrf_unavailable`);let n;try{n=await J(e,{},V)}catch(t){throw R(`GET`,e),t}if(!n.ok)throw await B(n,`GET`,e,t);return G(n,`GET`,e)},async send(e,t,n={}){if(new URL(e,window.location.origin).origin!==window.location.origin)throw Error(`cross_origin_api_mutation`);if(!V)throw Error(`csrf_unavailable`);let r=t.method??`POST`;K(r,e,t);let i;try{i=await J(e,t,V)}catch(t){throw R(r,e),t}if(!i.ok){let t=await j(i.clone());n.locallyHandledCodes?.includes(t?.code??`request_failed`)||z(i,t,r,e)}return i},async mutate(e,t,n={}){let r=t.method??`POST`,i=await this.send(e,t,n);if(!i.ok)throw await B(i,r,e,n);return i.status===204?v(r,W(e),i.status,void 0):G(i,r,e)}};function X(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`invalid_response`);return e}function le(e){if(!Array.isArray(e))throw Error(`invalid_response`);return e}function Z(e){if(typeof e!=`string`)throw Error(`invalid_response`);return e}function ue(e){if(typeof e!=`number`)throw Error(`invalid_response`);return e}var Q={"Content-Type":`application/json`};function de(e){return e instanceof k&&e.problem!==null?e.problem:e instanceof k?{code:e.code,message:`request rejected`}:{code:`request_failed`,message:`request rejected`}}async function fe(e,t){return Z(X(await Y.mutate(`/api/v1/actions`,{method:`POST`,headers:Q,body:JSON.stringify({kind:e,target:t})})).token)}async function pe(e,t,n,r){let i={...Q};return n&&(i[`X-SSHC-Action`]=n),Y.mutate(e,{method:`POST`,headers:i,body:JSON.stringify(t)},r===void 0?{}:{locallyHandledCodes:r})}async function me(e){return Y.mutate(e,{method:`POST`})}var he=e(),$=t();function ge({as:e,children:t,padded:n=!1,radius:r=`lg`,tone:i=`card`,overflow:a=`hidden`,className:o=``,...s}){return(0,$.jsx)(e??`div`,{className:`sshc-card ${a===`visible`?`overflow-visible`:a===`x-auto`?`overflow-x-auto`:`overflow-hidden`} ${r===`sm`?`rounded`:r===`md`?`rounded-md`:`rounded-lg`} ${i===`notice`?`bg-notice`:i===`subtle`?`bg-surface-subtle`:`bg-card`} ${n?`flex flex-col gap-3 p-3`:``} ${o}`,...s,children:t})}function _e({label:e,children:t,hint:n,warning:r,action:a,stackOnNarrow:o=!1,interactiveChildren:s=!1}){let c=o?`flex flex-col items-stretch gap-2 px-3 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2`:`flex items-center gap-3 px-3 py-2`,l=o?`flex min-w-0 flex-1 flex-col items-stretch gap-1.5 sm:flex-row sm:items-center sm:gap-3`:`flex min-w-0 flex-1 items-center gap-3`,u=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`${o?`w-full sm:w-32`:`w-32`} shrink-0 text-sm text-ink-muted`,children:e}),(0,$.jsx)(`span`,{className:`${o?`w-full sm:w-auto`:`ml-auto`} flex min-w-0 flex-1 justify-end`,children:t})]});return(0,$.jsxs)(`div`,{className:`border-t border-hairline first:border-t-0`,children:[(0,$.jsxs)(`div`,{className:c,children:[s?(0,$.jsx)(`div`,{className:l,children:u}):(0,$.jsx)(`label`,{className:l,children:u}),a===void 0?null:(0,$.jsx)(`span`,{className:`shrink-0`,children:a})]}),n===void 0?null:(0,$.jsx)(`p`,{className:`px-3 pb-2 ${i}`,children:n}),r===void 0?null:(0,$.jsx)(`p`,{role:`status`,className:`px-3 pb-2 text-xs text-notice-ink`,children:r})]})}function ve({children:e,tone:t=`notice`}){let n=t===`danger`;return(0,$.jsx)(`p`,{role:n?`alert`:`status`,className:n?`flex items-center gap-2 rounded-md border border-control-line px-3 py-2 text-sm text-danger`:`flex items-center gap-2 rounded-md border border-notice-line bg-notice px-3 py-2 text-sm text-notice-ink`,children:e})}function ye({label:e,value:t,options:n,onChange:r}){return(0,$.jsx)(`div`,{role:`group`,"aria-label":e,className:`flex overflow-hidden rounded-md border border-line bg-control`,children:n.map(e=>(0,$.jsx)(`button`,{type:`button`,"aria-pressed":t===e.value,onClick:()=>r(e.value),className:`border-r border-line px-2.5 py-1 text-xs transition-colors last:border-r-0 ${t===e.value?`bg-select-fill font-medium text-accent`:`text-ink-muted hover:bg-hover hover:text-ink`}`,children:e.label},e.value))})}var be=(0,he.forwardRef)(function({kind:e=`secondary`,className:t=``,type:i=`button`,...o},s){return(0,$.jsx)(`button`,{ref:s,type:i,className:`${e===`primary`?r:e===`danger`?n:a} ${t}`,...o})});export{g as S,A as _,ye as a,ie as b,X as c,Q as d,me as f,Y as g,k as h,_e as i,Z as l,de as m,ge as n,le as o,pe as p,ve as r,ue as s,be as t,fe as u,re as v,ne as x,ae as y}; \ No newline at end of file +import{o as e,t}from"./jsx-runtime-BOsSdQ68.js";import{a as n,l as r,s as i,u as a}from"./form-zbLY2cuV.js";var o={AgentIdentitiesResponse:{additionalProperties:!1,properties:{agentAvailable:{type:`boolean`},id:{type:`string`},identities:{items:{$ref:`#/components/schemas/AgentIdentity`},type:`array`}},required:[`id`,`agentAvailable`,`identities`],type:`object`},AgentIdentity:{additionalProperties:!1,properties:{algorithm:{type:`string`},bits:{type:`integer`},comment:{type:`string`},fingerprint:{type:`string`}},required:[`bits`,`fingerprint`,`comment`,`algorithm`],type:`object`},AliasRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`}},required:[`alias`],type:`object`},AssignCredentialRequest:{additionalProperties:!1,properties:{name:{maxLength:128,minLength:1,type:`string`},subject:{maxLength:4096,minLength:1,type:`string`}},required:[`subject`,`name`],type:`object`},AuthenticationRequest:{additionalProperties:!1,properties:{acknowledgeExecutable:{type:`boolean`},alias:{maxLength:64,minLength:1,type:`string`}},required:[`alias`,`acknowledgeExecutable`],type:`object`},AuthenticationResponse:{additionalProperties:!1,properties:{authenticated:{type:`boolean`},detail:{type:`string`},elapsedMs:{type:`integer`},method:{type:`string`},outcome:{type:`string`},truncated:{type:`boolean`}},required:[`outcome`,`authenticated`,`method`,`detail`,`truncated`,`elapsedMs`],type:`object`},AutoSync:{additionalProperties:!1,properties:{at:{type:`string`},detail:{type:`string`},enabled:{type:`boolean`},phase:{enum:[`idle`,`running`,`blocked`,`failed`],type:`string`}},required:[`enabled`,`phase`],type:`object`},AutoSyncRequest:{additionalProperties:!1,properties:{enabled:{type:`boolean`}},required:[`enabled`],type:`object`},BackgroundSettings:{additionalProperties:!1,properties:{capacityMiB:{maximum:1024,minimum:1,type:`integer`}},type:`object`},BootstrapResponse:{additionalProperties:!1,properties:{browserToken:{maxLength:43,minLength:43,pattern:`^[A-Za-z0-9_-]{43}$`,type:`string`},csrfToken:{maxLength:43,minLength:43,pattern:`^[A-Za-z0-9_-]{43}$`,type:`string`}},required:[`csrfToken`],type:`object`},ChangeMasterPasswordRequest:{additionalProperties:!1,properties:{current:{maxLength:1024,type:`string`},next:{maxLength:1024,type:`string`}},required:[`current`,`next`],type:`object`},ChangeMasterPasswordResult:{additionalProperties:!1,properties:{vault:{$ref:`#/components/schemas/PasswordVaultStatus`}},required:[`vault`],type:`object`},ChangePassphraseRequest:{additionalProperties:!1,properties:{currentPassphrase:{maxLength:1024,type:`string`},newPassphrase:{maxLength:1024,type:`string`},unencrypted:{type:`boolean`}},required:[`currentPassphrase`,`newPassphrase`,`unencrypted`],type:`object`},ChangePassphraseResponse:{additionalProperties:!1,properties:{encrypted:{type:`boolean`},id:{type:`string`},notes:{items:{type:`string`},type:`array`},relativePath:{type:`string`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`encrypted`,`notes`,`transactionId`],type:`object`},ChangedResponse:{additionalProperties:!1,properties:{changed:{type:`boolean`}},required:[`changed`],type:`object`},ComplexityNote:{additionalProperties:!1,properties:{code:{type:`string`},condition:{type:`string`},detail:{type:`string`},line:{type:`integer`},path:{type:`string`}},required:[`code`,`path`,`line`,`condition`,`detail`],type:`object`},ConfigCheckResponse:{additionalProperties:!1,properties:{diagnostics:{items:{$ref:`#/components/schemas/ConfigDiagnostic`},type:`array`},files:{items:{$ref:`#/components/schemas/ConfigFileSummary`},type:`array`},root:{type:`string`}},required:[`root`,`files`,`diagnostics`],type:`object`},ConfigDiagnostic:{additionalProperties:!1,properties:{code:{type:`string`},detail:{type:`string`},line:{type:`integer`},path:{type:`string`},severity:{type:`string`}},required:[`severity`,`code`,`path`,`line`,`detail`],type:`object`},ConfigFileSummary:{additionalProperties:!1,properties:{editable:{type:`boolean`},includes:{type:`integer`},loads:{type:`integer`},missing:{type:`boolean`},path:{type:`string`}},required:[`path`,`editable`,`missing`,`loads`,`includes`],type:`object`},ConflictReport:{additionalProperties:!1,properties:{baseDigest:{type:`string`},diskDigest:{type:`string`},externalChange:{items:{$ref:`#/components/schemas/DiffLine`},type:`array`},localChange:{items:{$ref:`#/components/schemas/DiffLine`},type:`array`},path:{type:`string`}},required:[`path`,`externalChange`,`localChange`],type:`object`},ConnectionIdentityFileChange:{discriminator:{mapping:{inherit:`#/components/schemas/ConnectionInherit`,set:`#/components/schemas/ConnectionIdentityFileSet`},propertyName:`action`},oneOf:[{$ref:`#/components/schemas/ConnectionIdentityFileSet`},{$ref:`#/components/schemas/ConnectionInherit`}],"x-go-type":`json.RawMessage`},ConnectionIdentityFileSet:{additionalProperties:!1,properties:{action:{enum:[`set`],type:`string`,"x-go-type":`string`},keyId:{maxLength:32,minLength:32,type:`string`}},required:[`action`,`keyId`],type:`object`},ConnectionInherit:{additionalProperties:!1,properties:{action:{enum:[`inherit`],type:`string`,"x-go-type":`string`}},required:[`action`],type:`object`},ConnectionKeyPassphraseSetDedicated:{additionalProperties:!1,properties:{keyId:{maxLength:32,minLength:32,type:`string`},kind:{enum:[`set_dedicated`],type:`string`,"x-go-type":`string`},passphrase:{maxLength:1024,minLength:1,type:`string`}},required:[`kind`,`keyId`,`passphrase`],type:`object`},ConnectionKeyPassphraseUnchanged:{additionalProperties:!1,properties:{kind:{enum:[`unchanged`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},ConnectionPortChange:{discriminator:{mapping:{inherit:`#/components/schemas/ConnectionInherit`,set:`#/components/schemas/ConnectionPortSet`},propertyName:`action`},oneOf:[{$ref:`#/components/schemas/ConnectionPortSet`},{$ref:`#/components/schemas/ConnectionInherit`}],"x-go-type":`json.RawMessage`},ConnectionPortSet:{additionalProperties:!1,properties:{action:{enum:[`set`],type:`string`,"x-go-type":`string`},value:{maximum:65535,minimum:1,type:`integer`}},required:[`action`,`value`],type:`object`},ConnectionStringChange:{discriminator:{mapping:{inherit:`#/components/schemas/ConnectionInherit`,set:`#/components/schemas/ConnectionStringSet`},propertyName:`action`},oneOf:[{$ref:`#/components/schemas/ConnectionStringSet`},{$ref:`#/components/schemas/ConnectionInherit`}],"x-go-type":`json.RawMessage`},ConnectionStringSet:{additionalProperties:!1,properties:{action:{enum:[`set`],type:`string`,"x-go-type":`string`},value:{maxLength:255,type:`string`}},required:[`action`,`value`],type:`object`},CreateConnectionAuthentication:{discriminator:{mapping:{dedicated_password:`#/components/schemas/CreateDedicatedPasswordAuthentication`,identity_file:`#/components/schemas/CreateIdentityFileAuthentication`,new_shared_password:`#/components/schemas/CreateNewSharedPasswordAuthentication`,saved_password:`#/components/schemas/CreateSavedPasswordAuthentication`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/CreateDedicatedPasswordAuthentication`},{$ref:`#/components/schemas/CreateSavedPasswordAuthentication`},{$ref:`#/components/schemas/CreateNewSharedPasswordAuthentication`},{$ref:`#/components/schemas/CreateIdentityFileAuthentication`}],"x-go-type":`json.RawMessage`},CreateConnectionRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},authentication:{$ref:`#/components/schemas/CreateConnectionAuthentication`},group:{maxLength:400,type:`string`},hostName:{maxLength:255,minLength:1,type:`string`},port:{maximum:65535,minimum:1,type:`integer`},user:{maxLength:255,type:`string`}},required:[`alias`,`hostName`,`authentication`],type:`object`},CreateConnectionResponse:{additionalProperties:!1,properties:{identity:{$ref:`#/components/schemas/HostIdentity`},preview:{$ref:`#/components/schemas/SavePreview`},transactionId:{type:`string`}},required:[`transactionId`,`identity`,`preview`],type:`object`},CreateDedicatedPasswordAuthentication:{additionalProperties:!1,properties:{kind:{enum:[`dedicated_password`],type:`string`,"x-go-type":`string`},password:{maxLength:1024,minLength:1,type:`string`}},required:[`kind`,`password`],type:`object`},CreateIdentityFileAuthentication:{additionalProperties:!1,properties:{keyId:{maxLength:32,minLength:32,type:`string`},kind:{enum:[`identity_file`],type:`string`,"x-go-type":`string`}},required:[`kind`,`keyId`],type:`object`},CreateNewSharedPasswordAuthentication:{additionalProperties:!1,properties:{credential:{maxLength:128,minLength:1,type:`string`},kind:{enum:[`new_shared_password`],type:`string`,"x-go-type":`string`},password:{maxLength:1024,minLength:1,type:`string`}},required:[`kind`,`credential`,`password`],type:`object`},CreateSavedPasswordAuthentication:{additionalProperties:!1,properties:{credential:{maxLength:128,minLength:1,type:`string`},kind:{enum:[`saved_password`],type:`string`,"x-go-type":`string`}},required:[`kind`,`credential`],type:`object`},Credential:{additionalProperties:!1,properties:{hosts:{items:{type:`string`},type:`array`},kind:{enum:[`password`,`key_passphrase`,`totp`],type:`string`},name:{type:`string`},uses:{items:{type:`string`},type:`array`}},required:[`kind`,`name`,`uses`,`hosts`],type:`object`},CredentialList:{additionalProperties:!1,properties:{credentials:{items:{$ref:`#/components/schemas/Credential`},type:`array`},dedicatedKeyPassphrases:{items:{$ref:`#/components/schemas/DedicatedKeyPassphraseUsage`},type:`array`},keyHostUsageComplete:{type:`boolean`}},required:[`credentials`,`dedicatedKeyPassphrases`,`keyHostUsageComplete`],type:`object`},DedicatedKeyPassphraseUsage:{additionalProperties:!1,properties:{hosts:{items:{type:`string`},type:`array`},key:{type:`string`}},required:[`key`,`hosts`],type:`object`},Diagnostic:{additionalProperties:!1,properties:{absolute:{type:`string`},code:{type:`string`},detail:{type:`string`},external:{type:`boolean`},line:{type:`integer`},path:{type:`string`},severity:{type:`string`}},required:[`severity`,`code`],type:`object`},DiffLine:{additionalProperties:!1,properties:{newLine:{type:`integer`},oldLine:{type:`integer`},op:{type:`string`},text:{type:`string`}},required:[`op`,`text`],type:`object`},EditRequest:{additionalProperties:!1,properties:{alias:{type:`string`},base:{type:`string`},comment:{type:`string`},destinationBase:{type:`string`},destinationGroup:{maxLength:400,type:`string`},destinationPath:{type:`string`},fields:{items:{$ref:`#/components/schemas/FieldEdit`},type:`array`},kind:{type:`string`},metadata:{$ref:`#/components/schemas/Metadata`},newAlias:{type:`string`},path:{type:`string`},raw:{type:`string`}},required:[`kind`],type:`object`},Effective:{additionalProperties:!1,properties:{alias:{type:`string`},entries:{items:{$ref:`#/components/schemas/EffectiveEntry`},type:`array`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`}},required:[`alias`,`entries`],type:`object`},EffectiveChange:{additionalProperties:!1,properties:{after:{items:{type:`string`},type:`array`},afterSources:{items:{$ref:`#/components/schemas/Source`},type:`array`},before:{items:{type:`string`},type:`array`},beforeSources:{items:{$ref:`#/components/schemas/Source`},type:`array`},keyword:{type:`string`}},required:[`keyword`,`before`,`after`],type:`object`},EffectiveDiff:{additionalProperties:!1,properties:{alias:{type:`string`},changes:{items:{$ref:`#/components/schemas/EffectiveChange`},type:`array`}},required:[`alias`,`changes`],type:`object`},EffectiveEntry:{additionalProperties:!1,properties:{keyword:{type:`string`},source:{$ref:`#/components/schemas/Source`},values:{items:{type:`string`},type:`array`}},required:[`keyword`,`values`,`source`],type:`object`},EffectiveResponse:{additionalProperties:!1,properties:{alias:{type:`string`},complexities:{items:{$ref:`#/components/schemas/ComplexityNote`},type:`array`},executableDirectives:{items:{$ref:`#/components/schemas/ExecutableDirective`},type:`array`},route:{items:{$ref:`#/components/schemas/JumpStage`},type:`array`},sources:{items:{$ref:`#/components/schemas/ValueSource`},type:`array`},tokenWarning:{type:`string`}},required:[`alias`,`tokenWarning`,`executableDirectives`,`sources`,`complexities`,`route`],type:`object`},EmbeddedTerminal:{additionalProperties:!1,properties:{appearance:{$ref:`#/components/schemas/TerminalAppearance`},browserScrollbackLines:{maximum:1e5,minimum:1e3,type:`integer`},copyOnSelect:{type:`boolean`},fontSize:{maximum:32,minimum:8,type:`integer`},jisYenBackslash:{type:`boolean`},localShellProfile:{pattern:`^[a-z0-9-]{1,64}$`,type:`string`},maxSessions:{maximum:200,minimum:1,type:`integer`},osc52:{type:`boolean`},reconnect:{maximum:5,minimum:0,type:`integer`},rightClickPaste:{type:`boolean`},scrollbackBytes:{maximum:4194304,minimum:16384,type:`integer`},startDirectory:{maxLength:4096,type:`string`},verbosity:{maximum:3,minimum:0,type:`integer`},webgl:{type:`boolean`}},type:`object`},EngineSettings:{additionalProperties:!1,properties:{port:{maximum:65535,minimum:1024,type:`integer`},vaultAutoLock:{$ref:`#/components/schemas/VaultAutoLockSettings`}},type:`object`},ExecutableDirective:{additionalProperties:!1,properties:{command:{type:`string`},condition:{type:`string`},keyword:{type:`string`},line:{type:`integer`},onConnect:{type:`boolean`},onEvaluate:{type:`boolean`},overridable:{type:`boolean`},path:{type:`string`}},required:[`keyword`,`command`,`path`,`line`,`condition`,`onEvaluate`,`onConnect`,`overridable`],type:`object`},FieldEdit:{additionalProperties:!1,properties:{action:{type:`string`},keyword:{type:`string`},line:{type:`integer`},values:{items:{type:`string`},type:`array`}},required:[`action`],type:`object`},FileContents:{additionalProperties:!1,properties:{contents:{type:`string`},digest:{type:`string`},editable:{type:`boolean`},exists:{type:`boolean`},file:{$ref:`#/components/schemas/FileRef`}},required:[`file`,`contents`,`digest`,`editable`,`exists`],type:`object`},FileDiff:{additionalProperties:!1,properties:{created:{type:`boolean`},lines:{items:{$ref:`#/components/schemas/DiffLine`},type:`array`},newDigest:{type:`string`},oldDigest:{type:`string`},path:{type:`string`},removed:{type:`boolean`},truncated:{type:`boolean`}},required:[`path`,`lines`],type:`object`},FileNode:{additionalProperties:!1,properties:{editable:{type:`boolean`},file:{$ref:`#/components/schemas/FileRef`},includes:{items:{$ref:`#/components/schemas/IncludeReference`},type:`array`},loads:{type:`integer`},missing:{type:`boolean`}},required:[`file`,`editable`,`loads`],type:`object`},FileRef:{additionalProperties:!1,properties:{absolute:{type:`string`},external:{type:`boolean`},path:{type:`string`}},required:[`absolute`],type:`object`},FileTransferSettings:{additionalProperties:!1,properties:{clearCompletedAfterSeconds:{maximum:86400,minimum:0,type:`integer`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},maxConcurrent:{maximum:8,minimum:1,type:`integer`},processingStopped:{type:`boolean`}},type:`object`},FormField:{additionalProperties:!1,properties:{category:{type:`string`},dangerous:{type:`boolean`},duplicate:{type:`boolean`},editable:{type:`boolean`},keyword:{type:`string`},line:{type:`integer`},values:{items:{type:`string`},type:`array`}},required:[`line`,`keyword`,`values`,`category`,`editable`],type:`object`},GenerateKeyRequest:{additionalProperties:!1,properties:{algorithm:{maxLength:16,minLength:1,type:`string`},bits:{type:`integer`},comment:{maxLength:127,type:`string`},fileName:{maxLength:64,minLength:1,type:`string`},group:{maxLength:400,type:`string`},passphrase:{maxLength:1024,type:`string`},unencrypted:{type:`boolean`}},required:[`algorithm`,`fileName`,`comment`,`passphrase`,`unencrypted`],type:`object`},GenerateKeyResponse:{additionalProperties:!1,properties:{bits:{type:`integer`},encrypted:{type:`boolean`},fingerprint:{type:`string`},id:{type:`string`},keyType:{type:`string`},publicRelativePath:{type:`string`},relativePath:{type:`string`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`publicRelativePath`,`fingerprint`,`keyType`,`bits`,`encrypted`,`transactionId`],type:`object`},GroupDeleteRequest:{additionalProperties:!1,properties:{destination:{maxLength:400,type:`string`},name:{maxLength:400,minLength:1,type:`string`}},required:[`name`],type:`object`},GroupMetadata:{additionalProperties:!1,properties:{colour:{type:`string`},hidden:{type:`boolean`},name:{type:`string`},note:{type:`string`},order:{type:`integer`},settings:{items:{$ref:`#/components/schemas/Setting`},type:`array`}},required:[`name`],type:`object`},GroupRenameRequest:{additionalProperties:!1,properties:{from:{maxLength:400,minLength:1,type:`string`},to:{maxLength:400,minLength:1,type:`string`}},required:[`from`,`to`],type:`object`},GroupView:{additionalProperties:!1,properties:{colour:{type:`string`},directory:{type:`string`},directoryPresent:{type:`boolean`},keyDirectory:{type:`string`},memberCount:{type:`integer`},name:{type:`string`},note:{type:`string`},order:{type:`integer`},parent:{type:`string`},settings:{items:{$ref:`#/components/schemas/Setting`},type:`array`}},required:[`name`,`directory`,`keyDirectory`,`memberCount`,`directoryPresent`],type:`object`},HardwareCommandRequest:{additionalProperties:!1,properties:{algorithm:{maxLength:16,minLength:1,type:`string`},comment:{maxLength:127,type:`string`},fileName:{maxLength:64,minLength:1,type:`string`},group:{maxLength:400,type:`string`}},required:[`algorithm`,`fileName`,`comment`],type:`object`},HardwareCommandResponse:{additionalProperties:!1,properties:{algorithm:{type:`string`},command:{items:{type:`string`},type:`array`},note:{type:`string`}},required:[`algorithm`,`command`,`note`],type:`object`},HealthResponse:{additionalProperties:!1,properties:{status:{enum:[`ok`],type:`string`,"x-go-type":`string`},version:{minLength:1,type:`string`}},required:[`status`,`version`],type:`object`},HistoryEntry:{additionalProperties:!1,properties:{finishedAt:{type:`string`},id:{type:`string`},operation:{type:`string`},paths:{items:{type:`string`},type:`array`},restorable:{items:{type:`string`},type:`array`},startedAt:{type:`string`},status:{type:`string`}},required:[`id`,`operation`,`status`,`startedAt`,`paths`],type:`object`},HistoryList:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/HistoryEntry`},type:`array`}},required:[`entries`],type:`object`},HostDetail:{additionalProperties:!1,properties:{effective:{$ref:`#/components/schemas/Effective`},file:{$ref:`#/components/schemas/FileContents`},form:{$ref:`#/components/schemas/HostForm`},metadata:{$ref:`#/components/schemas/HostMetadata`}},required:[`form`,`metadata`,`effective`,`file`],type:`object`},HostEntry:{additionalProperties:!1,properties:{duplicate:{type:`boolean`},editable:{type:`boolean`},file:{$ref:`#/components/schemas/FileRef`},group:{type:`string`},hostName:{description:`Resolved SSH destination hostname used by this alias.`,type:`string`},identity:{$ref:`#/components/schemas/HostIdentity`},line:{type:`integer`},negated:{type:`boolean`},patterns:{items:{type:`string`},type:`array`},port:{description:`Resolved SSH port used by this alias.`,type:`string`},user:{description:`Resolved remote account used by this alias.`,type:`string`},wildcard:{type:`boolean`}},required:[`identity`,`file`,`line`,`patterns`,`editable`],type:`object`},HostForm:{additionalProperties:!1,properties:{comment:{description:`The comment lines attached above the Host line, with the '#' markers stripped. Empty when the block has none. ssh_config has no trailing comment syntax, so only whole lines are ever attached.`,type:`string`},commentLines:{description:`How many physical lines the attached comment occupies. A client rewriting the whole file needs the count to include those lines; it cannot be derived from comment, whose markers and indentation were stripped.`,type:`integer`},entry:{$ref:`#/components/schemas/HostEntry`},fields:{items:{$ref:`#/components/schemas/FormField`},type:`array`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`},raw:{type:`string`}},required:[`entry`,`fields`,`raw`,`comment`,`commentLines`],type:`object`},HostIdentity:{additionalProperties:!1,properties:{alias:{type:`string`},path:{type:`string`}},required:[`path`,`alias`],type:`object`},HostMetadata:{additionalProperties:!1,properties:{appearance:{$ref:`#/components/schemas/TerminalAppearance`},colour:{type:`string`},detectedOS:{description:`Last operating system detected after connecting.`,enum:[``,`server`,`linux`,`amazonlinux`,`ubuntu`,`debian`,`redhat`,`fedora`,`centos`,`rocky`,`almalinux`,`arch`,`alpine`,`opensuse`,`freebsd`,`macos`,`windows`],type:`string`},detectedOSBinding:{maxLength:64,type:`string`},encoding:{description:`Text encoding used by this SSH terminal. Omitted means UTF-8.`,enum:[`utf-8`,`shift_jis`,`euc-jp`,`iso-2022-jp`],type:`string`},identity:{$ref:`#/components/schemas/HostIdentity`},note:{type:`string`},order:{type:`integer`},orphan:{type:`boolean`},os:{description:`Home icon override. Empty or omitted enables automatic detection.`,enum:[``,`server`,`linux`,`amazonlinux`,`ubuntu`,`debian`,`redhat`,`fedora`,`centos`,`rocky`,`almalinux`,`arch`,`alpine`,`opensuse`,`freebsd`,`macos`,`windows`],type:`string`},osc52:{description:`Per-connection OSC 52 override. Omitted inherits the terminal default.`,enum:[`allow`,`deny`],type:`string`},tags:{items:{type:`string`},type:`array`}},required:[`identity`],type:`object`},IncludeReference:{additionalProperties:!1,properties:{condition:{type:`string`},line:{type:`integer`},matches:{items:{$ref:`#/components/schemas/FileRef`},type:`array`},pattern:{type:`string`}},required:[`line`,`pattern`],type:`object`},IssueActionRequest:{additionalProperties:!1,properties:{kind:{maxLength:64,minLength:1,type:`string`},target:{maxLength:4352,minLength:1,type:`string`}},required:[`kind`,`target`],type:`object`},IssueActionResponse:{additionalProperties:!1,properties:{expiresAt:{minLength:1,type:`string`},token:{maxLength:43,minLength:43,type:`string`}},required:[`token`,`expiresAt`],type:`object`},JumpStage:{additionalProperties:!1,properties:{complex:{type:`boolean`},depth:{type:`integer`},hop:{type:`string`},hostname:{type:`string`},order:{type:`integer`},parent:{type:`string`},port:{type:`string`},user:{type:`string`}},required:[`order`,`depth`,`parent`,`hop`,`hostname`,`user`,`port`,`complex`],type:`object`},KeyAlgorithmsResponse:{additionalProperties:!1,properties:{source:{type:`string`},variants:{items:{$ref:`#/components/schemas/KeyVariant`},type:`array`}},required:[`variants`,`source`],type:`object`},KeyCertificate:{additionalProperties:!1,properties:{keyId:{type:`string`},neverExpires:{type:`boolean`},principals:{items:{type:`string`},type:`array`},signedKeyFingerprint:{type:`string`},signedKeyType:{type:`string`},validBefore:{type:`integer`}},required:[`keyId`,`principals`,`validBefore`,`neverExpires`,`signedKeyType`,`signedKeyFingerprint`],type:`object`},KeyInventoryResponse:{additionalProperties:!1,properties:{agentAvailable:{type:`boolean`},agentDelegations:{items:{$ref:`#/components/schemas/KeyReference`},type:`array`},agentIdentities:{items:{$ref:`#/components/schemas/AgentIdentity`},type:`array`},items:{items:{$ref:`#/components/schemas/KeyItem`},type:`array`},unreadable:{items:{$ref:`#/components/schemas/UnreadableFile`},type:`array`},unresolvedReferences:{items:{$ref:`#/components/schemas/UnresolvedReference`},type:`array`}},required:[`items`,`unreadable`,`agentDelegations`,`unresolvedReferences`,`agentAvailable`,`agentIdentities`],type:`object`},KeyItem:{additionalProperties:!1,properties:{algorithm:{type:`string`},bits:{type:`integer`},certificate:{$ref:`#/components/schemas/KeyCertificate`},comment:{type:`string`},container:{type:`string`},encrypted:{type:`boolean`},fingerprint:{type:`string`},id:{type:`string`},keyType:{type:`string`},kind:{type:`string`},notes:{items:{type:`string`},type:`array`},permission:{type:`string`},permissionRisk:{type:`boolean`},references:{items:{$ref:`#/components/schemas/KeyReference`},type:`array`},relativePath:{type:`string`},sizeBytes:{type:`integer`}},required:[`id`,`relativePath`,`kind`,`container`,`algorithm`,`keyType`,`bits`,`encrypted`,`fingerprint`,`comment`,`permission`,`permissionRisk`,`sizeBytes`,`references`,`notes`],type:`object`},KeyReference:{additionalProperties:!1,properties:{condition:{type:`string`},configPath:{type:`string`},directive:{type:`string`},hostPatterns:{items:{type:`string`},type:`array`},line:{type:`integer`},value:{type:`string`}},required:[`directive`,`configPath`,`line`,`condition`,`hostPatterns`,`value`],type:`object`},KeyVariant:{additionalProperties:!1,properties:{algorithm:{type:`string`},bits:{type:`integer`},inProcess:{type:`boolean`},label:{type:`string`},reason:{type:`string`}},required:[`algorithm`,`bits`,`label`,`inProcess`,`reason`],type:`object`},KnownHostCandidate:{additionalProperties:!1,properties:{fingerprint:{type:`string`},host:{type:`string`},key:{type:`string`},keyType:{type:`string`},port:{type:`integer`},verified:{type:`boolean`}},required:[`host`,`port`,`keyType`,`key`,`fingerprint`,`verified`],type:`object`},KnownHostEntry:{additionalProperties:!1,properties:{comment:{type:`string`},digest:{type:`string`},fingerprint:{type:`string`},hashed:{type:`boolean`},hosts:{items:{type:`string`},type:`array`},keyType:{type:`string`},line:{type:`integer`},marker:{type:`string`}},required:[`line`,`digest`,`marker`,`hosts`,`hashed`,`keyType`,`fingerprint`,`comment`],type:`object`},KnownHostTarget:{additionalProperties:!1,properties:{digest:{maxLength:64,minLength:64,type:`string`},line:{type:`integer`}},required:[`line`,`digest`],type:`object`},KnownHostsAddRequest:{additionalProperties:!1,properties:{acknowledged:{type:`boolean`},expectedFingerprint:{maxLength:128,type:`string`},host:{maxLength:255,minLength:1,type:`string`},key:{maxLength:4096,minLength:1,type:`string`},keyType:{maxLength:64,minLength:1,type:`string`},port:{type:`integer`}},required:[`host`,`port`,`keyType`,`key`,`expectedFingerprint`,`acknowledged`],type:`object`},KnownHostsChangeResponse:{additionalProperties:!1,properties:{changed:{type:`boolean`},transactionId:{type:`string`}},required:[`changed`,`transactionId`],type:`object`},KnownHostsDeleteRequest:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/KnownHostTarget`},type:`array`}},required:[`entries`],type:`object`},KnownHostsResponse:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/KnownHostEntry`},type:`array`},path:{type:`string`}},required:[`path`,`entries`],type:`object`},KnownHostsScanRequest:{additionalProperties:!1,properties:{host:{maxLength:255,minLength:1,type:`string`},port:{type:`integer`}},required:[`host`,`port`],type:`object`},KnownHostsScanResponse:{additionalProperties:!1,properties:{candidates:{items:{$ref:`#/components/schemas/KnownHostCandidate`},type:`array`},notice:{type:`string`}},required:[`notice`,`candidates`],type:`object`},LocalShellProfile:{additionalProperties:!1,properties:{arguments:{items:{type:`string`},type:`array`},default:{type:`boolean`},id:{type:`string`},label:{type:`string`},path:{type:`string`}},required:[`id`,`label`,`path`,`arguments`,`default`],type:`object`},LocalShellProfileList:{additionalProperties:!1,properties:{profiles:{items:{$ref:`#/components/schemas/LocalShellProfile`},type:`array`}},required:[`profiles`],type:`object`},Metadata:{additionalProperties:!1,properties:{backgrounds:{$ref:`#/components/schemas/BackgroundSettings`},embeddedTerminal:{$ref:`#/components/schemas/EmbeddedTerminal`},engine:{$ref:`#/components/schemas/EngineSettings`},fileTransfers:{$ref:`#/components/schemas/FileTransferSettings`},groups:{items:{$ref:`#/components/schemas/GroupMetadata`},type:`array`},groupsFile:{type:`string`},hosts:{items:{$ref:`#/components/schemas/HostMetadata`},type:`array`},schemaVersion:{type:`integer`},shortcutPresets:{items:{$ref:`#/components/schemas/ShortcutPreset`},maxItems:64,type:`array`}},required:[`schemaVersion`],type:`object`},Notice:{additionalProperties:!1,properties:{code:{type:`string`},detail:{type:`string`},line:{type:`integer`},path:{type:`string`}},required:[`code`],type:`object`},OpenTerminalSessionRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},cols:{maximum:1e3,minimum:1,type:`integer`},cwd:{maxLength:4096,minLength:1,type:`string`},kind:{enum:[`ssh`,`shell`],type:`string`},profileId:{pattern:`^[a-z0-9-]{1,64}$`,type:`string`},rows:{maximum:1e3,minimum:1,type:`integer`}},required:[`kind`],type:`object`},OpenTerminalSessionResponse:{additionalProperties:!1,properties:{session:{$ref:`#/components/schemas/TerminalSession`},streamTicket:{type:`string`}},required:[`session`,`streamTicket`],type:`object`},Overview:{additionalProperties:!1,properties:{diagnostics:{items:{$ref:`#/components/schemas/Diagnostic`},type:`array`},entry:{$ref:`#/components/schemas/FileRef`},files:{items:{$ref:`#/components/schemas/FileNode`},type:`array`},groups:{items:{$ref:`#/components/schemas/GroupView`},type:`array`},hosts:{items:{$ref:`#/components/schemas/HostEntry`},type:`array`},metadata:{$ref:`#/components/schemas/Metadata`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`},pending:{items:{$ref:`#/components/schemas/PendingTransaction`},type:`array`}},required:[`entry`,`files`,`hosts`,`groups`,`metadata`,`diagnostics`,`notices`],type:`object`},PassphraseRequest:{additionalProperties:!1,properties:{passphrase:{maxLength:1024,type:`string`}},required:[`passphrase`],type:`object`},PasswordEligibility:{additionalProperties:!1,properties:{alias:{type:`string`},blockers:{items:{$ref:`#/components/schemas/Notice`},type:`array`},hostName:{type:`string`},passwordBinding:{enum:[`unavailable`,`none`,`current`,`stale`],type:`string`},port:{type:`string`},storable:{type:`boolean`},totpBinding:{enum:[`unavailable`,`none`,`current`,`stale`],type:`string`},warnings:{items:{$ref:`#/components/schemas/Notice`},type:`array`}},required:[`alias`,`storable`,`blockers`,`warnings`],type:`object`},PasswordVaultStatus:{additionalProperties:!1,properties:{aliases:{items:{type:`string`},type:`array`},dedicatedKeyPassphrases:{items:{type:`string`},type:`array`},exists:{type:`boolean`},migratedFromVersion:{type:`integer`},migratedToVersion:{type:`integer`},minPassphraseLength:{type:`integer`},passwordless:{type:`boolean`},unlocked:{type:`boolean`}},required:[`exists`,`unlocked`,`aliases`,`dedicatedKeyPassphrases`],type:`object`},PendingTransaction:{additionalProperties:!1,properties:{canComplete:{type:`boolean`},committed:{type:`integer`},id:{type:`string`},operation:{type:`string`},paths:{items:{type:`string`},type:`array`},startedAt:{type:`string`},status:{type:`string`}},required:[`id`,`operation`,`status`,`startedAt`,`committed`,`paths`,`canComplete`],type:`object`},Problem:{additionalProperties:!1,properties:{blockers:{items:{type:`string`},type:`array`},code:{type:`string`},column:{type:`integer`},conflict:{$ref:`#/components/schemas/ConflictReport`},currentVersion:{minimum:0,type:`integer`},detail:{type:`string`},diagnostics:{items:{$ref:`#/components/schemas/Diagnostic`},type:`array`},line:{type:`integer`},message:{type:`string`},path:{type:`string`},requiredVersion:{minimum:1,type:`integer`}},required:[`code`,`message`],type:`object`},PublicKeyResponse:{additionalProperties:!1,properties:{comment:{type:`string`},fingerprint:{type:`string`},id:{type:`string`},publicKey:{type:`string`},relativePath:{type:`string`}},required:[`id`,`relativePath`,`publicKey`,`fingerprint`,`comment`],type:`object`},PullRequest:{additionalProperties:!1,properties:{acceptRemoteHead:{type:`boolean`},apply:{type:`boolean`},expectedETag:{maxLength:1024,type:`string`},expectedRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},historyKey:{maxLength:1024,minLength:1,type:`string`},resolve:{enum:[`local`,`remote`],type:`string`}},type:`object`},PullResponse:{additionalProperties:!1,properties:{applied:{type:`boolean`},completedAt:{type:`string`},conflicts:{items:{$ref:`#/components/schemas/SyncConflict`},type:`array`},downloadedBytes:{format:`int64`,minimum:0,type:`integer`},origin:{type:`string`},remoteETag:{type:`string`},remoteRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},removed:{items:{type:`string`},type:`array`},summary:{$ref:`#/components/schemas/SnapshotSummary`},written:{items:{type:`string`},type:`array`}},required:[`applied`,`conflicts`,`written`,`removed`,`summary`,`downloadedBytes`,`completedAt`,`remoteETag`,`remoteRevision`],type:`object`},PurgeTrashResponse:{additionalProperties:!1,properties:{entryId:{type:`string`},removed:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`entryId`,`removed`,`transactionId`],type:`object`},PushResponse:{additionalProperties:!1,properties:{result:{$ref:`#/components/schemas/PushResult`},status:{$ref:`#/components/schemas/SyncStatus`}},required:[`status`,`result`],type:`object`},PushResult:{additionalProperties:!1,properties:{completedAt:{type:`string`},objectCount:{minimum:0,type:`integer`},summary:{$ref:`#/components/schemas/SnapshotSummary`},uploadedBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`summary`,`objectCount`,`uploadedBytes`,`completedAt`],type:`object`},ReachabilityResponse:{additionalProperties:!1,properties:{address:{type:`string`},detail:{type:`string`},elapsedMs:{type:`integer`},notice:{type:`string`},outcome:{type:`string`}},required:[`address`,`outcome`,`elapsedMs`,`detail`,`notice`],type:`object`},RecentConnection:{additionalProperties:!1,properties:{alias:{type:`string`},hostName:{type:`string`},lastConnectedAt:{format:`date-time`,type:`string`},port:{type:`string`},user:{type:`string`}},required:[`alias`,`hostName`,`user`,`port`,`lastConnectedAt`],type:`object`},RecentConnectionList:{additionalProperties:!1,properties:{connections:{items:{$ref:`#/components/schemas/RecentConnection`},maxItems:20,type:`array`}},required:[`connections`],type:`object`},RecoverRequest:{additionalProperties:!1,properties:{action:{maxLength:16,minLength:1,type:`string`},transactionId:{maxLength:128,minLength:1,type:`string`}},required:[`transactionId`,`action`],type:`object`},RecoverResponse:{additionalProperties:!1,properties:{status:{enum:[`ok`],type:`string`,"x-go-type":`string`}},required:[`status`],type:`object`},RegisterKeyRequest:{additionalProperties:!1,properties:{lifetimeSeconds:{type:`integer`},passphrase:{maxLength:1024,type:`string`}},required:[`passphrase`,`lifetimeSeconds`],type:`object`},RegisterKeyResponse:{additionalProperties:!1,properties:{fingerprint:{type:`string`},id:{type:`string`},identities:{items:{$ref:`#/components/schemas/AgentIdentity`},type:`array`},lifetimeSeconds:{type:`integer`},relativePath:{type:`string`}},required:[`id`,`relativePath`,`fingerprint`,`lifetimeSeconds`,`identities`],type:`object`},RelocateKeyRequest:{additionalProperties:!1,properties:{group:{maxLength:400,type:`string`},newName:{maxLength:64,minLength:1,type:`string`}},type:`object`},RelocateKeyResponse:{additionalProperties:!1,properties:{blockers:{items:{type:`string`},type:`array`},files:{items:{$ref:`#/components/schemas/RelocatedKeyFile`},type:`array`},group:{type:`string`},id:{type:`string`},notes:{items:{type:`string`},type:`array`},references:{items:{$ref:`#/components/schemas/RewrittenKeyReference`},type:`array`},relativePath:{type:`string`},skipped:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`group`,`files`,`references`,`skipped`,`notes`,`blockers`,`transactionId`],type:`object`},RelocatedKeyFile:{additionalProperties:!1,properties:{from:{type:`string`},to:{type:`string`}},required:[`from`,`to`],type:`object`},RemoteKeyPlan:{additionalProperties:!1,properties:{actionExpiresAt:{type:`string`},actionToken:{type:`string`},alias:{type:`string`},executableDirectives:{items:{$ref:`#/components/schemas/ExecutableDirective`},type:`array`},fingerprint:{type:`string`},hostname:{type:`string`},keyLine:{type:`string`},keyPath:{type:`string`},manual:{items:{type:`string`},type:`array`},port:{type:`string`},remotePath:{type:`string`},routine:{type:`string`},supported:{type:`boolean`},user:{type:`string`},valuesFrom:{type:`string`}},required:[`alias`,`user`,`hostname`,`port`,`valuesFrom`,`fingerprint`,`keyPath`,`keyLine`,`remotePath`,`routine`,`supported`,`manual`,`executableDirectives`,`actionToken`,`actionExpiresAt`],type:`object`},RemoteKeyPlanRequest:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},keyPath:{maxLength:4096,type:`string`},publicKey:{maxLength:4096,minLength:1,type:`string`}},required:[`alias`,`keyPath`,`publicKey`],type:`object`},RemoteKeyRegisterRequest:{additionalProperties:!1,properties:{acknowledgeExecutable:{type:`boolean`},alias:{maxLength:64,minLength:1,type:`string`},keyPath:{maxLength:4096,type:`string`},publicKey:{maxLength:4096,minLength:1,type:`string`}},required:[`alias`,`keyPath`,`publicKey`,`acknowledgeExecutable`],type:`object`},RemoteKeyRegisterResponse:{additionalProperties:!1,properties:{exitCode:{type:`integer`},outcome:{type:`string`},stderr:{type:`string`},truncated:{type:`boolean`}},required:[`outcome`,`exitCode`,`stderr`,`truncated`],type:`object`},RenameTerminalBackgroundRequest:{additionalProperties:!1,properties:{name:{maxLength:128,minLength:1,type:`string`}},required:[`name`],type:`object`},RenameTerminalSessionRequest:{additionalProperties:!1,properties:{title:{maxLength:64,minLength:1,type:`string`}},required:[`title`],type:`object`},ResetUnsupportedVaultRequest:{additionalProperties:!1,properties:{acknowledged:{type:`boolean`},passphrase:{maxLength:1024,type:`string`}},required:[`passphrase`,`acknowledged`],type:`object`},RestoreRequest:{additionalProperties:!1,properties:{path:{maxLength:512,minLength:1,type:`string`},transactionId:{maxLength:128,minLength:1,type:`string`}},required:[`transactionId`,`path`],type:`object`},RestoreTrashResponse:{additionalProperties:!1,properties:{blockers:{items:{type:`string`},type:`array`},entryId:{type:`string`},restored:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`entryId`,`restored`,`blockers`,`transactionId`],type:`object`},RevealCredentialResponse:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`},secret:{type:`string`}},required:[`kind`,`name`,`secret`],type:`object`},RevealPrivateKeyResponse:{additionalProperties:!1,properties:{encrypted:{type:`boolean`},fingerprint:{type:`string`},id:{type:`string`},privateKey:{type:`string`},relativePath:{type:`string`},transactionId:{type:`string`}},required:[`id`,`relativePath`,`privateKey`,`encrypted`,`fingerprint`,`transactionId`],type:`object`},RewrittenKeyReference:{additionalProperties:!1,properties:{configPath:{type:`string`},directive:{type:`string`},from:{type:`string`},line:{type:`integer`},to:{type:`string`}},required:[`directive`,`configPath`,`line`,`from`,`to`],type:`object`},SFTPChmodRequest:{additionalProperties:!1,properties:{expectedRevision:{minLength:1,type:`string`},mode:{pattern:`^0?[0-7]{3}$`,type:`string`},path:{type:`string`},recursive:{type:`boolean`}},required:[`path`,`mode`,`expectedRevision`,`recursive`],type:`object`},SFTPCompleteUploadRequest:{additionalProperties:!1,properties:{expectedRevision:{minLength:1,type:`string`},path:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`},sourceFingerprint:{pattern:`^tree-sha256:[0-9a-f]{64}$`,type:`string`}},required:[`path`,`size`,`expectedRevision`,`sourceFingerprint`],type:`object`},SFTPCreateEntryRequest:{additionalProperties:!1,properties:{path:{type:`string`},type:{enum:[`directory`,`file`],type:`string`}},required:[`path`,`type`],type:`object`},SFTPCreateTransferJobRequest:{additionalProperties:!1,properties:{alias:{maxLength:255,minLength:1,type:`string`},batchId:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},batchKind:{enum:[`file`,`folder`],type:`string`},batchName:{maxLength:1024,minLength:1,type:`string`},direction:{enum:[`upload`,`download`,`remote`],type:`string`},id:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},kind:{enum:[`file`,`folder`],type:`string`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},lastModified:{format:`int64`,minimum:0,type:`integer`},name:{maxLength:1024,minLength:1,type:`string`},operation:{enum:[``,`copy`,`move`,`delete`,`get`,`put`],type:`string`},overwrite:{type:`boolean`},remotePath:{minLength:1,type:`string`},sourceAlias:{maxLength:255,type:`string`},sourcePath:{type:`string`},totalBytes:{format:`int64`,minimum:-1,type:`integer`}},required:[`id`,`batchId`,`batchName`,`batchKind`,`alias`,`sourceAlias`,`sourcePath`,`operation`,`overwrite`,`direction`,`kind`,`name`,`remotePath`,`totalBytes`,`lastModified`],type:`object`},SFTPDirectoryComparison:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPDirectoryDifference`},maxItems:2e4,type:`array`},leftPath:{type:`string`},rightPath:{type:`string`}},required:[`leftPath`,`rightPath`,`entries`],type:`object`},SFTPDirectoryDifference:{additionalProperties:!1,properties:{left:{$ref:`#/components/schemas/SFTPEntry`},relativePath:{type:`string`},right:{$ref:`#/components/schemas/SFTPEntry`},status:{enum:[`same`,`different`,`left_only`,`right_only`,`type_mismatch`],type:`string`}},required:[`relativePath`,`status`],type:`object`},SFTPDirectoryStats:{additionalProperties:!1,properties:{bytes:{format:`int64`,minimum:0,type:`integer`},directories:{minimum:1,type:`integer`},files:{minimum:0,type:`integer`},path:{type:`string`},truncated:{type:`boolean`}},required:[`path`,`bytes`,`files`,`directories`,`truncated`],type:`object`},SFTPDownloadCheckpointRequest:{additionalProperties:!1,properties:{offset:{format:`int64`,minimum:0,type:`integer`},revision:{maxLength:256,minLength:1,type:`string`}},required:[`offset`,`revision`],type:`object`},SFTPDownloadPartProgress:{additionalProperties:!1,properties:{index:{maximum:127,minimum:0,type:`integer`},totalBytes:{format:`int64`,minimum:0,type:`integer`},transferredBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`index`,`transferredBytes`,`totalBytes`],type:`object`,"x-sshc-less-than-or-equal":[[`transferredBytes`,`totalBytes`]]},SFTPEntry:{additionalProperties:!1,properties:{linkTarget:{type:`string`},mode:{type:`string`},modifiedAt:{format:`date-time`,type:`string`},name:{type:`string`},path:{type:`string`},revision:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`},targetType:{enum:[`file`,`directory`,`other`],type:`string`},type:{enum:[`file`,`directory`,`symlink`,`other`],type:`string`}},required:[`name`,`path`,`type`,`size`,`mode`,`modifiedAt`,`revision`],type:`object`},SFTPListing:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPEntry`},type:`array`},path:{type:`string`}},required:[`path`,`entries`],type:`object`},SFTPLocalListing:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPEntry`},type:`array`},home:{type:`string`},path:{type:`string`}},required:[`path`,`home`,`entries`],type:`object`},SFTPRenameRequest:{additionalProperties:!1,properties:{from:{type:`string`},to:{type:`string`}},required:[`from`,`to`],type:`object`},SFTPResumableUpload:{additionalProperties:!1,properties:{chunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},completedRanges:{items:{$ref:`#/components/schemas/SFTPUploadRange`},maxItems:65536,type:`array`},expectedRevision:{type:`string`},id:{type:`string`},offset:{format:`int64`,minimum:0,type:`integer`},parallelism:{maximum:128,minimum:1,type:`integer`},path:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`}},required:[`id`,`path`,`offset`,`size`,`expectedRevision`,`completedRanges`,`parallelism`,`chunkBytes`],type:`object`},SFTPSaveTextRequest:{additionalProperties:!1,properties:{contents:{maxLength:2097152,type:`string`},expectedRevision:{minLength:1,type:`string`}},required:[`contents`,`expectedRevision`],type:`object`},SFTPSearchResult:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/SFTPEntry`},maxItems:200,type:`array`},path:{type:`string`},query:{type:`string`},truncated:{type:`boolean`}},required:[`path`,`query`,`truncated`,`entries`],type:`object`},SFTPStartUploadRequest:{additionalProperties:!1,properties:{path:{type:`string`},size:{format:`int64`,maximum:549755813888,minimum:0,type:`integer`},sourceFingerprint:{pattern:`^tree-sha256:[0-9a-f]{64}$`,type:`string`}},required:[`path`,`size`,`sourceFingerprint`],type:`object`},SFTPTextFile:{additionalProperties:!1,properties:{contents:{maxLength:2097152,type:`string`},entry:{$ref:`#/components/schemas/SFTPEntry`},revision:{type:`string`}},required:[`entry`,`contents`,`revision`],type:`object`},SFTPTransfer:{additionalProperties:!1,properties:{bytes:{format:`int64`,minimum:0,type:`integer`},path:{type:`string`},revision:{type:`string`}},required:[`path`,`bytes`,`revision`],type:`object`},SFTPTransferJob:{additionalProperties:!1,properties:{alias:{maxLength:255,minLength:1,type:`string`},allowedActions:{items:{enum:[`pause`,`resume`,`retry`,`cancel`,`remove`],type:`string`},maxItems:3,type:`array`,uniqueItems:!0},attempt:{minimum:1,type:`integer`},batchId:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},batchKind:{enum:[`file`,`folder`],type:`string`},batchName:{maxLength:1024,minLength:1,type:`string`},bytesPerSecond:{format:`double`,minimum:0,type:`number`},createdAt:{format:`date-time`,type:`string`},direction:{enum:[`upload`,`download`,`remote`],type:`string`},downloadParts:{items:{$ref:`#/components/schemas/SFTPDownloadPartProgress`},maxItems:128,type:`array`},downloadRevision:{maxLength:256,type:`string`},expectedRevision:{maxLength:256,type:`string`},id:{pattern:`^[A-Za-z0-9_-]{8,128}$`,type:`string`},kind:{enum:[`file`,`folder`],type:`string`},lastModified:{format:`int64`,minimum:0,type:`integer`},name:{maxLength:1024,minLength:1,type:`string`},operation:{enum:[``,`copy`,`move`,`delete`,`get`,`put`],type:`string`},overwrite:{type:`boolean`},problem:{maxLength:128,type:`string`},remainingSeconds:{format:`int64`,minimum:-1,type:`integer`},remotePath:{minLength:1,type:`string`},sourceAlias:{maxLength:255,type:`string`},sourceFingerprint:{maxLength:128,type:`string`},sourcePath:{type:`string`},status:{enum:[`queued`,`running`,`paused`,`reattach`,`needs_overwrite`,`completed`,`failed`,`cancelled`],type:`string`},totalBytes:{format:`int64`,minimum:-1,type:`integer`},transferredBytes:{format:`int64`,minimum:0,type:`integer`},updatedAt:{format:`date-time`,type:`string`}},required:`id.batchId.batchName.batchKind.alias.sourceAlias.sourcePath.operation.direction.kind.name.remotePath.totalBytes.transferredBytes.bytesPerSecond.remainingSeconds.status.allowedActions.attempt.problem.lastModified.expectedRevision.sourceFingerprint.overwrite.downloadRevision.downloadParts.createdAt.updatedAt`.split(`.`),type:`object`},SFTPTransferJobActionRequest:{additionalProperties:!1,properties:{action:{enum:[`start`,`pause`,`resume`,`retry`,`cancel`,`progress`,`complete`,`fail`,`needs_overwrite`],type:`string`},problem:{maxLength:128,type:`string`},resetProgress:{type:`boolean`},totalBytes:{format:`int64`,minimum:0,type:`integer`},transferredBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`action`],type:`object`},SFTPTransferJobList:{additionalProperties:!1,properties:{clearCompletedAfterSeconds:{maximum:86400,minimum:0,type:`integer`},jobs:{items:{$ref:`#/components/schemas/SFTPTransferJob`},maxItems:200,type:`array`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},maxConcurrent:{maximum:8,minimum:1,type:`integer`},processingStopped:{type:`boolean`}},required:[`maxConcurrent`,`clearCompletedAfterSeconds`,`processingStopped`,`largeFileThresholdBytes`,`largeFileParallelism`,`largeFileChunkBytes`,`jobs`],type:`object`},SFTPTransferQueueMoveRequest:{additionalProperties:!1,properties:{move:{enum:[`up`,`down`,`top`,`bottom`],type:`string`}},required:[`move`],type:`object`},SFTPTransferSettingsRequest:{additionalProperties:!1,properties:{clearCompletedAfterSeconds:{maximum:86400,minimum:0,type:`integer`},largeFileChunkBytes:{format:`int64`,maximum:4294967296,minimum:8388608,type:`integer`},largeFileParallelism:{maximum:128,minimum:1,type:`integer`},largeFileThresholdBytes:{format:`int64`,maximum:1073741824,minimum:16777216,type:`integer`},maxConcurrent:{maximum:8,minimum:1,type:`integer`},processingStopped:{type:`boolean`}},required:[`maxConcurrent`,`clearCompletedAfterSeconds`,`processingStopped`,`largeFileThresholdBytes`,`largeFileParallelism`,`largeFileChunkBytes`],type:`object`},SFTPUploadRange:{additionalProperties:!1,properties:{offset:{format:`int64`,minimum:0,type:`integer`},size:{format:`int64`,maximum:4294967296,minimum:1,type:`integer`}},required:[`offset`,`size`],type:`object`},SavePreview:{additionalProperties:!1,properties:{diffs:{items:{$ref:`#/components/schemas/FileDiff`},type:`array`},effective:{items:{$ref:`#/components/schemas/EffectiveDiff`},type:`array`},notices:{items:{$ref:`#/components/schemas/Notice`},type:`array`},operation:{type:`string`}},required:[`operation`,`diffs`],type:`object`},SaveResult:{additionalProperties:!1,properties:{preview:{$ref:`#/components/schemas/SavePreview`},transactionId:{type:`string`},written:{items:{type:`string`},type:`array`}},required:[`transactionId`,`written`,`preview`],type:`object`},SetTerminalSessionTitleRequest:{additionalProperties:!1,properties:{title:{maxLength:64,minLength:1,nullable:!0,type:`string`}},required:[`title`],type:`object`},Setting:{additionalProperties:!1,properties:{keyword:{type:`string`},values:{items:{type:`string`},type:`array`}},required:[`keyword`,`values`],type:`object`},SettingsSaveResult:{additionalProperties:!1,properties:{transactionId:{type:`string`},written:{items:{type:`string`},type:`array`}},required:[`transactionId`,`written`],type:`object`},ShortcutPreset:{additionalProperties:!1,properties:{bindings:{additionalProperties:!1,properties:{copy:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},home:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},nextSession:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},palette:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},paste:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},previousSession:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},sftp:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`},terminalSearch:{items:{maxLength:64,type:`string`},maxItems:3,type:`array`}},required:[`palette`,`terminalSearch`,`copy`,`paste`,`nextSession`,`previousSession`,`home`,`sftp`],type:`object`},id:{pattern:`^[a-zA-Z0-9-]{1,64}$`,type:`string`},name:{maxLength:80,minLength:1,type:`string`}},required:[`id`,`name`,`bindings`],type:`object`},SnapshotSummary:{additionalProperties:!1,properties:{createdAt:{type:`string`},fileCount:{minimum:0,type:`integer`},snapshotBytes:{format:`int64`,minimum:0,type:`integer`},sourceBytes:{format:`int64`,minimum:0,type:`integer`}},required:[`createdAt`,`fileCount`,`sourceBytes`,`snapshotBytes`],type:`object`},Snippet:{additionalProperties:!1,properties:{command:{maxLength:65536,minLength:1,type:`string`},createdAt:{format:`date-time`,type:`string`},description:{maxLength:2048,type:`string`},id:{type:`string`},name:{maxLength:96,minLength:1,type:`string`},updatedAt:{format:`date-time`,type:`string`},variables:{items:{$ref:`#/components/schemas/SnippetVariable`},maxItems:32,type:`array`}},required:[`name`,`description`,`command`,`variables`,`id`,`createdAt`,`updatedAt`],type:`object`},SnippetDraft:{additionalProperties:!1,properties:{command:{maxLength:65536,minLength:1,type:`string`},description:{maxLength:2048,type:`string`},name:{maxLength:96,minLength:1,type:`string`},variables:{items:{$ref:`#/components/schemas/SnippetVariable`},maxItems:32,type:`array`}},required:[`name`,`description`,`command`,`variables`],type:`object`},SnippetExecuteRequest:{additionalProperties:!1,description:`Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.`,properties:{aliases:{items:{type:`string`},maxItems:64,minItems:1,type:`array`},command:{maxLength:65536,minLength:1,type:`string`},concurrency:{maximum:8,minimum:1,type:`integer`},evidence:{type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/SnippetExecutionTarget`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`,`evidence`,`concurrency`],type:`object`,"x-sshc-exactly-one":[[`snippetId`,`command`],[`aliases`,`targets`]]},SnippetExecutionTarget:{additionalProperties:!1,properties:{alias:{maxLength:64,minLength:1,type:`string`},targetId:{maxLength:255,minLength:1,type:`string`}},required:[`targetId`,`alias`],type:`object`},SnippetJob:{additionalProperties:!1,properties:{finishedAt:{format:`date-time`,type:`string`},id:{type:`string`},results:{items:{$ref:`#/components/schemas/SnippetTargetResult`},type:`array`},startedAt:{format:`date-time`,type:`string`},status:{enum:[`running`,`completed`,`cancelled`],type:`string`}},required:[`id`,`status`,`startedAt`,`results`],type:`object`},SnippetLibrary:{additionalProperties:!1,properties:{snippets:{items:{$ref:`#/components/schemas/Snippet`},type:`array`},startup:{items:{$ref:`#/components/schemas/StartupSnippet`},type:`array`}},required:[`snippets`,`startup`],type:`object`},SnippetPreview:{additionalProperties:!1,properties:{actionExpiresAt:{format:`date-time`,type:`string`},actionToken:{type:`string`},evidence:{type:`string`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/SnippetPreviewTarget`},type:`array`}},required:[`snippetId`,`evidence`,`targets`,`actionToken`,`actionExpiresAt`],type:`object`},SnippetPreviewRequest:{additionalProperties:!1,description:`Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.`,properties:{aliases:{items:{type:`string`},maxItems:64,minItems:1,type:`array`},command:{maxLength:65536,minLength:1,type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/SnippetExecutionTarget`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`],type:`object`,"x-sshc-exactly-one":[[`snippetId`,`command`],[`aliases`,`targets`]]},SnippetPreviewTarget:{additionalProperties:!1,properties:{command:{type:`string`},target:{additionalProperties:!1,properties:{alias:{type:`string`},hostName:{type:`string`},port:{type:`string`},route:{items:{properties:{alias:{type:`string`},authentication:{items:{type:`string`},type:`array`},hostKeyAlgorithms:{items:{type:`string`},type:`array`},hostName:{type:`string`},identitiesOnly:{type:`boolean`},identityFiles:{items:{type:`string`},type:`array`},port:{type:`string`},proxyCommand:{type:`string`},strictHostKey:{type:`string`},user:{type:`string`}},required:[`alias`,`hostName`,`user`,`port`,`strictHostKey`,`authentication`],type:`object`},type:`array`},user:{type:`string`}},required:[`alias`,`hostName`,`user`,`port`],type:`object`},targetId:{type:`string`}},required:[`targetId`,`target`,`command`],type:`object`},SnippetTargetResult:{additionalProperties:!1,properties:{alias:{type:`string`},exitCode:{type:`integer`},problem:{type:`string`},status:{enum:[`queued`,`running`,`succeeded`,`failed`,`cancelled`],type:`string`},stderr:{type:`string`},stdout:{type:`string`},targetId:{type:`string`},truncated:{type:`boolean`}},required:[`targetId`,`alias`,`status`],type:`object`},SnippetVariable:{additionalProperties:!1,properties:{default:{type:`string`},description:{type:`string`},name:{type:`string`},required:{type:`boolean`},type:{enum:[`string`,`integer`,`boolean`,`secret`],type:`string`}},required:[`name`,`type`],type:`object`},Source:{additionalProperties:!1,properties:{absolute:{type:`string`},condition:{type:`string`},line:{type:`integer`},path:{type:`string`}},type:`object`},StartTerminalForwardRequest:{additionalProperties:!1,properties:{destination:{maxLength:512,type:`string`},kind:{pattern:`^(local|dynamic)$`,type:`string`},listenPort:{maximum:65535,minimum:1,type:`integer`}},required:[`kind`,`listenPort`],type:`object`},StartupSnippet:{additionalProperties:!1,properties:{alias:{type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`}},required:[`alias`,`snippetId`],type:`object`},StartupSnippetRequest:{additionalProperties:!1,properties:{inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`}},required:[`snippetId`,`inputs`],type:`object`},StoreCredentialRequest:{additionalProperties:!1,properties:{secret:{maxLength:1024,minLength:1,type:`string`}},required:[`secret`],type:`object`},StorePasswordRequest:{additionalProperties:!1,properties:{password:{maxLength:1024,minLength:1,type:`string`}},required:[`password`],type:`object`},SyncBucketObject:{additionalProperties:!1,properties:{key:{minLength:1,type:`string`},lastModified:{type:`string`},size:{format:`int64`,minimum:0,type:`integer`}},required:[`key`,`size`],type:`object`},SyncBucketStatus:{additionalProperties:!1,properties:{checkedAt:{type:`string`},history:{items:{$ref:`#/components/schemas/SyncBucketObject`},maxItems:1e4,type:`array`},historyTruncated:{type:`boolean`},live:{$ref:`#/components/schemas/SyncBucketObject`},localIsLive:{type:`boolean`}},required:[`checkedAt`,`localIsLive`,`history`,`historyTruncated`],type:`object`},SyncConflict:{additionalProperties:!1,properties:{baseMode:{pattern:`^0[67]00$`,type:`string`},changedHere:{type:`boolean`},changedThere:{type:`boolean`},localMode:{pattern:`^0[67]00$`,type:`string`},path:{type:`string`},remoteMode:{pattern:`^0[67]00$`,type:`string`}},required:[`path`,`changedHere`,`changedThere`],type:`object`},SyncDirection:{enum:[`both`,`push`,`pull`],type:`string`},SyncExclusionCandidate:{additionalProperties:!1,properties:{ignored:{type:`boolean`},path:{maxLength:4096,minLength:1,type:`string`}},required:[`path`,`ignored`],type:`object`},SyncExclusions:{additionalProperties:!1,properties:{candidates:{items:{$ref:`#/components/schemas/SyncExclusionCandidate`},maxItems:4096,type:`array`},document:{maxLength:32768,type:`string`},usingDefaults:{type:`boolean`}},required:[`document`,`usingDefaults`,`candidates`],type:`object`},SyncExclusionsRequest:{additionalProperties:!1,properties:{document:{maxLength:32768,type:`string`}},required:[`document`],type:`object`},SyncHistory:{additionalProperties:!1,properties:{checkedAt:{type:`string`},downloadTruncated:{type:`boolean`},downloadedBytes:{format:`int64`,maximum:134217728,minimum:0,type:`integer`},headRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},historyTruncated:{type:`boolean`},revisions:{items:{$ref:`#/components/schemas/SyncHistoryRevision`},maxItems:50,type:`array`},skipped:{maximum:50,minimum:0,type:`integer`}},required:[`checkedAt`,`headRevision`,`revisions`,`historyTruncated`,`downloadTruncated`,`downloadedBytes`,`skipped`],type:`object`},SyncHistoryDiff:{additionalProperties:!1,properties:{added:{items:{type:`string`},type:`array`},downloadedBytes:{format:`int64`,minimum:0,type:`integer`},fromRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},modified:{items:{type:`string`},type:`array`},removed:{items:{type:`string`},type:`array`},toRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`}},required:[`fromRevision`,`toRevision`,`added`,`modified`,`removed`,`downloadedBytes`],type:`object`},SyncHistoryDiffRequest:{additionalProperties:!1,properties:{key:{maxLength:1024,minLength:1,type:`string`}},required:[`key`],type:`object`},SyncHistoryRelation:{enum:[`head`,`ancestor`,`branch`],type:`string`},SyncHistoryRevision:{additionalProperties:!1,properties:{createdAt:{type:`string`},fileCount:{maximum:4096,minimum:0,type:`integer`},key:{maxLength:1024,minLength:1,type:`string`},lastModified:{type:`string`},message:{maxLength:240,minLength:1,type:`string`},origin:{type:`string`},parentRevision:{pattern:`^[0-9a-f]{64}$`,type:`string`},relation:{$ref:`#/components/schemas/SyncHistoryRelation`},revision:{pattern:`^[0-9a-f]{64}$`,type:`string`},size:{format:`int64`,minimum:0,type:`integer`}},required:[`key`,`revision`,`message`,`createdAt`,`origin`,`fileCount`,`size`,`relation`],type:`object`},SyncKeyRequest:{additionalProperties:!1,properties:{confirmHistoryLoss:{type:`boolean`},key:{maxLength:1024,minLength:1,type:`string`}},type:`object`},SyncKeyResponse:{additionalProperties:!1,properties:{key:{type:`string`}},required:[`key`],type:`object`},SyncOperation:{additionalProperties:!1,properties:{completedAt:{type:`string`},downloadedBytes:{format:`int64`,minimum:0,type:`integer`},kind:{$ref:`#/components/schemas/SyncOperationKind`},objectCount:{minimum:0,type:`integer`},removed:{minimum:0,type:`integer`},summary:{$ref:`#/components/schemas/SnapshotSummary`},uploadedBytes:{format:`int64`,minimum:0,type:`integer`},written:{minimum:0,type:`integer`}},required:[`kind`,`summary`,`completedAt`],type:`object`},SyncOperationKind:{enum:[`push`,`apply`],type:`string`},SyncPushDraft:{additionalProperties:!1,properties:{added:{maximum:4096,minimum:0,type:`integer`},message:{maxLength:240,minLength:1,type:`string`},modified:{maximum:4096,minimum:0,type:`integer`},removed:{maximum:4096,minimum:0,type:`integer`}},required:[`message`,`added`,`modified`,`removed`],type:`object`},SyncPushRequest:{additionalProperties:!1,properties:{message:{maxLength:240,minLength:1,type:`string`}},required:[`message`],type:`object`},SyncSettingsRequest:{additionalProperties:!1,properties:{accessKeyId:{maxLength:512,minLength:1,type:`string`},bucket:{maxLength:255,minLength:1,type:`string`},direction:{$ref:`#/components/schemas/SyncDirection`},endpoint:{maxLength:2048,minLength:1,type:`string`},path:{maxLength:255,type:`string`},region:{maxLength:64,type:`string`},secretAccessKey:{maxLength:512,minLength:1,type:`string`}},required:[`endpoint`,`bucket`,`accessKeyId`,`secretAccessKey`,`direction`],type:`object`},SyncSetupCheckRequest:{additionalProperties:!1,properties:{accessKeyId:{maxLength:512,minLength:1,type:`string`},bucket:{maxLength:255,minLength:1,type:`string`},endpoint:{maxLength:2048,minLength:1,type:`string`},path:{maxLength:255,type:`string`},region:{maxLength:64,type:`string`},reuseCredentials:{type:`boolean`},secretAccessKey:{maxLength:512,minLength:1,type:`string`}},required:[`endpoint`,`bucket`,`reuseCredentials`],type:`object`},SyncSetupCheckResponse:{additionalProperties:!1,properties:{checkedAt:{type:`string`},etag:{maxLength:1024,minLength:1,type:`string`},historyPresent:{type:`boolean`},state:{$ref:`#/components/schemas/SyncSetupTargetState`}},required:[`state`,`historyPresent`,`checkedAt`],type:`object`},SyncSetupRequest:{additionalProperties:!1,properties:{accessKeyId:{maxLength:512,minLength:1,type:`string`},bucket:{maxLength:255,minLength:1,type:`string`},direction:{$ref:`#/components/schemas/SyncDirection`},endpoint:{maxLength:2048,minLength:1,type:`string`},expectedETag:{maxLength:1024,minLength:1,type:`string`},expectedState:{$ref:`#/components/schemas/SyncSetupTargetState`},historyPresent:{type:`boolean`},key:{maxLength:1024,type:`string`},path:{maxLength:255,type:`string`},region:{maxLength:64,type:`string`},reuseCredentials:{type:`boolean`},reuseKey:{type:`boolean`},secretAccessKey:{maxLength:512,minLength:1,type:`string`}},required:[`endpoint`,`bucket`,`direction`,`expectedState`,`historyPresent`,`key`,`reuseCredentials`,`reuseKey`],type:`object`},SyncSetupResponse:{additionalProperties:!1,properties:{generatedKey:{minLength:1,type:`string`},status:{$ref:`#/components/schemas/SyncStatus`}},required:[`status`],type:`object`},SyncSetupTargetState:{enum:[`empty`,`existing`,`incomplete`],type:`string`},SyncStatus:{additionalProperties:!1,properties:{accessKeySuffix:{maxLength:5,type:`string`},auto:{$ref:`#/components/schemas/AutoSync`},bucket:{type:`string`},configured:{type:`boolean`},direction:{$ref:`#/components/schemas/SyncDirection`},endpoint:{type:`string`},fileCount:{type:`integer`},keyConfigured:{type:`boolean`},lastOperation:{$ref:`#/components/schemas/SyncOperation`},lastSyncedAt:{type:`string`},locked:{type:`boolean`},origin:{type:`string`},path:{type:`string`},region:{type:`string`},synced:{type:`boolean`}},required:[`configured`,`locked`,`endpoint`,`bucket`,`synced`,`direction`,`keyConfigured`,`auto`],type:`object`},TOTPCodeSet:{additionalProperties:!1,properties:{current:{pattern:`^[0-9]{6,8}$`,type:`string`},next:{pattern:`^[0-9]{6,8}$`,type:`string`},periodSeconds:{maximum:300,minimum:5,type:`integer`},previous:{pattern:`^[0-9]{6,8}$`,type:`string`},remainingSeconds:{maximum:300,minimum:1,type:`integer`}},required:[`previous`,`current`,`next`,`periodSeconds`,`remainingSeconds`],type:`object`},TerminalAppearance:{additionalProperties:!1,properties:{background:{maxLength:128,type:`string`},backgroundTint:{maximum:100,minimum:0,type:`integer`},font:{maxLength:64,type:`string`},palette:{maxLength:64,type:`string`}},type:`object`},TerminalBackground:{additionalProperties:!1,properties:{bytes:{type:`integer`},name:{type:`string`},type:{type:`string`}},required:[`name`,`bytes`,`type`],type:`object`},TerminalBackgroundCapacityRequest:{additionalProperties:!1,properties:{capacityMiB:{maximum:1024,minimum:1,type:`integer`}},required:[`capacityMiB`],type:`object`},TerminalBackgroundList:{additionalProperties:!1,properties:{backgrounds:{items:{$ref:`#/components/schemas/TerminalBackground`},type:`array`},capacityBytes:{type:`integer`},remainingBytes:{type:`integer`},usedBytes:{type:`integer`}},required:[`backgrounds`,`usedBytes`,`capacityBytes`,`remainingBytes`],type:`object`},TerminalCommandDispatchRequest:{additionalProperties:!1,properties:{command:{maxLength:4095,minLength:1,type:`string`},evidence:{maxLength:64,minLength:64,type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},snippetId:{type:`string`},submit:{description:`Send Enter after the command. Defaults to true.`,type:`boolean`},targets:{items:{$ref:`#/components/schemas/TerminalCommandTargetRequest`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`,`targets`,`evidence`],type:`object`},TerminalCommandDispatchResponse:{additionalProperties:!1,properties:{results:{items:{$ref:`#/components/schemas/TerminalCommandResult`},type:`array`}},required:[`results`],type:`object`},TerminalCommandPreview:{additionalProperties:!1,properties:{actionExpiresAt:{type:`string`},actionToken:{type:`string`},evidence:{type:`string`},reviewEvidence:{description:`Stable evidence for the displayed redacted command and exact targets, independent of whether Enter will be sent.`,type:`string`},snippetId:{type:`string`},targets:{items:{$ref:`#/components/schemas/TerminalCommandPreviewTarget`},type:`array`}},required:[`snippetId`,`evidence`,`reviewEvidence`,`actionToken`,`actionExpiresAt`,`targets`],type:`object`},TerminalCommandPreviewRequest:{additionalProperties:!1,properties:{command:{maxLength:4095,minLength:1,type:`string`},expectedReviewEvidence:{description:`Refuse to issue an action if the redacted command or exact target changed since the displayed passive preview.`,maxLength:64,minLength:64,type:`string`},inputs:{additionalProperties:{type:`string`},type:`object`},issueAction:{description:`Issue a one-time execution token. Defaults to true for compatibility; passive previews should set false.`,type:`boolean`},revealCommand:{description:`Return the expanded command for an explicit insert, run, or copy action. Normal previews remain redacted.`,type:`boolean`},snippetId:{type:`string`},submit:{description:`Bind the preview to sending Enter after the command. Defaults to true.`,type:`boolean`},targets:{items:{$ref:`#/components/schemas/TerminalCommandTargetRequest`},maxItems:64,minItems:1,type:`array`}},required:[`inputs`,`targets`],type:`object`},TerminalCommandPreviewTarget:{additionalProperties:!1,properties:{alias:{type:`string`},command:{type:`string`},sessionId:{type:`string`},targetId:{type:`string`},title:{type:`string`}},required:[`targetId`,`sessionId`,`alias`,`title`,`command`],type:`object`},TerminalCommandResult:{additionalProperties:!1,properties:{alias:{type:`string`},problem:{type:`string`},sessionId:{type:`string`},status:{enum:[`delivered`,`failed`],type:`string`},targetId:{type:`string`},title:{type:`string`}},required:[`targetId`,`sessionId`,`alias`,`title`,`status`],type:`object`},TerminalCommandTargetRequest:{additionalProperties:!1,properties:{sessionId:{maxLength:64,minLength:1,type:`string`},targetId:{maxLength:255,minLength:1,type:`string`}},required:[`targetId`,`sessionId`],type:`object`},TerminalConnectionProgress:{additionalProperties:!1,properties:{alias:{type:`string`},hop:{minimum:1,type:`integer`},hops:{minimum:1,type:`integer`},hostName:{type:`string`},phase:{enum:[`dialing`,`host_key`,`authenticating`,`authenticated`,`opening_session`],type:`string`},user:{type:`string`}},required:[`phase`,`alias`,`hostName`,`user`,`hop`,`hops`],type:`object`,"x-sshc-less-than-or-equal":[[`hop`,`hops`]]},TerminalControlCursor:{additionalProperties:!1,properties:{end:{description:`Monotonic end of the raw transcript; greater than next means unread bytes remain.`,format:`uint64`,minimum:0,type:`integer`},next:{format:`uint64`,minimum:0,type:`integer`},requested:{format:`uint64`,minimum:0,type:`integer`},start:{format:`uint64`,minimum:0,type:`integer`},truncated:{type:`boolean`}},required:[`requested`,`start`,`next`,`end`,`truncated`],type:`object`},TerminalControlResponse:{additionalProperties:!1,properties:{cursor:{$ref:`#/components/schemas/TerminalControlCursor`},generation:{format:`uint64`,minimum:1,type:`integer`},output:{description:`Bounded transcript with terminal escape and control sequences removed.`,type:`string`},session:{$ref:`#/components/schemas/TerminalSession`},state:{enum:[`connecting`,`connected`,`reconnecting`,`exited`],type:`string`}},required:[`session`,`generation`,`state`,`cursor`,`output`],type:`object`},TerminalExit:{additionalProperties:!1,properties:{at:{type:`string`},code:{type:`integer`},signal:{type:`string`}},required:[`code`,`signal`,`at`],type:`object`},TerminalForward:{additionalProperties:!1,properties:{id:{maxLength:64,minLength:1,type:`string`},kind:{pattern:`^(local|dynamic|agent)$`,type:`string`},listen:{type:`string`},problem:{type:`string`},temporary:{type:`boolean`},to:{type:`string`}},required:[`id`,`kind`,`listen`,`to`,`problem`,`temporary`],type:`object`},TerminalNotification:{additionalProperties:!1,properties:{body:{type:`string`},occurredAt:{format:`date-time`,type:`string`},title:{type:`string`}},required:[`title`,`body`,`occurredAt`],type:`object`},TerminalPresentation:{additionalProperties:!1,properties:{displayTitle:{type:`string`},titlePinned:{type:`boolean`},titleSource:{enum:[`user`,`terminal`,`connection`,`fallback`],type:`string`}},required:[`displayTitle`,`titleSource`,`titlePinned`],type:`object`},TerminalReconnect:{additionalProperties:!1,properties:{attempt:{maximum:5,minimum:1,type:`integer`},limit:{maximum:5,minimum:1,type:`integer`},problem:{type:`string`},retryAt:{format:`date-time`,type:`string`}},required:[`attempt`,`limit`,`retryAt`,`problem`],type:`object`,"x-sshc-less-than-or-equal":[[`attempt`,`limit`]]},TerminalSession:{additionalProperties:!1,properties:{alias:{type:`string`},exited:{$ref:`#/components/schemas/TerminalExit`},forwards:{items:{$ref:`#/components/schemas/TerminalForward`},type:`array`},id:{type:`string`},kind:{enum:[`ssh`,`shell`],type:`string`},lastNotification:{$ref:`#/components/schemas/TerminalNotification`},notificationVersion:{minimum:0,type:`integer`},presentation:{$ref:`#/components/schemas/TerminalPresentation`},problem:{type:`string`},progress:{$ref:`#/components/schemas/TerminalConnectionProgress`},reconnect:{$ref:`#/components/schemas/TerminalReconnect`},startedAt:{type:`string`},state:{enum:[`connecting`,`connected`,`reconnecting`,`exited`],type:`string`},title:{type:`string`}},required:[`id`,`kind`,`title`,`startedAt`,`state`,`problem`],type:`object`},TerminalSessionList:{additionalProperties:!1,properties:{maxSessions:{maximum:200,minimum:0,type:`integer`},sessions:{items:{$ref:`#/components/schemas/TerminalSession`},type:`array`}},required:[`sessions`,`maxSessions`],type:`object`},TerminalSettings:{additionalProperties:!1,properties:{appearance:{$ref:`#/components/schemas/TerminalAppearance`},browserScrollbackLines:{maximum:1e5,minimum:1e3,type:`integer`},copyOnSelect:{type:`boolean`},fontSize:{maximum:32,minimum:8,type:`integer`},jisYenBackslash:{type:`boolean`},localShellProfile:{pattern:`^[a-z0-9-]{1,64}$`,type:`string`},maxSessions:{maximum:200,minimum:1,type:`integer`},osc52:{type:`boolean`},reconnect:{maximum:5,minimum:0,type:`integer`},rightClickPaste:{type:`boolean`},scrollbackBytes:{maximum:4194304,minimum:16384,type:`integer`},startDirectory:{maxLength:4096,type:`string`},verbosity:{maximum:3,minimum:0,type:`integer`},webgl:{type:`boolean`}},type:`object`},TerminalStreamTicket:{additionalProperties:!1,properties:{streamTicket:{type:`string`}},required:[`streamTicket`],type:`object`},TerminalWorkspace:{additionalProperties:!1,properties:{createdAt:{format:`date-time`,type:`string`},focusedPaneId:{type:`string`},id:{type:`string`},layout:{$ref:`#/components/schemas/WorkspaceNode`},name:{maxLength:80,minLength:1,type:`string`},updatedAt:{format:`date-time`,type:`string`}},required:[`name`,`layout`,`focusedPaneId`,`id`,`createdAt`,`updatedAt`],type:`object`},TrashEntrySummary:{additionalProperties:!1,properties:{ageDays:{type:`integer`},blockers:{items:{type:`string`},type:`array`},deletedAt:{type:`string`},files:{items:{$ref:`#/components/schemas/TrashFileSummary`},type:`array`},id:{type:`string`},restorable:{type:`boolean`},stale:{type:`boolean`}},required:[`id`,`deletedAt`,`ageDays`,`stale`,`files`,`restorable`,`blockers`],type:`object`},TrashFileSummary:{additionalProperties:!1,properties:{fingerprint:{type:`string`},kind:{type:`string`},originalRelativePath:{type:`string`},permission:{type:`string`},trashRelativePath:{type:`string`}},required:[`originalRelativePath`,`trashRelativePath`,`kind`,`fingerprint`,`permission`],type:`object`},TrashKeyResponse:{additionalProperties:!1,properties:{entryId:{type:`string`},files:{items:{$ref:`#/components/schemas/TrashFileSummary`},type:`array`},skipped:{items:{type:`string`},type:`array`},transactionId:{type:`string`}},required:[`entryId`,`files`,`skipped`,`transactionId`],type:`object`},TrashListResponse:{additionalProperties:!1,properties:{entries:{items:{$ref:`#/components/schemas/TrashEntrySummary`},type:`array`},retentionDays:{type:`integer`}},required:[`entries`,`retentionDays`],type:`object`},UnreadableFile:{additionalProperties:!1,properties:{reason:{type:`string`},relativePath:{type:`string`}},required:[`relativePath`,`reason`],type:`object`},UnresolvedReference:{additionalProperties:!1,properties:{configPath:{type:`string`},directive:{type:`string`},line:{type:`integer`},reason:{type:`string`},value:{type:`string`}},required:[`directive`,`value`,`configPath`,`line`,`reason`],type:`object`},UpdateConnectionKeyPassphrase:{discriminator:{mapping:{set_dedicated:`#/components/schemas/ConnectionKeyPassphraseSetDedicated`,unchanged:`#/components/schemas/ConnectionKeyPassphraseUnchanged`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/ConnectionKeyPassphraseUnchanged`},{$ref:`#/components/schemas/ConnectionKeyPassphraseSetDedicated`}],"x-go-type":`json.RawMessage`},UpdateConnectionPassword:{discriminator:{mapping:{confirm_route:`#/components/schemas/UpdatePasswordConfirmRoute`,dedicated_password:`#/components/schemas/CreateDedicatedPasswordAuthentication`,new_shared_password:`#/components/schemas/CreateNewSharedPasswordAuthentication`,remove:`#/components/schemas/UpdatePasswordRemove`,saved_password:`#/components/schemas/CreateSavedPasswordAuthentication`,unchanged:`#/components/schemas/UpdatePasswordUnchanged`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/UpdatePasswordUnchanged`},{$ref:`#/components/schemas/CreateDedicatedPasswordAuthentication`},{$ref:`#/components/schemas/CreateSavedPasswordAuthentication`},{$ref:`#/components/schemas/CreateNewSharedPasswordAuthentication`},{$ref:`#/components/schemas/UpdatePasswordConfirmRoute`},{$ref:`#/components/schemas/UpdatePasswordRemove`}],"x-go-type":`json.RawMessage`},UpdateConnectionRequest:{additionalProperties:!1,properties:{base:{maxLength:1048576,type:`string`},hostName:{$ref:`#/components/schemas/ConnectionStringChange`},identity:{$ref:`#/components/schemas/HostIdentity`},identityFile:{$ref:`#/components/schemas/ConnectionIdentityFileChange`},keyPassphrase:{$ref:`#/components/schemas/UpdateConnectionKeyPassphrase`},password:{$ref:`#/components/schemas/UpdateConnectionPassword`},port:{$ref:`#/components/schemas/ConnectionPortChange`},totp:{$ref:`#/components/schemas/UpdateConnectionTOTP`},user:{$ref:`#/components/schemas/ConnectionStringChange`}},required:[`identity`,`base`,`password`,`keyPassphrase`,`totp`],type:`object`},UpdateConnectionTOTP:{discriminator:{mapping:{confirm_route:`#/components/schemas/UpdateTOTPConfirmRoute`,remove:`#/components/schemas/UpdateTOTPRemove`,saved_totp:`#/components/schemas/UpdateTOTPSaved`,unchanged:`#/components/schemas/UpdateTOTPUnchanged`},propertyName:`kind`},oneOf:[{$ref:`#/components/schemas/UpdateTOTPUnchanged`},{$ref:`#/components/schemas/UpdateTOTPSaved`},{$ref:`#/components/schemas/UpdateTOTPConfirmRoute`},{$ref:`#/components/schemas/UpdateTOTPRemove`}],"x-go-type":`json.RawMessage`},UpdateCredentialRequest:{additionalProperties:!1,properties:{name:{maxLength:128,minLength:1,type:`string`},secret:{maxLength:1024,minLength:1,type:`string`}},required:[`name`,`secret`],type:`object`},UpdatePasswordConfirmRoute:{additionalProperties:!1,properties:{kind:{enum:[`confirm_route`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdatePasswordRemove:{additionalProperties:!1,properties:{kind:{enum:[`remove`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdatePasswordUnchanged:{additionalProperties:!1,properties:{kind:{enum:[`unchanged`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdateStatus:{additionalProperties:!1,properties:{available:{type:`boolean`},current:{type:`string`},latest:{type:`string`},pageUrl:{type:`string`}},required:[`current`,`available`],type:`object`},UpdateTOTPConfirmRoute:{additionalProperties:!1,properties:{kind:{enum:[`confirm_route`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdateTOTPRemove:{additionalProperties:!1,properties:{kind:{enum:[`remove`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},UpdateTOTPSaved:{additionalProperties:!1,properties:{credential:{maxLength:128,minLength:1,type:`string`},kind:{enum:[`saved_totp`],type:`string`,"x-go-type":`string`}},required:[`kind`,`credential`],type:`object`},UpdateTOTPUnchanged:{additionalProperties:!1,properties:{kind:{enum:[`unchanged`],type:`string`,"x-go-type":`string`}},required:[`kind`],type:`object`},ValueSource:{additionalProperties:!1,properties:{condition:{type:`string`},keyword:{type:`string`},kind:{type:`string`},line:{type:`integer`},path:{type:`string`},value:{type:`string`},winner:{type:`boolean`}},required:[`keyword`,`value`,`path`,`line`,`condition`,`kind`,`winner`],type:`object`},VaultAutoLockSettings:{additionalProperties:!1,properties:{mode:{description:`idleは無操作時間後、restartは手動ロックまたはengine終了時だけロックする。`,enum:[`idle`,`restart`],type:`string`},unit:{enum:[`minutes`,`hours`],type:`string`},value:{maximum:999,minimum:1,type:`integer`}},required:[`mode`],type:`object`},WorkspaceDefinition:{additionalProperties:!1,properties:{focusedPaneId:{type:`string`},layout:{$ref:`#/components/schemas/WorkspaceNode`},name:{maxLength:80,minLength:1,type:`string`}},required:[`name`,`layout`,`focusedPaneId`],type:`object`},WorkspaceList:{additionalProperties:!1,properties:{workspaces:{items:{$ref:`#/components/schemas/TerminalWorkspace`},type:`array`}},required:[`workspaces`],type:`object`},WorkspaceNode:{additionalProperties:!1,properties:{pane:{$ref:`#/components/schemas/WorkspacePane`},split:{$ref:`#/components/schemas/WorkspaceSplit`}},type:`object`,"x-sshc-exactly-one":[[`pane`,`split`]]},WorkspacePane:{additionalProperties:!1,properties:{alias:{type:`string`},id:{type:`string`},kind:{description:`Omitted by legacy SSH-only workspaces and interpreted as ssh.`,enum:[`ssh`,`shell`],type:`string`}},required:[`id`,`alias`],type:`object`},WorkspaceReconnectPane:{additionalProperties:!1,properties:{alias:{type:`string`},kind:{enum:[`ssh`,`shell`],type:`string`},paneId:{type:`string`},state:{enum:[`reconnect_required`],type:`string`}},required:[`paneId`,`alias`,`kind`,`state`],type:`object`},WorkspaceRestorePlan:{additionalProperties:!1,properties:{panes:{items:{$ref:`#/components/schemas/WorkspaceReconnectPane`},type:`array`},workspace:{$ref:`#/components/schemas/TerminalWorkspace`}},required:[`workspace`,`panes`],type:`object`},WorkspaceSplit:{additionalProperties:!1,properties:{direction:{enum:[`horizontal`,`vertical`],type:`string`},first:{$ref:`#/components/schemas/WorkspaceNode`},ratio:{maximum:90,minimum:10,type:`integer`},second:{$ref:`#/components/schemas/WorkspaceNode`}},required:[`direction`,`ratio`,`first`,`second`],type:`object`}},s=[{method:`POST`,path:`/api/v1/actions`,requestRequired:!0,request:{$ref:`#/components/schemas/IssueActionRequest`},responses:{201:{$ref:`#/components/schemas/IssueActionResponse`}}},{method:`GET`,path:`/api/v1/config/file`,responses:{200:{$ref:`#/components/schemas/FileContents`}}},{method:`POST`,path:`/api/v1/config/groups/delete`,requestRequired:!0,request:{$ref:`#/components/schemas/GroupDeleteRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`POST`,path:`/api/v1/config/groups/rename`,requestRequired:!0,request:{$ref:`#/components/schemas/GroupRenameRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`GET`,path:`/api/v1/config/host`,responses:{200:{$ref:`#/components/schemas/HostDetail`}}},{method:`GET`,path:`/api/v1/config/overview`,responses:{200:{$ref:`#/components/schemas/Overview`}}},{method:`POST`,path:`/api/v1/config/preview`,requestRequired:!0,request:{$ref:`#/components/schemas/EditRequest`},responses:{200:{$ref:`#/components/schemas/SavePreview`}}},{method:`POST`,path:`/api/v1/config/save`,requestRequired:!0,request:{$ref:`#/components/schemas/EditRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`PATCH`,path:`/api/v1/connections`,requestRequired:!0,request:{$ref:`#/components/schemas/UpdateConnectionRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`POST`,path:`/api/v1/connections`,requestRequired:!0,request:{$ref:`#/components/schemas/CreateConnectionRequest`},responses:{201:{$ref:`#/components/schemas/CreateConnectionResponse`}}},{method:`GET`,path:`/api/v1/connections/recent`,responses:{200:{$ref:`#/components/schemas/RecentConnectionList`}}},{method:`GET`,path:`/api/v1/credentials`,responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`POST`,path:`/api/v1/credentials/totp/{name}/codes`,responses:{200:{$ref:`#/components/schemas/TOTPCodeSet`}}},{method:`PUT`,path:`/api/v1/credentials/{kind}/assign`,requestRequired:!0,request:{$ref:`#/components/schemas/AssignCredentialRequest`},responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`DELETE`,path:`/api/v1/credentials/{kind}/assign/{subject}`,responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`DELETE`,path:`/api/v1/credentials/{kind}/{name}`,responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`PATCH`,path:`/api/v1/credentials/{kind}/{name}`,requestRequired:!0,request:{$ref:`#/components/schemas/UpdateCredentialRequest`},responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`PUT`,path:`/api/v1/credentials/{kind}/{name}`,requestRequired:!0,request:{$ref:`#/components/schemas/StoreCredentialRequest`},responses:{200:{$ref:`#/components/schemas/CredentialList`}}},{method:`POST`,path:`/api/v1/credentials/{kind}/{name}/reveal`,responses:{200:{$ref:`#/components/schemas/RevealCredentialResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/authentication`,requestRequired:!0,request:{$ref:`#/components/schemas/AuthenticationRequest`},responses:{200:{$ref:`#/components/schemas/AuthenticationResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/config`,responses:{200:{$ref:`#/components/schemas/ConfigCheckResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/effective`,requestRequired:!0,request:{$ref:`#/components/schemas/AliasRequest`},responses:{200:{$ref:`#/components/schemas/EffectiveResponse`}}},{method:`POST`,path:`/api/v1/diagnostics/reachability`,requestRequired:!0,request:{$ref:`#/components/schemas/AliasRequest`},responses:{200:{$ref:`#/components/schemas/ReachabilityResponse`}}},{method:`GET`,path:`/api/v1/health`,responses:{200:{$ref:`#/components/schemas/HealthResponse`}}},{method:`GET`,path:`/api/v1/history`,responses:{200:{$ref:`#/components/schemas/HistoryList`}}},{method:`POST`,path:`/api/v1/history/recover`,requestRequired:!0,request:{$ref:`#/components/schemas/RecoverRequest`},responses:{200:{$ref:`#/components/schemas/RecoverResponse`}}},{method:`POST`,path:`/api/v1/history/restore`,requestRequired:!0,request:{$ref:`#/components/schemas/RestoreRequest`},responses:{200:{$ref:`#/components/schemas/SaveResult`}}},{method:`GET`,path:`/api/v1/keys`,responses:{200:{$ref:`#/components/schemas/KeyInventoryResponse`}}},{method:`POST`,path:`/api/v1/keys`,requestRequired:!0,request:{$ref:`#/components/schemas/GenerateKeyRequest`},responses:{201:{$ref:`#/components/schemas/GenerateKeyResponse`}}},{method:`GET`,path:`/api/v1/keys/algorithms`,responses:{200:{$ref:`#/components/schemas/KeyAlgorithmsResponse`}}},{method:`POST`,path:`/api/v1/keys/hardware-command`,requestRequired:!0,request:{$ref:`#/components/schemas/HardwareCommandRequest`},responses:{200:{$ref:`#/components/schemas/HardwareCommandResponse`}}},{method:`DELETE`,path:`/api/v1/keys/{keyId}/agent`,responses:{200:{$ref:`#/components/schemas/AgentIdentitiesResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/agent`,requestRequired:!0,request:{$ref:`#/components/schemas/RegisterKeyRequest`},responses:{200:{$ref:`#/components/schemas/RegisterKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/location`,requestRequired:!0,request:{$ref:`#/components/schemas/RelocateKeyRequest`},responses:{200:{$ref:`#/components/schemas/RelocateKeyResponse`},409:{$ref:`#/components/schemas/RelocateKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/passphrase`,requestRequired:!0,request:{$ref:`#/components/schemas/ChangePassphraseRequest`},responses:{200:{$ref:`#/components/schemas/ChangePassphraseResponse`}}},{method:`GET`,path:`/api/v1/keys/{keyId}/public`,responses:{200:{$ref:`#/components/schemas/PublicKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/reveal`,responses:{200:{$ref:`#/components/schemas/RevealPrivateKeyResponse`}}},{method:`POST`,path:`/api/v1/keys/{keyId}/trash`,responses:{200:{$ref:`#/components/schemas/TrashKeyResponse`}}},{method:`GET`,path:`/api/v1/known-hosts`,responses:{200:{$ref:`#/components/schemas/KnownHostsResponse`}}},{method:`POST`,path:`/api/v1/known-hosts/add`,requestRequired:!0,request:{$ref:`#/components/schemas/KnownHostsAddRequest`},responses:{200:{$ref:`#/components/schemas/KnownHostsChangeResponse`}}},{method:`POST`,path:`/api/v1/known-hosts/delete`,requestRequired:!0,request:{$ref:`#/components/schemas/KnownHostsDeleteRequest`},responses:{200:{$ref:`#/components/schemas/KnownHostsChangeResponse`}}},{method:`POST`,path:`/api/v1/known-hosts/scan`,requestRequired:!0,request:{$ref:`#/components/schemas/KnownHostsScanRequest`},responses:{200:{$ref:`#/components/schemas/KnownHostsScanResponse`}}},{method:`GET`,path:`/api/v1/metadata`,responses:{200:{$ref:`#/components/schemas/Metadata`}}},{method:`PUT`,path:`/api/v1/metadata/engine`,requestRequired:!0,request:{$ref:`#/components/schemas/EngineSettings`},responses:{200:{$ref:`#/components/schemas/SettingsSaveResult`}}},{method:`PUT`,path:`/api/v1/metadata/shortcuts`,requestRequired:!0,request:{additionalProperties:!1,properties:{base:{items:{$ref:`#/components/schemas/ShortcutPreset`},maxItems:64,type:`array`},presets:{items:{$ref:`#/components/schemas/ShortcutPreset`},maxItems:64,type:`array`}},required:[`base`,`presets`],type:`object`},responses:{200:{$ref:`#/components/schemas/SettingsSaveResult`}}},{method:`PUT`,path:`/api/v1/metadata/terminal`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalSettings`},responses:{200:{$ref:`#/components/schemas/SettingsSaveResult`}}},{method:`GET`,path:`/api/v1/passwords`,responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/change`,requestRequired:!0,request:{$ref:`#/components/schemas/ChangeMasterPasswordRequest`},responses:{200:{$ref:`#/components/schemas/ChangeMasterPasswordResult`}}},{method:`POST`,path:`/api/v1/passwords/initialise`,requestRequired:!0,request:{$ref:`#/components/schemas/PassphraseRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/lock`,responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/recover-compatible-backup`,requestRequired:!0,request:{$ref:`#/components/schemas/PassphraseRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/reset-unsupported`,requestRequired:!0,request:{$ref:`#/components/schemas/ResetUnsupportedVaultRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`POST`,path:`/api/v1/passwords/unlock`,requestRequired:!0,request:{$ref:`#/components/schemas/PassphraseRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`DELETE`,path:`/api/v1/passwords/{alias}`,responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`PUT`,path:`/api/v1/passwords/{alias}`,requestRequired:!0,request:{$ref:`#/components/schemas/StorePasswordRequest`},responses:{200:{$ref:`#/components/schemas/PasswordVaultStatus`}}},{method:`GET`,path:`/api/v1/passwords/{alias}/eligibility`,responses:{200:{$ref:`#/components/schemas/PasswordEligibility`}}},{method:`POST`,path:`/api/v1/remote-keys/plan`,requestRequired:!0,request:{$ref:`#/components/schemas/RemoteKeyPlanRequest`},responses:{200:{$ref:`#/components/schemas/RemoteKeyPlan`}}},{method:`POST`,path:`/api/v1/remote-keys/register`,requestRequired:!0,request:{$ref:`#/components/schemas/RemoteKeyRegisterRequest`},responses:{200:{$ref:`#/components/schemas/RemoteKeyRegisterResponse`}}},{method:`POST`,path:`/api/v1/session/bootstrap`,responses:{200:{$ref:`#/components/schemas/BootstrapResponse`}}},{method:`POST`,path:`/api/v1/session/recover`,responses:{200:{$ref:`#/components/schemas/BootstrapResponse`}}},{method:`POST`,path:`/api/v1/session/renew`,responses:{200:{$ref:`#/components/schemas/BootstrapResponse`}}},{method:`GET`,path:`/api/v1/sftp/compare`,responses:{200:{$ref:`#/components/schemas/SFTPDirectoryComparison`}}},{method:`GET`,path:`/api/v1/sftp/local/entries`,responses:{200:{$ref:`#/components/schemas/SFTPLocalListing`}}},{method:`GET`,path:`/api/v1/sftp/transfers`,responses:{200:{$ref:`#/components/schemas/SFTPTransferJobList`}}},{method:`POST`,path:`/api/v1/sftp/transfers`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPCreateTransferJobRequest`},responses:{201:{$ref:`#/components/schemas/SFTPTransferJob`}}},{method:`DELETE`,path:`/api/v1/sftp/transfers/finished`,responses:{},noContent:[`204`]},{method:`PUT`,path:`/api/v1/sftp/transfers/settings`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPTransferSettingsRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJobList`}}},{method:`DELETE`,path:`/api/v1/sftp/transfers/{id}`,responses:{},noContent:[`204`]},{method:`POST`,path:`/api/v1/sftp/transfers/{id}/actions`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPTransferJobActionRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJob`}}},{method:`POST`,path:`/api/v1/sftp/transfers/{id}/download-checkpoint`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPDownloadCheckpointRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJob`}}},{method:`POST`,path:`/api/v1/sftp/transfers/{id}/queue-position`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPTransferQueueMoveRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTransferJobList`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/archive`,responses:{}},{method:`GET`,path:`/api/v1/sftp/{alias}/download`,responses:{},noContent:[`204`]},{method:`GET`,path:`/api/v1/sftp/{alias}/entries`,responses:{200:{$ref:`#/components/schemas/SFTPListing`}}},{method:`POST`,path:`/api/v1/sftp/{alias}/entries`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPCreateEntryRequest`},responses:{201:{$ref:`#/components/schemas/SFTPEntry`}}},{method:`DELETE`,path:`/api/v1/sftp/{alias}/entry`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`PATCH`,path:`/api/v1/sftp/{alias}/entry`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPRenameRequest`},responses:{200:{$ref:`#/components/schemas/SFTPEntry`}}},{method:`PATCH`,path:`/api/v1/sftp/{alias}/mode`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPChmodRequest`},responses:{200:{$ref:`#/components/schemas/SFTPEntry`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/preview`,responses:{}},{method:`GET`,path:`/api/v1/sftp/{alias}/search`,responses:{200:{$ref:`#/components/schemas/SFTPSearchResult`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/stats`,responses:{200:{$ref:`#/components/schemas/SFTPDirectoryStats`}}},{method:`GET`,path:`/api/v1/sftp/{alias}/text`,responses:{200:{$ref:`#/components/schemas/SFTPTextFile`}}},{method:`PUT`,path:`/api/v1/sftp/{alias}/text`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPSaveTextRequest`},responses:{200:{$ref:`#/components/schemas/SFTPTextFile`}}},{method:`DELETE`,path:`/api/v1/sftp/{alias}/uploads/{id}`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`PATCH`,path:`/api/v1/sftp/{alias}/uploads/{id}`,requestRequired:!0,responses:{200:{$ref:`#/components/schemas/SFTPResumableUpload`}}},{method:`POST`,path:`/api/v1/sftp/{alias}/uploads/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPStartUploadRequest`},responses:{200:{$ref:`#/components/schemas/SFTPResumableUpload`}}},{method:`POST`,path:`/api/v1/sftp/{alias}/uploads/{id}/complete`,requestRequired:!0,request:{$ref:`#/components/schemas/SFTPCompleteUploadRequest`},responses:{201:{$ref:`#/components/schemas/SFTPTransfer`}}},{method:`GET`,path:`/api/v1/snippets`,responses:{200:{$ref:`#/components/schemas/SnippetLibrary`}}},{method:`POST`,path:`/api/v1/snippets`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetDraft`},responses:{201:{$ref:`#/components/schemas/Snippet`}}},{method:`POST`,path:`/api/v1/snippets/jobs`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetExecuteRequest`},responses:{202:{$ref:`#/components/schemas/SnippetJob`}}},{method:`DELETE`,path:`/api/v1/snippets/jobs/{id}`,responses:{202:{$ref:`#/components/schemas/SnippetJob`}}},{method:`GET`,path:`/api/v1/snippets/jobs/{id}`,responses:{200:{$ref:`#/components/schemas/SnippetJob`}}},{method:`POST`,path:`/api/v1/snippets/preview`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetPreviewRequest`},responses:{200:{$ref:`#/components/schemas/SnippetPreview`}}},{method:`PUT`,path:`/api/v1/snippets/startup/{alias}`,requestRequired:!0,request:{$ref:`#/components/schemas/StartupSnippetRequest`},responses:{200:{$ref:`#/components/schemas/SnippetLibrary`}}},{method:`DELETE`,path:`/api/v1/snippets/{id}`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`PUT`,path:`/api/v1/snippets/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/SnippetDraft`},responses:{200:{$ref:`#/components/schemas/Snippet`}}},{method:`GET`,path:`/api/v1/sync`,responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`PUT`,path:`/api/v1/sync/auto`,requestRequired:!0,request:{$ref:`#/components/schemas/AutoSyncRequest`},responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`GET`,path:`/api/v1/sync/bucket`,responses:{200:{$ref:`#/components/schemas/SyncBucketStatus`}}},{method:`GET`,path:`/api/v1/sync/exclusions`,responses:{200:{$ref:`#/components/schemas/SyncExclusions`}}},{method:`PUT`,path:`/api/v1/sync/exclusions`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncExclusionsRequest`},responses:{200:{$ref:`#/components/schemas/SyncExclusions`}}},{method:`POST`,path:`/api/v1/sync/force-push`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncPushRequest`},responses:{200:{$ref:`#/components/schemas/PushResponse`}}},{method:`GET`,path:`/api/v1/sync/history`,responses:{200:{$ref:`#/components/schemas/SyncHistory`}}},{method:`POST`,path:`/api/v1/sync/history/diff`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncHistoryDiffRequest`},responses:{200:{$ref:`#/components/schemas/SyncHistoryDiff`}}},{method:`PUT`,path:`/api/v1/sync/key`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncKeyRequest`},responses:{200:{$ref:`#/components/schemas/SyncKeyResponse`}}},{method:`POST`,path:`/api/v1/sync/now`,responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`POST`,path:`/api/v1/sync/pull`,requestRequired:!0,request:{$ref:`#/components/schemas/PullRequest`},responses:{200:{$ref:`#/components/schemas/PullResponse`}}},{method:`GET`,path:`/api/v1/sync/push`,responses:{200:{$ref:`#/components/schemas/SyncPushDraft`}}},{method:`POST`,path:`/api/v1/sync/push`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncPushRequest`},responses:{200:{$ref:`#/components/schemas/PushResponse`}}},{method:`PUT`,path:`/api/v1/sync/settings`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncSettingsRequest`},responses:{200:{$ref:`#/components/schemas/SyncStatus`}}},{method:`PUT`,path:`/api/v1/sync/setup`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncSetupRequest`},responses:{200:{$ref:`#/components/schemas/SyncSetupResponse`}}},{method:`POST`,path:`/api/v1/sync/setup/check`,requestRequired:!0,request:{$ref:`#/components/schemas/SyncSetupCheckRequest`},responses:{200:{$ref:`#/components/schemas/SyncSetupCheckResponse`}}},{method:`GET`,path:`/api/v1/terminal/backgrounds`,responses:{200:{$ref:`#/components/schemas/TerminalBackgroundList`}}},{method:`POST`,path:`/api/v1/terminal/backgrounds`,requestRequired:!0,responses:{201:{$ref:`#/components/schemas/TerminalBackground`}}},{method:`PUT`,path:`/api/v1/terminal/backgrounds/capacity`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalBackgroundCapacityRequest`},responses:{200:{$ref:`#/components/schemas/TerminalBackgroundList`}}},{method:`DELETE`,path:`/api/v1/terminal/backgrounds/{name}`,responses:{},noContent:[`204`]},{method:`GET`,path:`/api/v1/terminal/backgrounds/{name}`,responses:{}},{method:`PATCH`,path:`/api/v1/terminal/backgrounds/{name}`,requestRequired:!0,request:{$ref:`#/components/schemas/RenameTerminalBackgroundRequest`},responses:{200:{$ref:`#/components/schemas/TerminalBackground`}}},{method:`POST`,path:`/api/v1/terminal/commands`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalCommandDispatchRequest`},responses:{200:{$ref:`#/components/schemas/TerminalCommandDispatchResponse`}}},{method:`POST`,path:`/api/v1/terminal/commands/preview`,requestRequired:!0,request:{$ref:`#/components/schemas/TerminalCommandPreviewRequest`},responses:{200:{$ref:`#/components/schemas/TerminalCommandPreview`}}},{method:`GET`,path:`/api/v1/terminal/sessions`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions`,requestRequired:!0,request:{$ref:`#/components/schemas/OpenTerminalSessionRequest`},responses:{201:{$ref:`#/components/schemas/OpenTerminalSessionResponse`}}},{method:`DELETE`,path:`/api/v1/terminal/sessions/{id}`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`PATCH`,path:`/api/v1/terminal/sessions/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/RenameTerminalSessionRequest`},responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`GET`,path:`/api/v1/terminal/sessions/{id}/control`,responses:{200:{$ref:`#/components/schemas/TerminalControlResponse`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/forwards`,requestRequired:!0,request:{$ref:`#/components/schemas/StartTerminalForwardRequest`},responses:{201:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`DELETE`,path:`/api/v1/terminal/sessions/{id}/forwards/{forwardId}`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/reconnect`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/reconnect/stop`,responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`POST`,path:`/api/v1/terminal/sessions/{id}/stream`,responses:{201:{$ref:`#/components/schemas/TerminalStreamTicket`}}},{method:`PUT`,path:`/api/v1/terminal/sessions/{id}/title`,requestRequired:!0,request:{$ref:`#/components/schemas/SetTerminalSessionTitleRequest`},responses:{200:{$ref:`#/components/schemas/TerminalSessionList`}}},{method:`GET`,path:`/api/v1/terminal/shell-profiles`,responses:{200:{$ref:`#/components/schemas/LocalShellProfileList`}}},{method:`GET`,path:`/api/v1/trash`,responses:{200:{$ref:`#/components/schemas/TrashListResponse`}}},{method:`DELETE`,path:`/api/v1/trash/{entryId}`,responses:{200:{$ref:`#/components/schemas/PurgeTrashResponse`}}},{method:`POST`,path:`/api/v1/trash/{entryId}/restore`,responses:{200:{$ref:`#/components/schemas/RestoreTrashResponse`},409:{$ref:`#/components/schemas/RestoreTrashResponse`}}},{method:`GET`,path:`/api/v1/update`,responses:{200:{$ref:`#/components/schemas/UpdateStatus`}}},{method:`GET`,path:`/api/v1/workspaces`,responses:{200:{$ref:`#/components/schemas/WorkspaceList`}}},{method:`POST`,path:`/api/v1/workspaces`,requestRequired:!0,request:{$ref:`#/components/schemas/WorkspaceDefinition`},responses:{201:{$ref:`#/components/schemas/TerminalWorkspace`}}},{method:`DELETE`,path:`/api/v1/workspaces/{id}`,responses:{200:{$ref:`#/components/schemas/ChangedResponse`}}},{method:`GET`,path:`/api/v1/workspaces/{id}`,responses:{200:{$ref:`#/components/schemas/TerminalWorkspace`}}},{method:`PUT`,path:`/api/v1/workspaces/{id}`,requestRequired:!0,request:{$ref:`#/components/schemas/WorkspaceDefinition`},responses:{200:{$ref:`#/components/schemas/TerminalWorkspace`}}},{method:`POST`,path:`/api/v1/workspaces/{id}/restore`,responses:{200:{$ref:`#/components/schemas/WorkspaceRestorePlan`}}}];function c(){throw Error(`invalid_response`)}function l(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function u(e){let t=e.$ref;return typeof t==`string`?t.startsWith(`#/components/schemas/`)?o[t.slice(21)]??c():c():e}function ee(e,t){return e===void 0||e===`binary`||e!==`date-time`||/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(t)&&Number.isFinite(Date.parse(t))}function d(e,t,n=0){n>128&&c();let r=u(e);if(t===null&&r.nullable===!0)return;let i=r.oneOf;if(Array.isArray(i)){let e=0;for(let r of i)try{d(r,t,n+1),e++}catch{}e!==1&&c();return}let a=r.anyOf;if(Array.isArray(a)){for(let e of a)try{d(e,t,n+1);return}catch{}c()}let o=r.allOf;if(Array.isArray(o)){for(let e of o)d(e,t,n+1);return}let s=r.enum;switch(Array.isArray(s)&&!s.some(e=>Object.is(e,t))&&c(),r.type){case`string`:typeof t!=`string`&&c(),typeof r.minLength==`number`&&t.lengthr.maxLength&&c(),typeof r.pattern==`string`&&!new RegExp(r.pattern,`u`).test(t)&&c(),ee(r.format,t)||c();return;case`integer`:(typeof t!=`number`||!Number.isSafeInteger(t))&&c(),r.format===`uint64`&&t<0&&c(),f(r,t);return;case`number`:(typeof t!=`number`||!Number.isFinite(t))&&c(),f(r,t);return;case`boolean`:typeof t!=`boolean`&&c();return;case`array`:if(Array.isArray(t)||c(),typeof r.minItems==`number`&&t.lengthr.maxItems&&c(),r.uniqueItems===!0){let e=t.map(e=>JSON.stringify(e));new Set(e).size!==e.length&&c()}if(l(r.items)!==null)for(let e of t)d(r.items,e,n+1);return;case`object`:case void 0:te(r,t,n);return;default:c()}}function f(e,t){typeof e.minimum==`number`&&te.maximum&&c(),typeof e.exclusiveMinimum==`number`&&t<=e.exclusiveMinimum&&c(),typeof e.exclusiveMaximum==`number`&&t>=e.exclusiveMaximum&&c()}function te(e,t,n){let r=l(t);r===null&&c();let i=l(e.properties)??{},a=Array.isArray(e.required)?e.required:[];for(let e of a)(typeof e!=`string`||!Object.hasOwn(r,e))&&c();for(let[t,a]of Object.entries(r)){let r=i[t];if(l(r)!==null){d(r,a,n+1);continue}e.additionalProperties===!1&&c(),l(e.additionalProperties)!==null&&d(e.additionalProperties,a,n+1)}let o=e[`x-sshc-less-than-or-equal`];if(Array.isArray(o))for(let e of o){(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`||typeof e[1]!=`string`)&&c();let t=r[e[0]],n=r[e[1]];(typeof t!=`number`||typeof n!=`number`||t>n)&&c()}let s=e[`x-sshc-exactly-one`];if(Array.isArray(s))for(let e of s)(!Array.isArray(e)||e.length<2||e.some(e=>typeof e!=`string`))&&c(),e.filter(e=>Object.hasOwn(r,e)).length!==1&&c()}function p(e,t){let n=e.split(`/`),r=t.split(`/`);return n.length===r.length&&n.every((e,t)=>/^\{[^}]+\}$/.test(e)?(r[t]?.length??0)>0:e===r[t])}function m(e,t){return s.find(n=>n.method===e.toUpperCase()&&p(n.path,t))}function h(e,t){return d(o[e],t),t}function ne(e,t,n){let r=m(e,t);r!==void 0&&(r.request===void 0&&c(),d(r.request,n))}function g(e,t,n,r){let i=m(e,t);if(i===void 0)return r;if(i.noContent?.includes(String(n))===!0)return r!==void 0&&c(),r;let a=i?.responses[String(n)]??i?.responses.default;return a===void 0&&c(),d(a,r),r}var _=`sshc.session.csrf`,v=`sshc.browser.registration.v1`;function y(e){return typeof e==`string`&&/^[A-Za-z0-9_-]{43}$/.test(e)}function re(e=window.sessionStorage){try{let t=e.getItem(_);if(y(t))return t;t!==null&&e.removeItem(_)}catch{}return``}function b(e,t=window.sessionStorage){if(y(e))try{t.setItem(_,e)}catch{}}function x(e=window.sessionStorage){try{e.removeItem(_)}catch{}}function S(e=window.localStorage){try{let t=e.getItem(v);if(y(t))return t;t!==null&&e.removeItem(v)}catch{}return``}function C(e,t=window.localStorage){if(y(e))try{t.setItem(v,e)}catch{}}function w(e=window.localStorage){try{e.removeItem(v)}catch{}}function T(e){try{return h(`BootstrapResponse`,e),!0}catch{return!1}}async function E(e){let t=S();if(t===``)throw Error(`session_expired`);let n=await e(`/api/v1/session/recover`,{method:`POST`,credentials:`same-origin`,headers:{"X-SSHC-Browser":t}});if(!n.ok)throw n.status===401&&w(),Error(`session_expired`);let r=await n.json();if(!T(r))throw Error(`invalid_bootstrap_response`);return r.browserToken!==void 0&&C(r.browserToken),b(r.csrfToken),{csrfToken:r.csrfToken}}async function ie(e,t,n){let r=new URLSearchParams(e.hash.replace(/^#/,``)).get(`bootstrap`)??``;if(r===``){let e=re();if(e!==``){let t=await n(`/api/v1/session/renew`,{method:`POST`,credentials:`same-origin`,headers:{"X-SSHC-CSRF":e}});if(t.ok){let e=await t.json();if(!T(e))throw x(),Error(`invalid_bootstrap_response`);return b(e.csrfToken),{csrfToken:e.csrfToken}}x()}return E(n)}if(!/^[A-Za-z0-9_-]{43}$/.test(r))throw Error(`invalid_bootstrap_fragment`);t.replaceState(null,``,`${e.pathname}${e.search}`);let i={"X-SSHC-Bootstrap":r},a=S();a!==``&&(i[`X-SSHC-Browser`]=a);let o=await n(`/api/v1/session/bootstrap`,{method:`POST`,credentials:`same-origin`,headers:i});if(!o.ok){if((o.status===401||o.status===409)&&S()!==``)return E(n);throw Error(`bootstrap_rejected`)}let s=await o.json();if(!T(s))throw Error(`invalid_bootstrap_response`);return s.browserToken!==void 0&&C(s.browserToken),b(s.csrfToken),{csrfToken:s.csrfToken}}var D=class extends Error{code;status;problem;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=e,this.status=t,this.problem=n}};function ae(e){return e instanceof D?e.code:``}async function O(e){try{return h(`Problem`,await e.json())}catch{return null}}var k=null,A=null,j=null,M=new WeakSet;function oe(e){k=e}function N(e){A=e}function se(e){j=e}function P(e){try{return new URL(e,window.location.origin).pathname}catch{return`/api`}}function F(e){[`vault_locked`,`session_required`,`invalid_session`,`invalid_csrf`].includes(e.code)||e.status>=400&&e.status<500||e.code!==`update_check_failed`&&j?.(e)}function I(e,t){F({code:`network_request_failed`,status:0,method:e,path:P(t)})}function L(e,t,n,r){if(M.has(e))return;M.add(e);let i=t?.code??`request_failed`,a=t?.detail;F({code:i,status:e.status,method:n,path:P(r),...typeof a==`string`&&a!==``?{detail:a}:{}})}async function R(e,t,n,r={}){let i=await O(e),a=i?.code??`request_failed`;return a===`vault_locked`&&k?.(),r.locallyHandledCodes?.includes(a)||L(e,i,t,n),new D(a,e.status,i)}function ce(e){try{return h(`HealthResponse`,e)}catch{throw Error(`invalid_health_response`)}}var z=null,B=null;function V(e){try{return h(`BootstrapResponse`,e),!0}catch{return!1}}function H(e){return new URL(e,window.location.origin).pathname}async function U(e,t,n){let r=await e.json();return g(t,H(n),e.status,r)}function W(e,t,n){if(!new Headers(n.headers).get(`Content-Type`)?.toLowerCase().startsWith(`application/json`)||typeof n.body!=`string`)return;let r;try{r=JSON.parse(n.body)}catch{throw Error(`invalid_request`)}ne(e,H(t),r)}function G(e){e!==void 0&&z!==e||(z=null,x(),A?.())}async function le(e){if(z!==e)return z!==null;if(B?.token===e)return B.promise;let t=Symbol(`csrf-renewal`),n=(async()=>{try{let t=await fetch(`/api/v1/session/renew`,{method:`POST`,credentials:`same-origin`,headers:{"X-SSHC-CSRF":e}});if(z!==e)return z!==null;if(!t.ok)return G(e),!1;let n=await U(t,`POST`,`/api/v1/session/renew`);return V(n)?(z=n.csrfToken,b(n.csrfToken),!0):(G(e),!1)}catch{return G(e),!1}finally{B?.attempt===t&&(B=null)}})();return B={token:e,attempt:t,promise:n},n}async function ue(e){return e.status!==401&&e.status!==403?``:(await O(e.clone()))?.code??``}async function K(e,t,n,r=!0){let i=new Headers(t.headers);i.set(`X-SSHC-CSRF`,n);let a=await fetch(e,{...t,credentials:`same-origin`,headers:i}),o=await ue(a);if(a.status===401&&(o===`session_required`||o===`invalid_session`)){let i=z;return r&&i!==null&&i!==n?K(e,t,i,!1):(G(n),a)}if(a.status!==403||o!==`invalid_csrf`)return a;if(!r)return G(n),a;if(z===n&&!await le(n))return a;let s=z;return s===null?a:K(e,t,s,!1)}var q={setCSRF(e){z=e},clear(){z=null,B=null,x()},async health(){let e;try{e=await fetch(`/api/v1/health`,{credentials:`same-origin`})}catch(e){throw I(`GET`,`/api/v1/health`),e}if(!e.ok)throw await R(e,`GET`,`/api/v1/health`);return ce(await e.json())},async read(e,t={}){if(!z)throw Error(`csrf_unavailable`);let n;try{n=await K(e,{},z)}catch(t){throw I(`GET`,e),t}if(!n.ok)throw await R(n,`GET`,e,t);return U(n,`GET`,e)},async send(e,t,n={}){if(new URL(e,window.location.origin).origin!==window.location.origin)throw Error(`cross_origin_api_mutation`);if(!z)throw Error(`csrf_unavailable`);let r=t.method??`POST`;W(r,e,t);let i;try{i=await K(e,t,z)}catch(t){throw I(r,e),t}if(!i.ok){let t=await O(i.clone());n.locallyHandledCodes?.includes(t?.code??`request_failed`)||L(i,t,r,e)}return i},async mutate(e,t,n={}){let r=t.method??`POST`,i=await this.send(e,t,n);if(!i.ok)throw await R(i,r,e,n);return i.status===204?g(r,H(e),i.status,void 0):U(i,r,e)}};function J(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`invalid_response`);return e}function de(e){if(!Array.isArray(e))throw Error(`invalid_response`);return e}function Y(e){if(typeof e!=`string`)throw Error(`invalid_response`);return e}function fe(e){if(typeof e!=`number`)throw Error(`invalid_response`);return e}var X={"Content-Type":`application/json`};function pe(e){return e instanceof D&&e.problem!==null?e.problem:e instanceof D?{code:e.code,message:`request rejected`}:{code:`request_failed`,message:`request rejected`}}async function me(e,t){return Y(J(await q.mutate(`/api/v1/actions`,{method:`POST`,headers:X,body:JSON.stringify({kind:e,target:t})})).token)}function Z(e,t){let n={...X};return t.actionToken&&(n[`X-SSHC-Action`]=t.actionToken),q.mutate(e,{method:t.method,headers:n,body:JSON.stringify(t.body)},t.locallyHandledCodes===void 0?{}:{locallyHandledCodes:t.locallyHandledCodes})}function he(e,t,n,r){return Z(e,{method:`POST`,body:t,...n===void 0?{}:{actionToken:n},...r===void 0?{}:{locallyHandledCodes:r}})}function ge(e,t,n){return Z(e,{method:`PUT`,body:t,...n===void 0?{}:{locallyHandledCodes:n}})}function _e(e,t,n){return Z(e,{method:`PATCH`,body:t,...n===void 0?{}:{actionToken:n}})}async function Q(e){return q.mutate(e,{method:`POST`})}var ve=e(),$=t();function ye({as:e,children:t,padded:n=!1,radius:r=`lg`,tone:i=`card`,overflow:a=`hidden`,className:o=``,...s}){return(0,$.jsx)(e??`div`,{className:`sshc-card ${a===`visible`?`overflow-visible`:a===`x-auto`?`overflow-x-auto`:`overflow-hidden`} ${r===`sm`?`rounded`:r===`md`?`rounded-md`:`rounded-lg`} ${i===`notice`?`bg-notice`:i===`subtle`?`bg-surface-subtle`:`bg-card`} ${n?`flex flex-col gap-3 p-3`:``} ${o}`,...s,children:t})}function be({label:e,children:t,hint:n,warning:r,action:a,stackOnNarrow:o=!1,interactiveChildren:s=!1}){let c=o?`flex flex-col items-stretch gap-2 px-3 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2`:`flex items-center gap-3 px-3 py-2`,l=o?`flex min-w-0 flex-1 flex-col items-stretch gap-1.5 sm:flex-row sm:items-center sm:gap-3`:`flex min-w-0 flex-1 items-center gap-3`,u=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`${o?`w-full sm:w-32`:`w-32`} shrink-0 text-sm text-ink-muted`,children:e}),(0,$.jsx)(`span`,{className:`${o?`w-full sm:w-auto`:`ml-auto`} flex min-w-0 flex-1 justify-end`,children:t})]});return(0,$.jsxs)(`div`,{className:`border-t border-hairline first:border-t-0`,children:[(0,$.jsxs)(`div`,{className:c,children:[s?(0,$.jsx)(`div`,{className:l,children:u}):(0,$.jsx)(`label`,{className:l,children:u}),a===void 0?null:(0,$.jsx)(`span`,{className:`shrink-0`,children:a})]}),n===void 0?null:(0,$.jsx)(`p`,{className:`px-3 pb-2 ${i}`,children:n}),r===void 0?null:(0,$.jsx)(`p`,{role:`status`,className:`px-3 pb-2 text-xs text-notice-ink`,children:r})]})}function xe({children:e,tone:t=`notice`,compact:n=!1}){let r=t===`danger`;return(0,$.jsx)(`p`,{role:r?`alert`:`status`,className:`flex items-center gap-2 rounded-md border ${n?`px-2 py-1.5 text-xs`:`px-3 py-2 text-sm`} ${r?`border-control-line text-danger`:`border-notice-line bg-notice text-notice-ink`}`,children:e})}function Se({label:e,value:t,options:n,onChange:r}){return(0,$.jsx)(`div`,{role:`group`,"aria-label":e,className:`flex overflow-hidden rounded-md border border-line bg-control`,children:n.map(e=>(0,$.jsx)(`button`,{type:`button`,"aria-pressed":t===e.value,onClick:()=>r(e.value),className:`border-r border-line px-2.5 py-1 text-xs transition-colors last:border-r-0 ${t===e.value?`bg-select-fill font-medium text-accent`:`text-ink-muted hover:bg-hover hover:text-ink`}`,children:e.label},e.value))})}var Ce=(0,ve.forwardRef)(function({kind:e=`secondary`,className:t=``,type:i=`button`,...o},s){return(0,$.jsx)(`button`,{ref:s,type:i,className:`${e===`primary`?r:e===`danger`?n:a} ${t}`,...o})});export{ie as C,N as S,D as _,Se as a,oe as b,J as c,X as d,_e as f,pe as g,ge as h,be as i,Y as l,he as m,ye as n,de as o,Q as p,xe as r,fe as s,Ce as t,me as u,q as v,h as w,se as x,ae as y}; \ No newline at end of file diff --git a/internal/ui/dist/assets/tableSort-CcSWRQGj.js b/internal/ui/dist/assets/tableSort-Bd9PEJHh.js similarity index 88% rename from internal/ui/dist/assets/tableSort-CcSWRQGj.js rename to internal/ui/dist/assets/tableSort-Bd9PEJHh.js index c3a8d4a77..973b011e3 100644 --- a/internal/ui/dist/assets/tableSort-CcSWRQGj.js +++ b/internal/ui/dist/assets/tableSort-Bd9PEJHh.js @@ -1 +1 @@ -import{t as e}from"./jsx-runtime-QtymfJMM.js";import{_ as t}from"./form-C1olpQVF.js";var n=e();function r(e,t,n){return{key:n,direction:e===n&&t===`ascending`?`descending`:`ascending`}}function i(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function a(e,t,n){let r=n===`ascending`?1:-1;return e.map((e,t)=>({item:e,index:t})).sort((e,n)=>r*t(e.item,n.item)||e.index-n.index).map(({item:e})=>e)}function o({column:e,activeColumn:r,direction:i,onSort:a,className:o=``,buttonClassName:s=``,children:c}){let l=t(),u=e===r,d=u&&i===`ascending`?`descending`:`ascending`;return(0,n.jsx)(`th`,{scope:`col`,"aria-sort":u?i:`none`,className:o,children:(0,n.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:`inline-flex w-full items-center gap-1 text-inherit ${s}`,children:[(0,n.jsx)(`span`,{children:c}),(0,n.jsx)(`span`,{"aria-hidden":`true`,className:u?`text-accent`:`text-ink-faint`,children:u?i===`ascending`?`↑`:`↓`:`↕`}),(0,n.jsx)(`span`,{className:`sr-only`,children:l(d===`ascending`?`table.sortAscending`:`table.sortDescending`)})]})})}export{a as i,i as n,r,o as t}; \ No newline at end of file +import{t as e}from"./jsx-runtime-BOsSdQ68.js";import{_ as t}from"./form-zbLY2cuV.js";var n=e();function r(e,t,n){return{key:n,direction:e===n&&t===`ascending`?`descending`:`ascending`}}function i(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function a(e,t,n){let r=n===`ascending`?1:-1;return e.map((e,t)=>({item:e,index:t})).sort((e,n)=>r*t(e.item,n.item)||e.index-n.index).map(({item:e})=>e)}function o({column:e,activeColumn:r,direction:i,onSort:a,className:o=``,buttonClassName:s=``,children:c}){let l=t(),u=e===r,d=u&&i===`ascending`?`descending`:`ascending`;return(0,n.jsx)(`th`,{scope:`col`,"aria-sort":u?i:`none`,className:o,children:(0,n.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:`inline-flex w-full items-center gap-1 text-inherit ${s}`,children:[(0,n.jsx)(`span`,{children:c}),(0,n.jsx)(`span`,{"aria-hidden":`true`,className:u?`text-accent`:`text-ink-faint`,children:u?i===`ascending`?`↑`:`↓`:`↕`}),(0,n.jsx)(`span`,{className:`sr-only`,children:l(d===`ascending`?`table.sortAscending`:`table.sortDescending`)})]})})}export{a as i,i as n,r,o as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/typescript-CKpXzKI4.js b/internal/ui/dist/assets/typescript-BGLra-jT.js similarity index 98% rename from internal/ui/dist/assets/typescript-CKpXzKI4.js rename to internal/ui/dist/assets/typescript-BGLra-jT.js index 45c61318d..e49524735 100644 --- a/internal/ui/dist/assets/typescript-CKpXzKI4.js +++ b/internal/ui/dist/assets/typescript-BGLra-jT.js @@ -1 +1 @@ -import{o as e}from"./editor.api-BUrKrayv.js";var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:` * `}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:` * `}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`/**`,close:` */`,notIn:[`string`]}],folding:{markers:{start:RegExp(`^\\s*//\\s*#?region\\b`),end:RegExp(`^\\s*//\\s*#?endregion\\b`)}}},n={defaultToken:`invalid`,tokenPostfix:`.ts`,keywords:`abstract.any.as.asserts.bigint.boolean.break.case.catch.class.continue.const.constructor.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.infer.instanceof.interface.is.keyof.let.module.namespace.never.new.null.number.object.out.package.private.protected.public.override.readonly.require.global.return.satisfies.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.undefined.unique.unknown.var.void.while.with.yield.async.await.of`.split(`.`),operators:`<=.>=.==.!=.===.!==.=>.+.-.**.*./.%.++.--.<<.>.>>>.&.|.^.!.~.&&.||.??.?.:.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.@`.split(`.`),symbols:/[=>](?!@symbols)/,`@brackets`],[/!(?=([^=]|$))/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/(@digits)[eE]([\-+]?(@digits))?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,`number.float`],[/0[xX](@hexdigits)n?/,`number.hex`],[/0[oO]?(@octaldigits)n?/,`number.octal`],[/0[bB](@binarydigits)n?/,`number.binary`],[/(@digits)n?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string_double`],[/'/,`string`,`@string_single`],[/`/,`string`,`@string_backtick`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@jsdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],jsdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,[`regexp.escape.control`,`regexp.escape.control`,`regexp.escape.control`]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[`regexp.escape.control`,{token:`regexp.escape.control`,next:`@regexrange`}]],[/(\()(\?:|\?=|\?!)/,[`regexp.escape.control`,`regexp.escape.control`]],[/[()]/,`regexp.escape.control`],[/@regexpctl/,`regexp.escape.control`],[/[^\\\/]/,`regexp`],[/@regexpesc/,`regexp.escape`],[/\\\./,`regexp.invalid`],[/(\/)([dgimsuy]*)/,[{token:`regexp`,bracket:`@close`,next:`@pop`},`keyword.other`]]],regexrange:[[/-/,`regexp.escape.control`],[/\^/,`regexp.invalid`],[/@regexpesc/,`regexp.escape`],[/[^\]]/,`regexp`],[/\]/,{token:`regexp.escape.control`,next:`@pop`,bracket:`@close`}]],string_double:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],string_single:[[/[^\\']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/'/,`string`,`@pop`]],string_backtick:[[/\$\{/,{token:`delimiter.bracket`,next:`@bracketCounting`}],[/[^\\`$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/`/,`string`,`@pop`]],bracketCounting:[[/\{/,`delimiter.bracket`,`@bracketCounting`],[/\}/,`delimiter.bracket`,`@pop`],{include:`common`}]}};export{t as conf,n as language}; \ No newline at end of file +import{o as e}from"./editor.api-BJ0kNDCq.js";var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:` * `}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:` * `}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`/**`,close:` */`,notIn:[`string`]}],folding:{markers:{start:RegExp(`^\\s*//\\s*#?region\\b`),end:RegExp(`^\\s*//\\s*#?endregion\\b`)}}},n={defaultToken:`invalid`,tokenPostfix:`.ts`,keywords:`abstract.any.as.asserts.bigint.boolean.break.case.catch.class.continue.const.constructor.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.infer.instanceof.interface.is.keyof.let.module.namespace.never.new.null.number.object.out.package.private.protected.public.override.readonly.require.global.return.satisfies.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.undefined.unique.unknown.var.void.while.with.yield.async.await.of`.split(`.`),operators:`<=.>=.==.!=.===.!==.=>.+.-.**.*./.%.++.--.<<.>.>>>.&.|.^.!.~.&&.||.??.?.:.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.@`.split(`.`),symbols:/[=>](?!@symbols)/,`@brackets`],[/!(?=([^=]|$))/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/(@digits)[eE]([\-+]?(@digits))?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,`number.float`],[/0[xX](@hexdigits)n?/,`number.hex`],[/0[oO]?(@octaldigits)n?/,`number.octal`],[/0[bB](@binarydigits)n?/,`number.binary`],[/(@digits)n?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string_double`],[/'/,`string`,`@string_single`],[/`/,`string`,`@string_backtick`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@jsdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],jsdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,[`regexp.escape.control`,`regexp.escape.control`,`regexp.escape.control`]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[`regexp.escape.control`,{token:`regexp.escape.control`,next:`@regexrange`}]],[/(\()(\?:|\?=|\?!)/,[`regexp.escape.control`,`regexp.escape.control`]],[/[()]/,`regexp.escape.control`],[/@regexpctl/,`regexp.escape.control`],[/[^\\\/]/,`regexp`],[/@regexpesc/,`regexp.escape`],[/\\\./,`regexp.invalid`],[/(\/)([dgimsuy]*)/,[{token:`regexp`,bracket:`@close`,next:`@pop`},`keyword.other`]]],regexrange:[[/-/,`regexp.escape.control`],[/\^/,`regexp.invalid`],[/@regexpesc/,`regexp.escape`],[/[^\]]/,`regexp`],[/\]/,{token:`regexp.escape.control`,next:`@pop`,bracket:`@close`}]],string_double:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],string_single:[[/[^\\']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/'/,`string`,`@pop`]],string_backtick:[[/\$\{/,{token:`delimiter.bracket`,next:`@bracketCounting`}],[/[^\\`$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/`/,`string`,`@pop`]],bracketCounting:[[/\{/,`delimiter.bracket`,`@bracketCounting`],[/\}/,`delimiter.bracket`,`@pop`],{include:`common`}]}};export{t as conf,n as language}; \ No newline at end of file diff --git a/internal/ui/dist/assets/useAsyncOperation-DcaEx5AT.js b/internal/ui/dist/assets/useAsyncOperation-DcaEx5AT.js new file mode 100644 index 000000000..32359bde3 --- /dev/null +++ b/internal/ui/dist/assets/useAsyncOperation-DcaEx5AT.js @@ -0,0 +1 @@ +import{o as e}from"./jsx-runtime-BOsSdQ68.js";var t=e();function n(){let[e,n]=(0,t.useState)(!1),[r,i]=(0,t.useState)(``),[a,o]=(0,t.useState)(!1),s=(0,t.useCallback)(()=>o(!1),[]),c=(0,t.useCallback)(()=>i(``),[]),l=(0,t.useCallback)(e=>{i(e),o(!1)},[]),u=(0,t.useCallback)(async(e,t={})=>{n(!0),i(``),o(!1);try{let n=await e();return t.apply?.(n),o(!0),!0}catch(e){return i(t.describe?t.describe(e):e instanceof Error?e.message:``),!1}finally{n(!1)}},[]);return(0,t.useMemo)(()=>({busy:e,error:r,saved:a,touch:s,fail:l,clearError:c,run:u}),[e,r,a,s,l,c,u])}export{n as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/yaml-B1CYWq_z.js b/internal/ui/dist/assets/yaml-DRNvN4jR.js similarity index 98% rename from internal/ui/dist/assets/yaml-B1CYWq_z.js rename to internal/ui/dist/assets/yaml-DRNvN4jR.js index 02fe50dc2..0e8efe1f7 100644 --- a/internal/ui/dist/assets/yaml-B1CYWq_z.js +++ b/internal/ui/dist/assets/yaml-DRNvN4jR.js @@ -1 +1 @@ -import{o as e}from"./editor.api-BUrKrayv.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language}; \ No newline at end of file +import{o as e}from"./editor.api-BJ0kNDCq.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language}; \ No newline at end of file diff --git a/internal/ui/dist/index.html b/internal/ui/dist/index.html index 54f8ec173..a6dfdfd0c 100644 --- a/internal/ui/dist/index.html +++ b/internal/ui/dist/index.html @@ -11,10 +11,10 @@ sshc - - - - + + + + diff --git a/web/e2e/menu.spec.ts b/web/e2e/menu.spec.ts index 241ba5c41..b56c26b50 100644 --- a/web/e2e/menu.spec.ts +++ b/web/e2e/menu.spec.ts @@ -67,5 +67,5 @@ test("keeps sessions in the sidebar and moves product navigation to the Menu pag } await openLocalShell(page); await expect(page).toHaveURL(/\/terminal$/); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); }); diff --git a/web/e2e/mobile-ux.spec.ts b/web/e2e/mobile-ux.spec.ts index 5e0932d76..a15a04ba5 100644 --- a/web/e2e/mobile-ux.spec.ts +++ b/web/e2e/mobile-ux.spec.ts @@ -204,7 +204,7 @@ test("quick navigation and terminal keys remain available in portrait and touch await expect(page).toHaveURL(/\/terminal$/); const keys = page.getByLabel("On-screen keys", { exact: true }); await expect(keys).toBeVisible(); - await expect(page.getByRole("region", { name: "Console for Demo shell" })).toContainText("Mobile terminal demo"); + await expect(page.getByRole("region", { name: "Terminal for Demo shell" })).toContainText("Mobile terminal demo"); await capture(page, "mobile-terminal-390x640"); for (const viewport of [{ width: 390, height: 640 }, { width: 844, height: 390 }]) { await page.setViewportSize(viewport); diff --git a/web/e2e/narrow.spec.ts b/web/e2e/narrow.spec.ts index fdb4ed0d0..6ca5b1d77 100644 --- a/web/e2e/narrow.spec.ts +++ b/web/e2e/narrow.spec.ts @@ -55,7 +55,7 @@ const sections = [ { navigation: "Engine", heading: "Engine" }, { navigation: "Sync", heading: "Remote sync" }, { navigation: "History", heading: "History" }, - { navigation: "Terminal", heading: "No console is open" }, + { navigation: "Terminal", heading: "No session is open" }, ] as const; async function openSectionThroughDrawer( @@ -487,7 +487,7 @@ test("keeps quick connection actions inside the viewport on mobile", async ({ pa test("keeps workspace management out of the mobile terminal", async ({ page, installation }) => { await openApplication(page, installation); - await openSectionThroughDrawer(page, "Terminal", "No console is open"); + await openSectionThroughDrawer(page, "Terminal", "No session is open"); await expect(page.getByRole("button", { name: "Split right" })).toHaveCount(0); await expect(page.getByRole("button", { name: "Split down" })).toHaveCount(0); @@ -838,7 +838,7 @@ test("sends a real control character from the on-screen keys", async ({ page, in await page.getByRole("button", { name: "Navigation", exact: true }).click(); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); diff --git a/web/e2e/shortcuts.spec.ts b/web/e2e/shortcuts.spec.ts index 424cd8f6b..e7b6e74ae 100644 --- a/web/e2e/shortcuts.spec.ts +++ b/web/e2e/shortcuts.spec.ts @@ -31,7 +31,7 @@ test("edits shortcuts, keeps them after reload and uses them in a live terminal" await page.screenshot({ path: `${process.env.SSHC_SHORTCUTS_VISUAL_DIR}/shortcuts.png`, fullPage: true }); } await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toContainText(/[$#%>]/); + await expect(page.getByRole("region", { name: /^Terminal for / })).toContainText(/[$#%>]/); await terminalKeyboard(page).focus(); const beforePalette = frames.length; await page.keyboard.press("Alt+k"); @@ -56,7 +56,7 @@ test("edits shortcuts, keeps them after reload and uses them in a live terminal" await page.keyboard.press("Alt+PageDown"); await expect(page).toHaveURL(/\/terminal$/); await openLocalShell(page); - const rows = page.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const rows = page.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); await expect(rows).toHaveCount(2); await page.keyboard.press("Alt+PageUp"); await expect(rows.nth(0).locator('[aria-current="true"]')).toBeVisible(); @@ -77,7 +77,7 @@ test("keeps Ctrl+F inside Terminal and leaves browser Find available on other pa await openApplication(page, installation); const nav = page.getByRole("navigation", { name: "Primary" }); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toContainText(/[$#%>]/); + await expect(page.getByRole("region", { name: /^Terminal for / })).toContainText(/[$#%>]/); async function pressFind(prevented: boolean) { await page.evaluate(() => document.documentElement.removeAttribute("data-test-find-prevented")); await page.keyboard.press("Control+f"); @@ -94,7 +94,7 @@ test("keeps Ctrl+F inside Terminal and leaves browser Find available on other pa await page.getByRole("button", { name: "Match case", exact: true }).focus(); await pressFind(true); await expect(search).toBeFocused(); - await page.getByRole("list", { name: "Open consoles" }).getByRole("button", { name: /^Close / }).click(); + await page.getByRole("list", { name: "Open sessions" }).getByRole("button", { name: /^Close / }).click(); await expect(page.getByRole("dialog")).toBeVisible(); await pressFind(true); await expect(page.getByRole("button", { name: "Keep it open", exact: true })).toBeFocused(); diff --git a/web/e2e/terminal-features.spec.ts b/web/e2e/terminal-features.spec.ts index c746ee9bd..53d4710ad 100644 --- a/web/e2e/terminal-features.spec.ts +++ b/web/e2e/terminal-features.spec.ts @@ -49,7 +49,7 @@ test("renders the documented non-interactive CLI example", async ({ page, instal await openApplication(page, installation); await openSection(page, "Terminal"); - const terminal = page.getByRole("region", { name: "Console for production" }); + const terminal = page.getByRole("region", { name: "Terminal for production" }); await expect(terminal).toContainText("sshc ssh production --non-interactive -- uname -n"); await expect(terminal).toContainText("production"); @@ -63,7 +63,7 @@ test("uses a thin rounded scrollbar for terminal scrollback", async ({ page, ins await openSection(page, "Terminal"); await openLocalShell(page); - const terminal = page.getByRole("region", { name: /^Console for / }); + const terminal = page.getByRole("region", { name: /^Terminal for / }); await expect(terminal).toContainText(/[$#%>]/, { timeout: 20_000 }); await terminalKeyboard(page).focus(); await page.keyboard.type("i=1; while [ \"$i\" -le 120 ]; do printf 'scrollback-line-%03d\\n' \"$i\"; i=$((i+1)); done"); @@ -109,7 +109,7 @@ test("keeps terminal actions compact and exposes terminal settings", async ({ pa await openApplication(page, installation); await openSection(page, "Terminal"); - const terminal = page.getByRole("region", { name: "Console for docs-shell" }); + const terminal = page.getByRole("region", { name: "Terminal for docs-shell" }); await expect(terminal).toBeVisible(); await expect(terminal.getByRole("button", { name: "Find" })).toBeVisible(); await terminal.getByRole("button", { name: "More terminal actions" }).click(); @@ -177,7 +177,7 @@ test("opens forwarding management only for an SSH terminal", async ({ page, inst }); await openApplication(page, installation); await openSection(page, "Terminal"); - const terminal = page.getByRole("region", { name: "Console for bastion" }); + const terminal = page.getByRole("region", { name: "Terminal for bastion" }); await expect(terminal).toBeVisible(); await terminal.getByRole("button", { name: "More terminal actions" }).click(); await terminal.getByRole("menuitem", { name: "Port forwarding" }).click(); diff --git a/web/e2e/terminal-osc.spec.ts b/web/e2e/terminal-osc.spec.ts index 8922ad30f..9bd41e62b 100644 --- a/web/e2e/terminal-osc.spec.ts +++ b/web/e2e/terminal-osc.spec.ts @@ -13,7 +13,7 @@ test("applies terminal titles to the pane and marks notifications unread", async await openSection(page, "Terminal"); const nav = page.getByRole("navigation", { name: "Primary" }); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); await terminalKeyboard(page).focus(); @@ -21,8 +21,8 @@ test("applies terminal titles to the pane and marks notifications unread", async // title cannot immediately replace ours. await page.keyboard.type("printf '\\033]0;deploy checklist\\a'; read -r _"); await page.keyboard.press("Enter"); - const consoles = nav.getByRole("list", { name: "Open consoles" }); - await expect(page.getByRole("region", { name: "Console for deploy checklist" })).toBeVisible({ timeout: 15_000 }); + const consoles = nav.getByRole("list", { name: "Open sessions" }); + await expect(page.getByRole("region", { name: "Terminal for deploy checklist" })).toBeVisible({ timeout: 15_000 }); await expect(consoles.getByRole("listitem").first()).toContainText("deploy checklist"); if (process.env.SSHC_VISUAL_DIR !== undefined) { await page.screenshot({ path: `${process.env.SSHC_VISUAL_DIR}/terminal-osc-title.png`, fullPage: true }); diff --git a/web/e2e/terminal-reconnect-stop.spec.ts b/web/e2e/terminal-reconnect-stop.spec.ts index aa187b1e4..aa1c85066 100644 --- a/web/e2e/terminal-reconnect-stop.spec.ts +++ b/web/e2e/terminal-reconnect-stop.spec.ts @@ -16,7 +16,7 @@ test("stops the automatic reconnect loop from the pane", async ({ page, installa await page.getByRole("navigation", { name: "Connections" }).getByRole("button", { name: "refused" }).click(); await page.getByRole("button", { name: "Connect", exact: true }).click(); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); // The third wait is six seconds long, enough to act on the banner. await expect(screen.getByText("reconnecting 3/5")).toBeVisible({ timeout: 30_000 }); @@ -29,7 +29,7 @@ test("stops the automatic reconnect loop from the pane", async ({ page, installa await expect(page.getByRole("button", { name: "Reconnect", exact: true })).toBeVisible(); await expect(page.getByRole("button", { name: "Stop reconnecting" })).toHaveCount(0); await expect(screen).toContainText("再接続を停止しました"); - const list = page.getByRole("navigation", { name: "Primary" }).getByRole("list", { name: "Open consoles" }); + const list = page.getByRole("navigation", { name: "Primary" }).getByRole("list", { name: "Open sessions" }); await expect(list.getByRole("listitem")).toHaveCount(1); if (process.env.SSHC_VISUAL_DIR !== undefined) { await page.screenshot({ path: `${process.env.SSHC_VISUAL_DIR}/reconnect-stopped.png`, fullPage: true }); diff --git a/web/e2e/terminal-reconnect.spec.ts b/web/e2e/terminal-reconnect.spec.ts index 6f8bc0d96..7b8424918 100644 --- a/web/e2e/terminal-reconnect.spec.ts +++ b/web/e2e/terminal-reconnect.spec.ts @@ -59,7 +59,7 @@ test("reconnects an exited SSH terminal in the same view", async ({ page, instal await openApplication(page, installation); await openSection(page, "Terminal"); - const console = page.getByRole("region", { name: "Console for production-api" }); + const console = page.getByRole("region", { name: "Terminal for production-api" }); await expect(console).toContainText("before disconnect"); const reconnect = console.getByRole("button", { name: "Reconnect", exact: true }); await expect(reconnect).toBeVisible(); diff --git a/web/e2e/terminal.spec.ts b/web/e2e/terminal.spec.ts index 02c8882de..8248f3d04 100644 --- a/web/e2e/terminal.spec.ts +++ b/web/e2e/terminal.spec.ts @@ -29,7 +29,7 @@ function watchForPolicyViolations(page: import("@playwright/test").Page): string } async function typeIntoConsole(page: import("@playwright/test").Page, line: string) { - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); await terminalKeyboard(page).focus(); @@ -46,7 +46,7 @@ async function openConsolePanel(page: import("@playwright/test").Page) { async function reopenFirstConsole(panel: Locator) { await panel - .getByRole("list", { name: "Open consoles" }) + .getByRole("list", { name: "Open sessions" }) .getByRole("listitem") .first() .getByRole("button") @@ -69,7 +69,7 @@ async function openLoadedTerminalSettings(page: Page): Promise { const region = page.getByRole("region", { name: "Terminal" }); // The sentinel proves that the Settings effect has applied its metadata GET. // Without this gate, a slow initial GET can overwrite a value filled by the test. - await expect(region.getByLabel("Consoles open at once")).toHaveValue("2"); + await expect(region.getByLabel("Sessions open at once")).toHaveValue("2"); return region; } @@ -90,13 +90,13 @@ test("opens a local shell, runs a command and shows its output", async ({ page, const violations = watchForPolicyViolations(page); await openApplication(page, installation); await openSection(page, "Terminal"); - const emptyState = page.getByRole("heading", { name: "No console is open" }).locator(".."); + const emptyState = page.getByRole("heading", { name: "No session is open" }).locator(".."); await expect(emptyState.locator("[data-sshc-brand-mark]")).toBeVisible(); await expect(emptyState).not.toContainText(">_"); await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); await typeIntoConsole(page, "echo embedded-terminal-canary"); @@ -127,7 +127,7 @@ test("keeps image-backed terminal editing free of stale glyphs", async ({ page, await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); await expect(screen.locator("[data-term-background='terminal-wall.gif']")).toBeVisible(); await expect.poll(() => terminalCanvasCount(page)).toBe(0); @@ -156,7 +156,7 @@ test("keeps WebGL disabled when the terminal setting turns it off", async ({ pag await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); await expect.poll(() => terminalCanvasCount(page)).toBe(0); @@ -169,7 +169,7 @@ test("keeps the session and replays its scrollback after a reload", async ({ pag await openConsolePanel(page); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); const screen = await typeIntoConsole(page, "echo survives-a-reload"); await expect(screen).toContainText("survives-a-reload", { timeout: 20_000 }); @@ -177,11 +177,11 @@ test("keeps the session and replays its scrollback after a reload", async ({ pag await page.reload(); await expect(page.getByRole("heading", { name: "sshc" })).toBeVisible(); const reopened = await openConsolePanel(page); - const row = reopened.getByRole("list", { name: "Open consoles" }).getByRole("listitem").first(); + const row = reopened.getByRole("list", { name: "Open sessions" }).getByRole("listitem").first(); await expect(row).toBeVisible(); await row.getByRole("button").first().click(); - await expect(page.getByRole("region", { name: /^Console for / })) + await expect(page.getByRole("region", { name: /^Terminal for / })) .toContainText("survives-a-reload", { timeout: 20_000 }); }); @@ -195,15 +195,15 @@ test("refuses to open more consoles than the configured limit", async ({ page, i const panel = await openConsolePanel(page); const openShell = panel.getByRole("button", { name: "New session" }); - const rows = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const rows = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); await expect(rows).toHaveCount(1); await openLocalShell(page); await expect(rows).toHaveCount(2); await expect(openShell).toBeDisabled(); - await expect(panel).toContainText("limit of 2 open consoles"); + await expect(panel).toContainText("limit of 2 open sessions"); }); test("shows an open console again after a reload instead of claiming there are none", async ({ @@ -214,13 +214,13 @@ test("shows an open console again after a reload instead of claiming there are n await openConsolePanel(page); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); await page.reload(); await expect(page.getByRole("heading", { name: "sshc" })).toBeVisible(); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); - await expect(page.getByText("No console is open")).toBeHidden(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); + await expect(page.getByText("No session is open")).toBeHidden(); }); test("applies the session limit set from the settings screen", async ({ page, installation }) => { @@ -228,7 +228,7 @@ test("applies the session limit set from the settings screen", async ({ page, in await openApplication(page, installation); const region = await openLoadedTerminalSettings(page); - await region.getByLabel("Consoles open at once").fill("1"); + await region.getByLabel("Sessions open at once").fill("1"); const saved = await saveTerminalSettings(page, region); expect(saved.request().postDataJSON()).toEqual(expect.objectContaining({ maxSessions: 1 })); expect(JSON.parse(await installation.read("sshc/metadata.json"))).toEqual( @@ -248,11 +248,11 @@ test("applies the session limit set from the settings screen", async ({ page, in expect((await created).status()).toBe(201); const listed = await refreshed; expect((await listed.json()).maxSessions).toBe(1); - const consoles = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const consoles = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); await expect(consoles).toHaveCount(1); await expect(panel.getByRole("button", { name: "New session" })).toBeDisabled(); - await expect(panel).toContainText("limit of 1 open consoles"); + await expect(panel).toContainText("limit of 1 open sessions"); }); test("starts local shells where the setting says", async ({ page, installation }) => { @@ -302,7 +302,7 @@ test("pastes the clipboard into the console with right click", async ({ page, co await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); await page.evaluate(() => navigator.clipboard.writeText("echo right-click-paste-canary")); @@ -323,7 +323,7 @@ for (const chord of ["Control+v", "Control+Shift+V"]) { await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); await typeIntoConsole(page, 'rm -f "$HOME/keyboard-paste-data"'); await page.evaluate(() => navigator.clipboard.writeText('printf x >> "$HOME/keyboard-paste-data"; ')); @@ -353,7 +353,7 @@ test("reviews a multiline paste before sending any terminal input", async ({ pag await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); const risky = "echo safe-paste-first\necho safe-paste-second\n"; await page.evaluate((text) => navigator.clipboard.writeText(text), risky); @@ -391,7 +391,7 @@ test("edits a multiline paste before sending the changed text", async ({ page, c await openConsolePanel(page); await openLocalShell(page); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toContainText(/[$#%>]/, { timeout: 20_000 }); const risky = "echo safe-paste-first\necho safe-paste-second\n"; await page.evaluate((text) => navigator.clipboard.writeText(text), risky); @@ -426,7 +426,7 @@ test("keeps terminal drawing stable while scrollback search overlays it", async await openConsolePanel(page); await openLocalShell(page); - const console = page.getByRole("region", { name: /^Console for / }); + const console = page.getByRole("region", { name: /^Terminal for / }); await expect(console).toContainText(/[$#%>]/, { timeout: 20_000 }); await typeIntoConsole(page, "echo search-overlay-canary"); await expect(console).toContainText("search-overlay-canary", { timeout: 20_000 }); @@ -486,7 +486,7 @@ test("fits the terminal inside the space it was given", async ({ page, installat await openConsolePanel(page); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); const measured = await drawnRows(page).evaluate((node) => { const frame = (node as HTMLElement).closest("main"); @@ -510,7 +510,7 @@ test("keeps the top of the navigation still while the console list scrolls", asy const before = await anchor.boundingBox(); await page.setViewportSize({ width: 1280, height: 400 }); - const rows = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const rows = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); for (let opened = 1; opened <= 6; opened += 1) { await openLocalShell(page); await expect(rows).toHaveCount(opened); @@ -532,7 +532,7 @@ test("closes every open connection from the settings screen", async ({ page, ins await openApplication(page, installation); const panel = await openConsolePanel(page); - const rows = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const rows = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); await openLocalShell(page); await expect(rows).toHaveCount(1); await openLocalShell(page); @@ -553,7 +553,7 @@ test("force closes a live local shell with one confirmation", async ({ page, ins await openApplication(page, installation); const panel = await openConsolePanel(page); - const rows = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const rows = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); await openLocalShell(page); await expect(rows).toHaveCount(1); @@ -576,7 +576,7 @@ test("previews and closes a live connection immediately while Shift is held", as await openApplication(page, installation); const panel = await openConsolePanel(page); - const rows = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem"); + const rows = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem"); await openLocalShell(page); await expect(rows).toHaveCount(1); @@ -613,13 +613,13 @@ test("moves to its own screen and leaves the connection detail alone", async ({ await page.getByRole("button", { name: "Connect", exact: true }).click(); await expect(page).toHaveURL(/\/terminal$/); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); await expect(tree).toBeHidden(); await page.goBack(); await expect(page).not.toHaveURL(/\/terminal$/); await expect(detail).toBeVisible(); - await expect(page.getByRole("region", { name: /^Console for / })).toBeHidden(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeHidden(); }); test("shows why a connection failed in the console itself", async ({ page, installation }) => { @@ -634,7 +634,7 @@ test("shows why a connection failed in the console itself", async ({ page, insta await nav.getByRole("button", { name: "refused" }).click(); await page.getByRole("button", { name: "Connect", exact: true }).click(); - const screen = page.getByRole("region", { name: /^Console for / }); + const screen = page.getByRole("region", { name: /^Terminal for / }); await expect(screen).toBeVisible(); await expect(screen).toContainText(/sshc:.*(refused|connect)/i, { timeout: 20_000 }); }); @@ -670,7 +670,7 @@ test("keeps the same terminal alive while another screen is shown", async ({ pag const reopened = await openConsolePanel(page); await reopened - .getByRole("list", { name: "Open consoles" }) + .getByRole("list", { name: "Open sessions" }) .getByRole("listitem") .first() .getByRole("button") @@ -728,7 +728,7 @@ test("loads the font it ships and hands it to the console", async ({ page, insta const panel = await openConsolePanel(page); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); const family = async () => (await drawnRowFont(page)).fontFamily; expect(await family()).not.toContain("JetBrains Mono"); @@ -750,7 +750,7 @@ test("wears the image that was brought in, and gets out of its way", async ({ pa const panel = await openConsolePanel(page); await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); const encoded = await page.evaluate(() => { const canvas = document.createElement("canvas"); @@ -800,7 +800,7 @@ test("selects only the visible screen and opens a console from row padding", asy await openApplication(page, installation); const panel = await openConsolePanel(page); await openLocalShell(page); - const row = panel.getByRole("list", { name: "Open consoles" }).getByRole("listitem").first(); + const row = panel.getByRole("list", { name: "Open sessions" }).getByRole("listitem").first(); await expect(row.locator("[aria-current=true]")).toHaveCount(1); for (const destination of ["Home", "SFTP"]) { await openSection(page, destination); @@ -810,7 +810,7 @@ test("selects only the visible screen and opens a console from row padding", asy if (box === null) throw new Error("missing console row"); await page.mouse.click(box.x + box.width - 3, box.y + box.height - 3); await expect(row.locator("[aria-current=true]")).toHaveCount(1); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); } // The actual close button must remain independently clickable. await row.getByRole("button", { name: /^Close / }).click(); diff --git a/web/e2e/ui-refinements.spec.ts b/web/e2e/ui-refinements.spec.ts index e3e4aca4f..37642c722 100644 --- a/web/e2e/ui-refinements.spec.ts +++ b/web/e2e/ui-refinements.spec.ts @@ -32,7 +32,7 @@ test("shows OS icons and editable paste and close dialogs with synthetic connect await page.screenshot({ path: `${connectionsDir}/connections-os-icons.png`, fullPage: true }); } await openLocalShell(page); - await expect(page.getByRole("region", { name: /^Console for / })).toContainText(/[$#%>]/); + await expect(page.getByRole("region", { name: /^Terminal for / })).toContainText(/[$#%>]/); await page.evaluate(() => navigator.clipboard.writeText("echo example-one\necho example-two\n")); await terminalKeyboard(page).focus(); await page.keyboard.press("Control+Shift+V"); @@ -40,7 +40,7 @@ test("shows OS icons and editable paste and close dialogs with synthetic connect await editor.fill("echo edited-example\necho second-example\n"); if (dir !== undefined && process.env.SSHC_UI_HOME_ONLY !== "1") await page.screenshot({ path: `${dir}/editable-paste.png`, fullPage: true }); await page.getByRole("dialog").getByRole("button", { name: "Cancel" }).click(); - const row = page.getByRole("list", { name: "Open consoles" }).getByRole("listitem").first(); + const row = page.getByRole("list", { name: "Open sessions" }).getByRole("listitem").first(); await row.getByRole("button", { name: /^Close / }).click(); await expect(page.getByRole("button", { name: "Keep it open" })).toBeFocused(); if (dir !== undefined && process.env.SSHC_UI_HOME_ONLY !== "1") await page.screenshot({ path: `${dir}/close-dialog-focus.png`, fullPage: true }); diff --git a/web/e2e/workspace-drag.spec.ts b/web/e2e/workspace-drag.spec.ts index 8816b0ebe..280c02d7e 100644 --- a/web/e2e/workspace-drag.spec.ts +++ b/web/e2e/workspace-drag.spec.ts @@ -58,14 +58,14 @@ test("docks connected terminals into a live workspace", async ({ page, installat await navigation.getByRole("button", { name: "edge", exact: true }).click(); if (process.env.SSHC_VISUAL_DIR !== undefined) { - await expect(page.getByRole("region", { name: "Console for edge" })).toContainText("connected"); + await expect(page.getByRole("region", { name: "Terminal for edge" })).toContainText("connected"); await page.screenshot({ path: `${process.env.SSHC_VISUAL_DIR}/terminal-desktop.png`, fullPage: true }); } const target = page.locator("[data-single-terminal-drop-target='workspace-edge']"); await expect(target).toBeVisible(); const databaseRow = navigation - .getByRole("list", { name: "Open consoles" }) + .getByRole("list", { name: "Open sessions" }) .getByRole("listitem") .filter({ hasText: "connected · database" }); const targetBox = await target.boundingBox(); @@ -142,7 +142,7 @@ test("keeps terminal rows inside vertically split panes", async ({ page, install const target = page.locator("[data-single-terminal-drop-target='workspace-edge']"); await expect(target).toBeVisible(); const databaseRow = navigation - .getByRole("list", { name: "Open consoles" }) + .getByRole("list", { name: "Open sessions" }) .getByRole("listitem") .filter({ hasText: "connected · database" }); const targetBox = await target.boundingBox(); @@ -205,7 +205,7 @@ test("selects the whole local console row and docks local shells", async ({ page await openApplication(page, installation); const navigation = page.getByRole("navigation", { name: "Primary" }); - const consoleList = navigation.getByRole("list", { name: "Open consoles" }); + const consoleList = navigation.getByRole("list", { name: "Open sessions" }); const zshRow = consoleList.getByRole("listitem").filter({ hasText: "zsh" }); await zshRow.getByText("connected · localhost").click(); @@ -251,7 +251,7 @@ test("broadcasts one command to two live local shells", async ({ page, installat await openLocalShell(page); await expect(page.locator("[data-desktop-workspace-controls]")).toHaveCount(0); await expect(page.getByRole("button", { name: "Find" })).toBeVisible(); - await expect(page.getByRole("region", { name: /^Console for / })).toBeVisible(); + await expect(page.getByRole("region", { name: /^Terminal for / })).toBeVisible(); if (process.env.SSHC_VISUAL_DIR !== undefined) { await page.screenshot({ path: `${process.env.SSHC_VISUAL_DIR}/sshc-v0.16.2-single-local-terminal.png`, @@ -260,7 +260,7 @@ test("broadcasts one command to two live local shells", async ({ page, installat } await openLocalShell(page); - const consoleList = navigation.getByRole("list", { name: "Open consoles" }); + const consoleList = navigation.getByRole("list", { name: "Open sessions" }); const rows = consoleList.getByRole("listitem"); await expect(rows).toHaveCount(2); const target = page.locator("[data-single-terminal-drop-target]"); @@ -281,7 +281,7 @@ test("broadcasts one command to two live local shells", async ({ page, installat await expect(broadcast.getByText(/Pane \d · Sent$/)).toHaveCount(2); await broadcast.getByRole("button", { name: "Close command delivery" }).click(); - const terminalRegions = page.getByRole("region", { name: /^Console for / }); + const terminalRegions = page.getByRole("region", { name: /^Terminal for / }); await expect(terminalRegions).toHaveCount(2); await expect(terminalRegions.nth(0)).toContainText("local-broadcast-canary", { timeout: 20_000 }); await expect(terminalRegions.nth(1)).toContainText("local-broadcast-canary", { timeout: 20_000 }); diff --git a/web/src/App.test.tsx b/web/src/App.test.tsx index e96213f22..4d6d4e1f3 100644 --- a/web/src/App.test.tsx +++ b/web/src/App.test.tsx @@ -5,7 +5,9 @@ import { afterEach, describe, expect, it, vi } from "vitest"; const openVault = () => Promise.resolve({ exists: true, unlocked: true, aliases: [] as string[], dedicatedKeyPassphrases: [], minPassphraseLength: 12 }); -import { App, resolveOSC52, vaultStatePollIntervalMs } from "./App"; +import { App } from "./App"; +import { vaultStatePollIntervalMs } from "./session/useAppSession"; +import { resolveOSC52 } from "./shell/TerminalScreen"; import type { InspectorContent } from "./ui/Inspector"; import { LanguageProvider } from "./i18n/context"; import { ThemeProvider } from "./theme/context"; diff --git a/web/src/App.tsx b/web/src/App.tsx index 454c2f57d..d8d101212 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -21,16 +21,14 @@ import { Icon, IconSprite } from "./ui/icons"; import { InspectorPane, InspectorToggle, type InspectorContent } from "./ui/Inspector"; import { useTheme } from "./theme/context"; import { Button } from "./ui/surface"; +import { usePolling } from "./ui/usePolling"; import { RouteSkeleton } from "./ui/RouteSkeleton"; import { sectionPath, type Section } from "./routing/sectionRoute"; import { connectionLocation } from "./routing/connectionRoute"; import { AppHeader } from "./shell/AppHeader"; import { AppNavigation } from "./shell/AppNavigation"; -import { - clampNavigationWidth, - detectNavigationWidth, - rememberNavigationWidth, -} from "./shell/navigationLayout"; +import { navigationWidth } from "./shell/navigationLayout"; +import { useStoredColumnWidth } from "./ui/useStoredColumnWidth"; import { useSectionRoute } from "./routing/useSectionRoute"; import { useTerminalSessions } from "./terminal/sessions"; import { TransferNotifications } from "./sftp/TransferNotifications"; @@ -52,8 +50,7 @@ import { useOSC52Policy } from "./shell/useOSC52Policy"; import { useSectionHandoffs } from "./shell/useSectionHandoffs"; import { useAppShortcuts } from "./shell/useAppShortcuts"; -export { vaultStatePollIntervalMs } from "./session/useAppSession"; -export { resolveOSC52 } from "./shell/TerminalScreen"; +const transferReconcileIntervalMs = 2_000; type AppProps = { bootstrap: () => Promise; @@ -94,9 +91,7 @@ export function App({ const [navigationOpen, setNavigationOpen] = useState(false); const navigationPanelRef = useRef(null); const navigationTriggerRef = useRef(null); - const [desktopNavigationWidth, setDesktopNavigationWidth] = useState( - detectNavigationWidth, - ); + const [desktopNavigationWidth, resizeDesktopNavigation] = useStoredColumnWidth(navigationWidth); const [inspectorOpen, setInspectorOpen] = useState(false); const [inspector, setInspector] = useState(null); const inspectorPanelRef = useRef(null); @@ -148,11 +143,6 @@ export function App({ window.removeEventListener("sshc-android-back", closeTransientUi); }, [commandPaletteOpen, inspectorOpen, navigationOpen]); - function resizeDesktopNavigation(width: number) { - const nextWidth = clampNavigationWidth(width); - setDesktopNavigationWidth(nextWidth); - rememberNavigationWidth(nextWidth); - } const consoles = useTerminalSessions(terminalSessionsApi, t, state === "ready"); const closeNavigation = useCallback(() => setNavigationOpen(false), []); const terminalWorkspace = useTerminalWorkspaceController({ @@ -198,15 +188,12 @@ export function App({ openPalette, }); - useEffect(() => { - if (state !== "ready") return; - const refresh = () => { - void sftpTransferManager.reconcile().catch(() => undefined); - }; - refresh(); - const timer = globalThis.setInterval(refresh, 2_000); - return () => globalThis.clearInterval(timer); - }, [state]); + // Transfers run in the engine, so the queue keeps up even while this tab is + // hidden; a couple of seconds is fast enough for progress and cheap enough + // for the engine. + usePolling(() => sftpTransferManager.reconcile(), { + intervalMs: transferReconcileIntervalMs, enabled: state === "ready", whileHidden: true, immediately: true, + }); const unreadSessions = useTerminalNotifications( consoles.sessions, diff --git a/web/src/api/config.ts b/web/src/api/config.ts index 16c1199ac..379eac091 100644 --- a/web/src/api/config.ts +++ b/web/src/api/config.ts @@ -1,4 +1,5 @@ import { apiClient } from "./client"; +import { patchJSON, postJSON } from "./guards"; import type { components } from "./schema"; import { validateOpenAPISchema } from "./validators.generated"; @@ -64,18 +65,6 @@ function validateHistory(value: unknown): HistoryEntry[] { return validateOpenAPISchema("HistoryList", value).entries; } -function mutateJSON(path: string, method: "POST" | "PATCH", body: unknown): Promise { - return apiClient.mutate(path, { - method, - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(body), - }); -} - -function postJSON(path: string, body: unknown): Promise { - return mutateJSON(path, "POST", body); -} - export const configApi = { async overview(): Promise { return validateOverview(await apiClient.read("/api/v1/config/overview")); @@ -98,7 +87,7 @@ export const configApi = { return validateCreateConnectionResponse(await postJSON("/api/v1/connections", request)); }, async updateConnection(request: UpdateConnectionRequest): Promise { - return validateSaveResult(await mutateJSON("/api/v1/connections", "PATCH", request)); + return validateSaveResult(await patchJSON("/api/v1/connections", request)); }, async renameGroup(from: string, to: string): Promise { return validateSaveResult(await postJSON("/api/v1/config/groups/rename", { from, to })); diff --git a/web/src/api/credentials.ts b/web/src/api/credentials.ts index 64149dbc1..6db802857 100644 --- a/web/src/api/credentials.ts +++ b/web/src/api/credentials.ts @@ -1,5 +1,5 @@ import { apiClient } from "./client"; -import { issueAction, jsonHeaders } from "./guards"; +import { issueAction, patchJSON, putJSON } from "./guards"; import type { components } from "./schema"; import { validateOpenAPISchema } from "./validators.generated"; @@ -66,11 +66,7 @@ export const credentialsApi: CredentialsApi = { }, async storeCredential(kind, name, secret) { return validateCredentialList( - await apiClient.mutate(credentialPath(kind, name), { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ secret }), - }), + await putJSON(credentialPath(kind, name), { secret }), ); }, async revealCredential(kind, name) { @@ -99,11 +95,7 @@ export const credentialsApi: CredentialsApi = { }, async updateCredential(kind, currentName, name, secret) { return validateCredentialList( - await apiClient.mutate(credentialPath(kind, currentName), { - method: "PATCH", - headers: jsonHeaders, - body: JSON.stringify({ name, secret }), - }), + await patchJSON(credentialPath(kind, currentName), { name, secret }), ); }, async deleteCredential(kind, name) { @@ -115,11 +107,7 @@ export const credentialsApi: CredentialsApi = { }, async assignCredential(kind, subject, name) { return validateCredentialList( - await apiClient.mutate(`/api/v1/credentials/${kind}/assign`, { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ subject, name }), - }), + await putJSON(`/api/v1/credentials/${kind}/assign`, { subject, name }), ); }, async unassignCredential(kind, subject) { diff --git a/web/src/api/guards.ts b/web/src/api/guards.ts index b70c7a19a..85adf43b3 100644 --- a/web/src/api/guards.ts +++ b/web/src/api/guards.ts @@ -45,19 +45,46 @@ export async function issueAction(kind: string, target: string): Promise return asString(asRecord(response).token); } -export async function postJSON( +export type JSONRequest = { + method: "POST" | "PUT" | "PATCH"; + body: unknown; + // A confirmation token from issueAction, for operations the engine gates. + actionToken?: string; + // Problem codes the caller explains itself instead of the shared handler. + locallyHandledCodes?: readonly string[]; +}; + +// Every JSON mutation goes through here so the content type, the action +// header and the local-handling option are spelled once. +export function sendJSON(path: string, request: JSONRequest): Promise { + const headers: Record = { ...jsonHeaders }; + if (request.actionToken) headers["X-SSHC-Action"] = request.actionToken; + return apiClient.mutate( + path, + { method: request.method, headers, body: JSON.stringify(request.body) }, + request.locallyHandledCodes === undefined ? {} : { locallyHandledCodes: request.locallyHandledCodes }, + ); +} + +export function postJSON( path: string, body: unknown, actionToken?: string, locallyHandledCodes?: readonly string[], ): Promise { - const headers: Record = { ...jsonHeaders }; - if (actionToken) headers["X-SSHC-Action"] = actionToken; - return apiClient.mutate( - path, - { method: "POST", headers, body: JSON.stringify(body) }, - locallyHandledCodes === undefined ? {} : { locallyHandledCodes }, - ); + return sendJSON(path, { + method: "POST", body, + ...(actionToken === undefined ? {} : { actionToken }), + ...(locallyHandledCodes === undefined ? {} : { locallyHandledCodes }), + }); +} + +export function putJSON(path: string, body: unknown, locallyHandledCodes?: readonly string[]): Promise { + return sendJSON(path, { method: "PUT", body, ...(locallyHandledCodes === undefined ? {} : { locallyHandledCodes }) }); +} + +export function patchJSON(path: string, body: unknown, actionToken?: string): Promise { + return sendJSON(path, { method: "PATCH", body, ...(actionToken === undefined ? {} : { actionToken }) }); } export async function postEmpty(path: string): Promise { diff --git a/web/src/api/settings.ts b/web/src/api/settings.ts index 93e9cdfd2..e32024f01 100644 --- a/web/src/api/settings.ts +++ b/web/src/api/settings.ts @@ -1,5 +1,5 @@ import { apiClient } from "./client"; -import { asArray, asNumber, asRecord, asString, jsonHeaders } from "./guards"; +import { asArray, asNumber, asRecord, asString, patchJSON, putJSON } from "./guards"; import type { components } from "./schema"; import { validateOpenAPISchema } from "./validators.generated"; @@ -102,11 +102,7 @@ export const settingsApi: SettingsApi = { }; }, async setTerminalSettings(settings) { - await apiClient.mutate("/api/v1/metadata/terminal", { - method: "PUT", - headers: jsonHeaders, - body: JSON.stringify(settings), - }); + await putJSON("/api/v1/metadata/terminal", settings); }, async localShellProfiles() { return validateLocalShellProfiles( @@ -135,11 +131,7 @@ export const settingsApi: SettingsApi = { return settings; }, async setEngineSettings(settings) { - await apiClient.mutate("/api/v1/metadata/engine", { - method: "PUT", - headers: jsonHeaders, - body: JSON.stringify(settings), - }); + await putJSON("/api/v1/metadata/engine", settings); }, async terminalBackgrounds() { const record = asRecord( @@ -165,10 +157,7 @@ export const settingsApi: SettingsApi = { ); }, async setTerminalBackgroundCapacity(capacityMiB) { - const record = asRecord(await apiClient.mutate( - "/api/v1/terminal/backgrounds/capacity", - { method: "PUT", headers: jsonHeaders, body: JSON.stringify({ capacityMiB }) }, - )); + const record = asRecord(await putJSON("/api/v1/terminal/backgrounds/capacity", { capacityMiB })); return { backgrounds: asArray(record.backgrounds).map(validateBackground), usedBytes: asNumber(record.usedBytes), @@ -178,14 +167,7 @@ export const settingsApi: SettingsApi = { }, async renameTerminalBackground(name, nextName) { return validateBackground( - await apiClient.mutate( - `/api/v1/terminal/backgrounds/${encodeURIComponent(name)}`, - { - method: "PATCH", - headers: jsonHeaders, - body: JSON.stringify({ name: nextName }), - }, - ), + await patchJSON(`/api/v1/terminal/backgrounds/${encodeURIComponent(name)}`, { name: nextName }), ); }, async deleteTerminalBackground(name) { diff --git a/web/src/api/sync.ts b/web/src/api/sync.ts index 1b9a21d12..4abe8ca7d 100644 --- a/web/src/api/sync.ts +++ b/web/src/api/sync.ts @@ -1,5 +1,5 @@ import { apiClient } from "./client"; -import { issueAction, postEmpty, postJSON } from "./guards"; +import { issueAction, postEmpty, postJSON, putJSON } from "./guards"; import type { components } from "./schema"; import { validateOpenAPISchema } from "./validators.generated"; @@ -128,29 +128,17 @@ export const syncApi: SyncApi = { }, async checkSyncSetup(settings) { return validateSyncSetupCheck( - await apiClient.mutate("/api/v1/sync/setup/check", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(settings), - }, { locallyHandledCodes: locallyExplainedSyncFailures }), + await postJSON("/api/v1/sync/setup/check", settings, undefined, locallyExplainedSyncFailures), ); }, async completeSyncSetup(settings) { return validateSyncSetup( - await apiClient.mutate("/api/v1/sync/setup", { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(settings), - }, { locallyHandledCodes: locallyExplainedSyncFailures }), + await putJSON("/api/v1/sync/setup", settings, locallyExplainedSyncFailures), ); }, async configureSync(settings) { return validateSyncStatus( - await apiClient.mutate("/api/v1/sync/settings", { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(settings), - }), + await putJSON("/api/v1/sync/settings", settings), ); }, async syncExclusions() { @@ -160,11 +148,7 @@ export const syncApi: SyncApi = { }, async saveSyncExclusions(document) { return validateSyncExclusions( - await apiClient.mutate("/api/v1/sync/exclusions", { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ document }), - }, { locallyHandledCodes: ["sync_ignore_invalid"] }), + await putJSON("/api/v1/sync/exclusions", { document }, ["sync_ignore_invalid"]), ); }, async syncPushDraft() { @@ -221,23 +205,15 @@ export const syncApi: SyncApi = { }, async setSyncKey(key, confirmHistoryLoss) { return validateSyncKey( - await apiClient.mutate("/api/v1/sync/key", { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - ...(key === undefined ? {} : { key }), - ...(confirmHistoryLoss === undefined ? {} : { confirmHistoryLoss }), - }), + await putJSON("/api/v1/sync/key", { + ...(key === undefined ? {} : { key }), + ...(confirmHistoryLoss === undefined ? {} : { confirmHistoryLoss }), }), ); }, async setAutoSync(enabled) { return validateSyncStatus( - await apiClient.mutate("/api/v1/sync/auto", { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ enabled }), - }), + await putJSON("/api/v1/sync/auto", { enabled }), ); }, async syncNow() { diff --git a/web/src/api/terminalSessions.ts b/web/src/api/terminalSessions.ts index e32f6c21e..255493ec9 100644 --- a/web/src/api/terminalSessions.ts +++ b/web/src/api/terminalSessions.ts @@ -1,5 +1,5 @@ import { apiClient } from "./client"; -import { jsonHeaders, postEmpty, postJSON } from "./guards"; +import { postEmpty, postJSON, putJSON } from "./guards"; import type { components } from "./schema"; import { validateOpenAPISchema } from "./validators.generated"; @@ -103,14 +103,7 @@ export const terminalSessionsApi: TerminalSessionsApi = { }, async renameTerminalSession(id, title) { return validateTerminalSessionList( - await apiClient.mutate( - `/api/v1/terminal/sessions/${encodeURIComponent(id)}/title`, - { - method: "PUT", - headers: { ...jsonHeaders }, - body: JSON.stringify({ title }), - }, - ), + await putJSON(`/api/v1/terminal/sessions/${encodeURIComponent(id)}/title`, { title }), ); }, async closeTerminalSession(id) { diff --git a/web/src/api/vault.ts b/web/src/api/vault.ts index f68806baa..42e93e347 100644 --- a/web/src/api/vault.ts +++ b/web/src/api/vault.ts @@ -1,5 +1,5 @@ import { apiClient } from "./client"; -import { asRecord, postEmpty, postJSON } from "./guards"; +import { asRecord, postEmpty, postJSON, putJSON } from "./guards"; import type { components } from "./schema"; import { validateOpenAPISchema } from "./validators.generated"; @@ -84,14 +84,7 @@ export const vaultApi: VaultApi = { }, async storePassword(alias, password) { return validateVaultStatus( - await apiClient.mutate( - `/api/v1/passwords/${encodeURIComponent(alias)}`, - { - method: "PUT", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ password }), - }, - ), + await putJSON(`/api/v1/passwords/${encodeURIComponent(alias)}`, { password }), ); }, async forgetPassword(alias) { diff --git a/web/src/connections/ConnectionAnalysis.tsx b/web/src/connections/ConnectionAnalysis.tsx index 3f29b800a..0a3f8408e 100644 --- a/web/src/connections/ConnectionAnalysis.tsx +++ b/web/src/connections/ConnectionAnalysis.tsx @@ -5,6 +5,7 @@ import { useTranslate } from "../i18n/context"; import { hintText, sectionHeading, tableHeadCell, tableHeadRow } from "../ui/form"; import { Button, Card, Notice } from "../ui/surface"; import { NoticeList } from "./SavePreview"; +import { useAsyncOperation } from "../ui/useAsyncOperation"; type ConnectionAnalysisProps = { detail: HostDetail; @@ -16,26 +17,17 @@ type ConnectionAnalysisProps = { export function ConnectionAnalysis({ detail, alias, api, disabled = false }: ConnectionAnalysisProps) { const t = useTranslate(); const [effective, setEffective] = useState(null); - const [busy, setBusy] = useState(false); - const [error, setError] = useState(""); + const inspection = useAsyncOperation(); + const { clearError } = inspection; useEffect(() => { setEffective(null); - setError(""); - setBusy(false); - }, [alias, detail.file.contents]); + clearError(); + }, [alias, detail.file.contents, clearError]); async function inspect() { - if (busy || disabled) return; - setBusy(true); - setError(""); - try { - setEffective(await api.effective(alias)); - } catch { - setError(t("diag.explainFailed")); - } finally { - setBusy(false); - } + if (inspection.busy || disabled) return; + await inspection.run(() => api.effective(alias), { apply: setEffective, describe: () => t("diag.explainFailed") }); } return ( @@ -62,11 +54,11 @@ export function ConnectionAnalysis({ detail, alias, api, disabled = false }: Con

{t("conn.analysisAuthoritative")}

{t("conn.analysisAuthoritativeHint")}

- - {error === "" ? null : {error}} + {inspection.error === "" ? null : {inspection.error}} {effective !== null && effective.executableDirectives.length > 0 ? (
diff --git a/web/src/connections/ConnectionTree.tsx b/web/src/connections/ConnectionTree.tsx index 5363ba411..e59233c0c 100644 --- a/web/src/connections/ConnectionTree.tsx +++ b/web/src/connections/ConnectionTree.tsx @@ -1,7 +1,10 @@ import { Fragment, useId, useMemo, useState, type CSSProperties, type DragEvent, type ReactNode } from "react"; import type { HostEntry, HostMetadata, Overview } from "../api/config"; import { useTranslate } from "../i18n/context"; -import { ColumnResizeHandle, useStoredColumnWidth } from "../ui/ColumnResizeHandle"; +import { nearestDeclaredParent } from "./connectionBrowser"; +import { hostMatchesQuery, normalizeHostQuery } from "./hostSearch"; +import { ColumnResizeHandle } from "../ui/ColumnResizeHandle"; +import { useStoredColumnWidth, type StoredColumnWidth } from "../ui/useStoredColumnWidth"; import { control } from "../ui/form"; import { Icon } from "../ui/icons"; import { OperatingSystemIcon } from "../ui/OperatingSystemIcon"; @@ -56,26 +59,13 @@ function labelFor(host: HostEntry): string { return host.identity.alias === "" ? `Host ${host.patterns.join(" ")}` : host.identity.alias; } -function hostMatches(item: DecoratedHost, rawQuery: string): boolean { - const query = rawQuery.trim().toLocaleLowerCase(); - if (query === "") return true; +function hostMatches(item: DecoratedHost, normalizedQuery: string): boolean { const host = item.host; - return host.identity.alias.toLocaleLowerCase().includes(query) || - host.patterns.some((pattern) => pattern.toLocaleLowerCase().includes(query)) || - item.group.toLocaleLowerCase().includes(query) || - item.tags.some((tag) => tag.toLocaleLowerCase().includes(query)) || - (host.hostName ?? "").toLocaleLowerCase().includes(query) || - (host.user ?? "").toLocaleLowerCase().includes(query); -} - -function nearestParent(name: string, declared: ReadonlySet): string { - let candidate = name; - while (true) { - const cut = candidate.lastIndexOf("/"); - if (cut < 0) return ""; - candidate = candidate.slice(0, cut); - if (declared.has(candidate)) return candidate; - } + return hostMatchesQuery({ + alias: host.identity.alias, group: item.group, patterns: host.patterns, tags: item.tags, + ...(host.hostName === undefined ? {} : { hostName: host.hostName }), + ...(host.user === undefined ? {} : { user: host.user }), + }, normalizedQuery); } function belongsToGroup(item: DecoratedHost, group: string): boolean { @@ -98,12 +88,8 @@ function hostBlockIdentity(host: HostEntry): string { ]); } -// Column widths are browser-local conveniences; the layout still works at -// the defaults when storage is unavailable. -export const connectionGroupsWidthKey = "sshc.connections.groups-width.v1"; -export const defaultConnectionGroupsWidth = 144; -export const minimumConnectionGroupsWidth = 112; -export const maximumConnectionGroupsWidth = 400; +// Fits the longest common group name without stealing the list's room. +const connectionGroupsWidth: StoredColumnWidth = { key: "sshc.connections.groups-width.v1", fallback: 144, minimum: 112, maximum: 400 }; export function ConnectionTree({ overview, @@ -113,9 +99,7 @@ export function ConnectionTree({ movesDisabled = false, }: ConnectionTreeProps) { const t = useTranslate(); - const [groupsWidth, setGroupsWidth] = useStoredColumnWidth( - connectionGroupsWidthKey, defaultConnectionGroupsWidth, minimumConnectionGroupsWidth, maximumConnectionGroupsWidth, - ); + const [groupsWidth, setGroupsWidth] = useStoredColumnWidth(connectionGroupsWidth); const descriptionIdPrefix = useId(); const [scope, setScope] = useState({ kind: "all" }); const [query, setQuery] = useState(""); @@ -172,7 +156,7 @@ export function ConnectionTree({ }); const roots: GroupNode[] = []; for (const node of nodes.values()) { - const parentName = nearestParent(node.name, declared); + const parentName = nearestDeclaredParent(node.name, declared); const parent = parentName === "" ? undefined : nodes.get(parentName); if (parent === undefined) roots.push(node); else parent.children.push(node); @@ -196,8 +180,9 @@ export function ConnectionTree({ }, [groupTree]); const visible = useMemo(() => { + const normalizedQuery = normalizeHostQuery(query); const scoped = decorated.filter((item) => { - if (!hostMatches(item, query)) return false; + if (!hostMatches(item, normalizedQuery)) return false; if (scope.kind === "all") return true; if (scope.kind === "ungrouped") return item.group === ""; return belongsToGroup(item, scope.name); @@ -423,8 +408,8 @@ export function ConnectionTree({ diff --git a/web/src/connections/ConnectionsPage.tsx b/web/src/connections/ConnectionsPage.tsx index e2beaa32c..48ebe545c 100644 --- a/web/src/connections/ConnectionsPage.tsx +++ b/web/src/connections/ConnectionsPage.tsx @@ -14,7 +14,8 @@ import { } from "../api/config"; import { type HostSelection } from "./ConnectionTree"; import { ConnectionListPane } from "./ConnectionListPane"; -import { ColumnResizeHandle, useStoredColumnWidth } from "../ui/ColumnResizeHandle"; +import { ColumnResizeHandle } from "../ui/ColumnResizeHandle"; +import { useStoredColumnWidth, type StoredColumnWidth } from "../ui/useStoredColumnWidth"; import { MissingConnection, NoConnectionSelected } from "./DetailPlaceholders"; import { useOverlays, useSaveFeedback, useSelectionState } from "./pageState"; import type { DragPayload } from "./dragdrop"; @@ -53,12 +54,8 @@ import { mobileViewportQuery, useMediaQuery } from "../ui/useMediaQuery"; import { hostDetailApi } from "./HostDetail"; import { connectionSecretsApi } from "./secretsApi"; -// Column widths are browser-local conveniences; the layout still works at -// the defaults when storage is unavailable. -const connectionListWidthKey = "sshc.connections.list-width.v1"; -const defaultConnectionListWidth = 400; -const minimumConnectionListWidth = 256; -const maximumConnectionListWidth = 720; +// Wide enough for an alias, host and status on one row; the editor keeps the rest. +const connectionListWidth: StoredColumnWidth = { key: "sshc.connections.list-width.v1", fallback: 400, minimum: 256, maximum: 720 }; const groupNoticeCodes = new Set([ "group_not_declared", @@ -129,9 +126,7 @@ export function ConnectionsPage({ } = useSelectionState(initialTarget, initialRoute.kind === "invalid"); const selectionRef = useRef(selection); const [detail, setDetail] = useState(null); - const [listWidth, setListWidth] = useStoredColumnWidth( - connectionListWidthKey, defaultConnectionListWidth, minimumConnectionListWidth, maximumConnectionListWidth, - ); + const [listWidth, setListWidth] = useStoredColumnWidth(connectionListWidth); const [savedState, setSavedState] = useState(null); const [refreshState, setRefreshState] = useState<"idle" | "refreshing" | "failed">("idle"); const [savedRevision, setSavedRevision] = useState(0); @@ -820,8 +815,8 @@ export function ConnectionsPage({ )} diff --git a/web/src/connections/connectionBrowser.ts b/web/src/connections/connectionBrowser.ts index 6f63b6797..e0539ea04 100644 --- a/web/src/connections/connectionBrowser.ts +++ b/web/src/connections/connectionBrowser.ts @@ -33,7 +33,9 @@ export function identityKey(identity: HostIdentity): string { return `${identity.path}\u0000${identity.alias}`; } -function nearestDeclaredParent(name: string, declared: ReadonlySet): string { +// The closest ancestor group that is declared, so an undeclared "a/b/c" hangs +// under "a" when only "a" exists. +export function nearestDeclaredParent(name: string, declared: ReadonlySet): string { let candidate = name; while (true) { const cut = candidate.lastIndexOf("/"); diff --git a/web/src/connections/hostSearch.ts b/web/src/connections/hostSearch.ts new file mode 100644 index 000000000..ce6aecada --- /dev/null +++ b/web/src/connections/hostSearch.ts @@ -0,0 +1,27 @@ +// The one rule for "does this host match what was typed": a case-insensitive +// substring over every field a person might remember the host by. Screens +// differ in which fields they have, not in how they match. +export type HostSearchFields = { + alias: string; + group?: string; + hostName?: string; + user?: string; + // The `user@host:port` line as a screen shows it, so it can be typed back. + destination?: string; + path?: string; + patterns?: readonly string[]; + tags?: readonly string[]; +}; + +export function normalizeHostQuery(raw: string): string { + return raw.trim().toLocaleLowerCase(); +} + +export function hostMatchesQuery(fields: HostSearchFields, normalizedQuery: string): boolean { + if (normalizedQuery === "") return true; + const candidates = [ + fields.alias, fields.group, fields.hostName, fields.user, fields.destination, fields.path, + ...(fields.patterns ?? []), ...(fields.tags ?? []), + ]; + return candidates.some((candidate) => candidate !== undefined && candidate.toLocaleLowerCase().includes(normalizedQuery)); +} diff --git a/web/src/diagnostics/DiagnosticsPanel.tsx b/web/src/diagnostics/DiagnosticsPanel.tsx index 0f1928eb6..338c04015 100644 --- a/web/src/diagnostics/DiagnosticsPanel.tsx +++ b/web/src/diagnostics/DiagnosticsPanel.tsx @@ -12,6 +12,7 @@ import { useTranslate } from "../i18n/context"; import { Button, Card, Notice } from "../ui/surface"; import { PageHeader } from "../ui/page"; import { Icon } from "../ui/icons"; +import { useAsyncOperation } from "../ui/useAsyncOperation"; const mobileTouchTargets = "[&_button]:min-h-10 md:[&_button]:min-h-0"; @@ -30,8 +31,8 @@ export function DiagnosticsPanel({ api = diagnosticsApi, host, hosts = [] }: Dia const [effective, setEffective] = useState(null); const [reach, setReach] = useState(null); const [auth, setAuth] = useState(null); - const [error, setError] = useState(""); - const [busy, setBusy] = useState(false); + const check = useAsyncOperation(); + const { fail: reportFailure, clearError } = check; useEffect(() => { if (embedded) return; @@ -42,30 +43,22 @@ export function DiagnosticsPanel({ api = diagnosticsApi, host, hosts = [] }: Dia if (active) setConfig(result); }) .catch(() => { - if (active) setError(t("diag.configUnreadable")); + if (active) reportFailure(t("diag.configUnreadable")); }); return () => { active = false; }; - }, [api, embedded, t]); + }, [api, embedded, t, reportFailure]); useEffect(() => { setEffective(null); setReach(null); setAuth(null); - setError(""); - }, [alias]); + clearError(); + }, [alias, clearError]); - async function run(operation: () => Promise, apply: (value: T) => void, failure: string) { - setError(""); - setBusy(true); - try { - apply(await operation()); - } catch { - setError(failure); - } finally { - setBusy(false); - } + function run(operation: () => Promise, apply: (value: T) => void, failure: string) { + return check.run(operation, { apply, describe: () => failure }); } const directives = effective?.executableDirectives ?? []; @@ -89,7 +82,7 @@ export function DiagnosticsPanel({ api = diagnosticsApi, host, hosts = [] }: Dia ), }, ]; - const blocked = busy || alias === ""; + const blocked = check.busy || alias === ""; const hasResults = effective !== null || reach !== null || auth !== null; return ( @@ -101,8 +94,8 @@ export function DiagnosticsPanel({ api = diagnosticsApi, host, hosts = [] }: Dia )} - {error ? ( - {error} + {check.error ? ( + {check.error} ) : null} @@ -143,8 +136,8 @@ export function DiagnosticsPanel({ api = diagnosticsApi, host, hosts = [] }: Dia

- - {busy ? t("diag.running") : alias === "" ? t("diag.needsAlias") : t("diag.idle")} + + {check.busy ? t("diag.running") : alias === "" ? t("diag.needsAlias") : t("diag.idle")}

diff --git a/web/src/features/workspaces/TerminalWorkspace.test.tsx b/web/src/features/workspaces/TerminalWorkspace.test.tsx index f7df4cc1e..b059bdc52 100644 --- a/web/src/features/workspaces/TerminalWorkspace.test.tsx +++ b/web/src/features/workspaces/TerminalWorkspace.test.tsx @@ -674,7 +674,7 @@ describe("TerminalWorkspace pane movement", () => { expect(workspace.restore).toHaveBeenCalledTimes(1); expect(container.querySelectorAll("[data-workspace-pane]")).toHaveLength(2); expect(screen.getByText("Restored web-a")).toBeInTheDocument(); - expect(screen.getByText("The console could not be opened.")).toBeInTheDocument(); + expect(screen.getByText("The terminal could not be opened.")).toBeInTheDocument(); expect(screen.queryByText("open_failed")).not.toBeInTheDocument(); rerender(); diff --git a/web/src/features/workspaces/TerminalWorkspace.tsx b/web/src/features/workspaces/TerminalWorkspace.tsx index 4543e8c1f..aaf868d73 100644 --- a/web/src/features/workspaces/TerminalWorkspace.tsx +++ b/web/src/features/workspaces/TerminalWorkspace.tsx @@ -9,6 +9,7 @@ import { WorkspaceCommandCenter } from "./WorkspaceCommandCenter"; import { consoleDragMimeType, type LiveWorkspaceSummary } from "./live"; import { browserSessionStorage, loadLiveWorkspace, saveLiveWorkspace } from "./livePersistence"; import { InputDialog } from "../../ui/InputDialog"; +import { ConfirmDialog } from "../../ui/ConfirmDialog"; import { useMediaQuery } from "../../ui/useMediaQuery"; import { SplitResizeHandle } from "../../ui/SplitResizeHandle"; import { automaticWorkspaceName, findPane, findPaneBySession, paneForSession, paneID, restoreLiveNode, singlePaneLayout } from "./panes"; @@ -17,6 +18,7 @@ import { DockPreview, dockEdge } from "./DockPreview"; import { WorkspaceEmptyState } from "./WorkspaceEmptyState"; import { WorkspaceMenu } from "./WorkspaceMenu"; import { useWorkspaceRestore, type WorkspaceRestoreRequest } from "./useWorkspaceRestore"; +import { Notice } from "../../ui/surface"; export type { WorkspaceRestoreRequest } from "./useWorkspaceRestore"; export type WorkspaceRenameRequest = { name: string; sequence: number }; @@ -52,6 +54,7 @@ export function TerminalWorkspace({ const [liveRestoreReady, setLiveRestoreReady] = useState(false); const [liveWorkspaceName, setLiveWorkspaceName] = useState(""); const [saveDialogOpen, setSaveDialogOpen] = useState(false); + const [deletingWorkspace, setDeletingWorkspace] = useState(null); const consumedRename = useRef(0); const liveWorkspaceID = useRef(paneID()); const liveStorage = useMemo(() => browserSessionStorage(), []); @@ -290,6 +293,13 @@ export function TerminalWorkspace({ } catch (error) { setProblem(failureCode(error) || "workspace_failed"); } } + async function deleteWorkspace(id: string) { + try { + await workspaceApi.remove(id); + setSelectedWorkspace(""); setSaved(await workspaceApi.list()); setProblem(""); + } catch (error) { setProblem(failureCode(error) || "workspace_failed"); } + } + useEffect(() => { if (renameRequest === null || renameRequest.sequence <= consumedRename.current) return; consumedRename.current = renameRequest.sequence; @@ -381,7 +391,7 @@ export function TerminalWorkspace({ canSave={visibleLayout !== null || active !== null} onSave={() => setSaveDialogOpen(true)} onReopen={(id) => void restoreWorkspace(id)} - onDelete={(id) => void workspaceApi.remove(id).then(async () => { setSelectedWorkspace(""); setSaved(await workspaceApi.list()); })} + onDelete={(id) => setDeletingWorkspace(saved.find((item) => item.id === id) ?? null)} /> ) : null} {commandCenter && commandTargets.length > 0 ? setCommandCenter(false)} /> : null} @@ -401,7 +411,21 @@ export function TerminalWorkspace({ onCancel={() => setSaveDialogOpen(false)} /> ) : null} - {problem === "" ? null :

{problem}

} + {deletingWorkspace === null ? null : ( + {t("workspace.deleteBody")}

} + confirmLabel={t("workspace.confirmDelete")} + cancelLabel={t("workspace.cancel")} + onCancel={() => setDeletingWorkspace(null)} + onConfirm={() => { + setDeletingWorkspace(null); + void deleteWorkspace(deletingWorkspace.id); + }} + /> + )} + {problem === "" ? null : {problem}} {compactViewport && compactPanes.length > 1 ? (