@inkeep/open-knowledge 0.77.1 → 0.77.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -6
- package/dist/constants-W-c5c-kO.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-U5aBdaLo.mjs → init-CLPTtBmC.mjs} +2 -2
- package/dist/init-D0SV15U4.mjs +1 -0
- package/dist/{launch-json-removal-C7KXcXS5.mjs → launch-json-removal-CDnr39YV.mjs} +1 -1
- package/dist/loader-Bm887R04.mjs +1 -0
- package/dist/{loader-CFMvl4wm.mjs → loader-msmj0fIu.mjs} +1 -1
- package/dist/preview-ChX_r6_E.mjs +1 -0
- package/dist/{preview-CmuwHOil.mjs → preview-DH0OtsYj.mjs} +1 -1
- package/dist/public/assets/{ActivityModeContent-B-ZLY6-p.js → ActivityModeContent-Vl6pwifD.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-Cpe-UdNz.js → AddPropertiesButton-Dkcg9vdy.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-tb77gOnf.js → AgentDiffPane-Dzxa315q.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-D0Blnl3k.js → CodeMirrorPropInput-DVe4wD_N.js} +1 -1
- package/dist/public/assets/{DocumentContext-QmacaDR_.js → DocumentContext-CNNn86SD.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-DZDcvsBc.js → EditorModeToggle-B_ngg6b-.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BVSWR_QK.js → EnableSyncConfirmDialog-JheZk6DM.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-0gU8KjGc.js → ExcalidrawDocEditor-DbYGp5_p.js} +1 -1
- package/dist/public/assets/FeedbackForm-WmvAxHkb.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-DOCKQVuI.js → ImportSkillDialog-D5szggRQ.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-NbPKgQmv.js → LintConfigEditor-B0KT3R1_.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CQf6baFP.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-DJ1AlGGp.js → ManagedArtifactProperties-DlORA12f.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-B8UDeG0E.js → MermaidDocEditor-Cq1CyzOk.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-D-Piv_M9.js → PropertyDisplayRow-BsydKIFK.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CVxipECE.js → SchemaConfigEditor-37WJ51GR.js} +1 -1
- package/dist/public/assets/{SessionsHost-CFN8AJ6f.js → SessionsHost-CYVsjrQI.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CCRldbxL.js → SettingsDialogBody-B5-Ld_e6.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-D7XOHL5w.js → ShareReceiveMissDialog-K5C9JK_G.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-wbG0Ino4.js → SkillToolbarControls-DggrLEDq.js} +1 -1
- package/dist/public/assets/{SourceEditor-BHdNDSvH.js → SourceEditor-Cw4wSDtc.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-Dd1m0GbY.js → TerminalWindowApp-DghgC-6z.js} +1 -1
- package/dist/public/assets/{TextDocEditor-BmLCvZIC.js → TextDocEditor-DrBWJVuW.js} +1 -1
- package/dist/public/assets/ThreadView-BM6MuNzK.js +18 -0
- package/dist/public/assets/{TimelineDiffPane-pjQkDNNx.js → TimelineDiffPane-jaBZlYWq.js} +1 -1
- package/dist/public/assets/{auth-state-cache-waWLRD1n.js → auth-state-cache-vidMN3NZ.js} +1 -1
- package/dist/public/assets/{client-version-CMtf6pHu.js → client-version-CMlRvumK.js} +1 -1
- package/dist/public/assets/{comment-chips-CSJdYGZp.js → comment-chips-geicHQR3.js} +1 -1
- package/dist/public/assets/{config-provider-CuPokvsj.js → config-provider-DFcchYF_.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-BUslAF-f.js → doc-undo-manager-DZnm55D1.js} +1 -1
- package/dist/public/assets/{index-B7axhvoC.js → index-ChCXmSPV.js} +8 -8
- package/dist/public/assets/{messages-DRQJ8t98.js → messages-BFg9-qlP.js} +1 -1
- package/dist/public/assets/{messages-CskOgJ4W.js → messages-BHdlsepL.js} +1 -1
- package/dist/public/assets/{messages-BzLr2Mk3.js → messages-BjZgTBY9.js} +1 -1
- package/dist/public/assets/{messages-DGoDgIWY.js → messages-BkkpXTZM.js} +1 -1
- package/dist/public/assets/{messages-X-3z9bgM.js → messages-C2QtPbJj.js} +1 -1
- package/dist/public/assets/{messages-Bdp74L6-.js → messages-CIY7f-a1.js} +1 -1
- package/dist/public/assets/{messages-8DENGuz1.js → messages-DEMxBGLW.js} +1 -1
- package/dist/public/assets/{messages-DuiPtGEN.js → messages-DTROvhTk.js} +1 -1
- package/dist/public/assets/{messages-BjGQZSyj.js → messages-D_UKhiH5.js} +1 -1
- package/dist/public/assets/{messages-C_wRd51h.js → messages-D_m0QoQO.js} +1 -1
- package/dist/public/assets/{messages-Bf04Pxlz.js → messages-Dp632KAD.js} +1 -1
- package/dist/public/assets/{messages-BdV5NaIT.js → messages-FtAFLlAq.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DtOdZu6i.js → pending-receive-nav-store-BpynqTsI.js} +1 -1
- package/dist/public/assets/{progress-DjRKjq0J.js → progress-B4-6I3_h.js} +1 -1
- package/dist/public/assets/{selection-context-CAaPO1zO.js → selection-context-gelM_MCh.js} +1 -1
- package/dist/public/assets/{src-BvGMCGNe.js → src-C8GI9PJ6.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CBQW1hAw.js → telemetry-impl-D2ZNvJ3W.js} +1 -1
- package/dist/public/assets/{telemetry-startup-DYqRXvUE.js → telemetry-startup-BJpsbP-K.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-crxyBsNy.js → typing-burst-detector-CoszxP3G.js} +1 -1
- package/dist/public/assets/{uninstall-DCh_yZKQ.js → uninstall-DYsPV9Se.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BKcCiJgH.js → use-activity-panel-B-sX0TT-.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-B6LsV7FK.js → use-apply-config-language--D5KrAwV.js} +2 -2
- package/dist/public/assets/{use-open-skill-Y76WcBve.js → use-open-skill-CKVWwdSU.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CaCIjZSY.js → use-terminal-enabled-DPUHlEKT.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CbTrgsVj.js → use-timeline-entry-diff-BvjsGsbq.js} +1 -1
- package/dist/public/index.html +19 -19
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-A2dQCmEV.mjs → registry-probes-BYAKmJvs.mjs} +1 -1
- package/dist/{removal-file-path-Bv9B8bg3.mjs → removal-file-path-q-74WYn7.mjs} +1 -1
- package/dist/{repair-launch-json-Co6NQOZG.mjs → repair-launch-json-BCZkq65i.mjs} +1 -1
- package/dist/{repair-mcp-configs-CunG2P58.mjs → repair-mcp-configs-iUo6UqXi.mjs} +1 -1
- package/dist/src-BsylO8cq.mjs +1 -0
- package/dist/{src-xNwfWs22.mjs → src-DUvrlIQf.mjs} +1 -1
- package/dist/{start-DZs8NQLs.mjs → start-B3w52a6a.mjs} +2 -2
- package/dist/start-BKfwgjAg.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-C5-kuT58.mjs +0 -1
- package/dist/init-mbatFex8.mjs +0 -1
- package/dist/loader-C4Cf88NM.mjs +0 -1
- package/dist/preview-hwf7I6tS.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CF-fsKm4.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DWjlw3bN.js +0 -1
- package/dist/public/assets/ThreadView-BJIl1erg.js +0 -18
- package/dist/src-CW08SNX5.mjs +0 -1
- package/dist/start-CfyzRyVa.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./globals-D1RUz7O8.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a,t as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./utils-CPqDy6Hr.js";import{t as l}from"./button-HKX9wT1K.js";import{t as u}from"./checkbox-Crs_F_Np.js";import{t as d}from"./label-D-K3fWtj.js";import{n as f,t as p}from"./radio-group-npdxiS6E.js";import{Jo as m,Wi as h,Yi as g,dn as _,fn as v,ko as y,un as b}from"./dist-DOFOMv5X.js";import{t as x}from"./dist-Cr4-nBVI.js";import{t as S}from"./check-BzfGb3KU.js";import{t as C}from"./spinner-Bp2_BYkl.js";import{t as w}from"./input-f41fkc3m.js";import{a as T,n as E,r as D,t as O}from"./use-apply-config-language-B6LsV7FK.js";import{t as k}from"./badge-BGcBcbDV.js";import{t as A}from"./textarea-DkcNoPBJ.js";var j=e(r(),1),M=t();async function N(){try{let e=E(new URLSearchParams(window.location.search).get(`locale`))??D(),{locale:t}=g({override:void 0,storedPreference:e,preferenceList:h(),supportedLocales:m,autoDetectableLocales:y});await T(t),O({preference:e??`system`,locale:t})}catch(e){console.warn(`Could not load the uninstall language; using English.`,e)}}var P=s();async function F(){let e=typeof window>`u`?void 0:window.okUninstall;if(e===void 0)return{kind:`unavailable`,reason:`missing-bridge`};let t;try{let n=await Promise.race([e.ready(),new Promise(e=>{t=setTimeout(()=>e({kind:`unavailable`,reason:`timeout`}),5e3)})]);return n.kind===`accepted`?{kind:`unavailable`,reason:`unexpected-response`}:(n.kind!==`screen`&&console.warn(`Uninstall screen unavailable`,n.reason),n)}catch(e){return console.warn(`Uninstall screen request failed`,e),{kind:`unavailable`,reason:`request-failed`}}finally{clearTimeout(t)}}function I(e){let t=typeof window>`u`?void 0:window.okUninstall;t!==void 0&&t.send(e).catch(()=>void 0)}var L=n();function R(e){let t=(0,P.c)(6),{items:n}=e,r;if(t[0]!==n){let e;t[2]===n.length?e=t[3]:(e=(e,t)=>(0,L.jsxs)(`li`,{className:`relative pb-5 ps-[30px] last:pb-1`,children:[t<n.length-1&&(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-[22px] bottom-0.5 start-[9px] w-0.5 bg-border`}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:c(`absolute top-px start-0 inline-flex size-5 items-center justify-center rounded-full`,e.done?`bg-primary/15 text-primary`:`border-[1.5px] border-muted-foreground/50`),children:e.done&&(0,L.jsx)(S,{className:`size-3`})}),(0,L.jsx)(`span`,{className:`sr-only`,children:e.done?(0,L.jsx)(i,{id:`clJ3qM`}):(0,L.jsx)(i,{id:`yU_9ur`})}),(0,L.jsxs)(`span`,{className:`block`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:e.label}),e.detail!==void 0&&(0,L.jsx)(`span`,{className:`mt-0.5 block text-muted-foreground leading-snug`,children:e.detail})]})]},e.label),t[2]=n.length,t[3]=e),r=n.map(e),t[0]=n,t[1]=r}else r=t[1];let a;return t[4]===r?a=t[5]:(a=(0,L.jsx)(`ol`,{className:`mb-1.5`,children:r}),t[4]=r,t[5]=a),a}function z(e){let t=(0,P.c)(51),{notice:n,onConfirm:r,onCancel:i,onRevealLog:o}=e,{_:s}=a(),c=(0,j.useId)(),u=(0,j.useId)(),d=(0,j.useId)(),f=(0,j.useRef)(null),p=n.cancelLabel!==void 0,m,h;t[0]!==p||t[1]!==n.logRevealLabel||t[2]!==i||t[3]!==r?(m=()=>{let e=e=>{if(!e.isComposing){if(e.key===`Tab`){let t=f.current?.querySelectorAll(`button:not([disabled]), [tabindex="0"]`),n=t?.[0],r=t?.[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus());return}e.key===`Escape`&&(p||n.logRevealLabel!==void 0?i():r())}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},h=[p,n.logRevealLabel,i,r],t[0]=p,t[1]=n.logRevealLabel,t[2]=i,t[3]=r,t[4]=m,t[5]=h):(m=t[4],h=t[5]),(0,j.useEffect)(m,h);let g=n.subtitle===void 0?u:`${d} ${u}`,_;t[6]!==n.title||t[7]!==c?(_=(0,L.jsx)(`h1`,{id:c,className:`font-medium text-base leading-none`,children:n.title}),t[6]=n.title,t[7]=c,t[8]=_):_=t[8];let v;t[9]!==n.subtitle||t[10]!==d?(v=n.subtitle!==void 0&&(0,L.jsx)(`p`,{id:d,className:`text-muted-foreground text-sm leading-snug`,children:n.subtitle}),t[9]=n.subtitle,t[10]=d,t[11]=v):v=t[11];let y;t[12]!==_||t[13]!==v?(y=(0,L.jsxs)(`header`,{className:`shrink-0 space-y-4 px-6 pt-5 pb-3.5`,children:[_,v]}),t[12]=_,t[13]=v,t[14]=y):y=t[14];let b;t[15]===n.paragraphs?b=t[16]:(b=n.paragraphs.map(B),t[15]=n.paragraphs,t[16]=b);let x;t[17]===n.checklist?x=t[18]:(x=n.checklist!==void 0&&(0,L.jsx)(R,{items:n.checklist}),t[17]=n.checklist,t[18]=x);let S;t[19]!==s||t[20]!==n.log?(S=n.log!==void 0&&(0,L.jsx)(`section`,{"aria-label":s({id:`Oi56Cu`}),tabIndex:0,className:`subtle-scrollbar mt-0.5 mb-2.5 min-h-20 flex-1 overflow-auto rounded-lg border border-border border-dotted bg-muted/40 px-3 py-2.5 focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,L.jsx)(`pre`,{className:`select-text whitespace-pre-wrap font-mono text-xs leading-relaxed wrap-anywhere`,children:n.log})}),t[19]=s,t[20]=n.log,t[21]=S):S=t[21];let C;t[22]===n.footnote?C=t[23]:(C=n.footnote!==void 0&&(0,L.jsx)(`p`,{className:`select-text text-muted-foreground text-xs wrap-anywhere`,children:n.footnote}),t[22]=n.footnote,t[23]=C);let w;t[24]!==n.logRevealLabel||t[25]!==o?(w=n.logRevealLabel!==void 0&&(0,L.jsx)(`p`,{className:`mt-0.5`,children:(0,L.jsx)(l,{type:`button`,variant:`link-muted`,size:`xs`,className:`h-auto px-0 underline underline-offset-2`,onClick:o,children:n.logRevealLabel})}),t[24]=n.logRevealLabel,t[25]=o,t[26]=w):w=t[26];let T;t[27]!==u||t[28]!==C||t[29]!==w||t[30]!==b||t[31]!==x||t[32]!==S?(T=(0,L.jsxs)(`div`,{id:u,className:`flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm`,children:[b,x,S,C,w]}),t[27]=u,t[28]=C,t[29]=w,t[30]=b,t[31]=x,t[32]=S,t[33]=T):T=t[33];let E;t[34]!==n.cancelLabel||t[35]!==i?(E=n.cancelLabel!==void 0&&(0,L.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:i,children:n.cancelLabel}),t[34]=n.cancelLabel,t[35]=i,t[36]=E):E=t[36];let D=n.danger===!0?`destructive`:`default`,O=!p,k;t[37]!==n.confirmLabel||t[38]!==r||t[39]!==D||t[40]!==O?(k=(0,L.jsx)(l,{type:`button`,variant:D,autoFocus:O,onClick:r,children:n.confirmLabel}),t[37]=n.confirmLabel,t[38]=r,t[39]=D,t[40]=O,t[41]=k):k=t[41];let A;t[42]!==E||t[43]!==k?(A=(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[E,k]}),t[42]=E,t[43]=k,t[44]=A):A=t[44];let M;return t[45]!==T||t[46]!==A||t[47]!==g||t[48]!==y||t[49]!==c?(M=(0,L.jsxs)(`div`,{ref:f,role:`alertdialog`,"aria-labelledby":c,"aria-modal":`true`,"aria-describedby":g,className:`flex h-dvh flex-col bg-background text-foreground`,children:[y,T,A]}),t[45]=T,t[46]=A,t[47]=g,t[48]=y,t[49]=c,t[50]=M):M=t[50],M}function B(e){return(0,L.jsx)(`p`,{className:`mb-2.5 leading-normal`,children:e},e)}function ee(e){return e.open||e.running?`active`:e.recent?`recent`:null}function V(e){return e.split(`/`).filter(Boolean).at(-1)??e}function te(e){let t=(0,P.c)(9),{status:n}=e,{_:r}=a(),i;t[0]===r?i=t[1]:(i=r({id:`s_ereB`}),t[0]=r,t[1]=i);let o;t[2]===r?o=t[3]:(o=r({id:`_2cM9E`}),t[2]=r,t[3]=o);let s;t[4]!==i||t[5]!==o?(s={active:i,recent:o},t[4]=i,t[5]=o,t[6]=s):s=t[6];let c=s[n],l;return t[7]===c?l=t[8]:(l=(0,L.jsx)(k,{variant:`secondary`,className:`rounded-sm text-muted-foreground`,children:c}),t[7]=c,t[8]=l),l}function H(e){let t=(0,P.c)(28),{project:n,checked:r,onCheckedChange:i}=e,{_:o}=a(),s=(0,j.useId)(),c;t[0]===n?c=t[1]:(c=ee(n),t[0]=n,t[1]=c);let l=c,f;t[2]===i?f=t[3]:(f=e=>i(e===!0),t[2]=i,t[3]=f);let p;t[4]!==o||t[5]!==n.path?(p=o({id:`CHfFN_`,values:{0:n.path}}),t[4]=o,t[5]=n.path,t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==r||t[9]!==f||t[10]!==p?(m=(0,L.jsx)(u,{id:s,className:`mt-0.5`,checked:r,onCheckedChange:f,"aria-label":p}),t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.path?h=t[13]:(h=V(n.path),t[12]=n.path,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,L.jsx)(`span`,{className:`w-full truncate font-medium text-sm`,children:h}),t[14]=h,t[15]=g);let _;t[16]===n.path?_=t[17]:(_=(0,L.jsx)(`span`,{className:`w-full select-text break-words text-muted-foreground text-xs`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==s||t[19]!==g||t[20]!==_?(v=(0,L.jsxs)(d,{htmlFor:s,className:`min-w-0 flex-col items-start gap-0.5 font-normal`,children:[g,_]}),t[18]=s,t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;t[22]===l?y=t[23]:(y=l!==null&&(0,L.jsx)(`div`,{className:`flex justify-end max-sm:col-start-2 max-sm:justify-start`,children:(0,L.jsx)(te,{status:l})}),t[22]=l,t[23]=y);let b;return t[24]!==m||t[25]!==v||t[26]!==y?(b=(0,L.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2.5 border-border/60 border-b px-3 py-2.5 last:border-b-0 hover:bg-accent/40 max-sm:grid-cols-[auto_minmax(0,1fr)]`,children:[m,v,y]}),t[24]=m,t[25]=v,t[26]=y,t[27]=b):b=t[27],b}function U(e){let t=(0,P.c)(45),{projects:n,onConfirm:r,onCancel:o}=e,{_:s}=a(),[c,f]=(0,j.useState)(K),p=(0,j.useId)(),m=(0,j.useId)(),h=(0,j.useId)(),g=n.length>0&&c.size===n.length?!0:c.size>0?`indeterminate`:!1,_;t[0]===n?_=t[1]:(_=e=>f(e?new Set(n.map(ne)):new Set),t[0]=n,t[1]=_);let v=_,y,b;t[2]!==o||t[3]!==n?(y=()=>{let e=e=>{if(e.key===`Escape`){o();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`&&(e.preventDefault(),f(new Set(n.map(G))))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},b=[o,n],t[2]=o,t[3]=n,t[4]=y,t[5]=b):(y=t[4],b=t[5]),(0,j.useEffect)(y,b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,L.jsx)(i,{id:`PrVaZo`}),t[6]=x):x=t[6];let S;t[7]===p?S=t[8]:(S=(0,L.jsx)(`h1`,{id:p,className:`font-medium leading-none text-base`,children:x}),t[7]=p,t[8]=S);let C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,L.jsx)(i,{id:`keop3U`}),t[9]=C):C=t[9];let w;t[10]===m?w=t[11]:(w=(0,L.jsx)(`p`,{id:m,className:`text-sm text-muted-foreground`,children:C}),t[10]=m,t[11]=w);let T;t[12]!==S||t[13]!==w?(T=(0,L.jsxs)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5 space-y-4`,children:[S,w]}),t[12]=S,t[13]=w,t[14]=T):T=t[14];let E;t[15]===s?E=t[16]:(E=s({id:`QySH4I`}),t[15]=s,t[16]=E);let D;t[17]!==s||t[18]!==n||t[19]!==h||t[20]!==g||t[21]!==c||t[22]!==v?(D=n.length===0?(0,L.jsx)(`div`,{className:`rounded-lg border border-border p-4`,children:(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,L.jsx)(i,{id:`bKt9Jk`})})}):(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border`,children:[(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-border border-b px-3 py-2.5 bg-muted/30`,children:[(0,L.jsx)(u,{id:h,checked:g,onCheckedChange:e=>v(e===!0)}),(0,L.jsx)(d,{htmlFor:h,className:`flex-1 font-medium text-sm`,children:(0,L.jsx)(i,{id:`wgNoIs`})}),(0,L.jsxs)(`span`,{role:`status`,"aria-label":s({id:`nsUDL8`,values:{0:c.size,1:n.length}}),className:`text-muted-foreground text-xs tabular-nums`,children:[c.size,` / `,n.length]})]}),(0,L.jsx)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-scroll [scrollbar-gutter:stable]`,children:n.map((e,t)=>(0,L.jsx)(H,{project:e,checked:c.has(t),onCheckedChange:e=>{f(n=>{let r=new Set(n);return e?r.add(t):r.delete(t),r})}},e.path))})]}),t[17]=s,t[18]=n,t[19]=h,t[20]=g,t[21]=c,t[22]=v,t[23]=D):D=t[23];let O;t[24]!==D||t[25]!==E?(O=(0,L.jsx)(`section`,{"aria-label":E,className:`flex min-h-0 flex-1 flex-col px-6 py-3.5`,children:D}),t[24]=D,t[25]=E,t[26]=O):O=t[26];let k;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,L.jsx)(i,{id:`dEgA5A`}),t[27]=k):k=t[27];let A;t[28]===o?A=t[29]:(A=(0,L.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:o,children:k}),t[28]=o,t[29]=A);let M;t[30]!==r||t[31]!==c?(M=()=>r([...c].sort(W)),t[30]=r,t[31]=c,t[32]=M):M=t[32];let N;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,L.jsx)(i,{id:`J7nMqi`}),t[33]=N):N=t[33];let F;t[34]===M?F=t[35]:(F=(0,L.jsx)(l,{type:`button`,variant:`destructive`,onClick:M,children:N}),t[34]=M,t[35]=F);let I;t[36]!==A||t[37]!==F?(I=(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[A,F]}),t[36]=A,t[37]=F,t[38]=I):I=t[38];let R;return t[39]!==m||t[40]!==O||t[41]!==I||t[42]!==T||t[43]!==p?(R=(0,L.jsxs)(`div`,{role:`dialog`,"aria-labelledby":p,"aria-describedby":m,className:`flex h-dvh flex-col overflow-hidden bg-background text-foreground`,children:[T,O,I]}),t[39]=m,t[40]=O,t[41]=I,t[42]=T,t[43]=p,t[44]=R):R=t[44],R}function W(e,t){return e-t}function G(e,t){return t}function ne(e,t){return t}function K(){return new Set}function re(){let e=(0,P.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(C,{"aria-hidden":`true`,className:`mx-auto mb-4 size-8 text-primary`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(`h1`,{className:`mb-2 font-medium text-base leading-none`,children:(0,L.jsx)(i,{id:`j2229h`})}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`main`,{className:`grid h-dvh place-items-center bg-background text-foreground`,children:(0,L.jsxs)(`div`,{role:`status`,className:`max-w-vw px-7 py-7 text-center`,children:[t,n,(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm leading-relaxed`,children:(0,L.jsx)(i,{id:`kCjkGY`})})]})}),e[2]=r):r=e[2],r}function q(e){let t=(0,P.c)(8),{outcome:n,onConfirm:r,onCancel:i,onRevealLog:o}=e,{_:s}=a(),c;t[0]!==s||t[1]!==n?(c=n===`failure`?{title:s({id:`V3JCWv`}),paragraphs:[s({id:`wTf1ag`})],confirmLabel:s({id:`yz7wBu`}),logRevealLabel:s({id:`Oi56Cu`})}:{title:s({id:`JReD69`}),subtitle:s({id:`vmwZHP`}),paragraphs:[],checklist:[{label:s({id:`aTDVi6`}),detail:s({id:`psUrB1`}),done:!0},{label:s({id:`bmI-q1`}),detail:s({id:`MAVznT`}),done:!0},{label:s({id:`ES1zFv`}),detail:s({id:`BVmgJG`}),done:!1}],logRevealLabel:s({id:`Oi56Cu`}),confirmLabel:s({id:`LtSYdi`})},t[0]=s,t[1]=n,t[2]=c):c=t[2];let l=c,u;return t[3]!==l||t[4]!==i||t[5]!==r||t[6]!==o?(u=(0,L.jsx)(z,{notice:l,onConfirm:r,onCancel:i,onRevealLog:o}),t[3]=l,t[4]=i,t[5]=r,t[6]=o,t[7]=u):u=t[7],u}function ie(){let{_:e}=a();return{"workflow-fit":e({id:`5vAI6Z`}),"missing-feature":e({id:`cH0dkG`}),"hard-to-start":e({id:`uoJF_D`}),unreliable:e({id:`WGMoTY`}),"switched-tool":e({id:`jO18NZ`}),"one-off":e({id:`S3qu11`}),other:e({id:`aQyGJc`})}}function J(e){let t=(0,P.c)(86),{onSend:n,onSkip:r}=e,{_:o}=a(),s=ie(),[c,m]=(0,j.useState)(``),[h,g]=(0,j.useState)(``),[v,y]=(0,j.useState)(!1),[x,S]=(0,j.useState)(``),C=(0,j.useRef)(null),T=(0,j.useId)(),E=(0,j.useId)(),D=(0,j.useId)(),O=(0,j.useId)(),k=(0,j.useId)(),M=(0,j.useId)(),N,F;t[0]===v?(N=t[1],F=t[2]):(N=()=>{v&&C.current?.focus()},F=[v],t[0]=v,t[1]=N,t[2]=F),(0,j.useEffect)(N,F);let I;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,L.jsx)(i,{id:`ElyuiT`}),t[3]=I):I=t[3];let R;t[4]===T?R=t[5]:(R=(0,L.jsx)(`h1`,{id:T,className:`font-medium leading-none text-base`,children:I}),t[4]=T,t[5]=R);let z;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,L.jsx)(i,{id:`ZDOq9A`}),t[6]=z):z=t[6];let B;t[7]===E?B=t[8]:(B=(0,L.jsx)(`p`,{id:E,className:`text-muted-foreground text-sm`,children:z}),t[7]=E,t[8]=B);let ee;t[9]!==R||t[10]!==B?(ee=(0,L.jsxs)(`header`,{className:`px-6 pt-5 pb-3.5 space-y-4`,children:[R,B]}),t[9]=R,t[10]=B,t[11]=ee):ee=t[11];let V;t[12]!==x||t[13]!==v||t[14]!==h||t[15]!==n||t[16]!==c?(V=e=>{e.preventDefault();let t=h.trim(),r=v?x.trim():``;n({...c===``?{}:{reason:c},...t===``?{}:{note:t},...r===``?{}:{email:r}})},t[12]=x,t[13]=v,t[14]=h,t[15]=n,t[16]=c,t[17]=V):V=t[17];let te;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,L.jsx)(i,{id:`oxdGJn`}),t[18]=te):te=t[18];let H;t[19]===D?H=t[20]:(H=(0,L.jsx)(`p`,{id:D,className:`mb-2 font-medium text-sm`,children:te}),t[19]=D,t[20]=H);let U;t[21]!==D||t[22]!==s?(U=_.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-1 py-1`,children:[(0,L.jsx)(f,{id:`${D}-${e.value}`,value:e.value}),(0,L.jsx)(d,{htmlFor:`${D}-${e.value}`,className:`font-normal text-sm leading-snug`,children:s[e.value]})]},e.value)),t[21]=D,t[22]=s,t[23]=U):U=t[23];let W;t[24]!==D||t[25]!==c||t[26]!==U?(W=(0,L.jsx)(p,{"aria-labelledby":D,value:c,onValueChange:m,children:U}),t[24]=D,t[25]=c,t[26]=U,t[27]=W):W=t[27];let G;t[28]!==H||t[29]!==W?(G=(0,L.jsxs)(`div`,{className:`mb-6`,children:[H,W]}),t[28]=H,t[29]=W,t[30]=G):G=t[30];let ne;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,L.jsx)(i,{id:`axQ1h6`}),t[31]=ne):ne=t[31];let K;t[32]===O?K=t[33]:(K=(0,L.jsx)(d,{htmlFor:O,className:`mb-2 font-medium text-sm`,children:ne}),t[32]=O,t[33]=K);let re;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>g(e.target.value),t[34]=re):re=t[34];let q;t[35]!==h||t[36]!==O?(q=(0,L.jsx)(A,{id:O,rows:3,maxLength:b,value:h,onChange:re}),t[35]=h,t[36]=O,t[37]=q):q=t[37];let J;t[38]!==K||t[39]!==q?(J=(0,L.jsxs)(`div`,{className:`mb-6`,children:[K,q]}),t[38]=K,t[39]=q,t[40]=J):J=t[40];let ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>y(e===!0),t[41]=ae):ae=t[41];let Y;t[42]!==v||t[43]!==k?(Y=(0,L.jsx)(u,{id:k,checked:v,onCheckedChange:ae}),t[42]=v,t[43]=k,t[44]=Y):Y=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,L.jsx)(i,{id:`xEb24l`}),t[45]=oe):oe=t[45];let X;t[46]===k?X=t[47]:(X=(0,L.jsx)(d,{htmlFor:k,className:`font-medium text-sm`,children:oe}),t[46]=k,t[47]=X);let Z;t[48]!==Y||t[49]!==X?(Z=(0,L.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[Y,X]}),t[48]=Y,t[49]=X,t[50]=Z):Z=t[50];let se=!v,ce;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,L.jsx)(i,{id:`ATGYL1`}),t[51]=ce):ce=t[51];let Q;t[52]===M?Q=t[53]:(Q=(0,L.jsx)(d,{htmlFor:M,className:`mb-2 font-medium text-sm sr-only`,children:ce}),t[52]=M,t[53]=Q);let le;t[54]===o?le=t[55]:(le=o({id:`JHf6qZ`}),t[54]=o,t[55]=le);let ue=!v,de;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>S(e.target.value),t[56]=de):de=t[56];let fe;t[57]!==x||t[58]!==M||t[59]!==le||t[60]!==ue?(fe=(0,L.jsx)(w,{id:M,ref:C,type:`email`,maxLength:320,autoComplete:`email`,spellCheck:!1,placeholder:le,disabled:ue,value:x,onChange:de}),t[57]=x,t[58]=M,t[59]=le,t[60]=ue,t[61]=fe):fe=t[61];let pe;t[62]!==se||t[63]!==Q||t[64]!==fe?(pe=(0,L.jsxs)(`div`,{className:`mb-6`,hidden:se,children:[Q,fe]}),t[62]=se,t[63]=Q,t[64]=fe,t[65]=pe):pe=t[65];let me;t[66]!==G||t[67]!==J||t[68]!==Z||t[69]!==pe?(me=(0,L.jsxs)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-auto px-6 pt-1 pb-4`,children:[G,J,Z,pe]}),t[66]=G,t[67]=J,t[68]=Z,t[69]=pe,t[70]=me):me=t[70];let he;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,L.jsx)(i,{id:`6Uau97`}),t[71]=he):he=t[71];let ge;t[72]===r?ge=t[73]:(ge=(0,L.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:r,children:he}),t[72]=r,t[73]=ge);let _e;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,L.jsx)(l,{type:`submit`,children:(0,L.jsx)(i,{id:`xMsnTe`})}),t[74]=_e):_e=t[74];let ve;t[75]===ge?ve=t[76]:(ve=(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[ge,_e]}),t[75]=ge,t[76]=ve);let $;t[77]!==me||t[78]!==ve||t[79]!==V?($=(0,L.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:V,children:[me,ve]}),t[77]=me,t[78]=ve,t[79]=V,t[80]=$):$=t[80];let ye;return t[81]!==E||t[82]!==$||t[83]!==ee||t[84]!==T?(ye=(0,L.jsxs)(`div`,{role:`dialog`,"aria-labelledby":T,"aria-describedby":E,className:`flex h-dvh flex-col bg-background text-foreground`,children:[ee,$]}),t[81]=E,t[82]=$,t[83]=ee,t[84]=T,t[85]=ye):ye=t[85],ye}var ae=3,Y=250;function oe(e){if(e.kind!==`unavailable`)return!1;switch(e.reason){case`request-failed`:case`timeout`:return!0;case`missing-bridge`:case`unexpected-response`:return!1;default:return e}}function X(){let e=(0,P.c)(28),{_:t}=a(),[n,r]=(0,j.useState)(!1),[o,s]=(0,j.useState)(null),c,l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!0,t=0,n,i=async()=>{let a=await F();e&&(a.kind===`screen`?s(a.screen):(t+=1,oe(a)&&t<ae?n=setTimeout(()=>void i(),Y):r(!0)))};return i(),()=>{e=!1,clearTimeout(n)}},l=[],e[0]=c,e[1]=l):(c=e[0],l=e[1]),(0,j.useEffect)(c,l);let u=o?.kind,d=o?.kind===`progress`&&o.awaitResult===!0,f,p;if(e[2]!==d||e[3]!==u||e[4]!==n?(f=()=>{if(n||u!==`progress`)return;let e=!0,t,i=requestAnimationFrame(()=>{i=requestAnimationFrame(ve)}),a=0,o=async()=>{let n=await F();if(e){if(n.kind!==`screen`){if(a+=1,!oe(n)||a>=ae){r(!0);return}}else if(a=0,n.screen.kind!==`progress`){s(n.screen);return}t=setTimeout(()=>void o(),Y)}};d&&(t=setTimeout(()=>void o(),Y));let c=d?setTimeout(()=>{e=!1,clearTimeout(t),r(!0)},v):void 0;return()=>{e=!1,clearTimeout(t),clearTimeout(c),cancelAnimationFrame(i)}},p=[u,d,n],e[2]=d,e[3]=u,e[4]=n,e[5]=f,e[6]=p):(f=e[5],p=e[6]),(0,j.useEffect)(f,p),n){let n;e[7]===t?n=e[8]:(n=t({id:`ZR-8iJ`}),e[7]=t,e[8]=n);let r;e[9]===t?r=e[10]:(r=t({id:`xnWySt`}),e[9]=t,e[10]=r);let i;e[11]===r?i=e[12]:(i=[r],e[11]=r,e[12]=i);let a;e[13]===t?a=e[14]:(a=t({id:`yz7wBu`}),e[13]=t,e[14]=a);let o;return e[15]!==n||e[16]!==i||e[17]!==a?(o=(0,L.jsx)(z,{notice:{title:n,paragraphs:i,confirmLabel:a},onConfirm:_e,onCancel:ge,onRevealLog:he}),e[15]=n,e[16]=i,e[17]=a,e[18]=o):o=e[18],o}if(o!==null)switch(o.kind){case`picker`:{let t;return e[19]===o.projects?t=e[20]:(t=(0,L.jsx)(U,{projects:o.projects,onConfirm:me,onCancel:pe}),e[19]=o.projects,e[20]=t),t}case`survey`:{let t;return e[21]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(J,{onSend:fe,onSkip:de}),e[21]=t):t=e[21],t}case`progress`:{let t;return e[22]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(re,{}),e[22]=t):t=e[22],t}case`result`:{let t;return e[23]===o.outcome?t=e[24]:(t=(0,L.jsx)(q,{outcome:o.outcome,onRevealLog:ue,onConfirm:le,onCancel:Q}),e[23]=o.outcome,e[24]=t),t}case`notice`:{let t;return e[25]===o.notice?t=e[26]:(t=(0,L.jsx)(z,{notice:o.notice,onRevealLog:ce,onConfirm:se,onCancel:Z}),e[25]=o.notice,e[26]=t),t}default:return o}let m;return e[27]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,L.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center bg-background p-8 text-foreground`,children:(0,L.jsx)(`p`,{className:`text-center text-muted-foreground text-sm`,children:(0,L.jsx)(i,{id:`tzGWeg`})})}),e[27]=m):m=e[27],m}function Z(){return I({kind:`notice-cancel`})}function se(){return I({kind:`notice-confirm`})}function ce(){return I({kind:`notice-reveal-log`})}function Q(){return I({kind:`notice-cancel`})}function le(){return I({kind:`notice-confirm`})}function ue(){return I({kind:`notice-reveal-log`})}function de(){return I({kind:`survey-skip`})}function fe(e){return I({kind:`survey-send`,...e})}function pe(){return I({kind:`picker-cancel`})}function me(e){return I({kind:`picker-confirm`,selectedIndexes:e})}function he(){}function ge(){return window.close()}function _e(){return window.close()}function ve(){return I({kind:`progress-shown`})}var $=document.getElementById(`root`);if(!$)throw Error(`Root element not found`);N().then(()=>(0,M.createRoot)($).render((0,L.jsx)(j.StrictMode,{children:(0,L.jsx)(o,{i18n:x,children:(0,L.jsx)(X,{})})})));
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./globals-D1RUz7O8.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a,t as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./utils-CPqDy6Hr.js";import{t as l}from"./button-HKX9wT1K.js";import{t as u}from"./checkbox-Crs_F_Np.js";import{t as d}from"./label-D-K3fWtj.js";import{n as f,t as p}from"./radio-group-npdxiS6E.js";import{Jo as m,Wi as h,Yi as g,dn as _,fn as v,ko as y,un as b}from"./dist-DOFOMv5X.js";import{t as x}from"./dist-Cr4-nBVI.js";import{t as S}from"./check-BzfGb3KU.js";import{t as C}from"./spinner-Bp2_BYkl.js";import{t as w}from"./input-f41fkc3m.js";import{a as T,n as E,r as D,t as O}from"./use-apply-config-language--D5KrAwV.js";import{t as k}from"./badge-BGcBcbDV.js";import{t as A}from"./textarea-DkcNoPBJ.js";var j=e(r(),1),M=t();async function N(){try{let e=E(new URLSearchParams(window.location.search).get(`locale`))??D(),{locale:t}=g({override:void 0,storedPreference:e,preferenceList:h(),supportedLocales:m,autoDetectableLocales:y});await T(t),O({preference:e??`system`,locale:t})}catch(e){console.warn(`Could not load the uninstall language; using English.`,e)}}var P=s();async function F(){let e=typeof window>`u`?void 0:window.okUninstall;if(e===void 0)return{kind:`unavailable`,reason:`missing-bridge`};let t;try{let n=await Promise.race([e.ready(),new Promise(e=>{t=setTimeout(()=>e({kind:`unavailable`,reason:`timeout`}),5e3)})]);return n.kind===`accepted`?{kind:`unavailable`,reason:`unexpected-response`}:(n.kind!==`screen`&&console.warn(`Uninstall screen unavailable`,n.reason),n)}catch(e){return console.warn(`Uninstall screen request failed`,e),{kind:`unavailable`,reason:`request-failed`}}finally{clearTimeout(t)}}function I(e){let t=typeof window>`u`?void 0:window.okUninstall;t!==void 0&&t.send(e).catch(()=>void 0)}var L=n();function R(e){let t=(0,P.c)(6),{items:n}=e,r;if(t[0]!==n){let e;t[2]===n.length?e=t[3]:(e=(e,t)=>(0,L.jsxs)(`li`,{className:`relative pb-5 ps-[30px] last:pb-1`,children:[t<n.length-1&&(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-[22px] bottom-0.5 start-[9px] w-0.5 bg-border`}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:c(`absolute top-px start-0 inline-flex size-5 items-center justify-center rounded-full`,e.done?`bg-primary/15 text-primary`:`border-[1.5px] border-muted-foreground/50`),children:e.done&&(0,L.jsx)(S,{className:`size-3`})}),(0,L.jsx)(`span`,{className:`sr-only`,children:e.done?(0,L.jsx)(i,{id:`clJ3qM`}):(0,L.jsx)(i,{id:`yU_9ur`})}),(0,L.jsxs)(`span`,{className:`block`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:e.label}),e.detail!==void 0&&(0,L.jsx)(`span`,{className:`mt-0.5 block text-muted-foreground leading-snug`,children:e.detail})]})]},e.label),t[2]=n.length,t[3]=e),r=n.map(e),t[0]=n,t[1]=r}else r=t[1];let a;return t[4]===r?a=t[5]:(a=(0,L.jsx)(`ol`,{className:`mb-1.5`,children:r}),t[4]=r,t[5]=a),a}function z(e){let t=(0,P.c)(51),{notice:n,onConfirm:r,onCancel:i,onRevealLog:o}=e,{_:s}=a(),c=(0,j.useId)(),u=(0,j.useId)(),d=(0,j.useId)(),f=(0,j.useRef)(null),p=n.cancelLabel!==void 0,m,h;t[0]!==p||t[1]!==n.logRevealLabel||t[2]!==i||t[3]!==r?(m=()=>{let e=e=>{if(!e.isComposing){if(e.key===`Tab`){let t=f.current?.querySelectorAll(`button:not([disabled]), [tabindex="0"]`),n=t?.[0],r=t?.[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus());return}e.key===`Escape`&&(p||n.logRevealLabel!==void 0?i():r())}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},h=[p,n.logRevealLabel,i,r],t[0]=p,t[1]=n.logRevealLabel,t[2]=i,t[3]=r,t[4]=m,t[5]=h):(m=t[4],h=t[5]),(0,j.useEffect)(m,h);let g=n.subtitle===void 0?u:`${d} ${u}`,_;t[6]!==n.title||t[7]!==c?(_=(0,L.jsx)(`h1`,{id:c,className:`font-medium text-base leading-none`,children:n.title}),t[6]=n.title,t[7]=c,t[8]=_):_=t[8];let v;t[9]!==n.subtitle||t[10]!==d?(v=n.subtitle!==void 0&&(0,L.jsx)(`p`,{id:d,className:`text-muted-foreground text-sm leading-snug`,children:n.subtitle}),t[9]=n.subtitle,t[10]=d,t[11]=v):v=t[11];let y;t[12]!==_||t[13]!==v?(y=(0,L.jsxs)(`header`,{className:`shrink-0 space-y-4 px-6 pt-5 pb-3.5`,children:[_,v]}),t[12]=_,t[13]=v,t[14]=y):y=t[14];let b;t[15]===n.paragraphs?b=t[16]:(b=n.paragraphs.map(B),t[15]=n.paragraphs,t[16]=b);let x;t[17]===n.checklist?x=t[18]:(x=n.checklist!==void 0&&(0,L.jsx)(R,{items:n.checklist}),t[17]=n.checklist,t[18]=x);let S;t[19]!==s||t[20]!==n.log?(S=n.log!==void 0&&(0,L.jsx)(`section`,{"aria-label":s({id:`Oi56Cu`}),tabIndex:0,className:`subtle-scrollbar mt-0.5 mb-2.5 min-h-20 flex-1 overflow-auto rounded-lg border border-border border-dotted bg-muted/40 px-3 py-2.5 focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,L.jsx)(`pre`,{className:`select-text whitespace-pre-wrap font-mono text-xs leading-relaxed wrap-anywhere`,children:n.log})}),t[19]=s,t[20]=n.log,t[21]=S):S=t[21];let C;t[22]===n.footnote?C=t[23]:(C=n.footnote!==void 0&&(0,L.jsx)(`p`,{className:`select-text text-muted-foreground text-xs wrap-anywhere`,children:n.footnote}),t[22]=n.footnote,t[23]=C);let w;t[24]!==n.logRevealLabel||t[25]!==o?(w=n.logRevealLabel!==void 0&&(0,L.jsx)(`p`,{className:`mt-0.5`,children:(0,L.jsx)(l,{type:`button`,variant:`link-muted`,size:`xs`,className:`h-auto px-0 underline underline-offset-2`,onClick:o,children:n.logRevealLabel})}),t[24]=n.logRevealLabel,t[25]=o,t[26]=w):w=t[26];let T;t[27]!==u||t[28]!==C||t[29]!==w||t[30]!==b||t[31]!==x||t[32]!==S?(T=(0,L.jsxs)(`div`,{id:u,className:`flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm`,children:[b,x,S,C,w]}),t[27]=u,t[28]=C,t[29]=w,t[30]=b,t[31]=x,t[32]=S,t[33]=T):T=t[33];let E;t[34]!==n.cancelLabel||t[35]!==i?(E=n.cancelLabel!==void 0&&(0,L.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:i,children:n.cancelLabel}),t[34]=n.cancelLabel,t[35]=i,t[36]=E):E=t[36];let D=n.danger===!0?`destructive`:`default`,O=!p,k;t[37]!==n.confirmLabel||t[38]!==r||t[39]!==D||t[40]!==O?(k=(0,L.jsx)(l,{type:`button`,variant:D,autoFocus:O,onClick:r,children:n.confirmLabel}),t[37]=n.confirmLabel,t[38]=r,t[39]=D,t[40]=O,t[41]=k):k=t[41];let A;t[42]!==E||t[43]!==k?(A=(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[E,k]}),t[42]=E,t[43]=k,t[44]=A):A=t[44];let M;return t[45]!==T||t[46]!==A||t[47]!==g||t[48]!==y||t[49]!==c?(M=(0,L.jsxs)(`div`,{ref:f,role:`alertdialog`,"aria-labelledby":c,"aria-modal":`true`,"aria-describedby":g,className:`flex h-dvh flex-col bg-background text-foreground`,children:[y,T,A]}),t[45]=T,t[46]=A,t[47]=g,t[48]=y,t[49]=c,t[50]=M):M=t[50],M}function B(e){return(0,L.jsx)(`p`,{className:`mb-2.5 leading-normal`,children:e},e)}function ee(e){return e.open||e.running?`active`:e.recent?`recent`:null}function V(e){return e.split(`/`).filter(Boolean).at(-1)??e}function te(e){let t=(0,P.c)(9),{status:n}=e,{_:r}=a(),i;t[0]===r?i=t[1]:(i=r({id:`s_ereB`}),t[0]=r,t[1]=i);let o;t[2]===r?o=t[3]:(o=r({id:`_2cM9E`}),t[2]=r,t[3]=o);let s;t[4]!==i||t[5]!==o?(s={active:i,recent:o},t[4]=i,t[5]=o,t[6]=s):s=t[6];let c=s[n],l;return t[7]===c?l=t[8]:(l=(0,L.jsx)(k,{variant:`secondary`,className:`rounded-sm text-muted-foreground`,children:c}),t[7]=c,t[8]=l),l}function H(e){let t=(0,P.c)(28),{project:n,checked:r,onCheckedChange:i}=e,{_:o}=a(),s=(0,j.useId)(),c;t[0]===n?c=t[1]:(c=ee(n),t[0]=n,t[1]=c);let l=c,f;t[2]===i?f=t[3]:(f=e=>i(e===!0),t[2]=i,t[3]=f);let p;t[4]!==o||t[5]!==n.path?(p=o({id:`CHfFN_`,values:{0:n.path}}),t[4]=o,t[5]=n.path,t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==r||t[9]!==f||t[10]!==p?(m=(0,L.jsx)(u,{id:s,className:`mt-0.5`,checked:r,onCheckedChange:f,"aria-label":p}),t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.path?h=t[13]:(h=V(n.path),t[12]=n.path,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,L.jsx)(`span`,{className:`w-full truncate font-medium text-sm`,children:h}),t[14]=h,t[15]=g);let _;t[16]===n.path?_=t[17]:(_=(0,L.jsx)(`span`,{className:`w-full select-text break-words text-muted-foreground text-xs`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==s||t[19]!==g||t[20]!==_?(v=(0,L.jsxs)(d,{htmlFor:s,className:`min-w-0 flex-col items-start gap-0.5 font-normal`,children:[g,_]}),t[18]=s,t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;t[22]===l?y=t[23]:(y=l!==null&&(0,L.jsx)(`div`,{className:`flex justify-end max-sm:col-start-2 max-sm:justify-start`,children:(0,L.jsx)(te,{status:l})}),t[22]=l,t[23]=y);let b;return t[24]!==m||t[25]!==v||t[26]!==y?(b=(0,L.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2.5 border-border/60 border-b px-3 py-2.5 last:border-b-0 hover:bg-accent/40 max-sm:grid-cols-[auto_minmax(0,1fr)]`,children:[m,v,y]}),t[24]=m,t[25]=v,t[26]=y,t[27]=b):b=t[27],b}function U(e){let t=(0,P.c)(45),{projects:n,onConfirm:r,onCancel:o}=e,{_:s}=a(),[c,f]=(0,j.useState)(K),p=(0,j.useId)(),m=(0,j.useId)(),h=(0,j.useId)(),g=n.length>0&&c.size===n.length?!0:c.size>0?`indeterminate`:!1,_;t[0]===n?_=t[1]:(_=e=>f(e?new Set(n.map(ne)):new Set),t[0]=n,t[1]=_);let v=_,y,b;t[2]!==o||t[3]!==n?(y=()=>{let e=e=>{if(e.key===`Escape`){o();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`&&(e.preventDefault(),f(new Set(n.map(G))))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},b=[o,n],t[2]=o,t[3]=n,t[4]=y,t[5]=b):(y=t[4],b=t[5]),(0,j.useEffect)(y,b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,L.jsx)(i,{id:`PrVaZo`}),t[6]=x):x=t[6];let S;t[7]===p?S=t[8]:(S=(0,L.jsx)(`h1`,{id:p,className:`font-medium leading-none text-base`,children:x}),t[7]=p,t[8]=S);let C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,L.jsx)(i,{id:`keop3U`}),t[9]=C):C=t[9];let w;t[10]===m?w=t[11]:(w=(0,L.jsx)(`p`,{id:m,className:`text-sm text-muted-foreground`,children:C}),t[10]=m,t[11]=w);let T;t[12]!==S||t[13]!==w?(T=(0,L.jsxs)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5 space-y-4`,children:[S,w]}),t[12]=S,t[13]=w,t[14]=T):T=t[14];let E;t[15]===s?E=t[16]:(E=s({id:`QySH4I`}),t[15]=s,t[16]=E);let D;t[17]!==s||t[18]!==n||t[19]!==h||t[20]!==g||t[21]!==c||t[22]!==v?(D=n.length===0?(0,L.jsx)(`div`,{className:`rounded-lg border border-border p-4`,children:(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,L.jsx)(i,{id:`bKt9Jk`})})}):(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border`,children:[(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-border border-b px-3 py-2.5 bg-muted/30`,children:[(0,L.jsx)(u,{id:h,checked:g,onCheckedChange:e=>v(e===!0)}),(0,L.jsx)(d,{htmlFor:h,className:`flex-1 font-medium text-sm`,children:(0,L.jsx)(i,{id:`wgNoIs`})}),(0,L.jsxs)(`span`,{role:`status`,"aria-label":s({id:`nsUDL8`,values:{0:c.size,1:n.length}}),className:`text-muted-foreground text-xs tabular-nums`,children:[c.size,` / `,n.length]})]}),(0,L.jsx)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-scroll [scrollbar-gutter:stable]`,children:n.map((e,t)=>(0,L.jsx)(H,{project:e,checked:c.has(t),onCheckedChange:e=>{f(n=>{let r=new Set(n);return e?r.add(t):r.delete(t),r})}},e.path))})]}),t[17]=s,t[18]=n,t[19]=h,t[20]=g,t[21]=c,t[22]=v,t[23]=D):D=t[23];let O;t[24]!==D||t[25]!==E?(O=(0,L.jsx)(`section`,{"aria-label":E,className:`flex min-h-0 flex-1 flex-col px-6 py-3.5`,children:D}),t[24]=D,t[25]=E,t[26]=O):O=t[26];let k;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,L.jsx)(i,{id:`dEgA5A`}),t[27]=k):k=t[27];let A;t[28]===o?A=t[29]:(A=(0,L.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:o,children:k}),t[28]=o,t[29]=A);let M;t[30]!==r||t[31]!==c?(M=()=>r([...c].sort(W)),t[30]=r,t[31]=c,t[32]=M):M=t[32];let N;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,L.jsx)(i,{id:`J7nMqi`}),t[33]=N):N=t[33];let F;t[34]===M?F=t[35]:(F=(0,L.jsx)(l,{type:`button`,variant:`destructive`,onClick:M,children:N}),t[34]=M,t[35]=F);let I;t[36]!==A||t[37]!==F?(I=(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[A,F]}),t[36]=A,t[37]=F,t[38]=I):I=t[38];let R;return t[39]!==m||t[40]!==O||t[41]!==I||t[42]!==T||t[43]!==p?(R=(0,L.jsxs)(`div`,{role:`dialog`,"aria-labelledby":p,"aria-describedby":m,className:`flex h-dvh flex-col overflow-hidden bg-background text-foreground`,children:[T,O,I]}),t[39]=m,t[40]=O,t[41]=I,t[42]=T,t[43]=p,t[44]=R):R=t[44],R}function W(e,t){return e-t}function G(e,t){return t}function ne(e,t){return t}function K(){return new Set}function re(){let e=(0,P.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(C,{"aria-hidden":`true`,className:`mx-auto mb-4 size-8 text-primary`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(`h1`,{className:`mb-2 font-medium text-base leading-none`,children:(0,L.jsx)(i,{id:`j2229h`})}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`main`,{className:`grid h-dvh place-items-center bg-background text-foreground`,children:(0,L.jsxs)(`div`,{role:`status`,className:`max-w-vw px-7 py-7 text-center`,children:[t,n,(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm leading-relaxed`,children:(0,L.jsx)(i,{id:`kCjkGY`})})]})}),e[2]=r):r=e[2],r}function q(e){let t=(0,P.c)(8),{outcome:n,onConfirm:r,onCancel:i,onRevealLog:o}=e,{_:s}=a(),c;t[0]!==s||t[1]!==n?(c=n===`failure`?{title:s({id:`V3JCWv`}),paragraphs:[s({id:`wTf1ag`})],confirmLabel:s({id:`yz7wBu`}),logRevealLabel:s({id:`Oi56Cu`})}:{title:s({id:`JReD69`}),subtitle:s({id:`vmwZHP`}),paragraphs:[],checklist:[{label:s({id:`aTDVi6`}),detail:s({id:`psUrB1`}),done:!0},{label:s({id:`bmI-q1`}),detail:s({id:`MAVznT`}),done:!0},{label:s({id:`ES1zFv`}),detail:s({id:`BVmgJG`}),done:!1}],logRevealLabel:s({id:`Oi56Cu`}),confirmLabel:s({id:`LtSYdi`})},t[0]=s,t[1]=n,t[2]=c):c=t[2];let l=c,u;return t[3]!==l||t[4]!==i||t[5]!==r||t[6]!==o?(u=(0,L.jsx)(z,{notice:l,onConfirm:r,onCancel:i,onRevealLog:o}),t[3]=l,t[4]=i,t[5]=r,t[6]=o,t[7]=u):u=t[7],u}function ie(){let{_:e}=a();return{"workflow-fit":e({id:`5vAI6Z`}),"missing-feature":e({id:`cH0dkG`}),"hard-to-start":e({id:`uoJF_D`}),unreliable:e({id:`WGMoTY`}),"switched-tool":e({id:`jO18NZ`}),"one-off":e({id:`S3qu11`}),other:e({id:`aQyGJc`})}}function J(e){let t=(0,P.c)(86),{onSend:n,onSkip:r}=e,{_:o}=a(),s=ie(),[c,m]=(0,j.useState)(``),[h,g]=(0,j.useState)(``),[v,y]=(0,j.useState)(!1),[x,S]=(0,j.useState)(``),C=(0,j.useRef)(null),T=(0,j.useId)(),E=(0,j.useId)(),D=(0,j.useId)(),O=(0,j.useId)(),k=(0,j.useId)(),M=(0,j.useId)(),N,F;t[0]===v?(N=t[1],F=t[2]):(N=()=>{v&&C.current?.focus()},F=[v],t[0]=v,t[1]=N,t[2]=F),(0,j.useEffect)(N,F);let I;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,L.jsx)(i,{id:`ElyuiT`}),t[3]=I):I=t[3];let R;t[4]===T?R=t[5]:(R=(0,L.jsx)(`h1`,{id:T,className:`font-medium leading-none text-base`,children:I}),t[4]=T,t[5]=R);let z;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,L.jsx)(i,{id:`ZDOq9A`}),t[6]=z):z=t[6];let B;t[7]===E?B=t[8]:(B=(0,L.jsx)(`p`,{id:E,className:`text-muted-foreground text-sm`,children:z}),t[7]=E,t[8]=B);let ee;t[9]!==R||t[10]!==B?(ee=(0,L.jsxs)(`header`,{className:`px-6 pt-5 pb-3.5 space-y-4`,children:[R,B]}),t[9]=R,t[10]=B,t[11]=ee):ee=t[11];let V;t[12]!==x||t[13]!==v||t[14]!==h||t[15]!==n||t[16]!==c?(V=e=>{e.preventDefault();let t=h.trim(),r=v?x.trim():``;n({...c===``?{}:{reason:c},...t===``?{}:{note:t},...r===``?{}:{email:r}})},t[12]=x,t[13]=v,t[14]=h,t[15]=n,t[16]=c,t[17]=V):V=t[17];let te;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,L.jsx)(i,{id:`oxdGJn`}),t[18]=te):te=t[18];let H;t[19]===D?H=t[20]:(H=(0,L.jsx)(`p`,{id:D,className:`mb-2 font-medium text-sm`,children:te}),t[19]=D,t[20]=H);let U;t[21]!==D||t[22]!==s?(U=_.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-1 py-1`,children:[(0,L.jsx)(f,{id:`${D}-${e.value}`,value:e.value}),(0,L.jsx)(d,{htmlFor:`${D}-${e.value}`,className:`font-normal text-sm leading-snug`,children:s[e.value]})]},e.value)),t[21]=D,t[22]=s,t[23]=U):U=t[23];let W;t[24]!==D||t[25]!==c||t[26]!==U?(W=(0,L.jsx)(p,{"aria-labelledby":D,value:c,onValueChange:m,children:U}),t[24]=D,t[25]=c,t[26]=U,t[27]=W):W=t[27];let G;t[28]!==H||t[29]!==W?(G=(0,L.jsxs)(`div`,{className:`mb-6`,children:[H,W]}),t[28]=H,t[29]=W,t[30]=G):G=t[30];let ne;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,L.jsx)(i,{id:`axQ1h6`}),t[31]=ne):ne=t[31];let K;t[32]===O?K=t[33]:(K=(0,L.jsx)(d,{htmlFor:O,className:`mb-2 font-medium text-sm`,children:ne}),t[32]=O,t[33]=K);let re;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>g(e.target.value),t[34]=re):re=t[34];let q;t[35]!==h||t[36]!==O?(q=(0,L.jsx)(A,{id:O,rows:3,maxLength:b,value:h,onChange:re}),t[35]=h,t[36]=O,t[37]=q):q=t[37];let J;t[38]!==K||t[39]!==q?(J=(0,L.jsxs)(`div`,{className:`mb-6`,children:[K,q]}),t[38]=K,t[39]=q,t[40]=J):J=t[40];let ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>y(e===!0),t[41]=ae):ae=t[41];let Y;t[42]!==v||t[43]!==k?(Y=(0,L.jsx)(u,{id:k,checked:v,onCheckedChange:ae}),t[42]=v,t[43]=k,t[44]=Y):Y=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,L.jsx)(i,{id:`xEb24l`}),t[45]=oe):oe=t[45];let X;t[46]===k?X=t[47]:(X=(0,L.jsx)(d,{htmlFor:k,className:`font-medium text-sm`,children:oe}),t[46]=k,t[47]=X);let Z;t[48]!==Y||t[49]!==X?(Z=(0,L.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[Y,X]}),t[48]=Y,t[49]=X,t[50]=Z):Z=t[50];let se=!v,ce;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,L.jsx)(i,{id:`ATGYL1`}),t[51]=ce):ce=t[51];let Q;t[52]===M?Q=t[53]:(Q=(0,L.jsx)(d,{htmlFor:M,className:`mb-2 font-medium text-sm sr-only`,children:ce}),t[52]=M,t[53]=Q);let le;t[54]===o?le=t[55]:(le=o({id:`JHf6qZ`}),t[54]=o,t[55]=le);let ue=!v,de;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>S(e.target.value),t[56]=de):de=t[56];let fe;t[57]!==x||t[58]!==M||t[59]!==le||t[60]!==ue?(fe=(0,L.jsx)(w,{id:M,ref:C,type:`email`,maxLength:320,autoComplete:`email`,spellCheck:!1,placeholder:le,disabled:ue,value:x,onChange:de}),t[57]=x,t[58]=M,t[59]=le,t[60]=ue,t[61]=fe):fe=t[61];let pe;t[62]!==se||t[63]!==Q||t[64]!==fe?(pe=(0,L.jsxs)(`div`,{className:`mb-6`,hidden:se,children:[Q,fe]}),t[62]=se,t[63]=Q,t[64]=fe,t[65]=pe):pe=t[65];let me;t[66]!==G||t[67]!==J||t[68]!==Z||t[69]!==pe?(me=(0,L.jsxs)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-auto px-6 pt-1 pb-4`,children:[G,J,Z,pe]}),t[66]=G,t[67]=J,t[68]=Z,t[69]=pe,t[70]=me):me=t[70];let he;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,L.jsx)(i,{id:`6Uau97`}),t[71]=he):he=t[71];let ge;t[72]===r?ge=t[73]:(ge=(0,L.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:r,children:he}),t[72]=r,t[73]=ge);let _e;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,L.jsx)(l,{type:`submit`,children:(0,L.jsx)(i,{id:`xMsnTe`})}),t[74]=_e):_e=t[74];let ve;t[75]===ge?ve=t[76]:(ve=(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[ge,_e]}),t[75]=ge,t[76]=ve);let $;t[77]!==me||t[78]!==ve||t[79]!==V?($=(0,L.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:V,children:[me,ve]}),t[77]=me,t[78]=ve,t[79]=V,t[80]=$):$=t[80];let ye;return t[81]!==E||t[82]!==$||t[83]!==ee||t[84]!==T?(ye=(0,L.jsxs)(`div`,{role:`dialog`,"aria-labelledby":T,"aria-describedby":E,className:`flex h-dvh flex-col bg-background text-foreground`,children:[ee,$]}),t[81]=E,t[82]=$,t[83]=ee,t[84]=T,t[85]=ye):ye=t[85],ye}var ae=3,Y=250;function oe(e){if(e.kind!==`unavailable`)return!1;switch(e.reason){case`request-failed`:case`timeout`:return!0;case`missing-bridge`:case`unexpected-response`:return!1;default:return e}}function X(){let e=(0,P.c)(28),{_:t}=a(),[n,r]=(0,j.useState)(!1),[o,s]=(0,j.useState)(null),c,l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!0,t=0,n,i=async()=>{let a=await F();e&&(a.kind===`screen`?s(a.screen):(t+=1,oe(a)&&t<ae?n=setTimeout(()=>void i(),Y):r(!0)))};return i(),()=>{e=!1,clearTimeout(n)}},l=[],e[0]=c,e[1]=l):(c=e[0],l=e[1]),(0,j.useEffect)(c,l);let u=o?.kind,d=o?.kind===`progress`&&o.awaitResult===!0,f,p;if(e[2]!==d||e[3]!==u||e[4]!==n?(f=()=>{if(n||u!==`progress`)return;let e=!0,t,i=requestAnimationFrame(()=>{i=requestAnimationFrame(ve)}),a=0,o=async()=>{let n=await F();if(e){if(n.kind!==`screen`){if(a+=1,!oe(n)||a>=ae){r(!0);return}}else if(a=0,n.screen.kind!==`progress`){s(n.screen);return}t=setTimeout(()=>void o(),Y)}};d&&(t=setTimeout(()=>void o(),Y));let c=d?setTimeout(()=>{e=!1,clearTimeout(t),r(!0)},v):void 0;return()=>{e=!1,clearTimeout(t),clearTimeout(c),cancelAnimationFrame(i)}},p=[u,d,n],e[2]=d,e[3]=u,e[4]=n,e[5]=f,e[6]=p):(f=e[5],p=e[6]),(0,j.useEffect)(f,p),n){let n;e[7]===t?n=e[8]:(n=t({id:`ZR-8iJ`}),e[7]=t,e[8]=n);let r;e[9]===t?r=e[10]:(r=t({id:`xnWySt`}),e[9]=t,e[10]=r);let i;e[11]===r?i=e[12]:(i=[r],e[11]=r,e[12]=i);let a;e[13]===t?a=e[14]:(a=t({id:`yz7wBu`}),e[13]=t,e[14]=a);let o;return e[15]!==n||e[16]!==i||e[17]!==a?(o=(0,L.jsx)(z,{notice:{title:n,paragraphs:i,confirmLabel:a},onConfirm:_e,onCancel:ge,onRevealLog:he}),e[15]=n,e[16]=i,e[17]=a,e[18]=o):o=e[18],o}if(o!==null)switch(o.kind){case`picker`:{let t;return e[19]===o.projects?t=e[20]:(t=(0,L.jsx)(U,{projects:o.projects,onConfirm:me,onCancel:pe}),e[19]=o.projects,e[20]=t),t}case`survey`:{let t;return e[21]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(J,{onSend:fe,onSkip:de}),e[21]=t):t=e[21],t}case`progress`:{let t;return e[22]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(re,{}),e[22]=t):t=e[22],t}case`result`:{let t;return e[23]===o.outcome?t=e[24]:(t=(0,L.jsx)(q,{outcome:o.outcome,onRevealLog:ue,onConfirm:le,onCancel:Q}),e[23]=o.outcome,e[24]=t),t}case`notice`:{let t;return e[25]===o.notice?t=e[26]:(t=(0,L.jsx)(z,{notice:o.notice,onRevealLog:ce,onConfirm:se,onCancel:Z}),e[25]=o.notice,e[26]=t),t}default:return o}let m;return e[27]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,L.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center bg-background p-8 text-foreground`,children:(0,L.jsx)(`p`,{className:`text-center text-muted-foreground text-sm`,children:(0,L.jsx)(i,{id:`tzGWeg`})})}),e[27]=m):m=e[27],m}function Z(){return I({kind:`notice-cancel`})}function se(){return I({kind:`notice-confirm`})}function ce(){return I({kind:`notice-reveal-log`})}function Q(){return I({kind:`notice-cancel`})}function le(){return I({kind:`notice-confirm`})}function ue(){return I({kind:`notice-reveal-log`})}function de(){return I({kind:`survey-skip`})}function fe(e){return I({kind:`survey-send`,...e})}function pe(){return I({kind:`picker-cancel`})}function me(e){return I({kind:`picker-confirm`,selectedIndexes:e})}function he(){}function ge(){return window.close()}function _e(){return window.close()}function ve(){return I({kind:`progress-shown`})}var $=document.getElementById(`root`);if(!$)throw Error(`Root element not found`);N().then(()=>(0,M.createRoot)($).render((0,L.jsx)(j.StrictMode,{children:(0,L.jsx)(o,{i18n:x,children:(0,L.jsx)(X,{})})})));
|
package/dist/public/assets/{use-activity-panel-BKcCiJgH.js → use-activity-panel-B-sX0TT-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{i as t}from"./DocumentContext-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{i as t}from"./DocumentContext-CNNn86SD.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{Dt as i,i as a,r as o}from"./dist-DOFOMv5X.js";import{v as s}from"./documents-events-C4yazdQb.js";import{it as c}from"./CodeMirrorPropInput-DVe4wD_N.js";import{n as l}from"./agent-presence-B7da2Vup.js";import{t as u}from"./lru-string-cache-16HpGUlE.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new c(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=i.safeParse(r);throw e.success?Error(e.data.title):new c(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=o.safeParse(r);if(!a.success)throw new c(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,o=await fetch(r),s;try{s=await o.json()}catch(e){throw new c(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:o.status})}if(!o.ok){let e=i.safeParse(s);throw e.success?Error(e.data.title):new c(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:o.status})}let l=a.safeParse(s);if(!l.success)throw new c(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:o.status});let{diff:u,before:d,after:f,properties:p}=l.data;return{diff:u,before:d,after:f,properties:p}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,c]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;c(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),c(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),c(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),c(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=s(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./messages-
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{Ci as i,Jo as a,Wi as o,Yi as s,ko as c}from"./dist-DOFOMv5X.js";import{n as l}from"./dist-CJhtNlOm2.js";import{t as u}from"./dist-Cr4-nBVI.js";import{t as d}from"./messages-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./messages-BHdlsepL.js","./chunk-CYidjpOJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{Ci as i,Jo as a,Wi as o,Yi as s,ko as c}from"./dist-DOFOMv5X.js";import{n as l}from"./dist-CJhtNlOm2.js";import{t as u}from"./dist-Cr4-nBVI.js";import{t as d}from"./messages-BHdlsepL.js";var f=e(n(),1),p=r();u.load(`en`,d.messages),u.activate(`en`);var m={en:()=>t(()=>import(`./messages-BHdlsepL.js`).then(e=>e.n),__vite__mapDeps([0,1]),import.meta.url),"zh-Hans":()=>t(()=>import(`./messages-C2QtPbJj.js`),[],import.meta.url),"zh-Hant":()=>t(()=>import(`./messages-D_UKhiH5.js`),[],import.meta.url),hi:()=>t(()=>import(`./messages-BjZgTBY9.js`),[],import.meta.url),es:()=>t(()=>import(`./messages-CIY7f-a1.js`),[],import.meta.url),ar:()=>t(()=>import(`./messages-BkkpXTZM.js`),[],import.meta.url),fr:()=>t(()=>import(`./messages-Dp632KAD.js`),[],import.meta.url),bn:()=>t(()=>import(`./messages-D_m0QoQO.js`),[],import.meta.url),"pt-BR":()=>t(()=>import(`./messages-FtAFLlAq.js`),[],import.meta.url),id:()=>t(()=>import(`./messages-DEMxBGLW.js`),[],import.meta.url),ur:()=>t(()=>import(`./messages-DTROvhTk.js`),[],import.meta.url),ko:()=>t(()=>import(`./messages-BFg9-qlP.js`),[],import.meta.url)},h=new Set([`en`]),g=`en`;async function _(e){if(g=e,!h.has(e)){let{default:t}=await m[e]();u.load(e,t.messages),h.add(e)}g===e&&u.activate(e)}function v(){return!1}async function y(){}var b=`ok-locale-load-failed`;function x(){window.location.reload()}function S({locale:e,reload:t=x}){let n=new Intl.DisplayNames([u.locale],{type:`language`}).of(e)??e;l.error(u._({id:`loE6tM`,values:{language:n}}),{id:b,description:u._({id:`GtPGNJ`}),duration:1/0,action:{label:u._({id:`HpK_8d`}),onClick:t}})}function C(){l.dismiss(b)}var w=`ok-language-v1`;function T({preference:e,locale:t}){if(typeof document>`u`)return;let n=i(t),r=document.documentElement;r.lang=t,r.dir=n;try{localStorage.setItem(w,JSON.stringify({pref:e,locale:t,dir:n}))}catch{}}function E(e){return e===`system`?`system`:a.includes(e)?e:void 0}function D(){if(!(typeof localStorage>`u`))try{let e=localStorage.getItem(w);return e===null?void 0:E(JSON.parse(e).pref)}catch{return}}function O(e){let t=(0,p.c)(4),{preference:n,userConfigSynced:r}=e,i,l;t[0]!==n||t[1]!==r?(i=()=>{if(v()){y().catch(k);return}if(!r)return;let{locale:e}=s({override:void 0,storedPreference:n,preferenceList:o(),supportedLocales:a,autoDetectableLocales:c}),t=!1;return _(e).then(()=>{t||(C(),T({preference:n??`system`,locale:e}))}).catch(n=>{console.warn(JSON.stringify({event:`ok-locale-activate-failed`,locale:e,error:String(n)})),!t&&S({locale:e})}),()=>{t=!0}},l=[n,r],t[0]=n,t[1]=r,t[2]=i,t[3]=l):(i=t[2],l=t[3]),(0,f.useEffect)(i,l)}function k(e){console.warn(JSON.stringify({event:`ok-pseudo-locale-activate-failed`,error:String(e)}))}export{_ as a,O as i,E as n,D as r,T as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./DocumentContext-
|
|
1
|
+
import{i as e}from"./DocumentContext-CNNn86SD.js";import{t}from"./compiler-runtime-BfE3aGVn.js";import{sc as n}from"./dist-DOFOMv5X.js";import{n as r}from"./dist-CJhtNlOm2.js";import{t as i}from"./dist-Cr4-nBVI.js";import{d as a,r as o}from"./documents-events-C4yazdQb.js";import{b as s,f as c,h as l,v as u,x as d}from"./doc-paths-D8ecfw_S.js";import{u as f}from"./navigation-targets-DV-7bk2F.js";import{_ as p}from"./skills-api-B3ylk3SA.js";import{n as m,t as h}from"./use-skills-D-P8abH-.js";var g=t();function _(e){if(typeof window>`u`)return;let t=c(e);u(window.location.hash,t)||(window.location.hash=t)}function v(e){if(typeof window>`u`)return;let t=l(e);window.location.hash!==t&&(window.location.hash=t)}var y=null,b=new Set;function x(){return y}function S(e){return b.add(e),()=>{b.delete(e)}}function C(){for(let e of b)e()}function w(e){y!==null&&y.scope===e.scope&&y.name===e.name||(y=e,C())}function T(){y!==null&&(y=null,C())}function E(){let t=(0,g.c)(4),{openTarget:l}=e(),u=h(),_;return t[0]!==l||t[1]!==u.data||t[2]!==u.status?(_=(e,t,h)=>{let g=n=>{u.status===`ready`&&u.data.some(n=>n.scope===e&&n.name===t)||(o(e,t),m(e,t).then(()=>a(e,t))),l({kind:`doc`,target:n,docName:n},h?.replaceActive?{tabBehavior:`replace-active`}:void 0);let r=c(n);h?.replaceHistory?d(r):s(r)},_=u.status===`ready`?u.data.find(n=>n.scope===e&&n.name===t&&(h?.host===void 0?n.hostQualifier===void 0:n.hostQualifier===h.host)):void 0;if(_?.ignored===!0&&_.managed!==!0){let n=_;(async()=>{try{let n=await p(e),r=n.ok?n.skills.find(n=>n.scope===e&&n.name===t&&(h?.host===void 0?n.hostQualifier===void 0:n.hostQualifier===h.host)):void 0;if(r&&r.ignored!==!0){g(f(r));return}}catch{}w({scope:n.scope,name:n.name})})();return}let y=D;if(_?.managed===!0&&_.absolutePath!==void 0){v({flavor:`builtin`,source:y(_.absolutePath),name:_.name,subtitle:``,level:_.scope});return}if(_&&_.scope===`project`&&_.managed!==!0&&_.canonicalPath!==void 0&&_.absolutePath!==void 0){v({flavor:`linked`,source:y(_.absolutePath),name:_.name,subtitle:``,level:_.scope});return}if(_)return g(f(_));if(e===`project`&&h?.path)return g(h.path.replace(/\.mdx?$/i,``));if(e===`global`)return g(n(e,t,h?.host));(async()=>{try{let n=await p(`project`);if(!n.ok){r.error(i._({id:`IO8REi`,values:{0:n.error,name:t}}));return}let a=n.skills.find(n=>n.scope===e&&n.name===t);if(!a){r.error(i._({id:`9uRLEH`,values:{name:t}}));return}g(f(a))}catch(e){let n=e;r.error(i._({id:`IO8REi`,values:{0:n instanceof Error?n.message:String(n),name:t}}))}})()},t[0]=l,t[1]=u.data,t[2]=u.status,t[3]=_):_=t[3],_}function D(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>0?e.slice(0,t):e}export{S as a,w as i,T as n,_ as o,x as r,v as s,E as t};
|
package/dist/public/assets/{use-terminal-enabled-CaCIjZSY.js → use-terminal-enabled-DPUHlEKT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-BfE3aGVn.js";import{t}from"./terminal-telemetry-yTKCAc7J.js";import{as as n}from"./dist-DOFOMv5X.js";import{i as r}from"./use-apply-config-theme-B5w38X1P.js";import"./config-provider-
|
|
1
|
+
import{t as e}from"./compiler-runtime-BfE3aGVn.js";import{t}from"./terminal-telemetry-yTKCAc7J.js";import{as as n}from"./dist-DOFOMv5X.js";import{i as r}from"./use-apply-config-theme-B5w38X1P.js";import"./config-provider-DFcchYF_.js";var i=e();function a(){let e=(0,i.c)(3),{projectLocalConfig:t,projectLocalSynced:n}=r(),a=t?.terminal?.enabled??null,o;return e[0]!==n||e[1]!==a?(o={enabled:a,synced:n},e[0]=n,e[1]=a,e[2]=o):o=e[2],o}function o(){let e=(0,i.c)(2),{projectLocalBinding:a,projectLocalSynced:o}=r();if(a===null||!o)return null;let s;return e[0]===a?s=e[1]:(s=e=>{let r=a.patch({terminal:{enabled:e}});return r.ok&&e&&t(),r.ok?{ok:!0}:{ok:!1,error:n(r.error)}},e[0]=a,e[1]=s),s}export{o as n,a as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{g as r,i}from"./DocumentContext-QmacaDR_.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{t as c}from"./react-dom-DPxgxlDT.js";import{t as l}from"./compiler-runtime-BfE3aGVn.js";import{Pa as u,So as d,Y as f,_o as p,_r as m,ao as h,bo as g,do as _,ho as v,lc as y,oo as b,qa as ee,qs as te,uo as ne,yo as x}from"./dist-DOFOMv5X.js";import{a as re,o as ie}from"./local-menu-action-bus-DaoT7_kL.js";import{i as ae,l as oe,m as S,n as se,t as ce}from"./PropertyDisplayRow-D-Piv_M9.js";import{H as le,Y as ue,Z as de}from"./CodeMirrorPropInput-D0Blnl3k.js";import{t as fe}from"./minus-cd1ERTPg.js";import{t as pe}from"./libesm-Crzrznn_.js";var C=l(),w=n(),T=200;function me(e){let t=(0,C.c)(27),{delta:n,open:r,onOpenChange:i}=e;if(n.unparseable!==null){let e;return t[0]===n.unparseable?e=t[1]:(e=(0,w.jsx)(ye,{regions:n.unparseable}),t[0]=n.unparseable,t[1]=e),e}if(n.changes.length===0)return null;let a,s,c,l,u,d,f,p,m;if(t[2]!==n.changes||t[3]!==i||t[4]!==r){let e=n.changes.slice(0,50);s=n.changes.length-e.length,a=se,t[14]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,w.jsx)(o,{id:`l_UFPv`}),t[14]=c):c=t[14],l=n.changes.length,u=`property-diff-block`,d=`border-b border-border py-3`,f=r,p=i,m=e.map(he),t[2]=n.changes,t[3]=i,t[4]=r,t[5]=a,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m}else a=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13];let h;t[15]===s?h=t[16]:(h=s>0&&(0,w.jsx)(`p`,{className:`px-2 pt-1 text-xs text-muted-foreground italic`,children:(0,w.jsx)(o,{id:`6qFchx`,values:{omitted:s}})}),t[15]=s,t[16]=h);let g;return t[17]!==a||t[18]!==c||t[19]!==l||t[20]!==u||t[21]!==d||t[22]!==f||t[23]!==p||t[24]!==m||t[25]!==h?(g=(0,w.jsxs)(a,{title:c,count:l,testId:u,className:d,open:f,onOpenChange:p,children:[m,h]}),t[17]=a,t[18]=c,t[19]=l,t[20]=u,t[21]=d,t[22]=f,t[23]=p,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function he(e){return(0,w.jsx)(ge,{change:e},`${e.kind}-${e.key}`)}function ge(e){let t=(0,C.c)(22),{change:n}=e,{_:r}=s(),i=oe[te(n.kind===`removed`?n.before:n.after)],a;t[0]!==r||t[1]!==n.kind?(a=n.kind===`added`?{KindIcon:re,kindLabel:r({id:`hp8OtS`})}:n.kind===`removed`?{KindIcon:fe,kindLabel:r({id:`eps54V`})}:{KindIcon:ie,kindLabel:r({id:`cNsIJf`})},t[0]=r,t[1]=n.kind,t[2]=a):a=t[2];let{KindIcon:o,kindLabel:c}=a,l;t[3]===o?l=t[4]:(l=(0,w.jsx)(o,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=o,t[4]=l);let u;t[5]===c?u=t[6]:(u=(0,w.jsx)(`span`,{className:`sr-only`,children:c}),t[5]=c,t[6]=u);let d;t[7]!==l||t[8]!==u?(d=(0,w.jsxs)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:[l,u]}),t[7]=l,t[8]=u,t[9]=d):d=t[9];let f;t[10]===i?f=t[11]:(f=(0,w.jsx)(i,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=i,t[11]=f);let p;t[12]===n?p=t[13]:(p=(0,w.jsx)(_e,{change:n}),t[12]=n,t[13]=p);let m;t[14]!==n.key||t[15]!==f||t[16]!==p?(m=(0,w.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,w.jsx)(ce,{icon:f,label:n.key,dataKey:n.key,children:p})}),t[14]=n.key,t[15]=f,t[16]=p,t[17]=m):m=t[17];let h;return t[18]!==n.key||t[19]!==d||t[20]!==m?(h=(0,w.jsxs)(`div`,{"data-property-change":``,"data-key":n.key,"data-testid":`property-diff-row`,className:`flex items-start gap-1`,children:[d,m]}),t[18]=n.key,t[19]=d,t[20]=m,t[21]=h):h=t[21],h}function _e(e){let t=(0,C.c)(17),{change:n}=e;if(n.kind===`added`){let e;return t[0]!==n.after||t[1]!==n.key?(e=(0,w.jsx)(E,{value:n.after,keyName:n.key}),t[0]=n.after,t[1]=n.key,t[2]=e):e=t[2],e}if(n.kind===`removed`){let e;return t[3]!==n.before||t[4]!==n.key?(e=(0,w.jsx)(E,{value:n.before,keyName:n.key,removed:!0}),t[3]=n.before,t[4]=n.key,t[5]=e):e=t[5],e}let r=S(n.before)||S(n.after)?`flex flex-col gap-1`:`flex flex-wrap items-center gap-1.5`,i;t[6]!==n.before||t[7]!==n.key?(i=(0,w.jsx)(E,{value:n.before,keyName:n.key,removed:!0}),t[6]=n.before,t[7]=n.key,t[8]=i):i=t[8];let a;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`→`}),t[9]=a):a=t[9];let o;t[10]!==n.after||t[11]!==n.key?(o=(0,w.jsx)(E,{value:n.after,keyName:n.key}),t[10]=n.after,t[11]=n.key,t[12]=o):o=t[12];let s;return t[13]!==r||t[14]!==i||t[15]!==o?(s=(0,w.jsxs)(`div`,{className:r,"data-testid":`property-diff-change-pair`,children:[i,a,o]}),t[13]=r,t[14]=i,t[15]=o,t[16]=s):s=t[16],s}function E(e){let t=(0,C.c)(17),{value:n,keyName:r,removed:i}=e,a=i===void 0?!1:i;if(S(n)){let e=a?`opacity-70`:void 0,i;t[0]!==r||t[1]!==n?(i=(0,w.jsx)(ae,{keyName:r,value:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let o;return t[3]!==e||t[4]!==i?(o=(0,w.jsx)(`div`,{className:e,children:i}),t[3]=e,t[4]=i,t[5]=o):o=t[5],o}let o,s,c,l;if(t[6]!==a||t[7]!==n){let e=Array.isArray(n)?n.filter(ve).join(`, `):String(n),r=e.length>T;o=a?`px-1 text-sm break-words text-muted-foreground line-through`:`px-1 text-sm break-words`,s=r?e:void 0,c=`property-diff-value`,l=r?`${e.slice(0,T)}…`:e,t[6]=a,t[7]=n,t[8]=o,t[9]=s,t[10]=c,t[11]=l}else o=t[8],s=t[9],c=t[10],l=t[11];let u;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,w.jsx)(`span`,{className:o,title:s,"data-testid":c,children:l}),t[12]=o,t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function ve(e){return typeof e==`string`}function ye(e){let t=(0,C.c)(10),{regions:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:(0,w.jsx)(o,{id:`wFyXOW`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,w.jsx)(o,{id:`EmSrGB`}),t[1]=i):i=t[1];let a;t[2]===n.before?a=t[3]:(a=(0,w.jsx)(D,{label:i,text:n.before}),t[2]=n.before,t[3]=a);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(o,{id:`NawEr2`}),t[4]=s):s=t[4];let c;t[5]===n.after?c=t[6]:(c=(0,w.jsx)(D,{label:s,text:n.after}),t[5]=n.after,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,w.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,"data-testid":`property-diff-unparseable`,"data-property-change":``,children:[r,(0,w.jsxs)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[a,c]})]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function D(e){let t=(0,C.c)(7),{label:n,text:r}=e,i;t[0]===n?i=t[1]:(i=(0,w.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:n}),t[0]=n,t[1]=i);let a=r===``?`—`:r,o;t[2]===a?o=t[3]:(o=(0,w.jsx)(`pre`,{className:`overflow-x-auto rounded-md bg-muted px-2 py-1.5 font-mono text-xs whitespace-pre-wrap`,children:a}),t[2]=a,t[3]=o);let s;return t[4]!==i||t[5]!==o?(s=(0,w.jsxs)(`div`,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=s):s=t[6],s}var O=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),k=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),A=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=k();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),be=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=O(),r=k(),i=A(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),xe=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=O();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=be(),r=A();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),j=e(a(),1),M=e(c(),1),N=xe();function P(){}P.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(Se(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function Se(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var Ce=new P;function we(e,t,n){return Ce.diff(e,t,n)}var F=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,I=/\S/,L=new P;L.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!I.test(e)&&!I.test(t)},L.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&F.test(t[n])&&F.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function Te(e,t,n){return L.diff(e,t,n)}var R=new P;R.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1
|
+
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{g as r,i}from"./DocumentContext-CNNn86SD.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{t as c}from"./react-dom-DPxgxlDT.js";import{t as l}from"./compiler-runtime-BfE3aGVn.js";import{Pa as u,So as d,Y as f,_o as p,_r as m,ao as h,bo as g,do as _,ho as v,lc as y,oo as b,qa as ee,qs as te,uo as ne,yo as x}from"./dist-DOFOMv5X.js";import{a as re,o as ie}from"./local-menu-action-bus-DaoT7_kL.js";import{i as ae,l as oe,m as S,n as se,t as ce}from"./PropertyDisplayRow-BsydKIFK.js";import{H as le,Y as ue,Z as de}from"./CodeMirrorPropInput-DVe4wD_N.js";import{t as fe}from"./minus-cd1ERTPg.js";import{t as pe}from"./libesm-Crzrznn_.js";var C=l(),w=n(),T=200;function me(e){let t=(0,C.c)(27),{delta:n,open:r,onOpenChange:i}=e;if(n.unparseable!==null){let e;return t[0]===n.unparseable?e=t[1]:(e=(0,w.jsx)(ye,{regions:n.unparseable}),t[0]=n.unparseable,t[1]=e),e}if(n.changes.length===0)return null;let a,s,c,l,u,d,f,p,m;if(t[2]!==n.changes||t[3]!==i||t[4]!==r){let e=n.changes.slice(0,50);s=n.changes.length-e.length,a=se,t[14]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,w.jsx)(o,{id:`l_UFPv`}),t[14]=c):c=t[14],l=n.changes.length,u=`property-diff-block`,d=`border-b border-border py-3`,f=r,p=i,m=e.map(he),t[2]=n.changes,t[3]=i,t[4]=r,t[5]=a,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m}else a=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13];let h;t[15]===s?h=t[16]:(h=s>0&&(0,w.jsx)(`p`,{className:`px-2 pt-1 text-xs text-muted-foreground italic`,children:(0,w.jsx)(o,{id:`6qFchx`,values:{omitted:s}})}),t[15]=s,t[16]=h);let g;return t[17]!==a||t[18]!==c||t[19]!==l||t[20]!==u||t[21]!==d||t[22]!==f||t[23]!==p||t[24]!==m||t[25]!==h?(g=(0,w.jsxs)(a,{title:c,count:l,testId:u,className:d,open:f,onOpenChange:p,children:[m,h]}),t[17]=a,t[18]=c,t[19]=l,t[20]=u,t[21]=d,t[22]=f,t[23]=p,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function he(e){return(0,w.jsx)(ge,{change:e},`${e.kind}-${e.key}`)}function ge(e){let t=(0,C.c)(22),{change:n}=e,{_:r}=s(),i=oe[te(n.kind===`removed`?n.before:n.after)],a;t[0]!==r||t[1]!==n.kind?(a=n.kind===`added`?{KindIcon:re,kindLabel:r({id:`hp8OtS`})}:n.kind===`removed`?{KindIcon:fe,kindLabel:r({id:`eps54V`})}:{KindIcon:ie,kindLabel:r({id:`cNsIJf`})},t[0]=r,t[1]=n.kind,t[2]=a):a=t[2];let{KindIcon:o,kindLabel:c}=a,l;t[3]===o?l=t[4]:(l=(0,w.jsx)(o,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=o,t[4]=l);let u;t[5]===c?u=t[6]:(u=(0,w.jsx)(`span`,{className:`sr-only`,children:c}),t[5]=c,t[6]=u);let d;t[7]!==l||t[8]!==u?(d=(0,w.jsxs)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:[l,u]}),t[7]=l,t[8]=u,t[9]=d):d=t[9];let f;t[10]===i?f=t[11]:(f=(0,w.jsx)(i,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=i,t[11]=f);let p;t[12]===n?p=t[13]:(p=(0,w.jsx)(_e,{change:n}),t[12]=n,t[13]=p);let m;t[14]!==n.key||t[15]!==f||t[16]!==p?(m=(0,w.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,w.jsx)(ce,{icon:f,label:n.key,dataKey:n.key,children:p})}),t[14]=n.key,t[15]=f,t[16]=p,t[17]=m):m=t[17];let h;return t[18]!==n.key||t[19]!==d||t[20]!==m?(h=(0,w.jsxs)(`div`,{"data-property-change":``,"data-key":n.key,"data-testid":`property-diff-row`,className:`flex items-start gap-1`,children:[d,m]}),t[18]=n.key,t[19]=d,t[20]=m,t[21]=h):h=t[21],h}function _e(e){let t=(0,C.c)(17),{change:n}=e;if(n.kind===`added`){let e;return t[0]!==n.after||t[1]!==n.key?(e=(0,w.jsx)(E,{value:n.after,keyName:n.key}),t[0]=n.after,t[1]=n.key,t[2]=e):e=t[2],e}if(n.kind===`removed`){let e;return t[3]!==n.before||t[4]!==n.key?(e=(0,w.jsx)(E,{value:n.before,keyName:n.key,removed:!0}),t[3]=n.before,t[4]=n.key,t[5]=e):e=t[5],e}let r=S(n.before)||S(n.after)?`flex flex-col gap-1`:`flex flex-wrap items-center gap-1.5`,i;t[6]!==n.before||t[7]!==n.key?(i=(0,w.jsx)(E,{value:n.before,keyName:n.key,removed:!0}),t[6]=n.before,t[7]=n.key,t[8]=i):i=t[8];let a;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`→`}),t[9]=a):a=t[9];let o;t[10]!==n.after||t[11]!==n.key?(o=(0,w.jsx)(E,{value:n.after,keyName:n.key}),t[10]=n.after,t[11]=n.key,t[12]=o):o=t[12];let s;return t[13]!==r||t[14]!==i||t[15]!==o?(s=(0,w.jsxs)(`div`,{className:r,"data-testid":`property-diff-change-pair`,children:[i,a,o]}),t[13]=r,t[14]=i,t[15]=o,t[16]=s):s=t[16],s}function E(e){let t=(0,C.c)(17),{value:n,keyName:r,removed:i}=e,a=i===void 0?!1:i;if(S(n)){let e=a?`opacity-70`:void 0,i;t[0]!==r||t[1]!==n?(i=(0,w.jsx)(ae,{keyName:r,value:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let o;return t[3]!==e||t[4]!==i?(o=(0,w.jsx)(`div`,{className:e,children:i}),t[3]=e,t[4]=i,t[5]=o):o=t[5],o}let o,s,c,l;if(t[6]!==a||t[7]!==n){let e=Array.isArray(n)?n.filter(ve).join(`, `):String(n),r=e.length>T;o=a?`px-1 text-sm break-words text-muted-foreground line-through`:`px-1 text-sm break-words`,s=r?e:void 0,c=`property-diff-value`,l=r?`${e.slice(0,T)}…`:e,t[6]=a,t[7]=n,t[8]=o,t[9]=s,t[10]=c,t[11]=l}else o=t[8],s=t[9],c=t[10],l=t[11];let u;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,w.jsx)(`span`,{className:o,title:s,"data-testid":c,children:l}),t[12]=o,t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function ve(e){return typeof e==`string`}function ye(e){let t=(0,C.c)(10),{regions:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:(0,w.jsx)(o,{id:`wFyXOW`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,w.jsx)(o,{id:`EmSrGB`}),t[1]=i):i=t[1];let a;t[2]===n.before?a=t[3]:(a=(0,w.jsx)(D,{label:i,text:n.before}),t[2]=n.before,t[3]=a);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(o,{id:`NawEr2`}),t[4]=s):s=t[4];let c;t[5]===n.after?c=t[6]:(c=(0,w.jsx)(D,{label:s,text:n.after}),t[5]=n.after,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,w.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,"data-testid":`property-diff-unparseable`,"data-property-change":``,children:[r,(0,w.jsxs)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[a,c]})]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function D(e){let t=(0,C.c)(7),{label:n,text:r}=e,i;t[0]===n?i=t[1]:(i=(0,w.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:n}),t[0]=n,t[1]=i);let a=r===``?`—`:r,o;t[2]===a?o=t[3]:(o=(0,w.jsx)(`pre`,{className:`overflow-x-auto rounded-md bg-muted px-2 py-1.5 font-mono text-xs whitespace-pre-wrap`,children:a}),t[2]=a,t[3]=o);let s;return t[4]!==i||t[5]!==o?(s=(0,w.jsxs)(`div`,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=s):s=t[6],s}var O=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),k=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),A=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=k();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),be=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=O(),r=k(),i=A(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),xe=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=O();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=be(),r=A();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),j=e(a(),1),M=e(c(),1),N=xe();function P(){}P.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(Se(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function Se(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var Ce=new P;function we(e,t,n){return Ce.diff(e,t,n)}var F=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,I=/\S/,L=new P;L.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!I.test(e)&&!I.test(t)},L.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&F.test(t[n])&&F.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function Te(e,t,n){return L.diff(e,t,n)}var R=new P;R.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
2
2
|
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var Ee=new P;Ee.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var De=new P;De.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function z(e){"@babel/helpers - typeof";return z=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},z(e)}var Oe=Object.prototype.toString,B=new P;B.useLongestToken=!0,B.tokenize=R.tokenize,B.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(V(e,null,null,i),i,` `)},B.equals=function(e,t){return P.prototype.equals.call(B,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function V(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var o;if(Oe.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=V(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),z(e)===`object`&&e!==null){t.push(e),o={},n.push(o);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)c=s[a],o[c]=V(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var H=new P;H.tokenize=function(e){return e.slice()},H.join=H.removeEmpty=function(e){return e};function U(e,t){let n=t.content.findDiffStart(e.content);if(n===null)return!1;let{a:r,b:i}=t.content.findDiffEnd(e.content),a=n-Math.min(r,i);return a>0&&(e.resolve(n-a).depth<t.resolve(r+a).depth?n-=a:(r+=a,i+=a)),new x(n,i,t.slice(n,r))}function ke(e){if(!e.steps.length)return;let t=new g(e.docs[0]),n=e.steps.slice();for(;n.length;){let e=n.shift();for(;n.length&&e.merge(n[0]);){let r=n.shift();e=e instanceof x&&r instanceof x?U(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function W(e){let t=new g(e);return t.removeMark(0,e.nodeSize-2),t.doc}function Ae(e,t){let n=t.split(`/`);for(n.shift();n.length;){if(typeof e!=`object`)throw Error();let t=n.shift();e=e[t]}return e}function G(e){return JSON.parse(JSON.stringify(e))}var K=class{fromDoc;toDoc;complexSteps;wordDiffs;simplifyDiff;schema;tr;currentJSON;finalJSON;ops;constructor(e,t,n={}){let r={complexSteps:!0,wordDiffs:!1,simplifyDiff:!0,...n};this.fromDoc=e,this.toDoc=t,this.complexSteps=r.complexSteps,this.wordDiffs=r.wordDiffs,this.simplifyDiff=r.simplifyDiff,this.schema=e.type.schema,this.tr=new g(e),this.currentJSON={},this.finalJSON={},this.ops=[]}init(){return this.complexSteps?(this.currentJSON=W(this.fromDoc).toJSON(),this.finalJSON=W(this.toDoc).toJSON(),this.ops=(0,N.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,N.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=ke(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=G(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,N.applyPatch)(r,[t]);try{n=this.schema.nodeFromJSON(r),n.check()}catch{if(n=null,this.ops.length>0)t=this.ops.shift(),e.push(t);else throw Error(`No valid diff possible applying ${t.path}`)}}this.complexSteps&&e.length===1&&(i.includes(`attrs`)||i.includes(`type`))?(this.addSetNodeMarkup(),e=[]):e.length===1&&t.op===`replace`&&i[i.length-1]===`text`?(this.addReplaceTextSteps(t,r),e=[]):this.addReplaceStep(n,r)&&(e=[])}}addSetNodeMarkup(){let e=this.schema.nodeFromJSON(this.currentJSON),t=this.schema.nodeFromJSON(this.finalJSON),n=t.content.findDiffStart(e.content),r=e.nodeAt(n),i=t.nodeAt(n);if(n!=null){let e=r.type===i.type?null:i.type;try{this.tr.setNodeMarkup(n,e,i.attrs,i.marks)}catch(t){if(e&&t.message.includes(`Invalid content`))this.tr.replaceWith(n,n+r.nodeSize,i);else throw t}return this.currentJSON=W(this.tr.doc).toJSON(),this.ops=(0,N.createPatch)(this.currentJSON,this.finalJSON),!0}return!1}recreateChangeMarkSteps(){this.toDoc.descendants((e,t)=>{if(!e.isInline)return!0;this.tr.doc.nodesBetween(t,t+e.nodeSize,(n,r)=>{if(!n.isInline)return!0;let i=Math.max(t,r),a=Math.min(t+e.nodeSize,r+n.nodeSize);n.marks.forEach(t=>{t.isInSet(e.marks)||this.tr.removeMark(i,a,t)}),e.marks.forEach(e=>{e.isInSet(n.marks)||this.tr.addMark(i,a,e)})})})}addReplaceStep(e,t){let n=U(this.schema.nodeFromJSON(this.currentJSON),e);if(!n)return!1;if(!this.tr.maybeStep(n).failed)return this.currentJSON=t,!0;throw Error(`No valid step found.`)}addReplaceTextSteps(e,t){let n={...e,value:`xx`},r={...e,value:`yy`},i=G(this.currentJSON),a=G(this.currentJSON);(0,N.applyPatch)(i,[n]),(0,N.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=Ae(this.currentJSON,e.path),u=this.wordDiffs?Te(l,c):we(l,c),d=o.content.findDiffStart(s.content),f=o.resolve(d+1).marks();for(;u.length;){let e=u.shift();if(e.added){let t=this.schema.nodeFromJSON({type:`text`,text:e.value}).mark(f);if(u.length&&u[0].removed){let e=u.shift();this.tr.replaceWith(d,d+e.value.length,t)}else this.tr.insert(d,t);d+=e.value.length}else if(e.removed)if(u.length&&u[0].added){let t=u.shift(),n=this.schema.nodeFromJSON({type:`text`,text:t.value}).mark(f);this.tr.replaceWith(d,d+e.value.length,n),d+=t.value.length}else this.tr.delete(d,d+e.value.length);else d+=e.value.length}this.currentJSON=t}};function je(e,t,n={}){return new K(e,t,n).init()}var Me=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function q(e){let t=[];return e.forEach((e,n)=>{if(Me.has(e.type.name)){let r=n+1,i=0;e.forEach(e=>{let n=r+i;t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`}),i+=e.nodeSize})}else t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`})}),t}function Ne(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a].key===t[n].key?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o].key===t[s].key?(a.push({type:`same`,b:t[s]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,a:e[o]}),o++):(a.push({type:`ins`,b:t[s]}),s++);for(;o<n;)a.push({type:`del`,a:e[o++]});for(;s<r;)a.push({type:`ins`,b:t[s++]});return a}function Pe(e,t){let n=Ne(q(e),q(t)),r=[],i=0;for(let e of n)e.type===`same`?i=e.b.to:e.type===`ins`?(r.push({fromA:0,toA:0,fromB:e.b.from,toB:e.b.to}),i=e.b.to):r.push({fromA:e.a.from,toA:e.a.to,fromB:i,toB:i});return r}var Fe=400;function J(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function Ie(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof v?`add`:t instanceof p?`remove`:null;if(a===null)return;let o=t,s=e.mapping.slice(i+1),c=s.map(o.from,-1),l=s.map(o.to,1);if(l<=c||n.some(e=>e.fromB<=c&&l<=e.toB))return;let u=e.mapping.slice(0,i).invert(),d=u.map(o.from),f=u.map(o.to);f<=d||r.push({fromA:d,toA:f,fromB:c,toB:l,markName:o.mark.type.name,kind:a})}),r}function Le(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=J(r,n,e),a=J(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=je(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=Pe(i,o),l=s?Ie(s,c):[];return c.length+l.length>Fe?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var Re=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function ze(e){return e.changes.length+2*e.markChanges.length}function Y(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function Be(e){if(e.childCount===0)return!1;let t=!0;return e.forEach(e=>{e.type.name!==`listItem`&&e.type.name!==`taskItem`&&(t=!1)}),t}function X(e,t,n){let r=document.createElement(n?`div`:`span`);r.className=n?`ok-diff-del ok-diff-del-block`:`ok-diff-del`,r.setAttribute(`data-diff-deleted`,``);let i=e.serializeFragment(t);if(n&&Be(t)){let e=document.createElement(`ul`);e.appendChild(i),r.appendChild(e)}else r.appendChild(i);return r}function Ve(e,t,n,r,i){let a=d.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=Y(n.content);o.push(h.widget(e.fromB,()=>X(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(h.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(h.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=Y(n.content);o.push(h.widget(e.fromB,()=>X(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return b.create(e,o)}var He=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`trailingAffordance`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),Z=r.filter(e=>!He.has(e.name)).map(e=>e.name===`jsxComponent`?f:e),Q=ee(Z);function Ue(e,t){return Le(e,t,Q,de())}var We=u.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:b.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new ne({key:new _(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function Ge(e){let t=(0,C.c)(31),{diff:n}=e,r,i,a,o;if(t[0]!==n.afterDoc||t[1]!==n.beforeDoc||t[2]!==n.changes||t[3]!==n.markChanges){let e=Ve(n.afterDoc,n.beforeDoc,n.changes,n.markChanges,Q);o=ue,a=!1,r=Z,i=We.configure({decorations:e}),t[0]=n.afterDoc,t[1]=n.beforeDoc,t[2]=n.changes,t[3]=n.markChanges,t[4]=r,t[5]=i,t[6]=a,t[7]=o}else r=t[4],i=t[5],a=t[6],o=t[7];let s;t[8]!==r||t[9]!==i?(s=[...r,i],t[8]=r,t[9]=i,t[10]=s):s=t[10];let c;t[11]===n.afterDoc?c=t[12]:(c=n.afterDoc.toJSON(),t[11]=n.afterDoc,t[12]=c);let l;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(l={attributes:{class:`pt-4`}},t[13]=l):l=t[13];let u;t[14]!==a||t[15]!==s||t[16]!==c?(u={editable:a,extensions:s,content:c,editorProps:l},t[14]=a,t[15]=s,t[16]=c,t[17]=u):u=t[17];let d;t[18]===n?d=t[19]:(d=[n],t[18]=n,t[19]=d);let f=o(u,d),[p]=(0,j.useState)(Ke),m=(0,j.useRef)(null),h,g;t[20]===p?(h=t[21],g=t[22]):(h=()=>{let e=m.current;if(e)return e.appendChild(p),()=>{p.parentNode===e&&e.removeChild(p)}},g=[p],t[20]=p,t[21]=h,t[22]=g),(0,j.useLayoutEffect)(h,g);let _;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,w.jsx)(`div`,{className:`tiptap-editor`,children:(0,w.jsx)(`div`,{ref:m,style:{display:`contents`}})}),t[23]=_):_=t[23];let v;t[24]===f?v=t[25]:(v=(0,w.jsx)(le,{editor:f,className:`tiptap-editor-portal-content`}),t[24]=f,t[25]=v);let y;t[26]!==p||t[27]!==v?(y=(0,M.createPortal)(v,p),t[26]=p,t[27]=v,t[28]=y):y=t[28];let b;return t[29]===y?b=t[30]:(b=(0,w.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1`,"data-testid":`rendered-diff-view`,children:[_,y]}),t[29]=y,t[30]=b),b}function Ke(){let e=document.createElement(`div`);return e.style.display=`contents`,e}var qe=`[data-property-change]`,Je=`[data-content] > [data-line-type="change-addition"], [data-content] > [data-line-type="change-deletion"]`;function Ye(e){let t=[];for(let n of e.querySelectorAll(`diffs-container`)){let e=n.shadowRoot;e&&t.push(...e.querySelectorAll(Je))}return t}function Xe(e,t){let n=new Map;return{sync(){for(let r of e.querySelectorAll(`diffs-container`)){let e=r.shadowRoot;if(e===null||n.has(e))continue;let i=new MutationObserver(t);i.observe(e,{childList:!0,subtree:!0}),n.set(e,i)}},disconnect(){for(let e of n.values())e.disconnect();n.clear()}}}function Ze(e){let t=Ye(e),n=[],r=null;for(let e of t)(r===null||e.previousElementSibling!==r)&&n.push(e),r=e;return n}function $(e){let t=0,n=0;for(let r of e.split(`
|
|
3
3
|
`))r.startsWith(`+`)&&!r.startsWith(`+++`)?t++:r.startsWith(`-`)&&!r.startsWith(`---`)&&n++;return{additions:t,deletions:n}}function Qe(e,t){return`${e}\u0000${t}`}function $e(e,t,n){let r=y(e).body,i=y(t).body;return r===i?``:pe(n,r,i,``,``,{context:Math.max(r.split(`
|
|
4
4
|
`).length,i.split(`
|
package/dist/public/index.html
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
-->
|
|
95
95
|
<script>(() => { try { const raw = localStorage.getItem('ok-language-v1'); if (!raw) return; const o = JSON.parse(raw); if (typeof o?.locale !== 'string' || !/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{2,8})*$/.test(o.locale)) return; document.documentElement.lang = o.locale; document.documentElement.dir = o.dir === 'rtl' ? 'rtl' : 'ltr'; } catch {} })();</script>
|
|
96
96
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
97
|
-
<script type="module" crossorigin src="./assets/index-
|
|
97
|
+
<script type="module" crossorigin src="./assets/index-ChCXmSPV.js"></script>
|
|
98
98
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
100
100
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
@@ -114,13 +114,13 @@
|
|
|
114
114
|
<link rel="modulepreload" crossorigin href="./assets/jsx-runtime-BUgB2tll.js">
|
|
115
115
|
<link rel="modulepreload" crossorigin href="./assets/dist-Cr4-nBVI.js">
|
|
116
116
|
<link rel="modulepreload" crossorigin href="./assets/dist-CJhtNlOm2.js">
|
|
117
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
118
|
-
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language
|
|
119
|
-
<link rel="modulepreload" crossorigin href="./assets/client-version-
|
|
117
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BHdlsepL.js">
|
|
118
|
+
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language--D5KrAwV.js">
|
|
119
|
+
<link rel="modulepreload" crossorigin href="./assets/client-version-CMlRvumK.js">
|
|
120
120
|
<link rel="modulepreload" crossorigin href="./assets/dist-Nvb76hAm.js">
|
|
121
121
|
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-theme-B5w38X1P.js">
|
|
122
122
|
<link rel="modulepreload" crossorigin href="./assets/css-color-to-hex-BsB-jAvk.js">
|
|
123
|
-
<link rel="modulepreload" crossorigin href="./assets/config-provider-
|
|
123
|
+
<link rel="modulepreload" crossorigin href="./assets/config-provider-DFcchYF_.js">
|
|
124
124
|
<link rel="modulepreload" crossorigin href="./assets/dist-BHv-mziD.js">
|
|
125
125
|
<link rel="modulepreload" crossorigin href="./assets/dist-BcvirUWL.js">
|
|
126
126
|
<link rel="modulepreload" crossorigin href="./assets/dist-BDna-dOq.js">
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
<link rel="modulepreload" crossorigin href="./assets/external-link-C5LIdhIa.js">
|
|
169
169
|
<link rel="modulepreload" crossorigin href="./assets/documents-fetch-sbhR-qg0.js">
|
|
170
170
|
<link rel="modulepreload" crossorigin href="./assets/note-window-mode-CsmLTxU_.js">
|
|
171
|
-
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-
|
|
171
|
+
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-DVe4wD_N.js">
|
|
172
172
|
<link rel="modulepreload" crossorigin href="./assets/git-branch-B_QTfwFA.js">
|
|
173
173
|
<link rel="modulepreload" crossorigin href="./assets/maximize-2-DaY3HCwc.js">
|
|
174
174
|
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-CCeXtPLU.js">
|
|
@@ -200,11 +200,11 @@
|
|
|
200
200
|
<link rel="modulepreload" crossorigin href="./assets/skill-scope-BT8L6qtg.js">
|
|
201
201
|
<link rel="modulepreload" crossorigin href="./assets/skills-api-B3ylk3SA.js">
|
|
202
202
|
<link rel="modulepreload" crossorigin href="./assets/use-workspace-RZ7iKvm8.js">
|
|
203
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
203
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-CNNn86SD.js">
|
|
204
204
|
<link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-tR_J9F2L.js">
|
|
205
205
|
<link rel="modulepreload" crossorigin href="./assets/thread-client-g2-or03F.js">
|
|
206
206
|
<link rel="modulepreload" crossorigin href="./assets/workspace-paths-Dczkx4vn.js">
|
|
207
|
-
<link rel="modulepreload" crossorigin href="./assets/progress-
|
|
207
|
+
<link rel="modulepreload" crossorigin href="./assets/progress-B4-6I3_h.js">
|
|
208
208
|
<link rel="modulepreload" crossorigin href="./assets/dist-Dhtu02232.js">
|
|
209
209
|
<link rel="modulepreload" crossorigin href="./assets/radio-group-npdxiS6E.js">
|
|
210
210
|
<link rel="modulepreload" crossorigin href="./assets/separator-CcvvqzEJ.js">
|
|
@@ -215,16 +215,16 @@
|
|
|
215
215
|
<link rel="modulepreload" crossorigin href="./assets/dist-tLQ-ULW1.js">
|
|
216
216
|
<link rel="modulepreload" crossorigin href="./assets/dist-BX7qfUal.js">
|
|
217
217
|
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-DjQ8GtwR.js">
|
|
218
|
-
<link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-
|
|
218
|
+
<link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-BsydKIFK.js">
|
|
219
219
|
<link rel="modulepreload" crossorigin href="./assets/folder-config-api-CLsn5yX1.js">
|
|
220
|
-
<link rel="modulepreload" crossorigin href="./assets/comment-chips-
|
|
220
|
+
<link rel="modulepreload" crossorigin href="./assets/comment-chips-geicHQR3.js">
|
|
221
221
|
<link rel="modulepreload" crossorigin href="./assets/SkillCostValue-Dkt0Lsdj.js">
|
|
222
222
|
<link rel="modulepreload" crossorigin href="./assets/textarea-DkcNoPBJ.js">
|
|
223
|
-
<link rel="modulepreload" crossorigin href="./assets/selection-context-
|
|
223
|
+
<link rel="modulepreload" crossorigin href="./assets/selection-context-gelM_MCh.js">
|
|
224
224
|
<link rel="modulepreload" crossorigin href="./assets/lint-config-client-F_cH7k94.js">
|
|
225
225
|
<link rel="modulepreload" crossorigin href="./assets/use-skills-D-P8abH-.js">
|
|
226
|
-
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-
|
|
227
|
-
<link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-
|
|
226
|
+
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-DlORA12f.js">
|
|
227
|
+
<link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-JheZk6DM.js">
|
|
228
228
|
<link rel="modulepreload" crossorigin href="./assets/arrow-up-right-B3B9a7te.js">
|
|
229
229
|
<link rel="modulepreload" crossorigin href="./assets/cursor-DnmFJny0.js">
|
|
230
230
|
<link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon-C299I100.js">
|
|
@@ -238,11 +238,11 @@
|
|
|
238
238
|
<link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-aKUan9IB.js">
|
|
239
239
|
<link rel="modulepreload" crossorigin href="./assets/list-plus-BmoxCvSM.js">
|
|
240
240
|
<link rel="modulepreload" crossorigin href="./assets/agent-launcher-labels-C68Xjdk5.js">
|
|
241
|
-
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-
|
|
241
|
+
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-CKVWwdSU.js">
|
|
242
242
|
<link rel="modulepreload" crossorigin href="./assets/use-settings-route-CBhyzk7L.js">
|
|
243
243
|
<link rel="modulepreload" crossorigin href="./assets/platform-labels-_NqJVta7.js">
|
|
244
244
|
<link rel="modulepreload" crossorigin href="./assets/clipboard-adapter-3v18kDwB.js">
|
|
245
|
-
<link rel="modulepreload" crossorigin href="./assets/AddPropertiesButton-
|
|
245
|
+
<link rel="modulepreload" crossorigin href="./assets/AddPropertiesButton-Dkcg9vdy.js">
|
|
246
246
|
<link rel="modulepreload" crossorigin href="./assets/case-sensitive-B01mpdhT.js">
|
|
247
247
|
<link rel="modulepreload" crossorigin href="./assets/chevron-left-BTZYHMSf.js">
|
|
248
248
|
<link rel="modulepreload" crossorigin href="./assets/lint-plugin-meta-zA9wHIBR.js">
|
|
@@ -250,14 +250,14 @@
|
|
|
250
250
|
<link rel="modulepreload" crossorigin href="./assets/wrench-Cjhn9plF.js">
|
|
251
251
|
<link rel="modulepreload" crossorigin href="./assets/panel-YWvIeRKP.js">
|
|
252
252
|
<link rel="modulepreload" crossorigin href="./assets/skeleton-BJMacgN3.js">
|
|
253
|
-
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-
|
|
253
|
+
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-CoszxP3G.js">
|
|
254
254
|
<link rel="modulepreload" crossorigin href="./assets/terminal-DGmaW797.js">
|
|
255
255
|
<link rel="modulepreload" crossorigin href="./assets/terminal-command-events-CxUcuMtj.js">
|
|
256
256
|
<link rel="modulepreload" crossorigin href="./assets/field-bXEeLKBZ.js">
|
|
257
257
|
<link rel="modulepreload" crossorigin href="./assets/use-conflicts-DHCw7mix.js">
|
|
258
|
-
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-
|
|
258
|
+
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-vidMN3NZ.js">
|
|
259
259
|
<link rel="modulepreload" crossorigin href="./assets/miss-dialog-store-CNJRdTPE.js">
|
|
260
|
-
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-
|
|
260
|
+
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-BpynqTsI.js">
|
|
261
261
|
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-rp6fGtq3.js">
|
|
262
262
|
<link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-BD-q8533.js">
|
|
263
263
|
<link rel="modulepreload" crossorigin href="./assets/contact-email-store-Dom1z23f.js">
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
<link rel="modulepreload" crossorigin href="./assets/dist-BWW5b2CT.js">
|
|
274
274
|
<link rel="modulepreload" crossorigin href="./assets/dist-6gT1hn-u.js">
|
|
275
275
|
<link rel="modulepreload" crossorigin href="./assets/text-viewer-languages-DP8HzdKZ.js">
|
|
276
|
-
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-
|
|
276
|
+
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-B_ngg6b-.js">
|
|
277
277
|
<link rel="modulepreload" crossorigin href="./assets/ImageAttachments-B3ux3OE7.js">
|
|
278
278
|
<link rel="modulepreload" crossorigin href="./assets/ConfigSharingInfoTooltip-CK9XrP2K.js">
|
|
279
279
|
<link rel="modulepreload" crossorigin href="./assets/RowDisclosure-DMbI1q_e.js">
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
script above.
|
|
33
33
|
-->
|
|
34
34
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
35
|
-
<script type="module" crossorigin src="./assets/uninstall-
|
|
35
|
+
<script type="module" crossorigin src="./assets/uninstall-DYsPV9Se.js"></script>
|
|
36
36
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
<link rel="modulepreload" crossorigin href="./assets/input-f41fkc3m.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/textarea-DkcNoPBJ.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/dist-CJhtNlOm2.js">
|
|
72
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
73
|
-
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language
|
|
72
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BHdlsepL.js">
|
|
73
|
+
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language--D5KrAwV.js">
|
|
74
74
|
<link rel="stylesheet" crossorigin href="./assets/globals-7nCZAq2S.css">
|
|
75
75
|
</head>
|
|
76
76
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Ad as r,Hu as i,Id as a,Md as o,Nd as s,Nl as c,Pd as l,ju as u}from"./md-manager-BGnqyqi1-DKflYxqj.mjs";import{Do as d,Ln as f,Mo as p,No as m,Qn as h,m as g,qi as _,ro as v,vo as y,wn as ee}from"./dist-C9m6GTCy.mjs";import{A as b,L as te,M as x,N as S,O as C,Q as ne,T as re,Y as w,ct as ie,d as ae,et as oe,f as se,it as ce,j as le,k as ue,nt as de,o as fe,q as pe,rt as me,st as he,tt as ge,ut as _e,v as ve,w as ye,x as be,y as xe}from"./init-
|
|
1
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Ad as r,Hu as i,Id as a,Md as o,Nd as s,Nl as c,Pd as l,ju as u}from"./md-manager-BGnqyqi1-DKflYxqj.mjs";import{Do as d,Ln as f,Mo as p,No as m,Qn as h,m as g,qi as _,ro as v,vo as y,wn as ee}from"./dist-C9m6GTCy.mjs";import{A as b,L as te,M as x,N as S,O as C,Q as ne,T as re,Y as w,ct as ie,d as ae,et as oe,f as se,it as ce,j as le,k as ue,nt as de,o as fe,q as pe,rt as me,st as he,tt as ge,ut as _e,v as ve,w as ye,x as be,y as xe}from"./init-CLPTtBmC.mjs";import{t as Se}from"./is-object-BGze3w87.mjs";import{t as Ce}from"./removal-file-path-q-74WYn7.mjs";import{spawn as we}from"node:child_process";import{basename as T,dirname as E,join as D,resolve as O,win32 as Te}from"node:path";import{accessSync as k,constants as A,existsSync as j,lstatSync as M,mkdirSync as Ee,readFileSync as N,readdirSync as P,realpathSync as F,rmSync as De,rmdirSync as Oe,statSync as I,unlinkSync as ke,writeFileSync as Ae}from"node:fs";import{homedir as L}from"node:os";import{createHash as je}from"node:crypto";import{isDeepStrictEqual as Me}from"node:util";import{setTimeout as Ne}from"node:timers/promises";var R=u();let Pe;function Fe(){return Pe}function Ie(e,t){if(t!==void 0&&t.length>0)return t;try{return h(e)?.rootPath}catch{return}}function Le(e){let t=Ie(e.cwd,e.configuredProjectName),n=ee({name:`cli`,project:t});return Pe=n,n.info({command:e.command,cwd:e.cwd,project:t},`cli command started`),n}const z=`open-knowledge`;function B(e){try{e()}catch{}}var Re=class{backend=`keyring`;onKeychainRead;constructor(e){this.onKeychainRead=e}async get(e){let{Entry:t}=await import(`@napi-rs/keyring`),n;try{n=new t(z,e).getPassword()}catch(t){return B(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return B(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return B(()=>this.onKeychainRead?.({kind:`corrupt-entry`,host:e,error:`corrupt-entry`})),null}}async set(e,t,n,r){let{Entry:i}=await import(`@napi-rs/keyring`),a=new i(z,e),o={login:t,token:n,...r};a.setPassword(JSON.stringify(o))}async clear(e){let{Entry:t}=await import(`@napi-rs/keyring`);try{new t(z,e).deletePassword()}catch{}}},V=class{backend=`file`;authFile;constructor(e){this.authFile=e??D(L(),`.ok`,`auth.yml`)}read(){if(!j(this.authFile))return{};try{let e=N(this.authFile,`utf-8`);return(0,R.parse)(e)??{}}catch(e){let t=e instanceof Error?e.message:`unknown error`;return process.stderr.write(`[auth] Failed to parse ${this.authFile}: ${t}. Starting with empty credentials.\n`),{}}}write(e){let t=E(this.authFile);j(t)||Ee(t,{recursive:!0,mode:448}),Ae(this.authFile,(0,R.stringify)(e),{mode:384})}async get(e){return this.read()[e]??null}async set(e,t,n,r){let i=this.read();i[e]={login:t,token:n,...r},this.write(i)}async clear(e){let t=this.read();delete t[e],this.write(t)}},ze=class{backend=`keyring`;keychain;file;constructor(e,t){this.keychain=e,this.file=t}async get(e){let t=await this.keychain.get(e);if(t!=null)return t;let n=await this.file.get(e);if(n==null)return null;try{await this.keychain.set(e,n.login,n.token,{gitProtocol:n.gitProtocol,name:n.name,email:n.email}),await this.file.clear(e),process.stderr.write(`[auth] migrated ${e} credential from ~/.ok/auth.yml to the OS keychain\n`)}catch{}return n}set(e,t,n,r){return this.keychain.set(e,t,n,r)}async clear(e){await this.keychain.clear(e),await this.file.get(e)!=null&&await this.file.clear(e)}};async function Be(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(z,`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
|
|
2
2
|
`),B(()=>t?.onBackendSelected?.({backend:`keyring`})),new ze(new Re(t?.onKeychainRead),new V(e))}catch(n){let r=n instanceof Error?`${n.name}: ${n.message}`:String(n);return process.stderr.write(`[auth] token storage: file (~/.ok/auth.yml) — OS keychain unavailable: ${r}\n`),B(()=>t?.onBackendSelected?.({backend:`file`,reason:r})),new V(e)}}function Ve(e){let t=null;return function(){if(t)return t;let n=2e3;return t=(async()=>{let t=null,r=new Promise(r=>{t=setTimeout(()=>{process.stderr.write(`[auth] token storage: keyring init exceeded ${n}ms; falling back to file (~/.ok/auth.yml)\n`),r(new V(e))},n)});try{return await Promise.race([Be(e),r])}catch{return new V(e)}finally{t!==null&&clearTimeout(t)}})(),t}}function He(e){let t=Ve(e);return{async get(e){let n=await(await t()).get(e);return n===null?null:{token:n.token,login:n.login}}}}function Ue(e){let t=Ve(e);return{backend:`file`,async get(e){return(await t()).get(e)},async set(e,n,r,i){return(await t()).set(e,n,r,i)},async clear(e){return(await t()).clear(e)}}}async function We(e,t){let n=[],r=new V(t);await r.get(e)!=null&&(await r.clear(e),n.push(`file`));let i;try{let{Entry:t}=await import(`@napi-rs/keyring`);new t(z,`__probe__`);let r,a=await new Re(e=>{e.kind===`read-error`&&(r=e.error??`read-error`)}).get(e);if(r!==void 0)i=r;else if(a!=null)try{new t(z,e).deletePassword(),n.push(`keychain`)}catch(e){i=e instanceof Error?e.name:`delete-error`}}catch{}return{touched:n,keychainError:i}}function Ge(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function Ke(e){let t=e?.code;return t===`ENOENT`||t===`EACCES`||t===`EPERM`?{ok:!1,reason:`not-installed`}:{ok:!1,reason:`spawn-error`}}function qe(e){return v({detached:!0,stdio:`ignore`,shell:!1,env:Ge(e)})}function Je(e,t,n={}){let r=(n.spawn??we)(e,[...t],qe(n.env??process.env));return r.unref(),r}function Ye(e,t,n={}){let r=n.spawn??we,i=n.timeoutMs??2e3;return new Promise(a=>{let o=!1,s=e=>{o||(o=!0,a(e))},c=setTimeout(()=>s({ok:!1,reason:`timeout`}),i);try{let i=r(e,[...t],qe(n.env??process.env));i.once(`error`,e=>{clearTimeout(c),s(Ke(e))}),i.once(`spawn`,()=>{clearTimeout(c),s({ok:!0})});try{i.unref()}catch{}}catch(e){clearTimeout(c),s(Ke(e))}})}const Xe=`com.inkeep.open-knowledge`,Ze=`OpenKnowledge.app`,Qe=`/Applications/${Ze}`;function $e(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return I(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function et(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(tt(e,Qe))return Qe;let t=e.homeDir??L(),n=D(t,`Applications`,Ze);return tt(e,n)?n:null}function tt(e,t){return nt(e,D(t,`Contents`,`MacOS`,`OpenKnowledge`))}function nt(e,t){try{let n=e.statSync(t);return n?typeof n.isFile==`function`&&n.isFile():!1}catch{return!1}}const rt=[`@inkeepopen-knowledge-desktop`,`OpenKnowledge`];function it(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&/\\OpenKnowledge\.exe$/i.test(e.execPath))return e.execPath;let t=e.env.LOCALAPPDATA;if(t)for(let n of rt){let r=Te.join(t,`Programs`,n,`OpenKnowledge.exe`);if(nt(e,r))return r}return null}function at(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&e.execPath.endsWith(`/openknowledge`))return e.execPath;let t=`/opt/OpenKnowledge/openknowledge`;return nt(e,t)?t:null}function ot(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`&&e.platform!==`win32`&&e.platform!==`linux`)return{available:!1,reason:`unsupported-platform`};let t;try{t=e.platform===`darwin`?et(e):e.platform===`win32`?it(e):at(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:!(e.isTTY===!0||e.platform===`win32`&&e.isTTY===void 0&&!e.env.CI)||e.env.SSH_CONNECTION||e.env.SSH_TTY||e.platform===`linux`&&!e.env.DISPLAY&&!e.env.WAYLAND_DISPLAY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function st(e,t){let n=e.log??(e=>console.error(e)),r=e.platform??process.platform;if(n("Launching OpenKnowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)"),r===`darwin`){Je(`open`,[`-b`,Xe],{spawn:e.spawn});return}let i=t?.bundlePath;if(!i){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}Je(i,[],{spawn:e.spawn})}function ct(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found (checked the standard install locations for this OS). Install it from https://openknowledge.ai/download, or omit --mode for browser mode.`;case`darwin-only`:case`unsupported-platform`:return`Desktop app is not available on this platform. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect the desktop install (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available but launch dispatch did not fire (caller bug).`}}function H(e){return e.replace(/[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control}\u200b\ufeff]/gu,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function lt(e){return je(`sha256`).update(e).digest(`hex`)}function U(e){return D(O(e),`.ok`,`pi-trust`)}function ut(e,t){return D(U(e),lt(O(t)))}function dt(e,t,n){return D(ut(e,t),`${lt(n)}.json`)}var W=class extends Error{constructor(e,t,n,r){super(`Pi trust receipt at ${H(e)} ${H(t)}; ${H(n)}`,{cause:r}),this.name=`PiTrustReceiptError`}};function G(e,t,n){let r=n.code,i=n instanceof Error?n.message:String(n),a;switch(r){case`EACCES`:case`EPERM`:a=`check receipt and parent-directory permissions, then retry`;break;case`ENOENT`:a=`the location no longer exists; restore access to its expected location, then retry`;break;default:a=`check the path and available storage, then retry`}return new W(e,`could not ${t}: ${i}`,a,n)}function K(e){let t;try{t=M(e)}catch(t){if(t.code===`ENOENT`)return!1;throw G(e,`be inspected`,t)}if(!t.isDirectory())throw new W(e,`is not a regular directory`,`restore the intended receipt directory without a symlink, then retry`);return!0}function ft(e,t){return Object.keys(e).length===t.length&&t.every(t=>Object.hasOwn(e,t))}function pt(e,t){if(!Se(e)||!ft(e,[`version`,`cwd`,`configuredTrustPath`,`canonicalTrustPath`,`state`,`previous`])||e.version!==1||typeof e.cwd!=`string`||e.cwd!==O(e.cwd)||typeof e.configuredTrustPath!=`string`||e.configuredTrustPath!==O(e.configuredTrustPath)||typeof e.canonicalTrustPath!=`string`||e.canonicalTrustPath!==O(e.canonicalTrustPath)||e.state!==`pending`&&e.state!==`committed`||!Se(e.previous))throw new W(t,`has invalid contents`,`restore a valid ownership record from a backup without guessing its trust decision, then retry`);let n;if(e.previous.present===!1&&ft(e.previous,[`present`]))n={present:!1};else if(e.previous.present===!0&&ft(e.previous,[`present`,`value`]))n={present:!0,value:e.previous.value};else throw new W(t,`has an invalid previous decision`,`restore the recorded previous decision from a backup without guessing its value, then retry`);return{version:1,cwd:e.cwd,configuredTrustPath:e.configuredTrustPath,canonicalTrustPath:e.canonicalTrustPath,state:e.state,previous:n}}function mt(e,t,n){let r;try{r=M(n)}catch(e){throw G(n,`be inspected`,e)}if(!r.isFile())throw new W(n,`is not a regular file`,`restore the intended receipt as a regular file without a symlink, then retry`);let i;try{i=N(n,`utf8`)}catch(e){throw G(n,`be read`,e)}let a;try{a=JSON.parse(i)}catch(e){throw new W(n,`is not valid JSON`,`repair its JSON syntax without changing the recorded decision, then retry`,e)}let o=pt(a,n);if(o.cwd!==O(t)||n!==dt(e,t,o.canonicalTrustPath))throw new W(n,`does not match its project or trust-store location`,`restore the ownership record to its original project and trust-store location, then retry`);return{path:n,record:o}}function ht(e,t){let{record:n,path:r}=t;for(let t of[U(e),ut(e,n.cwd)])if(!K(t))throw new W(t,`no longer exists`,`restore access to the expected receipt directory, then retry`);let i=mt(e,n.cwd,r);if(!Me(i.record,n))throw new W(r,`changed while its trust decision was being updated`,`retry to read its current ownership record`);return i}function gt(e,t,n,r,i){let a={version:1,cwd:O(t),configuredTrustPath:O(n),canonicalTrustPath:O(r),state:`pending`,previous:i},o=dt(e,a.cwd,a.canonicalTrustPath),s=`${JSON.stringify(a,null,2)}\n`;if(!Me(pt(JSON.parse(s),o),a))throw new W(o,`cannot preserve the previous decision as JSON`,`provide the original decision as a JSON value before retrying`);K(U(e)),K(E(o));try{Ee(E(o),{recursive:!0,mode:448})}catch(e){throw G(E(o),`be created`,e)}let c;try{c=M(o,{throwIfNoEntry:!1})}catch(e){throw G(o,`be inspected`,e)}if(c)throw new W(o,`already exists`,`reconcile the existing ownership record before recording another grant`);try{d(o,s,{mode:384})}catch(e){throw G(o,`be written`,e)}return{path:o,record:a}}function _t(e,t){let n=ht(e,t);if(n.record.state!==`pending`)throw new W(n.path,`is already committed`,`use the current ownership record without committing it again`);let r={...n.record,state:`committed`};try{d(n.path,`${JSON.stringify(r,null,2)}\n`,{mode:384})}catch(e){throw G(n.path,`be committed`,e)}return{path:n.path,record:r}}function q(e,t){if(!K(U(e)))return[];let n=ut(e,t);if(!K(n))return[];let r;try{r=P(n).sort()}catch(e){throw G(n,`be listed`,e)}return r.filter(e=>/^[a-f0-9]{64}\.json$/.test(e)).map(r=>mt(e,t,D(n,r)))}function J(e,t){let n=ht(e,t);try{ke(n.path)}catch(e){throw G(n.path,`be removed after reconciling its grant`,e)}for(let t of[E(n.path),U(e)])try{Oe(t)}catch(e){let n=e.code;if(n!==`ENOTEMPTY`&&n!==`EEXIST`&&n!==`ENOENT`)throw G(t,`be removed after reconciling its grant`,e)}}var vt=n(((t,n)=>{var r=e(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){if(t){i&&i(t);return}e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){if(t){a&&a(t);return}e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),yt=n(((t,n)=>{var r=e(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=65536,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),bt=n(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),xt=n(((t,n)=>{var r=e(`fs`),i=vt(),a=yt(),o=bt(),s=e(`util`),c,l;typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
3
3
|
GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||g(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(r[c]),e(`assert`).equal(r[c].length,0)})),global[c]||d(global,r[c]),n.exports=p(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(n.exports=p(r),r.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=C,e.createWriteStream=ne;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);b=g.ReadStream,x=g.WriteStream}var _=e.ReadStream;_&&(b.prototype=Object.create(_.prototype),b.prototype.open=te);var v=e.WriteStream;v&&(x.prototype=Object.create(v.prototype),x.prototype.open=S),Object.defineProperty(e,"ReadStream",{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0});var y=b;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var ee=x;Object.defineProperty(e,"FileWriteStream",{get:function(){return ee},set:function(e){ee=e},enumerable:!0,configurable:!0});function b(e,t){return this instanceof b?(_.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function te(){var e=this;w(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function x(e,t){return this instanceof x?(v.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;w(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function C(t,n){return new e.ReadStream(t,n)}function ne(t,n){return new e.WriteStream(t,n)}var re=e.open;e.open=w;function w(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return re(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),_()}var h;function g(){for(var e=Date.now(),t=0;t<r[c].length;++t)r[c][t].length>2&&(r[c][t][3]=e,r[c][t][4]=e);_()}function _(){if(clearTimeout(h),h=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}h===void 0&&(h=setTimeout(_,0))}}})),St=n(((e,t)=>{function n(e,t){typeof t==`boolean`&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=n,n.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},n.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},n.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error(`RetryOperation timeout occurred`)),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0){if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift();else return!1}var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n);return this._options.unref&&i.unref(),!0},n.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},n.prototype.try=function(e){console.log(`Using RetryOperation.try() is deprecated`),this.attempt(e)},n.prototype.start=function(e){console.log(`Using RetryOperation.start() is deprecated`),this.attempt(e)},n.prototype.start=n.prototype.try,n.prototype.errors=function(){return this._errors},n.prototype.attempts=function(){return this._attempts},n.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],a=i.message,o=(e[a]||0)+1;e[a]=o,o>=n&&(t=i,n=o)}return t}})),Ct=n((e=>{var t=St();e.operation=function(n){return new t(e.timeouts(n),{forever:n&&n.forever,unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw Error(`minTimeout is greater than maxTimeout`);for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort(function(e,t){return e-t}),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*t.factor**+e);return r=Math.min(r,t.maxTimeout),r},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],t)typeof t[i]==`function`&&r.push(i);for(var a=0;a<r.length;a++){var o=r[a],s=t[o];t[o]=function(r){var i=e.operation(n),a=Array.prototype.slice.call(arguments,1),o=a.pop();a.push(function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),o.apply(this,arguments))}),i.attempt(function(){r.apply(t,a)})}.bind(t,s),t[o].options=n}}})),wt=n(((e,t)=>{t.exports=Ct()})),Tt=n(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),Et=n(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=Tt(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){!p||!i(global.process)||(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){p||!i(global.process)||(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}return _.apply(this,arguments)}}})),Dt=n(((e,t)=>{let n=Symbol();function r(e,t,r){let i=t[n];if(i)return t.stat(e,(e,t)=>{if(e)return r(e);r(null,t.mtime,i)});let a=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,a,a,i=>{if(i)return r(i);t.stat(e,(e,i)=>{if(e)return r(e);let a=i.mtime.getTime()%1e3==0?`s`:`ms`;Object.defineProperty(t,n,{value:a}),r(null,i.mtime,a)})})}function i(e){let t=Date.now();return e===`s`&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}t.exports.probe=r,t.exports.getMtime=i})),Ot=n(((t,n)=>{let r=e(`path`),i=xt(),a=wt(),o=Et(),s=Dt(),c={};function l(e,t){return t.lockfilePath||`${e}.lock`}function u(e,t,n){if(!t.realpath)return n(null,r.resolve(e));t.fs.realpath(e,n)}function d(e,t,n){let r=l(e,t);t.fs.mkdir(r,i=>{if(!i)return s.probe(r,t.fs,(e,i,a)=>{if(e)return t.fs.rmdir(r,()=>{}),n(e);n(null,i,a)});if(i.code!==`EEXIST`)return n(i);if(t.stale<=0)return n(Object.assign(Error(`Lock file is already being held`),{code:`ELOCKED`,file:e}));t.fs.stat(r,(r,i)=>{if(r)return r.code===`ENOENT`?d(e,{...t,stale:0},n):n(r);if(!f(i,t))return n(Object.assign(Error(`Lock file is already being held`),{code:`ELOCKED`,file:e}));p(e,t,r=>{if(r)return n(r);d(e,{...t,stale:0},n)})})})}function f(e,t){return e.mtime.getTime()<Date.now()-t.stale}function p(e,t,n){t.fs.rmdir(l(e,t),e=>{if(e&&e.code!==`ENOENT`)return n(e);n()})}function m(e,t){let n=c[e];n.updateTimeout||(n.updateDelay=n.updateDelay||t.update,n.updateTimeout=setTimeout(()=>{n.updateTimeout=null,t.fs.stat(n.lockfilePath,(r,i)=>{let a=n.lastUpdate+t.stale<Date.now();if(r)return r.code===`ENOENT`||a?h(e,n,Object.assign(r,{code:`ECOMPROMISED`})):(n.updateDelay=1e3,m(e,t));if(n.mtime.getTime()!==i.mtime.getTime())return h(e,n,Object.assign(Error(`Unable to update lock within the stale threshold`),{code:`ECOMPROMISED`}));let o=s.getMtime(n.mtimePrecision);t.fs.utimes(n.lockfilePath,o,o,r=>{let i=n.lastUpdate+t.stale<Date.now();if(!n.released){if(r)return r.code===`ENOENT`||i?h(e,n,Object.assign(r,{code:`ECOMPROMISED`})):(n.updateDelay=1e3,m(e,t));n.mtime=o,n.lastUpdate=Date.now(),n.updateDelay=null,m(e,t)}})})},n.updateDelay),n.updateTimeout.unref&&n.updateTimeout.unref())}function h(e,t,n){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),c[e]===t&&delete c[e],t.options.onCompromised(n)}function g(e,t,n){t={stale:1e4,update:null,realpath:!0,retries:0,fs:i,onCompromised:e=>{throw e},...t},t.retries=t.retries||0,t.retries=typeof t.retries==`number`?{retries:t.retries}:t.retries,t.stale=Math.max(t.stale||0,2e3),t.update=t.update==null?t.stale/2:t.update||0,t.update=Math.max(Math.min(t.update,t.stale/2),1e3),u(e,t,(e,r)=>{if(e)return n(e);let i=a.operation(t.retries);i.attempt(()=>{d(r,t,(e,a,o)=>{if(i.retry(e))return;if(e)return n(i.mainError());let s=c[r]={lockfilePath:l(r,t),mtime:a,mtimePrecision:o,options:t,lastUpdate:Date.now()};m(r,t),n(null,e=>{if(s.released)return e&&e(Object.assign(Error(`Lock is already released`),{code:`ERELEASED`}));_(r,{...t,realpath:!1},e)})})})})}function _(e,t,n){t={fs:i,realpath:!0,...t},u(e,t,(e,r)=>{if(e)return n(e);let i=c[r];if(!i)return n(Object.assign(Error(`Lock is not acquired/owned by you`),{code:`ENOTACQUIRED`}));i.updateTimeout&&clearTimeout(i.updateTimeout),i.released=!0,delete c[r],p(r,t,n)})}function v(e,t,n){t={stale:1e4,realpath:!0,fs:i,...t},t.stale=Math.max(t.stale||0,2e3),u(e,t,(e,r)=>{if(e)return n(e);t.fs.stat(l(r,t),(e,r)=>e?e.code===`ENOENT`?n(null,!1):n(e):n(null,!f(r,t)))})}function y(){return c}o(()=>{for(let e in c){let t=c[e].options;try{t.fs.rmdirSync(l(e,t))}catch{}}}),n.exports.lock=g,n.exports.unlock=_,n.exports.check=v,n.exports.getLocks=y})),kt=n(((e,t)=>{let n=xt();function r(e){let t=[`mkdir`,`realpath`,`stat`,`rmdir`,`utimes`],n={...e};return t.forEach(t=>{n[t]=(...n)=>{let r=n.pop(),i;try{i=e[`${t}Sync`](...n)}catch(e){return r(e)}r(null,i)}}),n}function i(e){return(...t)=>new Promise((n,r)=>{t.push((e,t)=>{e?r(e):n(t)}),e(...t)})}function a(e){return(...t)=>{let n,r;if(t.push((e,t)=>{n=e,r=t}),e(...t),n)throw n;return r}}function o(e){if(e={...e},e.fs=r(e.fs||n),typeof e.retries==`number`&&e.retries>0||e.retries&&typeof e.retries.retries==`number`&&e.retries.retries>0)throw Object.assign(Error(`Cannot use retries with the sync api`),{code:`ESYNC`});return e}t.exports={toPromise:i,toSync:a,toSyncOptions:o}})),At=t(n(((e,t)=>{let n=Ot(),{toPromise:r,toSync:i,toSyncOptions:a}=kt();async function o(e,t){let i=await r(n.lock)(e,t);return r(i)}function s(e,t){let r=i(n.lock)(e,a(t));return i(r)}function c(e,t){return r(n.unlock)(e,t)}function l(e,t){return i(n.unlock)(e,a(t))}function u(e,t){return r(n.check)(e,t)}function d(e,t){return i(n.check)(e,a(t))}t.exports=o,t.exports.lock=o,t.exports.unlock=c,t.exports.lockSync=s,t.exports.unlockSync=l,t.exports.check=u,t.exports.checkSync=d}))(),1);const jt=5e3;function Mt(e,t,n){if(!(e instanceof Error)||!(`code`in e)||e.code!==`ELOCKED`)throw e;let r=t-performance.now();if(r<=0)throw Object.assign(Error(`Could not acquire Pi trust lock at ${n}.lock within ${jt}ms`,{cause:e}),{code:`ELOCKED`});return Math.min(25,r)}function Nt(e,t){Fe()?.warn(t,e)}function Pt(e,t){if(e.length===0)return;if(e.length===1)throw e[0];let[n,r]=e,i=n instanceof Error?n.message:String(n),a=r instanceof Error?r.message:String(r);throw AggregateError(e,`Pi trust update failed: ${i}\nReleasing Pi trust lock ${t}.lock also failed: ${a}`)}async function Ft(e,t,n){await p(`${t}.ok.lock`,async()=>{let t=performance.now()+jt,r;for(;;)try{r=await At.default.lock(E(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){await Ne(Mt(n,t,e))}let i=[];try{n()}catch(e){i.push(e)}finally{try{await r()}catch(e){i.push(e)}}Pt(i,e)},{onWarn:Nt})}function It(e,t,n){m(`${t}.ok.lock`,()=>{let t=performance.now()+jt,r=new Int32Array(new SharedArrayBuffer(4)),i;for(;;)try{i=At.default.lockSync(E(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){Atomics.wait(r,0,0,Mt(n,t,e))}let a=[];try{n()}catch(e){a.push(e)}finally{try{i()}catch(e){a.push(e)}}Pt(a,e)},{onWarn:Nt})}const Lt=[`settings.json`,`prompts`,`themes`,`SYSTEM.md`,`APPEND_SYSTEM.md`];var Rt=class extends Error{name=`PiResourceInspectionError`};function Y(e){let t;try{t=M(e)}catch(e){if(e.code===`ENOENT`)return!1;throw e}let n;try{n=I(e)}catch(e){throw t.isSymbolicLink()&&e.code===`ENOENT`?new Rt(le(`missing-symlink-target`),{cause:e}):e}return k(e,A.R_OK|(n.isDirectory()?A.X_OK:0)),!0}function zt(e){return e===`open-knowledge`||e.startsWith(`open-knowledge-`)}function Bt(e,t,n){let r=e;try{let i=F(e),a;r=t;try{a=F(t)}catch(e){if(e.code!==`ENOENT`)throw e;a=O(t)}let o=D(a,`.agents`,`skills`),s=[];for(let e of Lt)r=D(i,`.pi`,e),Y(r)&&s.push(r);if(r=D(i,`.pi`,`extensions`),Y(r))for(let t of P(r).sort()){let i=D(r,t);O(n)!==D(O(e),`.pi`,`extensions`,t)&&s.push(i)}for(let e of[D(i,`.pi`,`skills`),D(i,`.agents`,`skills`)])if(e!==o&&(r=e,Y(e)))for(let t of P(e).sort())zt(t)||s.push(D(e,t));let c=E(i);for(;c!==i;){r=D(c,`.agents`,`skills`),r!==o&&Y(r)&&s.push(r);let e=E(c);if(e===c)break;c=e}return s.length===0?{kind:`none`}:{kind:`shared`,paths:s.sort()}}catch(e){return{kind:`unreadable`,error:`Could not inspect Pi project resources at ${H(r)}: ${e instanceof Rt?e.message:le(x(e))}`}}}function Vt(e,t,n){let r=O(e),i=he({home:t,env:n??(t===void 0?process.env:{})});return{cwd:r,bridgePath:w.pi.projectConfigPath(r),trustPath:D(i,`trust.json`)}}function X(e){try{let t=F(e);return I(t).isDirectory()?(k(t,A.X_OK),{kind:`ready`,project:{path:e,canonical:t}}):{kind:`refused`,error:`Pi project path ${H(e)} is not a directory; restore the intended project directory, then retry`}}catch(t){return{kind:`refused`,error:`Pi project directory ${H(e)} could not be resolved or accessed: ${H(t instanceof Error?t.message:String(t))}; restore the directory or symlink and check its permissions, then retry`}}}function Ht(e){let t=X(e.path);if(t.kind===`refused`)return t.error;if(t.project.canonical!==e.canonical)return`Pi project path ${H(e.path)} changed while waiting for its trust lock; restore the intended project location, then retry`}function Ut(e,t,n){let r=fe(w.pi,e,n,t);if(r.kind===`absent`)return{state:`absent`,text:null};if(r.kind!==`present`)return{state:`unreadable`,text:null};let i=r.entry,a=Array.isArray(i.args)&&typeof i.args[0]==`string`?i.args[0]:null;return de(i)?{state:`own-current`,text:a}:re(i)?{state:`own-stale`,text:a}:{state:`foreign`,text:a}}function Wt(e,t){let n;try{n=N(e.path,`utf-8`)}catch(t){let n=t.code;return e.kind===`missing`&&n===`ENOENT`?{state:`untrusted`,entries:{},trailingNewline:!1}:{state:`unreadable`,reason:x(t)}}if(n.trim()===``)return{state:`untrusted`,entries:{},trailingNewline:!1};let r;try{r=JSON.parse(n)}catch{return{state:`unreadable`,reason:`invalid-json`}}return Se(r)?{state:r[t]===!0?`trusted`:`untrusted`,entries:r,trailingNewline:n.endsWith(`
|
|
4
4
|
`)}:{state:`unreadable`,reason:`invalid-json`}}function Gt(e){switch(e){case`invalid-json`:return`the file is not a valid JSON object; repair its JSON, then retry`;case`path-changed`:return`the path changed while waiting for its lock; retry to check its current state`;case`unavailable-root`:return`the filesystem root is unavailable; reconnect the drive or network share, then retry`;default:return le(e)}}function Z(e,t){return{kind:`refused`,error:`trust store ${H(e)}: ${Gt(t)}`}}function Q(e){let t=Ce(e);try{switch(t.kind){case`declined`:return Z(e,t.reason);case`ready`:return{kind:`ready`,path:F(t.path)};case`not-present`:break;default:throw Error(`unhandled trust file resolution: ${t}`)}let n=E(e),r=[T(e)],i=M(n,{throwIfNoEntry:!1});for(;!i;){let t=E(n);if(t===n)return Z(e,`unavailable-root`);r.unshift(T(n)),n=t,i=M(n,{throwIfNoEntry:!1})}try{return{kind:`missing`,path:D(F(n),...r)}}catch(t){return Z(e,i.isSymbolicLink()&&t.code===`ENOENT`?`missing-symlink-target`:x(t))}}catch(t){return Z(e,x(t))}}function Kt(e,t){let n=Q(e);return n.kind===`refused`?n:n.path!==t.path||t.kind===`ready`&&n.kind===`missing`?Z(e,`path-changed`):n}function qt(e,t,n){let r=Vt(e,t,n),i=X(r.cwd);if(i.kind===`refused`)return{...r,project:`unavailable`,error:i.error};let a=Ut(r.cwd,r.bridgePath,t).state,o=Q(r.trustPath),s=o.kind===`refused`?`unreadable`:o.kind===`missing`?`untrusted`:Wt(o,i.project.canonical).state;return{...r,project:`ready`,canonicalCwd:i.project.canonical,bridge:a,trust:s,bridgeLoadable:(a===`own-current`||a===`own-stale`)&&s===`trusted`,otherExtensions:Jt(r.bridgePath).displayNames}}function Jt(e){let t=E(e),n=T(e);try{return{displayNames:P(t).filter(e=>e!==n&&e.endsWith(`.ts`)).sort().map(e=>H(JSON.stringify(e)))}}catch{return{displayNames:[]}}}async function Yt(e,t={mode:`published`},n,r,i){let a=Vt(e,n,r),o=X(a.cwd);if(o.kind===`refused`)return{...a,ok:!1,bridge:`refused-project-path`,trust:`skipped`,error:o.error};if(i!==void 0&&o.project.canonical!==i)return{...a,ok:!1,bridge:`refused-project-path`,trust:`skipped`,error:`The approved Pi project directory ${H(i)} no longer matches the current directory ${H(o.project.canonical)}. Reopen the intended project and approve the Pi integration again; no bridge or trust settings were changed.`};let s=Ut(a.cwd,a.bridgePath,n);if(s.state===`foreign`)return{...a,ok:!1,bridge:`refused-foreign`,trust:`skipped`};if(s.state===`unreadable`)return{...a,ok:!1,bridge:`refused-unreadable`,trust:`skipped`};let c;if(s.state===`absent`)c=`written`;else{let e;try{e=ye(t)}catch{e=void 0}c=e!==void 0&&s.text===e?`unchanged`:`refreshed`}if(c!==`unchanged`){let e=xe(w.pi,a.cwd,t,n,a.bridgePath);if(e.action!==`written`&&e.action!==`overwritten`)return{...a,ok:!1,bridge:`failed`,trust:`skipped`,error:e.error===void 0?`bridge write ${e.action}`:H(e.error)}}let l=await Xt(a.trustPath,o.project,n??L());return{...a,ok:l.action===`already-trusted`||l.action===`added`,bridge:c,trust:l.action,...l.error===void 0?{}:{error:l.error}}}async function Xt(e,t,n){let r=t.canonical,i=Q(e);if(i.kind===`refused`)return{action:`refused-unreadable`,error:i.error};try{Ee(E(i.path),{recursive:!0})}catch(e){return{action:`failed`,error:H(e instanceof Error?e.message:String(e))}}let a={action:`added`};try{await Ft(e,i.path,()=>{let o=Ht(t);if(o){a.action=`refused-unreadable`,a.error=o;return}let s=Kt(e,i);if(s.kind===`refused`){a.action=`refused-unreadable`,a.error=s.error;return}let c=Wt(s,r);if(c.state===`trusted`){a.action=`already-trusted`;return}if(c.state===`unreadable`){a.action=`refused-unreadable`,a.error=Z(e,c.reason).error;return}let l=$(n,()=>{let t=q(n,r).find(e=>e.record.canonicalTrustPath===s.path);return t&&J(n,t),gt(n,r,e,s.path,Object.hasOwn(c.entries,r)?{present:!0,value:c.entries[r]}:{present:!1})}),u={...c.entries,[r]:!0},f=JSON.stringify(u,null,2)+(c.trailingNewline?`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as e,S as t}from"./init-
|
|
1
|
+
import{M as e,S as t}from"./init-CLPTtBmC.mjs";import{lstatSync as n,statSync as r}from"node:fs";function i(i){let a;try{a=n(i).isSymbolicLink()}catch(t){return t.code===`ENOENT`?{kind:`not-present`}:{kind:`declined`,reason:e(t)}}let o=t(i);if(o.readPath===null)return{kind:`declined`,reason:`unresolved-symlink`};try{if(!r(o.readPath).isFile())return{kind:`declined`,reason:`not-a-file`}}catch(t){return{kind:`declined`,reason:a&&t.code===`ENOENT`?`missing-symlink-target`:e(t)}}return{kind:`ready`,path:o.writePath,symlink:a}}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./launch-json-removal-
|
|
1
|
+
import{t as e}from"./launch-json-removal-CDnr39YV.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,severity:`info`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=(n.removeOwnLaunchEntryFn??e)(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,severity:`warn`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`;return s&&i({event:`launch-json-repair-removed`,severity:`info`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ja as e}from"./md-manager-BGnqyqi1-DKflYxqj.mjs";import{$ as t,Y as n,f as r,nt as i,q as a,y as o}from"./init-
|
|
1
|
+
import{ja as e}from"./md-manager-BGnqyqi1-DKflYxqj.mjs";import{$ as t,Y as n,f as r,nt as i,q as a,y as o}from"./init-CLPTtBmC.mjs";import{homedir as s}from"node:os";function c(e){let{priorCommand:t,priorArgs:n}=l(e.priorEntry);return{event:`mcp-config-migrate`,scope:e.scope,surface:e.surface,editorId:e.editorId,configPath:e.configPath,priorCommand:t,priorArgs:n}}function l(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}function u(e){let t=e.logger??m,r=e.home??s(),i=[];if(e.reclaimDisableEnv===`1`)return t({event:`mcp-config-repair-skipped`,severity:`info`,reason:`reclaim-disabled`}),{outcomes:i,repairedCount:0};for(let o of a){let a=n[o],s=d(()=>a.configPath(``,r));if(s!==null&&i.push(f({scope:`user`,editorId:o,target:a,home:r,cwd:``,configPath:s,configPathOverride:void 0,logger:t})),a.projectConfigPath){let n=a.projectConfigPath,r=d(()=>n(e.projectDir));r!==null&&i.push(f({scope:`project`,editorId:o,target:a,home:void 0,cwd:e.projectDir,configPath:r,configPathOverride:r,logger:t}))}}return{outcomes:i,repairedCount:i.filter(e=>e.outcome===`repaired`).length}}function d(e){try{return e()}catch{return null}}function f(n){let a={scope:n.scope,editorId:n.editorId,configPath:n.configPath},s=r(n.target,n.cwd,n.home,n.configPathOverride);if(s===null)return{...a,outcome:`no-entry`};if(n.target.format===`file`){if(i(s))return{...a,outcome:`canonical`}}else{let r=e(s);if(r.kind===`recognized`&&r.disposition===`keep`){let e=t(s,n.target.buildEntry(n.cwd,{}));if(e.length===0)return{...a,outcome:`canonical`};let r=p(n,a,o(n.target,n.cwd,{mode:`published`,skipAvailabilityCheck:!0,pruneOnly:!0},n.home,n.configPathOverride));return(r.outcome===`repaired`||r.outcome===`canonical`)&&n.logger({event:r.outcome===`repaired`?`mcp-config-repair-pruned`:`mcp-config-repair-prune-unchanged`,severity:r.outcome===`repaired`?`info`:`warn`,scope:n.scope,editorId:n.editorId,configPath:n.configPath,keys:e}),r.outcome===`canonical`?{...a,outcome:`prune-unchanged`}:r}if(r.kind===`declined`&&n.scope===`project`)return n.logger({event:`mcp-config-repair-skipped-foreign`,severity:`info`,scope:n.scope,editorId:n.editorId,configPath:n.configPath,reason:r.reason}),{...a,outcome:`foreign`,reason:r.reason}}return n.logger({...c({scope:n.scope,surface:`cli-repair`,editorId:n.editorId,configPath:n.configPath,priorEntry:s}),severity:`info`}),p(n,a,o(n.target,n.cwd,{mode:`published`,skipAvailabilityCheck:!0},n.home,n.configPathOverride))}function p(e,t,n){if(n.action===`failed`){let r=n.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,severity:`warn`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:r}),{...t,outcome:`write-failed`,error:r}}return n.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,severity:`warn`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:n.declineReason}),{...t,outcome:`declined`,reason:n.declineReason}):n.action===`skipped-flag`?{...t,outcome:`canonical`}:{...t,outcome:`repaired`}}function m(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as n,u as repairMcpConfigs,c as t};
|