@neuralnomads/codenomad-dev 0.12.3-dev-20260327-0dc5867f → 0.13.1-dev-20260328-1b4eff94
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/opencode-config/package.json +1 -1
- package/package.json +1 -1
- package/public/assets/{ChangesTab-Cv6uUHXq.js → ChangesTab-DdswQ3Ok.js} +2 -2
- package/public/assets/{DiffToolbar-B2DpsMyv.js → DiffToolbar-Yldqxvj8.js} +1 -1
- package/public/assets/{FilesTab-Cqcle9-p.js → FilesTab-7agluNpw.js} +2 -2
- package/public/assets/{GitChangesTab-CTGmDrEk.js → GitChangesTab-BZ5PaHzK.js} +2 -2
- package/public/assets/{SplitFilePanel-C-PYfc9E.js → SplitFilePanel-DbTPpm8n.js} +1 -1
- package/public/assets/{StatusTab-BCjJ1Rol.js → StatusTab-CKBp3O9-.js} +1 -1
- package/public/assets/{bundle-full-B3_LQwd9.js → bundle-full-UinVq7HP.js} +1 -1
- package/public/assets/{diff-viewer-DKzXnQ60.js → diff-viewer-D9gxUZHP.js} +1 -1
- package/public/assets/{index-BVDzZGqc.js → index-0Gk1-9Cd.js} +1 -1
- package/public/assets/{index-B0Gw4iLI.js → index-BEO8r15M.js} +1 -1
- package/public/assets/{index-DLerCWdY.js → index-BH7b9sVx.js} +1 -1
- package/public/assets/{index-DwZDftuW.js → index-CHPcUby9.js} +2 -2
- package/public/assets/{index-8oCNPnPq.js → index-CdoHjzfy.js} +1 -1
- package/public/assets/{index-CQWAxVpU.js → index-Cjpfqqyq.js} +1 -1
- package/public/assets/{index-CIoOszCr.js → index-D7Ta2Qha.js} +1 -1
- package/public/assets/{index-BRGJlxmW.js → index-DxTSRG2o.js} +1 -1
- package/public/assets/index-ENvu-xYE.css +1 -0
- package/public/assets/{index-CvIGqlDH.js → index-YR_aK97-.js} +1 -1
- package/public/assets/{loading-BsizLkuJ.js → loading-D8mHQfQ7.js} +1 -1
- package/public/assets/main-DnH_qzWG.js +56 -0
- package/public/assets/{markdown-kkR-vHDQ.js → markdown-pqPmydDQ.js} +3 -3
- package/public/assets/{monaco-viewer-DF7Ts1Ni.js → monaco-viewer-BSBw02bx.js} +1 -1
- package/public/assets/{todo-B68SyWtp.js → todo-BbZMcvOc.js} +1 -1
- package/public/assets/{tool-call-bt0dmmrt.js → tool-call-BBzW7Hvr.js} +3 -3
- package/public/assets/{unified-picker-HUUdWVpv.js → unified-picker-DcafxZRV.js} +1 -1
- package/public/index.html +4 -4
- package/public/loading.html +4 -4
- package/public/sw.js +1 -1
- package/public/ui-version.json +1 -1
- package/public/assets/index-Da6yiD1l.css +0 -1
- package/public/assets/main-CeeRTcLq.js +0 -55
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-
|
|
2
|
-
import{_ as K}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-BSBw02bx.js","assets/git-diff-vendor-CAv-4upN.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as K}from"./index-CHPcUby9.js";import{m as B,t as g,i as a,d as w,a as F,f as N}from"./monaco-viewer-BSBw02bx.js";import{c as f,n as c,a as L,F as T,S as W,z as j,A as q}from"./git-diff-vendor-CAv-4upN.js";import{D as G}from"./DiffToolbar-Yldqxvj8.js";import{S as H}from"./SplitFilePanel-DbTPpm8n.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-DnH_qzWG.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),E=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),R=g("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-"),U=g("<span class=files-tab-selected-path><span class=file-path-text>"),X=g('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Y=g("<div style=margin-left:auto>");const Z=q(()=>K(()=>import("./monaco-viewer-BSBw02bx.js").then(e=>e.aa),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),de=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),y=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),I=f(()=>y().reduce((n,i)=>(n.additions+=typeof i.additions=="number"?i.additions:0,n.deletions+=typeof i.deletions=="number"?i.deletions:0,n),{additions:0,deletions:0})),O=f(()=>{const n=y();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,m=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+m,k=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=k+t;return r>x?l:r<x?i:String(l.file||"").localeCompare(String((i==null?void 0:i.file)||""))<0?l:i},n[0])}),P=f(()=>{const n=e.selectedFile(),i=y();if(n){const l=i.find(v=>v.file===n);if(l)return l}return O()}),p=f(()=>`${e.instanceId}:${S()?M():"no-session"}`),V=f(()=>{if(!S())return e.t("instanceShell.sessionChanges.noSessionSelected");const n=D();return n===void 0?e.t("instanceShell.sessionChanges.loading"):!Array.isArray(n)||n.length===0?e.t("instanceShell.sessionChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty")}),A=f(()=>{const n=P();return n!=null&&n.file?String(n.file):e.t("instanceShell.rightPanel.tabs.changes")});return B(()=>{const n=y(),i=I(),l=P(),v=()=>(()=>{var t=J(),r=t.firstChild;return a(r,c(W,{get when(){return l&&S()&&n.length>0?l:null},get fallback(){return(()=>{var o=E(),s=o.firstChild;return a(s,V),o})()},children:o=>c(j,{get fallback(){return(()=>{var s=E(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return p()},get path(){return String(o().file||"")},get before(){return String(o().before||"")},get after(){return String(o().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),m=()=>(()=>{var t=Q();return a(t,V),t})();return c(H,{get header(){return[(()=>{var t=U(),r=t.firstChild;return a(r,A),L(()=>w(t,"title",A())),t})(),(()=>{var t=X(),r=t.firstChild,o=r.firstChild;o.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(o,()=>i.additions,null),a(u,()=>i.deletions,null),t})(),(()=>{var t=Y();return a(t,c(G,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})),t})()]},list:{panel:()=>c(W,{get when(){return n.length>0},get fallback(){return m()},get children(){return c(T,{each:n,children:t=>(()=>{var r=R(),o=r.firstChild,s=o.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,e.isPhoneLayout())},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(d=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==d.e&&F(r,d.e=_),$!==d.t&&w(s,"title",d.t=$),d},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return m()},get children(){return c(T,{each:n,children:t=>(()=>{var r=R(),o=r.firstChild,s=o.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,!0)},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(d=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,z=t.file;return _!==d.e&&F(r,d.e=_),$!==d.t&&w(r,"title",d.t=$),z!==d.a&&w(s,"title",d.a=z),d},{e:void 0,t:void 0,a:void 0}),r})()})}})},get viewer(){return v()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.changes")}})})};N(["click"]);export{de as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as $,i as c,m as S,d as n,a as T,f as C}from"./monaco-viewer-
|
|
1
|
+
import{t as $,i as c,m as S,d as n,a as T,f as C}from"./monaco-viewer-BSBw02bx.js";import{u as N}from"./index-CHPcUby9.js";import{n as i,m as h,a as V}from"./git-diff-vendor-CAv-4upN.js";import{I as f,J as U,K as A}from"./main-DnH_qzWG.js";const I=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],J=t=>i(f,h(t,{name:"AlignJustify",iconNode:I})),j=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],D=t=>i(f,h(t,{name:"UnfoldVertical",iconNode:j})),E=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["path",{d:"M3 12h15a3 3 0 1 1 0 6h-4",key:"1cl7v7"}],["polyline",{points:"16 16 14 18 16 20",key:"1jznyi"}],["line",{x1:"3",x2:"10",y1:"18",y2:"18",key:"1h33wv"}]],F=t=>i(f,h(t,{name:"WrapText",iconNode:E}));var H=$("<div class=file-viewer-toolbar><button type=button class=file-viewer-toolbar-icon-button></button><button type=button class=file-viewer-toolbar-icon-button></button><button type=button>");const R=t=>{const{t:o}=N(),s=()=>t.viewMode==="split"?"unified":"split",r=()=>t.contextMode==="collapsed"?"expanded":"collapsed",y=()=>t.wordWrapMode==="on"?"off":"on",v=()=>s()==="split"?o("instanceShell.diff.switchToSplit"):o("instanceShell.diff.switchToUnified"),u=()=>r()==="collapsed"?o("instanceShell.diff.hideUnchanged"):o("instanceShell.diff.showFull"),b=()=>y()==="on"?o("instanceShell.diff.enableWordWrap"):o("instanceShell.diff.disableWordWrap");return(()=>{var x=H(),a=x.firstChild,l=a.nextSibling,d=l.nextSibling;return a.$$click=()=>t.onViewModeChange(s()),c(a,(()=>{var e=S(()=>s()==="split");return()=>e()?i(U,{class:"h-4 w-4","aria-hidden":"true"}):i(J,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(r()),c(l,(()=>{var e=S(()=>r()==="collapsed");return()=>e()?i(A,{class:"h-4 w-4","aria-hidden":"true"}):i(D,{class:"h-4 w-4","aria-hidden":"true"})})()),d.$$click=()=>t.onWordWrapModeChange(y()),c(d,i(F,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=v(),w=v(),k=u(),M=u(),p=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,W=b(),g=b();return m!==e.e&&n(a,"aria-label",e.e=m),w!==e.t&&n(a,"title",e.t=w),k!==e.a&&n(l,"aria-label",e.a=k),M!==e.o&&n(l,"title",e.o=M),p!==e.i&&T(d,e.i=p),W!==e.n&&n(d,"aria-label",e.n=W),g!==e.s&&n(d,"title",e.s=g),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),x})()};C(["click"]);export{R as D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-
|
|
2
|
-
import{_ as E}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-BSBw02bx.js","assets/git-diff-vendor-CAv-4upN.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as E}from"./index-CHPcUby9.js";import{m as y,t as c,i,d as h,a as R,f as k}from"./monaco-viewer-BSBw02bx.js";import{n as s,S as d,a as f,F as z,z as F,A as D}from"./git-diff-vendor-CAv-4upN.js";import{S as I}from"./SplitFilePanel-DbTPpm8n.js";import{R as T}from"./main-DnH_qzWG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";var v=c("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),V=c('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),M=c('<div class="p-3 text-xs text-secondary">'),A=c("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),O=c('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class="text-[10px] text-secondary">'),K=c("<span>"),W=c("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),N=c("<button type=button class=files-header-icon-button style=margin-inline-start:auto>"),j=c("<span class=text-error>");const q=D(()=>E(()=>import("./monaco-viewer-BSBw02bx.js").then(e=>e.ab),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),p=e=>y(()=>{const g=e.browserEntries(),S=[...g||[]].sort((t,r)=>{const n=t.type==="directory"?0:1,l=r.type==="directory"?0:1;return n!==l?n-l:String(t.name||"").localeCompare(String(r.name||""))}),C=e.parentPath(),m=()=>e.browserSelectedPath()||e.browserPath(),L=()=>e.browserLoading()&&g===null?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),P=()=>(()=>{var t=V(),r=t.firstChild;return i(r,s(d,{get when(){return e.browserSelectedLoading()},get fallback(){return s(d,{get when(){return e.browserSelectedError()},get fallback(){return s(d,{get when(){return y(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var n=v(),l=n.firstChild;return i(l,L),n})()},children:n=>s(F,{get fallback(){return(()=>{var l=v(),a=l.firstChild;return i(a,()=>e.t("instanceInfo.loading")),l})()},get children(){return s(q,{get scopeKey(){return e.scopeKey()},get path(){return n().path},get content(){return n().content}})}})})},children:n=>(()=>{var l=v(),a=l.firstChild;return i(a,n),l})()})},get children(){var n=v(),l=n.firstChild;return i(l,()=>e.t("instanceInfo.loading")),n}})),t})(),w=()=>[s(d,{when:C,children:t=>(()=>{var r=A(),n=r.firstChild,l=n.firstChild;return r.$$click=()=>e.onLoadEntries(t()),f(()=>h(l,"title",t())),r})()}),s(d,{get when(){return e.browserLoading()&&g===null},get children(){var t=M();return i(t,()=>e.t("instanceInfo.loading")),t}}),s(z,{each:S,children:t=>(()=>{var r=O(),n=r.firstChild,l=n.firstChild,a=l.firstChild,u=l.nextSibling,x=u.firstChild;return r.$$click=()=>{if(t.type==="directory"){e.onLoadEntries(t.path);return}e.onOpenFile(t.path)},i(a,()=>t.name),i(x,()=>t.type),f(o=>{var _=`file-list-item ${e.browserSelectedPath()===t.path?"file-list-item-active":""}`,$=t.path,b=t.path;return _!==o.e&&R(r,o.e=_),$!==o.t&&h(r,"title",o.t=$),b!==o.a&&h(l,"title",o.a=b),o},{e:void 0,t:void 0,a:void 0}),r})()})];return s(I,{get header(){return[(()=>{var t=W(),r=t.firstChild,n=r.firstChild,l=n.firstChild;return i(l,m),i(t,s(d,{get when(){return e.browserLoading()},get children(){var a=K();return i(a,()=>e.t("instanceInfo.loading")),a}}),null),i(t,s(d,{get when(){return e.browserError()},children:a=>(()=>{var u=j();return i(u,a),u})()}),null),f(()=>h(n,"title",m())),t})(),(()=>{var t=N();return t.$$click=()=>e.onRefresh(),i(t,s(T,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),f(r=>{var n=e.t("instanceShell.rightPanel.actions.refresh"),l=e.t("instanceShell.rightPanel.actions.refresh"),a=e.browserLoading();return n!==r.e&&h(t,"title",r.e=n),l!==r.t&&h(t,"aria-label",r.t=l),a!==r.a&&(t.disabled=r.a=a),r},{e:void 0,t:void 0,a:void 0}),t})()]},list:{panel:w,overlay:w},get viewer(){return P()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.files")}})});k(["click"]);export{p as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-
|
|
2
|
-
import{_ as B}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-BSBw02bx.js","assets/git-diff-vendor-CAv-4upN.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as B}from"./index-CHPcUby9.js";import{m as V,t as h,i as r,d as $,a as D,f as K}from"./monaco-viewer-BSBw02bx.js";import{c as f,n as d,a as w,S as c,F as R,z as G,A as N}from"./git-diff-vendor-CAv-4upN.js";import{D as j}from"./DiffToolbar-Yldqxvj8.js";import{S as q}from"./SplitFilePanel-DbTPpm8n.js";import{R as H}from"./main-DnH_qzWG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";var S=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),J=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),Q=h('<div class="p-3 text-xs text-secondary">'),A=h('<span class="text-[10px] text-secondary">'),z=h("<span class=file-list-item-additions>+"),O=h("<span class=file-list-item-deletions>-"),T=h("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats>"),U=h("<span class=files-tab-selected-path><span class=file-path-text>"),X=h('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Y=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Z=h("<span class=text-error>");const p=N(()=>B(()=>import("./monaco-viewer-BSBw02bx.js").then(e=>e.aa),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),he=e=>{const P=f(()=>e.activeSessionId()),y=f(()=>!!(P()&&P()!=="info")),M=f(()=>y()?e.entries():null),b=f(()=>{const o=M();return Array.isArray(o)?[...o].sort((s,g)=>String(s.path||"").localeCompare(String(g.path||""))):[]}),F=f(()=>b().reduce((o,s)=>(o.additions+=typeof s.added=="number"?s.added:0,o.deletions+=typeof s.removed=="number"?s.removed:0,o),{additions:0,deletions:0})),L=f(()=>b().filter(o=>o&&o.status!=="deleted")),I=f(()=>{const o=b(),s=e.selectedPath(),g=e.mostChangedPath();return(o.find(_=>_.path===s)||(g?o.find(_=>_.path===g):void 0))??null}),W=f(()=>y()?M()===null?e.t("instanceShell.gitChanges.loading"):L().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected"));return V(()=>{const o=F(),s=I(),g=b(),x=L(),_=()=>(()=>{var t=J(),l=t.firstChild;return r(l,d(c,{get when(){return e.selectedLoading()},get fallback(){return d(c,{get when(){return e.selectedError()},get fallback(){return d(c,{get when(){return V(()=>!!(s&&e.selectedBefore()!==null&&e.selectedAfter()!==null&&s.status!=="deleted"))()?{path:s.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=S(),a=i.firstChild;return r(a,W),i})()},children:i=>d(G,{get fallback(){return(()=>{var a=S(),u=a.firstChild;return r(u,()=>e.t("instanceInfo.loading")),a})()},get children(){return d(p,{get scopeKey(){return e.scopeKey()},get path(){return String(i().path||"")},get before(){return String(i().before||"")},get after(){return String(i().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})},children:i=>(()=>{var a=S(),u=a.firstChild;return r(u,i),a})()})},get children(){var i=S(),a=i.firstChild;return r(a,()=>e.t("instanceInfo.loading")),i}})),t})(),k=()=>(()=>{var t=Q();return r(t,W),t})();return d(q,{get header(){return[(()=>{var t=U(),l=t.firstChild;return r(l,()=>(s==null?void 0:s.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),w(()=>$(t,"title",(s==null?void 0:s.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=X(),l=t.firstChild,i=l.firstChild;i.firstChild;var a=l.nextSibling,u=a.firstChild;return u.firstChild,r(i,()=>o.additions,null),r(u,()=>o.deletions,null),r(t,d(c,{get when(){return e.statusError()},children:v=>(()=>{var n=Z();return r(n,v),n})()}),null),t})(),(()=>{var t=Y();return t.$$click=()=>e.onRefresh(),r(t,d(H,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),w(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),a=e.t("instanceShell.rightPanel.actions.refresh"),u=!y()||e.statusLoading()||M()===null;return i!==l.e&&$(t,"title",l.e=i),a!==l.t&&$(t,"aria-label",l.t=a),u!==l.a&&(t.disabled=l.a=u),l},{e:void 0,t:void 0,a:void 0}),t})(),d(j,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:()=>d(c,{get when(){return x.length>0},get fallback(){return k()},get children(){return d(R,{each:g,children:t=>(()=>{var l=T(),i=l.firstChild,a=i.firstChild,u=a.firstChild,v=a.nextSibling;return l.$$click=()=>{e.onOpenFile(t.path)},r(u,()=>t.path),r(v,d(c,{get when(){return t.status==="deleted"},get children(){var n=A();return r(n,()=>e.t("instanceShell.gitChanges.deleted")),n}}),null),r(v,d(c,{get when(){return t.status!=="deleted"},get children(){return[(()=>{var n=z();return n.firstChild,r(n,()=>t.added,null),n})(),(()=>{var n=O();return n.firstChild,r(n,()=>t.removed,null),n})()]}}),null),w(n=>{var C=`file-list-item ${e.selectedPath()===t.path?"file-list-item-active":""}`,m=t.path;return C!==n.e&&D(l,n.e=C),m!==n.t&&$(a,"title",n.t=m),n},{e:void 0,t:void 0}),l})()})}}),overlay:()=>d(c,{get when(){return x.length>0},get fallback(){return k()},get children(){return d(R,{each:g,children:t=>(()=>{var l=T(),i=l.firstChild,a=i.firstChild,u=a.firstChild,v=a.nextSibling;return l.$$click=()=>e.onOpenFile(t.path),r(u,()=>t.path),r(v,d(c,{get when(){return t.status==="deleted"},get children(){var n=A();return r(n,()=>e.t("instanceShell.gitChanges.deleted")),n}}),null),r(v,d(c,{get when(){return t.status!=="deleted"},get children(){return[(()=>{var n=z();return n.firstChild,r(n,()=>t.added,null),n})(),(()=>{var n=O();return n.firstChild,r(n,()=>t.removed,null),n})()]}}),null),w(n=>{var C=`file-list-item ${e.selectedPath()===t.path?"file-list-item-active":""}`,m=t.path,E=t.path;return C!==n.e&&D(l,n.e=C),m!==n.t&&$(l,"title",n.t=m),E!==n.a&&$(a,"title",n.a=E),n},{e:void 0,t:void 0,a:void 0}),l})()})}})},get viewer(){return _()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};K(["click"]);export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d,i as l,d as m,j as s,m as b,g as _,f as w}from"./monaco-viewer-
|
|
1
|
+
import{t as d,i as l,d as m,j as s,m as b,g as _,f as w}from"./monaco-viewer-BSBw02bx.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CAv-4upN.js";import{u as S}from"./index-CHPcUby9.js";var y=d("<div class=file-list-overlay role=dialog><div class=file-list-scroll>");const L=e=>(()=>{var t=y(),a=t.firstChild;return l(a,()=>e.children),g(()=>m(t,"aria-label",e.ariaLabel)),t})();var C=d('<div class=files-split><div class=file-list-panel><div class=file-list-scroll></div></div><div class=file-split-handle role=separator aria-orientation=vertical aria-label="Resize file list">'),x=d("<div class=files-tab-container><div class=files-tab-header><div class=files-tab-header-row><button type=button class=files-toggle-button></button></div></div><div class=files-tab-body>");const z=e=>{const{t}=S();return(()=>{var a=x(),c=a.firstChild,o=c.firstChild,u=o.firstChild,h=c.nextSibling;return s(u,"click",e.onToggleList,!0),l(u,(()=>{var i=b(()=>!!e.listOpen);return()=>i()?t("instanceShell.filesShell.hideFiles"):t("instanceShell.filesShell.showFiles")})()),l(o,()=>e.header,null),l(h,r(n,{get when(){return b(()=>!e.isPhoneLayout)()&&e.listOpen},get fallback(){return e.viewer},get children(){var i=C(),v=i.firstChild,$=v.firstChild,f=v.nextSibling;return l($,()=>e.list.panel()),s(f,"touchstart",e.onResizeTouchStart,!0),s(f,"mousedown",e.onResizeMouseDown,!0),l(i,()=>e.viewer,null),g(O=>_(i,"--files-pane-width",`${e.splitWidth}px`)),i}}),null),l(h,r(n,{get when(){return e.isPhoneLayout},get children(){return r(n,{get when(){return e.listOpen},get children(){return r(L,{get ariaLabel(){return e.overlayAriaLabel},get children(){return e.list.overlay()}})}})}}),null),a})()};w(["click","mousedown","touchstart"]);export{z as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as we,P as Ve,t as M,i as h,a as Xe,d as B,f as Ge}from"./monaco-viewer-DF7Ts1Ni.js";import{n as c,m as P,b as k,o as S,k as Z,l as J,q as re,s as D,d as T,c as H,S as Q,t as Ye,w as xe,a as ge,F as ce}from"./git-diff-vendor-CAv-4upN.js";import{I as pe,N as Qe,O as A,P as se,Q as Ze,T as Je,U as Pe,V as Se,W as Ie,X as et,Y as de,Z as ie,_ as le,$ as Te,a0 as ee,a1 as te,a2 as tt,a3 as fe,a4 as nt,a5 as ot,a6 as _,a7 as he,a8 as st,a9 as it,aa as rt,ab as E,ac as lt,ad as at,ae as Ce,af as ct,ag as ue,ah as dt}from"./main-CeeRTcLq.js";import{u as ut}from"./index-DwZDftuW.js";import{T as gt}from"./todo-B68SyWtp.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const pt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ft=e=>c(pe,P(e,{name:"Info",iconNode:pt})),ht=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],mt=e=>c(pe,P(e,{name:"TerminalSquare",iconNode:ht})),bt=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],vt=e=>c(pe,P(e,{name:"XOctagon",iconNode:bt}));var ke=Z();function yt(){return J(ke)}function xt(){const e=yt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function $e(e,s){return!!(s.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ct(e,s){var n;const l=s.ref();if(!l)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=(n=e[r])==null?void 0:n.ref();if(o&&$e(o,l))return r+1}return 0}function wt(e){const s=e.map((r,n)=>[n,r]);let l=!1;return s.sort(([r,n],[o,t])=>{const i=n.ref(),a=t.ref();return i===a||!i||!a?0:$e(i,a)?(r>o&&(l=!0),-1):(r<o&&(l=!0),1)}),l?s.map(([r,n])=>n):e}function De(e,s){const l=wt(e);e!==l&&s(l)}function Pt(e){var n,o;const s=e[0],l=(n=e[e.length-1])==null?void 0:n.ref();let r=(o=s==null?void 0:s.ref())==null?void 0:o.parentElement;for(;r;){if(l&&r.contains(l))return r;r=r.parentElement}return se(r).body}function St(e,s){k(()=>{const l=setTimeout(()=>{De(e(),s)});S(()=>clearTimeout(l))})}function It(e,s){if(typeof IntersectionObserver!="function"){St(e,s);return}let l=[];k(()=>{const r=()=>{const t=!!l.length;l=e(),t&&De(e(),s)},n=Pt(e()),o=new IntersectionObserver(r,{root:n});for(const t of e()){const i=t.ref();i&&o.observe(i)}S(()=>o.disconnect())})}function Tt(e={}){const[s,l]=Qe({value:()=>Je(e.items),onChange:o=>{var t;return(t=e.onItemsChange)==null?void 0:t.call(e,o)}});It(s,l);const r=o=>(l(t=>{const i=Ct(t,o);return Ze(t,o,i)}),()=>{l(t=>{const i=t.filter(a=>a.ref()!==o.ref());return t.length===i.length?t:i})});return{DomCollectionProvider:o=>c(ke.Provider,{value:{registerItem:r},get children(){return o.children}})}}function kt(e){const s=xt(),l=A({shouldRegisterItem:!0},e);k(()=>{if(!l.shouldRegisterItem)return;const r=s.registerItem(l.getItem());S(r)})}var $t={};he($t,{Arrow:()=>Pe,Content:()=>_e,Portal:()=>Ee,Root:()=>Me,Tooltip:()=>Y,Trigger:()=>Ae,useTooltipContext:()=>ae});var Oe=Z();function ae(){const e=J(Oe);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function _e(e){const s=ae(),l=A({id:s.generateId("content")},e),[r,n]=D(l,["ref","style"]);return k(()=>S(s.registerContentId(n.id))),c(Q,{get when(){return s.contentPresent()},get children(){return c(Te.Positioner,{get children(){return c(tt,P({ref(o){var t=ee(i=>{s.setContentRef(i)},r.ref);typeof t=="function"&&t(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return fe({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>s.hideTooltip(!0)},()=>s.dataset(),n))}})}})}function Ee(e){const s=ae();return c(Q,{get when(){return s.contentPresent()},get children(){return c(Ve,e)}})}function Dt(e,s,l){const r=e.split("-")[0],n=s.getBoundingClientRect(),o=l.getBoundingClientRect(),t=[],i=n.left+n.width/2,a=n.top+n.height/2;switch(r){case"top":t.push([n.left,a]),t.push([o.left,o.bottom]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([n.right,a]);break;case"right":t.push([i,n.top]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([o.left,o.bottom]),t.push([i,n.bottom]);break;case"bottom":t.push([n.left,a]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([o.right,o.top]),t.push([n.right,a]);break;case"left":t.push([i,n.top]),t.push([o.right,o.top]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([i,n.bottom]);break}return t}var N={},Ot=0,j=!1,O,G,q;function Me(e){const s=`tooltip-${re()}`,l=`${++Ot}`,r=A({id:s,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[n,o]=D(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let t;const[i,a]=T(),[u,d]=T(),[g,v]=T(),[y,x]=T(o.placement),m=Se({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:b=>{var $;return($=n.onOpenChange)==null?void 0:$.call(n,b)}}),{present:C}=Ie({show:()=>n.forceMount||m.isOpen(),element:()=>g()??null}),p=()=>{N[l]=w},f=()=>{for(const b in N)b!==l&&(N[b](!0),delete N[b])},w=(b=!1)=>{b||n.closeDelay&&n.closeDelay<=0?(window.clearTimeout(t),t=void 0,m.close()):t||(t=window.setTimeout(()=>{t=void 0,m.close()},n.closeDelay)),window.clearTimeout(O),O=void 0,n.skipDelayDuration&&n.skipDelayDuration>=0&&(q=window.setTimeout(()=>{window.clearTimeout(q),q=void 0},n.skipDelayDuration)),j&&(window.clearTimeout(G),G=window.setTimeout(()=>{delete N[l],G=void 0,j=!1},n.closeDelay))},F=()=>{clearTimeout(t),t=void 0,f(),p(),j=!0,m.open(),window.clearTimeout(O),O=void 0,window.clearTimeout(G),G=void 0,window.clearTimeout(q),q=void 0},R=()=>{f(),p(),!m.isOpen()&&!O&&!j?O=window.setTimeout(()=>{O=void 0,j=!0,F()},n.openDelay):m.isOpen()||F()},W=(b=!1)=>{!b&&n.openDelay&&n.openDelay>0&&!t&&!q?R():F()},L=()=>{window.clearTimeout(O),O=void 0,j=!1},U=()=>{window.clearTimeout(t),t=void 0},I=b=>de(u(),b)||de(g(),b),oe=b=>{const $=u(),K=g();if(!(!$||!K))return Dt(b,$,K)},X=b=>{const $=b.target;if(I($)){U();return}if(!n.ignoreSafeArea){const K=oe(y());if(K&&nt(ot(b),K)){U();return}}t||w()};k(()=>{if(!m.isOpen())return;const b=se();b.addEventListener("pointermove",X,!0),S(()=>{b.removeEventListener("pointermove",X,!0)})}),k(()=>{const b=u();if(!b||!m.isOpen())return;const $=qe=>{const ze=qe.target;de(ze,b)&&w(!0)},K=et();K.addEventListener("scroll",$,{capture:!0}),S(()=>{K.removeEventListener("scroll",$,{capture:!0})})}),S(()=>{clearTimeout(t),N[l]&&delete N[l]});const je={dataset:H(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>n.disabled??!1,triggerOnFocusOnly:()=>n.triggerOnFocusOnly??!1,contentId:i,contentPresent:C,openTooltip:W,hideTooltip:w,cancelOpening:L,generateId:le(()=>r.id),registerContentId:ie(a),isTargetOnTooltip:I,setTriggerRef:d,setContentRef:v};return c(Oe.Provider,{value:je,get children(){return c(Te,P({anchorRef:u,contentRef:g,onCurrentPlacementChange:x},o))}})}function Ae(e){let s;const l=ae(),[r,n]=D(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,t=!1,i=!1;const a=()=>{o=!1},u=()=>{!l.isOpen()&&(t||i)&&l.openTooltip(i)},d=p=>{l.isOpen()&&!t&&!i&&l.hideTooltip(p)},g=p=>{_(p,r.onPointerEnter),!(p.pointerType==="touch"||l.triggerOnFocusOnly()||l.isDisabled()||p.defaultPrevented)&&(t=!0,u())},v=p=>{_(p,r.onPointerLeave),p.pointerType!=="touch"&&(t=!1,i=!1,l.isOpen()?d():l.cancelOpening())},y=p=>{_(p,r.onPointerDown),o=!0,se(s).addEventListener("pointerup",a,{once:!0})},x=p=>{_(p,r.onClick),t=!1,i=!1,d(!0)},m=p=>{_(p,r.onFocus),!(l.isDisabled()||p.defaultPrevented||o)&&(i=!0,u())},C=p=>{_(p,r.onBlur);const f=p.relatedTarget;l.isTargetOnTooltip(f)||(t=!1,i=!1,d(!0))};return S(()=>{se(s).removeEventListener("pointerup",a)}),c(te,P({as:"button",ref(p){var f=ee(w=>{l.setTriggerRef(w),s=w},r.ref);typeof f=="function"&&f(p)},get"aria-describedby"(){return we(()=>!!l.isOpen())()?l.contentId():void 0},onPointerEnter:g,onPointerLeave:v,onPointerDown:y,onClick:x,onFocus:m,onBlur:C},()=>l.dataset(),n))}var Y=Object.assign(Me,{Arrow:Pe,Content:_e,Portal:Ee,Trigger:Ae}),_t={};he(_t,{Collapsible:()=>Et,Content:()=>me,Root:()=>be,Trigger:()=>ve,useCollapsibleContext:()=>ne});var Fe=Z();function ne(){const e=J(Fe);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function me(e){const[s,l]=T(),r=ne(),n=A({id:r.generateId("content")},e),[o,t]=D(n,["ref","id","style"]),{present:i}=Ie({show:r.shouldMount,element:()=>s()??null}),[a,u]=T(0),[d,g]=T(0);let y=r.isOpen()||i();return Ye(()=>{const x=requestAnimationFrame(()=>{y=!1});S(()=>{cancelAnimationFrame(x)})}),k(xe(i,()=>{if(!s())return;s().style.transitionDuration="0s",s().style.animationName="none";const x=s().getBoundingClientRect();u(x.height),g(x.width),y||(s().style.transitionDuration="",s().style.animationName="")})),k(xe(r.isOpen,x=>{!x&&s()&&(s().style.transitionDuration="",s().style.animationName="")},{defer:!0})),k(()=>S(r.registerContentId(o.id))),c(Q,{get when(){return i()},get children(){return c(te,P({as:"div",ref(x){var m=ee(l,o.ref);typeof m=="function"&&m(x)},get id(){return o.id},get style(){return fe({"--kb-collapsible-content-height":a()?`${a()}px`:void 0,"--kb-collapsible-content-width":d()?`${d()}px`:void 0},o.style)}},()=>r.dataset(),t))}})}function be(e){const s=`collapsible-${re()}`,l=A({id:s},e),[r,n]=D(l,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,t]=T(),i=Se({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:d=>{var g;return(g=r.onOpenChange)==null?void 0:g.call(r,d)}}),a=H(()=>({"data-expanded":i.isOpen()?"":void 0,"data-closed":i.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),u={dataset:a,isOpen:i.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||i.isOpen(),contentId:o,toggle:i.toggle,generateId:le(()=>n.id),registerContentId:ie(t)};return c(Fe.Provider,{value:u,get children(){return c(te,P({as:"div"},a,n))}})}function ve(e){const s=ne(),[l,r]=D(e,["onClick"]);return c(st,P({get"aria-expanded"(){return s.isOpen()},get"aria-controls"(){return we(()=>!!s.isOpen())()?s.contentId():void 0},get disabled(){return s.disabled()},onClick:o=>{_(o,l.onClick),s.toggle()}},()=>s.dataset(),r))}var Et=Object.assign(be,{Content:me,Trigger:ve}),V={};he(V,{Accordion:()=>Mt,Content:()=>Be,Header:()=>Le,Item:()=>Ne,Root:()=>He,Trigger:()=>We,useAccordionContext:()=>ye});var Re=Z();function Ke(){const e=J(Re);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function Be(e){const s=Ke(),l=s.generateId("content"),r=A({id:l},e),[n,o]=D(r,["id","style"]);return k(()=>S(s.registerContentId(n.id))),c(me,P({role:"region",get"aria-labelledby"(){return s.triggerId()},get style(){return fe({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},n.style)}},o))}function Le(e){const s=ne();return c(te,P({as:"h3"},()=>s.dataset(),e))}var Ue=Z();function ye(){const e=J(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ne(e){const s=ye(),l=`${s.generateId("item")}-${re()}`,r=A({id:l},e),[n,o]=D(r,["value","disabled"]),[t,i]=T(),[a,u]=T(),d=()=>s.listState().selectionManager(),g=()=>d().isSelected(n.value),v={value:()=>n.value,triggerId:t,contentId:a,generateId:le(()=>o.id),registerTriggerId:ie(i),registerContentId:ie(u)};return c(Re.Provider,{value:v,get children(){return c(be,P({get open(){return g()},get disabled(){return n.disabled}},o))}})}function He(e){let s;const l=`accordion-${re()}`,r=A({id:l,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[n,o]=D(r,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[t,i]=T([]),{DomCollectionProvider:a}=Tt({items:t,onItemsChange:i}),u=it({selectedKeys:()=>n.value,defaultSelectedKeys:()=>n.defaultValue,onSelectionChange:v=>{var y;return(y=n.onChange)==null?void 0:y.call(n,Array.from(v))},disallowEmptySelection:()=>!n.multiple&&!n.collapsible,selectionMode:()=>n.multiple?"multiple":"single",dataSource:t});u.selectionManager().setFocusedKey("item-1");const d=rt({selectionManager:()=>u.selectionManager(),collection:()=>u.collection(),disallowEmptySelection:()=>u.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>n.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>s),g={listState:()=>u,generateId:le(()=>n.id)};return c(a,{get children(){return c(Ue.Provider,{value:g,get children(){return c(te,P({as:"div",get id(){return n.id},ref(v){var y=ee(x=>s=x,n.ref);typeof y=="function"&&y(v)},get onKeyDown(){return E([n.onKeyDown,d.onKeyDown])},get onMouseDown(){return E([n.onMouseDown,d.onMouseDown])},get onFocusIn(){return E([n.onFocusIn])},get onFocusOut(){return E([n.onFocusOut,d.onFocusOut])}},o))}})}})}function We(e){let s;const l=ye(),r=Ke(),n=ne(),o=r.generateId("trigger"),t=A({id:o},e),[i,a]=D(t,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);kt({getItem:()=>({ref:()=>s,type:"item",key:r.value(),textValue:"",disabled:n.disabled()})});const u=lt({key:()=>r.value(),selectionManager:()=>l.listState().selectionManager(),disabled:()=>n.disabled(),shouldSelectOnPressUp:!0},()=>s),d=g=>{["Enter"," "].includes(g.key)&&g.preventDefault(),_(g,i.onKeyDown),_(g,u.onKeyDown)};return k(()=>S(r.registerTriggerId(a.id))),c(ve,P({ref(g){var v=ee(y=>s=y,i.ref);typeof v=="function"&&v(g)},get"data-key"(){return u.dataKey()},get onPointerDown(){return E([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return E([i.onPointerUp,u.onPointerUp])},get onClick(){return E([i.onClick,u.onClick])},onKeyDown:d,get onMouseDown(){return E([i.onMouseDown,u.onMouseDown])},get onFocus(){return E([i.onFocus,u.onFocus])}},a))}var Mt=Object.assign(He,{Content:Be,Header:Le,Item:Ne,Trigger:We}),At=M('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const Ft=e=>{const{t:s}=ut(),l=H(()=>at(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),r=H(()=>l().inputTokens??0),n=H(()=>l().outputTokens??0),o=H(()=>{const i=l().isSubscriptionModel?0:l().cost;return i>0?i:0}),t=H(()=>`$${o().toFixed(2)}`);return(()=>{var i=At(),a=i.firstChild,u=a.firstChild,d=u.firstChild,g=d.nextSibling,v=u.nextSibling,y=v.firstChild,x=y.nextSibling,m=v.nextSibling,C=m.firstChild,p=C.nextSibling;return h(d,()=>s("contextUsagePanel.labels.input")),h(g,()=>Ce(r())),h(y,()=>s("contextUsagePanel.labels.output")),h(x,()=>Ce(n())),h(C,()=>s("contextUsagePanel.labels.cost")),h(p,t),ge(()=>Xe(i,`session-context-panel px-4 py-2 ${e.class??""}`)),i})()};var z=M('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),Rt=M('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Kt=M('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Bt=M('<div class="flex flex-col gap-2">'),Lt=M("<span>"),Ut=M('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),Nt=M("<div class=status-tab-container>"),Ht=M("<span class=section-left><span class=section-label>");const Qt=e=>{const s=t=>e.expandedItems().includes(t),o=[{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),d})();const i=e.activeSessionDiffs();if(i===void 0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.loading")),d})();if(!Array.isArray(i)||i.length===0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.empty")),d})();const a=[...i].sort((d,g)=>String(d.file||"").localeCompare(String(g.file||""))),u=a.reduce((d,g)=>(d.additions+=typeof g.additions=="number"?g.additions:0,d.deletions+=typeof g.deletions=="number"?g.deletions:0,d),{additions:0,deletions:0});return(()=>{var d=Rt(),g=d.firstChild,v=g.firstChild,y=v.nextSibling,x=y.firstChild,m=x.nextSibling,C=g.nextSibling,p=C.firstChild;return h(v,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),h(x,()=>`+${u.additions}`),h(m,()=>`-${u.deletions}`),h(p,c(ce,{each:a,children:f=>(()=>{var w=Kt(),F=w.firstChild,R=F.firstChild,W=R.nextSibling,L=W.firstChild,U=L.nextSibling;return w.$$click=()=>e.onOpenChangesTab(f.file),h(R,()=>f.file),h(L,()=>`+${f.additions}`),h(U,()=>`-${f.deletions}`),ge(I=>{var oe=e.t("instanceShell.sessionChanges.actions.show"),X=f.file;return oe!==I.e&&B(w,"title",I.e=oe),X!==I.t&&B(R,"title",I.t=X),I},{e:void 0,t:void 0}),w})()})),d})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const i=e.latestTodoState();return i?c(gt,{state:i,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const t=e.backgroundProcessList();return t.length===0?(()=>{var i=z(),a=i.firstChild;return h(a,()=>e.t("instanceShell.backgroundProcesses.empty")),i})():(()=>{var i=Bt();return h(i,c(ce,{each:t,children:a=>(()=>{var u=Ut(),d=u.firstChild,g=d.firstChild,v=g.nextSibling,y=v.firstChild,x=d.nextSibling,m=x.firstChild,C=m.nextSibling,p=C.nextSibling;return h(g,()=>a.title),h(y,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),h(v,c(Q,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var f=Lt();return h(f,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),f}}),null),m.$$click=()=>e.onOpenBackgroundOutput(a),h(m,c(mt,{class:"h-4 w-4"})),C.$$click=()=>e.onStopBackgroundProcess(a.id),h(C,c(vt,{class:"h-4 w-4"})),p.$$click=()=>e.onTerminateBackgroundProcess(a.id),h(p,c(dt,{class:"h-4 w-4"})),ge(f=>{var w=e.t("instanceShell.backgroundProcesses.actions.output"),F=e.t("instanceShell.backgroundProcesses.actions.output"),R=a.status!=="running",W=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),U=e.t("instanceShell.backgroundProcesses.actions.terminate"),I=e.t("instanceShell.backgroundProcesses.actions.terminate");return w!==f.e&&B(m,"aria-label",f.e=w),F!==f.t&&B(m,"title",f.t=F),R!==f.a&&(C.disabled=f.a=R),W!==f.o&&B(C,"aria-label",f.o=W),L!==f.i&&B(C,"title",f.i=L),U!==f.n&&B(p,"aria-label",f.n=U),I!==f.s&&B(p,"title",f.s=I),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),u})()})),i})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var t=Nt();return h(t,c(Q,{get when(){return e.activeSession()},children:i=>c(Ft,{get instanceId(){return e.instanceId},get sessionId(){return i().id},class:"status-tab-context-panel"})}),null),h(t,c(V.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(ce,{each:o,children:i=>c(V.Item,{get value(){return i.id},class:"right-panel-accordion-item",get children(){return[c(V.Header,{get children(){return c(V.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var a=Ht(),u=a.firstChild;return h(a,c(Y,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Y.Trigger,{class:"section-info-trigger",get"aria-label"(){return e.t(i.tooltipKey)},onClick:d=>d.stopPropagation(),get children(){return c(ft,{class:"section-info-icon"})}}),c(Y.Portal,{get children(){return c(Y.Content,{class:"section-info-tooltip",get children(){return e.t(i.tooltipKey)}})}})]}}),u),h(u,()=>e.t(i.labelKey)),a})(),c(ct,{get class(){return`right-panel-accordion-chevron ${s(i.id)?"right-panel-accordion-chevron-expanded":""}`}})]}})}}),c(V.Content,{class:"right-panel-accordion-content",get children(){return i.render()}})]}})})}}),null),t})()};Ge(["click"]);export{Qt as default};
|
|
1
|
+
import{m as we,P as Ve,t as M,i as h,a as Xe,d as B,f as Ge}from"./monaco-viewer-BSBw02bx.js";import{n as c,m as P,b as k,o as S,k as Z,l as J,q as re,s as D,d as T,c as H,S as Q,t as Ye,w as xe,a as ge,F as ce}from"./git-diff-vendor-CAv-4upN.js";import{I as pe,N as Qe,O as A,P as se,Q as Ze,T as Je,U as Pe,V as Se,W as Ie,X as et,Y as de,Z as ie,_ as le,$ as Te,a0 as ee,a1 as te,a2 as tt,a3 as fe,a4 as nt,a5 as ot,a6 as _,a7 as he,a8 as st,a9 as it,aa as rt,ab as E,ac as lt,ad as at,ae as Ce,af as ct,ag as ue,ah as dt}from"./main-DnH_qzWG.js";import{u as ut}from"./index-CHPcUby9.js";import{T as gt}from"./todo-BbZMcvOc.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const pt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ft=e=>c(pe,P(e,{name:"Info",iconNode:pt})),ht=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],mt=e=>c(pe,P(e,{name:"TerminalSquare",iconNode:ht})),bt=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],vt=e=>c(pe,P(e,{name:"XOctagon",iconNode:bt}));var ke=Z();function yt(){return J(ke)}function xt(){const e=yt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function $e(e,s){return!!(s.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ct(e,s){var n;const l=s.ref();if(!l)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=(n=e[r])==null?void 0:n.ref();if(o&&$e(o,l))return r+1}return 0}function wt(e){const s=e.map((r,n)=>[n,r]);let l=!1;return s.sort(([r,n],[o,t])=>{const i=n.ref(),a=t.ref();return i===a||!i||!a?0:$e(i,a)?(r>o&&(l=!0),-1):(r<o&&(l=!0),1)}),l?s.map(([r,n])=>n):e}function De(e,s){const l=wt(e);e!==l&&s(l)}function Pt(e){var n,o;const s=e[0],l=(n=e[e.length-1])==null?void 0:n.ref();let r=(o=s==null?void 0:s.ref())==null?void 0:o.parentElement;for(;r;){if(l&&r.contains(l))return r;r=r.parentElement}return se(r).body}function St(e,s){k(()=>{const l=setTimeout(()=>{De(e(),s)});S(()=>clearTimeout(l))})}function It(e,s){if(typeof IntersectionObserver!="function"){St(e,s);return}let l=[];k(()=>{const r=()=>{const t=!!l.length;l=e(),t&&De(e(),s)},n=Pt(e()),o=new IntersectionObserver(r,{root:n});for(const t of e()){const i=t.ref();i&&o.observe(i)}S(()=>o.disconnect())})}function Tt(e={}){const[s,l]=Qe({value:()=>Je(e.items),onChange:o=>{var t;return(t=e.onItemsChange)==null?void 0:t.call(e,o)}});It(s,l);const r=o=>(l(t=>{const i=Ct(t,o);return Ze(t,o,i)}),()=>{l(t=>{const i=t.filter(a=>a.ref()!==o.ref());return t.length===i.length?t:i})});return{DomCollectionProvider:o=>c(ke.Provider,{value:{registerItem:r},get children(){return o.children}})}}function kt(e){const s=xt(),l=A({shouldRegisterItem:!0},e);k(()=>{if(!l.shouldRegisterItem)return;const r=s.registerItem(l.getItem());S(r)})}var $t={};he($t,{Arrow:()=>Pe,Content:()=>_e,Portal:()=>Ee,Root:()=>Me,Tooltip:()=>Y,Trigger:()=>Ae,useTooltipContext:()=>ae});var Oe=Z();function ae(){const e=J(Oe);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function _e(e){const s=ae(),l=A({id:s.generateId("content")},e),[r,n]=D(l,["ref","style"]);return k(()=>S(s.registerContentId(n.id))),c(Q,{get when(){return s.contentPresent()},get children(){return c(Te.Positioner,{get children(){return c(tt,P({ref(o){var t=ee(i=>{s.setContentRef(i)},r.ref);typeof t=="function"&&t(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return fe({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>s.hideTooltip(!0)},()=>s.dataset(),n))}})}})}function Ee(e){const s=ae();return c(Q,{get when(){return s.contentPresent()},get children(){return c(Ve,e)}})}function Dt(e,s,l){const r=e.split("-")[0],n=s.getBoundingClientRect(),o=l.getBoundingClientRect(),t=[],i=n.left+n.width/2,a=n.top+n.height/2;switch(r){case"top":t.push([n.left,a]),t.push([o.left,o.bottom]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([n.right,a]);break;case"right":t.push([i,n.top]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([o.left,o.bottom]),t.push([i,n.bottom]);break;case"bottom":t.push([n.left,a]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([o.right,o.top]),t.push([n.right,a]);break;case"left":t.push([i,n.top]),t.push([o.right,o.top]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([i,n.bottom]);break}return t}var N={},Ot=0,j=!1,O,G,q;function Me(e){const s=`tooltip-${re()}`,l=`${++Ot}`,r=A({id:s,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[n,o]=D(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let t;const[i,a]=T(),[u,d]=T(),[g,v]=T(),[y,x]=T(o.placement),m=Se({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:b=>{var $;return($=n.onOpenChange)==null?void 0:$.call(n,b)}}),{present:C}=Ie({show:()=>n.forceMount||m.isOpen(),element:()=>g()??null}),p=()=>{N[l]=w},f=()=>{for(const b in N)b!==l&&(N[b](!0),delete N[b])},w=(b=!1)=>{b||n.closeDelay&&n.closeDelay<=0?(window.clearTimeout(t),t=void 0,m.close()):t||(t=window.setTimeout(()=>{t=void 0,m.close()},n.closeDelay)),window.clearTimeout(O),O=void 0,n.skipDelayDuration&&n.skipDelayDuration>=0&&(q=window.setTimeout(()=>{window.clearTimeout(q),q=void 0},n.skipDelayDuration)),j&&(window.clearTimeout(G),G=window.setTimeout(()=>{delete N[l],G=void 0,j=!1},n.closeDelay))},F=()=>{clearTimeout(t),t=void 0,f(),p(),j=!0,m.open(),window.clearTimeout(O),O=void 0,window.clearTimeout(G),G=void 0,window.clearTimeout(q),q=void 0},R=()=>{f(),p(),!m.isOpen()&&!O&&!j?O=window.setTimeout(()=>{O=void 0,j=!0,F()},n.openDelay):m.isOpen()||F()},W=(b=!1)=>{!b&&n.openDelay&&n.openDelay>0&&!t&&!q?R():F()},L=()=>{window.clearTimeout(O),O=void 0,j=!1},U=()=>{window.clearTimeout(t),t=void 0},I=b=>de(u(),b)||de(g(),b),oe=b=>{const $=u(),K=g();if(!(!$||!K))return Dt(b,$,K)},X=b=>{const $=b.target;if(I($)){U();return}if(!n.ignoreSafeArea){const K=oe(y());if(K&&nt(ot(b),K)){U();return}}t||w()};k(()=>{if(!m.isOpen())return;const b=se();b.addEventListener("pointermove",X,!0),S(()=>{b.removeEventListener("pointermove",X,!0)})}),k(()=>{const b=u();if(!b||!m.isOpen())return;const $=qe=>{const ze=qe.target;de(ze,b)&&w(!0)},K=et();K.addEventListener("scroll",$,{capture:!0}),S(()=>{K.removeEventListener("scroll",$,{capture:!0})})}),S(()=>{clearTimeout(t),N[l]&&delete N[l]});const je={dataset:H(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>n.disabled??!1,triggerOnFocusOnly:()=>n.triggerOnFocusOnly??!1,contentId:i,contentPresent:C,openTooltip:W,hideTooltip:w,cancelOpening:L,generateId:le(()=>r.id),registerContentId:ie(a),isTargetOnTooltip:I,setTriggerRef:d,setContentRef:v};return c(Oe.Provider,{value:je,get children(){return c(Te,P({anchorRef:u,contentRef:g,onCurrentPlacementChange:x},o))}})}function Ae(e){let s;const l=ae(),[r,n]=D(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,t=!1,i=!1;const a=()=>{o=!1},u=()=>{!l.isOpen()&&(t||i)&&l.openTooltip(i)},d=p=>{l.isOpen()&&!t&&!i&&l.hideTooltip(p)},g=p=>{_(p,r.onPointerEnter),!(p.pointerType==="touch"||l.triggerOnFocusOnly()||l.isDisabled()||p.defaultPrevented)&&(t=!0,u())},v=p=>{_(p,r.onPointerLeave),p.pointerType!=="touch"&&(t=!1,i=!1,l.isOpen()?d():l.cancelOpening())},y=p=>{_(p,r.onPointerDown),o=!0,se(s).addEventListener("pointerup",a,{once:!0})},x=p=>{_(p,r.onClick),t=!1,i=!1,d(!0)},m=p=>{_(p,r.onFocus),!(l.isDisabled()||p.defaultPrevented||o)&&(i=!0,u())},C=p=>{_(p,r.onBlur);const f=p.relatedTarget;l.isTargetOnTooltip(f)||(t=!1,i=!1,d(!0))};return S(()=>{se(s).removeEventListener("pointerup",a)}),c(te,P({as:"button",ref(p){var f=ee(w=>{l.setTriggerRef(w),s=w},r.ref);typeof f=="function"&&f(p)},get"aria-describedby"(){return we(()=>!!l.isOpen())()?l.contentId():void 0},onPointerEnter:g,onPointerLeave:v,onPointerDown:y,onClick:x,onFocus:m,onBlur:C},()=>l.dataset(),n))}var Y=Object.assign(Me,{Arrow:Pe,Content:_e,Portal:Ee,Trigger:Ae}),_t={};he(_t,{Collapsible:()=>Et,Content:()=>me,Root:()=>be,Trigger:()=>ve,useCollapsibleContext:()=>ne});var Fe=Z();function ne(){const e=J(Fe);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function me(e){const[s,l]=T(),r=ne(),n=A({id:r.generateId("content")},e),[o,t]=D(n,["ref","id","style"]),{present:i}=Ie({show:r.shouldMount,element:()=>s()??null}),[a,u]=T(0),[d,g]=T(0);let y=r.isOpen()||i();return Ye(()=>{const x=requestAnimationFrame(()=>{y=!1});S(()=>{cancelAnimationFrame(x)})}),k(xe(i,()=>{if(!s())return;s().style.transitionDuration="0s",s().style.animationName="none";const x=s().getBoundingClientRect();u(x.height),g(x.width),y||(s().style.transitionDuration="",s().style.animationName="")})),k(xe(r.isOpen,x=>{!x&&s()&&(s().style.transitionDuration="",s().style.animationName="")},{defer:!0})),k(()=>S(r.registerContentId(o.id))),c(Q,{get when(){return i()},get children(){return c(te,P({as:"div",ref(x){var m=ee(l,o.ref);typeof m=="function"&&m(x)},get id(){return o.id},get style(){return fe({"--kb-collapsible-content-height":a()?`${a()}px`:void 0,"--kb-collapsible-content-width":d()?`${d()}px`:void 0},o.style)}},()=>r.dataset(),t))}})}function be(e){const s=`collapsible-${re()}`,l=A({id:s},e),[r,n]=D(l,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,t]=T(),i=Se({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:d=>{var g;return(g=r.onOpenChange)==null?void 0:g.call(r,d)}}),a=H(()=>({"data-expanded":i.isOpen()?"":void 0,"data-closed":i.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),u={dataset:a,isOpen:i.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||i.isOpen(),contentId:o,toggle:i.toggle,generateId:le(()=>n.id),registerContentId:ie(t)};return c(Fe.Provider,{value:u,get children(){return c(te,P({as:"div"},a,n))}})}function ve(e){const s=ne(),[l,r]=D(e,["onClick"]);return c(st,P({get"aria-expanded"(){return s.isOpen()},get"aria-controls"(){return we(()=>!!s.isOpen())()?s.contentId():void 0},get disabled(){return s.disabled()},onClick:o=>{_(o,l.onClick),s.toggle()}},()=>s.dataset(),r))}var Et=Object.assign(be,{Content:me,Trigger:ve}),V={};he(V,{Accordion:()=>Mt,Content:()=>Be,Header:()=>Le,Item:()=>Ne,Root:()=>He,Trigger:()=>We,useAccordionContext:()=>ye});var Re=Z();function Ke(){const e=J(Re);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function Be(e){const s=Ke(),l=s.generateId("content"),r=A({id:l},e),[n,o]=D(r,["id","style"]);return k(()=>S(s.registerContentId(n.id))),c(me,P({role:"region",get"aria-labelledby"(){return s.triggerId()},get style(){return fe({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},n.style)}},o))}function Le(e){const s=ne();return c(te,P({as:"h3"},()=>s.dataset(),e))}var Ue=Z();function ye(){const e=J(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ne(e){const s=ye(),l=`${s.generateId("item")}-${re()}`,r=A({id:l},e),[n,o]=D(r,["value","disabled"]),[t,i]=T(),[a,u]=T(),d=()=>s.listState().selectionManager(),g=()=>d().isSelected(n.value),v={value:()=>n.value,triggerId:t,contentId:a,generateId:le(()=>o.id),registerTriggerId:ie(i),registerContentId:ie(u)};return c(Re.Provider,{value:v,get children(){return c(be,P({get open(){return g()},get disabled(){return n.disabled}},o))}})}function He(e){let s;const l=`accordion-${re()}`,r=A({id:l,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[n,o]=D(r,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[t,i]=T([]),{DomCollectionProvider:a}=Tt({items:t,onItemsChange:i}),u=it({selectedKeys:()=>n.value,defaultSelectedKeys:()=>n.defaultValue,onSelectionChange:v=>{var y;return(y=n.onChange)==null?void 0:y.call(n,Array.from(v))},disallowEmptySelection:()=>!n.multiple&&!n.collapsible,selectionMode:()=>n.multiple?"multiple":"single",dataSource:t});u.selectionManager().setFocusedKey("item-1");const d=rt({selectionManager:()=>u.selectionManager(),collection:()=>u.collection(),disallowEmptySelection:()=>u.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>n.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>s),g={listState:()=>u,generateId:le(()=>n.id)};return c(a,{get children(){return c(Ue.Provider,{value:g,get children(){return c(te,P({as:"div",get id(){return n.id},ref(v){var y=ee(x=>s=x,n.ref);typeof y=="function"&&y(v)},get onKeyDown(){return E([n.onKeyDown,d.onKeyDown])},get onMouseDown(){return E([n.onMouseDown,d.onMouseDown])},get onFocusIn(){return E([n.onFocusIn])},get onFocusOut(){return E([n.onFocusOut,d.onFocusOut])}},o))}})}})}function We(e){let s;const l=ye(),r=Ke(),n=ne(),o=r.generateId("trigger"),t=A({id:o},e),[i,a]=D(t,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);kt({getItem:()=>({ref:()=>s,type:"item",key:r.value(),textValue:"",disabled:n.disabled()})});const u=lt({key:()=>r.value(),selectionManager:()=>l.listState().selectionManager(),disabled:()=>n.disabled(),shouldSelectOnPressUp:!0},()=>s),d=g=>{["Enter"," "].includes(g.key)&&g.preventDefault(),_(g,i.onKeyDown),_(g,u.onKeyDown)};return k(()=>S(r.registerTriggerId(a.id))),c(ve,P({ref(g){var v=ee(y=>s=y,i.ref);typeof v=="function"&&v(g)},get"data-key"(){return u.dataKey()},get onPointerDown(){return E([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return E([i.onPointerUp,u.onPointerUp])},get onClick(){return E([i.onClick,u.onClick])},onKeyDown:d,get onMouseDown(){return E([i.onMouseDown,u.onMouseDown])},get onFocus(){return E([i.onFocus,u.onFocus])}},a))}var Mt=Object.assign(He,{Content:Be,Header:Le,Item:Ne,Trigger:We}),At=M('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const Ft=e=>{const{t:s}=ut(),l=H(()=>at(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),r=H(()=>l().inputTokens??0),n=H(()=>l().outputTokens??0),o=H(()=>{const i=l().isSubscriptionModel?0:l().cost;return i>0?i:0}),t=H(()=>`$${o().toFixed(2)}`);return(()=>{var i=At(),a=i.firstChild,u=a.firstChild,d=u.firstChild,g=d.nextSibling,v=u.nextSibling,y=v.firstChild,x=y.nextSibling,m=v.nextSibling,C=m.firstChild,p=C.nextSibling;return h(d,()=>s("contextUsagePanel.labels.input")),h(g,()=>Ce(r())),h(y,()=>s("contextUsagePanel.labels.output")),h(x,()=>Ce(n())),h(C,()=>s("contextUsagePanel.labels.cost")),h(p,t),ge(()=>Xe(i,`session-context-panel px-4 py-2 ${e.class??""}`)),i})()};var z=M('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),Rt=M('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Kt=M('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Bt=M('<div class="flex flex-col gap-2">'),Lt=M("<span>"),Ut=M('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),Nt=M("<div class=status-tab-container>"),Ht=M("<span class=section-left><span class=section-label>");const Qt=e=>{const s=t=>e.expandedItems().includes(t),o=[{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),d})();const i=e.activeSessionDiffs();if(i===void 0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.loading")),d})();if(!Array.isArray(i)||i.length===0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.empty")),d})();const a=[...i].sort((d,g)=>String(d.file||"").localeCompare(String(g.file||""))),u=a.reduce((d,g)=>(d.additions+=typeof g.additions=="number"?g.additions:0,d.deletions+=typeof g.deletions=="number"?g.deletions:0,d),{additions:0,deletions:0});return(()=>{var d=Rt(),g=d.firstChild,v=g.firstChild,y=v.nextSibling,x=y.firstChild,m=x.nextSibling,C=g.nextSibling,p=C.firstChild;return h(v,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),h(x,()=>`+${u.additions}`),h(m,()=>`-${u.deletions}`),h(p,c(ce,{each:a,children:f=>(()=>{var w=Kt(),F=w.firstChild,R=F.firstChild,W=R.nextSibling,L=W.firstChild,U=L.nextSibling;return w.$$click=()=>e.onOpenChangesTab(f.file),h(R,()=>f.file),h(L,()=>`+${f.additions}`),h(U,()=>`-${f.deletions}`),ge(I=>{var oe=e.t("instanceShell.sessionChanges.actions.show"),X=f.file;return oe!==I.e&&B(w,"title",I.e=oe),X!==I.t&&B(R,"title",I.t=X),I},{e:void 0,t:void 0}),w})()})),d})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const i=e.latestTodoState();return i?c(gt,{state:i,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const t=e.backgroundProcessList();return t.length===0?(()=>{var i=z(),a=i.firstChild;return h(a,()=>e.t("instanceShell.backgroundProcesses.empty")),i})():(()=>{var i=Bt();return h(i,c(ce,{each:t,children:a=>(()=>{var u=Ut(),d=u.firstChild,g=d.firstChild,v=g.nextSibling,y=v.firstChild,x=d.nextSibling,m=x.firstChild,C=m.nextSibling,p=C.nextSibling;return h(g,()=>a.title),h(y,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),h(v,c(Q,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var f=Lt();return h(f,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),f}}),null),m.$$click=()=>e.onOpenBackgroundOutput(a),h(m,c(mt,{class:"h-4 w-4"})),C.$$click=()=>e.onStopBackgroundProcess(a.id),h(C,c(vt,{class:"h-4 w-4"})),p.$$click=()=>e.onTerminateBackgroundProcess(a.id),h(p,c(dt,{class:"h-4 w-4"})),ge(f=>{var w=e.t("instanceShell.backgroundProcesses.actions.output"),F=e.t("instanceShell.backgroundProcesses.actions.output"),R=a.status!=="running",W=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),U=e.t("instanceShell.backgroundProcesses.actions.terminate"),I=e.t("instanceShell.backgroundProcesses.actions.terminate");return w!==f.e&&B(m,"aria-label",f.e=w),F!==f.t&&B(m,"title",f.t=F),R!==f.a&&(C.disabled=f.a=R),W!==f.o&&B(C,"aria-label",f.o=W),L!==f.i&&B(C,"title",f.i=L),U!==f.n&&B(p,"aria-label",f.n=U),I!==f.s&&B(p,"title",f.s=I),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),u})()})),i})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var t=Nt();return h(t,c(Q,{get when(){return e.activeSession()},children:i=>c(Ft,{get instanceId(){return e.instanceId},get sessionId(){return i().id},class:"status-tab-context-panel"})}),null),h(t,c(V.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(ce,{each:o,children:i=>c(V.Item,{get value(){return i.id},class:"right-panel-accordion-item",get children(){return[c(V.Header,{get children(){return c(V.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var a=Ht(),u=a.firstChild;return h(a,c(Y,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Y.Trigger,{class:"section-info-trigger",get"aria-label"(){return e.t(i.tooltipKey)},onClick:d=>d.stopPropagation(),get children(){return c(ft,{class:"section-info-icon"})}}),c(Y.Portal,{get children(){return c(Y.Content,{class:"section-info-tooltip",get children(){return e.t(i.tooltipKey)}})}})]}}),u),h(u,()=>e.t(i.labelKey)),a})(),c(ct,{get class(){return`right-panel-accordion-chevron ${s(i.id)?"right-panel-accordion-chevron-expanded":""}`}})]}})}}),c(V.Content,{class:"right-panel-accordion-content",get children(){return i.render()}})]}})})}}),null),t})()};Ge(["click"]);export{Qt as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BUKiar2Z.js","assets/tex-Cppo0RY3.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-WgofotgN.js","assets/csharp-CX12Zw3r.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-CCoi5OLL.js","assets/vue-html-DAAvJJDi.js","assets/vue-vine-_Ih-lPRR.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./index-DwZDftuW.js";import"./git-diff-vendor-CAv-4upN.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-DF7Ts1Ni.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",t[o+1]="",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="",t[o+1]="G",n[o+1]="",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
|
|
2
|
+
var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./index-CHPcUby9.js";import"./git-diff-vendor-CAv-4upN.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-BSBw02bx.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",t[o+1]="",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="",t[o+1]="G",n[o+1]="",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
|
|
3
3
|
`)}findNextMatchSync(r,e,t){const n=this.scanner.findNextMatchSync(r,e,t);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Ge=class{constructor(r,e){this.languageId=r,this.tokenType=e}},W,Zn=(W=class{constructor(e,t){f(this,"_defaultAttributes");f(this,"_embeddedLanguagesMatcher");f(this,"_getBasicScopeAttributes",new $t(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Ge(t,n)}));this._defaultAttributes=new Ge(e,8),this._embeddedLanguagesMatcher=new er(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?W._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(W.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},f(W,"_NULL_SCOPE_METADATA",new Ge(0,0)),f(W,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),W),er=class{constructor(r){f(this,"values");f(this,"scopesRegExp");if(r.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(r);const e=r.map(([t,n])=>jt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(r){if(!this.scopesRegExp)return;const e=r.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Et=class{constructor(r,e){this.stack=r,this.stoppedEarly=e}};function Yt(r,e,t,n,i,o,s,c){const a=e.content.length;let u=!1,m=-1;if(s){const p=tr(r,e,t,n,i,o);i=p.stack,n=p.linePos,t=p.isFirstLine,m=p.anchorPosition}const d=Date.now();for(;!u;){if(c!==0&&Date.now()-d>c)return new Et(i,!0);h()}return new Et(i,!1);function h(){const p=nr(r,e,t,n,i,m);if(!p){o.produce(i,a),u=!0;return}const _=p.captureIndices,b=p.matchedRuleId,v=_&&_.length>0?_[0].end>n:!1;if(b===Jn){const y=i.getRule(r);o.produce(i,_[0].start),i=i.withContentNameScopesList(i.nameScopesList),re(r,e,t,i,o,y.endCaptures,_),o.produce(i,_[0].end);const E=i;if(i=i.parent,m=E.getAnchorPos(),!v&&E.getEnterPos()===n){i=E,o.produce(i,a),u=!0;return}}else{const y=r.getRule(b);o.produce(i,_[0].start);const E=i,R=y.getName(e.content,_),A=i.contentNameScopesList.pushAttributed(R,r);if(i=i.push(b,n,m,_[0].end===a,null,A,A),y instanceof Ke){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.endHasBackReferences&&(i=i.withEndRule(L.getEndWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(y instanceof Ae){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.whileHasBackReferences&&(i=i.withEndRule(L.getWhileWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(re(r,e,t,i,o,y.captures,_),o.produce(i,_[0].end),i=i.pop(),!v){i=i.safePop(),o.produce(i,a),u=!0;return}}_[0].end>n&&(n=_[0].end,t=!1)}}function tr(r,e,t,n,i,o){let s=i.beginRuleCapturedEOL?0:-1;const c=[];for(let a=i;a;a=a.pop()){const u=a.getRule(r);u instanceof Ae&&c.push({rule:u,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:u,findOptions:m}=or(a.rule,r,a.stack.endRule,t,n===s),d=u.findNextMatchSync(e,n,m);if(d){if(d.ruleId!==zt){i=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),re(r,e,t,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,t=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:t}}function nr(r,e,t,n,i,o){const s=rr(r,e,t,n,i,o),c=r.getInjections();if(c.length===0)return s;const a=ir(c,r,e,t,n,i,o);if(!a)return s;if(!s)return a;const u=s.captureIndices[0].start,m=a.captureIndices[0].start;return m<u||a.priorityMatch&&m===u?a:s}function rr(r,e,t,n,i,o){const s=i.getRule(r),{ruleScanner:c,findOptions:a}=Jt(s,r,i.endRule,t,n===o),u=c.findNextMatchSync(e,n,a);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function ir(r,e,t,n,i,o,s){let c=Number.MAX_VALUE,a=null,u,m=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,p=r.length;h<p;h++){const _=r[h];if(!_.matcher(d))continue;const b=e.getRule(_.ruleId),{ruleScanner:v,findOptions:y}=Jt(b,e,null,n,i===s),E=v.findNextMatchSync(t,i,y);if(!E)continue;const R=E.captureIndices[0].start;if(!(R>=c)&&(c=R,a=E.captureIndices,u=E.ruleId,m=_.priority,c===i))break}return a?{priorityMatch:m===-1,captureIndices:a,matchedRuleId:u}:null}function Jt(r,e,t,n,i){return{ruleScanner:r.compileAG(e,t,n,i),findOptions:0}}function or(r,e,t,n,i){return{ruleScanner:r.compileWhileAG(e,t,n,i),findOptions:0}}function re(r,e,t,n,i,o,s){if(o.length===0)return;const c=e.content,a=Math.min(o.length,s.length),u=[],m=s[0].end;for(let d=0;d<a;d++){const h=o[d];if(h===null)continue;const p=s[d];if(p.length===0)continue;if(p.start>m)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,p.start):i.produce(n,p.start),h.retokenizeCapturedWithRuleId){const b=h.getName(c,s),v=n.contentNameScopesList.pushAttributed(b,r),y=h.getContentName(c,s),E=v.pushAttributed(y,r),R=n.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,v,E),A=r.createOnigString(c.substring(0,p.end));Yt(r,A,t&&p.start===0,p.start,R,i,!1,0),Wt(A);continue}const _=h.getName(c,s);if(_!==null){const v=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(_,r);u.push(new sr(v,p.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var sr=class{constructor(r,e){f(this,"scopes");f(this,"endPos");this.scopes=r,this.endPos=e}};function ar(r,e,t,n,i,o,s,c){return new cr(r,e,t,n,i,o,s,c)}function vt(r,e,t,n,i){const o=Re(e,Se),s=qt.getCompiledRuleId(t,n,i.repository);for(const c of o)r.push({debugSelector:e,matcher:c.matcher,ruleId:s,grammar:i,priority:c.priority})}function Se(r,e){if(e.length<r.length)return!1;let t=0;return r.every(n=>{for(let i=t;i<e.length;i++)if(lr(e[i],n))return t=i+1,!0;return!1})}function lr(r,e){if(!r)return!1;if(r===e)return!0;const t=e.length;return r.length>t&&r.substr(0,t)===e&&r[t]==="."}var cr=class{constructor(r,e,t,n,i,o,s,c){f(this,"_rootId");f(this,"_lastRuleId");f(this,"_ruleId2desc");f(this,"_includedGrammars");f(this,"_grammarRepository");f(this,"_grammar");f(this,"_injections");f(this,"_basicScopeAttributesProvider");f(this,"_tokenTypeMatchers");if(this._rootScopeName=r,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new Zn(t,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=bt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const u=Re(a,Se);for(const m of u)this._tokenTypeMatchers.push({matcher:m.matcher,type:i[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const r of this._ruleId2desc)r&&r.dispose()}createOnigScanner(r){return this._onigLib.createOnigScanner(r)}createOnigString(r){return this._onigLib.createOnigString(r)}getMetadataForScope(r){return this._basicScopeAttributesProvider.getBasicScopeAttributes(r)}_collectInjections(){const r={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],t=this._rootScopeName,n=r.lookup(t);if(n){const i=n.injections;if(i)for(let s in i)vt(e,s,i[s],this,n);const o=this._grammarRepository.injections(t);o&&o.forEach(s=>{const c=this.getExternalGrammar(s);if(c){const a=c.injectionSelector;a&&vt(e,a,c,this,c)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(r){const e=++this._lastRuleId,t=r(e);return this._ruleId2desc[e]=t,t}getRule(r){return this._ruleId2desc[r]}getExternalGrammar(r,e){if(this._includedGrammars[r])return this._includedGrammars[r];if(this._grammarRepository){const t=this._grammarRepository.lookup(r);if(t)return this._includedGrammars[r]=bt(t,e&&e.$base),this._includedGrammars[r]}}tokenizeLine(r,e,t=0){const n=this._tokenize(r,e,!1,t);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(r,e,t=0){const n=this._tokenize(r,e,!0,t);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(r,e,t,n){this._rootId===-1&&(this._rootId=qt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Ye.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),d=Q.set(0,u.languageId,u.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=ie.createRootAndLookUpScopeName(h,d,this):p=ie.createRoot("unknown",d),e=new Ye(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();r=r+`
|
|
4
4
|
`;const o=this.createOnigString(r),s=o.content.length,c=new dr(t,r,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Yt(this,o,i,0,e,c,!0,n);return Wt(o),{lineLength:s,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function bt(r,e){return r=kn(r),r.repository=r.repository||{},r.repository.$self={$vscodeTextmateLocation:r.$vscodeTextmateLocation,patterns:r.patterns,name:r.scopeName},r.repository.$base=e||r.repository.$self,r}var ie=class j{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(e,t){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const o of t)i=Be.push(i,o.scopeNames),n=new j(n,i,o.encodedTokenAttributes);return n}static createRoot(e,t){return new j(null,new Be(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const i=n.getMetadataForScope(e),o=new Be(null,e),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(t,i,s);return new j(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return j.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let i=-1,o=0,s=0;return n!==null&&(i=n.fontStyle,o=n.foregroundId,s=n.backgroundId),Q.set(e,t.languageId,t.tokenType,null,i,o,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return j._pushAttributed(this,e,t);const n=e.split(/ /g);let i=this;for(const o of n)i=j._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,n){const i=n.getMetadataForScope(t),o=e.scopePath.push(t),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(e.tokenAttributes,i,s);return new j(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?t.reverse():void 0}},G,Ye=(G=class{constructor(e,t,n,i,o,s,c,a){f(this,"_stackElementBrand");f(this,"_enterPos");f(this,"_anchorPos");f(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:G._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ie.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){G._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,i,o,s,c){return new G(this,e,t,n,i,o,s,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var n,i;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new G(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const n=ie.fromExtension((e==null?void 0:e.nameScopesList)??null,t.nameScopesList);return new G(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,ie.fromExtension(n,t.contentNameScopesList))}},f(G,"NULL",new G(null,0,0,0,!1,null,null,null)),G),ur=class{constructor(r,e){f(this,"balancedBracketScopes");f(this,"unbalancedBracketScopes");f(this,"allowAny",!1);this.balancedBracketScopes=r.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Re(t,Se).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Re(t,Se).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(r){for(const e of this.unbalancedBracketScopes)if(e(r))return!1;for(const e of this.balancedBracketScopes)if(e(r))return!0;return this.allowAny}},dr=class{constructor(r,e,t,n){f(this,"_emitBinaryTokens");f(this,"_lineText");f(this,"_tokens");f(this,"_binaryTokens");f(this,"_lastTokenEndIndex");f(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=r,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(r,e){this.produceFromScopes(r.contentNameScopesList,e)}produceFromScopes(r,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(r==null?void 0:r.tokenAttributes)??0,o=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(r==null?void 0:r.getScopeNames())??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(i=Q.set(i,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=Q.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const t=(r==null?void 0:r.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(r,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(r,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)t[n]=this._binaryTokens[n];return t}},mr=class{constructor(r,e){f(this,"_grammars",new Map);f(this,"_rawGrammars",new Map);f(this,"_injectionGrammars",new Map);f(this,"_theme");this._onigLib=e,this._theme=r}dispose(){for(const r of this._grammars.values())r.dispose()}setTheme(r){this._theme=r}getColorMap(){return this._theme.getColorMap()}addGrammar(r,e){this._rawGrammars.set(r.scopeName,r),e&&this._injectionGrammars.set(r.scopeName,e)}lookup(r){return this._rawGrammars.get(r)}injections(r){return this._injectionGrammars.get(r)}getDefaults(){return this._theme.getDefaults()}themeMatch(r){return this._theme.match(r)}grammarForScopeName(r,e,t,n,i){if(!this._grammars.has(r)){let o=this._rawGrammars.get(r);if(!o)return null;this._grammars.set(r,ar(r,o,e,t,n,i,this,this._onigLib))}return this._grammars.get(r)}},hr=class{constructor(e){f(this,"_options");f(this,"_syncRegistry");f(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new mr(be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(be.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ur(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,i,o){const s=new Un(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(c=>this._loadSingleGrammar(c.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,t=0,n=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,i,o)}},Je=Ye.NULL;const pr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class me{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}me.prototype.normal={};me.prototype.property={};me.prototype.space=void 0;function Xt(r,e){const t={},n={};for(const i of r)Object.assign(t,i.property),Object.assign(n,i.normal);return new me(t,n,e)}function Xe(r){return r.toLowerCase()}class V{constructor(e,t){this.attribute=t,this.property=e}}V.prototype.attribute="";V.prototype.booleanish=!1;V.prototype.boolean=!1;V.prototype.commaOrSpaceSeparated=!1;V.prototype.commaSeparated=!1;V.prototype.defined=!1;V.prototype.mustUseProperty=!1;V.prototype.number=!1;V.prototype.overloadedBoolean=!1;V.prototype.property="";V.prototype.spaceSeparated=!1;V.prototype.space=void 0;let fr=0;const T=q(),P=q(),Qe=q(),g=q(),S=q(),J=q(),M=q();function q(){return 2**++fr}const Ze=Object.freeze(Object.defineProperty({__proto__:null,boolean:T,booleanish:P,commaOrSpaceSeparated:M,commaSeparated:J,number:g,overloadedBoolean:Qe,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),je=Object.keys(Ze);class rt extends V{constructor(e,t,n,i){let o=-1;if(super(e,t),Rt(this,"space",i),typeof n=="number")for(;++o<je.length;){const s=je[o];Rt(this,je[o],(n&Ze[s])===Ze[s])}}}rt.prototype.defined=!0;function Rt(r,e,t){t&&(r[e]=t)}function Z(r){const e={},t={};for(const[n,i]of Object.entries(r.properties)){const o=new rt(n,r.transform(r.attributes||{},n),i,r.space);r.mustUseProperty&&r.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[Xe(n)]=n,t[Xe(o.attribute)]=n}return new me(e,t,r.space)}const Qt=Z({properties:{ariaActiveDescendant:null,ariaAtomic:P,ariaAutoComplete:null,ariaBusy:P,ariaChecked:P,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:P,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:P,ariaFlowTo:S,ariaGrabbed:P,ariaHasPopup:null,ariaHidden:P,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:g,ariaLive:null,ariaModal:P,ariaMultiLine:P,ariaMultiSelectable:P,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:P,ariaReadOnly:P,ariaRelevant:null,ariaRequired:P,ariaRoleDescription:S,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:P,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(r,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Zt(r,e){return e in r?r[e]:e}function en(r,e){return Zt(r,e.toLowerCase())}const _r=Z({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:J,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:S,autoFocus:T,autoPlay:T,blocking:S,capture:null,charSet:null,checked:T,cite:null,className:S,cols:g,colSpan:null,content:null,contentEditable:P,controls:T,controlsList:S,coords:g|J,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:Qe,draggable:P,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:S,height:g,hidden:Qe,high:g,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:S,itemRef:S,itemScope:T,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:T,optimum:g,pattern:null,ping:S,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:S,required:T,reversed:T,rows:g,rowSpan:g,sandbox:S,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:P,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:P,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:S,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:P,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:en}),gr=Z({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:S,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:J,g2:J,glyphName:J,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:S,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zt}),tn=Z({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(r,e){return"xlink:"+e.slice(5).toLowerCase()}}),nn=Z({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:en}),rn=Z({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(r,e){return"xml:"+e.slice(3).toLowerCase()}}),yr=/[A-Z]/g,Tt=/-[a-z]/g,Er=/^data[-\w.:]+$/i;function vr(r,e){const t=Xe(e);let n=e,i=V;if(t in r.normal)return r.property[r.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Er.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Tt,Rr);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Tt.test(o)){let s=o.replace(yr,br);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=rt}return new i(n,e)}function br(r){return"-"+r.toLowerCase()}function Rr(r){return r.charAt(1).toUpperCase()}const Tr=Xt([Qt,_r,tn,nn,rn],"html"),on=Xt([Qt,gr,tn,nn,rn],"svg"),At={}.hasOwnProperty;function Ar(r,e){const t=e||{};function n(i,...o){let s=n.invalid;const c=n.handlers;if(i&&At.call(i,r)){const a=String(i[r]);s=At.call(c,a)?c[a]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}const Sr=/["&'<>`]/g,Lr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Pr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,kr=/[|\\{}()[\]^$+*?.]/g,St=new WeakMap;function Ir(r,e){if(r=r.replace(e.subset?wr(e.subset):Sr,n),e.subset||e.escapeOnly)return r;return r.replace(Lr,t).replace(Pr,n);function t(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function n(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function wr(r){let e=St.get(r);return e||(e=Or(r),St.set(r,e)),e}function Or(r){const e=[];let t=-1;for(;++t<r.length;)e.push(r[t].replace(kr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Cr=/[\dA-Fa-f]/;function Dr(r,e,t){const n="&#x"+r.toString(16).toUpperCase();return t&&e&&!Cr.test(String.fromCharCode(e))?n:n+";"}const Nr=/\d/;function xr(r,e,t){const n="&#"+String(r);return t&&e&&!Nr.test(String.fromCharCode(e))?n:n+";"}const Vr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],$e={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Mr=["cent","copy","divide","gt","lt","not","para","times"],sn={}.hasOwnProperty,et={};let fe;for(fe in $e)sn.call($e,fe)&&(et[$e[fe]]=fe);const Br=/[^\dA-Za-z]/;function Gr(r,e,t,n){const i=String.fromCharCode(r);if(sn.call(et,i)){const o=et[i],s="&"+o;return t&&Vr.includes(o)&&!Mr.includes(o)&&(!n||e&&e!==61&&Br.test(String.fromCharCode(e)))?s:s+";"}return""}function jr(r,e,t){let n=Dr(r,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=Gr(r,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=xr(r,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return i&&(!t.useShortestReferences||i.length<n.length)?i:n}function X(r,e){return Ir(r,Object.assign({format:jr},e))}const $r=/^>|^->|<!--|-->|--!>|<!-$/g,Ur=[">"],Hr=["<",">"];function Wr(r,e,t,n){return n.settings.bogusComments?"<?"+X(r.value,Object.assign({},n.settings.characterReferences,{subset:Ur}))+">":"<!--"+r.value.replace($r,i)+"-->";function i(o){return X(o,Object.assign({},n.settings.characterReferences,{subset:Hr}))}}function Fr(r,e,t,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function Lt(r,e){const t=String(r);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=t.indexOf(e);for(;i!==-1;)n++,i=t.indexOf(e,i+e.length);return n}function zr(r,e){const t=e||{};return(r[r.length-1]===""?[...r,""]:r).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function qr(r){return r.join(" ").trim()}const Kr=/[ \t\n\f\r]/g;function it(r){return typeof r=="object"?r.type==="text"?Pt(r.value):!1:Pt(r)}function Pt(r){return r.replace(Kr,"")===""}const w=ln(1),an=ln(-1),Yr=[];function ln(r){return e;function e(t,n,i){const o=t?t.children:Yr;let s=(n||0)+r,c=o[s];if(!i)for(;c&&it(c);)s+=r,c=o[s];return c}}const Jr={}.hasOwnProperty;function cn(r){return e;function e(t,n,i){return Jr.call(r,t.tagName)&&r[t.tagName](t,n,i)}}const ot=cn({body:Qr,caption:Ue,colgroup:Ue,dd:ni,dt:ti,head:Ue,html:Xr,li:ei,optgroup:ri,option:ii,p:Zr,rp:kt,rt:kt,tbody:si,td:It,tfoot:ai,th:It,thead:oi,tr:li});function Ue(r,e,t){const n=w(t,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&it(n.value.charAt(0)))}function Xr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Qr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Zr(r,e,t){const n=w(t,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ei(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="li"}function ti(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ni(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function kt(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function ri(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ii(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function oi(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function si(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function ai(r,e,t){return!w(t,e)}function li(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="tr"}function It(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const ci=cn({body:mi,colgroup:hi,head:di,html:ui,tbody:pi});function ui(r){const e=w(r,-1);return!e||e.type!=="comment"}function di(r){const e=new Set;for(const n of r.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const t=r.children[0];return!t||t.type==="element"}function mi(r){const e=w(r,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&it(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function hi(r,e,t){const n=an(t,e),i=w(r,-1,!0);return t&&n&&n.type==="element"&&n.tagName==="colgroup"&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function pi(r,e,t){const n=an(t,e),i=w(r,-1);return t&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const _e={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as c,i as l,m as x,k as T,u as k}from"./monaco-viewer-
|
|
1
|
+
import{t as c,i as l,m as x,k as T,u as k}from"./monaco-viewer-BSBw02bx.js";import{c as h,b as _,n as d,a as y,S as g,E,D as H,C as s,G as C}from"./git-diff-vendor-CAv-4upN.js";import{aj as V,ak as b,al as D}from"./main-DnH_qzWG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-CHPcUby9.js";var w=c("<div>"),F=c("<div class=tool-call-diff-viewer>"),$=c("<pre class=tool-call-diff-fallback>");const L=T("session");C();function j(e){const m=h(()=>{const n=V(e.diffText);if(!n)return null;const t=b(e.filePath)||"text",a=e.filePath||"diff";return{oldFile:{fileName:a,fileLang:t},newFile:{fileName:a,fileLang:t},hunks:[n]}});let i,u;const v=h(()=>m()?`${e.theme}|${e.mode}|${e.diffText}`:"");return _(()=>{var a;if(e.cachedHtml){(a=e.onRendered)==null||a.call(e);return}const t=v();t&&i&&u!==t&&requestAnimationFrame(()=>{var f;if(!i)return;const r=i.innerHTML;r&&(u=t,e.cacheEntryParams&&D(e.cacheEntryParams,{text:e.diffText,html:r,theme:e.theme,mode:e.mode}),(f=e.onRendered)==null||f.call(e))})}),(()=>{var n=F();return l(n,d(g,{get when(){return e.cachedHtml},get fallback(){return(()=>{var t=w(),a=i;return typeof a=="function"?k(a,t):i=t,l(t,d(g,{get when(){return m()},get fallback(){return(()=>{var r=$();return l(r,()=>e.diffText),r})()},children:r=>d(E,{fallback:f=>(L.warn("Failed to render diff view",f),(()=>{var o=$();return l(o,()=>e.diffText),o})()),get children(){return d(H,{get data(){return r()},get diffViewMode(){return x(()=>e.mode==="split")()?s.Split:s.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,diffViewWrap:!1,diffViewFontSize:13})}})})),t})()},get children(){var t=w();return y(()=>t.innerHTML=e.cachedHtml),t}})),n})()}export{j as ToolCallDiffViewer};
|