@runfusion/fusion 0.70.2 → 0.71.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/bin.js +174 -7
- package/dist/child-process-worker.js +30 -6
- package/dist/client/.vite/manifest.json +246 -246
- package/dist/client/assets/{AgentDetailView-UMM9DyW-.js → AgentDetailView-BvY24zNh.js} +1 -1
- package/dist/client/assets/{AgentPermissionPolicyEditor-BfNZUiDb.js → AgentPermissionPolicyEditor-CYvJw48-.js} +1 -1
- package/dist/client/assets/{AgentsView-DtC-DVyX.js → AgentsView-BWkWEfNs.js} +3 -3
- package/dist/client/assets/{ChatView-sDJXcOwT.js → ChatView-BhlVq9Re.js} +1 -1
- package/dist/client/assets/{CommandCenter-B7BECRSV.js → CommandCenter-DingokjC.js} +1 -1
- package/dist/client/assets/{DevServerView-CyW7l6rY.js → DevServerView-kfNJk83M.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-BT3OeDJ3.js → DirectoryPicker-Cluyep4u.js} +1 -1
- package/dist/client/assets/{DocumentsView-Dbn8T4ZT.js → DocumentsView-Bwc5HSg7.js} +1 -1
- package/dist/client/assets/{EvalsView-DGOBPt3P.js → EvalsView-BEr_MhJ4.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-Beno0EK8.js → ExperimentalAgentOnboardingModal-CZK-KtFP.js} +1 -1
- package/dist/client/assets/{GoalsView-BLxtocMB.js → GoalsView-B_Qrm8po.js} +1 -1
- package/dist/client/assets/{InsightsView-DjTpiw1S.js → InsightsView-BfbclBHM.js} +1 -1
- package/dist/client/assets/{MemoryView-BvAhPVCo.js → MemoryView-V9Y08BtR.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-Di3Q9J6V.js → PiExtensionsManager-B7fl5l3O.js} +1 -1
- package/dist/client/assets/{PluginManager-reQpowmU.js → PluginManager-H32X557C.js} +1 -1
- package/dist/client/assets/{PullRequestView-DLDz9RXL.js → PullRequestView-Dhz86tnJ.js} +1 -1
- package/dist/client/assets/{ResearchView-BpdpPwyr.js → ResearchView-DEObk9J2.js} +1 -1
- package/dist/client/assets/{SecretsView-BHu1JHnH.js → SecretsView-DFEWUbXI.js} +1 -1
- package/dist/client/assets/{SessionTerminal-rtlAx2uQ.js → SessionTerminal-CwfTrmor.js} +1 -1
- package/dist/client/assets/{SettingsModal-B7m-bZlG.js → SettingsModal-2mlwjfVZ.js} +1 -1
- package/dist/client/assets/{SettingsModal-Dxz7-SNa.js → SettingsModal-H1TNebmF.js} +3 -3
- package/dist/client/assets/{SettingsTextareaRow-5Vb6XYSC.js → SettingsTextareaRow-ByeSU4Pi.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-BixsaVgv.js → SetupWizardModal-BFZnVJX1.js} +2 -2
- package/dist/client/assets/{SkillsView-CNQaKfLx.js → SkillsView-DScNdDRz.js} +1 -1
- package/dist/client/assets/{ThemeDropdown-Bhz3TH1Z.js → ThemeDropdown-BKl0kouU.js} +1 -1
- package/dist/client/assets/{TodoView-Ccr5rxPw.js → TodoView-_HojIE_Y.js} +1 -1
- package/dist/client/assets/{WorkflowNodeEditor-BeY_3iQR.js → WorkflowNodeEditor-CoQYdUYX.js} +1 -1
- package/dist/client/assets/{app-bX7Aarj6.js → app-0sCAWTFb.js} +1 -1
- package/dist/client/assets/{app-BFkCDjfl.js → app-Cndq8AGV.js} +1 -1
- package/dist/client/assets/{app-Bx4Tg9WL.js → app-CqpqmC8O.js} +1 -1
- package/dist/client/assets/{app-BwKqEIVs.js → app-DjxXVWX9.js} +1 -1
- package/dist/client/assets/{app-gasJpw6T.js → app-DrnsOtt9.js} +1 -1
- package/dist/client/assets/{app-BLTqCjPk.js → app-Kb21Gl_h.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-DbmZMyHk.js → architectureDiagram-3BPJPVTR-vIoH_tGm.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-BkspaqvN.js → blockDiagram-GPEHLZMM-BqjSE9AM.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-BfOk6DAf.js → c4Diagram-AAUBKEIU-TWEWVE4T.js} +1 -1
- package/dist/client/assets/channel-hhQEu5zM.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-DbL54v_S.js → chunk-2J33WTMH-CJM3p9Fh.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-VAUWnfVr.js → chunk-4BX2VUAB-Bf_1wJ7O.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-C5h7MxPM.js → chunk-55IACEB6-CI4ThikJ.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CCc56jyj.js → chunk-727SXJPM-C2TasaKk.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-CUK6s79q.js → chunk-AQP2D5EJ-BqKUxt3g.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-COFczZ8r.js → chunk-FMBD7UC4-CdK77AxG.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-BXTcFeIM.js → chunk-ND2GUHAM-TE8zbIZ3.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-BEYAo7eA.js → chunk-QZHKN3VN-7lgttGIx.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-C2Thhy7D.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C2Thhy7D.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-DqQ74MrB.js → cose-bilkent-S5V4N54A-DsK8EBeo.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-D1DsLIdG.js → dagre-BM42HDAG-COza1ss6.js} +1 -1
- package/dist/client/assets/{dashboard-view-DFy7Ta-E.js → dashboard-view-D_etacMS.js} +1 -1
- package/dist/client/assets/{dashboard-view-D5F_ho0i.js → dashboard-view-ILJ_vnYK.js} +1 -1
- package/dist/client/assets/{dashboard-view-CgBE7XiJ.js → dashboard-view-JEFD-Zgw.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-p-547bXh.js → diagram-2AECGRRQ-Co_F0-vp.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-BE9UnZuh.js → diagram-5GNKFQAL-BD_n7vU0.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-BHTLL-vQ.js → diagram-KO2AKTUF-SFnuzet_.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-CWLbQcuj.js → diagram-LMA3HP47-CFYeR0mH.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-CXUiMHIE.js → diagram-OG6HWLK6-DOVfqKgw.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-Dre62Vsd.js → erDiagram-TEJ5UH35-DkeW3bDN.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-BFeMnep3.js → flowDiagram-I6XJVG4X-CVaNMQl_.js} +1 -1
- package/dist/client/assets/{folder-open-s7aQO2Ib.js → folder-open-BY1Gp9Wf.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-CfrUWiHI.js → ganttDiagram-6RSMTGT7-BQJ0x5Hq.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-KjKsgpva.js → gitGraphDiagram-PVQCEYII-CIt0P2Lg.js} +1 -1
- package/dist/client/assets/{index-DF2cd-e3.js → index-ClPjlOHJ.js} +168 -168
- package/dist/client/assets/index-GJLKrqhe.css +1 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-Cb_8B_3K.js → infoDiagram-5YYISTIA-B1KKCn80.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-8jtlcCaf.js → ishikawaDiagram-YF4QCWOH-CzG1cEeg.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-O6X0tJvH.js → journeyDiagram-JHISSGLW-CNB7oM4Q.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-BetEnps7.js → kanban-definition-UN3LZRKU-D8vXTzfs.js} +1 -1
- package/dist/client/assets/{mermaid.core-CZbT2qhF.js → mermaid.core-BUhJJv1M.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-BRjDmxQK.js → mindmap-definition-RKZ34NQL-y_XyU0Us.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-CJHx1ZvR.js → pieDiagram-4H26LBE5-MB9aZtTc.js} +1 -1
- package/dist/client/assets/{puzzle-BJEQBgfR.js → puzzle-CE00Ce2g.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-D49nAI3y.js → quadrantDiagram-W4KKPZXB-hF7q33gK.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-BM4Uv6Jr.js → requirementDiagram-4Y6WPE33-BIOIzbEd.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-RSKSlyjr.js → sankeyDiagram-5OEKKPKP-BpLzUxJ8.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-BXpcHAnr.js → sequenceDiagram-3UESZ5HK-CLXamQhZ.js} +1 -1
- package/dist/client/assets/{shield-alert-DcsqJWMG.js → shield-alert-BhLVV0rp.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-CUYzx5D8.js → standing-instructions-template-96KSNan7.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-CavU8Ef4.js → stateDiagram-AJRCARHV-CPRWhQtZ.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-Cq-9bJPI.js → stateDiagram-v2-BHNVJYJU-8GvpOVMc.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-7fHh3hS9.js → timeline-definition-PNZ67QCA-BAAldJMW.js} +1 -1
- package/dist/client/assets/{upload-DNwFaPfV.js → upload-DbKZcYCW.js} +1 -1
- package/dist/client/assets/{users-D-kPhpXu.js → users-ccVe3aKQ.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-mCh9G6D5.js → vennDiagram-CIIHVFJN-DGSAcrfx.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-DEu4AYE9.js → wardley-L42UT6IY-CLGvNiAx.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-DRL0ZyeQ.js → wardleyDiagram-YWT4CUSO-BhU8FLGx.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-DUpC-GBX.js → xychartDiagram-2RQKCTM6-BQ6AzTfE.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/extension.js +30 -6
- package/dist/plugins/fusion-plugin-dependency-graph/.bundled.reload-1.js +8084 -0
- package/dist/plugins/fusion-plugin-grok-runtime/.bundled.reload-2.js +26479 -0
- package/package.json +1 -1
- package/dist/client/assets/channel-CABKCAbA.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DgshwmmF.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DgshwmmF.js +0 -1
- package/dist/client/assets/index-Co20nJU4.css +0 -1
package/dist/client/assets/{vennDiagram-CIIHVFJN-mCh9G6D5.js → vennDiagram-CIIHVFJN-DGSAcrfx.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aC as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as w,E as wt,K as Jt,a4 as Qt,V as $t,W as te,X as ee,d as ne,z as se,G as ie,H as oe}from"./mermaid.core-CZbT2qhF.js";import{s as ot}from"./vendor-reactflow-9C3XTE7_.js";import"./index-DF2cd-e3.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let E=A-M;E<0&&(E+=2*Math.PI);const S=A-E/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,E=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){E[p]=0;for(let f=0;f<b;++f)E[p]+=x[f][p];E[p]/=b}const l=x[b];if(J(S,1+h,E,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,E,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,E,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,E,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let E=0;E<16;++E)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Et({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,E=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,E=S)}u(E,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},E=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=E[S];return S+=1,S>=E.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const T=p.select("svg");n?T.attr("viewBox",`0 0 ${s} ${e}`):T.attr("width",s).attr("height",e);const R={};let _=!1;T.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let X=R[et],Z=I[et];return X||(X={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Z.x*F,y:X.y*(1-F)+Z.y*F,radius:X.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=T.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const Y=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),Y.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,E=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",E),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aC as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as w,E as wt,K as Jt,a4 as Qt,V as $t,W as te,X as ee,d as ne,z as se,G as ie,H as oe}from"./mermaid.core-BUhJJv1M.js";import{s as ot}from"./vendor-reactflow-9C3XTE7_.js";import"./index-ClPjlOHJ.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let E=A-M;E<0&&(E+=2*Math.PI);const S=A-E/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,E=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){E[p]=0;for(let f=0;f<b;++f)E[p]+=x[f][p];E[p]/=b}const l=x[b];if(J(S,1+h,E,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,E,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,E,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,E,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let E=0;E<16;++E)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Et({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,E=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,E=S)}u(E,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},E=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=E[S];return S+=1,S>=E.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const T=p.select("svg");n?T.attr("viewBox",`0 0 ${s} ${e}`):T.attr("width",s).attr("height",e);const R={};let _=!1;T.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let X=R[et],Z=I[et];return X||(X={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Z.x*F,y:X.y*(1-F)+Z.y*F,radius:X.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=T.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const Y=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),Y.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,E=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",E),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as qt}from"./index-DF2cd-e3.js";var Qb=Object.create,Es=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,Yd=Object.getOwnPropertyNames,tw=Object.getPrototypeOf,rw=Object.prototype.hasOwnProperty,i=(e,t)=>Es(e,"name",{value:t,configurable:!0}),nw=(e,t)=>function(){return e&&(t=(0,e[Yd(e)[0]])(e=0)),t},V=(e,t)=>function(){return t||(0,e[Yd(e)[0]])((t={exports:{}}).exports,t),t.exports},Kr=(e,t)=>{for(var r in t)Es(e,r,{get:t[r],enumerable:!0})},Xd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yd(t))!rw.call(e,a)&&a!==r&&Es(e,a,{get:()=>t[a],enumerable:!(n=ew(t,a))||n.enumerable});return e},$l=(e,t,r)=>(Xd(e,t,"default"),r),Jd=(e,t,r)=>(r=e!=null?Qb(tw(e)):{},Xd(Es(r,"default",{value:e,enumerable:!0}),e)),Zd=e=>Xd(Es({},"__esModule",{value:!0}),e),Al={};Kr(Al,{AnnotatedTextEdit:()=>dr,ChangeAnnotation:()=>tn,ChangeAnnotationIdentifier:()=>je,CodeAction:()=>Ou,CodeActionContext:()=>Pu,CodeActionKind:()=>ku,CodeActionTriggerKind:()=>Gi,CodeDescription:()=>cu,CodeLens:()=>Lu,Color:()=>fo,ColorInformation:()=>nu,ColorPresentation:()=>au,Command:()=>en,CompletionItem:()=>Tu,CompletionItemKind:()=>pu,CompletionItemLabelDetails:()=>vu,CompletionItemTag:()=>mu,CompletionList:()=>Ru,CreateFile:()=>ua,DeleteFile:()=>fa,Diagnostic:()=>Di,DiagnosticRelatedInformation:()=>po,DiagnosticSeverity:()=>ou,DiagnosticTag:()=>lu,DocumentHighlight:()=>Cu,DocumentHighlightKind:()=>_u,DocumentLink:()=>Mu,DocumentSymbol:()=>Nu,DocumentUri:()=>eu,EOL:()=>bg,FoldingRange:()=>su,FoldingRangeKind:()=>iu,FormattingOptions:()=>Du,Hover:()=>$u,InlayHint:()=>qu,InlayHintKind:()=>go,InlayHintLabelPart:()=>yo,InlineCompletionContext:()=>Ju,InlineCompletionItem:()=>Vu,InlineCompletionList:()=>Hu,InlineCompletionTriggerKind:()=>Yu,InlineValueContext:()=>Ku,InlineValueEvaluatableExpression:()=>Bu,InlineValueText:()=>Uu,InlineValueVariableLookup:()=>zu,InsertReplaceEdit:()=>gu,InsertTextFormat:()=>hu,InsertTextMode:()=>yu,Location:()=>Li,LocationLink:()=>ru,MarkedString:()=>Fi,MarkupContent:()=>pa,MarkupKind:()=>mo,OptionalVersionedTextDocumentIdentifier:()=>xi,ParameterInformation:()=>Au,Position:()=>ie,Range:()=>ee,RenameFile:()=>da,SelectedCompletionInfo:()=>Xu,SelectionRange:()=>xu,SemanticTokenModifiers:()=>Gu,SemanticTokenTypes:()=>Fu,SemanticTokens:()=>ju,SignatureInformation:()=>Eu,StringValue:()=>Wu,SymbolInformation:()=>wu,SymbolKind:()=>Su,SymbolTag:()=>bu,TextDocument:()=>Qu,TextDocumentEdit:()=>Mi,TextDocumentIdentifier:()=>uu,TextDocumentItem:()=>fu,TextEdit:()=>Vt,URI:()=>uo,VersionedTextDocumentIdentifier:()=>du,WorkspaceChange:()=>Sg,WorkspaceEdit:()=>ho,WorkspaceFolder:()=>Zu,WorkspaceSymbol:()=>Iu,integer:()=>tu,uinteger:()=>Oi});var eu,uo,tu,Oi,ie,ee,Li,ru,fo,nu,au,iu,su,po,ou,lu,cu,Di,en,Vt,tn,je,dr,Mi,ua,da,fa,ho,Ei,kc,Sg,uu,du,xi,fu,mo,pa,pu,hu,mu,gu,yu,vu,Tu,Ru,Fi,$u,Au,Eu,_u,Cu,Su,bu,wu,Iu,Nu,ku,Gi,Pu,Ou,Lu,Du,Mu,xu,Fu,Gu,ju,Uu,zu,Bu,Ku,go,yo,qu,Wu,Vu,Hu,Yu,Xu,Ju,Zu,bg,Qu,Mh,$,_s=nw({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(eu||(eu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(uo||(uo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(tu||(tu={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Oi||(Oi={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Oi.MAX_VALUE),a===Number.MAX_VALUE&&(a=Oi.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&$.uinteger(a.line)&&$.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if($.uinteger(n)&&$.uinteger(a)&&$.uinteger(s)&&$.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(ee||(ee={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&($.string(a.uri)||$.undefined(a.uri))}i(r,"is"),e.is=r})(Li||(Li={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.targetRange)&&$.string(a.targetUri)&&ee.is(a.targetSelectionRange)&&(ee.is(a.originSelectionRange)||$.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(ru||(ru={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.numberRange(a.red,0,1)&&$.numberRange(a.green,0,1)&&$.numberRange(a.blue,0,1)&&$.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(fo||(fo={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ee.is(a.range)&&fo.is(a.color)}i(r,"is"),e.is=r})(nu||(nu={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.undefined(a.textEdit)||Vt.is(a))&&($.undefined(a.additionalTextEdits)||$.typedArray(a.additionalTextEdits,Vt.is))}i(r,"is"),e.is=r})(au||(au={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(iu||(iu={})),(function(e){function t(n,a,s,o,l,c){const u={startLine:n,endLine:a};return $.defined(s)&&(u.startCharacter=s),$.defined(o)&&(u.endCharacter=o),$.defined(l)&&(u.kind=l),$.defined(c)&&(u.collapsedText=c),u}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.uinteger(a.startLine)&&$.uinteger(a.startLine)&&($.undefined(a.startCharacter)||$.uinteger(a.startCharacter))&&($.undefined(a.endCharacter)||$.uinteger(a.endCharacter))&&($.undefined(a.kind)||$.string(a.kind))}i(r,"is"),e.is=r})(su||(su={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&Li.is(a.location)&&$.string(a.message)}i(r,"is"),e.is=r})(po||(po={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ou||(ou={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(lu||(lu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&$.string(n.href)}i(t,"is"),e.is=t})(cu||(cu={})),(function(e){function t(n,a,s,o,l,c){let u={range:n,message:a};return $.defined(s)&&(u.severity=s),$.defined(o)&&(u.code=o),$.defined(l)&&(u.source=l),$.defined(c)&&(u.relatedInformation=c),u}i(t,"create"),e.create=t;function r(n){var a;let s=n;return $.defined(s)&&ee.is(s.range)&&$.string(s.message)&&($.number(s.severity)||$.undefined(s.severity))&&($.integer(s.code)||$.string(s.code)||$.undefined(s.code))&&($.undefined(s.codeDescription)||$.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&($.string(s.source)||$.undefined(s.source))&&($.undefined(s.relatedInformation)||$.typedArray(s.relatedInformation,po.is))}i(r,"is"),e.is=r})(Di||(Di={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return $.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.title)&&$.string(a.command)}i(r,"is"),e.is=r})(en||(en={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return $.objectLiteral(o)&&$.string(o.newText)&&ee.is(o.range)}i(a,"is"),e.is=a})(Vt||(Vt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&($.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(tn||(tn={})),(function(e){function t(r){const n=r;return $.string(n)}i(t,"is"),e.is=t})(je||(je={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Vt.is(o)&&(tn.is(o.annotationId)||je.is(o.annotationId))}i(a,"is"),e.is=a})(dr||(dr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&xi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(Mi||(Mi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&$.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(ua||(ua={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&$.string(a.oldUri)&&$.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(da||(da={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&$.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||$.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||$.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(fa||(fa={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>$.string(a.kind)?ua.is(a)||da.is(a)||fa.is(a):Mi.is(a)))}i(t,"is"),e.is=t})(ho||(ho={})),Ei=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Vt.insert(e,t):je.is(r)?(a=r,n=dr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Vt.replace(e,t):je.is(r)?(a=r,n=dr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Vt.del(e):je.is(t)?(n=t,r=dr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=dr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},kc=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(je.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Sg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new kc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Mi.is(t)){const r=new Ei(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new Ei(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(xi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new Ei(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new Ei(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kc,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ua.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=ua.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;tn.is(r)||je.is(r)?a=r:n=r;let s,o;if(a===void 0?s=da.create(e,t,n):(o=je.is(a)?a:this._changeAnnotations.manage(a),s=da.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=fa.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=fa.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)}i(r,"is"),e.is=r})(uu||(uu={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.integer(a.version)}i(r,"is"),e.is=r})(du||(du={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&(a.version===null||$.integer(a.version))}i(r,"is"),e.is=r})(xi||(xi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.string(a.languageId)&&$.integer(a.version)&&$.string(a.text)}i(r,"is"),e.is=r})(fu||(fu={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(mo||(mo={})),(function(e){function t(r){const n=r;return $.objectLiteral(r)&&mo.is(n.kind)&&$.string(n.value)}i(t,"is"),e.is=t})(pa||(pa={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(pu||(pu={})),(function(e){e.PlainText=1,e.Snippet=2})(hu||(hu={})),(function(e){e.Deprecated=1})(mu||(mu={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&$.string(a.newText)&&ee.is(a.insert)&&ee.is(a.replace)}i(r,"is"),e.is=r})(gu||(gu={})),(function(e){e.asIs=1,e.adjustIndentation=2})(yu||(yu={})),(function(e){function t(r){const n=r;return n&&($.string(n.detail)||n.detail===void 0)&&($.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(vu||(vu={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(Tu||(Tu={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(Ru||(Ru={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return $.string(a)||$.objectLiteral(a)&&$.string(a.language)&&$.string(a.value)}i(r,"is"),e.is=r})(Fi||(Fi={})),(function(e){function t(r){let n=r;return!!n&&$.objectLiteral(n)&&(pa.is(n.contents)||Fi.is(n.contents)||$.typedArray(n.contents,Fi.is))&&(r.range===void 0||ee.is(r.range))}i(t,"is"),e.is=t})($u||($u={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Au||(Au={})),(function(e){function t(r,n,...a){let s={label:r};return $.defined(n)&&(s.documentation=n),$.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Eu||(Eu={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(_u||(_u={})),(function(e){function t(r,n){let a={range:r};return $.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Cu||(Cu={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Su||(Su={})),(function(e){e.Deprecated=1})(bu||(bu={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(wu||(wu={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Iu||(Iu={})),(function(e){function t(n,a,s,o,l,c){let u={name:n,detail:a,kind:s,range:o,selectionRange:l};return c!==void 0&&(u.children=c),u}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.name)&&$.number(a.kind)&&ee.is(a.range)&&ee.is(a.selectionRange)&&(a.detail===void 0||$.string(a.detail))&&(a.deprecated===void 0||$.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Nu||(Nu={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ku||(ku={})),(function(e){e.Invoked=1,e.Automatic=2})(Gi||(Gi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.typedArray(a.diagnostics,Di.is)&&(a.only===void 0||$.typedArray(a.only,$.string))&&(a.triggerKind===void 0||a.triggerKind===Gi.Invoked||a.triggerKind===Gi.Automatic)}i(r,"is"),e.is=r})(Pu||(Pu={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):en.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.title)&&(a.diagnostics===void 0||$.typedArray(a.diagnostics,Di.is))&&(a.kind===void 0||$.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||en.is(a.command))&&(a.isPreferred===void 0||$.boolean(a.isPreferred))&&(a.edit===void 0||ho.is(a.edit))}i(r,"is"),e.is=r})(Ou||(Ou={})),(function(e){function t(n,a){let s={range:n};return $.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.command)||en.is(a.command))}i(r,"is"),e.is=r})(Lu||(Lu={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.uinteger(a.tabSize)&&$.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(Du||(Du={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.target)||$.string(a.target))}i(r,"is"),e.is=r})(Mu||(Mu={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(xu||(xu={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Fu||(Fu={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Gu||(Gu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(ju||(ju={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.string(a.text)}i(r,"is"),e.is=r})(Uu||(Uu={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.boolean(a.caseSensitiveLookup)&&($.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(zu||(zu={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&($.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(Bu||(Bu={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.defined(a)&&ee.is(n.stoppedLocation)}i(r,"is"),e.is=r})(Ku||(Ku={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(go||(go={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.location===void 0||Li.is(a.location))&&(a.command===void 0||en.is(a.command))}i(r,"is"),e.is=r})(yo||(yo={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ie.is(a.position)&&($.string(a.label)||$.typedArray(a.label,yo.is))&&(a.kind===void 0||go.is(a.kind))&&a.textEdits===void 0||$.typedArray(a.textEdits,Vt.is)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.paddingLeft===void 0||$.boolean(a.paddingLeft))&&(a.paddingRight===void 0||$.boolean(a.paddingRight))}i(r,"is"),e.is=r})(qu||(qu={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(Wu||(Wu={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(Vu||(Vu={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(Hu||(Hu={})),(function(e){e.Invoked=0,e.Automatic=1})(Yu||(Yu={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(Xu||(Xu={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Ju||(Ju={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&uo.is(n.uri)&&$.string(n.name)}i(t,"is"),e.is=t})(Zu||(Zu={})),bg=[`
|
|
1
|
+
import{_ as qt}from"./index-ClPjlOHJ.js";var Qb=Object.create,Es=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,Yd=Object.getOwnPropertyNames,tw=Object.getPrototypeOf,rw=Object.prototype.hasOwnProperty,i=(e,t)=>Es(e,"name",{value:t,configurable:!0}),nw=(e,t)=>function(){return e&&(t=(0,e[Yd(e)[0]])(e=0)),t},V=(e,t)=>function(){return t||(0,e[Yd(e)[0]])((t={exports:{}}).exports,t),t.exports},Kr=(e,t)=>{for(var r in t)Es(e,r,{get:t[r],enumerable:!0})},Xd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yd(t))!rw.call(e,a)&&a!==r&&Es(e,a,{get:()=>t[a],enumerable:!(n=ew(t,a))||n.enumerable});return e},$l=(e,t,r)=>(Xd(e,t,"default"),r),Jd=(e,t,r)=>(r=e!=null?Qb(tw(e)):{},Xd(Es(r,"default",{value:e,enumerable:!0}),e)),Zd=e=>Xd(Es({},"__esModule",{value:!0}),e),Al={};Kr(Al,{AnnotatedTextEdit:()=>dr,ChangeAnnotation:()=>tn,ChangeAnnotationIdentifier:()=>je,CodeAction:()=>Ou,CodeActionContext:()=>Pu,CodeActionKind:()=>ku,CodeActionTriggerKind:()=>Gi,CodeDescription:()=>cu,CodeLens:()=>Lu,Color:()=>fo,ColorInformation:()=>nu,ColorPresentation:()=>au,Command:()=>en,CompletionItem:()=>Tu,CompletionItemKind:()=>pu,CompletionItemLabelDetails:()=>vu,CompletionItemTag:()=>mu,CompletionList:()=>Ru,CreateFile:()=>ua,DeleteFile:()=>fa,Diagnostic:()=>Di,DiagnosticRelatedInformation:()=>po,DiagnosticSeverity:()=>ou,DiagnosticTag:()=>lu,DocumentHighlight:()=>Cu,DocumentHighlightKind:()=>_u,DocumentLink:()=>Mu,DocumentSymbol:()=>Nu,DocumentUri:()=>eu,EOL:()=>bg,FoldingRange:()=>su,FoldingRangeKind:()=>iu,FormattingOptions:()=>Du,Hover:()=>$u,InlayHint:()=>qu,InlayHintKind:()=>go,InlayHintLabelPart:()=>yo,InlineCompletionContext:()=>Ju,InlineCompletionItem:()=>Vu,InlineCompletionList:()=>Hu,InlineCompletionTriggerKind:()=>Yu,InlineValueContext:()=>Ku,InlineValueEvaluatableExpression:()=>Bu,InlineValueText:()=>Uu,InlineValueVariableLookup:()=>zu,InsertReplaceEdit:()=>gu,InsertTextFormat:()=>hu,InsertTextMode:()=>yu,Location:()=>Li,LocationLink:()=>ru,MarkedString:()=>Fi,MarkupContent:()=>pa,MarkupKind:()=>mo,OptionalVersionedTextDocumentIdentifier:()=>xi,ParameterInformation:()=>Au,Position:()=>ie,Range:()=>ee,RenameFile:()=>da,SelectedCompletionInfo:()=>Xu,SelectionRange:()=>xu,SemanticTokenModifiers:()=>Gu,SemanticTokenTypes:()=>Fu,SemanticTokens:()=>ju,SignatureInformation:()=>Eu,StringValue:()=>Wu,SymbolInformation:()=>wu,SymbolKind:()=>Su,SymbolTag:()=>bu,TextDocument:()=>Qu,TextDocumentEdit:()=>Mi,TextDocumentIdentifier:()=>uu,TextDocumentItem:()=>fu,TextEdit:()=>Vt,URI:()=>uo,VersionedTextDocumentIdentifier:()=>du,WorkspaceChange:()=>Sg,WorkspaceEdit:()=>ho,WorkspaceFolder:()=>Zu,WorkspaceSymbol:()=>Iu,integer:()=>tu,uinteger:()=>Oi});var eu,uo,tu,Oi,ie,ee,Li,ru,fo,nu,au,iu,su,po,ou,lu,cu,Di,en,Vt,tn,je,dr,Mi,ua,da,fa,ho,Ei,kc,Sg,uu,du,xi,fu,mo,pa,pu,hu,mu,gu,yu,vu,Tu,Ru,Fi,$u,Au,Eu,_u,Cu,Su,bu,wu,Iu,Nu,ku,Gi,Pu,Ou,Lu,Du,Mu,xu,Fu,Gu,ju,Uu,zu,Bu,Ku,go,yo,qu,Wu,Vu,Hu,Yu,Xu,Ju,Zu,bg,Qu,Mh,$,_s=nw({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(eu||(eu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(uo||(uo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(tu||(tu={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Oi||(Oi={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Oi.MAX_VALUE),a===Number.MAX_VALUE&&(a=Oi.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&$.uinteger(a.line)&&$.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if($.uinteger(n)&&$.uinteger(a)&&$.uinteger(s)&&$.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(ee||(ee={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&($.string(a.uri)||$.undefined(a.uri))}i(r,"is"),e.is=r})(Li||(Li={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.targetRange)&&$.string(a.targetUri)&&ee.is(a.targetSelectionRange)&&(ee.is(a.originSelectionRange)||$.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(ru||(ru={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.numberRange(a.red,0,1)&&$.numberRange(a.green,0,1)&&$.numberRange(a.blue,0,1)&&$.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(fo||(fo={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ee.is(a.range)&&fo.is(a.color)}i(r,"is"),e.is=r})(nu||(nu={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.undefined(a.textEdit)||Vt.is(a))&&($.undefined(a.additionalTextEdits)||$.typedArray(a.additionalTextEdits,Vt.is))}i(r,"is"),e.is=r})(au||(au={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(iu||(iu={})),(function(e){function t(n,a,s,o,l,c){const u={startLine:n,endLine:a};return $.defined(s)&&(u.startCharacter=s),$.defined(o)&&(u.endCharacter=o),$.defined(l)&&(u.kind=l),$.defined(c)&&(u.collapsedText=c),u}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.uinteger(a.startLine)&&$.uinteger(a.startLine)&&($.undefined(a.startCharacter)||$.uinteger(a.startCharacter))&&($.undefined(a.endCharacter)||$.uinteger(a.endCharacter))&&($.undefined(a.kind)||$.string(a.kind))}i(r,"is"),e.is=r})(su||(su={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&Li.is(a.location)&&$.string(a.message)}i(r,"is"),e.is=r})(po||(po={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ou||(ou={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(lu||(lu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&$.string(n.href)}i(t,"is"),e.is=t})(cu||(cu={})),(function(e){function t(n,a,s,o,l,c){let u={range:n,message:a};return $.defined(s)&&(u.severity=s),$.defined(o)&&(u.code=o),$.defined(l)&&(u.source=l),$.defined(c)&&(u.relatedInformation=c),u}i(t,"create"),e.create=t;function r(n){var a;let s=n;return $.defined(s)&&ee.is(s.range)&&$.string(s.message)&&($.number(s.severity)||$.undefined(s.severity))&&($.integer(s.code)||$.string(s.code)||$.undefined(s.code))&&($.undefined(s.codeDescription)||$.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&($.string(s.source)||$.undefined(s.source))&&($.undefined(s.relatedInformation)||$.typedArray(s.relatedInformation,po.is))}i(r,"is"),e.is=r})(Di||(Di={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return $.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.title)&&$.string(a.command)}i(r,"is"),e.is=r})(en||(en={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return $.objectLiteral(o)&&$.string(o.newText)&&ee.is(o.range)}i(a,"is"),e.is=a})(Vt||(Vt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&($.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(tn||(tn={})),(function(e){function t(r){const n=r;return $.string(n)}i(t,"is"),e.is=t})(je||(je={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Vt.is(o)&&(tn.is(o.annotationId)||je.is(o.annotationId))}i(a,"is"),e.is=a})(dr||(dr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&xi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(Mi||(Mi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&$.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(ua||(ua={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&$.string(a.oldUri)&&$.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(da||(da={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&$.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||$.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||$.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(fa||(fa={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>$.string(a.kind)?ua.is(a)||da.is(a)||fa.is(a):Mi.is(a)))}i(t,"is"),e.is=t})(ho||(ho={})),Ei=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Vt.insert(e,t):je.is(r)?(a=r,n=dr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Vt.replace(e,t):je.is(r)?(a=r,n=dr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Vt.del(e):je.is(t)?(n=t,r=dr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=dr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},kc=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(je.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Sg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new kc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Mi.is(t)){const r=new Ei(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new Ei(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(xi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new Ei(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new Ei(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kc,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ua.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=ua.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;tn.is(r)||je.is(r)?a=r:n=r;let s,o;if(a===void 0?s=da.create(e,t,n):(o=je.is(a)?a:this._changeAnnotations.manage(a),s=da.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=fa.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=fa.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)}i(r,"is"),e.is=r})(uu||(uu={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.integer(a.version)}i(r,"is"),e.is=r})(du||(du={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&(a.version===null||$.integer(a.version))}i(r,"is"),e.is=r})(xi||(xi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.string(a.languageId)&&$.integer(a.version)&&$.string(a.text)}i(r,"is"),e.is=r})(fu||(fu={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(mo||(mo={})),(function(e){function t(r){const n=r;return $.objectLiteral(r)&&mo.is(n.kind)&&$.string(n.value)}i(t,"is"),e.is=t})(pa||(pa={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(pu||(pu={})),(function(e){e.PlainText=1,e.Snippet=2})(hu||(hu={})),(function(e){e.Deprecated=1})(mu||(mu={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&$.string(a.newText)&&ee.is(a.insert)&&ee.is(a.replace)}i(r,"is"),e.is=r})(gu||(gu={})),(function(e){e.asIs=1,e.adjustIndentation=2})(yu||(yu={})),(function(e){function t(r){const n=r;return n&&($.string(n.detail)||n.detail===void 0)&&($.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(vu||(vu={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(Tu||(Tu={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(Ru||(Ru={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return $.string(a)||$.objectLiteral(a)&&$.string(a.language)&&$.string(a.value)}i(r,"is"),e.is=r})(Fi||(Fi={})),(function(e){function t(r){let n=r;return!!n&&$.objectLiteral(n)&&(pa.is(n.contents)||Fi.is(n.contents)||$.typedArray(n.contents,Fi.is))&&(r.range===void 0||ee.is(r.range))}i(t,"is"),e.is=t})($u||($u={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Au||(Au={})),(function(e){function t(r,n,...a){let s={label:r};return $.defined(n)&&(s.documentation=n),$.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Eu||(Eu={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(_u||(_u={})),(function(e){function t(r,n){let a={range:r};return $.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Cu||(Cu={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Su||(Su={})),(function(e){e.Deprecated=1})(bu||(bu={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(wu||(wu={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Iu||(Iu={})),(function(e){function t(n,a,s,o,l,c){let u={name:n,detail:a,kind:s,range:o,selectionRange:l};return c!==void 0&&(u.children=c),u}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.name)&&$.number(a.kind)&&ee.is(a.range)&&ee.is(a.selectionRange)&&(a.detail===void 0||$.string(a.detail))&&(a.deprecated===void 0||$.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Nu||(Nu={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ku||(ku={})),(function(e){e.Invoked=1,e.Automatic=2})(Gi||(Gi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.typedArray(a.diagnostics,Di.is)&&(a.only===void 0||$.typedArray(a.only,$.string))&&(a.triggerKind===void 0||a.triggerKind===Gi.Invoked||a.triggerKind===Gi.Automatic)}i(r,"is"),e.is=r})(Pu||(Pu={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):en.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.title)&&(a.diagnostics===void 0||$.typedArray(a.diagnostics,Di.is))&&(a.kind===void 0||$.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||en.is(a.command))&&(a.isPreferred===void 0||$.boolean(a.isPreferred))&&(a.edit===void 0||ho.is(a.edit))}i(r,"is"),e.is=r})(Ou||(Ou={})),(function(e){function t(n,a){let s={range:n};return $.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.command)||en.is(a.command))}i(r,"is"),e.is=r})(Lu||(Lu={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.uinteger(a.tabSize)&&$.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(Du||(Du={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.target)||$.string(a.target))}i(r,"is"),e.is=r})(Mu||(Mu={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(xu||(xu={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Fu||(Fu={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Gu||(Gu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(ju||(ju={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.string(a.text)}i(r,"is"),e.is=r})(Uu||(Uu={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.boolean(a.caseSensitiveLookup)&&($.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(zu||(zu={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&($.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(Bu||(Bu={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.defined(a)&&ee.is(n.stoppedLocation)}i(r,"is"),e.is=r})(Ku||(Ku={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(go||(go={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.location===void 0||Li.is(a.location))&&(a.command===void 0||en.is(a.command))}i(r,"is"),e.is=r})(yo||(yo={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ie.is(a.position)&&($.string(a.label)||$.typedArray(a.label,yo.is))&&(a.kind===void 0||go.is(a.kind))&&a.textEdits===void 0||$.typedArray(a.textEdits,Vt.is)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.paddingLeft===void 0||$.boolean(a.paddingLeft))&&(a.paddingRight===void 0||$.boolean(a.paddingRight))}i(r,"is"),e.is=r})(qu||(qu={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(Wu||(Wu={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(Vu||(Vu={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(Hu||(Hu={})),(function(e){e.Invoked=0,e.Automatic=1})(Yu||(Yu={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(Xu||(Xu={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Ju||(Ju={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&uo.is(n.uri)&&$.string(n.name)}i(t,"is"),e.is=t})(Zu||(Zu={})),bg=[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`,"\r"],(function(e){function t(s,o,l,c){return new Mh(s,o,l,c)}i(t,"create"),e.create=t;function r(s){let o=s;return!!($.defined(o)&&$.string(o.uri)&&($.undefined(o.languageId)||$.string(o.languageId))&&$.uinteger(o.lineCount)&&$.func(o.getText)&&$.func(o.positionAt)&&$.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),c=a(o,(d,f)=>{let h=d.range.start.line-f.range.start.line;return h===0?d.range.start.character-f.range.start.character:h}),u=l.length;for(let d=c.length-1;d>=0;d--){let f=c[d],h=s.offsetAt(f.range.start),y=s.offsetAt(f.range.end);if(y<=u)l=l.substring(0,h)+f.newText+l.substring(y,l.length);else throw new Error("Overlapping edit");u=h}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,c=s.slice(0,l),u=s.slice(l);a(c,o),a(u,o);let d=0,f=0,h=0;for(;d<c.length&&f<u.length;)o(c[d],u[f])<=0?s[h++]=c[d++]:s[h++]=u[f++];for(;d<c.length;)s[h++]=c[d++];for(;f<u.length;)s[h++]=u[f++];return s}i(a,"mergeSort")})(Qu||(Qu={})),Mh=class{static{i(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){r&&(e.push(n),r=!1);let a=t.charAt(n);r=a==="\r"||a===`
|
|
4
4
|
`,a==="\r"&&n+1<t.length&&t.charAt(n+1)===`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as St,g as Mt,q as Nt,p as zt,a as Lt,b as Tt,_ as u,L as At,E as Xt,G as K,l as J,K as Et,d as Yt,z as It,c as j}from"./mermaid.core-
|
|
1
|
+
import{s as St,g as Mt,q as Nt,p as zt,a as Lt,b as Tt,_ as u,L as At,E as Xt,G as K,l as J,K as Et,d as Yt,z as It,c as j}from"./mermaid.core-BUhJJv1M.js";import{p as Bt}from"./chunk-4BX2VUAB-Bf_1wJ7O.js";import{p as Ft}from"./wardley-L42UT6IY-CLGvNiAx.js";import"./index-ClPjlOHJ.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-reactflow-9C3XTE7_.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),U=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(Bt(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=U(r.fromPort)??U(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);J.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),It()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:Tt,getAccTitle:Lt,setDiagramTitle:zt,getDiagramTitle:Nt,getAccDescription:Mt,setAccDescription:St},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{J.debug(`Rendering Wardley map
|
|
2
2
|
`+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Et(n);E.selectAll("*").remove(),Yt(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h<i.length-1;h++){const y=i[h],m=i[h+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(o.componentIds.forEach(h=>{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=`
|
|
3
3
|
M ${o} ${i-l/2}
|
|
4
4
|
L ${o+p-f} ${i-l/2}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as ei,g as si,q as vt,p as ai,a as ni,b as oi,_ as s,l as Et,K as ri,d as hi,z as li,E as xt,h as ci,G as It,H as ui,L as gi,M as xi}from"./mermaid.core-
|
|
1
|
+
import{s as ei,g as si,q as vt,p as ai,a as ni,b as oi,_ as s,l as Et,K as ri,d as hi,z as li,E as xt,h as ci,G as It,H as ui,L as gi,M as xi}from"./mermaid.core-BUhJJv1M.js";import"./vendor-reactflow-9C3XTE7_.js";import{b as Tt}from"./band-CquvqAHh.js";import{l as Rt}from"./linear-BX4tvjNK.js";import{l as Dt}from"./step-yuy0qJer.js";import"./index-ClPjlOHJ.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";import"./init-Dmth1JHB.js";import"./ordinal-DILIJJjt.js";import"./defaultLocale-DX6XiGOO.js";var lt=(function(){var t=s(function(O,r,l,c){for(l=l||{},c=O.length;c--;l[O[c]]=r);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],a=[1,3],o=[1,5],d=[1,6],g=[1,7],w=[1,5,10,12,14,16,18,19,21,23,34,35,36],L=[1,25],W=[1,26],M=[1,28],T=[1,29],v=[1,30],z=[1,31],F=[1,32],R=[1,33],V=[1,34],p=[1,35],S=[1,36],h=[1,37],E=[1,43],B=[1,42],X=[1,47],Y=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],f=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],y=[1,64],D={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:s(function(r,l,c,u,b,n,Q){var x=n.length-1;switch(b){case 5:u.setOrientation(n[x]);break;case 9:u.setDiagramTitle(n[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},n[x]);break;case 13:u.setLineData(n[x-1],n[x]);break;case 14:u.setBarData({text:"",type:"text"},n[x]);break;case 15:u.setBarData(n[x-1],n[x]);break;case 16:this.$=n[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=n[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=n[x-1];break;case 20:this.$=[Number(n[x-2]),...n[x]];break;case 21:this.$=[Number(n[x])];break;case 22:u.setXAxisTitle(n[x]);break;case 23:u.setXAxisTitle(n[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(n[x]);break;case 26:u.setXAxisRangeData(Number(n[x-2]),Number(n[x]));break;case 27:this.$=n[x-1];break;case 28:this.$=[n[x-2],...n[x]];break;case 29:this.$=[n[x]];break;case 30:u.setYAxisTitle(n[x]);break;case 31:u.setYAxisTitle(n[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(n[x-2]),Number(n[x]));break;case 37:this.$={text:n[x],type:"text"};break;case 38:this.$={text:n[x],type:"text"};break;case 39:this.$={text:n[x],type:"markdown"};break;case 40:this.$=n[x];break;case 41:this.$=n[x-1]+""+n[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:a,34:o,35:d,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:a,34:o,35:d,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:a,8:[1,11],34:o,35:d,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(w,[2,34]),t(w,[2,35]),t(w,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:a,34:o,35:d,36:g}),{1:[2,3]},t(w,[2,5]),t(i,[2,7],{4:22,34:o,35:d,36:g}),{11:23,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:39,13:38,24:E,27:B,29:40,30:41,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:45,15:44,27:X,33:46,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:49,17:48,24:Y,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:52,17:51,24:Y,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{20:[1,53]},{22:[1,54]},t(A,[2,18]),{1:[2,2]},t(A,[2,8]),t(A,[2,9]),t(U,[2,37],{40:55,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h}),t(U,[2,38]),t(U,[2,39]),t(f,[2,40]),t(f,[2,42]),t(f,[2,43]),t(f,[2,44]),t(f,[2,45]),t(f,[2,46]),t(f,[2,47]),t(f,[2,48]),t(f,[2,49]),t(f,[2,50]),t(f,[2,51]),t(A,[2,10]),t(A,[2,22],{30:41,29:56,24:E,27:B}),t(A,[2,24]),t(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},t(A,[2,11]),t(A,[2,30],{33:60,27:X}),t(A,[2,32]),{31:[1,61]},t(A,[2,12]),{17:62,24:Y},{25:63,27:y},t(A,[2,14]),{17:65,24:Y},t(A,[2,16]),t(A,[2,17]),t(f,[2,41]),t(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(A,[2,31]),{27:[1,69]},t(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(A,[2,15]),t(A,[2,26]),t(A,[2,27]),{11:59,32:72,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},t(A,[2,33]),t(A,[2,19]),{25:73,27:y},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:s(function(r,l){if(l.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=l,c}},"parseError"),parse:s(function(r){var l=this,c=[0],u=[],b=[null],n=[],Q=this.table,x="",tt=0,Ct=0,Zt=2,St=1,Jt=n.slice.call(arguments,1),_=Object.create(this.lexer),$={yy:{}};for(var nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nt)&&($.yy[nt]=this.yy[nt]);_.setInput(r,$.yy),$.yy.lexer=_,$.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ot=_.yylloc;n.push(ot);var ti=_.options&&_.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ii(P){c.length=c.length-2*P,b.length=b.length-P,n.length=n.length-P}s(ii,"popStack");function _t(){var P;return P=u.pop()||_.lex()||St,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=l.symbols_[P]||P),P}s(_t,"lex");for(var k,q,I,rt,G={},it,N,kt,et;;){if(q=c[c.length-1],this.defaultActions[q]?I=this.defaultActions[q]:((k===null||typeof k>"u")&&(k=_t()),I=Q[q]&&Q[q][k]),typeof I>"u"||!I.length||!I[0]){var ht="";et=[];for(it in Q[q])this.terminals_[it]&&it>Zt&&et.push("'"+this.terminals_[it]+"'");_.showPosition?ht="Parse error on line "+(tt+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+et.join(", ")+", got '"+(this.terminals_[k]||k)+"'":ht="Parse error on line "+(tt+1)+": Unexpected "+(k==St?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(ht,{text:_.match,token:this.terminals_[k]||k,line:_.yylineno,loc:ot,expected:et})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+k);switch(I[0]){case 1:c.push(k),b.push(_.yytext),n.push(_.yylloc),c.push(I[1]),k=null,Ct=_.yyleng,x=_.yytext,tt=_.yylineno,ot=_.yylloc;break;case 2:if(N=this.productions_[I[1]][1],G.$=b[b.length-N],G._$={first_line:n[n.length-(N||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(N||1)].first_column,last_column:n[n.length-1].last_column},ti&&(G._$.range=[n[n.length-(N||1)].range[0],n[n.length-1].range[1]]),rt=this.performAction.apply(G,[x,Ct,tt,$.yy,I[1],b,n].concat(Jt)),typeof rt<"u")return rt;N&&(c=c.slice(0,-1*N*2),b=b.slice(0,-1*N),n=n.slice(0,-1*N)),c.push(this.productions_[I[1]][0]),b.push(G.$),n.push(G._$),kt=Q[c[c.length-2]][c[c.length-1]],c.push(kt);break;case 3:return!0}}return!0},"parse")},C=(function(){var O={EOF:1,parseError:s(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:s(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var l=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
package/dist/client/index.html
CHANGED
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
</script>
|
|
236
236
|
<!-- fusion:view-preload -->
|
|
237
237
|
|
|
238
|
-
<script type="module" crossorigin src="/assets/index-
|
|
238
|
+
<script type="module" crossorigin src="/assets/index-ClPjlOHJ.js"></script>
|
|
239
239
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-SZ_qB27O.js">
|
|
240
240
|
<link rel="modulepreload" crossorigin href="/assets/vendor-i18n-GF3RlKbq.js">
|
|
241
241
|
<link rel="modulepreload" crossorigin href="/assets/vendor-reactflow-9C3XTE7_.js">
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
<link rel="modulepreload" crossorigin href="/assets/vendor-xterm-BNq00GSj.js">
|
|
244
244
|
<link rel="stylesheet" crossorigin href="/assets/vendor-reactflow-C5ap-Sga.css">
|
|
245
245
|
<link rel="stylesheet" crossorigin href="/assets/vendor-xterm-LZoznX6r.css">
|
|
246
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
246
|
+
<link rel="stylesheet" crossorigin href="/assets/index-GJLKrqhe.css">
|
|
247
247
|
<link rel="stylesheet" href="/theme-data.css" id="theme-data" />
|
|
248
248
|
</head>
|
|
249
249
|
<body>
|
package/dist/client/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"0b6c4cd4c-10585e5f"}
|
package/dist/extension.js
CHANGED
|
@@ -47417,6 +47417,25 @@ function classifyColumnType(pgCol) {
|
|
|
47417
47417
|
}
|
|
47418
47418
|
return "plain";
|
|
47419
47419
|
}
|
|
47420
|
+
function stripNulChars(text2) {
|
|
47421
|
+
return text2.includes("\0") ? text2.replace(NUL_CHAR_RE, "") : text2;
|
|
47422
|
+
}
|
|
47423
|
+
function deepStripNulChars(value) {
|
|
47424
|
+
if (typeof value === "string") {
|
|
47425
|
+
return stripNulChars(value);
|
|
47426
|
+
}
|
|
47427
|
+
if (Array.isArray(value)) {
|
|
47428
|
+
return value.map(deepStripNulChars);
|
|
47429
|
+
}
|
|
47430
|
+
if (value !== null && typeof value === "object") {
|
|
47431
|
+
return Object.fromEntries(
|
|
47432
|
+
Object.entries(value).map(
|
|
47433
|
+
([key, entry]) => [stripNulChars(key), deepStripNulChars(entry)]
|
|
47434
|
+
)
|
|
47435
|
+
);
|
|
47436
|
+
}
|
|
47437
|
+
return value;
|
|
47438
|
+
}
|
|
47420
47439
|
function convertValue(value, type, nullJsonbFallback, preserveEmptyJsonbString = false) {
|
|
47421
47440
|
if (value === null || value === void 0) {
|
|
47422
47441
|
return type === "jsonb" && nullJsonbFallback !== void 0 ? nullJsonbFallback : null;
|
|
@@ -47429,12 +47448,12 @@ function convertValue(value, type, nullJsonbFallback, preserveEmptyJsonbString =
|
|
|
47429
47448
|
return nullJsonbFallback ?? (preserveEmptyJsonbString ? JSON.stringify(value) : null);
|
|
47430
47449
|
}
|
|
47431
47450
|
try {
|
|
47432
|
-
return JSON.stringify(JSON.parse(trimmed));
|
|
47451
|
+
return JSON.stringify(deepStripNulChars(JSON.parse(trimmed)));
|
|
47433
47452
|
} catch {
|
|
47434
|
-
return JSON.stringify(value);
|
|
47453
|
+
return JSON.stringify(stripNulChars(value));
|
|
47435
47454
|
}
|
|
47436
47455
|
}
|
|
47437
|
-
return JSON.stringify(value);
|
|
47456
|
+
return JSON.stringify(deepStripNulChars(value));
|
|
47438
47457
|
}
|
|
47439
47458
|
case "bytea": {
|
|
47440
47459
|
if (Buffer.isBuffer(value)) {
|
|
@@ -47452,7 +47471,7 @@ function convertValue(value, type, nullJsonbFallback, preserveEmptyJsonbString =
|
|
|
47452
47471
|
case "identity":
|
|
47453
47472
|
case "generated":
|
|
47454
47473
|
default:
|
|
47455
|
-
return value;
|
|
47474
|
+
return typeof value === "string" ? stripNulChars(value) : value;
|
|
47456
47475
|
}
|
|
47457
47476
|
}
|
|
47458
47477
|
function createQuarterProgressReporter(sourceRows, onCopyProgress) {
|
|
@@ -47477,7 +47496,7 @@ function tagLegacyCell(value) {
|
|
|
47477
47496
|
if (typeof value === "number" || typeof value === "bigint") {
|
|
47478
47497
|
return { type: "number", value: Object.is(value, -0) ? "-0" : String(value) };
|
|
47479
47498
|
}
|
|
47480
|
-
return { type: "text", value: String(value) };
|
|
47499
|
+
return { type: "text", value: stripNulChars(String(value)) };
|
|
47481
47500
|
}
|
|
47482
47501
|
function canonicalizeLegacyRows(rows, occurrences = /* @__PURE__ */ new Map()) {
|
|
47483
47502
|
return rows.map((row) => {
|
|
@@ -47945,7 +47964,7 @@ async function computeTargetCanonicalRows(db, pgSchema2, table, cols, projectId)
|
|
|
47945
47964
|
return canonical;
|
|
47946
47965
|
}).sort();
|
|
47947
47966
|
}
|
|
47948
|
-
var log4, INSERT_BATCH_SIZE, LEGACY_PRESERVATION_TARGETS, SQLITE_MIGRATION_STATE_TABLE, CENTRAL_SQLITE_MIGRATION_KEY, DryRunRollback;
|
|
47967
|
+
var log4, INSERT_BATCH_SIZE, LEGACY_PRESERVATION_TARGETS, SQLITE_MIGRATION_STATE_TABLE, CENTRAL_SQLITE_MIGRATION_KEY, DryRunRollback, NUL_CHAR_RE;
|
|
47949
47968
|
var init_sqlite_migrator = __esm({
|
|
47950
47969
|
"../core/src/postgres/sqlite-migrator.ts"() {
|
|
47951
47970
|
"use strict";
|
|
@@ -47970,6 +47989,7 @@ var init_sqlite_migrator = __esm({
|
|
|
47970
47989
|
this.name = "DryRunRollback";
|
|
47971
47990
|
}
|
|
47972
47991
|
};
|
|
47992
|
+
NUL_CHAR_RE = /\u0000/g;
|
|
47973
47993
|
}
|
|
47974
47994
|
});
|
|
47975
47995
|
|
|
@@ -59737,6 +59757,10 @@ async function createTaskStoreForBackend(options) {
|
|
|
59737
59757
|
*/
|
|
59738
59758
|
onProgress: (event) => {
|
|
59739
59759
|
log5.log(`startup-factory: SQLite migration \u2014 ${formatMigrationProgress2(event)}`);
|
|
59760
|
+
try {
|
|
59761
|
+
options.onMigrationProgress?.(event);
|
|
59762
|
+
} catch {
|
|
59763
|
+
}
|
|
59740
59764
|
}
|
|
59741
59765
|
});
|
|
59742
59766
|
const failedTables = report.tables.filter((table) => !table.skipped && !table.verified);
|