@neuralnomads/codenomad 0.13.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/manager.js +5 -1
- package/dist/background-processes/manager.js +164 -25
- package/dist/cli-upgrade.js +53 -0
- package/dist/cli-upgrade.test.js +31 -0
- package/dist/config/schema.js +1 -0
- package/dist/events/bus.js +4 -0
- package/dist/filesystem/browser.js +15 -1
- package/dist/index.js +79 -11
- package/dist/opencode-config/package-lock.json +380 -0
- package/dist/opencode-config/package.json +2 -2
- package/dist/opencode-config/plugin/lib/background-process.ts +14 -2
- package/dist/plugins/voice-mode.js +2 -1
- package/dist/server/__tests__/network-addresses.test.js +68 -0
- package/dist/server/__tests__/remote-proxy.test.js +204 -0
- package/dist/server/http-server.js +292 -47
- package/dist/server/network-addresses.js +43 -1
- package/dist/server/remote-proxy.js +466 -0
- package/dist/server/routes/background-processes.js +19 -1
- package/dist/server/routes/meta.js +0 -3
- package/dist/server/routes/plugin.js +5 -1
- package/dist/server/routes/remote-proxy.js +42 -0
- package/dist/server/routes/remote-servers.js +142 -0
- package/dist/server/routes/settings.js +1 -1
- package/dist/server/routes/sidecars.js +46 -0
- package/dist/server/routes/workspaces.js +118 -0
- package/dist/settings/migrate.js +5 -0
- package/dist/settings/service.js +64 -4
- package/dist/sidecars/manager.js +193 -0
- package/dist/workspaces/__tests__/git-worktrees.test.js +43 -0
- package/dist/workspaces/__tests__/spawn.test.js +140 -0
- package/dist/workspaces/git-mutations.js +98 -0
- package/dist/workspaces/git-status.js +323 -0
- package/dist/workspaces/git-worktrees.js +18 -1
- package/dist/workspaces/manager.js +11 -4
- package/dist/workspaces/opencode-auth.js +18 -0
- package/dist/workspaces/opencode-auth.test.js +34 -0
- package/dist/workspaces/runtime.js +56 -78
- package/dist/workspaces/spawn.js +219 -0
- package/dist/workspaces/worktree-directory.js +74 -0
- package/package.json +1 -1
- package/public/assets/ChangesTab-ovdqLHc3.js +2 -0
- package/public/assets/DiffToolbar-B12EfXMX.js +1 -0
- package/public/assets/FilesTab-nb_itEXG.js +2 -0
- package/public/assets/GitChangesTab-DcT_4BL2.js +2 -0
- package/public/assets/{SplitFilePanel-DwrJM7GQ.js → SplitFilePanel-BOHH3F--.js} +1 -1
- package/public/assets/StatusTab-Dyt_EG33.js +1 -0
- package/public/assets/align-justify-9zpyaAdy.js +1 -0
- package/public/assets/{bundle-full-JwmTIwMd.js → bundle-full-xFW13Lny.js} +1 -1
- package/public/assets/diff-viewer-xG9yjpN8.js +1 -0
- package/public/assets/git-diff-vendor-CSgooKT_.js +52 -0
- package/public/assets/index-7DpT014-.js +1 -0
- package/public/assets/index-BDK4V9L0.js +1 -0
- package/public/assets/index-Bx-Bezt2.js +1 -0
- package/public/assets/index-CCAZZY0l.js +1 -0
- package/public/assets/index-CEcZq5WB.js +1 -0
- package/public/assets/index-CQCmSDHL.js +1 -0
- package/public/assets/{index-CkYwnPl7.js → index-Cz_fl8aY.js} +1 -1
- package/public/assets/index-Dcgftm1m.css +1 -0
- package/public/assets/index-m4C3yx3J.js +1 -0
- package/public/assets/index-mh_z9p40.js +2 -0
- package/public/assets/{loading-CfqkoCbA.js → loading-HUhLEgb_.js} +1 -1
- package/public/assets/main-CKhfaeKI.js +48 -0
- package/public/assets/{markdown-D2uUJada.js → markdown-BeXU9Z-x.js} +22 -22
- package/public/assets/monaco-viewer-BgP6xpZ6.js +26 -0
- package/public/assets/{todo-i3zWdksA.js → todo-D6PVVp_f.js} +1 -1
- package/public/assets/tool-call-Dgn3NlA8.js +60 -0
- package/public/assets/unified-picker-DuNuUpLy.js +1 -0
- package/public/assets/wrap-text-zghCl6wN.js +1 -0
- package/public/index.html +5 -5
- package/public/loading.html +5 -5
- package/public/sw.js +1 -1
- package/public/ui-version.json +1 -1
- package/public/assets/ChangesTab-X8IIoIdB.js +0 -2
- package/public/assets/DiffToolbar-Djg0ksr_.js +0 -1
- package/public/assets/FilesTab-BpYPA_Zr.js +0 -2
- package/public/assets/GitChangesTab-DeGsV8--.js +0 -2
- package/public/assets/StatusTab-mT1B3wST.js +0 -1
- package/public/assets/diff-viewer-CKnTxbWB.js +0 -1
- package/public/assets/git-diff-vendor-CAv-4upN.js +0 -52
- package/public/assets/index-BEzx5r3P.css +0 -1
- package/public/assets/index-BHjkPi4D.js +0 -1
- package/public/assets/index-CUkIenrg.js +0 -1
- package/public/assets/index-D9RMxxcS.js +0 -1
- package/public/assets/index-DiFfJ0HM.js +0 -1
- package/public/assets/index-LmDdmmJP.js +0 -1
- package/public/assets/index-UaIyK67v.js +0 -1
- package/public/assets/index-lhjxIgwf.js +0 -2
- package/public/assets/index-xsUu1uOf.js +0 -1
- package/public/assets/main-B3yZBpaS.js +0 -56
- package/public/assets/monaco-viewer-UU9TfOpS.js +0 -15
- package/public/assets/tool-call-Bl3Lai68.js +0 -60
- package/public/assets/unified-picker-B506AoQt.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-UU9TfOpS.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-lhjxIgwf.js";import{m as V,t as h,i as r,d as $,a as D,f as K}from"./monaco-viewer-UU9TfOpS.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-Djg0ksr_.js";import{S as q}from"./SplitFilePanel-DwrJM7GQ.js";import{R as H}from"./main-B3yZBpaS.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-UU9TfOpS.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 +0,0 @@
|
|
|
1
|
-
import{m as Se,P as Xe,t as O,i as h,a as Ye,d as L,f as Ge}from"./monaco-viewer-UU9TfOpS.js";import{n as d,m as S,b as $,o as P,k as J,l as ee,q as re,s as _,d as T,c as j,S as Z,t as Qe,w as Ce,a as pe,F as de}from"./git-diff-vendor-CAv-4upN.js";import{I as fe,N as Ze,O as F,P as se,Q as Je,T as et,U as Pe,V as Ie,W as Te,X as tt,Y as ue,Z as ie,_ as le,$ as $e,a0 as te,a1 as ne,a2 as nt,a3 as he,a4 as ot,a5 as st,a6 as E,a7 as me,a8 as it,a9 as rt,aa as lt,ab as A,ac as at,ad as ct,ae as we,af as dt,ag as ge,ah as ut,ai as gt,aj as pt,ak as ft}from"./main-B3yZBpaS.js";import{u as ht}from"./index-lhjxIgwf.js";import{T as mt}from"./todo-i3zWdksA.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const bt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],vt=e=>d(fe,S(e,{name:"Info",iconNode:bt})),yt=[["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"}]],xt=e=>d(fe,S(e,{name:"TerminalSquare",iconNode:yt})),Ct=[["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"}]],wt=e=>d(fe,S(e,{name:"XOctagon",iconNode:Ct}));var ke=J();function St(){return ee(ke)}function Pt(){const e=St();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function De(e,o){return!!(o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function It(e,o){var t;const l=o.ref();if(!l)return-1;let r=e.length;if(!r)return-1;for(;r--;){const n=(t=e[r])==null?void 0:t.ref();if(n&&De(n,l))return r+1}return 0}function Tt(e){const o=e.map((r,t)=>[t,r]);let l=!1;return o.sort(([r,t],[n,s])=>{const i=t.ref(),a=s.ref();return i===a||!i||!a?0:De(i,a)?(r>n&&(l=!0),-1):(r<n&&(l=!0),1)}),l?o.map(([r,t])=>t):e}function Oe(e,o){const l=Tt(e);e!==l&&o(l)}function $t(e){var t,n;const o=e[0],l=(t=e[e.length-1])==null?void 0:t.ref();let r=(n=o==null?void 0:o.ref())==null?void 0:n.parentElement;for(;r;){if(l&&r.contains(l))return r;r=r.parentElement}return se(r).body}function kt(e,o){$(()=>{const l=setTimeout(()=>{Oe(e(),o)});P(()=>clearTimeout(l))})}function Dt(e,o){if(typeof IntersectionObserver!="function"){kt(e,o);return}let l=[];$(()=>{const r=()=>{const s=!!l.length;l=e(),s&&Oe(e(),o)},t=$t(e()),n=new IntersectionObserver(r,{root:t});for(const s of e()){const i=s.ref();i&&n.observe(i)}P(()=>n.disconnect())})}function Ot(e={}){const[o,l]=Ze({value:()=>et(e.items),onChange:n=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,n)}});Dt(o,l);const r=n=>(l(s=>{const i=It(s,n);return Je(s,n,i)}),()=>{l(s=>{const i=s.filter(a=>a.ref()!==n.ref());return s.length===i.length?s:i})});return{DomCollectionProvider:n=>d(ke.Provider,{value:{registerItem:r},get children(){return n.children}})}}function _t(e){const o=Pt(),l=F({shouldRegisterItem:!0},e);$(()=>{if(!l.shouldRegisterItem)return;const r=o.registerItem(l.getItem());P(r)})}var Mt={};me(Mt,{Arrow:()=>Pe,Content:()=>Me,Portal:()=>Ee,Root:()=>Ae,Tooltip:()=>Q,Trigger:()=>Fe,useTooltipContext:()=>ae});var _e=J();function ae(){const e=ee(_e);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Me(e){const o=ae(),l=F({id:o.generateId("content")},e),[r,t]=_(l,["ref","style"]);return $(()=>P(o.registerContentId(t.id))),d(Z,{get when(){return o.contentPresent()},get children(){return d($e.Positioner,{get children(){return d(nt,S({ref(n){var s=te(i=>{o.setContentRef(i)},r.ref);typeof s=="function"&&s(n)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return he({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:n=>n.preventDefault(),onDismiss:()=>o.hideTooltip(!0)},()=>o.dataset(),t))}})}})}function Ee(e){const o=ae();return d(Z,{get when(){return o.contentPresent()},get children(){return d(Xe,e)}})}function Et(e,o,l){const r=e.split("-")[0],t=o.getBoundingClientRect(),n=l.getBoundingClientRect(),s=[],i=t.left+t.width/2,a=t.top+t.height/2;switch(r){case"top":s.push([t.left,a]),s.push([n.left,n.bottom]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([t.right,a]);break;case"right":s.push([i,t.top]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([n.left,n.bottom]),s.push([i,t.bottom]);break;case"bottom":s.push([t.left,a]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([n.right,n.top]),s.push([t.right,a]);break;case"left":s.push([i,t.top]),s.push([n.right,n.top]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([i,t.bottom]);break}return s}var N={},At=0,q=!1,M,G,V;function Ae(e){const o=`tooltip-${re()}`,l=`${++At}`,r=F({id:o,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,n]=_(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[i,a]=T(),[c,p]=T(),[u,g]=T(),[v,x]=T(n.placement),y=Ie({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:b=>{var D;return(D=t.onOpenChange)==null?void 0:D.call(t,b)}}),{present:C}=Te({show:()=>t.forceMount||y.isOpen(),element:()=>u()??null}),f=()=>{N[l]=m},w=()=>{for(const b in N)b!==l&&(N[b](!0),delete N[b])},m=(b=!1)=>{b||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,y.close()):s||(s=window.setTimeout(()=>{s=void 0,y.close()},t.closeDelay)),window.clearTimeout(M),M=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(V=window.setTimeout(()=>{window.clearTimeout(V),V=void 0},t.skipDelayDuration)),q&&(window.clearTimeout(G),G=window.setTimeout(()=>{delete N[l],G=void 0,q=!1},t.closeDelay))},I=()=>{clearTimeout(s),s=void 0,w(),f(),q=!0,y.open(),window.clearTimeout(M),M=void 0,window.clearTimeout(G),G=void 0,window.clearTimeout(V),V=void 0},W=()=>{w(),f(),!y.isOpen()&&!M&&!q?M=window.setTimeout(()=>{M=void 0,q=!0,I()},t.openDelay):y.isOpen()||I()},K=(b=!1)=>{!b&&t.openDelay&&t.openDelay>0&&!s&&!V?W():I()},z=()=>{window.clearTimeout(M),M=void 0,q=!1},R=()=>{window.clearTimeout(s),s=void 0},U=b=>ue(c(),b)||ue(u(),b),k=b=>{const D=c(),B=u();if(!(!D||!B))return Et(b,D,B)},Y=b=>{const D=b.target;if(U(D)){R();return}if(!t.ignoreSafeArea){const B=k(v());if(B&&ot(st(b),B)){R();return}}s||m()};$(()=>{if(!y.isOpen())return;const b=se();b.addEventListener("pointermove",Y,!0),P(()=>{b.removeEventListener("pointermove",Y,!0)})}),$(()=>{const b=c();if(!b||!y.isOpen())return;const D=qe=>{const Ve=qe.target;ue(Ve,b)&&m(!0)},B=tt();B.addEventListener("scroll",D,{capture:!0}),P(()=>{B.removeEventListener("scroll",D,{capture:!0})})}),P(()=>{clearTimeout(s),N[l]&&delete N[l]});const ze={dataset:j(()=>({"data-expanded":y.isOpen()?"":void 0,"data-closed":y.isOpen()?void 0:""})),isOpen:y.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:i,contentPresent:C,openTooltip:K,hideTooltip:m,cancelOpening:z,generateId:le(()=>r.id),registerContentId:ie(a),isTargetOnTooltip:U,setTriggerRef:p,setContentRef:g};return d(_e.Provider,{value:ze,get children(){return d($e,S({anchorRef:c,contentRef:u,onCurrentPlacementChange:x},n))}})}function Fe(e){let o;const l=ae(),[r,t]=_(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let n=!1,s=!1,i=!1;const a=()=>{n=!1},c=()=>{!l.isOpen()&&(s||i)&&l.openTooltip(i)},p=f=>{l.isOpen()&&!s&&!i&&l.hideTooltip(f)},u=f=>{E(f,r.onPointerEnter),!(f.pointerType==="touch"||l.triggerOnFocusOnly()||l.isDisabled()||f.defaultPrevented)&&(s=!0,c())},g=f=>{E(f,r.onPointerLeave),f.pointerType!=="touch"&&(s=!1,i=!1,l.isOpen()?p():l.cancelOpening())},v=f=>{E(f,r.onPointerDown),n=!0,se(o).addEventListener("pointerup",a,{once:!0})},x=f=>{E(f,r.onClick),s=!1,i=!1,p(!0)},y=f=>{E(f,r.onFocus),!(l.isDisabled()||f.defaultPrevented||n)&&(i=!0,c())},C=f=>{E(f,r.onBlur);const w=f.relatedTarget;l.isTargetOnTooltip(w)||(s=!1,i=!1,p(!0))};return P(()=>{se(o).removeEventListener("pointerup",a)}),d(ne,S({as:"button",ref(f){var w=te(m=>{l.setTriggerRef(m),o=m},r.ref);typeof w=="function"&&w(f)},get"aria-describedby"(){return Se(()=>!!l.isOpen())()?l.contentId():void 0},onPointerEnter:u,onPointerLeave:g,onPointerDown:v,onClick:x,onFocus:y,onBlur:C},()=>l.dataset(),t))}var Q=Object.assign(Ae,{Arrow:Pe,Content:Me,Portal:Ee,Trigger:Fe}),Ft={};me(Ft,{Collapsible:()=>Kt,Content:()=>be,Root:()=>ve,Trigger:()=>ye,useCollapsibleContext:()=>oe});var Ke=J();function oe(){const e=ee(Ke);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function be(e){const[o,l]=T(),r=oe(),t=F({id:r.generateId("content")},e),[n,s]=_(t,["ref","id","style"]),{present:i}=Te({show:r.shouldMount,element:()=>o()??null}),[a,c]=T(0),[p,u]=T(0);let v=r.isOpen()||i();return Qe(()=>{const x=requestAnimationFrame(()=>{v=!1});P(()=>{cancelAnimationFrame(x)})}),$(Ce(i,()=>{if(!o())return;o().style.transitionDuration="0s",o().style.animationName="none";const x=o().getBoundingClientRect();c(x.height),u(x.width),v||(o().style.transitionDuration="",o().style.animationName="")})),$(Ce(r.isOpen,x=>{!x&&o()&&(o().style.transitionDuration="",o().style.animationName="")},{defer:!0})),$(()=>P(r.registerContentId(n.id))),d(Z,{get when(){return i()},get children(){return d(ne,S({as:"div",ref(x){var y=te(l,n.ref);typeof y=="function"&&y(x)},get id(){return n.id},get style(){return he({"--kb-collapsible-content-height":a()?`${a()}px`:void 0,"--kb-collapsible-content-width":p()?`${p()}px`:void 0},n.style)}},()=>r.dataset(),s))}})}function ve(e){const o=`collapsible-${re()}`,l=F({id:o},e),[r,t]=_(l,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[n,s]=T(),i=Ie({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:p=>{var u;return(u=r.onOpenChange)==null?void 0:u.call(r,p)}}),a=j(()=>({"data-expanded":i.isOpen()?"":void 0,"data-closed":i.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:a,isOpen:i.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||i.isOpen(),contentId:n,toggle:i.toggle,generateId:le(()=>t.id),registerContentId:ie(s)};return d(Ke.Provider,{value:c,get children(){return d(ne,S({as:"div"},a,t))}})}function ye(e){const o=oe(),[l,r]=_(e,["onClick"]);return d(it,S({get"aria-expanded"(){return o.isOpen()},get"aria-controls"(){return Se(()=>!!o.isOpen())()?o.contentId():void 0},get disabled(){return o.disabled()},onClick:n=>{E(n,l.onClick),o.toggle()}},()=>o.dataset(),r))}var Kt=Object.assign(ve,{Content:be,Trigger:ye}),X={};me(X,{Accordion:()=>Rt,Content:()=>Le,Header:()=>Ue,Item:()=>He,Root:()=>je,Trigger:()=>We,useAccordionContext:()=>xe});var Re=J();function Be(){const e=ee(Re);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function Le(e){const o=Be(),l=o.generateId("content"),r=F({id:l},e),[t,n]=_(r,["id","style"]);return $(()=>P(o.registerContentId(t.id))),d(be,S({role:"region",get"aria-labelledby"(){return o.triggerId()},get style(){return he({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},n))}function Ue(e){const o=oe();return d(ne,S({as:"h3"},()=>o.dataset(),e))}var Ne=J();function xe(){const e=ee(Ne);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function He(e){const o=xe(),l=`${o.generateId("item")}-${re()}`,r=F({id:l},e),[t,n]=_(r,["value","disabled"]),[s,i]=T(),[a,c]=T(),p=()=>o.listState().selectionManager(),u=()=>p().isSelected(t.value),g={value:()=>t.value,triggerId:s,contentId:a,generateId:le(()=>n.id),registerTriggerId:ie(i),registerContentId:ie(c)};return d(Re.Provider,{value:g,get children(){return d(ve,S({get open(){return u()},get disabled(){return t.disabled}},n))}})}function je(e){let o;const l=`accordion-${re()}`,r=F({id:l,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,n]=_(r,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,i]=T([]),{DomCollectionProvider:a}=Ot({items:s,onItemsChange:i}),c=rt({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:g=>{var v;return(v=t.onChange)==null?void 0:v.call(t,Array.from(g))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});c.selectionManager().setFocusedKey("item-1");const p=lt({selectionManager:()=>c.selectionManager(),collection:()=>c.collection(),disallowEmptySelection:()=>c.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>o),u={listState:()=>c,generateId:le(()=>t.id)};return d(a,{get children(){return d(Ne.Provider,{value:u,get children(){return d(ne,S({as:"div",get id(){return t.id},ref(g){var v=te(x=>o=x,t.ref);typeof v=="function"&&v(g)},get onKeyDown(){return A([t.onKeyDown,p.onKeyDown])},get onMouseDown(){return A([t.onMouseDown,p.onMouseDown])},get onFocusIn(){return A([t.onFocusIn])},get onFocusOut(){return A([t.onFocusOut,p.onFocusOut])}},n))}})}})}function We(e){let o;const l=xe(),r=Be(),t=oe(),n=r.generateId("trigger"),s=F({id:n},e),[i,a]=_(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);_t({getItem:()=>({ref:()=>o,type:"item",key:r.value(),textValue:"",disabled:t.disabled()})});const c=at({key:()=>r.value(),selectionManager:()=>l.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>o),p=u=>{["Enter"," "].includes(u.key)&&u.preventDefault(),E(u,i.onKeyDown),E(u,c.onKeyDown)};return $(()=>P(r.registerTriggerId(a.id))),d(ye,S({ref(u){var g=te(v=>o=v,i.ref);typeof g=="function"&&g(u)},get"data-key"(){return c.dataKey()},get onPointerDown(){return A([i.onPointerDown,c.onPointerDown])},get onPointerUp(){return A([i.onPointerUp,c.onPointerUp])},get onClick(){return A([i.onClick,c.onClick])},onKeyDown:p,get onMouseDown(){return A([i.onMouseDown,c.onMouseDown])},get onFocus(){return A([i.onFocus,c.onFocus])}},a))}var Rt=Object.assign(je,{Content:Le,Header:Ue,Item:He,Trigger:We}),Bt=O('<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 Lt=e=>{const{t:o}=ht(),l=j(()=>ct(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),r=j(()=>l().inputTokens??0),t=j(()=>l().outputTokens??0),n=j(()=>{const i=l().isSubscriptionModel?0:l().cost;return i>0?i:0}),s=j(()=>`$${n().toFixed(2)}`);return(()=>{var i=Bt(),a=i.firstChild,c=a.firstChild,p=c.firstChild,u=p.nextSibling,g=c.nextSibling,v=g.firstChild,x=v.nextSibling,y=g.nextSibling,C=y.firstChild,f=C.nextSibling;return h(p,()=>o("contextUsagePanel.labels.input")),h(u,()=>we(r())),h(v,()=>o("contextUsagePanel.labels.output")),h(x,()=>we(t())),h(C,()=>o("contextUsagePanel.labels.cost")),h(f,s),pe(()=>Ye(i,`session-context-panel px-4 py-2 ${e.class??""}`)),i})()};var H=O('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),Ut=O('<div class="rounded-md border border-base bg-surface-secondary px-3 py-2"><div class="flex items-start justify-between gap-3"><div class=min-w-0><div class="text-sm font-medium text-primary"></div><p class="mt-1 text-xs text-secondary">'),Nt=O('<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">'),Ht=O('<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)>'),jt=O('<div class="flex flex-col gap-2">'),Wt=O("<span>"),zt=O('<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">'),qt=O("<div class=status-tab-container>"),Vt=O("<span class=section-left><span class=section-label>");const tn=e=>{const o=i=>e.expandedItems().includes(i),s=[{id:"yolo-mode",labelKey:"instanceShell.rightPanel.sections.yoloMode",tooltipKey:"instanceShell.rightPanel.sections.yoloMode.tooltip",render:()=>{const i=e.activeSession();return i?(()=>{var a=Ut(),c=a.firstChild,p=c.firstChild,u=p.firstChild,g=u.nextSibling;return h(u,()=>e.t("instanceShell.yoloMode.title")),h(g,()=>e.t("instanceShell.yoloMode.description")),h(c,d(pt,{get checked(){return gt(e.instanceId,i.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>ut(e.instanceId,i.id)}),null),a})():(()=>{var a=H(),c=a.firstChild;return h(c,()=>e.t("instanceShell.yoloMode.noSessionSelected")),a})()}},{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const i=e.activeSessionId();if(!i||i==="info")return(()=>{var u=H(),g=u.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),u})();const a=e.activeSessionDiffs();if(a===void 0)return(()=>{var u=H(),g=u.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.loading")),u})();if(!Array.isArray(a)||a.length===0)return(()=>{var u=H(),g=u.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.empty")),u})();const c=[...a].sort((u,g)=>String(u.file||"").localeCompare(String(g.file||""))),p=c.reduce((u,g)=>(u.additions+=typeof g.additions=="number"?g.additions:0,u.deletions+=typeof g.deletions=="number"?g.deletions:0,u),{additions:0,deletions:0});return(()=>{var u=Nt(),g=u.firstChild,v=g.firstChild,x=v.nextSibling,y=x.firstChild,C=y.nextSibling,f=g.nextSibling,w=f.firstChild;return h(v,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:c.length})),h(y,()=>`+${p.additions}`),h(C,()=>`-${p.deletions}`),h(w,d(de,{each:c,children:m=>(()=>{var I=Ht(),W=I.firstChild,K=W.firstChild,z=K.nextSibling,R=z.firstChild,U=R.nextSibling;return I.$$click=()=>e.onOpenChangesTab(m.file),h(K,()=>m.file),h(R,()=>`+${m.additions}`),h(U,()=>`-${m.deletions}`),pe(k=>{var Y=e.t("instanceShell.sessionChanges.actions.show"),ce=m.file;return Y!==k.e&&L(I,"title",k.e=Y),ce!==k.t&&L(K,"title",k.t=ce),k},{e:void 0,t:void 0}),I})()})),u})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const i=e.activeSessionId();if(!i||i==="info")return(()=>{var c=H(),p=c.firstChild;return h(p,()=>e.t("instanceShell.plan.noSessionSelected")),c})();const a=e.latestTodoState();return a?d(mt,{state:a,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var c=H(),p=c.firstChild;return h(p,()=>e.t("instanceShell.plan.empty")),c})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const i=e.backgroundProcessList();return i.length===0?(()=>{var a=H(),c=a.firstChild;return h(c,()=>e.t("instanceShell.backgroundProcesses.empty")),a})():(()=>{var a=jt();return h(a,d(de,{each:i,children:c=>(()=>{var p=zt(),u=p.firstChild,g=u.firstChild,v=g.nextSibling,x=v.firstChild,y=u.nextSibling,C=y.firstChild,f=C.nextSibling,w=f.nextSibling;return h(g,()=>c.title),h(x,()=>e.t("instanceShell.backgroundProcesses.status",{status:c.status})),h(v,d(Z,{get when(){return typeof c.outputSizeBytes=="number"},get children(){var m=Wt();return h(m,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((c.outputSizeBytes??0)/1024)})),m}}),null),C.$$click=()=>e.onOpenBackgroundOutput(c),h(C,d(xt,{class:"h-4 w-4"})),f.$$click=()=>e.onStopBackgroundProcess(c.id),h(f,d(wt,{class:"h-4 w-4"})),w.$$click=()=>e.onTerminateBackgroundProcess(c.id),h(w,d(ft,{class:"h-4 w-4"})),pe(m=>{var I=e.t("instanceShell.backgroundProcesses.actions.output"),W=e.t("instanceShell.backgroundProcesses.actions.output"),K=c.status!=="running",z=e.t("instanceShell.backgroundProcesses.actions.stop"),R=e.t("instanceShell.backgroundProcesses.actions.stop"),U=e.t("instanceShell.backgroundProcesses.actions.terminate"),k=e.t("instanceShell.backgroundProcesses.actions.terminate");return I!==m.e&&L(C,"aria-label",m.e=I),W!==m.t&&L(C,"title",m.t=W),K!==m.a&&(f.disabled=m.a=K),z!==m.o&&L(f,"aria-label",m.o=z),R!==m.i&&L(f,"title",m.i=R),U!==m.n&&L(w,"aria-label",m.n=U),k!==m.s&&L(w,"title",m.s=k),m},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),p})()})),a})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>d(ge,{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:()=>d(ge,{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:()=>d(ge,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var i=qt();return h(i,d(Z,{get when(){return e.activeSession()},children:a=>d(Lt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),h(i,d(X.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return d(de,{each:s,children:a=>d(X.Item,{get value(){return a.id},class:"right-panel-accordion-item",get children(){return[d(X.Header,{class:"right-panel-accordion-header-row",get children(){return[d(X.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var c=Vt(),p=c.firstChild;return h(p,()=>e.t(a.labelKey)),c})(),d(dt,{get class(){return`right-panel-accordion-chevron ${o(a.id)?"right-panel-accordion-chevron-expanded":""}`}})]}}),d(Q,{openDelay:200,gutter:4,placement:"top",get children(){return[d(Q.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(a.tooltipKey)},get children(){return d(vt,{class:"section-info-icon"})}}),d(Q.Portal,{get children(){return d(Q.Content,{class:"section-info-tooltip",get children(){return e.t(a.tooltipKey)}})}})]}})]}}),d(X.Content,{class:"right-panel-accordion-content",get children(){return a.render()}})]}})})}}),null),i})()};Ge(["click"]);export{tn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as c,i as l,m as x,k as T,u as _}from"./monaco-viewer-UU9TfOpS.js";import{c as h,b as k,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{am as V,an as b,ao as D}from"./main-B3yZBpaS.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-lhjxIgwf.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 q(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 k(()=>{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"?_(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{q as ToolCallDiffViewer};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import"./fast-diff-vendor-DgdwVvTQ.js";import{c as bs,g as xs}from"./highlight-vendor-8FKMu9os.js";const V={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return al(this.context.count)},getNextContextId(){return al(this.context.count++)}};function al(e){const t=String(e),n=t.length-1;return V.context.id+(n?String.fromCharCode(96+n):"")+t}function Ve(e){V.context=e}const jl=!1,ms=(e,t)=>e===t,Hn=Symbol("solid-proxy"),Ul=typeof Proxy=="function",ws=Symbol("solid-track"),vu=Symbol("solid-dev-component"),Tn={equals:ms};let nn=null,Bl=ql;const We=1,An=2,Vl={owned:null,cleanups:null,context:null,owner:null},ni={};var q=null;let Sn=null,Ls=null,Q=null,be=null,Ie=null,Yn=0;function In(e,t){const n=Q,i=q,l=e.length===0,r=t===void 0?i:t,s=l?Vl:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=l?e:()=>e(()=>xe(()=>fn(s)));q=s,Q=null;try{return Ye(o,!0)}finally{Q=n,q=i}}function K(e,t){t=t?Object.assign({},Tn,t):Tn;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=l=>(typeof l=="function"&&(l=l(n.value)),Kl(n,l));return[zl.bind(n),i]}function ul(e,t,n){const i=_n(e,t,!0,We);zt(i)}function j(e,t,n){const i=_n(e,t,!1,We);zt(i)}function re(e,t,n){Bl=Es;const i=_n(e,t,!1,We),l=Mt&&gn(Mt);l&&(i.suspense=l),(!n||!n.render)&&(i.user=!0),Ie?Ie.push(i):zt(i)}function y(e,t,n){n=n?Object.assign({},Tn,n):Tn;const i=_n(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,zt(i),zl.bind(i)}function ps(e){return e&&typeof e=="object"&&"then"in e}function $s(e,t,n){let i,l,r;i=!0,l=e,r={};let s=null,o=ni,d=null,f=!1,u="initialValue"in r,a=typeof i=="function"&&y(i);const x=new Set,[c,b]=(r.storage||K)(r.initialValue),[w,m]=K(void 0),[v,h]=K(void 0,{equals:!1}),[L,p]=K(u?"ready":"unresolved");V.context&&(d=V.getNextContextId(),r.ssrLoadFrom==="initial"?o=r.initialValue:V.load&&V.has(d)&&(o=V.load(d)));function _(T,W,R,D){return s===T&&(s=null,D!==void 0&&(u=!0),(T===o||W===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(D,{value:W})),o=ni,N(W,R)),W}function N(T,W){Ye(()=>{W===void 0&&b(()=>T),p(W!==void 0?"errored":u?"ready":"unresolved"),m(W);for(const R of x.keys())R.decrement();x.clear()},!1)}function S(){const T=Mt&&gn(Mt),W=c(),R=w();if(R!==void 0&&!s)throw R;return Q&&!Q.user&&T&&ul(()=>{v(),s&&(T.resolved&&Sn||x.has(T)||(T.increment(),x.add(T)))}),W}function $(T=!0){if(T!==!1&&f)return;f=!1;const W=a?a():i;if(W==null||W===!1){_(s,xe(c));return}let R;const D=o!==ni?o:xe(()=>{try{return l(W,{value:c(),refetching:T})}catch(G){R=G}});if(R!==void 0){_(s,void 0,Fn(R),W);return}else if(!ps(D))return _(s,D,void 0,W),D;return s=D,"v"in D?(D.s===1?_(s,D.v,void 0,W):_(s,void 0,Fn(D.v),W),D):(f=!0,queueMicrotask(()=>f=!1),Ye(()=>{p(u?"refreshing":"pending"),h()},!1),D.then(G=>_(D,G,void 0,W),G=>_(D,void 0,Fn(G),W)))}Object.defineProperties(S,{state:{get:()=>L()},error:{get:()=>w()},loading:{get(){const T=L();return T==="pending"||T==="refreshing"}},latest:{get(){if(!u)return S();const T=w();if(T&&!s)throw T;return c()}}});let A=q;return a?ul(()=>(A=q,$(!1))):$(!1),[S,{refetch:T=>Is(A,()=>$(T)),mutate:b}]}function gu(e){return Ye(e,!1)}function xe(e){if(Q===null)return e();const t=Q;Q=null;try{return e()}finally{Q=t}}function _u(e,t,n){const i=Array.isArray(e);let l,r=n&&n.defer;return s=>{let o;if(i){o=Array(e.length);for(let f=0;f<e.length;f++)o[f]=e[f]()}else o=e();if(r)return r=!1,s;const d=xe(()=>t(o,l,s));return l=o,d}}function bu(e){re(()=>xe(e))}function de(e){return q===null||(q.cleanups===null?q.cleanups=[e]:q.cleanups.push(e)),e}function ys(e,t){nn||(nn=Symbol("error")),q=_n(void 0,void 0,!0),q.context={...q.context,[nn]:[t]};try{return e()}catch(n){bn(n)}finally{q=q.owner}}function xu(){return Q}function Ss(){return q}function Is(e,t){const n=q,i=Q;q=e,Q=null;try{return Ye(t,!0)}catch(l){bn(l)}finally{q=n,Q=i}}const[mu,wu]=K(!1);function Fs(e){Ie.push.apply(Ie,e),e.length=0}function Zn(e,t){const n=Symbol("context");return{id:n,Provider:Hs(n),defaultValue:e}}function gn(e){let t;return q&&q.context&&(t=q.context[e.id])!==void 0?t:e.defaultValue}function Gl(e){const t=y(e),n=y(()=>hi(t()));return n.toArray=()=>{const i=n();return Array.isArray(i)?i:i!=null?[i]:[]},n}let Mt;function Ns(){return Mt||(Mt=Zn())}function zl(){if(this.sources&&this.state)if(this.state===We)zt(this);else{const e=be;be=null,Ye(()=>Rn(this),!1),be=e}if(Q){const e=this.observers?this.observers.length:0;Q.sources?(Q.sources.push(this),Q.sourceSlots.push(e)):(Q.sources=[this],Q.sourceSlots=[e]),this.observers?(this.observers.push(Q),this.observerSlots.push(Q.sources.length-1)):(this.observers=[Q],this.observerSlots=[Q.sources.length-1])}return this.value}function Kl(e,t,n){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&Ye(()=>{for(let l=0;l<e.observers.length;l+=1){const r=e.observers[l],s=Sn&&Sn.running;s&&Sn.disposed.has(r),(s?!r.tState:!r.state)&&(r.pure?be.push(r):Ie.push(r),r.observers&&Yl(r)),s||(r.state=We)}if(be.length>1e6)throw be=[],new Error},!1)),t}function zt(e){if(!e.fn)return;fn(e);const t=Yn;ks(e,e.value,t)}function ks(e,t,n){let i;const l=q,r=Q;Q=q=e;try{i=e.fn(t)}catch(s){return e.pure&&(e.state=We,e.owned&&e.owned.forEach(fn),e.owned=null),e.updatedAt=n+1,bn(s)}finally{Q=r,q=l}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Kl(e,i):e.value=i,e.updatedAt=n)}function _n(e,t,n,i=We,l){const r={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:q,context:q?q.context:null,pure:n};return q===null||q!==Vl&&(q.owned?q.owned.push(r):q.owned=[r]),r}function Dn(e){if(e.state===0)return;if(e.state===An)return Rn(e);if(e.suspense&&xe(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Yn);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===We)zt(e);else if(e.state===An){const i=be;be=null,Ye(()=>Rn(e,t[0]),!1),be=i}}function Ye(e,t){if(be)return e();let n=!1;t||(be=[]),Ie?n=!0:Ie=[],Yn++;try{const i=e();return Cs(n),i}catch(i){n||(Ie=null),be=null,bn(i)}}function Cs(e){if(be&&(ql(be),be=null),e)return;const t=Ie;Ie=null,t.length&&Ye(()=>Bl(t),!1)}function ql(e){for(let t=0;t<e.length;t++)Dn(e[t])}function Es(e){let t,n=0;for(t=0;t<e.length;t++){const i=e[t];i.user?e[n++]=i:Dn(i)}if(V.context){if(V.count){V.effects||(V.effects=[]),V.effects.push(...e.slice(0,n));return}Ve()}for(V.effects&&(V.done||!V.count)&&(e=[...V.effects,...e],n+=V.effects.length,delete V.effects),t=0;t<n;t++)Dn(e[t])}function Rn(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];if(i.sources){const l=i.state;l===We?i!==t&&(!i.updatedAt||i.updatedAt<Yn)&&Dn(i):l===An&&Rn(i,t)}}}function Yl(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=An,n.pure?be.push(n):Ie.push(n),n.observers&&Yl(n))}}function fn(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const r=l.pop(),s=n.observerSlots.pop();i<l.length&&(r.sourceSlots[s]=i,l[i]=r,n.observerSlots[i]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)fn(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)fn(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Fn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function fl(e,t,n){try{for(const i of t)i(e)}catch(i){bn(i,n&&n.owner||null)}}function bn(e,t=q){const n=nn&&t&&t.context&&t.context[nn],i=Fn(e);if(!n)throw i;Ie?Ie.push({fn(){fl(i,n,t)},state:We}):fl(i,n,t)}function hi(e){if(typeof e=="function"&&!e.length)return hi(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=hi(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Hs(e,t){return function(i){let l;return j(()=>l=xe(()=>(q.context={...q.context,[e]:i.value},Gl(()=>i.children))),void 0),l}}const Ts=Symbol("fallback");function cl(e){for(let t=0;t<e.length;t++)e[t]()}function As(e,t,n={}){let i=[],l=[],r=[],s=0,o=t.length>1?[]:null;return de(()=>cl(r)),()=>{let d=e()||[],f=d.length,u,a;return d[ws],xe(()=>{let c,b,w,m,v,h,L,p,_;if(f===0)s!==0&&(cl(r),r=[],i=[],l=[],s=0,o&&(o=[])),n.fallback&&(i=[Ts],l[0]=In(N=>(r[0]=N,n.fallback())),s=1);else if(s===0){for(l=new Array(f),a=0;a<f;a++)i[a]=d[a],l[a]=In(x);s=f}else{for(w=new Array(f),m=new Array(f),o&&(v=new Array(f)),h=0,L=Math.min(s,f);h<L&&i[h]===d[h];h++);for(L=s-1,p=f-1;L>=h&&p>=h&&i[L]===d[p];L--,p--)w[p]=l[L],m[p]=r[L],o&&(v[p]=o[L]);for(c=new Map,b=new Array(p+1),a=p;a>=h;a--)_=d[a],u=c.get(_),b[a]=u===void 0?-1:u,c.set(_,a);for(u=h;u<=L;u++)_=i[u],a=c.get(_),a!==void 0&&a!==-1?(w[a]=l[u],m[a]=r[u],o&&(v[a]=o[u]),a=b[a],c.set(_,a)):r[u]();for(a=h;a<f;a++)a in w?(l[a]=w[a],r[a]=m[a],o&&(o[a]=v[a],o[a](a))):l[a]=In(x);l=l.slice(0,s=f),i=d.slice(0)}return l});function x(c){if(r[a]=c,o){const[b,w]=K(a);return o[a]=w,t(d[a],b)}return t(d[a])}}}function k(e,t){return xe(()=>e(t||{}))}function mn(){return!0}const vi={get(e,t,n){return t===Hn?n:e.get(t)},has(e,t){return t===Hn?!0:e.has(t)},set:mn,deleteProperty:mn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:mn,deleteProperty:mn}},ownKeys(e){return e.keys()}};function ii(e){return(e=typeof e=="function"?e():e)?e:{}}function Ds(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Lu(...e){let t=!1;for(let s=0;s<e.length;s++){const o=e[s];t=t||!!o&&Hn in o,e[s]=typeof o=="function"?(t=!0,y(o)):o}if(Ul&&t)return new Proxy({get(s){for(let o=e.length-1;o>=0;o--){const d=ii(e[o])[s];if(d!==void 0)return d}},has(s){for(let o=e.length-1;o>=0;o--)if(s in ii(e[o]))return!0;return!1},keys(){const s=[];for(let o=0;o<e.length;o++)s.push(...Object.keys(ii(e[o])));return[...new Set(s)]}},vi);const n={},i=Object.create(null);for(let s=e.length-1;s>=0;s--){const o=e[s];if(!o)continue;const d=Object.getOwnPropertyNames(o);for(let f=d.length-1;f>=0;f--){const u=d[f];if(u==="__proto__"||u==="constructor")continue;const a=Object.getOwnPropertyDescriptor(o,u);if(!i[u])i[u]=a.get?{enumerable:!0,configurable:!0,get:Ds.bind(n[u]=[a.get.bind(o)])}:a.value!==void 0?a:void 0;else{const x=n[u];x&&(a.get?x.push(a.get.bind(o)):a.value!==void 0&&x.push(()=>a.value))}}}const l={},r=Object.keys(i);for(let s=r.length-1;s>=0;s--){const o=r[s],d=i[o];d&&d.get?Object.defineProperty(l,o,d):l[o]=d?d.value:void 0}return l}function pu(e,...t){const n=t.length;if(Ul&&Hn in e){const l=n>1?t.flat():t[0],r=t.map(s=>new Proxy({get(o){return s.includes(o)?e[o]:void 0},has(o){return s.includes(o)&&o in e},keys(){return s.filter(o=>o in e)}},vi));return r.push(new Proxy({get(s){return l.includes(s)?void 0:e[s]},has(s){return l.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!l.includes(s))}},vi)),r}const i=[];for(let l=0;l<=n;l++)i[l]={};for(const l of Object.getOwnPropertyNames(e)){let r=n;for(let d=0;d<t.length;d++)if(t[d].includes(l)){r=d;break}const s=Object.getOwnPropertyDescriptor(e,l);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?i[r][l]=s.value:Object.defineProperty(i[r],l,s)}return i}function $u(e){let t,n;const i=l=>{const r=V.context;if(r){const[o,d]=K();V.count||(V.count=0),V.count++,(n||(n=e())).then(f=>{!V.done&&Ve(r),V.count--,d(()=>f.default),Ve()}),t=o}else if(!t){const[o]=$s(()=>(n||(n=e())).then(d=>d.default));t=o}let s;return y(()=>(s=t())?xe(()=>{if(!r||V.done)return s(l);const o=V.context;Ve(r);const d=s(l);return Ve(o),d}):"")};return i.preload=()=>n||((n=e()).then(l=>t=()=>l.default),n),i}let Rs=0;function yu(){return V.context?V.getNextContextId():`cl-${Rs++}`}const Zl=e=>`Stale read from <${e}>.`;function cn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return y(As(()=>e.each,e.children,t||void 0))}function X(e){const t=e.keyed,n=y(()=>e.when,void 0,void 0),i=t?n:y(n,void 0,{equals:(l,r)=>!l==!r});return y(()=>{const l=i();if(l){const r=e.children;return typeof r=="function"&&r.length>0?xe(()=>r(t?l:()=>{if(!xe(i))throw Zl("Show");return n()})):r}return e.fallback},void 0,void 0)}function Su(e){const t=Gl(()=>e.children),n=y(()=>{const i=t(),l=Array.isArray(i)?i:[i];let r=()=>{};for(let s=0;s<l.length;s++){const o=s,d=l[s],f=r,u=y(()=>f()?void 0:d.when,void 0,void 0),a=d.keyed?u:y(u,void 0,{equals:(x,c)=>!x==!c});r=()=>f()||(a()?[o,u,d]:void 0)}return r});return y(()=>{const i=n()();if(!i)return e.fallback;const[l,r,s]=i,o=s.children;return typeof o=="function"&&o.length>0?xe(()=>o(s.keyed?r():()=>{var f;if(((f=xe(n)())==null?void 0:f[0])!==l)throw Zl("Match");return r()})):o},void 0,void 0)}function Iu(e){return e}let wn;function Fu(e){let t;V.context&&V.load&&(t=V.load(V.getContextId()));const[n,i]=K(t,void 0);return wn||(wn=new Set),wn.add(i),de(()=>wn.delete(i)),y(()=>{let l;if(l=n()){const r=e.fallback;return typeof r=="function"&&r.length?xe(()=>r(l,()=>i())):r}return ys(()=>e.children,i)},void 0,void 0)}const Ws=Zn();function Nu(e){let t=0,n,i,l,r,s;const[o,d]=K(!1),f=Ns(),u={increment:()=>{++t===1&&d(!0)},decrement:()=>{--t===0&&d(!1)},inFallback:o,effects:[],resolved:!1},a=Ss();if(V.context&&V.load){const b=V.getContextId();let w=V.load(b);if(w&&(typeof w!="object"||w.s!==1?l=w:V.gather(b)),l&&l!=="$$f"){const[m,v]=K(void 0,{equals:!1});r=m,l.then(()=>{if(V.done)return v();V.gather(b),Ve(i),v(),Ve()},h=>{s=h,v()})}}const x=gn(Ws);x&&(n=x.register(u.inFallback));let c;return de(()=>c&&c()),k(f.Provider,{value:u,get children(){return y(()=>{if(s)throw s;if(i=V.context,r)return r(),r=void 0;i&&l==="$$f"&&Ve();const b=y(()=>e.children);return y(w=>{const m=u.inFallback(),{showContent:v=!0,showFallback:h=!0}=n?n():{};if((!m||l&&l!=="$$f")&&v)return u.resolved=!0,c&&c(),c=i=l=void 0,Fs(u.effects),b();if(h)return c?w:In(L=>(c=L,i&&(Ve({id:i.id+"F",count:0}),i=void 0),e.fallback),a)})})}})}var hl;(function(e){e[e.CRLF=1]="CRLF",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.NEWLINE=4]="NEWLINE",e[e.NORMAL=5]="NORMAL",e[e.NULL=6]="NULL"})(hl||(hl={}));var vl;(function(e){e[e.SplitGitHub=1]="SplitGitHub",e[e.SplitGitLab=2]="SplitGitLab",e[e.Split=3]="Split",e[e.Unified=4]="Unified"})(vl||(vl={}));const Os=e=>{let t=1;const n={},i=(l,r)=>{l.forEach(s=>{if(s.type==="text"){if(s.value.indexOf(`
|
|
2
|
-
`)===-1){const d=s.value.length;if(n[t])s.startIndex=n[t].valueLength,s.endIndex=s.startIndex+d-1,n[t].value+=s.value,n[t].valueLength+=d,n[t].nodeList.push({node:s,wrapper:r});else{s.startIndex=0,s.endIndex=d-1;const f={value:s.value,lineNumber:t,valueLength:d,nodeList:[{node:s,wrapper:r}]};n[t]=f}s.lineNumber=t;return}const o=s.value.split(`
|
|
3
|
-
`);s.children=s.children||[];for(let d=0;d<o.length;d++){const f=d===o.length-1?o[d]:o[d]+`
|
|
4
|
-
`,u=d===0?t:++t,a=f.length,x={type:"text",value:f,startIndex:1/0,endIndex:1/0,lineNumber:u};if(n[u])x.startIndex=n[u].valueLength,x.endIndex=x.startIndex+a-1,n[u].value+=f,n[u].valueLength+=a,n[u].nodeList.push({node:x,wrapper:r});else{x.startIndex=0,x.endIndex=a-1;const c={value:f,lineNumber:u,valueLength:a,nodeList:[{node:x,wrapper:r}]};n[u]=c}s.children.push(x)}s.lineNumber=t;return}s.children&&(i(s.children,s),s.lineNumber=t)})};return i(e.children),{syntaxFileObject:n,syntaxFileLineNumber:t}},Dt=bs(xs);Dt.register("vue",function(t){return{subLanguage:"xml",contains:[t.COMMENT("<!--","-->",{relevance:10}),{begin:/^(\s*)(<script>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0},{begin:/^(?:\s*)(?:<script\s+lang=(["'])ts\1>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"typescript",excludeBegin:!0,excludeEnd:!0},{begin:/^(\s*)(<style(\s+scoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"css",excludeBegin:!0,excludeEnd:!0},{begin:/^(?:\s*)(?:<style(?:\s+scoped)?\s+lang=(["'])(?:s[ca]ss)\1(?:\s+scoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"scss",excludeBegin:!0,excludeEnd:!0},{begin:/^(?:\s*)(?:<style(?:\s+scoped)?\s+lang=(["'])stylus\1(?:\s+scoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"stylus",excludeBegin:!0,excludeEnd:!0}]}});const Oe={name:"lowlight"};let Xl=2e3;const gi=[];Object.defineProperty(Oe,"maxLineToIgnoreSyntax",{get:()=>Xl});Object.defineProperty(Oe,"setMaxLineToIgnoreSyntax",{value:e=>{Xl=e}});Object.defineProperty(Oe,"ignoreSyntaxHighlightList",{get:()=>gi});Object.defineProperty(Oe,"setIgnoreSyntaxHighlightList",{value:e=>{gi.length=0,gi.push(...e)}});Object.defineProperty(Oe,"getAST",{value:(e,t,n)=>{let i=!0;if(Dt.registered(n)||(i=!1),!(t&&Nn.ignoreSyntaxHighlightList.some(l=>l instanceof RegExp?l.test(t):t===l)))return i?Dt.highlight(n,e):Dt.highlightAuto(e)}});Object.defineProperty(Oe,"processAST",{value:e=>Os(e)});Object.defineProperty(Oe,"hasRegisteredCurrentLang",{value:e=>Dt.registered(e)});Object.defineProperty(Oe,"getHighlighterEngine",{value:()=>Dt});Object.defineProperty(Oe,"type",{value:"class"});const Nn=Oe;var kt;(function(e){e.None="None",e.Up="Up",e.Down="Down",e.Both="Both",e.Short="Short"})(kt||(kt={}));class Ms{constructor(t,n,i,l,r){this.header=t,this.lines=n,this.unifiedDiffStart=i,this.unifiedDiffEnd=l,this.expansionType=r}equals(t){return this===t?!0:this.header.equals(t.header)&&this.unifiedDiffStart===t.unifiedDiffStart&&this.unifiedDiffEnd===t.unifiedDiffEnd&&this.expansionType===t.expansionType&&this.lines.length===t.lines.length&&this.lines.every((n,i)=>n.equals(t.lines[i]))}}class Ps{constructor(t,n,i,l){this.oldStartLine=t,this.oldLineCount=n,this.newStartLine=i,this.newLineCount=l}toDiffLineRepresentation(){return`@@ -${this.oldStartLine},${this.oldLineCount} +${this.newStartLine},${this.newLineCount} @@`}equals(t){return this.oldStartLine===t.oldStartLine&&this.oldLineCount===t.oldLineCount&&this.newStartLine===t.newStartLine&&this.oldStartLine===t.oldStartLine}}const Ql="--diff-add-content-highlight--",Jl="--diff-del-content-highlight--";var se;(function(e){e[e.CRLF=1]="CRLF",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.NEWLINE=4]="NEWLINE",e[e.NORMAL=5]="NORMAL",e[e.NULL=6]="NULL"})(se||(se={}));const er=e=>{switch(e){case se.LF:return"␊";case se.CR:return"␍";case se.CRLF:return"␍␊";default:return""}};var gl;(function(e){e[e.SplitGitHub=1]="SplitGitHub",e[e.SplitGitLab=2]="SplitGitLab",e[e.Split=3]="Split",e[e.Unified=4]="Unified"})(gl||(gl={}));let js=1e3;function _l(e){return e.location+e.length}function bl(e,t,n,i,l){const r=Math.min(t.length,i.length),s=l?_l(t)-1:t.location,o=l?_l(i)-1:i.location,d=l?-1:1;let f=0;for(;Math.abs(f)<r&&e[s+f]===n[o+f];)f+=d;return Math.abs(f)}function xl(e){return e.trim().length===0||e.length>=js}function Us(e,t){const n=e.text,i=t.text,l=n.slice(-2),r=i.slice(-2),s=l===`\r
|
|
5
|
-
`?se.CRLF:l.endsWith("\r")?se.CR:l.endsWith(`
|
|
6
|
-
`)?se.LF:se.NULL,o=r===`\r
|
|
7
|
-
`?se.CRLF:r.endsWith("\r")?se.CR:r.endsWith(`
|
|
8
|
-
`)?se.LF:se.NULL,d=e.noTrailingNewLine!==t.noTrailingNewLine;return s===o&&!d?{addSymbol:void 0,addString:n,delSymbol:void 0,delString:i}:{addSymbol:d?e.noTrailingNewLine?se.NEWLINE:se.NORMAL:s,addString:s===se.CRLF?n.slice(0,-2):s===se.CR||s===se.LF?n.slice(0,-1):n,delSymbol:d?t.noTrailingNewLine?se.NEWLINE:se.NORMAL:o,delString:o===se.CRLF?i.slice(0,-2):o===se.CR||o===se.LF?i.slice(0,-1):i}}function Bs(e,t){const n=e.text,i=t.text,{addString:l,delString:r,addSymbol:s,delSymbol:o}=Us(e,t);if(l===r&&s&&o)return{addRange:{range:{location:l.length,length:n.length-l.length},hasLineChange:!0,newLineSymbol:s},delRange:{range:{location:r.length,length:i.length-r.length},hasLineChange:!0,newLineSymbol:o}};let d={location:0,length:r.length},f={location:0,length:l.length};if(xl(n)||xl(i))return f.length=0,d.length=0,{addRange:{range:f},delRange:{range:d}};const u=bl(r,d,l,f,!1);d={location:d.location+u,length:d.length-u},f={location:f.location+u,length:f.length-u};const a=bl(r,d,l,f,!0);return d.length-=a,f.length-=a,{addRange:{range:f,hasLineChange:(l.slice(0,f.location)+l.slice(f.location+f.length)).trim().length>0},delRange:{range:d,hasLineChange:(r.slice(0,d.location)+r.slice(d.location+d.length)).trim().length>0}}}var ae;(function(e){e[e.Context=0]="Context",e[e.Add=1]="Add",e[e.Delete=2]="Delete",e[e.Hunk=3]="Hunk"})(ae||(ae={}));class we{constructor(t,n,i,l,r,s=!1,o,d,f,u,a,x){this.text=t,this.type=n,this.originalLineNumber=i,this.oldLineNumber=l,this.newLineNumber=r,this.noTrailingNewLine=s,this.changes=o,this.diffChanges=d,this.plainTemplate=f,this.plainTemplateMode=u,this.syntaxTemplate=a,this.syntaxTemplateMode=x}withNoTrailingNewLine(t){return new we(this.text,this.type,this.originalLineNumber,this.oldLineNumber,this.newLineNumber,t)}isIncludeableLine(){return this.type===ae.Add||this.type===ae.Delete}equals(t){return this.text===t.text&&this.type===t.type&&this.originalLineNumber===t.originalLineNumber&&this.oldLineNumber===t.oldLineNumber&&this.newLineNumber===t.newLineNumber&&this.noTrailingNewLine===t.noTrailingNewLine}clone(t){return new we(t,this.type,this.originalLineNumber,this.oldLineNumber,this.newLineNumber,this.noTrailingNewLine)}}const Wn=e=>e?e.type===ae.Add||e.type===ae.Delete:!1,Vs=/["'&<>]/;function Gs(e){const t=""+e,n=Vs.exec(t);if(!n)return t;let i="",l,r,s=0;for(r=n.index;r<t.length;r++){switch(t.charCodeAt(r)){case 34:l=""";break;case 38:l="&";break;case 39:l="'";break;case 60:l="<";break;case 62:l=">";break;default:continue}s!==r&&(i+=t.slice(s,r)),s=r+1,i+=l}return s!==r?i+t.slice(s,r):i}const zs=e=>e,Xn=e=>Gs(e).replace(/\n/g,"").replace(/\r/g,""),On=({diffLine:e,rawLine:t,operator:n})=>{if(e.plainTemplate&&e.plainTemplateMode==="relative")return;const i=e.changes;if(!i||!i.hasLineChange||!t)return;const l=Xn,r=i.range,s=t.slice(0,r.location),o=t.slice(r.location,r.location+r.length),d=t.slice(r.location+r.length),f=o.includes(`
|
|
9
|
-
`),u=i.newLineSymbol;let a=`<span data-range-start="${r.location}" data-range-end="${r.location+r.length}">`;a+=l(s),a+=`<span data-diff-highlight style="background-color: var(${n==="add"?Ql:Jl});border-radius: 0.2em;">`,a+=f?`${l(o)}<span data-newline-symbol>${er(u)}</span>`:l(o),a+="</span>",a+=l(d),a+="</span>",e.plainTemplate=a,e.plainTemplateMode="relative"},Mn=({diffLine:e,syntaxLine:t,operator:n})=>{var i;if(!t||e.syntaxTemplate&&e.syntaxTemplateMode==="relative")return;const l=e.changes;if(!l||!l.hasLineChange)return;const r=Xn,s=l.range;let o=`<span data-range-start="${s.location}" data-range-end="${s.location+s.length}">`;(i=t==null?void 0:t.nodeList)===null||i===void 0||i.forEach(({node:d,wrapper:f})=>{var u,a,x,c,b,w;if(d.endIndex<s.location||s.location+s.length<d.startIndex)o+=`<span data-start="${d.startIndex}" data-end="${d.endIndex}" class="${(a=((u=f==null?void 0:f.properties)===null||u===void 0?void 0:u.className)||[])===null||a===void 0?void 0:a.join(" ")}" style="${((x=f==null?void 0:f.properties)===null||x===void 0?void 0:x.style)||""}">${r(d.value)}</span>`;else{const m=s.location-d.startIndex,v=m<0?0:m,h=d.value.slice(0,v),L=d.value.slice(v,m+s.length),p=d.value.slice(m+s.length),_=h.length||s.location===d.startIndex,N=p.length||d.endIndex===s.location+s.length-1,S=L.includes(`
|
|
10
|
-
`);o+=`<span data-start="${d.startIndex}" data-end="${d.endIndex}" class="${(b=((c=f==null?void 0:f.properties)===null||c===void 0?void 0:c.className)||[])===null||b===void 0?void 0:b.join(" ")}" style="${((w=f==null?void 0:f.properties)===null||w===void 0?void 0:w.style)||""}">${r(h)}<span data-diff-highlight style="background-color: var(${n==="add"?Ql:Jl});border-top-left-radius: ${_?"0.2em":"0"};border-bottom-left-radius: ${_?"0.2em":"0"};border-top-right-radius: ${N||S?"0.2em":"0"};border-bottom-right-radius: ${N||S?"0.2em":"0"}">${S?`${r(L)}<span data-newline-symbol>${er(l.newLineSymbol)}</span>`:r(L)}</span>${r(p)}</span>`}}),o+="</span>",e.syntaxTemplate=o,e.syntaxTemplateMode="relative"},tr=e=>{var t;let n="";const i=Xn;return(t=e==null?void 0:e.nodeList)===null||t===void 0||t.forEach(({node:l,wrapper:r})=>{var s,o,d;n+=`<span data-start="${l.startIndex}" data-end="${l.endIndex}" class="${(o=((s=r==null?void 0:r.properties)===null||s===void 0?void 0:s.className)||[])===null||o===void 0?void 0:o.join(" ")}" style="${((d=r==null?void 0:r.properties)===null||d===void 0?void 0:d.style)||""}">${i(l.value)}</span>`}),n},nr=e=>e?Xn(e):"",Ks=40;function qs(e,t){throw new Error(t)}function Ys(e){var t,n;if(e.length===0)return 0;for(let i=e.length-1;i>=0;i--){const l=e[i];for(let r=l.lines.length-1;r>=0;r--){const s=l.lines[r];if(s.type===ae.Hunk)continue;const o=(t=s.newLineNumber)!==null&&t!==void 0?t:0,d=(n=s.oldLineNumber)!==null&&n!==void 0?n:0;return o>d?o:d}}return 0}function Zs(e,t,n){const i=n===null?1/0:t.oldStartLine-n.header.oldStartLine-n.header.oldLineCount;return e===0?t.oldStartLine>1&&t.newStartLine>1?kt.Up:kt.None:i<=Ks?kt.Short:kt.Both}const ir=(e,t)=>{const n=[];for(let i=0;i<e;i++)n.push(t(i));return n},ml=e=>{const t=e.lastIndexOf(".");return e.slice(t+1)},wl=(e,t,{getAdditionRaw:n,getDeletionRaw:i,getAdditionSyntax:l,getDeletionSyntax:r})=>{if(e.length===t.length){const s=e.length;for(let o=0;o<s;o++){const d=e[o],f=t[o];if(!d.changes||!f.changes){const u=we.prototype.clone.call(d,n(d.newLineNumber)||d.text||""),a=we.prototype.clone.call(f,i(f.oldLineNumber)||f.text||""),{addRange:x,delRange:c}=Bs(u,a);d.changes=x,f.changes=c}(!d.plainTemplate||!f.plainTemplate)&&(On({diffLine:d,rawLine:n(d.newLineNumber),operator:"add"}),On({diffLine:f,rawLine:i(f.oldLineNumber),operator:"del"})),(!d.syntaxTemplate||!f.syntaxTemplate)&&(Mn({diffLine:d,syntaxLine:l(d.newLineNumber),operator:"add"}),Mn({diffLine:f,syntaxLine:r(f.oldLineNumber),operator:"del"}))}}},Xs=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,Qs=/[\u202A-\u202E]|[\u2066-\u2069]/,lr="+",rr="-",sr=" ",or="\\",dr=`
|
|
11
|
-
`,Js=new Set([lr,rr,sr,or,dr]);class eo{constructor(){Object.defineProperty(this,"__v_skip",{value:!0}),this.reset()}reset(){this.ls=0,this.le=-1,this.text=""}nextLine(){return this.ls=this.le+1,this.ls>=this.text.length?!1:(this.le=this.text.indexOf(`
|
|
12
|
-
`,this.ls),this.le===-1&&(this.le=this.text.length),this.ls!==this.le)}readLine(t){return t?this.nextLine()?this.text.substring(this.ls,this.le):null:this.nextLine()?this.text.substring(this.ls+1,this.le+1):this.text.length>this.ls?`
|
|
13
|
-
`:null}lineStartsWith(t){return this.text.startsWith(t,this.ls)}lineEndsWith(t){return this.text.endsWith(t,this.le)}peek(){const t=this.le+1;return t<this.text.length?this.text[t]:null}parseDiffHeader(){for(;this.nextLine();){if(this.lineStartsWith("Binary files ")&&this.lineEndsWith("differ"))return{isBinary:!0};if(this.lineStartsWith("---"),this.lineStartsWith("+++"))return{isBinary:!1}}return null}numberFromGroup(t,n,i=null){const l=t[n];if(!l){if(!i)throw new Error(`Group ${n} missing from regexp match and no defaultValue was provided`);return i}const r=parseInt(l,10);if(isNaN(r))throw new Error(`Could not parse capture group ${n} into number: ${l}`);return r}parseHunkHeader(t){const n=Xs.exec(t);if(!n)throw new Error("Invalid hunk header format");const i=this.numberFromGroup(n,1),l=this.numberFromGroup(n,2,1),r=this.numberFromGroup(n,3),s=this.numberFromGroup(n,4,1);return new Ps(i,l,r,s)}parseLinePrefix(t){return t&&t.length&&Js.has(t[0])?t[0]:null}parseHunk(t,n,i){const l=this.readLine(!0);if(!l)throw new Error("Expected hunk header but reached end of diff");const r=this.parseHunkHeader(l),s=new Array;s.push(new we(l,ae.Hunk,1,null,null));let o,d=r.oldStartLine,f=r.newStartLine,u=t;for(;o=this.parseLinePrefix(this.peek());){const a=this.readLine(!1);if(!a)throw new Error("Expected unified diff line but reached end of diff");if(o===or){if(a.length<12)throw new Error('Expected "no newline at end of file" marker to be at least 12 bytes long');const c=s.length-1,b=s[c];s[c]=b.withNoTrailingNewLine(!0);continue}u++;let x;if(o===lr)x=new we(a,ae.Add,u,null,f++);else if(o===rr)x=new we(a,ae.Delete,u,d++,null);else if(o===sr||o===dr)x=new we(a,ae.Context,u,d++,f++);else return qs(o,`Unknown DiffLinePrefix: ${o}`);s.push(x)}if(s.length===1)throw new Error("Malformed diff, empty hunk");return new Ms(r,s,t,t+s.length-1,Zs(n,r,i))}parse(t){this.text=t;try{const n=this.parseDiffHeader(),i=this.le,l=this.text.substring(0,i);if(!n)return{header:l,contents:"",hunks:[],isBinary:!1,maxLineNumber:0,hasHiddenBidiChars:!1};if(n.isBinary)return{header:l,contents:"",hunks:[],isBinary:!0,maxLineNumber:0,hasHiddenBidiChars:!1};const r=new Array;let s=0,o=null;do{const f=this.parseHunk(s,r.length,o);r.push(f),o=f,s+=f.lines.length}while(this.peek());const d=this.text.substring(i+1,this.le).replace(/\n\/g,"");return{header:l,contents:d,hunks:r,isBinary:n.isBinary,maxLineNumber:Ys(r),hasHiddenBidiChars:Qs.test(t)}}finally{this.reset()}}}const to=new eo;function g(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)}function E(e,t,n,i,l){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var kn,ln,Ct,_i;class no extends Map{constructor(){super(...arguments),kn.add(this),ln.set(this,[]),Ct.set(this,30)}get maxLength(){return g(this,Ct,"f")}setMaxLength(t){E(this,Ct,t),g(this,kn,"m",_i).call(this)}set(t,n){return g(this,Ct,"f")<=0?this:this.has(t)?this:(g(this,ln,"f").push(t),g(this,kn,"m",_i).call(this),super.set(t,n))}}ln=new WeakMap,Ct=new WeakMap,kn=new WeakSet,_i=function(){for(;g(this,ln,"f").length>g(this,Ct,"f");){const t=g(this,ln,"f").shift();this.delete(t)}};var ar;const Be=new no;Be.setMaxLength(50);Be.name="@git-diff-view/core";class hn{static createInstance(t){var n;const i=new hn(t==null?void 0:t.raw,t==null?void 0:t.lang,t==null?void 0:t.fileName);return i.ast=t==null?void 0:t.ast,i.rawFile=(t==null?void 0:t.rawFile)||{},i.plainFile=(t==null?void 0:t.plainFile)||{},i.hasDoRaw=t==null?void 0:t.hasDoRaw,i.rawLength=t==null?void 0:t.rawLength,i.syntaxFile=(t==null?void 0:t.syntaxFile)||{},i.hasDoSyntax=t==null?void 0:t.hasDoSyntax,i.syntaxLength=t==null?void 0:t.syntaxLength,i.highlighterName=t==null?void 0:t.highlighterName,i.highlighterType=t==null?void 0:t.highlighterType,i.maxLineNumber=t==null?void 0:t.maxLineNumber,i.enableTemplate=(n=t==null?void 0:t.enableTemplate)!==null&&n!==void 0?n:!0,i}constructor(t,n,i){ar.add(this),this.raw=t,this.lang=n,this.fileName=i,this.rawFile={},this.hasDoRaw=!1,this.syntaxFile={},this.plainFile={},this.hasDoSyntax=!1,this.maxLineNumber=0,this.enableTemplate=!0,this.raw=zs(t),Object.defineProperty(this,"__v_skip",{value:!0})}doSyntax({registerHighlighter:t,theme:n}){if(!this.raw||this.hasDoSyntax)return;const i=t||Nn;if(this.syntaxLength||this.rawLength>i.maxLineToIgnoreSyntax)return;let l=i;try{i.hasRegisteredCurrentLang(this.lang)||(l=Nn)}catch{l=Nn}if(this.ast=l.getAST(this.raw,this.fileName,this.lang,n),!this.ast)return;const{syntaxFileObject:r,syntaxFileLineNumber:s}=l.processAST(this.ast);this.enableTemplate&&Object.values(r).forEach(o=>{o.template=tr(o)}),this.syntaxFile=r,this.syntaxLength=s,this.highlighterName=l.name,this.highlighterType=l.type,this.hasDoSyntax=!0}doRaw(){if(!this.raw||this.hasDoRaw)return;const n=this.raw.split(`
|
|
14
|
-
`);this.rawLength=n.length,this.maxLineNumber=n.length,this.rawFile={},this.plainFile={};for(let i=0;i<n.length;i++)this.rawFile[i+1]=i<n.length-1?n[i]+`
|
|
15
|
-
`:n[i],this.enableTemplate&&(this.plainFile[i+1]={value:this.rawFile[i+1],template:nr(this.rawFile[i+1])});this.hasDoRaw=!0}}ar=new WeakSet;function Lt(e,t,n,i,l){let r=e+"--0.0.35--"+n+"--"+t;l&&(r=l+"--0.0.35--"+n+"--"+t);let s=e+"--0.0.35--"+(n==="light"?"dark":"light")+"--"+t;if(l&&(s=l+"--0.0.35--"+(n==="light"?"dark":"light")+"--"+t),Be.has(r))return Be.get(r);if(Be.has(s)){const d=Be.get(s);if(d.highlighterType==="class")return d}const o=new hn(e,t,i);return Be.set(r,o),o}const io=Be,ku=()=>Be.setMaxLength(0);var Y,ie,le,tt,nt,it,lt,vt,gt,Et,Ht,Qe,Je,je,Ue,me,ce,he,ue,ve,Xe,yt,St,It,Ft,Xt,He,rn,Se,sn,_t,bt,_e,Qt,ct,ht,Jt,Pe,ur,fr,bi,cr,xi,Ll,hr,Tt,At,on,dn,pl,$l;let oe=40;const li=new Set;class Pn{static createInstance(t,n){var i,l,r,s,o,d;const f=new Pn(((i=t==null?void 0:t.oldFile)===null||i===void 0?void 0:i.fileName)||"",((l=t==null?void 0:t.oldFile)===null||l===void 0?void 0:l.content)||"",((r=t==null?void 0:t.newFile)===null||r===void 0?void 0:r.fileName)||"",((s=t==null?void 0:t.newFile)===null||s===void 0?void 0:s.content)||"",(t==null?void 0:t.hunks)||[],((o=t==null?void 0:t.oldFile)===null||o===void 0?void 0:o.fileLang)||"",((d=t==null?void 0:t.newFile)===null||d===void 0?void 0:d.fileLang)||"");return n&&(n.isFullMerge?f._mergeFullBundle(n):f.mergeBundle(n)),f}constructor(t,n,i,l,r,s,o,d){Y.add(this),this.uuid=d,ie.set(this,void 0),le.set(this,void 0),tt.set(this,void 0),nt.set(this,void 0),it.set(this,void 0),lt.set(this,void 0),vt.set(this,void 0),gt.set(this,void 0),Et.set(this,void 0),Ht.set(this,void 0),Qe.set(this,void 0),Je.set(this,void 0),je.set(this,void 0),Ue.set(this,void 0),me.set(this,[]),ce.set(this,[]),he.set(this,void 0),ue.set(this,[]),ve.set(this,void 0),Xe.set(this,[]),yt.set(this,!1),St.set(this,!1),It.set(this,!1),Ft.set(this,!1),Xt.set(this,0),He.set(this,!1),rn.set(this,!1),Se.set(this,!0),sn.set(this,!1),_t.set(this,void 0),bt.set(this,void 0),_e.set(this,"light"),Qt.set(this,void 0),ct.set(this,{state:!1}),ht.set(this,{state:!1}),this._version_="0.0.35",this._oldFileName="",this._oldFileContent="",this._oldFileLang="",this._newFileName="",this._newFileContent="",this._newFileLang="",this._diffList=[],this.diffLineLength=0,this.splitLineLength=0,this.unifiedLineLength=0,this.fileLineLength=0,this.additionLength=0,this.deletionLength=0,this.hasSomeLineCollapsed=!1,Jt.set(this,""),Pe.set(this,new Map),this.getSplitLeftLine=u=>g(this,me,"f")[u],this.getSplitLineByLineNumber=(u,a)=>{var x,c;return a===C.old?(x=g(this,me,"f"))===null||x===void 0?void 0:x.find(b=>b.lineNumber===u):(c=g(this,ce,"f"))===null||c===void 0?void 0:c.find(b=>b.lineNumber===u)},this.getSplitLineIndexByLineNumber=(u,a)=>{var x,c;return a===C.old?(x=g(this,me,"f"))===null||x===void 0?void 0:x.findIndex(b=>b.lineNumber===u):(c=g(this,ce,"f"))===null||c===void 0?void 0:c.findIndex(b=>b.lineNumber===u)},this.getSplitRightLine=u=>g(this,ce,"f")[u],this.getSplitHunkLine=u=>{var a;return(a=g(this,he,"f"))===null||a===void 0?void 0:a[u]},this.onSplitHunkExpand=(u,a,x=!0)=>{var c,b;const w=(c=g(this,he,"f"))===null||c===void 0?void 0:c[a];if(!(!w||!w.splitInfo)&&!g(this,He,"f")){if(u==="all"){for(let m=w.splitInfo.startHiddenIndex;m<w.splitInfo.endHiddenIndex;m++){const v=g(this,me,"f")[m],h=g(this,ce,"f")[m];v!=null&&v.isHidden&&(v.isHidden=!1),h!=null&&h.isHidden&&(h.isHidden=!1)}w.splitInfo=Object.assign(Object.assign(Object.assign({},w.splitInfo),w.hunkInfo),{plainText:w.text,startHiddenIndex:w.splitInfo.endHiddenIndex})}else if(u==="down"){for(let m=w.splitInfo.startHiddenIndex;m<w.splitInfo.startHiddenIndex+oe;m++){const v=g(this,me,"f")[m],h=g(this,ce,"f")[m];v!=null&&v.isHidden&&(v.isHidden=!1),h!=null&&h.isHidden&&(h.isHidden=!1)}w.isLast?w.splitInfo=Object.assign(Object.assign({},w.splitInfo),{startHiddenIndex:w.splitInfo.startHiddenIndex+oe}):w.splitInfo=Object.assign(Object.assign({},w.splitInfo),{startHiddenIndex:w.splitInfo.startHiddenIndex+oe,plainText:`@@ -${w.splitInfo.oldStartIndex},${w.splitInfo.oldLength} +${w.splitInfo.newStartIndex},${w.splitInfo.newLength}`})}else{if(w.isLast)return;for(let p=w.splitInfo.endHiddenIndex-oe;p<w.splitInfo.endHiddenIndex;p++){const _=g(this,me,"f")[p],N=g(this,ce,"f")[p];_!=null&&_.isHidden&&(_.isHidden=!1),N!=null&&N.isHidden&&(N.isHidden=!1)}const m=w.splitInfo.oldStartIndex-oe,v=w.splitInfo.oldLength+oe,h=w.splitInfo.newStartIndex-oe,L=w.splitInfo.newLength+oe;w.splitInfo=Object.assign(Object.assign({},w.splitInfo),{endHiddenIndex:w.splitInfo.endHiddenIndex-oe,oldStartIndex:m,oldLength:v,newStartIndex:h,newLength:L,plainText:`@@ -${m},${v} +${h},${L}`}),(b=g(this,he,"f"))===null||b===void 0||delete b[a],g(this,he,"f")[w.splitInfo.endHiddenIndex]=w}x&&this.notifyAll()}},this.getUnifiedLine=u=>g(this,ue,"f")[u],this.getUnifiedLineByLineNumber=(u,a)=>{var x,c;return a===C.old?(x=g(this,ue,"f"))===null||x===void 0?void 0:x.find(b=>b.oldLineNumber===u):(c=g(this,ue,"f"))===null||c===void 0?void 0:c.find(b=>b.newLineNumber===u)},this.getUnifiedLineIndexByLineNumber=(u,a)=>{var x,c;return a===C.old?(x=g(this,ue,"f"))===null||x===void 0?void 0:x.findIndex(b=>b.oldLineNumber===u):(c=g(this,ue,"f"))===null||c===void 0?void 0:c.findIndex(b=>b.newLineNumber===u)},this.getUnifiedHunkLine=u=>{var a;return(a=g(this,ve,"f"))===null||a===void 0?void 0:a[u]},this.onUnifiedHunkExpand=(u,a,x=!0)=>{var c,b,w;if(g(this,He,"f"))return;const m=(c=g(this,ve,"f"))===null||c===void 0?void 0:c[a];if(!(!m||!m.unifiedInfo)){if(u==="all"){for(let v=m.unifiedInfo.startHiddenIndex;v<m.unifiedInfo.endHiddenIndex;v++){const h=(b=g(this,ue,"f"))===null||b===void 0?void 0:b[v];h!=null&&h.isHidden&&(h.isHidden=!1)}m.unifiedInfo=Object.assign(Object.assign(Object.assign({},m.unifiedInfo),m.hunkInfo),{plainText:m.text,startHiddenIndex:m.unifiedInfo.endHiddenIndex})}else if(u==="down"){for(let v=m.unifiedInfo.startHiddenIndex;v<m.unifiedInfo.startHiddenIndex+oe;v++){const h=g(this,ue,"f")[v];h!=null&&h.isHidden&&(h.isHidden=!1)}m.isLast?m.unifiedInfo=Object.assign(Object.assign({},m.unifiedInfo),{startHiddenIndex:m.unifiedInfo.startHiddenIndex+oe}):m.unifiedInfo=Object.assign(Object.assign({},m.unifiedInfo),{startHiddenIndex:m.unifiedInfo.startHiddenIndex+oe,plainText:`@@ -${m.unifiedInfo.oldStartIndex},${m.unifiedInfo.oldLength} +${m.unifiedInfo.newStartIndex},${m.unifiedInfo.newLength}`})}else{if(m.isLast)return;for(let _=m.unifiedInfo.endHiddenIndex-oe;_<m.unifiedInfo.endHiddenIndex;_++){const N=g(this,ue,"f")[_];N!=null&&N.isHidden&&(N.isHidden=!1)}const v=m.unifiedInfo.oldStartIndex-oe,h=m.unifiedInfo.oldLength+oe,L=m.unifiedInfo.newStartIndex-oe,p=m.unifiedInfo.newLength+oe;m.unifiedInfo=Object.assign(Object.assign({},m.unifiedInfo),{endHiddenIndex:m.unifiedInfo.endHiddenIndex-oe,oldStartIndex:v,oldLength:h,newStartIndex:L,newLength:p,plainText:`@@ -${v},${h} +${L},${p}`}),(w=g(this,ve,"f"))===null||w===void 0||delete w[a],g(this,ve,"f")[m.unifiedInfo.endHiddenIndex]=m}x&&this.notifyAll()}},this.onAllExpand=u=>{g(this,He,"f")||(u==="split"?(Object.keys(g(this,he,"f")||{}).forEach(a=>{this.onSplitHunkExpand("all",+a,!1)}),g(this,ct,"f").state=!0):(Object.keys(g(this,ve,"f")||{}).forEach(a=>{this.onUnifiedHunkExpand("all",+a,!1)}),g(this,ht,"f").state=!0),this.notifyAll())},this.onAllCollapse=u=>{g(this,He,"f")||(u==="split"?(Object.values(g(this,me,"f")||{}).forEach(a=>{!a.isHidden&&a._isHidden&&(a.isHidden=a._isHidden)}),Object.values(g(this,ce,"f")||{}).forEach(a=>{!a.isHidden&&a._isHidden&&(a.isHidden=a._isHidden)}),Object.values(g(this,he,"f")||{}).forEach(a=>{a.splitInfo&&(a.splitInfo=Object.assign(Object.assign({},a.splitInfo),{oldStartIndex:a.splitInfo._oldStartIndex,oldLength:a.splitInfo._oldLength,newStartIndex:a.splitInfo._newStartIndex,newLength:a.splitInfo._newLength,startHiddenIndex:a.splitInfo._startHiddenIndex,endHiddenIndex:a.splitInfo._endHiddenIndex,plainText:a.splitInfo._plainText}))}),Object.keys(g(this,he,"f")||{}).forEach(a=>{const x=g(this,he,"f")[a];x.splitInfo&&x.splitInfo.endHiddenIndex!==+a&&(delete g(this,he,"f")[a],g(this,he,"f")[x.splitInfo.endHiddenIndex]=x)}),g(this,ct,"f").state=!1):(Object.values(g(this,ue,"f")||{}).forEach(a=>{!a.isHidden&&a._isHidden&&(a.isHidden=a._isHidden)}),Object.values(g(this,ve,"f")||{}).forEach(a=>{a.unifiedInfo&&(a.unifiedInfo=Object.assign(Object.assign({},a.unifiedInfo),{oldStartIndex:a.unifiedInfo._oldStartIndex,oldLength:a.unifiedInfo._oldLength,newStartIndex:a.unifiedInfo._newStartIndex,newLength:a.unifiedInfo._newLength,startHiddenIndex:a.unifiedInfo._startHiddenIndex,endHiddenIndex:a.unifiedInfo._endHiddenIndex,plainText:a.unifiedInfo._plainText}))}),Object.keys(g(this,ve,"f")||{}).forEach(a=>{const x=g(this,ve,"f")[a];x.unifiedInfo&&x.unifiedInfo.endHiddenIndex!==+a&&(delete g(this,ve,"f")[a],g(this,ve,"f")[x.unifiedInfo.endHiddenIndex]=x)}),g(this,ht,"f").state=!1),this.notifyAll())},this.getOldFileContent=()=>{var u;return(u=g(this,ie,"f"))===null||u===void 0?void 0:u.raw},this.getNewFileContent=()=>{var u;return(u=g(this,le,"f"))===null||u===void 0?void 0:u.raw},this.getOldPlainLine=u=>{var a;return(a=g(this,Et,"f"))===null||a===void 0?void 0:a[u]},this.getOldSyntaxLine=u=>{var a;return(a=g(this,Qe,"f"))===null||a===void 0?void 0:a[u]},this.getNewPlainLine=u=>{var a;return(a=g(this,Ht,"f"))===null||a===void 0?void 0:a[u]},this.getNewSyntaxLine=u=>{var a;return(a=g(this,Je,"f"))===null||a===void 0?void 0:a[u]},this.subscribe=u=>(g(this,Xe,"f").push(u),()=>{E(this,Xe,g(this,Xe,"f").filter(a=>a!==u))}),this.notifyAll=u=>{var a;E(this,Xt,(a=g(this,Xt,"f"),a++,a)),g(this,Xe,"f").forEach(x=>{u&&x.isSyncExternal||x()}),g(this,Pe,"f").forEach((x,c)=>{c.notifyAll(!0)})},this.getUpdateCount=()=>g(this,Xt,"f"),this.getExpandEnabled=()=>!g(this,He,"f"),this.getBundle=()=>{const u=g(this,yt,"f"),a=g(this,St,"f"),x=g(this,It,"f"),c=g(this,Ft,"f"),b=g(this,vt,"f"),w=g(this,it,"f"),m=g(this,Et,"f"),v=g(this,Qe,"f"),h=g(this,je,"f"),L=g(this,gt,"f"),p=g(this,lt,"f"),_=g(this,Ht,"f"),N=g(this,Je,"f"),S=g(this,Ue,"f"),$=this.splitLineLength,A=this.unifiedLineLength,T=this.fileLineLength,W=this.additionLength,R=this.deletionLength,D=g(this,He,"f"),G=g(this,_t,"f"),O=g(this,bt,"f"),B=this.hasSomeLineCollapsed,U=g(this,ct,"f"),J=g(this,ht,"f"),Ae=g(this,me,"f"),De=g(this,ce,"f"),Re=g(this,he,"f"),ft=g(this,ue,"f"),hs=g(this,ve,"f"),vs=this._version_,gs=g(this,_e,"f"),_s=g(this,Se,"f");return{hasInitRaw:u,hasInitSyntax:a,hasBuildSplit:x,hasBuildUnified:c,oldFileLines:b,oldFileDiffLines:w,oldFilePlainLines:m,oldFileSyntaxLines:v,oldFilePlaceholderLines:h,newFileLines:L,newFileDiffLines:p,newFilePlainLines:_,newFileSyntaxLines:N,newFilePlaceholderLines:S,splitLineLength:$,unifiedLineLength:A,fileLineLength:T,additionLength:W,deletionLength:R,splitLeftLines:Ae,splitRightLines:De,splitHunkLines:Re,unifiedLines:ft,unifiedHunkLines:hs,highlighterName:G,highlighterType:O,composeByDiff:D,hasSomeLineCollapsed:B,hasExpandSplitAll:U,hasExpandUnifiedAll:J,version:vs,theme:gs,enableTemplate:_s,isFullMerge:!1}},this.mergeBundle=(u,a=!0)=>{E(this,yt,u.hasInitRaw),E(this,St,u.hasInitSyntax),E(this,It,u.hasBuildSplit),E(this,Ft,u.hasBuildUnified),E(this,He,u.composeByDiff),E(this,_t,u.highlighterName),E(this,bt,u.highlighterType),E(this,vt,u.oldFileLines),E(this,it,u.oldFileDiffLines),E(this,Et,u.oldFilePlainLines),E(this,Qe,u.oldFileSyntaxLines),E(this,je,u.oldFilePlaceholderLines),E(this,gt,u.newFileLines),E(this,lt,u.newFileDiffLines),E(this,Ht,u.newFilePlainLines),E(this,Je,u.newFileSyntaxLines),E(this,Ue,u.newFilePlaceholderLines),this.splitLineLength=u.splitLineLength,this.unifiedLineLength=u.unifiedLineLength,this.fileLineLength=u.fileLineLength,this.additionLength=u.additionLength,this.deletionLength=u.deletionLength,this.hasSomeLineCollapsed=u.hasSomeLineCollapsed,E(this,ct,u.hasExpandSplitAll),E(this,ht,u.hasExpandUnifiedAll),E(this,me,u.splitLeftLines),E(this,ce,u.splitRightLines),E(this,he,u.splitHunkLines),E(this,ue,u.unifiedLines),E(this,ve,u.unifiedHunkLines),E(this,_e,u.theme),E(this,Se,u.enableTemplate),E(this,rn,!0),a&&this.notifyAll()},this._getHighlighterName=()=>g(this,_t,"f")||"",this._getIsPureDiffRender=()=>g(this,He,"f"),this._getTheme=()=>g(this,_e,"f"),this._addClonedInstance=u=>{const a=()=>{this._notifyOthers(u),this._mergeFullBundle(u._getFullBundle(),!1)};a.isSyncExternal=!0;const x=u.subscribe(a);g(this,Pe,"f").set(u,x)},this._notifyOthers=u=>{g(this,Pe,"f").forEach((a,x)=>{x!==u&&x.notifyAll(!0)})},this._delClonedInstance=u=>{const a=g(this,Pe,"f").get(u);a==null||a(),g(this,Pe,"f").delete(u)},this._getFullBundle=()=>{const u=this.getBundle(),a=g(this,ie,"f"),x=g(this,le,"f"),c=g(this,nt,"f"),b=g(this,tt,"f");return Object.assign(Object.assign({},u),{oldFileResult:a,newFileResult:x,diffLines:c,diffListResults:b,isFullMerge:g(this,rn,"f")?g(this,sn,"f"):!0})},this._mergeFullBundle=(u,a=!0)=>{this.mergeBundle(u,a);try{E(this,ie,u.oldFileResult?hn.createInstance(u.oldFileResult):null,"f"),E(this,le,u.newFileResult?hn.createInstance(u.newFileResult):null,"f"),E(this,nt,u.diffLines,"f"),E(this,tt,u.diffListResults,"f"),E(this,sn,u.isFullMerge,"f")}catch{}},this._destroy=()=>{this.clearId(),g(this,Xe,"f").splice(0,g(this,Xe,"f").length),g(this,Pe,"f").forEach(u=>u()),g(this,Pe,"f").clear()},this.clear=()=>{this._destroy(),E(this,ie,null),E(this,le,null),E(this,nt,null),E(this,tt,null),E(this,lt,null),E(this,it,null),E(this,gt,null),E(this,vt,null),E(this,Je,null),E(this,Qe,null),E(this,he,null),E(this,me,null),E(this,ce,null),E(this,ve,null),E(this,ue,null),E(this,_e,void 0)},Object.defineProperty(this,"__v_skip",{value:!0});const f=Array.from(new Set(r));this._oldFileName=t,this._newFileName=i,this._diffList=f,this._oldFileLang=ml(s||t||o||i)||"txt",this._newFileLang=ml(o||i||s||t)||"txt",this._oldFileContent=n,this._newFileContent=l,this.initId()}initId(){let t="--"+Math.random().toString().slice(2);for(;li.has(t);)t="--"+Math.random().toString().slice(2);li.add(t),E(this,Jt,t)}getId(){return g(this,Jt,"f")}clearId(){li.delete(g(this,Jt,"f"))}initTheme(t){E(this,Qt,g(this,_e,"f")),E(this,_e,t||g(this,_e,"f")||"light")}initRaw(){g(this,yt,"f")||(g(this,Y,"m",fr).call(this),g(this,Y,"m",bi).call(this),g(this,Y,"m",ur).call(this),g(this,Y,"m",xi).call(this),g(this,Y,"m",cr).call(this),E(this,yt,!0))}initSyntax({registerHighlighter:t}={}){g(this,St,"f")&&(!g(this,Qt,"f")||g(this,_e,"f")===g(this,Qt,"f"))||(g(this,Y,"m",hr).call(this,{registerHighlighter:t}),g(this,Y,"m",xi).call(this),E(this,St,!0))}init(){this.initRaw(),this.initSyntax()}enableTemplate(){E(this,Se,!0)}disableTemplate(){E(this,Se,!1)}getIsEnableTemplate(){return g(this,Se,"f")}buildSplitDiffLines(){var t,n,i,l,r,s;if(g(this,It,"f"))return;let o=1,d=1,f=!0,u=1/0;const a=((t=g(this,ie,"f"))===null||t===void 0?void 0:t.maxLineNumber)||0,x=((n=g(this,le,"f"))===null||n===void 0?void 0:n.maxLineNumber)||0;for(;o<=a||d<=x;){const c=g(this,Y,"m",Tt).call(this,o),b=g(this,Y,"m",At).call(this,d),w=g(this,Y,"m",on).call(this,o),m=g(this,Y,"m",dn).call(this,d),v=we.prototype.isIncludeableLine.call(c||{}),h=we.prototype.isIncludeableLine.call(b||{}),L=g(this,ce,"f").length,p=!c&&!b;if(c&&!b){if(c.newLineNumber&&c.newLineNumber>d){d++;continue}(c.newLineNumber===null||c.newLineNumber===void 0)&&d++}if(b&&!c){if(b.oldLineNumber&&b.oldLineNumber>o){o++;continue}(b.oldLineNumber===null||b.oldLineNumber===void 0)&&o++}if(!c&&!w&&!b&&!m)break;if(!c&&!b){if(!((i=g(this,je,"f"))===null||i===void 0)&&i[o]&&(!((l=g(this,Ue,"f"))===null||l===void 0)&&l[d])){o++,d++;continue}if(!w&&(!((r=g(this,Ue,"f"))===null||r===void 0)&&r[d])){d++;continue}if(!m&&(!((s=g(this,je,"f"))===null||s===void 0)&&s[o])){o++;continue}}if(v&&h||!v&&!h?(g(this,me,"f").push({lineNumber:o++,value:w,diff:c,isHidden:p,_isHidden:p}),g(this,ce,"f").push({lineNumber:d++,value:m,diff:b,isHidden:p,_isHidden:p})):v?(g(this,me,"f").push({lineNumber:o++,value:w,diff:c,isHidden:p,_isHidden:p}),g(this,ce,"f").push({})):h&&(g(this,me,"f").push({}),g(this,ce,"f").push({lineNumber:d++,value:m,diff:b,isHidden:p,_isHidden:p})),!f&&p&&(u=L),p&&(this.hasSomeLineCollapsed=!0),f=p,c!=null&&c.prevHunkLine||b!=null&&b.prevHunkLine){const _=(c==null?void 0:c.prevHunkLine)||b.prevHunkLine;_.isFirst?(_.splitInfo=Object.assign(Object.assign({},_.hunkInfo),{startHiddenIndex:0,endHiddenIndex:_.hunkInfo.newStartIndex-1,plainText:_.text,_startHiddenIndex:0,_endHiddenIndex:_.hunkInfo.newStartIndex-1,_plainText:_.text}),u=1/0):Number.isFinite(u)&&(_.splitInfo=Object.assign(Object.assign({},_.hunkInfo),{startHiddenIndex:u,endHiddenIndex:L,plainText:_.text,_startHiddenIndex:u,_endHiddenIndex:L,_plainText:_.text}),u=1/0),E(this,he,Object.assign(Object.assign({},g(this,he,"f")),{[L]:_}))}}if(Number.isFinite(u)){const b=new we("",ae.Hunk,null,null,null);b.isLast=!0,b.splitInfo={startHiddenIndex:u,endHiddenIndex:g(this,ce,"f").length,_startHiddenIndex:u,_endHiddenIndex:g(this,ce,"f").length,plainText:"",oldStartIndex:0,newStartIndex:0,oldLength:0,newLength:0,_plainText:"",_oldStartIndex:0,_newStartIndex:0,_oldLength:0,_newLength:0},E(this,he,Object.assign(Object.assign({},g(this,he,"f")),{[g(this,ce,"f").length]:b})),u=1/0}this.splitLineLength=g(this,ce,"f").length,E(this,It,!0),this.notifyAll()}buildUnifiedDiffLines(){var t,n,i,l,r,s;if(g(this,Ft,"f"))return;let o=1,d=1,f=!0,u=1/0;const a=((t=g(this,ie,"f"))===null||t===void 0?void 0:t.maxLineNumber)||0,x=((n=g(this,le,"f"))===null||n===void 0?void 0:n.maxLineNumber)||0;for(;o<=a||d<=x;){const c=g(this,Y,"m",on).call(this,o),b=g(this,Y,"m",Tt).call(this,o),w=g(this,Y,"m",dn).call(this,d),m=g(this,Y,"m",At).call(this,d),v=we.prototype.isIncludeableLine.call(b||{}),h=we.prototype.isIncludeableLine.call(m||{}),L=g(this,ue,"f").length,p=!b&&!m;if(b&&!m){if(b.newLineNumber&&b.newLineNumber>d){d++;continue}(b.newLineNumber===null||b.newLineNumber===void 0)&&d++}if(m&&!b){if(m.oldLineNumber&&m.oldLineNumber>o){o++;continue}(m.oldLineNumber===null||m.oldLineNumber===void 0)&&o++}if(!c&&!w&&!m&&!b)break;if(!b&&!m){if(!((i=g(this,je,"f"))===null||i===void 0)&&i[o]&&(!((l=g(this,Ue,"f"))===null||l===void 0)&&l[d])){o++,d++;continue}if(!c&&(!((r=g(this,Ue,"f"))===null||r===void 0)&&r[d])){d++;continue}if(!w&&(!((s=g(this,je,"f"))===null||s===void 0)&&s[o])){o++;continue}}if(!v&&!h?g(this,ue,"f").push({oldLineNumber:o++,newLineNumber:d++,value:w,diff:m,isHidden:p,_isHidden:p}):v?g(this,ue,"f").push({oldLineNumber:o++,value:c,diff:b,isHidden:p,_isHidden:p}):h&&g(this,ue,"f").push({newLineNumber:d++,value:w,diff:m,isHidden:p,_isHidden:p}),!f&&p&&(u=L),p&&(this.hasSomeLineCollapsed=!0),f=p,b!=null&&b.prevHunkLine||m!=null&&m.prevHunkLine){const _=(b==null?void 0:b.prevHunkLine)||m.prevHunkLine;_.isFirst?(_.unifiedInfo=Object.assign(Object.assign({},_.hunkInfo),{startHiddenIndex:0,endHiddenIndex:_.hunkInfo.newStartIndex-1,plainText:_.text,_startHiddenIndex:0,_endHiddenIndex:_.hunkInfo.newStartIndex-1,_plainText:_.text}),u=1/0):Number.isFinite(u)&&(_.unifiedInfo=Object.assign(Object.assign({},_.hunkInfo),{startHiddenIndex:u,endHiddenIndex:L,plainText:_.text,_startHiddenIndex:u,_endHiddenIndex:L,_plainText:_.text}),u=1/0),E(this,ve,Object.assign(Object.assign({},g(this,ve,"f")),{[L]:_}))}}if(Number.isFinite(u)){const b=new we("",ae.Hunk,null,null,null);b.isLast=!0,b.unifiedInfo={startHiddenIndex:u,endHiddenIndex:g(this,ue,"f").length,_startHiddenIndex:u,_endHiddenIndex:g(this,ue,"f").length,plainText:"",oldStartIndex:0,newStartIndex:0,oldLength:0,newLength:0,_plainText:"",_oldStartIndex:0,_newStartIndex:0,_oldLength:0,_newLength:0},E(this,ve,Object.assign(Object.assign({},g(this,ve,"f")),{[g(this,ue,"f").length]:b})),u=1/0}this.unifiedLineLength=g(this,ue,"f").length,E(this,Ft,!0),this.notifyAll()}get hasExpandSplitAll(){return g(this,ct,"f").state}get hasExpandUnifiedAll(){return g(this,ht,"f").state}}ie=new WeakMap,le=new WeakMap,tt=new WeakMap,nt=new WeakMap,it=new WeakMap,lt=new WeakMap,vt=new WeakMap,gt=new WeakMap,Et=new WeakMap,Ht=new WeakMap,Qe=new WeakMap,Je=new WeakMap,je=new WeakMap,Ue=new WeakMap,me=new WeakMap,ce=new WeakMap,he=new WeakMap,ue=new WeakMap,ve=new WeakMap,Xe=new WeakMap,yt=new WeakMap,St=new WeakMap,It=new WeakMap,Ft=new WeakMap,Xt=new WeakMap,He=new WeakMap,rn=new WeakMap,Se=new WeakMap,sn=new WeakMap,_t=new WeakMap,bt=new WeakMap,_e=new WeakMap,Qt=new WeakMap,ct=new WeakMap,ht=new WeakMap,Jt=new WeakMap,Pe=new WeakMap,Y=new WeakSet,ur=function(){this._diffList&&E(this,tt,this._diffList.map(t=>to.parse(t)))},fr=function(){!this._oldFileContent&&!this._newFileContent||(this._oldFileContent&&(E(this,ie,Lt(this._oldFileContent,this._oldFileLang,g(this,_e,"f"),this._oldFileName,this.uuid?this.uuid+"-old":void 0)),g(this,ie,"f").enableTemplate=g(this,Se,"f")),this._newFileContent&&(E(this,le,Lt(this._newFileContent,this._newFileLang,g(this,_e,"f"),this._newFileName,this.uuid?this.uuid+"-new":void 0)),g(this,le,"f").enableTemplate=g(this,Se,"f")))},bi=function(){var t,n,i,l,r,s,o,d;(t=g(this,ie,"f"))===null||t===void 0||t.doRaw(),E(this,vt,(n=g(this,ie,"f"))===null||n===void 0?void 0:n.rawFile),E(this,Et,(i=g(this,ie,"f"))===null||i===void 0?void 0:i.plainFile),(l=g(this,le,"f"))===null||l===void 0||l.doRaw(),E(this,gt,(r=g(this,le,"f"))===null||r===void 0?void 0:r.rawFile),E(this,Ht,(s=g(this,le,"f"))===null||s===void 0?void 0:s.plainFile),this.fileLineLength=Math.max(this.fileLineLength,((o=g(this,ie,"f"))===null||o===void 0?void 0:o.maxLineNumber)||0,((d=g(this,le,"f"))===null||d===void 0?void 0:d.maxLineNumber)||0)},cr=function(){if(this._oldFileContent&&this._newFileContent)return;const t={},n={};if(!this._oldFileContent&&!this._newFileContent){let i=1,l=1,r="",s="",o=!1;for(;l<=this.diffLineLength||i<=this.diffLineLength;){const d=l++,f=i++,u=g(this,Y,"m",Tt).call(this,d),a=g(this,Y,"m",At).call(this,f);u?r+=u.text:(r+=`
|
|
16
|
-
`,t[d]=!0),a?s+=a.text:(s+=`
|
|
17
|
-
`,n[f]=!0),!o&&u&&a&&(o=o||u.noTrailingNewLine!==a.noTrailingNewLine)}if(!o&&r===s)return;this._oldFileContent=r,this._newFileContent=s,E(this,ie,Lt(this._oldFileContent,this._oldFileLang,g(this,_e,"f"),this._oldFileName,this.uuid?this.uuid+"-old":void 0)),g(this,ie,"f").enableTemplate=g(this,Se,"f"),E(this,le,Lt(this._newFileContent,this._newFileLang,g(this,_e,"f"),this._newFileName,this.uuid?this.uuid+"-new":void 0)),g(this,le,"f").enableTemplate=g(this,Se,"f"),E(this,je,t),E(this,Ue,n),E(this,He,!0)}else if(g(this,ie,"f")){let i=1,l=1,r="",s=!1;for(;l<=g(this,ie,"f").maxLineNumber;){const o=g(this,Y,"m",At).call(this,i++),d=g(this,Y,"m",Tt).call(this,l);o?(r+=o.text,l=o.oldLineNumber?o.oldLineNumber+1:l):(d||(r+=g(this,Y,"m",on).call(this,l)),l++),!s&&o&&d&&(s=s||o.noTrailingNewLine!==d.noTrailingNewLine)}if(!s&&r===this._oldFileContent)return;this._newFileContent=r,E(this,le,Lt(this._newFileContent,this._newFileLang,g(this,_e,"f"),this._newFileName,this.uuid?this.uuid+"-new":void 0)),g(this,le,"f").enableTemplate=g(this,Se,"f")}else if(g(this,le,"f")){let i=1,l=1,r="",s=!1;for(;l<=g(this,le,"f").maxLineNumber;){const o=g(this,Y,"m",Tt).call(this,i++),d=g(this,Y,"m",At).call(this,l);o?(r+=o.text,l=o.newLineNumber?o.newLineNumber+1:l):(d||(r+=g(this,Y,"m",dn).call(this,l)),l++),!s&&d&&o&&(s=s||d.noTrailingNewLine!==o.noTrailingNewLine)}if(!s&&r===this._newFileContent)return;this._oldFileContent=r,E(this,ie,Lt(this._oldFileContent,this._oldFileLang,g(this,_e,"f"),this._oldFileName,this.uuid?this.uuid+"-old":void 0)),g(this,ie,"f").enableTemplate=g(this,Se,"f")}g(this,Y,"m",bi).call(this)},xi=function(){var t;if(!(!((t=g(this,tt,"f"))===null||t===void 0)&&t.length))return;const n=d=>g(this,Y,"m",dn).call(this,d),i=d=>g(this,Y,"m",on).call(this,d),l=d=>g(this,Y,"m",$l).call(this,d),r=d=>g(this,Y,"m",pl).call(this,d);E(this,nt,[]),this.additionLength=0,this.deletionLength=0;const s=[];g(this,tt,"f").forEach(d=>{d.hunks.forEach(u=>{let a=[],x=[];u.lines.forEach(c=>{c.type===ae.Add?(a.push(c),this.additionLength++):c.type===ae.Delete?(x.push(c),this.deletionLength++):(wl(a,x,{getAdditionRaw:n,getDeletionRaw:i,getAdditionSyntax:l,getDeletionSyntax:r}),a=[],x=[]),s.push(c)}),wl(a,x,{getAdditionRaw:n,getDeletionRaw:i,getAdditionSyntax:l,getDeletionSyntax:r})})});let o=null;E(this,nt,s.map((d,f)=>{var u;const a=d;if(a.index=f,a.isFirst=f===0,a.type===ae.Hunk){const x=(u=a.text.split("@@"))===null||u===void 0?void 0:u[1].split(" ").filter(Boolean),c=(x==null?void 0:x[0])||"",b=(x==null?void 0:x[1])||"",[w,m]=c.split(","),[v,h]=b.split(",");a.hunkInfo={oldStartIndex:-Number(w),oldLength:Number(m),newStartIndex:+Number(v),newLength:Number(h),_oldStartIndex:-Number(w),_oldLength:Number(m),_newStartIndex:+Number(v),_newLength:Number(h)},o=a}else if(a.type===ae.Context){const x=d;o&&(x.prevHunkLine=o,o=null)}else o=null;return a})),E(this,it,{}),E(this,lt,{}),g(this,nt,"f").forEach(d=>{d.oldLineNumber&&(this.diffLineLength=Math.max(this.diffLineLength,d.oldLineNumber),g(this,it,"f")[d.oldLineNumber]=d),d.newLineNumber&&(this.diffLineLength=Math.max(this.diffLineLength,d.newLineNumber),g(this,lt,"f")[d.newLineNumber]=d)})},Ll=function({registerHighlighter:t}){var n,i,l,r;(n=g(this,ie,"f"))===null||n===void 0||n.doSyntax({registerHighlighter:t,theme:g(this,_e,"f")}),E(this,Qe,(i=g(this,ie,"f"))===null||i===void 0?void 0:i.syntaxFile),(l=g(this,le,"f"))===null||l===void 0||l.doSyntax({registerHighlighter:t,theme:g(this,_e,"f")}),E(this,Je,(r=g(this,le,"f"))===null||r===void 0?void 0:r.syntaxFile)},hr=function({registerHighlighter:t}={}){var n,i,l,r;g(this,bt,"f")!=="class"&&(g(this,rn,"f")&&!g(this,sn,"f")||(g(this,Y,"m",Ll).call(this,{registerHighlighter:t}),E(this,_t,((n=g(this,ie,"f"))===null||n===void 0?void 0:n.highlighterName)||((i=g(this,le,"f"))===null||i===void 0?void 0:i.highlighterName)||g(this,_t,"f")),E(this,bt,((l=g(this,ie,"f"))===null||l===void 0?void 0:l.highlighterType)||((r=g(this,le,"f"))===null||r===void 0?void 0:r.highlighterType)||g(this,bt,"f"))))},Tt=function(t){var n;if(t)return(n=g(this,it,"f"))===null||n===void 0?void 0:n[t]},At=function(t){var n;if(t)return(n=g(this,lt,"f"))===null||n===void 0?void 0:n[t]},on=function(t){var n;return(n=g(this,vt,"f"))===null||n===void 0?void 0:n[t]},dn=function(t){var n;return(n=g(this,gt,"f"))===null||n===void 0?void 0:n[t]},pl=function(t){var n;return(n=g(this,Qe,"f"))===null||n===void 0?void 0:n[t]},$l=function(t){var n;return(n=g(this,Je,"f"))===null||n===void 0?void 0:n[t]};var jn;(function(e){e[e.hunk=1]="hunk",e[e.content=2]="content",e[e.widget=3]="widget",e[e.extend=4]="extend"})(jn||(jn={}));var C;(function(e){e[e.old=1]="old",e[e.new=2]="new"})(C||(C={}));const vr=e=>{const t=e.splitLineLength,n=[];return ir(t,i=>{const l=e.getSplitLeftLine(i),r=e.getSplitRightLine(i);!(l!=null&&l.isHidden)&&!(r!=null&&r.isHidden)&&n.push({type:jn.content,index:i,lineNumber:i+1,splitLine:{left:l,right:r}})}),n},lo=e=>{const t=e.unifiedLineLength,n=[];return ir(t,i=>{const l=e.getUnifiedLine(i);l.isHidden||n.push({type:jn.content,index:i,lineNumber:i+1,unifiedLine:l})}),n};/**
|
|
18
|
-
* @vue/shared v3.5.24
|
|
19
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
|
-
* @license MIT
|
|
21
|
-
**/function ro(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const so=Object.assign,oo=Object.prototype.hasOwnProperty,mi=(e,t)=>oo.call(e,t),rt=Array.isArray,Rt=e=>Qn(e)==="[object Map]",gr=e=>Qn(e)==="[object Set]",ri=e=>typeof e=="function",ao=e=>typeof e=="string",xn=e=>typeof e=="symbol",ot=e=>e!==null&&typeof e=="object",uo=e=>(ot(e)||ri(e))&&ri(e.then)&&ri(e.catch),fo=Object.prototype.toString,Qn=e=>fo.call(e),co=e=>Qn(e).slice(8,-1),_r=e=>Qn(e)==="[object Object]",ji=e=>ao(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Wt=(e,t)=>!Object.is(e,t);/**
|
|
22
|
-
* @vue/reactivity v3.5.24
|
|
23
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
24
|
-
* @license MIT
|
|
25
|
-
**/let ye;class ho{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ye,!t&&ye&&(this.index=(ye.scopes||(ye.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ye;try{return ye=this,t()}finally{ye=n}}}on(){++this._on===1&&(this.prevScope=ye,ye=this)}off(){this._on>0&&--this._on===0&&(ye=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0}}}function vo(e){return new ho(e)}let ee;const si=new WeakSet;class go{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ye&&ye.active&&ye.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,si.has(this)&&(si.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_o(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yl(this),xr(this);const t=ee,n=Te;ee=this,Te=!0;try{return this.fn()}finally{mr(this),ee=t,Te=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Vi(t);this.deps=this.depsTail=void 0,yl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?si.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){wi(this)&&this.run()}get dirty(){return wi(this)}}let br=0,an,un;function _o(e,t=!1){if(e.flags|=8,t){e.next=un,un=e;return}e.next=an,an=e}function Ui(){br++}function Bi(){if(--br>0)return;if(un){let t=un;for(un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;an;){let t=an;for(an=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function xr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function mr(e){let t,n=e.depsTail,i=n;for(;i;){const l=i.prevDep;i.version===-1?(i===n&&(n=l),Vi(i),xo(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=l}e.deps=t,e.depsTail=n}function wi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function bo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Un)||(e.globalVersion=Un,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!wi(e))))return;e.flags|=2;const t=e.dep,n=ee,i=Te;ee=e,Te=!0;try{xr(e);const l=e.fn(e._value);(t.version===0||Wt(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{ee=n,Te=i,mr(e),e.flags&=-3}}function Vi(e,t=!1){const{dep:n,prevSub:i,nextSub:l}=e;if(i&&(i.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Vi(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Te=!0;const wr=[];function mo(){wr.push(Te),Te=!1}function wo(){const e=wr.pop();Te=e===void 0?!0:e}function yl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ee;ee=void 0;try{t()}finally{ee=n}}}let Un=0;class Lo{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Lr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ee||!Te||ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ee)n=this.activeLink=new Lo(ee,this),ee.deps?(n.prevDep=ee.depsTail,ee.depsTail.nextDep=n,ee.depsTail=n):ee.deps=ee.depsTail=n,pr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=ee.depsTail,n.nextDep=void 0,ee.depsTail.nextDep=n,ee.depsTail=n,ee.deps===n&&(ee.deps=i)}return n}trigger(t){this.version++,Un++,this.notify(t)}notify(t){Ui();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Bi()}}}function pr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)pr(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Li=new WeakMap,mt=Symbol(""),pi=Symbol(""),vn=Symbol("");function pe(e,t,n){if(Te&&ee){let i=Li.get(e);i||Li.set(e,i=new Map);let l=i.get(n);l||(i.set(n,l=new Lr),l.map=i,l.key=n),l.track()}}function et(e,t,n,i,l,r){const s=Li.get(e);if(!s){Un++;return}const o=d=>{d&&d.trigger()};if(Ui(),t==="clear")s.forEach(o);else{const d=rt(e),f=d&&ji(n);if(d&&n==="length"){const u=Number(i);s.forEach((a,x)=>{(x==="length"||x===vn||!xn(x)&&x>=u)&&o(a)})}else switch((n!==void 0||s.has(void 0))&&o(s.get(n)),f&&o(s.get(vn)),t){case"add":d?f&&o(s.get("length")):(o(s.get(mt)),Rt(e)&&o(s.get(pi)));break;case"delete":d||(o(s.get(mt)),Rt(e)&&o(s.get(pi)));break;case"set":Rt(e)&&o(s.get(mt));break}}Bi()}function pt(e){const t=Z(e);return t===e?t:(pe(t,"iterate",vn),dt(e)?t:t.map(Le))}function Gi(e){return pe(e=Z(e),"iterate",vn),e}const po={__proto__:null,[Symbol.iterator](){return oi(this,Symbol.iterator,Le)},concat(...e){return pt(this).concat(...e.map(t=>rt(t)?pt(t):t))},entries(){return oi(this,"entries",e=>(e[1]=Le(e[1]),e))},every(e,t){return Me(this,"every",e,t,void 0,arguments)},filter(e,t){return Me(this,"filter",e,t,n=>n.map(Le),arguments)},find(e,t){return Me(this,"find",e,t,Le,arguments)},findIndex(e,t){return Me(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Me(this,"findLast",e,t,Le,arguments)},findLastIndex(e,t){return Me(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Me(this,"forEach",e,t,void 0,arguments)},includes(...e){return di(this,"includes",e)},indexOf(...e){return di(this,"indexOf",e)},join(e){return pt(this).join(e)},lastIndexOf(...e){return di(this,"lastIndexOf",e)},map(e,t){return Me(this,"map",e,t,void 0,arguments)},pop(){return Zt(this,"pop")},push(...e){return Zt(this,"push",e)},reduce(e,...t){return Sl(this,"reduce",e,t)},reduceRight(e,...t){return Sl(this,"reduceRight",e,t)},shift(){return Zt(this,"shift")},some(e,t){return Me(this,"some",e,t,void 0,arguments)},splice(...e){return Zt(this,"splice",e)},toReversed(){return pt(this).toReversed()},toSorted(e){return pt(this).toSorted(e)},toSpliced(...e){return pt(this).toSpliced(...e)},unshift(...e){return Zt(this,"unshift",e)},values(){return oi(this,"values",Le)}};function oi(e,t,n){const i=Gi(e),l=i[t]();return i!==e&&!dt(e)&&(l._next=l.next,l.next=()=>{const r=l._next();return r.done||(r.value=n(r.value)),r}),l}const $o=Array.prototype;function Me(e,t,n,i,l,r){const s=Gi(e),o=s!==e&&!dt(e),d=s[t];if(d!==$o[t]){const a=d.apply(e,r);return o?Le(a):a}let f=n;s!==e&&(o?f=function(a,x){return n.call(this,Le(a),x,e)}:n.length>2&&(f=function(a,x){return n.call(this,a,x,e)}));const u=d.call(s,f,i);return o&&l?l(u):u}function Sl(e,t,n,i){const l=Gi(e);let r=n;return l!==e&&(dt(e)?n.length>3&&(r=function(s,o,d){return n.call(this,s,o,d,e)}):r=function(s,o,d){return n.call(this,s,Le(o),d,e)}),l[t](r,...i)}function di(e,t,n){const i=Z(e);pe(i,"iterate",vn);const l=i[t](...n);return(l===-1||l===!1)&&Oo(n[0])?(n[0]=Z(n[0]),i[t](...n)):l}function Zt(e,t,n=[]){mo(),Ui();const i=Z(e)[t].apply(e,n);return Bi(),wo(),i}const yo=ro("__proto__,__v_isRef,__isVue"),$r=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(xn));function So(e){xn(e)||(e=String(e));const t=Z(this);return pe(t,"has",e),t.hasOwnProperty(e)}class yr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const l=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!l;if(n==="__v_isReadonly")return l;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(l?r?Do:Fr:r?Ao:Ir).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const s=rt(t);if(!l){let d;if(s&&(d=po[n]))return d;if(n==="hasOwnProperty")return So}const o=Reflect.get(t,n,st(t)?t:i);if((xn(n)?$r.has(n):yo(n))||(l||pe(t,"get",n),r))return o;if(st(o)){const d=s&&ji(n)?o:o.value;return l&&ot(d)?Bn(d):d}return ot(o)?l?Bn(o):zi(o):o}}class Io extends yr{constructor(t=!1){super(!1,t)}set(t,n,i,l){let r=t[n];if(!this._isShallow){const d=Pt(r);if(!dt(i)&&!Pt(i)&&(r=Z(r),i=Z(i)),!rt(t)&&st(r)&&!st(i))return d||(r.value=i),!0}const s=rt(t)&&ji(n)?Number(n)<t.length:mi(t,n),o=Reflect.set(t,n,i,st(t)?t:l);return t===Z(l)&&(s?Wt(i,r)&&et(t,"set",n,i):et(t,"add",n,i)),o}deleteProperty(t,n){const i=mi(t,n);t[n];const l=Reflect.deleteProperty(t,n);return l&&i&&et(t,"delete",n,void 0),l}has(t,n){const i=Reflect.has(t,n);return(!xn(n)||!$r.has(n))&&pe(t,"has",n),i}ownKeys(t){return pe(t,"iterate",rt(t)?"length":mt),Reflect.ownKeys(t)}}class Fo extends yr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const No=new Io,ko=new Fo,$i=e=>e,Ln=e=>Reflect.getPrototypeOf(e);function Co(e,t,n){return function(...i){const l=this.__v_raw,r=Z(l),s=Rt(r),o=e==="entries"||e===Symbol.iterator&&s,d=e==="keys"&&s,f=l[e](...i),u=n?$i:t?yi:Le;return!t&&pe(r,"iterate",d?pi:mt),{next(){const{value:a,done:x}=f.next();return x?{value:a,done:x}:{value:o?[u(a[0]),u(a[1])]:u(a),done:x}},[Symbol.iterator](){return this}}}}function pn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Eo(e,t){const n={get(l){const r=this.__v_raw,s=Z(r),o=Z(l);e||(Wt(l,o)&&pe(s,"get",l),pe(s,"get",o));const{has:d}=Ln(s),f=t?$i:e?yi:Le;if(d.call(s,l))return f(r.get(l));if(d.call(s,o))return f(r.get(o));r!==s&&r.get(l)},get size(){const l=this.__v_raw;return!e&&pe(Z(l),"iterate",mt),l.size},has(l){const r=this.__v_raw,s=Z(r),o=Z(l);return e||(Wt(l,o)&&pe(s,"has",l),pe(s,"has",o)),l===o?r.has(l):r.has(l)||r.has(o)},forEach(l,r){const s=this,o=s.__v_raw,d=Z(o),f=t?$i:e?yi:Le;return!e&&pe(d,"iterate",mt),o.forEach((u,a)=>l.call(r,f(u),f(a),s))}};return so(n,e?{add:pn("add"),set:pn("set"),delete:pn("delete"),clear:pn("clear")}:{add(l){!t&&!dt(l)&&!Pt(l)&&(l=Z(l));const r=Z(this);return Ln(r).has.call(r,l)||(r.add(l),et(r,"add",l,l)),this},set(l,r){!t&&!dt(r)&&!Pt(r)&&(r=Z(r));const s=Z(this),{has:o,get:d}=Ln(s);let f=o.call(s,l);f||(l=Z(l),f=o.call(s,l));const u=d.call(s,l);return s.set(l,r),f?Wt(r,u)&&et(s,"set",l,r):et(s,"add",l,r),this},delete(l){const r=Z(this),{has:s,get:o}=Ln(r);let d=s.call(r,l);d||(l=Z(l),d=s.call(r,l)),o&&o.call(r,l);const f=r.delete(l);return d&&et(r,"delete",l,void 0),f},clear(){const l=Z(this),r=l.size!==0,s=l.clear();return r&&et(l,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=Co(l,e,t)}),n}function Sr(e,t){const n=Eo(e,t);return(i,l,r)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?i:Reflect.get(mi(n,l)&&l in i?n:i,l,r)}const Ho={get:Sr(!1,!1)},To={get:Sr(!0,!1)},Ir=new WeakMap,Ao=new WeakMap,Fr=new WeakMap,Do=new WeakMap;function Ro(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wo(e){return e.__v_skip||!Object.isExtensible(e)?0:Ro(co(e))}function zi(e){return Pt(e)?e:Nr(e,!1,No,Ho,Ir)}function Bn(e){return Nr(e,!0,ko,To,Fr)}function Nr(e,t,n,i,l){if(!ot(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Wo(e);if(r===0)return e;const s=l.get(e);if(s)return s;const o=new Proxy(e,r===2?i:n);return l.set(e,o),o}function Pt(e){return!!(e&&e.__v_isReadonly)}function dt(e){return!!(e&&e.__v_isShallow)}function Oo(e){return e?!!e.__v_raw:!1}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}const Le=e=>ot(e)?zi(e):e,yi=e=>ot(e)?Bn(e):e;function st(e){return e?e.__v_isRef===!0:!1}function Ee(e){return Mo(e,!1)}function Mo(e,t){return st(e)?e:new Po(e,t)}class Po{constructor(t,n){this.dep=new Lr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Z(t),this._value=n?t:Le(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||dt(t)||Pt(t);t=i?t:Z(t),Wt(t,n)&&(this._rawValue=t,this._value=i?t:Le(t),this.dep.trigger())}}const kr={SKIP:"__v_skip"};var Cr={exports:{}},z={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Ki=Symbol.for("react.transitional.element"),jo=Symbol.for("react.portal"),Uo=Symbol.for("react.fragment"),Bo=Symbol.for("react.strict_mode"),Vo=Symbol.for("react.profiler"),Go=Symbol.for("react.consumer"),zo=Symbol.for("react.context"),Ko=Symbol.for("react.forward_ref"),qo=Symbol.for("react.suspense"),Yo=Symbol.for("react.memo"),Er=Symbol.for("react.lazy"),Zo=Symbol.for("react.activity"),Il=Symbol.iterator;function Xo(e){return e===null||typeof e!="object"?null:(e=Il&&e[Il]||e["@@iterator"],typeof e=="function"?e:null)}var Hr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tr=Object.assign,Ar={};function Kt(e,t,n){this.props=e,this.context=t,this.refs=Ar,this.updater=n||Hr}Kt.prototype.isReactComponent={};Kt.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dr(){}Dr.prototype=Kt.prototype;function qi(e,t,n){this.props=e,this.context=t,this.refs=Ar,this.updater=n||Hr}var Yi=qi.prototype=new Dr;Yi.constructor=qi;Tr(Yi,Kt.prototype);Yi.isPureReactComponent=!0;var Fl=Array.isArray;function Si(){}var te={H:null,A:null,T:null,S:null},Rr=Object.prototype.hasOwnProperty;function Zi(e,t,n){var i=n.ref;return{$$typeof:Ki,type:e,key:t,ref:i!==void 0?i:null,props:n}}function Qo(e,t){return Zi(e.type,t,e.props)}function Xi(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ki}function Jo(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Nl=/\/+/g;function ai(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jo(""+e.key):t.toString(36)}function ed(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Si,Si):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Nt(e,t,n,i,l){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(r){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ki:case jo:s=!0;break;case Er:return s=e._init,Nt(s(e._payload),t,n,i,l)}}if(s)return l=l(e),s=i===""?"."+ai(e,0):i,Fl(l)?(n="",s!=null&&(n=s.replace(Nl,"$&/")+"/"),Nt(l,t,n,"",function(f){return f})):l!=null&&(Xi(l)&&(l=Qo(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(Nl,"$&/")+"/")+s)),t.push(l)),1;s=0;var o=i===""?".":i+":";if(Fl(e))for(var d=0;d<e.length;d++)i=e[d],r=o+ai(i,d),s+=Nt(i,t,n,r,l);else if(d=Xo(e),typeof d=="function")for(e=d.call(e),d=0;!(i=e.next()).done;)i=i.value,r=o+ai(i,d++),s+=Nt(i,t,n,r,l);else if(r==="object"){if(typeof e.then=="function")return Nt(ed(e),t,n,i,l);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function $n(e,t,n){if(e==null)return e;var i=[],l=0;return Nt(e,i,"","",function(r){return t.call(n,r,l++)}),i}function td(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},nd={map:$n,forEach:function(e,t,n){$n(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $n(e,function(){t++}),t},toArray:function(e){return $n(e,function(t){return t})||[]},only:function(e){if(!Xi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};z.Activity=Zo;z.Children=nd;z.Component=Kt;z.Fragment=Uo;z.Profiler=Vo;z.PureComponent=qi;z.StrictMode=Bo;z.Suspense=qo;z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te;z.__COMPILER_RUNTIME={__proto__:null,c:function(e){return te.H.useMemoCache(e)}};z.cache=function(e){return function(){return e.apply(null,arguments)}};z.cacheSignal=function(){return null};z.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=Tr({},e.props),l=e.key;if(t!=null)for(r in t.key!==void 0&&(l=""+t.key),t)!Rr.call(t,r)||r==="key"||r==="__self"||r==="__source"||r==="ref"&&t.ref===void 0||(i[r]=t[r]);var r=arguments.length-2;if(r===1)i.children=n;else if(1<r){for(var s=Array(r),o=0;o<r;o++)s[o]=arguments[o+2];i.children=s}return Zi(e.type,l,i)};z.createContext=function(e){return e={$$typeof:zo,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Go,_context:e},e};z.createElement=function(e,t,n){var i,l={},r=null;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)Rr.call(t,i)&&i!=="key"&&i!=="__self"&&i!=="__source"&&(l[i]=t[i]);var s=arguments.length-2;if(s===1)l.children=n;else if(1<s){for(var o=Array(s),d=0;d<s;d++)o[d]=arguments[d+2];l.children=o}if(e&&e.defaultProps)for(i in s=e.defaultProps,s)l[i]===void 0&&(l[i]=s[i]);return Zi(e,r,l)};z.createRef=function(){return{current:null}};z.forwardRef=function(e){return{$$typeof:Ko,render:e}};z.isValidElement=Xi;z.lazy=function(e){return{$$typeof:Er,_payload:{_status:-1,_result:e},_init:td}};z.memo=function(e,t){return{$$typeof:Yo,type:e,compare:t===void 0?null:t}};z.startTransition=function(e){var t=te.T,n={};te.T=n;try{var i=e(),l=te.S;l!==null&&l(n,i),typeof i=="object"&&i!==null&&typeof i.then=="function"&&i.then(Si,kl)}catch(r){kl(r)}finally{t!==null&&n.types!==null&&(t.types=n.types),te.T=t}};z.unstable_useCacheRefresh=function(){return te.H.useCacheRefresh()};z.use=function(e){return te.H.use(e)};z.useActionState=function(e,t,n){return te.H.useActionState(e,t,n)};z.useCallback=function(e,t){return te.H.useCallback(e,t)};z.useContext=function(e){return te.H.useContext(e)};z.useDebugValue=function(){};z.useDeferredValue=function(e,t){return te.H.useDeferredValue(e,t)};z.useEffect=function(e,t){return te.H.useEffect(e,t)};z.useEffectEvent=function(e){return te.H.useEffectEvent(e)};z.useId=function(){return te.H.useId()};z.useImperativeHandle=function(e,t,n){return te.H.useImperativeHandle(e,t,n)};z.useInsertionEffect=function(e,t){return te.H.useInsertionEffect(e,t)};z.useLayoutEffect=function(e,t){return te.H.useLayoutEffect(e,t)};z.useMemo=function(e,t){return te.H.useMemo(e,t)};z.useOptimistic=function(e,t){return te.H.useOptimistic(e,t)};z.useReducer=function(e,t,n){return te.H.useReducer(e,t,n)};z.useRef=function(e){return te.H.useRef(e)};z.useState=function(e){return te.H.useState(e)};z.useSyncExternalStore=function(e,t,n){return te.H.useSyncExternalStore(e,t,n)};z.useTransition=function(){return te.H.useTransition()};z.version="19.2.0";Cr.exports=z;var $e=Cr.exports,Wr={exports:{}},Or={};/**
|
|
34
|
-
* @license React
|
|
35
|
-
* use-sync-external-store-shim.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var jt=$e;function id(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ld=typeof Object.is=="function"?Object.is:id,rd=jt.useState,sd=jt.useEffect,od=jt.useLayoutEffect,dd=jt.useDebugValue;function ad(e,t){var n=t(),i=rd({inst:{value:n,getSnapshot:t}}),l=i[0].inst,r=i[1];return od(function(){l.value=n,l.getSnapshot=t,ui(l)&&r({inst:l})},[e,n,t]),sd(function(){return ui(l)&&r({inst:l}),e(function(){ui(l)&&r({inst:l})})},[e]),dd(n),n}function ui(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ld(e,n)}catch{return!0}}function ud(e,t){return t()}var fd=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ud:ad;Or.useSyncExternalStore=jt.useSyncExternalStore!==void 0?jt.useSyncExternalStore:fd;Wr.exports=Or;var cd=Wr.exports,Vn;(function(e){e.$$__ignore__$$="$$__ignore__$$",e.$$__persist__$$="$$__persist__$$",e.$$__subscribe__$$="$$__subscribe__$$",e.$$__redux_dev_tool__$$="$$__redux_dev_tool__$$"})(Vn||(Vn={}));const en=new Set,hd=20;let Ii=!1,Fi=0;const Mr=()=>{const e=[...en.values()].slice(0);en.clear();for(const t of e)t.notify();if(Ii=!1,en.size){if(Fi++,Fi>hd)throw new Error(`[reactivity-store] have a infinity update for current store, pendingJobs: ${new Set(en)}`);Mr()}},vd=e=>{en.add(e),!Ii&&(Ii=!0,Fi=0,Promise.resolve().then(Mr))};class gd extends go{get _isControllerEffect(){return!0}constructor(t){super(t)}}const _d=(e,t)=>()=>{if(t._isActive)try{const n=e();if(uo(n))throw new Error("[reactivity-store] selector should be a pure function, but current is a async function");return n}catch{return null}};class Cl{constructor(t,n,i,l,r){this._getState=t,this._compare=n,this._lifeCycle=i,this._namespace=l,this._onUpdate=r,this._listeners=new Set,this._updateCount=0,this._isActive=!0,this.notify=()=>{var s;if(this._isActive){this._updateCount++;try{(s=this._onUpdate)===null||s===void 0||s.call(this)}catch{this._lifeCycle.canUpdateComponent=!1}this._listeners.forEach(o=>o())}},this._scheduler=()=>{const s=this._effect.run();if(!this._isActive)return;const o=this._compare(this._state,s);this._state=s,o||this._lifeCycle.canUpdateComponent&&(this._lifeCycle.syncUpdateComponent?this.notify():vd(this))},this.subscribe=s=>(this._listeners.add(s),()=>this._listeners.delete(s)),this.getState=()=>this._updateCount,this.getEffect=()=>this._effect,this.getSelectorState=()=>this._getStateSafe(),this.getLifeCycle=()=>this._lifeCycle,this._getStateSafe=_d(t,this),this._effect=new gd(this._getStateSafe),this._effect.scheduler=this._scheduler}run(){this._state=this._effect.run()}stop(){this._effect.stop(),this._listeners.clear(),this._isActive=!1,this._state=null}setActive(t){this._isActive=t}}const bd=()=>({onBeforeMount:[],onBeforeUpdate:[],onBeforeUnmount:[],onMounted:[],onUpdated:[],onUnmounted:[],hasHookInstall:!1,canUpdateComponent:!0,syncUpdateComponent:!1});function xd(e,t){if(!ot(e)||e[kr.SKIP]||$e.isValidElement(e)||(t=t||new Set,t.has(e)))return e;if(t.add(e),st(e))xt(e.value,t);else if(rt(e))for(let n=0;n<e.length;n++)xt(e[n],t);else if(gr(e)||Rt(e))e.forEach(n=>{xt(n,t)});else if(_r(e))for(const n in e)xt(e[n],t);return e}function Ni(e){if(!ot(e)||e[kr.SKIP]||$e.isValidElement(e))return e;if(st(e))e.value;else if(rt(e))for(let t=0;t<e.length;t++)e[t];else if(gr(e)||Rt(e))e.forEach(t=>{});else if(_r(e))for(const t in e)e[t];return e}function xt(e,t){return xd(e,t)}const ki=e=>{const t=$e.useRef(e);return t.current=e,$e.useCallback((...i)=>{var l;return(l=t.current)===null||l===void 0?void 0:l.call(null,...i)},[])},md=(e,t)=>{const n=$e.useRef();return n.current=typeof e=="function"?e:null,ki(l=>{if(n.current){const r=n.current(l);return t?xt(r):Ni(r),r}else return t?xt(l):Ni(l),l})},El=e=>{const t=$e.useRef(e);return $e.useEffect(()=>{t.current=e},[e]),t.current},wd=(e,t,n,i,l=!0,r=!1,s=!0,o,d=void 0)=>{const f=new Set;let u=!0;o=o||Vn.$$__ignore__$$;const a=L=>{const p=L==="default"?l:L==="deep"||L==="deep-stable",_=L==="default"?r:L==="deep-stable"||L==="shallow-stable";function N(S,$){const A=$e.useRef(),T=md(S,p),W=ki(()=>{S?A.current=S(Object.assign(Object.assign({},t),d)):A.current=Object.assign(Object.assign({},t),d)}),R=ki((B,U)=>$&&typeof $=="function"?$(B,U):!1),D=_?S:El(S),G=s?$:El($),O=$e.useMemo(()=>new Cl(()=>T(e),R,i,o,W),[]);return cd.useSyncExternalStore(O.subscribe,O.getState,O.getState),$e.useMemo(()=>{O.run(),W()},[O,W]),$e.useMemo(()=>{D!==S&&(O.run(),W())},[O,D,S]),$e.useMemo(()=>{G!==$&&(O.run(),W())},[O,G,$]),$e.useEffect(()=>(O.setActive(!0),f.add(O),()=>{O.stop(),f.delete(O)}),[O]),A.current}return N},x=a("default"),c=a("deep"),b=a("deep-stable"),w=a("shallow"),m=a("shallow-stable");function v(L,p){return x(L,p)}const h=v;return h.getState=()=>Z(n),h.getLifeCycle=()=>i,h.getActions=()=>d,h.getReactiveState=()=>e,h.getReadonlyState=()=>t,h.useDeepSelector=c,h.useDeepStableSelector=b,h.useShallowSelector=w,h.useShallowStableSelector=m,h.subscribe=(L,p,_)=>{const N=()=>{const $=L(e);return _?Ni($):xt($),$},S=new Cl(N,Object.is,i,Vn.$$__subscribe__$$,()=>p());return S.run(),f.add(S),()=>{f.delete(S),S.stop()}},h.getIsActive=()=>u,h.clear=()=>{f.forEach(L=>L.stop()),u=!1},h},Ld=e=>e.$$__state__$$?e.$$__state__$$:e,pd=(e,t="createStore",n)=>{const i=e(),l=Ld(i),r=Z(l),s=zi(l),o=Bn(l),d=bd();return wd(s,o,r,d)},$d=(e,t="createStore",n)=>{const i=vo(),l=i.run(()=>pd(e,t));return l.scope=i,l},yd=e=>$d(e),P=e=>y(()=>e());function Sd(e,t,n){let i=n.length,l=t.length,r=i,s=0,o=0,d=t[l-1].nextSibling,f=null;for(;s<l||o<r;){if(t[s]===n[o]){s++,o++;continue}for(;t[l-1]===n[r-1];)l--,r--;if(l===s){const u=r<i?o?n[o-1].nextSibling:n[r-o]:d;for(;o<r;)e.insertBefore(n[o++],u)}else if(r===o)for(;s<l;)(!f||!f.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[r-1]&&n[o]===t[l-1]){const u=t[--l].nextSibling;e.insertBefore(n[o++],t[s++].nextSibling),e.insertBefore(n[--r],u),t[l]=n[r]}else{if(!f){f=new Map;let a=o;for(;a<r;)f.set(n[a],a++)}const u=f.get(t[s]);if(u!=null)if(o<u&&u<r){let a=s,x=1,c;for(;++a<l&&a<r&&!((c=f.get(t[a]))==null||c!==u+x);)x++;if(x>u-o){const b=t[s];for(;o<u;)e.insertBefore(n[o++],b)}else e.replaceChild(n[o++],t[s++])}else s++;else t[s++].remove()}}}const Hl="_$DX_DELEGATE";function H(e,t,n,i){let l;const r=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},s=()=>(l||(l=r())).cloneNode(!0);return s.cloneNode=s,s}function wt(e,t=window.document){const n=t[Hl]||(t[Hl]=new Set);for(let i=0,l=e.length;i<l;i++){const r=e[i];n.has(r)||(n.add(r),t.addEventListener(r,Id))}}function M(e,t,n){Qi(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function fe(e,t){Qi(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ge(e,t,n){if(!t)return n?M(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let l,r;for(r in n)t[r]==null&&i.removeProperty(r),delete n[r];for(r in t)l=t[r],l!==n[r]&&(i.setProperty(r,l),n[r]=l);return n}function I(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Ot(e,t,n){return xe(()=>e(t,n))}function F(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return Gn(e,t,i,n);j(l=>Gn(e,t(),l,n),i)}function Qi(e){return!!V.context&&!V.done&&(!e||e.isConnected)}function Id(e){if(V.registry&&V.events&&V.events.find(([d,f])=>f===e))return;let t=e.target;const n=`$$${e.type}`,i=e.target,l=e.currentTarget,r=d=>Object.defineProperty(e,"target",{configurable:!0,value:d}),s=()=>{const d=t[n];if(d&&!t.disabled){const f=t[`${n}Data`];if(f!==void 0?d.call(t,f,e):d.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&r(t.host),!0},o=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),V.registry&&!V.done&&(V.done=_$HY.done=!0),e.composedPath){const d=e.composedPath();r(d[0]);for(let f=0;f<d.length-2&&(t=d[f],!!s());f++){if(t._$host){t=t._$host,o();break}if(t.parentNode===l)break}}else o();r(i)}function Gn(e,t,n,i,l){const r=Qi(e);if(r){!n&&(n=[...e.childNodes]);let d=[];for(let f=0;f<n.length;f++){const u=n[f];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():d.push(u)}n=d}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,o=i!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(r||s==="number"&&(t=t.toString(),t===n))return n;if(o){let d=n[0];d&&d.nodeType===3?d.data!==t&&(d.data=t):d=document.createTextNode(t),n=$t(e,n,i,d)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(r)return n;n=$t(e,n,i)}else{if(s==="function")return j(()=>{let d=t();for(;typeof d=="function";)d=d();n=Gn(e,d,n,i)}),()=>n;if(Array.isArray(t)){const d=[],f=n&&Array.isArray(n);if(Ci(d,t,n,l))return j(()=>n=Gn(e,d,n,i,!0)),()=>n;if(r){if(!d.length)return n;if(i===void 0)return n=[...e.childNodes];let u=d[0];if(u.parentNode!==e)return n;const a=[u];for(;(u=u.nextSibling)!==i;)a.push(u);return n=a}if(d.length===0){if(n=$t(e,n,i),o)return n}else f?n.length===0?Tl(e,d,i):Sd(e,n,d):(n&&$t(e),Tl(e,d));n=d}else if(t.nodeType){if(r&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=$t(e,n,i,t);$t(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ci(e,t,n,i){let l=!1;for(let r=0,s=t.length;r<s;r++){let o=t[r],d=n&&n[e.length],f;if(!(o==null||o===!0||o===!1))if((f=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))l=Ci(e,o,d)||l;else if(f==="function")if(i){for(;typeof o=="function";)o=o();l=Ci(e,Array.isArray(o)?o:[o],Array.isArray(d)?d:[d])||l}else e.push(o),l=!0;else{const u=String(o);d&&d.nodeType===3&&d.data===u?e.push(d):e.push(document.createTextNode(u))}}return l}function Tl(e,t,n=null){for(let i=0,l=t.length;i<l;i++)e.insertBefore(t[i],n)}function $t(e,t,n,i){if(n===void 0)return e.textContent="";const l=i||document.createTextNode("");if(t.length){let r=!1;for(let s=t.length-1;s>=0;s--){const o=t[s];if(l!==o){const d=o.parentNode===e;!r&&!s?d?e.replaceChild(l,o):e.insertBefore(l,n):d&&o.remove()}else r=!0}}else e.insertBefore(l,n);return[l]}function yn(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)}function Fd(e,t,n,i,l){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ei,Cn,En,Pr;let fi=null;const Nd=(e,t)=>`${e.fontFamily}-${e.fontStyle}-${e.fontSize}-${t}`,kd=(e,t)=>Nd(e,"0".repeat(t.length));class Cd{constructor(){Ei.add(this),Cn.set(this,""),En.set(this,{})}measure(t,n){const i=kd(n,t);if(yn(this,En,"f")[i])return yn(this,En,"f")[i];const l=yn(this,Ei,"m",Pr).call(this);if(n){const s=`${n.fontFamily}-${n.fontStyle}-${n.fontSize}`;yn(this,Cn,"f")!==s&&(Fd(this,Cn,s),l.font=`${n.fontStyle||""} ${n.fontSize||""} ${n.fontFamily||""}`)}else l.font="";return l.measureText(t).width}}Cn=new WeakMap,En=new WeakMap,Ei=new WeakSet,Pr=function(){return fi=fi||document.createElement("canvas").getContext("2d"),fi};let ci=null;const Ed=()=>(ci=ci||new Cd,ci),jr="--diff-add-content--",Ur="--diff-del-content--",at="--diff-border--",Br="--diff-add-lineNumber--",Vr="--diff-del-lineNumber--",Gr="--diff-plain-content--",Hi="--diff-expand-content--",ke="--diff-plain-lineNumber-color--",zn="--diff-expand-lineNumber-color--",zr="--diff-plain-lineNumber--",Hd="--diff-expand-lineNumber--",ze="--diff-hunk-content--",Ut="--diff-hunk-content-color--",Bt="--diff-hunk-lineNumber--",Kr="--diff-add-content-highlight--",qr="--diff-del-content-highlight--",Yr="--diff-add-widget--",Zr="--diff-add-widget-color--",Ze="--diff-empty-content--",Ti=(e,t,n)=>e?`var(${jr})`:t?`var(${Ur})`:n?`var(${Gr})`:`var(${Hi})`,Ai=(e,t,n)=>e?`var(${Br})`:t?`var(${Vr})`:n?`var(${zr})`:`var(${Hd})`,Ke=()=>{const e=window.getSelection();for(let t=0;t<e.rangeCount;t++)e.removeRange(e.getRangeAt(t))},Td=(e,t)=>{const n=function(i){i===null||i.target===null||(i.target===e?(t.scrollTop=e.scrollTop,t.scrollLeft=e.scrollLeft):(e.scrollTop=t.scrollTop,e.scrollLeft=t.scrollLeft))};return e.onscroll||(e.onscroll=n),t.onscroll||(t.onscroll=n),()=>{e.onscroll=null,t.onscroll=null}},Xr=e=>{if(e){const t=e.getRootNode();return t instanceof ShadowRoot?t:e.ownerDocument}return document},Ji=e=>{var t,n;if(e)if(typeof e.closest=="function"){const i=e.closest('[data-component="git-diff-view"]'),l=(t=i==null?void 0:i.querySelector)===null||t===void 0?void 0:t.call(i,".diff-view-wrapper");return(n=l==null?void 0:l.getAttribute)===null||n===void 0?void 0:n.call(l,"id")}else{let i=e;for(;i;){if(i.getAttribute&&i.getAttribute("data-component")==="git-diff-view")return i.querySelector(".diff-view-wrapper").getAttribute("id");i=i.parentElement}}},ge="--diff-font-size--",ne="--diff-aside-width--";var qe;(function(e){e[e.CRLF=1]="CRLF",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.NEWLINE=4]="NEWLINE",e[e.NORMAL=5]="NORMAL",e[e.NULL=6]="NULL"})(qe||(qe={}));const Qr=e=>{switch(e){case qe.LF:return"␊";case qe.CR:return"␍";case qe.CRLF:return"␍␊";default:return""}};var ut;(function(e){e[e.SplitGitHub=1]="SplitGitHub",e[e.SplitGitLab=2]="SplitGitLab",e[e.Split=3]="Split",e[e.Unified=4]="Unified"})(ut||(ut={}));const Jr=Zn(),Ad=()=>gn(Jr),Ce=e=>()=>{const t=Ad(),[n,i]=K(t==null?void 0:t.getReadonlyState()[e]);return re(()=>{const l=()=>i(()=>t==null?void 0:t.getReadonlyState()[e]);l();const r=t==null?void 0:t.subscribe(s=>s[e],()=>l());de(()=>r==null?void 0:r())}),n},qt=Ce("enableWrap"),el=Ce("fontSize"),Jn=Ce("isMounted"),tl=({text:e,font:t})=>{var n;const i=Jn();let l=6;const r=parseInt(((n=t==null?void 0:t())==null?void 0:n.fontSize)||"14");l+=r>10?(r-10)*.6:0;const[s,o]=K(l*e().length);return re(()=>{i()&&o(Ed().measure(e(),(t==null?void 0:t())||{}))}),s},es=Ce("mode"),ts=Ce("id"),ns=Ce("dom"),ei=({selector:e,enable:t})=>{const n=ts(),i=ns(),l=Jn(),[r,s]=K(0);return re(()=>{if(l()&&t()){const f=Xr(i()).querySelector(`#diff-root${n()}`),u=f==null?void 0:f.querySelector(e());if(!u)return;const a=u,x=()=>{const w=u==null?void 0:u.getBoundingClientRect();s((w==null?void 0:w.width)??0)};x();const c=()=>{var w,m,v;(w=a==null?void 0:a.__observeCallback)==null||w.delete(x),((m=a==null?void 0:a.__observeCallback)==null?void 0:m.size)===0&&((v=a.__observeInstance)==null||v.disconnect(),a.removeAttribute("data-observe"),delete a.__observeCallback,delete a.__observeInstance)};if(a.__observeCallback){a.__observeCallback.add(x),de(()=>c());return}a.__observeCallback=new Set,a.__observeCallback.add(x);const b=new ResizeObserver(()=>{var w,m;return(m=(w=a==null?void 0:a.__observeCallback)==null?void 0:w.forEach)==null?void 0:m.call(w,v=>v())});a.__observeInstance=b,b.observe(a),a.setAttribute("data-observe","height"),de(()=>c())}}),r},ti=({selector:e,wrapper:t,side:n,enable:i})=>{const l=ts(),r=ns(),s=Jn();re(()=>{if(s()&&i()){let d=()=>{};const u=Xr(r()).querySelector(`#diff-root${l()}`),a=Array.from((u==null?void 0:u.querySelectorAll(e()))||[]),x=t()?Array.from((u==null?void 0:u.querySelectorAll(t()))||[]):a;if(a.length===2&&x.length===2){const c=a[0],b=a[1],w=x[0],m=x[1],v=c.getAttribute("data-side")===n()?c:b,h=v,L=()=>{c.style.height="auto",b.style.height="auto";const N=c.getBoundingClientRect(),S=b.getBoundingClientRect(),$=Math.max(N.height,S.height);w.style.height=$+"px",m.style.height=$+"px",w.setAttribute("data-sync-height",String($)),m.setAttribute("data-sync-height",String($))};L();const p=()=>{var N,S,$;(N=h.__observeCallback)==null||N.delete(L),((S=h.__observeCallback)==null?void 0:S.size)===0&&(($=h.__observeInstance)==null||$.disconnect(),v.removeAttribute("data-observe"),delete h.__observeCallback,delete h.__observeInstance)};if(h.__observeCallback){h.__observeCallback.add(L),d=p;return}h.__observeCallback=new Set,h.__observeCallback.add(L);const _=new ResizeObserver(()=>{var N;return(N=h.__observeCallback)==null?void 0:N.forEach(S=>S())});h.__observeInstance=_,_.observe(v),v.setAttribute("data-observe","height"),d=p}de(()=>d())}})},nl=Ce("extendData"),il=Ce("renderExtendLine"),ll=Ce("renderWidgetLine"),rl=Ce("enableAddWidget"),sl=Ce("enableHighlight"),ol=Ce("onAddWidgetClick");var Dd=H('<div><button class="diff-add-widget z-[1] flex h-full w-full origin-center cursor-pointer items-center justify-center rounded-md text-[1.2em]">+'),Rd=H('<div class="diff-add-widget-wrapper invisible absolute left-[100%] translate-x-[-50%] select-none transition-transform hover:scale-110 group-hover:visible"><button class="diff-add-widget z-[1] flex h-full w-full origin-center cursor-pointer items-center justify-center rounded-md text-[1.2em]">+');const tn=e=>(()=>{var t=Dd(),n=t.firstChild;return I(t,"width",`calc(var(${ge}) * 1.4)`),I(t,"height",`calc(var(${ge}) * 1.4)`),I(t,"top",`calc(var(${ge}) * 0.1)`),n.$$click=()=>{var i,l,r;e.onOpenAddWidget(e.lineNumber,e.side),(r=(l=(i=e.onWidgetClick)==null?void 0:i.call(e))==null?void 0:l.current)==null||r.call(l,e.lineNumber,e.side)},I(n,"color",`var(${Zr})`),I(n,"background-color",`var(${Yr})`),j(()=>fe(t,"diff-add-widget-wrapper invisible select-none transition-transform hover:scale-110 group-hover:visible"+(e.class?" "+e.class:""))),t})(),dl=e=>(()=>{var t=Rd(),n=t.firstChild;return I(t,"width",`calc(var(${ge}) * 1.4)`),I(t,"height",`calc(var(${ge}) * 1.4)`),I(t,"top",`calc(var(${ge}) * 0.1)`),n.$$click=()=>{var i,l,r;e.onOpenAddWidget(e.lineNumber,e.side),(r=(l=(i=e.onWidgetClick)==null?void 0:i.call(e))==null?void 0:l.current)==null||r.call(l,e.lineNumber,e.side)},I(n,"color",`var(${Zr})`),I(n,"background-color",`var(${Yr})`),t})();wt(["click"]);var Wd=H('<svg aria-label="No newline at end of file"role=img viewBox="0 0 16 16"version=1.1 fill=currentColor><path d="M4.25 7.25a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5h-7.5Z"></path><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z">');const Kn=()=>Wd();var Al=H("<span class=diff-line-content-raw><span data-template>"),Od=H("<span class=diff-line-content-raw>"),Md=H("<span class=diff-line-content-raw><span><span data-diff-highlight class=rounded-[0.2em]>"),is=H("<span data-newline-symbol>"),qn=H("<span data-no-newline-at-end-of-file-symbol>"),Dl=H("<span class=diff-line-syntax-raw><span data-template>"),Pd=H("<span class=diff-line-syntax-raw>"),Rl=H("<span>"),jd=H("<span class=diff-line-syntax-raw><span>"),Ud=H("<span><span data-diff-highlight>"),Bd=H('<div class="diff-line-content-item pl-[2.0em]"><span class="diff-line-content-operator ml-[-1.5em] inline-block w-[1.5em] select-none indent-[0.2em]">');const ls=e=>{const t=()=>{var i,l;return(l=(i=e.diffLine)==null?void 0:i.changes)==null?void 0:l.newLineSymbol};return y(()=>{var i;e.enableTemplate&&e.operator&&e.diffLine&&!((i=e.diffLine)!=null&&i.plainTemplate)&&typeof On=="function"&&On({diffLine:e.diffLine,rawLine:e.rawLine,operator:e.operator}),e.enableTemplate&&e.plainLine&&!e.plainLine.template&&(e.plainLine.template=nr(e.plainLine.value))}),k(X,{get when(){var i,l;return(l=(i=e.diffLine)==null?void 0:i.changes)==null?void 0:l.hasLineChange},get fallback(){return k(X,{get when(){var i;return P(()=>!!e.enableTemplate)()&&((i=e.plainLine)==null?void 0:i.template)},get fallback(){return(()=>{var i=Od();return F(i,()=>e.rawLine),i})()},get children(){var i=Al(),l=i.firstChild;return j(()=>{var r;return l.innerHTML=(r=e.plainLine)==null?void 0:r.template}),i}})},get children(){return k(X,{get when(){var i;return P(()=>!!e.enableTemplate)()&&((i=e.diffLine)==null?void 0:i.plainTemplate)},get fallback(){return function(){var i,l;const r=(l=(i=e.diffLine)==null?void 0:i.changes)==null?void 0:l.range,s=e.rawLine.slice(0,r==null?void 0:r.location),o=e.rawLine.slice(r==null?void 0:r.location,((r==null?void 0:r.location)||0)+((r==null?void 0:r.length)||0)),d=e.rawLine.slice(((r==null?void 0:r.location)||0)+((r==null?void 0:r.length)||0)),f=o.includes(`
|
|
42
|
-
`),u=f?o.replace(`
|
|
43
|
-
`,"").replace("\r",""):o;return(()=>{var a=Md(),x=a.firstChild,c=x.firstChild;return F(x,s,c),F(c,f?[u,(()=>{var b=is();return F(b,()=>Qr(t())),b})()]:o),F(x,d,null),F(a,(()=>{var b=P(()=>t()===qe.NEWLINE);return()=>b()&&(()=>{var w=qn();return I(w,"width",`var(${ge})`),I(w,"height",`var(${ge})`),F(w,k(Kn,{})),j(()=>fe(w,e.enableWrap?"block !text-red-500":"inline-block align-middle !text-red-500")),w})()})(),null),j(b=>{var w=r==null?void 0:r.location,m=((r==null?void 0:r.location)||0)+((r==null?void 0:r.length)||0),v=e.operator==="add"?`var(${Kr})`:`var(${qr})`;return w!==b.e&&M(x,"data-range-start",b.e=w),m!==b.t&&M(x,"data-range-end",b.t=m),v!==b.a&&I(c,"background-color",b.a=v),b},{e:void 0,t:void 0,a:void 0}),a})()}()},get children(){var i=Al(),l=i.firstChild;return F(i,(()=>{var r=P(()=>t()===qe.NEWLINE);return()=>r()&&(()=>{var s=qn();return I(s,"width",`var(${ge})`),I(s,"height",`var(${ge})`),F(s,k(Kn,{})),j(()=>fe(s,e.enableWrap?"block !text-red-500":"inline-block align-middle !text-red-500")),s})()})(),null),j(()=>{var r;return l.innerHTML=(r=e.diffLine)==null?void 0:r.plainTemplate}),i}})}})},Vd=e=>{const t=()=>{var l,r;return(r=(l=e.diffLine)==null?void 0:l.changes)==null?void 0:r.range},n=()=>{var l,r;return(r=(l=e.diffLine)==null?void 0:l.changes)==null?void 0:r.newLineSymbol};return y(()=>{var l,r;e.enableTemplate&&e.diffLine&&e.syntaxLine&&e.operator&&!((l=e.diffLine)!=null&&l.syntaxTemplate)&&typeof Mn=="function"&&Mn({diffLine:e.diffLine,syntaxLine:e.syntaxLine,operator:e.operator}),e.enableTemplate&&e.syntaxLine&&!((r=e.syntaxLine)!=null&&r.template)&&(e.syntaxLine.template=tr(e.syntaxLine))}),k(X,{get when(){return e.syntaxLine},get fallback(){return k(ls,{get rawLine(){return e.rawLine},get diffLine(){return e.diffLine},get operator(){return e.operator},get enableWrap(){return e.enableWrap},get enableTemplate(){return e.enableTemplate}})},get children(){return k(X,{get when(){var l,r;return(r=(l=e.diffLine)==null?void 0:l.changes)==null?void 0:r.hasLineChange},get fallback(){return k(X,{get when(){var l;return P(()=>!!e.enableTemplate)()&&((l=e.syntaxLine)==null?void 0:l.template)},get fallback(){return(()=>{var l=Pd();return F(l,k(cn,{get each(){var r;return((r=e.syntaxLine)==null?void 0:r.nodeList)||[]},children:({node:r,wrapper:s})=>(()=>{var o=Rl();return F(o,()=>r.value),j(d=>{var f,u,a,x=r.startIndex,c=r.endIndex,b=(u=(f=s==null?void 0:s.properties)==null?void 0:f.className)==null?void 0:u.join(" "),w=(a=s==null?void 0:s.properties)==null?void 0:a.style;return x!==d.e&&M(o,"data-start",d.e=x),c!==d.t&&M(o,"data-end",d.t=c),b!==d.a&&fe(o,d.a=b),d.o=Ge(o,w,d.o),d},{e:void 0,t:void 0,a:void 0,o:void 0}),o})()})),l})()},get children(){var l=Dl(),r=l.firstChild;return j(()=>{var s;return r.innerHTML=(s=e.syntaxLine)==null?void 0:s.template}),l}})},get children(){return k(X,{get when(){var l;return P(()=>!!e.enableTemplate)()&&((l=e.diffLine)==null?void 0:l.syntaxTemplate)},get fallback(){return(()=>{var l=jd(),r=l.firstChild;return F(r,k(cn,{get each(){var s;return(s=e.syntaxLine)==null?void 0:s.nodeList},children:({node:s,wrapper:o})=>{if(s.endIndex<t().location||t().location+t().length<s.startIndex)return(()=>{var d=Rl();return F(d,()=>s.value),j(f=>{var u,a,x,c=s.startIndex,b=s.endIndex,w=(a=(u=o==null?void 0:o.properties)==null?void 0:u.className)==null?void 0:a.join(" "),m=(x=o==null?void 0:o.properties)==null?void 0:x.style;return c!==f.e&&M(d,"data-start",f.e=c),b!==f.t&&M(d,"data-end",f.t=b),w!==f.a&&fe(d,f.a=w),f.o=Ge(d,m,f.o),f},{e:void 0,t:void 0,a:void 0,o:void 0}),d})();{const d=t().location-s.startIndex,f=d<0?0:d,u=s.value.slice(0,f),a=s.value.slice(f,d+t().length),x=s.value.slice(d+t().length),c=u.length||t().location===s.startIndex,b=x.length||s.endIndex===t().location+t().length-1,w=a.includes(`
|
|
44
|
-
`),m=w?a.replace(`
|
|
45
|
-
`,"").replace("\r",""):a;return(()=>{var v=Ud(),h=v.firstChild;return F(v,u,h),I(h,"border-top-left-radius",c?"0.2em":void 0),I(h,"border-bottom-left-radius",c?"0.2em":void 0),I(h,"border-top-right-radius",b||w?"0.2em":void 0),I(h,"border-bottom-right-radius",b||w?"0.2em":void 0),F(h,w?[m,(()=>{var L=is();return F(L,()=>Qr(n())),L})()]:a),F(v,x,null),j(L=>{var p,_,N,S=s.startIndex,$=s.endIndex,A=(_=(p=o==null?void 0:o.properties)==null?void 0:p.className)==null?void 0:_.join(" "),T=(N=o==null?void 0:o.properties)==null?void 0:N.style,W=e.operator==="add"?`var(${Kr})`:`var(${qr})`;return S!==L.e&&M(v,"data-start",L.e=S),$!==L.t&&M(v,"data-end",L.t=$),A!==L.a&&fe(v,L.a=A),L.o=Ge(v,T,L.o),W!==L.i&&I(h,"background-color",L.i=W),L},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),v})()}}})),F(l,(()=>{var s=P(()=>n()===qe.NEWLINE);return()=>s()&&(()=>{var o=qn();return I(o,"width",`var(${ge})`),I(o,"height",`var(${ge})`),F(o,k(Kn,{})),j(()=>fe(o,e.enableWrap?"block !text-red-500":"inline-block align-middle !text-red-500")),o})()})(),null),j(s=>{var o,d,f,u=(o=t())==null?void 0:o.location,a=(((d=t())==null?void 0:d.location)||0)+(((f=t())==null?void 0:f.length)||0);return u!==s.e&&M(r,"data-range-start",s.e=u),a!==s.t&&M(r,"data-range-end",s.t=a),s},{e:void 0,t:void 0}),l})()},get children(){var l=Dl(),r=l.firstChild;return F(l,(()=>{var s=P(()=>n()===qe.NEWLINE);return()=>s()&&(()=>{var o=qn();return I(o,"width",`var(${ge})`),I(o,"height",`var(${ge})`),F(o,k(Kn,{})),j(()=>fe(o,e.enableWrap?"block !text-red-500":"inline-block align-middle !text-red-500")),o})()})(),null),j(()=>{var s;return r.innerHTML=(s=e.diffLine)==null?void 0:s.syntaxTemplate}),l}})}})}})},Vt=e=>{const t=()=>{var r;return((r=e.diffLine)==null?void 0:r.type)===ae.Add},n=()=>{var r;return((r=e.diffLine)==null?void 0:r.type)===ae.Delete},i=()=>{var r,s,o;return(r=e.syntaxLine)!=null&&r.nodeList?((o=(s=e.syntaxLine)==null?void 0:s.nodeList)==null?void 0:o.length)>150:!1},l=()=>{var r,s;return((s=(r=e.diffFile).getIsEnableTemplate)==null?void 0:s.call(r))??!0};return(()=>{var r=Bd(),s=r.firstChild;return F(s,(()=>{var o=P(()=>!!t());return()=>o()?"+":n()?"-":" "})()),F(r,(()=>{var o=P(()=>!!(e.enableHighlight&&e.syntaxLine&&!i()));return()=>o()?k(Vd,{get operator(){return P(()=>!!t())()?"add":n()?"del":void 0},get rawLine(){return e.rawLine},get diffLine(){return e.diffLine},get syntaxLine(){return e.syntaxLine},get enableWrap(){return e.enableWrap},get enableTemplate(){return l()}}):k(ls,{get operator(){return P(()=>!!t())()?"add":n()?"del":void 0},get rawLine(){return e.rawLine},get diffLine(){return e.diffLine},get plainLine(){return e.plainLine},get enableWrap(){return e.enableWrap},get enableTemplate(){return l()}})})(),null),j(o=>{var d=e.enableWrap?"pre-wrap":"pre",f=e.enableWrap?"break-all":"initial",u=t()?"+":n()?"-":void 0;return d!==o.e&&I(r,"white-space",o.e=d),f!==o.t&&I(r,"word-break",o.t=f),u!==o.a&&M(s,"data-operator",o.a=u),o},{e:void 0,t:void 0,a:void 0}),r})()},rs=Zn(),Yt=()=>gn(rs);var Gd=H("<tr>"),zd=H("<td><span>"),Kd=H("<td>"),qd=H("<td colspan=2><span> ");const Yd=e=>{const[t,n]=Yt()||[],i=rl(),l=sl(),r=ol(),o=y(()=>e.side===C.old?e.diffFile.getSplitLeftLine(e.index):e.diffFile.getSplitRightLine(e.index)),f=y(()=>{var $;return!!(($=o())!=null&&$.diff)}),u=y(()=>{var $;return Wn(($=o())==null?void 0:$.diff)}),x=y(()=>{var $;return($=o())==null?void 0:$.isHidden}),c=y(()=>{var $;return!!(($=o())!=null&&$.lineNumber)}),b=()=>{var $,A;return e.side===C.old?e.diffFile.getOldSyntaxLine((($=o())==null?void 0:$.lineNumber)||0):e.diffFile.getNewSyntaxLine(((A=o())==null?void 0:A.lineNumber)||0)},w=()=>{var $,A;return e.side===C.old?e.diffFile.getOldPlainLine((($=o())==null?void 0:$.lineNumber)||0):e.diffFile.getNewPlainLine(((A=o())==null?void 0:A.lineNumber)||0)},[m,v]=K(b()),[h,L]=K(w()),p=()=>{v(b),L(w)};re(()=>{p();const $=e.diffFile.subscribe(p);de($)});const _=($,A)=>n==null?void 0:n({side:A,lineNumber:$}),N=()=>{var $,A;return((A=($=o())==null?void 0:$.diff)==null?void 0:A.type)===ae.Add},S=()=>{var $,A;return((A=($=o())==null?void 0:$.diff)==null?void 0:A.type)===ae.Delete};return k(X,{get when(){return!x()},get children(){var $=Gd();return F($,(()=>{var A=P(()=>!!c());return()=>A()?[(()=>{var T=zd(),W=T.firstChild;return I(T,"width",`var(${ne})`),I(T,"min-width",`var(${ne})`),I(T,"max-width",`var(${ne})`),F(T,(()=>{var R=P(()=>!!(f()&&i()));return()=>R()&&k(tn,{get index(){return e.index},get lineNumber(){var D;return((D=o())==null?void 0:D.lineNumber)||0},get side(){return e.side},get diffFile(){return e.diffFile},onWidgetClick:r,class:"absolute left-[100%] z-[1] translate-x-[-50%]",onOpenAddWidget:_})})(),W),F(W,()=>{var R;return(R=o())==null?void 0:R.lineNumber}),j(R=>{var D,G=`diff-line-${C[e.side]}-num sticky left-0 z-[1] w-[1%] min-w-[40px] select-none pl-[10px] pr-[10px] text-right align-top`,O=Ai(N(),S(),f()),B=`var(${f()?ke:zn})`,U=(D=o())==null?void 0:D.lineNumber,J=u()?void 0:.5;return G!==R.e&&fe(T,R.e=G),O!==R.t&&I(T,"background-color",R.t=O),B!==R.a&&I(T,"color",R.a=B),U!==R.o&&M(W,"data-line-num",R.o=U),J!==R.i&&I(W,"opacity",R.i=J),R},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),T})(),(()=>{var T=Kd();return F(T,k(Vt,{enableWrap:!1,get diffFile(){return e.diffFile},get rawLine(){var W;return((W=o())==null?void 0:W.value)||""},get diffLine(){var W;return(W=o())==null?void 0:W.diff},get plainLine(){return h()},get syntaxLine(){return m()},get enableHighlight(){return!!l()}})),j(W=>{var R=`diff-line-${C[e.side]}-content pr-[10px] align-top`,D=Ti(N(),S(),f());return R!==W.e&&fe(T,W.e=R),D!==W.t&&I(T,"background-color",W.t=D),W},{e:void 0,t:void 0}),T})()]:(()=>{var T=qd();return I(T,"background-color",`var(${Ze})`),j(()=>fe(T,`diff-line-${C[e.side]}-placeholder select-none`)),T})()})()),j(A=>{var T=e.lineNumber,W=f()||!c()?"diff":"plain",R=C[e.side],D="diff-line"+(c()?" group":"");return T!==A.e&&M($,"data-line",A.e=T),W!==A.t&&M($,"data-state",A.t=W),R!==A.a&&M($,"data-side",A.a=R),D!==A.o&&fe($,A.o=D),A},{e:void 0,t:void 0,a:void 0,o:void 0}),$}})};var Zd=H('<tr data-state=extend class="diff-line diff-line-extend">'),Xd=H('<td colspan=2><div class="diff-line-extend-wrapper sticky left-0 z-[1]">'),Qd=H("<td colspan=2><div>");const Jd=e=>{const t=nl(),n=il(),i=y(()=>`div[data-line="${e.lineNumber}-extend-content"]`),l=y(()=>`tr[data-line="${e.lineNumber}-extend"]`),r=y(()=>e.side===C.old?".old-diff-table-wrapper":".new-diff-table-wrapper"),s=y(()=>e.diffFile.getSplitLeftLine(e.index)),o=y(()=>e.diffFile.getSplitRightLine(e.index)),d=y(()=>e.diffFile.getExpandEnabled()),f=y(()=>{var L,p,_;return(_=(L=t())==null?void 0:L.oldFile)==null?void 0:_[((p=s())==null?void 0:p.lineNumber)||""]}),u=y(()=>{var L,p,_;return(_=(L=t())==null?void 0:L.newFile)==null?void 0:_[((p=o())==null?void 0:p.lineNumber)||""]}),a=y(()=>e.side===C.old?s():o()),x=y(()=>{var L;return(L=a())==null?void 0:L.isHidden}),c=y(()=>e.side===C.old?f():u()),b=y(()=>{var L,p;return e.side===C.old?(L=s())==null?void 0:L.lineNumber:(p=o())==null?void 0:p.lineNumber}),w=y(()=>!!((f()||u())&&(!x()||d())&&n())),m=y(()=>(e.side===C.old?!!f():!!u())&&w()),v=y(()=>C[c()?e.side:e.side===C.new?C.old:C.new]);ti({selector:i,wrapper:l,side:v,enable:w});const h=ei({selector:r,enable:m});return k(X,{get when(){return w()},get children(){var L=Zd();return F(L,(()=>{var p=P(()=>!!(n()&&c()));return()=>p()?(()=>{var _=Xd(),N=_.firstChild;return F(N,(()=>{var S=P(()=>h()>0);return()=>{var $,A;return S()&&((A=n())==null?void 0:A({diffFile:e.diffFile,side:e.side,lineNumber:b()||0,data:($=c())==null?void 0:$.data,onUpdate:e.diffFile.notifyAll}))}})()),j(S=>{var $=`diff-line-extend-${C[e.side]}-content p-0`,A=`${e.lineNumber}-extend-content`,T=C[e.side],W=h()+"px";return $!==S.e&&fe(_,S.e=$),A!==S.t&&M(N,"data-line",S.t=A),T!==S.a&&M(N,"data-side",S.a=T),W!==S.o&&I(N,"width",S.o=W),S},{e:void 0,t:void 0,a:void 0,o:void 0}),_})():(()=>{var _=Qd(),N=_.firstChild;return I(_,"background-color",`var(${Ze})`),j(S=>{var $=`diff-line-extend-${C[e.side]}-placeholder select-none p-0`,A=`${e.lineNumber}-extend-content`,T=C[e.side];return $!==S.e&&fe(_,S.e=$),A!==S.t&&M(N,"data-line",S.t=A),T!==S.a&&M(N,"data-side",S.a=T),S},{e:void 0,t:void 0,a:void 0}),_})()})()),j(p=>{var _=`${e.lineNumber}-extend`,N=C[e.side];return _!==p.e&&M(L,"data-line",p.e=_),N!==p.t&&M(L,"data-side",p.t=N),p},{e:void 0,t:void 0}),L}})};var ea=H('<svg aria-hidden=true height=16 viewBox="0 0 16 16"version=1.1 width=16><path d="m8.177 14.323 2.896-2.896a.25.25 0 0 0-.177-.427H8.75V7.764a.75.75 0 1 0-1.5 0V11H5.104a.25.25 0 0 0-.177.427l2.896 2.896a.25.25 0 0 0 .354 0ZM2.25 5a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 4.25a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5a.75.75 0 0 1 .75.75ZM8.25 5a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 4.25a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5a.75.75 0 0 1 .75.75Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z">'),ta=H('<svg aria-hidden=true height=16 viewBox="0 0 16 16"version=1.1 width=16><path d="M7.823 1.677 4.927 4.573A.25.25 0 0 0 5.104 5H7.25v3.236a.75.75 0 1 0 1.5 0V5h2.146a.25.25 0 0 0 .177-.427L8.177 1.677a.25.25 0 0 0-.354 0ZM13.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5Zm-3.75.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75ZM7.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5ZM4 11.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75ZM1.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5Z">'),na=H('<svg aria-hidden=true height=16 viewBox="0 0 16 16"version=1.1 width=16><path d="m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z">');const Fe=e=>(()=>{var t=ea();return j(()=>M(t,"class",e.class)),t})(),Ne=e=>(()=>{var t=ta();return j(()=>M(t,"class",e.class)),t})(),Gt=e=>(()=>{var t=na();return j(()=>M(t,"class",e.class)),t})();var ia=H('<tr data-state=hunk class="diff-line diff-line-hunk">'),la=H('<td class="diff-line-hunk-action sticky left-0 w-[1%] min-w-[40px] select-none p-[1px]">'),ra=H('<td class="diff-line-hunk-content pr-[10px] align-middle"><div class=pl-[1.5em]>'),ss=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand Up"data-title="Expand Up">'),os=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand Down"data-title="Expand Down">'),ds=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand All"data-title="Expand All">'),as=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[2px]"title="Expand Down"data-title="Expand Down">'),us=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[2px]"title="Expand Up"data-title="Expand Up">'),fs=H("<div class=min-h-[28px]> "),sa=H('<td class="diff-line-hunk-placeholder select-none"colspan=2><div class=min-h-[28px]> '),oa=H('<tr data-state=hunk class="diff-line diff-line-hunk"><td class="diff-line-hunk-action sticky left-0 w-[1%] min-w-[40px] select-none p-[1px]"></td><td class="diff-line-hunk-content pr-[10px] align-middle"><div class=pl-[1.5em]>');const da=e=>{const t=y(()=>e.diffFile.getSplitHunkLine(e.index)),n=y(()=>e.diffFile.getExpandEnabled()),i=y(()=>{var v;return n()&&((v=t())==null?void 0:v.splitInfo)}),l=y(()=>`tr[data-line="${e.lineNumber}-hunk"]`),r=y(()=>e.side===C.old),s=()=>{const v=t();return v&&v.splitInfo&&v.splitInfo.endHiddenIndex-v.splitInfo.startHiddenIndex<oe},[o,d]=K(s()),f=()=>{const v=t();return v&&v.splitInfo&&v.splitInfo.startHiddenIndex<v.splitInfo.endHiddenIndex},[u,a]=K(f()),x=y(()=>{const v=t();return v&&v.isFirst}),c=y(()=>{const v=t();return v&&e.diffFile._getIsPureDiffRender()&&!v.splitInfo}),b=y(()=>{const v=t();return v&&v.isLast});re(()=>{const v=()=>{a(f),d(s)};v();const h=e.diffFile.subscribe(v);de(h)});const w=y(()=>C[C.old]),m=y(()=>e.side===C.new&&(!!u()||c()));return ti({selector:l,wrapper:l,side:w,enable:m}),k(X,{get when(){return u()||c()},get children(){var v=ia();return I(v,"background-color",`var(${ze})`),F(v,(()=>{var h=P(()=>!!r());return()=>h()?[(()=>{var L=la();return I(L,"background-color",`var(${Bt})`),I(L,"color",`var(${ke})`),I(L,"width",`var(${ne})`),I(L,"min-width",`var(${ne})`),I(L,"max-width",`var(${ne})`),F(L,(()=>{var p=P(()=>!!i());return()=>p()?P(()=>!!x())()?(()=>{var _=ss();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})():P(()=>!!b())()?(()=>{var _=os();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})():P(()=>!!o())()?(()=>{var _=ds();return _.$$click=()=>e.diffFile.onSplitHunkExpand("all",e.index),F(_,k(Gt,{class:"fill-current"})),_})():[(()=>{var _=as();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})(),(()=>{var _=us();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})()]:fs()})()),L})(),(()=>{var L=ra(),p=L.firstChild;return I(L,"background-color",`var(${ze})`),I(p,"color",`var(${Ut})`),F(p,()=>{var _,N,S;return((N=(_=t())==null?void 0:_.splitInfo)==null?void 0:N.plainText)||((S=t())==null?void 0:S.text)}),L})()]:(()=>{var L=sa();return I(L,"background-color",`var(${ze})`),L})()})()),j(h=>{var L=`${e.lineNumber}-hunk`,p=C[e.side];return L!==h.e&&M(v,"data-line",h.e=L),p!==h.t&&M(v,"data-side",h.t=p),h},{e:void 0,t:void 0}),v}})},aa=e=>{const t=y(()=>e.diffFile.getSplitHunkLine(e.index)),n=y(()=>e.diffFile.getExpandEnabled()),i=y(()=>{var m;return n()&&((m=t())==null?void 0:m.splitInfo)}),l=y(()=>`tr[data-line="${e.lineNumber}-hunk"]`),r=()=>{const m=t();return m&&m.splitInfo&&m.splitInfo.endHiddenIndex-m.splitInfo.startHiddenIndex<oe},[s,o]=K(r()),d=()=>{const m=t();return m&&m.splitInfo&&m.splitInfo.startHiddenIndex<m.splitInfo.endHiddenIndex},[f,u]=K(d()),a=y(()=>{const m=t();return m&&m.isFirst}),x=y(()=>{const m=t();return m&&e.diffFile._getIsPureDiffRender()&&!m.splitInfo}),c=y(()=>{const m=t();return m&&m.isLast}),b=y(()=>C[C.old]),w=y(()=>e.side===C.new&&(!!f()||x()));return re(()=>{const m=()=>{u(d),o(r)};m();const v=e.diffFile.subscribe(m);de(v)}),ti({selector:l,wrapper:l,side:b,enable:w}),k(X,{get when(){return f()||x()},get children(){var m=oa(),v=m.firstChild,h=v.nextSibling,L=h.firstChild;return I(m,"background-color",`var(${ze})`),I(v,"background-color",`var(${Bt})`),I(v,"color",`var(${ke})`),I(v,"width",`var(${ne})`),I(v,"min-width",`var(${ne})`),I(v,"max-width",`var(${ne})`),F(v,(()=>{var p=P(()=>!!i());return()=>p()?P(()=>!!a())()?(()=>{var _=ss();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})():P(()=>!!c())()?(()=>{var _=os();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})():P(()=>!!s())()?(()=>{var _=ds();return _.$$click=()=>e.diffFile.onSplitHunkExpand("all",e.index),F(_,k(Gt,{class:"fill-current"})),_})():[(()=>{var _=as();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})(),(()=>{var _=us();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})()]:fs()})()),I(h,"background-color",`var(${ze})`),I(L,"color",`var(${Ut})`),F(L,()=>{var p,_,N;return((_=(p=t())==null?void 0:p.splitInfo)==null?void 0:_.plainText)||((N=t())==null?void 0:N.text)}),j(p=>{var _=`${e.lineNumber}-hunk`,N=C[e.side];return _!==p.e&&M(m,"data-line",p.e=_),N!==p.t&&M(m,"data-side",p.t=N),p},{e:void 0,t:void 0}),m}})},Wl=e=>{const t=es();return k(X,{get when(){return t()===ut.SplitGitHub||t()===ut.Split},get fallback(){return k(aa,{get index(){return e.index},get side(){return e.side},get diffFile(){return e.diffFile},get lineNumber(){return e.lineNumber}})},get children(){return k(da,{get index(){return e.index},get side(){return e.side},get diffFile(){return e.diffFile},get lineNumber(){return e.lineNumber}})}})};wt(["click"]);var ua=H('<tr data-state=widget class="diff-line diff-line-widget">'),fa=H('<td colspan=2><div class="diff-line-widget-wrapper sticky left-0 z-[1]">'),ca=H("<td colspan=2><div>");const ha=e=>{const t=ll(),[n,i]=Yt()||[],l=y(()=>e.diffFile.getSplitLeftLine(e.index)),r=y(()=>e.diffFile.getSplitRightLine(e.index)),s=y(()=>{var L,p,_,N;return!!((L=l())!=null&&L.lineNumber)&&((p=n==null?void 0:n())==null?void 0:p.side)===C.old&&((_=n==null?void 0:n())==null?void 0:_.lineNumber)===((N=l())==null?void 0:N.lineNumber)}),o=y(()=>{var L,p,_,N;return!!((L=r())!=null&&L.lineNumber)&&((p=n==null?void 0:n())==null?void 0:p.side)===C.new&&((_=n==null?void 0:n())==null?void 0:_.lineNumber)===((N=r())==null?void 0:N.lineNumber)}),d=y(()=>e.side===C.old?l():r()),f=y(()=>{var L;return(L=d())==null?void 0:L.isHidden}),u=y(()=>`div[data-line="${e.lineNumber}-widget-content"]`),a=y(()=>`tr[data-line="${e.lineNumber}-widget"]`),x=y(()=>e.side===C.old?".old-diff-table-wrapper":".new-diff-table-wrapper"),c=y(()=>e.side===C.old?s():o()),b=y(()=>C[c()?e.side:e.side===C.old?C.new:C.old]),w=y(()=>(!!s()||!!o())&&!f()&&!!t),m=y(()=>c()&&!!w()),v=()=>i==null?void 0:i({});ti({selector:u,wrapper:a,side:b,enable:w});const h=ei({selector:x,enable:m});return k(X,{get when(){return w()},get children(){var L=ua();return F(L,(()=>{var p=P(()=>!!c());return()=>p()?(()=>{var _=fa(),N=_.firstChild;return F(N,(()=>{var S=P(()=>h()>0);return()=>{var $,A;return S()&&((A=t())==null?void 0:A({diffFile:e.diffFile,side:e.side,lineNumber:(($=d())==null?void 0:$.lineNumber)||0,onClose:v}))}})()),j(S=>{var $=`diff-line-widget-${C[e.side]}-content p-0`,A=`${e.lineNumber}-widget-content`,T=C[e.side],W=h()+"px";return $!==S.e&&fe(_,S.e=$),A!==S.t&&M(N,"data-line",S.t=A),T!==S.a&&M(N,"data-side",S.a=T),W!==S.o&&I(N,"width",S.o=W),S},{e:void 0,t:void 0,a:void 0,o:void 0}),_})():(()=>{var _=ca(),N=_.firstChild;return I(_,"background-color",`var(${Ze})`),j(S=>{var $=`diff-line-widget-${C[e.side]}-placeholder select-none p-0`,A=`${e.lineNumber}-widget-content`,T=C[e.side];return $!==S.e&&fe(_,S.e=$),A!==S.t&&M(N,"data-line",S.t=A),T!==S.a&&M(N,"data-side",S.a=T),S},{e:void 0,t:void 0,a:void 0}),_})()})()),j(p=>{var _=`${e.lineNumber}-widget`,N=C[e.side];return _!==p.e&&M(L,"data-line",p.e=_),N!==p.t&&M(L,"data-side",p.t=N),p},{e:void 0,t:void 0}),L}})};var va=H('<table><colgroup><col><col></colgroup><thead class=hidden><tr><th scope=col> line number</th><th scope=col> line content</th></tr></thead><tbody class="diff-table-body leading-[1.6]">'),ga=H('<div class="split-diff-view split-diff-view-normal flex w-full basis-[50%]"><style data-select-style></style><div class="old-diff-table-wrapper diff-table-scroll-container w-full overflow-x-auto overflow-y-hidden"style="overscroll-behavior-x:none;font-family:Menlo, Consolas, monospace"></div><div class="diff-split-line w-[1.5px]"></div><div class="new-diff-table-wrapper diff-table-scroll-container w-full overflow-x-auto overflow-y-hidden"style="overscroll-behavior-x:none;font-family:Menlo, Consolas, monospace">');const Ol=e=>{const t=y(()=>e.side===C.new?"new-diff-table":"old-diff-table"),n=()=>vr(e.diffFile),[i,l]=K(n()),r=e.selectState;re(()=>{const o=()=>l(n);o();const d=e.diffFile.subscribe(o);de(d)});const s=o=>{var d,f;let u=o.target;if(u&&(u==null?void 0:u.nodeName)==="BUTTON"){Ke();return}const a=Ji(u);if(!(a&&a!==`diff-root${e.diffFile.getId()}`))for(;u&&u instanceof HTMLElement;){const x=u.getAttribute("data-state");if(x){x==="extend"||x==="hunk"||x==="widget"?r.current!==void 0&&(r.current=void 0,(d=e.onSelect)==null||d.call(e,void 0),Ke()):r.current!==e.side&&(r.current=e.side,(f=e.onSelect)==null||f.call(e,e.side),Ke());return}u=u.parentElement}};return(()=>{var o=va(),d=o.firstChild,f=d.firstChild,u=f.nextSibling,a=d.nextSibling,x=a.firstChild,c=x.firstChild,b=c.firstChild,w=c.nextSibling,m=w.firstChild,v=a.nextSibling;return F(c,()=>C[e.side],b),F(w,()=>C[e.side],m),v.$$mousedown=s,F(v,k(cn,{get each(){return i()},children:h=>[k(Wl,{get index(){return h.index},get side(){return e.side},get lineNumber(){return h.lineNumber},get diffFile(){return e.diffFile}}),k(Yd,{get index(){return h.index},get side(){return e.side},get lineNumber(){return h.lineNumber},get diffFile(){return e.diffFile}}),k(ha,{get index(){return h.index},get side(){return e.side},get lineNumber(){return h.lineNumber},get diffFile(){return e.diffFile}}),k(Jd,{get index(){return h.index},get side(){return e.side},get lineNumber(){return h.lineNumber},get diffFile(){return e.diffFile}})]}),null),F(v,k(Wl,{get side(){return e.side},get index(){return e.diffFile.splitLineLength},get lineNumber(){return e.diffFile.splitLineLength},get diffFile(){return e.diffFile}}),null),j(h=>{var L=`${t()} w-full border-collapse border-spacing-0`,p=C[e.side],_=`diff-table-${C[e.side]}-num-col`,N=`diff-table-${C[e.side]}-content-col`;return L!==h.e&&fe(o,h.e=L),p!==h.t&&M(o,"data-mode",h.t=p),_!==h.a&&fe(f,h.a=_),N!==h.o&&fe(u,h.o=N),h},{e:void 0,t:void 0,a:void 0,o:void 0}),o})()},_a=e=>{const t=Jn(),[n,i]=K(null),[l,r]=K(null),[s,o]=K(null),d=y(()=>Math.max(e.diffFile.fileLineLength,e.diffFile.splitLineLength).toString());re(()=>{if(!t())return;const v=n(),h=l();if(!v||!h)return;const L=Td(v,h);de(L)});const u={current:void 0},a=v=>{const h=s();h&&(v?h.textContent=`#${m()} [data-state="extend"] {user-select: none}
|
|
46
|
-
#${m()} [data-state="hunk"] {user-select: none}
|
|
47
|
-
#${m()} [data-state="widget"] {user-select: none}`:h.textContent="")},x=el(),c=y(()=>({fontSize:`${x()||14}px`,fontFamily:"Menlo, Consolas, monospace"})),b=tl({text:d,font:c}),w=y(()=>Math.max(40,b()+25)),m=()=>`diff-split-view-${e.diffFile.getId()}`;return(()=>{var v=ga(),h=v.firstChild,L=h.nextSibling,p=L.nextSibling,_=p.nextSibling;return Ot(o,h),Ot(i,L),I(L,"font-size",`var(${ge})`),F(L,k(Ol,{get side(){return C.old},get diffFile(){return e.diffFile},onSelect:a,selectState:u})),I(p,"background-color",`var(${at})`),Ot(r,_),I(_,"font-size",`var(${ge})`),F(_,k(Ol,{get side(){return C.new},get diffFile(){return e.diffFile},onSelect:a,selectState:u})),j(N=>{var S={[ne]:`${Math.round(w())}px`},$={[ne]:`${Math.round(w())}px`};return N.e=Ge(L,S,N.e),N.t=Ge(_,$,N.t),N},{e:void 0,t:void 0}),v})()};wt(["mousedown"]);var ba=H("<tr class=diff-line>"),xa=H('<td class="diff-line-old-num group relative w-[1%] min-w-[40px] select-none pl-[10px] pr-[10px] text-right align-top"><span>'),ma=H('<td class="diff-line-old-content group relative pr-[10px] align-top">'),wa=H('<td class="diff-line-old-placeholder select-none"colspan=2><span> '),La=H('<td class="diff-line-new-num group relative w-[1%] min-w-[40px] select-none border-l-[1px] pl-[10px] pr-[10px] text-right align-top"style=border-left-style:solid><span>'),pa=H('<td class="diff-line-new-content group relative pr-[10px] align-top">'),$a=H('<td class="diff-line-new-placeholder select-none border-l-[1px]"colspan=2 style=border-left-style:solid><span> ');const ya=e=>{const[t,n]=Yt()||[],i=rl(),l=sl(),r=ol(),s=y(()=>e.diffFile.getSplitLeftLine(e.index)),o=y(()=>e.diffFile.getSplitRightLine(e.index)),d=()=>{var D;return e.diffFile.getOldSyntaxLine(((D=s())==null?void 0:D.lineNumber)||0)},f=()=>{var D;return e.diffFile.getNewSyntaxLine(((D=o())==null?void 0:D.lineNumber)||0)},[u,a]=K(d()),[x,c]=K(f()),b=()=>{var D;return e.diffFile.getOldPlainLine(((D=s())==null?void 0:D.lineNumber)||0)},w=()=>{var D;return e.diffFile.getNewPlainLine(((D=o())==null?void 0:D.lineNumber)||0)},[m,v]=K(b()),[h,L]=K(w()),_=y(()=>{var D,G;return!!((D=s())!=null&&D.diff)||!!((G=o())!=null&&G.diff)}),S=y(()=>{var D,G;return Wn((D=s())==null?void 0:D.diff)||Wn((G=o())==null?void 0:G.diff)}),A=y(()=>{var D,G;return((D=s())==null?void 0:D.isHidden)&&((G=o())==null?void 0:G.isHidden)}),T=()=>{var D,G;return((G=(D=s())==null?void 0:D.diff)==null?void 0:G.type)===ae.Delete},W=()=>{var D,G;return((G=(D=o())==null?void 0:D.diff)==null?void 0:G.type)===ae.Add};re(()=>{const D=()=>{a(d),c(f),v(b),L(w)};D();const G=e.diffFile.subscribe(D);de(G)});const R=(D,G)=>n==null?void 0:n({side:G,lineNumber:D});return k(X,{get when(){return!A()},get children(){var D=ba();return F(D,(()=>{var G=P(()=>{var O;return!!((O=s())!=null&&O.lineNumber)});return()=>G()?[(()=>{var O=xa(),B=O.firstChild;return F(O,(()=>{var U=P(()=>!!(_()&&i()));return()=>U()&&k(tn,{get index(){return e.index},get lineNumber(){var J;return((J=s())==null?void 0:J.lineNumber)||0},get side(){return C.old},get diffFile(){return e.diffFile},onWidgetClick:r,class:"absolute left-[100%] z-[1] translate-x-[-50%]",onOpenAddWidget:R})})(),B),F(B,()=>{var U;return(U=s())==null?void 0:U.lineNumber}),j(U=>{var J,Ae=Ai(!1,T(),_()),De=`var(${_()?ke:zn})`,Re=(J=s())==null?void 0:J.lineNumber,ft=S()?void 0:.5;return Ae!==U.e&&I(O,"background-color",U.e=Ae),De!==U.t&&I(O,"color",U.t=De),Re!==U.a&&M(B,"data-line-num",U.a=Re),ft!==U.o&&I(B,"opacity",U.o=ft),U},{e:void 0,t:void 0,a:void 0,o:void 0}),O})(),(()=>{var O=ma();return F(O,(()=>{var B=P(()=>!!(_()&&i()));return()=>B()&&k(tn,{get index(){return e.index},get lineNumber(){var U;return((U=s())==null?void 0:U.lineNumber)||0},get side(){return C.old},get diffFile(){return e.diffFile},onWidgetClick:r,class:"absolute right-[100%] z-[1] translate-x-[50%]",onOpenAddWidget:R})})(),null),F(O,k(Vt,{enableWrap:!0,get diffFile(){return e.diffFile},get rawLine(){var B;return((B=s())==null?void 0:B.value)||""},get diffLine(){var B;return(B=s())==null?void 0:B.diff},get plainLine(){return m()},get syntaxLine(){return u()},get enableHighlight(){return!!l()}}),null),j(B=>{var U=Ti(!1,T(),_()),J=C[C.old];return U!==B.e&&I(O,"background-color",B.e=U),J!==B.t&&M(O,"data-side",B.t=J),B},{e:void 0,t:void 0}),O})()]:(()=>{var O=wa();return I(O,"background-color",`var(${Ze})`),O})()})(),null),F(D,(()=>{var G=P(()=>{var O;return!!((O=o())!=null&&O.lineNumber)});return()=>G()?[(()=>{var O=La(),B=O.firstChild;return I(O,"border-left-color",`var(${at})`),F(O,(()=>{var U=P(()=>!!(_()&&i()));return()=>U()&&k(tn,{get index(){return e.index},get lineNumber(){var J;return((J=o())==null?void 0:J.lineNumber)||0},get side(){return C.new},get diffFile(){return e.diffFile},onWidgetClick:r,class:"absolute left-[100%] z-[1] translate-x-[-50%]",onOpenAddWidget:R})})(),B),F(B,()=>{var U;return(U=o())==null?void 0:U.lineNumber}),j(U=>{var J,Ae=Ai(W(),!1,_()),De=`var(${_()?ke:zn})`,Re=(J=o())==null?void 0:J.lineNumber,ft=S()?void 0:.5;return Ae!==U.e&&I(O,"background-color",U.e=Ae),De!==U.t&&I(O,"color",U.t=De),Re!==U.a&&M(B,"data-line-num",U.a=Re),ft!==U.o&&I(B,"opacity",U.o=ft),U},{e:void 0,t:void 0,a:void 0,o:void 0}),O})(),(()=>{var O=pa();return F(O,(()=>{var B=P(()=>!!(_()&&i()));return()=>B()&&k(tn,{get index(){return e.index},get lineNumber(){var U;return((U=o())==null?void 0:U.lineNumber)||0},get side(){return C.new},get diffFile(){return e.diffFile},onWidgetClick:r,class:"absolute right-[100%] z-[1] translate-x-[50%]",onOpenAddWidget:R})})(),null),F(O,k(Vt,{enableWrap:!0,get diffFile(){return e.diffFile},get rawLine(){var B;return((B=o())==null?void 0:B.value)||""},get diffLine(){var B;return(B=o())==null?void 0:B.diff},get plainLine(){return h()},get syntaxLine(){return x()},get enableHighlight(){return!!l()}}),null),j(B=>{var U=Ti(W(),!1,_()),J=C[C.new];return U!==B.e&&I(O,"background-color",B.e=U),J!==B.t&&M(O,"data-side",B.t=J),B},{e:void 0,t:void 0}),O})()]:(()=>{var O=$a();return I(O,"background-color",`var(${Ze})`),I(O,"border-left-color",`var(${at})`),O})()})(),null),j(G=>{var O=e.lineNumber,B=_()?"diff":"plain";return O!==G.e&&M(D,"data-line",G.e=O),B!==G.t&&M(D,"data-state",G.t=B),G},{e:void 0,t:void 0}),D}})};var Sa=H('<tr data-state=extend class="diff-line diff-line-extend">'),Ia=H('<td class="diff-line-extend-old-content p-0"colspan=2><div class=diff-line-extend-wrapper>'),Fa=H('<td class="diff-line-extend-old-placeholder select-none p-0"colspan=2>'),Na=H('<td class="diff-line-extend-new-content border-l-[1px] p-0"colspan=2 style=border-left-style:solid><div class=diff-line-extend-wrapper>'),ka=H('<td class="diff-line-extend-new-placeholder select-none border-l-[1px] p-0"colspan=2 style=border-left-style:solid>');const Ca=e=>{const t=nl(),n=il(),i=y(()=>e.diffFile.getSplitLeftLine(e.index)),l=y(()=>e.diffFile.getSplitRightLine(e.index)),r=y(()=>e.diffFile.getExpandEnabled()),s=y(()=>{var u,a,x;return(x=(u=t())==null?void 0:u.oldFile)==null?void 0:x[((a=i())==null?void 0:a.lineNumber)||""]}),o=y(()=>{var u,a,x;return(x=(u=t())==null?void 0:u.newFile)==null?void 0:x[((a=l())==null?void 0:a.lineNumber)||""]}),f=y(()=>{const u=s(),a=o(),x=i(),c=l(),b=r(),w=n();return(u||a)&&(!(x!=null&&x.isHidden)&&!(c!=null&&c.isHidden)||b)&&w});return k(X,{get when(){return f()},get children(){var u=Sa();return F(u,(()=>{var a=P(()=>!!(n()&&s()));return()=>a()?(()=>{var x=Ia(),c=x.firstChild;return F(c,()=>{var b,w,m;return(m=n())==null?void 0:m({diffFile:e.diffFile,side:C.old,lineNumber:((b=i())==null?void 0:b.lineNumber)||0,data:(w=s())==null?void 0:w.data,onUpdate:e.diffFile.notifyAll})}),x})():(()=>{var x=Fa();return I(x,"background-color",`var(${Ze})`),x})()})(),null),F(u,(()=>{var a=P(()=>!!(n()&&o()));return()=>a()?(()=>{var x=Na(),c=x.firstChild;return I(x,"border-left-color",`var(${at})`),F(c,()=>{var b,w,m;return(m=n())==null?void 0:m({diffFile:e.diffFile,side:C.new,lineNumber:((b=l())==null?void 0:b.lineNumber)||0,data:(w=o())==null?void 0:w.data,onUpdate:e.diffFile.notifyAll})}),x})():(()=>{var x=ka();return I(x,"background-color",`var(${Ze})`),I(x,"border-left-color",`var(${at})`),x})()})(),null),j(()=>M(u,"data-line",`${e.lineNumber}-extend`)),u}})};var Ea=H('<tr data-state=hunk class="diff-line diff-line-hunk"><td class="diff-line-hunk-action relative w-[1%] min-w-[40px] select-none p-[1px]"></td><td class="diff-line-hunk-content pr-[10px] align-middle"colspan=3><div class=pl-[1.5em]>'),Di=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand Up"data-title="Expand Up">'),Ri=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand Down"data-title="Expand Down">'),Wi=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand All"data-title="Expand All">'),Oi=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[2px]"title="Expand Down"data-title="Expand Down">'),Mi=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[2px]"title="Expand Up"data-title="Expand Up">'),Pi=H("<div class=min-h-[28px]> "),Ha=H('<tr data-state=hunk class="diff-line diff-line-hunk"><td class="diff-line-hunk-action relative w-[1%] min-w-[40px] select-none p-[1px]"></td><td class="diff-line-hunk-content pr-[10px] align-middle"><div class=pl-[1.5em]></div></td><td class="diff-line-hunk-action relative z-[1] w-[1%] min-w-[40px] select-none border-l-[1px] p-[1px]"style=border-left-style:solid></td><td class="diff-line-hunk-content relative pr-[10px] align-middle"><div class=pl-[1.5em]>');const Ta=e=>{const t=y(()=>e.diffFile.getSplitHunkLine(e.index)),n=y(()=>e.diffFile.getExpandEnabled()),i=y(()=>{var c;return n()&&((c=t())==null?void 0:c.splitInfo)}),l=()=>{const c=t();return c&&c.splitInfo&&c.splitInfo.endHiddenIndex-c.splitInfo.startHiddenIndex<oe},[r,s]=K(l()),o=()=>{const c=t();return c&&c.splitInfo&&c.splitInfo.startHiddenIndex<c.splitInfo.endHiddenIndex},[d,f]=K(o()),u=y(()=>{const c=t();return c&&c.isFirst}),a=y(()=>{const c=t();return c&&e.diffFile._getIsPureDiffRender()&&!c.splitInfo}),x=y(()=>{const c=t();return c&&c.isLast});return re(()=>{const c=()=>{f(o),s(l)};c();const b=e.diffFile.subscribe(c);de(b)}),k(X,{get when(){return d()||a()},get children(){var c=Ea(),b=c.firstChild,w=b.nextSibling,m=w.firstChild;return I(b,"background-color",`var(${Bt})`),I(b,"color",`var(${ke})`),F(b,(()=>{var v=P(()=>!!i());return()=>v()?P(()=>!!u())()?(()=>{var h=Di();return h.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(h,k(Ne,{class:"fill-current"})),h})():P(()=>!!x())()?(()=>{var h=Ri();return h.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(h,k(Fe,{class:"fill-current"})),h})():P(()=>!!r())()?(()=>{var h=Wi();return h.$$click=()=>e.diffFile.onSplitHunkExpand("all",e.index),F(h,k(Gt,{class:"fill-current"})),h})():[(()=>{var h=Oi();return h.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(h,k(Fe,{class:"fill-current"})),h})(),(()=>{var h=Mi();return h.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(h,k(Ne,{class:"fill-current"})),h})()]:Pi()})()),I(w,"background-color",`var(${ze})`),I(m,"color",`var(${Ut})`),F(m,()=>{var v,h,L;return((h=(v=t())==null?void 0:v.splitInfo)==null?void 0:h.plainText)||((L=t())==null?void 0:L.text)}),j(()=>M(c,"data-line",`${e.lineNumber}-hunk`)),c}})},Aa=e=>{const t=y(()=>e.diffFile.getSplitHunkLine(e.index)),n=y(()=>e.diffFile.getExpandEnabled()),i=y(()=>{var c;return n()&&((c=t())==null?void 0:c.splitInfo)}),l=()=>{const c=t();return c&&c.splitInfo&&c.splitInfo.endHiddenIndex-c.splitInfo.startHiddenIndex<oe},[r,s]=K(l()),o=()=>{const c=t();return c&&c.splitInfo&&c.splitInfo.startHiddenIndex<c.splitInfo.endHiddenIndex},[d,f]=K(o()),u=y(()=>{const c=t();return c&&c.isFirst}),a=y(()=>{const c=t();return c&&e.diffFile._getIsPureDiffRender()&&!c.splitInfo}),x=y(()=>{const c=t();return c&&c.isLast});return re(()=>{const c=()=>{s(l()),f(o())};c();const b=e.diffFile.subscribe(c);de(b)}),k(X,{get when(){return d()||a()},get children(){var c=Ha(),b=c.firstChild,w=b.nextSibling,m=w.firstChild,v=w.nextSibling,h=v.nextSibling,L=h.firstChild;return I(b,"background-color",`var(${Bt})`),I(b,"color",`var(${ke})`),F(b,(()=>{var p=P(()=>!!i());return()=>p()?P(()=>!!u())()?(()=>{var _=Di();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})():P(()=>!!x())()?(()=>{var _=Ri();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})():P(()=>!!r())()?(()=>{var _=Wi();return _.$$click=()=>e.diffFile.onSplitHunkExpand("all",e.index),F(_,k(Gt,{class:"fill-current"})),_})():[(()=>{var _=Oi();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})(),(()=>{var _=Mi();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})()]:Pi()})()),I(w,"background-color",`var(${ze})`),I(m,"color",`var(${Ut})`),F(m,()=>{var p,_,N;return((_=(p=t())==null?void 0:p.splitInfo)==null?void 0:_.plainText)||((N=t())==null?void 0:N.text)}),I(v,"background-color",`var(${Bt})`),I(v,"color",`var(${ke})`),I(v,"border-left-color",`var(${at})`),F(v,(()=>{var p=P(()=>!!i());return()=>p()?P(()=>!!u())()?(()=>{var _=Di();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})():P(()=>!!x())()?(()=>{var _=Ri();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})():P(()=>!!r())()?(()=>{var _=Wi();return _.$$click=()=>e.diffFile.onSplitHunkExpand("all",e.index),F(_,k(Gt,{class:"fill-current"})),_})():[(()=>{var _=Oi();return _.$$click=()=>e.diffFile.onSplitHunkExpand("down",e.index),F(_,k(Fe,{class:"fill-current"})),_})(),(()=>{var _=Mi();return _.$$click=()=>e.diffFile.onSplitHunkExpand("up",e.index),F(_,k(Ne,{class:"fill-current"})),_})()]:Pi()})()),I(h,"background-color",`var(${ze})`),I(L,"color",`var(${Ut})`),F(L,()=>{var p,_,N;return((_=(p=t())==null?void 0:p.splitInfo)==null?void 0:_.plainText)||((N=t())==null?void 0:N.text)}),j(()=>M(c,"data-line",`${e.lineNumber}-hunk`)),c}})},Ml=e=>{const t=es();return k(X,{get when(){return t()===ut.SplitGitHub||t()===ut.Split},get fallback(){return k(Aa,{get index(){return e.index},get diffFile(){return e.diffFile},get lineNumber(){return e.lineNumber}})},get children(){return k(Ta,{get index(){return e.index},get diffFile(){return e.diffFile},get lineNumber(){return e.lineNumber}})}})};wt(["click"]);var Da=H('<tr data-state=widget class="diff-line diff-line-widget">'),Ra=H('<td class="diff-line-widget-old-content p-0"colspan=2><div class=diff-line-widget-wrapper>'),Wa=H('<td class="diff-line-widget-old-placeholder select-none p-0"colspan=2>'),Oa=H('<td class="diff-line-widget-new-content border-l-[1px] p-0"colspan=2 style=border-left-style:solid><div class=diff-line-widget-wrapper>'),Ma=H('<td class="diff-line-widget-new-placeholder select-none border-l-[1px] p-0"colspan=2 style=border-left-style:solid>');const Pa=e=>{const t=ll(),[n,i]=Yt()||[],l=y(()=>e.diffFile.getSplitLeftLine(e.index)),r=y(()=>e.diffFile.getSplitRightLine(e.index)),s=y(()=>{var u,a,x,c;return((u=l())==null?void 0:u.lineNumber)&&((a=n==null?void 0:n())==null?void 0:a.side)===C.old&&((x=n==null?void 0:n())==null?void 0:x.lineNumber)===((c=l())==null?void 0:c.lineNumber)}),o=y(()=>{var u,a,x,c;return((u=r())==null?void 0:u.lineNumber)&&((a=n==null?void 0:n())==null?void 0:a.side)===C.new&&((x=n==null?void 0:n())==null?void 0:x.lineNumber)===((c=r())==null?void 0:c.lineNumber)}),d=y(()=>{var u,a;return(!!s()||!!o())&&!((u=l())!=null&&u.isHidden)&&!((a=r())!=null&&a.isHidden)&&!!t}),f=()=>i==null?void 0:i({});return k(X,{get when(){return d()},get children(){var u=Da();return F(u,(()=>{var a=P(()=>!!(s()&&t()));return()=>a()?(()=>{var x=Ra(),c=x.firstChild;return F(c,()=>{var b,w;return(w=t==null?void 0:t())==null?void 0:w({diffFile:e.diffFile,side:C.old,lineNumber:((b=l())==null?void 0:b.lineNumber)||0,onClose:f})}),x})():(()=>{var x=Wa();return I(x,"background-color",`var(${Ze})`),x})()})(),null),F(u,(()=>{var a=P(()=>!!(o()&&t()));return()=>a()?(()=>{var x=Oa(),c=x.firstChild;return I(x,"border-left-color",`var(${at})`),F(c,()=>{var b,w;return(w=t==null?void 0:t())==null?void 0:w({diffFile:e.diffFile,side:C.new,lineNumber:((b=r())==null?void 0:b.lineNumber)||0,onClose:f})}),x})():(()=>{var x=Ma();return I(x,"background-color",`var(${Ze})`),I(x,"border-left-color",`var(${at})`),x})()})(),null),j(()=>M(u,"data-line",`${e.lineNumber}-widget`)),u}})};var ja=H('<div class="split-diff-view split-diff-view-warp w-full"><div class="diff-table-wrapper w-full"style="font-family:Menlo, Consolas, monospace"><style data-select-style></style><table class="diff-table w-full table-fixed border-collapse border-spacing-0"><colgroup><col class=diff-table-old-num-col><col class=diff-table-old-content-col><col class=diff-table-new-num-col><col class=diff-table-new-content-col></colgroup><thead class=hidden><tr><th scope=col>old line number</th><th scope=col>old line content</th><th scope=col>new line number</th><th scope=col>new line content</th></tr></thead><tbody class="diff-table-body leading-[1.6]">');const Ua=e=>{const t=()=>vr(e.diffFile),[n,i]=K(t()),[l,r]=K(),s=y(()=>Math.max(e.diffFile.splitLineLength,e.diffFile.fileLineLength).toString()),o=el(),d=y(()=>({fontSize:`${o()||14}px`,fontFamily:"Menlo, Consolas, monospace"}));re(()=>{const b=()=>i(t);b();const w=e.diffFile.subscribe(b);de(w)});const f={current:void 0},u=b=>{const w=l();if(w)if(b){const m=b===C.old?C.new:C.old;w.textContent=`#diff-root${e.diffFile.getId()} [data-side="${C[m]}"] {user-select: none}
|
|
48
|
-
#diff-root${e.diffFile.getId()} [data-state="extend"] {user-select: none}
|
|
49
|
-
#diff-root${e.diffFile.getId()} [data-state="hunk"] {user-select: none}
|
|
50
|
-
#diff-root${e.diffFile.getId()} [data-state="widget"] {user-select: none}`}else w.textContent=""},a=b=>{let w=b.target;if(w&&w instanceof HTMLElement&&w.nodeName==="BUTTON"){Ke();return}const m=Ji(w);if(!(m&&m!==`diff-root${e.diffFile.getId()}`))for(;w&&w instanceof HTMLElement;){const v=w.getAttribute("data-state"),h=w.getAttribute("data-side");if(h&&f.current!==C[h]&&(f.current=C[h],u(C[h]),Ke()),v)if(v==="extend"||v==="hunk"||v==="widget"){f.current!==void 0&&(f.current=void 0,u(void 0),Ke());return}else return;w=w.parentElement}},x=tl({text:s,font:d}),c=y(()=>Math.max(40,x()+25));return(()=>{var b=ja(),w=b.firstChild,m=w.firstChild,v=m.nextSibling,h=v.firstChild,L=h.firstChild,p=L.nextSibling,_=p.nextSibling,N=h.nextSibling,S=N.nextSibling;return I(w,"font-size",`var(${ge})`),Ot(r,m),S.$$mousedown=a,F(S,k(cn,{get each(){return n()},children:$=>[k(Ml,{get index(){return $.index},get lineNumber(){return $.lineNumber},get diffFile(){return e.diffFile}}),k(ya,{get index(){return $.index},get lineNumber(){return $.lineNumber},get diffFile(){return e.diffFile}}),k(Pa,{get index(){return $.index},get lineNumber(){return $.lineNumber},get diffFile(){return e.diffFile}}),k(Ca,{get index(){return $.index},get lineNumber(){return $.lineNumber},get diffFile(){return e.diffFile}})]}),null),F(S,k(Ml,{get index(){return e.diffFile.splitLineLength},get lineNumber(){return e.diffFile.splitLineLength},get diffFile(){return e.diffFile}}),null),j($=>{var A={[ne]:`${Math.round(c())}px`},T=Math.round(c()),W=Math.round(c());return $.e=Ge(w,A,$.e),T!==$.t&&M(L,"width",$.t=T),W!==$.a&&M(_,"width",$.a=W),$},{e:void 0,t:void 0,a:void 0}),b})()};wt(["mousedown"]);const Ba=e=>{const t=qt();return k(X,{get when(){return t()},get fallback(){return k(_a,{get diffFile(){return e.diffFile}})},get children(){return k(Ua,{get diffFile(){return e.diffFile}})}})};var cs=H('<tr data-state=diff class="diff-line group"><td class="diff-line-num sticky left-0 z-[1] w-[1%] min-w-[100px] select-none whitespace-nowrap pl-[10px] pr-[10px] text-right align-top"><div class=flex><span class="inline-block w-[50%]"></span><span class="w-[10px] shrink-0"></span><span class="inline-block w-[50%]"></span></div></td><td class="diff-line-content pr-[10px] align-top">'),Va=H('<tr class="diff-line group"><td class="diff-line-num sticky left-0 z-[1] w-[1%] min-w-[100px] select-none whitespace-nowrap pl-[10px] pr-[10px] text-right align-top"><div class="flex opacity-[0.5]"><span class="inline-block w-[50%]"></span><span class="w-[10px] shrink-0"></span><span class="inline-block w-[50%]"></span></div></td><td class="diff-line-content pr-[10px] align-top">');const Ga=e=>(()=>{var t=cs(),n=t.firstChild,i=n.firstChild,l=i.firstChild,r=n.nextSibling;return I(n,"color",`var(${ke})`),I(n,"background-color",`var(${Vr})`),I(n,"width",`calc(calc(var(${ne}) + 5px) * 2)`),I(n,"max-width",`calc(calc(var(${ne}) + 5px) * 2)`),I(n,"min-width",`calc(calc(var(${ne}) + 5px) * 2)`),F(n,(()=>{var s=P(()=>!!e.enableAddWidget);return()=>s()&&k(dl,{get index(){return e.index-1},get lineNumber(){return e.lineNumber},get diffFile(){return e.diffFile},get side(){return C.old},get onWidgetClick(){return e.onAddWidgetClick},get onOpenAddWidget(){return e.onOpenAddWidget}})})(),i),F(l,()=>e.lineNumber),I(r,"background-color",`var(${Ur})`),F(r,k(Vt,{get enableWrap(){return e.enableWrap},get diffFile(){return e.diffFile},get enableHighlight(){return e.enableHighlight},get rawLine(){return e.rawLine},get diffLine(){return e.diffLine},get plainLine(){return e.plainLine},get syntaxLine(){return e.syntaxLine}})),j(s=>{var o=e.index,d=e.lineNumber;return o!==s.e&&M(t,"data-line",s.e=o),d!==s.t&&M(l,"data-line-old-num",s.t=d),s},{e:void 0,t:void 0}),t})(),za=e=>(()=>{var t=cs(),n=t.firstChild,i=n.firstChild,l=i.firstChild,r=l.nextSibling,s=r.nextSibling,o=n.nextSibling;return I(n,"color",`var(${ke})`),I(n,"background-color",`var(${Br})`),I(n,"width",`calc(calc(var(${ne}) + 5px) * 2)`),I(n,"max-width",`calc(calc(var(${ne}) + 5px) * 2)`),I(n,"min-width",`calc(calc(var(${ne}) + 5px) * 2)`),F(n,(()=>{var d=P(()=>!!e.enableAddWidget);return()=>d()&&k(dl,{get index(){return e.index-1},get lineNumber(){return e.lineNumber},get diffFile(){return e.diffFile},get side(){return C.new},get onWidgetClick(){return e.onAddWidgetClick},get onOpenAddWidget(){return e.onOpenAddWidget}})})(),i),F(s,()=>e.lineNumber),I(o,"background-color",`var(${jr})`),F(o,k(Vt,{get enableWrap(){return e.enableWrap},get diffFile(){return e.diffFile},get enableHighlight(){return e.enableHighlight},get rawLine(){return e.rawLine},get diffLine(){return e.diffLine},get plainLine(){return e.plainLine},get syntaxLine(){return e.syntaxLine}})),j(d=>{var f=e.index,u=e.lineNumber;return f!==d.e&&M(t,"data-line",d.e=f),u!==d.t&&M(s,"data-line-new-num",d.t=u),d},{e:void 0,t:void 0}),t})(),Ka=e=>{const t=y(()=>e.diffFile.getUnifiedLine(e.index)),n=qt(),[i,l]=Yt()||[],r=ol(),s=sl(),o=rl(),d=y(()=>{var v;return(v=t())==null?void 0:v.isHidden}),f=y(()=>{var v;return Wn((v=t())==null?void 0:v.diff)}),u=()=>{var v,h,L,p;return(v=t())!=null&&v.newLineNumber?e.diffFile.getNewSyntaxLine(((h=t())==null?void 0:h.newLineNumber)||0):(L=t())!=null&&L.oldLineNumber?e.diffFile.getOldSyntaxLine(((p=t())==null?void 0:p.oldLineNumber)||0):void 0},[a,x]=K(u()),c=()=>{var v,h,L,p;return(v=t())!=null&&v.newLineNumber?e.diffFile.getNewPlainLine(((h=t())==null?void 0:h.newLineNumber)||0):(L=t())!=null&&L.oldLineNumber?e.diffFile.getOldPlainLine(((p=t())==null?void 0:p.oldLineNumber)||0):void 0},[b,w]=K(c());re(()=>{const v=()=>{x(u),w(c)};v();const h=e.diffFile.subscribe(v);de(h)});const m=(v,h)=>l==null?void 0:l({side:h,lineNumber:v});return k(X,{get when(){return!d()},get children(){return k(X,{get when(){return f()},get fallback(){return(()=>{var v=Va(),h=v.firstChild,L=h.firstChild,p=L.firstChild,_=p.nextSibling,N=_.nextSibling,S=h.nextSibling;return I(h,"width",`calc(calc(var(${ne}) + 5px) * 2)`),I(h,"max-width",`calc(calc(var(${ne}) + 5px) * 2)`),I(h,"min-width",`calc(calc(var(${ne}) + 5px) * 2)`),F(h,(()=>{var $=P(()=>{var A;return!!(o()&&((A=t())!=null&&A.diff))});return()=>$()&&k(dl,{get index(){return e.index},get diffFile(){return e.diffFile},get lineNumber(){var A;return((A=t())==null?void 0:A.newLineNumber)||0},get side(){return C.new},onOpenAddWidget:m,onWidgetClick:r})})(),L),F(p,()=>{var $;return(($=t())==null?void 0:$.oldLineNumber)||0}),F(N,()=>{var $;return(($=t())==null?void 0:$.newLineNumber)||0}),F(S,k(Vt,{get enableWrap(){return!!n()},get diffFile(){return e.diffFile},get enableHighlight(){return!!s()},get rawLine(){var $;return(($=t())==null?void 0:$.value)||""},get diffLine(){var $;return($=t())==null?void 0:$.diff},get plainLine(){return b()},get syntaxLine(){return a()}})),j($=>{var A,T,W,R,D,G,O=e.lineNumber,B=(A=t())!=null&&A.diff?"diff":"plain",U=`var(${(T=t())!=null&&T.diff?ke:zn})`,J=(W=t())!=null&&W.diff?`var(${zr})`:`var(${Hi})`,Ae=((R=t())==null?void 0:R.oldLineNumber)||0,De=((D=t())==null?void 0:D.newLineNumber)||0,Re=(G=t())!=null&&G.diff?`var(${Gr})`:`var(${Hi})`;return O!==$.e&&M(v,"data-line",$.e=O),B!==$.t&&M(v,"data-state",$.t=B),U!==$.a&&I(h,"color",$.a=U),J!==$.o&&I(h,"background-color",$.o=J),Ae!==$.i&&M(p,"data-line-old-num",$.i=Ae),De!==$.n&&M(N,"data-line-new-num",$.n=De),Re!==$.s&&I(S,"background-color",$.s=Re),$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),v})()},get children(){return k(X,{get when(){var v;return(v=t())==null?void 0:v.oldLineNumber},get fallback(){return k(za,{get index(){return e.lineNumber},get enableWrap(){return!!n()},get diffFile(){return e.diffFile},get rawLine(){var v;return((v=t())==null?void 0:v.value)||""},get diffLine(){var v;return(v=t())==null?void 0:v.diff},get plainLine(){return b()},get syntaxLine(){return a()},get enableHighlight(){return!!s()},get enableAddWidget(){return!!o()},get lineNumber(){return t().newLineNumber||0},onAddWidgetClick:r,onOpenAddWidget:m})},get children(){return k(Ga,{get index(){return e.lineNumber},get enableWrap(){return!!n()},get diffFile(){return e.diffFile},get rawLine(){var v;return((v=t())==null?void 0:v.value)||""},get diffLine(){var v;return(v=t())==null?void 0:v.diff},get plainLine(){return b()},get syntaxLine(){return a()},get enableHighlight(){return!!s()},get enableAddWidget(){return!!o()},get lineNumber(){return t().oldLineNumber||0},onAddWidgetClick:r,onOpenAddWidget:m})}})}})}})};var qa=H('<tr data-state=extend class="diff-line diff-line-extend"><td class="diff-line-extend-content p-0 align-top"colspan=2><div class="diff-line-extend-wrapper sticky left-0 z-[1]">');const Ya=e=>{const t=nl(),n=qt(),i=il(),l=y(()=>e.diffFile.getUnifiedLine(e.index)),r=y(()=>{var a,x,c;return(c=(a=t())==null?void 0:a.oldFile)==null?void 0:c[((x=l())==null?void 0:x.oldLineNumber)||0]}),s=y(()=>{var a,x,c;return(c=(a=t())==null?void 0:a.newFile)==null?void 0:c[((x=l())==null?void 0:x.newLineNumber)||0]}),o=y(()=>{var a;return(a=l())==null?void 0:a.isHidden}),d=y(()=>!!((r()||s())&&!o()&&i())),f=y(()=>".unified-diff-table-wrapper"),u=ei({selector:f,enable:()=>d()});return k(X,{get when(){return d()},get children(){var a=qa(),x=a.firstChild,c=x.firstChild;return F(c,(()=>{var b=P(()=>!!((n()||u()>0)&&r()));return()=>{var w,m,v;return b()&&((v=i())==null?void 0:v({diffFile:e.diffFile,side:C.old,lineNumber:((w=l())==null?void 0:w.oldLineNumber)||0,data:(m=r())==null?void 0:m.data,onUpdate:e.diffFile.notifyAll}))}})(),null),F(c,(()=>{var b=P(()=>!!((n()||u()>0)&&s()));return()=>{var w,m;return b()&&((m=i())==null?void 0:m({diffFile:e.diffFile,side:C.new,lineNumber:l().newLineNumber||0,data:(w=s())==null?void 0:w.data,onUpdate:e.diffFile.notifyAll}))}})(),null),j(b=>{var w=`${e.lineNumber}-extend`,m=u()+"px";return w!==b.e&&M(a,"data-line",b.e=w),m!==b.t&&I(c,"width",b.t=m),b},{e:void 0,t:void 0}),a}})};var Za=H('<tr data-state=hunk class="diff-line diff-line-hunk"><td class="diff-line-hunk-action sticky left-0 w-[1%] min-w-[100px] select-none"></td><td class="diff-line-hunk-content pr-[10px] align-middle"><div class=pl-[1.5em]>'),Xa=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand Up"data-title="Expand Up">'),Qa=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand Down"data-title="Expand Down">'),Ja=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[6px]"title="Expand All"data-title="Expand All">'),eu=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[2px]"title="Expand Down"data-title="Expand Down">'),tu=H('<button class="diff-widget-tooltip flex w-full cursor-pointer items-center justify-center rounded-[2px] py-[2px]"title="Expand Up"data-title="Expand Up">'),nu=H("<div class=min-h-[28px]> ");const Pl=e=>{const t=y(()=>e.diffFile.getUnifiedHunkLine(e.index)),n=y(()=>e.diffFile.getExpandEnabled()),i=y(()=>{var b;return n()&&!!((b=t())!=null&&b.unifiedInfo)}),l=qt(),r=()=>{const b=t();return b&&b.unifiedInfo&&b.unifiedInfo.startHiddenIndex<b.unifiedInfo.endHiddenIndex},[s,o]=K(r()),d=()=>{const b=t();return b&&b.unifiedInfo&&b.unifiedInfo.endHiddenIndex-b.unifiedInfo.startHiddenIndex<oe},[f,u]=K(d()),a=y(()=>{var b;return(b=t())==null?void 0:b.isFirst}),x=y(()=>{var b;return(b=t())==null?void 0:b.isLast}),c=y(()=>{var b;return t()&&e.diffFile._getIsPureDiffRender()&&!((b=t())!=null&&b.unifiedInfo)});return re(()=>{const b=()=>{o(r),u(d)};b();const w=e.diffFile.subscribe(b);de(w)}),k(X,{get when(){return s()||c()},get children(){var b=Za(),w=b.firstChild,m=w.nextSibling,v=m.firstChild;return I(w,"background-color",`var(${Bt})`),I(w,"color",`var(${ke})`),I(w,"width",`calc(calc(var(${ne}) + 5px) * 2)`),I(w,"max-width",`calc(calc(var(${ne}) + 5px) * 2)`),I(w,"min-width",`calc(calc(var(${ne}) + 5px) * 2)`),F(w,(()=>{var h=P(()=>!!i());return()=>h()?P(()=>!!a())()?(()=>{var L=Xa();return L.$$click=()=>e.diffFile.onUnifiedHunkExpand("up",e.index),F(L,k(Ne,{class:"fill-current"})),L})():P(()=>!!x())()?(()=>{var L=Qa();return L.$$click=()=>e.diffFile.onUnifiedHunkExpand("down",e.index),F(L,k(Fe,{class:"fill-current"})),L})():P(()=>!!f())()?(()=>{var L=Ja();return L.$$click=()=>e.diffFile.onUnifiedHunkExpand("all",e.index),F(L,k(Gt,{class:"fill-current"})),L})():[(()=>{var L=eu();return L.$$click=()=>e.diffFile.onUnifiedHunkExpand("down",e.index),F(L,k(Fe,{class:"fill-current"})),L})(),(()=>{var L=tu();return L.$$click=()=>e.diffFile.onUnifiedHunkExpand("up",e.index),F(L,k(Ne,{class:"fill-current"})),L})()]:nu()})()),I(m,"background-color",`var(${ze})`),I(v,"color",`var(${Ut})`),F(v,()=>{var h,L,p;return((L=(h=t())==null?void 0:h.unifiedInfo)==null?void 0:L.plainText)||((p=t())==null?void 0:p.text)}),j(h=>{var L=`${e.lineNumber}-hunk`,p=l()?"pre-wrap":"pre",_=l()?"break-all":"initial";return L!==h.e&&M(b,"data-line",h.e=L),p!==h.t&&I(v,"white-space",h.t=p),_!==h.a&&I(v,"word-break",h.a=_),h},{e:void 0,t:void 0,a:void 0}),b}})};wt(["click"]);var iu=H('<tr data-state=widget class="diff-line diff-line-widget"><td class="diff-line-widget-content p-0"colspan=2><div class="diff-line-widget-wrapper sticky left-0 z-[1]">');const lu=e=>{const t=ll(),n=qt(),[i,l]=Yt()||[],r=y(()=>e.diffFile.getUnifiedLine(e.index)),s=y(()=>{var c,b,w,m;return((c=r())==null?void 0:c.oldLineNumber)&&((b=i==null?void 0:i())==null?void 0:b.side)===C.old&&((w=i==null?void 0:i())==null?void 0:w.lineNumber)===((m=r())==null?void 0:m.oldLineNumber)}),o=y(()=>{var c,b,w,m;return((c=r())==null?void 0:c.newLineNumber)&&((b=i==null?void 0:i())==null?void 0:b.side)===C.new&&((w=i==null?void 0:i())==null?void 0:w.lineNumber)===((m=r())==null?void 0:m.newLineNumber)}),d=y(()=>{var c;return(c=r())==null?void 0:c.isHidden}),f=y(()=>!!(s()||o())&&!d()&&!!t()),u=()=>l==null?void 0:l({}),a=y(()=>".unified-diff-table-wrapper"),x=ei({selector:a,enable:()=>f()});return k(X,{get when(){return f()},get children(){var c=iu(),b=c.firstChild,w=b.firstChild;return F(w,(()=>{var m=P(()=>!!((n()||x()>0)&&s()));return()=>{var v,h;return m()&&((h=t())==null?void 0:h({diffFile:e.diffFile,side:C.old,lineNumber:((v=r())==null?void 0:v.oldLineNumber)||0,onClose:u}))}})(),null),F(w,(()=>{var m=P(()=>!!((n()||x()>0)&&o()));return()=>{var v;return m()&&((v=t())==null?void 0:v({diffFile:e.diffFile,side:C.new,lineNumber:r().newLineNumber||0,onClose:u}))}})(),null),j(m=>{var v=`${e.lineNumber}-widget`,h=x()+"px";return v!==m.e&&M(c,"data-line",m.e=v),h!==m.t&&I(w,"width",m.t=h),m},{e:void 0,t:void 0}),c}})};var ru=H('<div><style data-select-style></style><div class="unified-diff-table-wrapper diff-table-scroll-container w-full overflow-x-auto overflow-y-hidden"style="font-family:Menlo, Consolas, monospace"><table><colgroup><col class=unified-diff-table-num-col><col class=unified-diff-table-content-col></colgroup><thead class=hidden><tr><th scope=col>line number</th><th scope=col>line content</th></tr></thead><tbody class="diff-table-body leading-[1.6]">');const su=e=>{const t=()=>lo(e.diffFile),[n,i]=K(t()),l=y(()=>Math.max(e.diffFile.unifiedLineLength,e.diffFile.fileLineLength).toString());re(()=>{const m=()=>i(t);m();const v=e.diffFile.subscribe(m);de(v)});const r=el(),s=qt(),[o,d]=K(),f={current:void 0},u=m=>{const v=o();v&&(m?v.textContent=`#${w()} [data-state="extend"] {user-select: none}
|
|
51
|
-
#${w()} [data-state="hunk"] {user-select: none}
|
|
52
|
-
#${w()} [data-state="widget"] {user-select: none}`:v.textContent="")},a=m=>{let v=m.target;if(v&&(v==null?void 0:v.nodeName)==="BUTTON"){Ke();return}const h=Ji(v);if(!(h&&h!==`diff-root${e.diffFile.getId()}`))for(;v&&v instanceof HTMLElement;){const L=v.getAttribute("data-state");if(L){L==="extend"||L==="hunk"||L==="widget"?f.current!==!1&&(f.current=!1,u(!1),Ke()):f.current!==!0&&(f.current=!0,u(!0),Ke());return}v=v.parentElement}},x=y(()=>({fontSize:r()+"px",fontFamily:"Menlo, Consolas, monospace"})),c=tl({text:l,font:x}),b=y(()=>Math.max(40,c()+10)),w=()=>`diff-root${e.diffFile.getId()}`;return(()=>{var m=ru(),v=m.firstChild,h=v.nextSibling,L=h.firstChild,p=L.firstChild,_=p.nextSibling,N=_.nextSibling;return Ot(d,v),I(h,"font-size",`var(${ge})`),N.$$mousedown=a,F(N,k(cn,{get each(){return n()},children:S=>[k(Pl,{get index(){return S.index},get lineNumber(){return S.lineNumber},get diffFile(){return e.diffFile}}),k(Ka,{get index(){return S.index},get lineNumber(){return S.lineNumber},get diffFile(){return e.diffFile}}),k(lu,{get index(){return S.index},get lineNumber(){return S.lineNumber},get diffFile(){return e.diffFile}}),k(Ya,{get index(){return S.index},get lineNumber(){return S.lineNumber},get diffFile(){return e.diffFile}})]}),null),F(N,k(Pl,{get index(){return e.diffFile.unifiedLineLength},get lineNumber(){return e.diffFile.unifiedLineLength},get diffFile(){return e.diffFile}}),null),j(S=>{var $=`unified-diff-view ${s()?"unified-diff-view-wrap":"unified-diff-view-normal"} w-full`,A={[ne]:`${Math.round(b())}px`},T=`unified-diff-table w-full border-collapse border-spacing-0 ${s()?"table-fixed":""}`;return $!==S.e&&fe(m,S.e=$),S.t=Ge(h,A,S.t),T!==S.a&&fe(L,S.a=T),S},{e:void 0,t:void 0,a:void 0}),m})()};wt(["mousedown"]);const ou=(e,t)=>yd(()=>{var n,i;const l=Ee(t),r=R=>l.value=R,s=Ee(),o=R=>s.value=R,d=Ee(e.diffViewMode),f=R=>d.value=R,u=Ee(!1),a=R=>u.value=R,x=Ee(e.diffViewWrap),c=R=>x.value=R,b=Ee(e.diffViewAddWidget),w=R=>b.value=R,m=Ee(e.diffViewHighlight),v=R=>m.value=R,h=Ee(e.diffViewFontSize),L=R=>h.value=R,p=Ee({oldFile:{...(n=e.extendData)==null?void 0:n.oldFile},newFile:{...(i=e.extendData)==null?void 0:i.newFile}}),_=R=>{p.value={oldFile:{...R==null?void 0:R.oldFile},newFile:{...R==null?void 0:R.newFile}}},N=Ee(e.renderWidgetLine),S=R=>N.value=R,$=Ee(e.renderExtendLine),A=R=>$.value=R,T={current:e.onAddWidgetClick};return{id:l,setId:r,dom:s,setDom:o,mode:d,setMode:f,isMounted:u,setIsIsMounted:a,enableWrap:x,setEnableWrap:c,enableAddWidget:b,setEnableAddWidget:w,enableHighlight:m,setEnableHighlight:v,fontSize:h,setFontSize:L,extendData:p,setExtendData:_,renderWidgetLine:N,setRenderWidgetLine:S,renderExtendLine:$,setRenderExtendLine:A,onAddWidgetClick:T,setOnAddWidgetClick:R=>T.current=R.current}});var du=H("<div class=diff-style-root><div>"),au=H("<div class=diff-tailwindcss-wrapper data-component=git-diff-view>");io.name="@git-diff-view/solid";const uu=e=>{var t,n,i;const l=()=>{var v,h,L,p,_,N;let S=null;return e.diffFile?(S=Pn.createInstance({}),S._mergeFullBundle(e.diffFile._getFullBundle())):e.data&&(S=new Pn(((v=e.data.oldFile)==null?void 0:v.fileName)||"",((h=e.data.oldFile)==null?void 0:h.content)||"",((L=e.data.newFile)==null?void 0:L.fileName)||"",((p=e.data.newFile)==null?void 0:p.content)||"",e.data.hunks||[],((_=e.data.oldFile)==null?void 0:_.fileLang)||"",((N=e.data.newFile)==null?void 0:N.fileLang)||"")),de(()=>{var $;return($=S==null?void 0:S.clear)==null?void 0:$.call(S)}),S},[r,s]=K(null),o=y(l),[d,f]=K(!1);re(()=>{f(!0)});const[u,a]=K({side:(t=e.initialWidgetState)==null?void 0:t.side,lineNumber:(n=e.initialWidgetState)==null?void 0:n.lineNumber}),x=ou(e,((i=o())==null?void 0:i.getId())||"");re(()=>{const{setId:v,setDom:h,setEnableAddWidget:L,setEnableHighlight:p,setEnableWrap:_,setExtendData:N,setFontSize:S,setIsIsMounted:$,setMode:A,setOnAddWidgetClick:T,setRenderExtendLine:W,setRenderWidgetLine:R}=x.getReadonlyState(),D=o();v((D==null?void 0:D.getId())||""),L(!!e.diffViewAddWidget),p(!!e.diffViewHighlight),_(!!e.diffViewWrap),S(e.diffViewFontSize||14),$(d()),A(e.diffViewMode||ut.Split),h(r()),T({current:e.onAddWidgetClick}),W(e.renderExtendLine),R(e.renderWidgetLine),N(e.extendData)}),re(()=>{e.initialWidgetState&&a({side:e.initialWidgetState.side,lineNumber:e.initialWidgetState.lineNumber})});const c=()=>{const v=d(),h=o();v&&e.diffFile&&h&&(e.diffFile._addClonedInstance(h),de(()=>{var L;return(L=e.diffFile)==null?void 0:L._delClonedInstance(h)}))},b=()=>{const v=d(),h=o();v&&h&&(h.initTheme(e.diffViewTheme),h.initRaw(),h.buildSplitDiffLines(),h.buildUnifiedDiffLines(),h.notifyAll())},w=()=>{const v=d(),h=o();e.diffViewTheme,v&&h&&(e.diffViewHighlight&&h.initSyntax({registerHighlighter:e.registerHighlighter}),h.notifyAll())},m=()=>{const v=d(),h=o();if(v&&h&&r()){const L=()=>{var _,N;(_=r())==null||_.setAttribute("data-theme",h._getTheme()||"light"),(N=r())==null||N.setAttribute("data-highlighter",h._getHighlighterName())};L();const p=h.subscribe(L);de(()=>p())}};return re(c),re(b),re(w),re(m),de(()=>x.clear()),k(X,{get when(){return o()},get children(){var v=au();return Ot(s,v),M(v,"data-version","0.0.8"),F(v,k(Jr.Provider,{value:x,get children(){return k(rs.Provider,{value:[u,a],get children(){var h=du(),L=h.firstChild;return F(L,(()=>{var p=P(()=>!!(!e.diffViewMode||e.diffViewMode&ut.Split));return()=>p()?k(Ba,{get diffFile(){return o()}}):k(su,{get diffFile(){return o()}})})()),j(p=>{var _,N={[ge]:(e.diffViewFontSize||14)+"px"},S=d()?`diff-root${(_=o())==null?void 0:_.getId()}`:void 0,$="diff-view-wrapper"+(e.class?` ${e.class}`:""),A=e.style;return p.e=Ge(h,N,p.e),S!==p.t&&M(L,"id",p.t=S),$!==p.a&&fe(L,p.a=$),p.o=Ge(L,A,p.o),p},{e:void 0,t:void 0,a:void 0,o:void 0}),h}})}})),j(h=>{var L,p,_,N,S=((p=(L=o())==null?void 0:L._getTheme)==null?void 0:p.call(L))||"light",$=(N=(_=o())==null?void 0:_._getHighlighterName)==null?void 0:N.call(_);return S!==h.e&&M(v,"data-theme",h.e=S),$!==h.t&&M(v,"data-highlighter",h.t=$),h},{e:void 0,t:void 0}),v}})};function fu(e){return k(uu,e)}const Cu=fu;export{Hn as $,$u as A,$s as B,ut as C,Cu as D,Fu as E,cn as F,ku as G,Iu as M,X as S,j as a,re as b,y as c,K as d,In as e,V as f,Ss as g,gu as h,ws as i,xu as j,Zn as k,gn as l,Lu as m,k as n,de as o,vu as p,yu as q,Is as r,pu as s,bu as t,xe as u,ul as v,_u as w,Su as x,Gl as y,Nu as z};
|