@cline/cli-windows-arm64 3.0.54 → 3.0.55
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/bin/cline.exe +0 -0
- package/cline-hub/webview/assets/Chat-D-n-DVAv.js +201 -0
- package/cline-hub/webview/assets/{DialogTitle-jgZKJpfs.js → DialogTitle-BqajMDIm.js} +1 -1
- package/cline-hub/webview/assets/{abnfDiagram-VRR7QNED-BLFmc_AX.js → abnfDiagram-VRR7QNED-Be9ivyLF.js} +1 -1
- package/cline-hub/webview/assets/arc-3UKfLtkz.js +1 -0
- package/cline-hub/webview/assets/{architectureDiagram-ZJ3FMSHR-DvcvwqFE.js → architectureDiagram-ZJ3FMSHR-BDsKCTs4.js} +1 -1
- package/cline-hub/webview/assets/{badge-DJicQweE.js → badge-6HhkS3z9.js} +1 -1
- package/cline-hub/webview/assets/{blockDiagram-677ZJIJ3-D2G4QuxG.js → blockDiagram-677ZJIJ3-CHD_J6RY.js} +2 -2
- package/cline-hub/webview/assets/bundle-mjs-CyB9GzWm.js +1 -0
- package/cline-hub/webview/assets/c4Diagram-LMCZKHZV-ClmFYV3g.js +10 -0
- package/cline-hub/webview/assets/channel-BIC0YCzT.js +1 -0
- package/cline-hub/webview/assets/{chunk-32BRIVSS-BsAqn4xZ.js → chunk-32BRIVSS-7roN4V45.js} +1 -1
- package/cline-hub/webview/assets/chunk-52WLFC77-DEfoFGdq.js +10 -0
- package/cline-hub/webview/assets/{chunk-BO2N2NFS-DhZuH4Af.js → chunk-BO2N2NFS-BsZ82u-z.js} +9 -9
- package/cline-hub/webview/assets/{chunk-C7G6YPKG-CV2Ol95R.js → chunk-C7G6YPKG-DBhUCKu7.js} +1 -1
- package/cline-hub/webview/assets/{chunk-EX3LRPZG-C7pvEKxc.js → chunk-EX3LRPZG-Cy_TQpzv.js} +1 -1
- package/cline-hub/webview/assets/{chunk-FWX5IMBZ-wv8Fkt1d.js → chunk-FWX5IMBZ-DO4vTS0i.js} +2 -2
- package/cline-hub/webview/assets/{chunk-HOUHSVGY-CFjt2s0d.js → chunk-HOUHSVGY-B04R_umg.js} +1 -1
- package/cline-hub/webview/assets/{chunk-ICXQ74PX-COcWu1Sq.js → chunk-ICXQ74PX-BSKRMyFr.js} +1 -1
- package/cline-hub/webview/assets/{chunk-MOJQB5TN-D44BZz7X.js → chunk-MOJQB5TN-B_gKeTxM.js} +1 -1
- package/cline-hub/webview/assets/{chunk-OGEWGWER-BVna3Z_8.js → chunk-OGEWGWER-CR4zh_DV.js} +1 -1
- package/cline-hub/webview/assets/{chunk-PUDLZKDR-CE01riew.js → chunk-PUDLZKDR-C6jX_SVA.js} +1 -1
- package/cline-hub/webview/assets/{chunk-Q4XR5HBZ-CtUzoHvJ.js → chunk-Q4XR5HBZ-DkRpWOkn.js} +2 -2
- package/cline-hub/webview/assets/chunk-RYQCIY6F-BUc8VYLJ.js +1 -0
- package/cline-hub/webview/assets/{chunk-V7JOEXUC-C4XkVjGi.js → chunk-V7JOEXUC-BMNa01wQ.js} +1 -1
- package/cline-hub/webview/assets/{chunk-VAUOI2AC-BlqTQL33.js → chunk-VAUOI2AC-DC6y0Pon.js} +1 -1
- package/cline-hub/webview/assets/{chunk-VR4S4FIN-CbCTOh7J.js → chunk-VR4S4FIN-NuklvPa4.js} +1 -1
- package/cline-hub/webview/assets/{chunk-WYO6CB5R-B91ryJFB.js → chunk-WYO6CB5R-Ht1kfqSA.js} +3 -3
- package/cline-hub/webview/assets/{chunk-ZGVPDNZ5-D5I51kcE.js → chunk-ZGVPDNZ5-CeJ5hUbe.js} +2 -2
- package/cline-hub/webview/assets/{chunk-ZIRB5QZD-BpeS1aZ7.js → chunk-ZIRB5QZD-O39ZBUk3.js} +4 -4
- package/cline-hub/webview/assets/classDiagram-OUVF2IWQ-Dsa9aGWZ.js +1 -0
- package/cline-hub/webview/assets/classDiagram-v2-EOCWNBFH-Dsa9aGWZ.js +1 -0
- package/cline-hub/webview/assets/{cose-bilkent-JH36ORCC-Do63cWW-.js → cose-bilkent-JH36ORCC-0-dytQ64.js} +1 -1
- package/cline-hub/webview/assets/{cynefinDiagram-TSTJHNR4-DxiC1jLj.js → cynefinDiagram-TSTJHNR4-CM3Cb0zD.js} +1 -1
- package/cline-hub/webview/assets/{dagre-VKFMJZFB-D4MnrU54.js → dagre-VKFMJZFB-C3zd729J.js} +1 -1
- package/cline-hub/webview/assets/{desktop-client-Cc9yU7GV.js → desktop-client-BzJm9_zB.js} +1 -1
- package/cline-hub/webview/assets/{diagram-FQU43EPY-D6nNqFiO.js → diagram-FQU43EPY-vHaV1X0k.js} +1 -1
- package/cline-hub/webview/assets/{diagram-G47NLZAW-C8pCvnUn.js → diagram-G47NLZAW-3CFUWxkm.js} +1 -1
- package/cline-hub/webview/assets/{diagram-NH7WQ7WH-BjRb6vlK.js → diagram-NH7WQ7WH-knhXCIYS.js} +1 -1
- package/cline-hub/webview/assets/{diagram-OA4YK3LP-BOaPe4YT.js → diagram-OA4YK3LP-Bj--3hBp.js} +1 -1
- package/cline-hub/webview/assets/{diagram-WEI45ONY-C2gh4ORi.js → diagram-WEI45ONY-CU1ul1cq.js} +1 -1
- package/cline-hub/webview/assets/{ebnfDiagram-CCIWWBDH-CjkO8TQF.js → ebnfDiagram-CCIWWBDH-CO67IabF.js} +1 -1
- package/cline-hub/webview/assets/{erDiagram-Q63AITRT-BMK30ekD.js → erDiagram-Q63AITRT-BYUDNAG5.js} +1 -1
- package/cline-hub/webview/assets/{extensions-view-BPiQgdTf.js → extensions-view-B1b0tJ3t.js} +1 -1
- package/cline-hub/webview/assets/flowDiagram-23GEKE2U-DB8ijrFq.js +1 -0
- package/cline-hub/webview/assets/{ganttDiagram-NO4QXBWP-BiXN4AZg.js → ganttDiagram-NO4QXBWP-XEhvpkHf.js} +1 -1
- package/cline-hub/webview/assets/{gitGraphDiagram-IHSO6WYX-G9vFn-Jf.js → gitGraphDiagram-IHSO6WYX-2WUvHlRx.js} +1 -1
- package/cline-hub/webview/assets/{highlighted-body-OFNGDK62-CgYHG1rO.js → highlighted-body-OFNGDK62-D1t0OvrR.js} +1 -1
- package/cline-hub/webview/assets/index-B21Kqr_i.js +10 -0
- package/cline-hub/webview/assets/{infoDiagram-FWYZ7A6U-DKv-n7tl.js → infoDiagram-FWYZ7A6U-BuLkUwbh.js} +1 -1
- package/cline-hub/webview/assets/{ishikawaDiagram-FXEZZL3T-CR3RSn8R.js → ishikawaDiagram-FXEZZL3T-Bt1KHIH7.js} +1 -1
- package/cline-hub/webview/assets/{journeyDiagram-5HDEW3XC-DLH3FDEU.js → journeyDiagram-5HDEW3XC-BVfSAExa.js} +2 -2
- package/cline-hub/webview/assets/{kanban-definition-HUTT4EX6-CfNVdKZg.js → kanban-definition-HUTT4EX6-CdFpXq3T.js} +2 -2
- package/cline-hub/webview/assets/{label-CFn0VYsb.js → label-l-huq4Ay.js} +1 -1
- package/cline-hub/webview/assets/{line-CJ_JkFXf.js → line-Zi3iUihi.js} +1 -1
- package/cline-hub/webview/assets/linear-CmpaHCv3.js +1 -0
- package/cline-hub/webview/assets/mermaid-GHXKKRXX-Ckyoy2Mi.js +1 -0
- package/cline-hub/webview/assets/mermaid-layout-BadlRzDJ.js +1 -0
- package/cline-hub/webview/assets/mermaid-layout-BqskXFQG.js +1 -0
- package/cline-hub/webview/assets/mermaid-layout-C2x7inlt.js +321 -0
- package/cline-hub/webview/assets/mermaid-layout-CD-JajuE.js +1 -0
- package/cline-hub/webview/assets/{mermaid-markup-aLwrmF5_.js → mermaid-markup-4KnljNms.js} +3 -3
- package/cline-hub/webview/assets/{mermaid-parser-CeG4Jv6J.js → mermaid-parser-B5dtuYEh.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-DEvma7oi.js → mermaid-parser-BICK3FdT.js} +16 -16
- package/cline-hub/webview/assets/{mermaid-parser-vz6fNr8n.js → mermaid-parser-BYr1RLu9.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-D7YKh_-X.js → mermaid-parser-Bd5X_psc.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-C0ihgYQ9.js → mermaid-parser-CUdSKy0R.js} +1 -1
- package/cline-hub/webview/assets/mermaid-parser-DL14msmj.js +1 -0
- package/cline-hub/webview/assets/mermaid-parser-DMx__WIl.js +1 -0
- package/cline-hub/webview/assets/mermaid-parser-Dp5WGUCu.js +1 -0
- package/cline-hub/webview/assets/{mermaid-parser-CJzh8iAc.js → mermaid-parser-u_Yu50JG.js} +2 -2
- package/cline-hub/webview/assets/{mermaid.core-Be9B_pr2.js → mermaid.core-gn7g72XA.js} +5 -5
- package/cline-hub/webview/assets/{mindmap-definition-LN4V7U3C-DUQyLHrD.js → mindmap-definition-LN4V7U3C-BivXsx29.js} +1 -1
- package/cline-hub/webview/assets/{ordinal-DtR4qwUh.js → ordinal-BDEzSJ7C.js} +1 -1
- package/cline-hub/webview/assets/path-fybaL0A-.js +1 -0
- package/cline-hub/webview/assets/{pegDiagram-2B236MQR-DOgBowT1.js → pegDiagram-2B236MQR-B3bct9eT.js} +1 -1
- package/cline-hub/webview/assets/{pieDiagram-ENE6RG2P-DRfeiass.js → pieDiagram-ENE6RG2P-DkDm2qZ7.js} +2 -2
- package/cline-hub/webview/assets/{quadrantDiagram-ABIIQ3AL-BgPT8pIn.js → quadrantDiagram-ABIIQ3AL-oKoCSLjB.js} +1 -1
- package/cline-hub/webview/assets/{railroadDiagram-RFXS5EU6-8wt-q6c9.js → railroadDiagram-RFXS5EU6-vFIfQEnq.js} +1 -1
- package/cline-hub/webview/assets/{requirementDiagram-TGXJPOKE-DRTUm7Qo.js → requirementDiagram-TGXJPOKE-XKSjP20t.js} +1 -1
- package/cline-hub/webview/assets/{rough.esm-By172zw-.js → rough.esm-Dy-Kn_BL.js} +1 -1
- package/cline-hub/webview/assets/{sankeyDiagram-HTMAVEWB-CeY3Y_ll.js → sankeyDiagram-HTMAVEWB-Bj74CCDT.js} +1 -1
- package/cline-hub/webview/assets/{sequenceDiagram-DBY2YBRQ-DSUB2OM4.js → sequenceDiagram-DBY2YBRQ-D-rKANAQ.js} +2 -2
- package/cline-hub/webview/assets/{settings-view-CBVLcC-5.js → settings-view-DqJIetkV.js} +3 -3
- package/cline-hub/webview/assets/{stateDiagram-2N3HPSRC-B2x_vEZe.js → stateDiagram-2N3HPSRC-B1gVQY9Z.js} +1 -1
- package/cline-hub/webview/assets/stateDiagram-v2-6OUMAXLB-BAbYfZMc.js +1 -0
- package/cline-hub/webview/assets/{swimlanes-5IMT3BWC-D4vQUhBS.js → swimlanes-5IMT3BWC-C3eLBK2s.js} +1 -1
- package/cline-hub/webview/assets/swimlanesDiagram-G3AALYLV-BiyLi762.js +8 -0
- package/cline-hub/webview/assets/{switch-1OAUgxzd.js → switch-CsW_9J9M.js} +1 -1
- package/cline-hub/webview/assets/{timeline-definition-FHXFAJF6-B-Cz6AFL.js → timeline-definition-FHXFAJF6-B7v7GMSp.js} +2 -2
- package/cline-hub/webview/assets/{vennDiagram-L72KCM5P-BHMfdY1b.js → vennDiagram-L72KCM5P-CTNU0xJq.js} +1 -1
- package/cline-hub/webview/assets/vscode-2dRY2WFo.js +1 -0
- package/cline-hub/webview/assets/{wardleyDiagram-EHGQE667-BgTZ-C-Z.js → wardleyDiagram-EHGQE667-B1h41ZEX.js} +15 -15
- package/cline-hub/webview/assets/{xychartDiagram-FW5EYKEG-B9lKc__k.js → xychartDiagram-FW5EYKEG--ZLgcMtO.js} +1 -1
- package/cline-hub/webview/index.html +4 -4
- package/extensions/plugin-sandbox-bootstrap.js +1 -1
- package/package.json +1 -1
- package/cline-hub/webview/assets/Chat-Ddr1_y0K.js +0 -197
- package/cline-hub/webview/assets/arc-DD7eF3YX.js +0 -1
- package/cline-hub/webview/assets/bundle-mjs-CSP5ngA5.js +0 -1
- package/cline-hub/webview/assets/c4Diagram-LMCZKHZV-C6Nuiq7M.js +0 -10
- package/cline-hub/webview/assets/channel-CSeXS2Ai.js +0 -1
- package/cline-hub/webview/assets/chunk-52WLFC77-BWe_4R7D.js +0 -10
- package/cline-hub/webview/assets/chunk-RYQCIY6F-AfEdSVyS.js +0 -1
- package/cline-hub/webview/assets/classDiagram-OUVF2IWQ-BC75njhg.js +0 -1
- package/cline-hub/webview/assets/classDiagram-v2-EOCWNBFH-BC75njhg.js +0 -1
- package/cline-hub/webview/assets/flowDiagram-23GEKE2U-BntOZ8ZE.js +0 -1
- package/cline-hub/webview/assets/index-D_uZQMMw.js +0 -10
- package/cline-hub/webview/assets/linear-B87ngFcg.js +0 -1
- package/cline-hub/webview/assets/mermaid-GHXKKRXX-DWw3cmjX.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-C3UvhD5t.js +0 -321
- package/cline-hub/webview/assets/mermaid-layout-CKcc_JPx.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-DI4ft-3R.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-db2zCT1P.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-Bjbk52nf.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-CWbpbwPR.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-N1OWR5wr.js +0 -1
- package/cline-hub/webview/assets/path-COt_16Va.js +0 -1
- package/cline-hub/webview/assets/stateDiagram-v2-6OUMAXLB-BchjBw5_.js +0 -1
- package/cline-hub/webview/assets/swimlanesDiagram-G3AALYLV-FXn7KRqH.js +0 -8
- package/cline-hub/webview/assets/vscode-tfEHsPTc.js +0 -1
package/cline-hub/webview/assets/{diagram-FQU43EPY-D6nNqFiO.js → diagram-FQU43EPY-vHaV1X0k.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{T as e}from"./mermaid-parser-
|
|
1
|
+
import{T as e}from"./mermaid-parser-BICK3FdT.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-BY_WSiz7.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,v as d,w as f,x as p,y as m,z as h}from"./chunk-WYO6CB5R-Ht1kfqSA.js";import{_ as g,i as ee,t as te}from"./chunk-ICXQ74PX-BSKRMyFr.js";import{t as ne}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as re}from"./mermaid-parser-u_Yu50JG.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=t(function(e){n.debug(`options str`,e)},`setOptions`),ae=t(function(){return{}},`getOptions`),oe=t(function(){x(),c()},`clear`);function x(){S={}}t(x,`reset`);var se=u.eventmodeling,ce=t(()=>ee({...se,...l().eventmodeling}),`getConfig`),S={};function C(){let e=le,{ast:t}=S,r=E();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=N(i,t.dataEntities,r);e=q(e,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(n.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=q(e,{$kind:y,index:a,frame:i,sourceFrame:t})})):e=q(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:L(e.swimlanes)},e}t(C,`getState`);function w(e){S.ast=e}t(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}t(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}t(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}t(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}t(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}t(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}t(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=l();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}t(M,`calculateEntityVisualProps`);function N(e,t,r){let i=l(),a=h(O(e.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},c=`<b>${g(a,r.textMaxWidth,s)}</b>`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=h(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let n=t.find(t=>t.name===e.dataReference?.$refText);n&&(o=n.dataBlockValue,o=o.substring(o.indexOf(`{
|
|
2
2
|
`)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=h(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`<br/>`)}let u=o!==void 0;u&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${o}</code>`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=te(c,d),p=u?f.width/3:f.width,m={content:c,width:p,height:f.height};return n.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}t(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}t(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}t(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}t(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}t(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+T.swimlaneGap}return f}t(R,`evolveFramePositioned`);function z(e,t){return e===0&&t.sourceFrames.length===0}t(z,`isFirstFrame`);function B(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}t(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}t(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}t(H,`findBoxByLineIndex`);function U(t,n){let r=n;if(e(r.frame)||z(r.index,r.frame))return[];let i=V(t.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?V(t.boxes,r.sourceFrame):H(t.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:b,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}t(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(e,t){let r=ue[t.$kind];if(r==null)return[];let i=r(e,t);return n.debug(`decided events`,i),i}t(G,`decide`);function K(e,t){let r=t.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},e);return n.debug(`evolve events`,{state:e,newState:r,events:t}),r}t(K,`evolve`);function q(e,t){return K(e,G(e,t))}t(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:o,getAccTitle:m,getAccDescription:d,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:f,setAst:w,getDiagramProps:E,getState:C},fe={parse:t(async e=>{let t=await re(`eventmodeling`,e);n.debug(t),J.setAst(t),ne(t,J)},`parse`)},Y=p()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}t(X,`renderD3Box`);function Z(e,t){return e>t}t(Z,`dirUpwards`);function Q(e,t,r,i){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;n.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}t(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}t($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:t(function(e,t,i,a){if(n.debug(`in eventmodeling renderer`,e+`
|
|
3
3
|
`,`id:`,t,i),!Y)throw Error(`EventModeling config not found`);let o=a.db,{themeVariables:c,eventmodeling:l}=p(),u=r(`[id="${t}"]`),d=o.getDiagramProps(),f=o.getState(),m=`em-arrowhead-${t}`,h=c.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,c)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),s(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:t(e=>``,`getStyles`)};export{pe as diagram};
|
package/cline-hub/webview/assets/{diagram-G47NLZAW-C8pCvnUn.js → diagram-G47NLZAW-3CFUWxkm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-BY_WSiz7.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-WYO6CB5R-B91ryJFB.js";import{t as m}from"./ordinal-DtR4qwUh.js";import{t as h}from"./defaultLocale-BFoDCU3G.js";import{i as g}from"./chunk-ICXQ74PX-COcWu1Sq.js";import{t as _}from"./chunk-VAUOI2AC-BlqTQL33.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as y}from"./mermaid-parser-CJzh8iAc.js";import{t as b}from"./chunk-VR4S4FIN-CbCTOh7J.js";import{i as x,n as S}from"./chunk-C7G6YPKG-CV2Ol95R.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function O(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function k(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function R(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=V)):t===void 0&&(t=B);for(var n=new W(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function te(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ne(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var re=(1+Math.sqrt(5))/2;function ie(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?te(c,n,r,i,h?r+=m*g/h:a):ne(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var ae=(function e(t){function n(e,n,r,i,a){ie(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(re);function oe(){var e=ae,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(ee),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=G(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:q(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:q(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:q(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:q(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:q(+e),u):l},u}var J=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o,this.getAccTitle=p,this.setDiagramTitle=a,this.getDiagramTitle=f,this.getAccDescription=d,this.setAccDescription=i}static{e(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=u,t=c();return g({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{S(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){s(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Y(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(Y,`buildHierarchy`);var se=e((t,n)=>{v(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=ce(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=Y(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),ce=e(e=>e.name?String(e.name):``,`getItemName`),X={parser:{yy:void 0},parse:e(async e=>{try{let n=await y(`treemap`,e);t.debug(`Treemap AST:`,n);let r=X.parser?.yy;if(!(r instanceof J))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},Z=10,Q=10,$=25,le={draw:e((r,i,a,o)=>{let s=o.db,u=s.getConfig(),d=u.padding??Z,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:g}=c();if(!p)return;let v=f?30:0,y=_(i),S=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=S,T=C+v;y.attr(`viewBox`,`0 0 ${w} ${T}`),l(y,T,w,u.useMaxWidth);let E;try{let t=u.valueFormat||`,`;if(t===`$0,0`)E=e(e=>`$`+h(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;E=e(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);E=e(e=>`$`+h(n||``)(e),`valueFormat`)}else E=h(t)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&y.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=y.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=oe().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=x({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>x({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-2*H,s=i-2*H;if(o<U||s<U){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(u<V&&c===B));)t.style(`font-size`,`${c}px`),d=c+W+u;t.style(`font-size`,`${c}px`),I?(c<B||s<B)&&t.style(`display`,`none`):(a.getComputedTextLength()>o||c<B||s<c)&&t.style(`display`,`none`)}),u.showValues!==!1&&G.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o<V?t.style(`display`,`none`):t.style(`display`,null)});let K=u.diagramPadding??8;b(y,K,`flowchart`,u?.useMaxWidth||!1)},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},ue={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},de={parser:X,get db(){return new J},renderer:le,styles:e(({treemap:e}={})=>{let t=r(),n=c(),i=g(t,n.themeVariables),a=g(ue,e),o=a.titleColor??i.titleColor,s=a.labelColor??i.textColor,l=a.valueColor??i.textColor;return`
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-BY_WSiz7.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-WYO6CB5R-Ht1kfqSA.js";import{t as m}from"./ordinal-BDEzSJ7C.js";import{t as h}from"./defaultLocale-BFoDCU3G.js";import{i as g}from"./chunk-ICXQ74PX-BSKRMyFr.js";import{t as _}from"./chunk-VAUOI2AC-DC6y0Pon.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as y}from"./mermaid-parser-u_Yu50JG.js";import{t as b}from"./chunk-VR4S4FIN-NuklvPa4.js";import{i as x,n as S}from"./chunk-C7G6YPKG-DBhUCKu7.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function O(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function k(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function R(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=V)):t===void 0&&(t=B);for(var n=new W(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function te(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ne(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var re=(1+Math.sqrt(5))/2;function ie(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?te(c,n,r,i,h?r+=m*g/h:a):ne(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var ae=(function e(t){function n(e,n,r,i,a){ie(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(re);function oe(){var e=ae,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(ee),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=G(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:q(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:q(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:q(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:q(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:q(+e),u):l},u}var J=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o,this.getAccTitle=p,this.setDiagramTitle=a,this.getDiagramTitle=f,this.getAccDescription=d,this.setAccDescription=i}static{e(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=u,t=c();return g({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{S(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){s(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Y(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(Y,`buildHierarchy`);var se=e((t,n)=>{v(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=ce(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=Y(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),ce=e(e=>e.name?String(e.name):``,`getItemName`),X={parser:{yy:void 0},parse:e(async e=>{try{let n=await y(`treemap`,e);t.debug(`Treemap AST:`,n);let r=X.parser?.yy;if(!(r instanceof J))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},Z=10,Q=10,$=25,le={draw:e((r,i,a,o)=>{let s=o.db,u=s.getConfig(),d=u.padding??Z,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:g}=c();if(!p)return;let v=f?30:0,y=_(i),S=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=S,T=C+v;y.attr(`viewBox`,`0 0 ${w} ${T}`),l(y,T,w,u.useMaxWidth);let E;try{let t=u.valueFormat||`,`;if(t===`$0,0`)E=e(e=>`$`+h(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;E=e(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);E=e(e=>`$`+h(n||``)(e),`valueFormat`)}else E=h(t)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&y.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=y.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=oe().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=x({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>x({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-2*H,s=i-2*H;if(o<U||s<U){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(u<V&&c===B));)t.style(`font-size`,`${c}px`),d=c+W+u;t.style(`font-size`,`${c}px`),I?(c<B||s<B)&&t.style(`display`,`none`):(a.getComputedTextLength()>o||c<B||s<c)&&t.style(`display`,`none`)}),u.showValues!==!1&&G.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o<V?t.style(`display`,`none`):t.style(`display`,null)});let K=u.diagramPadding??8;b(y,K,`flowchart`,u?.useMaxWidth||!1)},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},ue={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},de={parser:X,get db(){return new J},renderer:le,styles:e(({treemap:e}={})=>{let t=r(),n=c(),i=g(t,n.themeVariables),a=g(ue,e),o=a.titleColor??i.titleColor,s=a.labelColor??i.textColor,l=a.valueColor??i.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${a.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${a.sectionStrokeWidth};
|
package/cline-hub/webview/assets/{diagram-NH7WQ7WH-BjRb6vlK.js → diagram-NH7WQ7WH-knhXCIYS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-WYO6CB5R-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-WYO6CB5R-Ht1kfqSA.js";import{i as f}from"./chunk-ICXQ74PX-BSKRMyFr.js";import{t as p}from"./chunk-VAUOI2AC-DC6y0Pon.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as h}from"./mermaid-parser-u_Yu50JG.js";var g=c.packet,_=class{constructor(){this.packet=[],this.setAccTitle=i,this.getAccTitle=d,this.setDiagramTitle=r,this.getDiagramTitle=u,this.getAccDescription=l,this.setAccDescription=n}static{e(this,`PacketDB`)}getConfig(){let e=f({...g,...o().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){a(),this.packet=[]}},v=1e4,y=e((e,n)=>{m(e,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,t.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&n.getPacket().length<v;){let[e,t]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(n.pushWord(i),i=[],a++),!t)break;({start:s,end:c,bits:l,label:u}=t)}}n.pushWord(i)},`populate`),b=e((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:e(async e=>{let n=await h(`packet`,e),r=x.parser?.yy;if(!(r instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);t.debug(n),y(n,r)},`parse`)},S=e((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:c,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+c,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),s(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=e((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:e(({packet:e}={})=>{let t=f(T,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
package/cline-hub/webview/assets/{diagram-OA4YK3LP-BOaPe4YT.js → diagram-OA4YK3LP-Bj--3hBp.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d,z as f}from"./chunk-WYO6CB5R-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d,z as f}from"./chunk-WYO6CB5R-Ht1kfqSA.js";import{i as p}from"./chunk-ICXQ74PX-BSKRMyFr.js";import{t as m}from"./chunk-VAUOI2AC-DC6y0Pon.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser-u_Yu50JG.js";import{r as _,t as v}from"./chunk-HOUHSVGY-B04R_umg.js";import{t as y}from"./chunk-2Q5K7J3B-C1jixKkw.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}e(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}e(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}e(k,`remapErrorLines`);function A(e){let t=e.split(`
|
|
2
2
|
`),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e<t.length;e++){let n=t[e];n.trim()===``||T.test(n)||w.test(n)||C.test(n)||i.push(n.replace(/\t/g,` `))}if(!D(i))return{text:e,lineMap:n};let a=O(i),o=[],s=0;for(let e=0;e<=r;e++)o.push(t[e]),s++,n.set(s,e+1);for(let e=r+1;e<t.length;e++){let r=t[e],i=r.trim(),c=e+1;if(i===``){o.push(r),s++,n.set(s,c);continue}if(T.test(r)){o.push(r),s++,n.set(s,c);continue}if(w.test(r)){o.push(r),s++,n.set(s,c);continue}if(C.test(r))continue;let l=r.replace(/\t/g,` `),u=x.exec(l);if(u?.index!==void 0){let e=u.index,t=Math.round(e/a)+1,r=e+1;for(;r<l.length&&S.test(l[r]);)r++;for(;r<l.length&&l[r]===` `;)r++;let i=l.slice(r).trimEnd();if(!i)throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let d=E.repeat(t);o.push(d+i),s++,n.set(s,c)}else if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;else if(b.test(l))o.push(r),s++,n.set(s,c);else if(/^\s+/.test(l))throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);else o.push(r),s++,n.set(s,c)}return{text:o.join(`
|
|
3
3
|
`),lineMap:n}}e(A,`preprocessBoxDrawing`);var j=new y(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=e(()=>{j.reset(),a()},`clear`),N=e(()=>j.records.stack[0],`getRoot`),P=e(()=>j.records.cnt,`getCount`),F=c.treeView,I={clear:M,addNode:e((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:e(()=>p(F,o().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:i,setDiagramTitle:r},L=e(e=>{h(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,l=t.descAnnotation||void 0,u=l?f(l,o()):void 0;I.addNode(e,n,i,a,c,u)}},`populate`),R={parse:e(async e=>{let{text:n,lineMap:r}=A(e);try{let e=await g(`treeView`,n);t.debug(e),L(e)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:`<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>`},file:{body:`<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>`}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}e(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}e(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}e(H,`getNodeIcon`),_([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=e((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,`-`)}`,`iconSymbolId`),q=e(async(t,n,r,i)=>{let a=new Set,o=e(e=>{let t=H(e,r);t&&a.add(t),e.children.forEach(o)},`collect`);if(o(n),a.size===0)return;let s=await Promise.all([...a].map(async e=>({icon:e,svg:await v(e,{height:U,width:U})}))),c=t.append(`defs`);for(let{icon:e,svg:t}of s)c.append(`g`).attr(`id`,K(i,e)).html(t)},`injectIconDefs`),J=e((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`use`).attr(`xlink:href`,`#${K(a,l)}`).attr(`x`,e+i.paddingX).attr(`y`,t+i.paddingY).attr(`class`,`treeView-node-icon`);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),Y=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),X=e((t,n,r,i)=>{let a=0,o=0,s=[],c=e((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=J(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;Y(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=e((e,n=0)=>{c(t,e,r,n),e.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=e.BBox;if(e.children.length){let{y:n,height:s}=e.children[e.children.length-1].BBox;Y(t,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),Z={draw:e(async(e,n,r,i)=>{t.debug(`Rendering treeView diagram
|
|
4
4
|
`+e);let a=i.db,o=a.getRoot(),c=a.getConfig(),l=m(n);await q(l,o,c,n);let u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=X(u,o,c,n);l.attr(`viewBox`,`-${c.lineThickness/2} 0 ${f} ${d}`),s(l,d,f,c.useMaxWidth)},`draw`)},Q={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},$={db:I,renderer:Z,parser:R,styles:e(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=p(Q,e);return`
|
package/cline-hub/webview/assets/{diagram-WEI45ONY-C2gh4ORi.js → diagram-WEI45ONY-CU1ul1cq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-WYO6CB5R-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-WYO6CB5R-Ht1kfqSA.js";import{i as p}from"./chunk-ICXQ74PX-BSKRMyFr.js";import{t as m}from"./chunk-VAUOI2AC-DC6y0Pon.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser-u_Yu50JG.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=l.radar,x=e(()=>p({...b,...s().radar}),`getConfig`),S=e(()=>y.axes,`getAxes`),C=e(()=>y.curves,`getCurves`),w=e(()=>y.options,`getOptions`),T=e(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=e(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=e(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:e(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:e(()=>{o(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},k=e(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:e(async e=>{let n=await g(`radar`,e);t.debug(n),k(n)},`parse`)},j=e((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=e((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=e((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=e((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,c=Math.cos(s),l=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*c).attr(`y2`,n*r.axisScaleFactor*l).attr(`class`,`radarAxisLine`);let u=c>.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}e(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}e(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}e(L,`closedRoundCurve`);function R(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}e(R,`drawLegend`);var z={draw:j},B=e((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${i};
|
|
4
4
|
fill: ${i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser-
|
|
1
|
+
import{n as e}from"./mermaid-parser-B5dtuYEh.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-BY_WSiz7.js";import"./chunk-WYO6CB5R-Ht1kfqSA.js";import"./chunk-VAUOI2AC-DC6y0Pon.js";import{n as r,r as i,t as a}from"./chunk-MOJQB5TN-B_gKeTxM.js";import{t as o}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as s}from"./mermaid-parser-u_Yu50JG.js";var c=e().RailroadEbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=t(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=t((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=t(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[EBNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[EBNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram};
|
package/cline-hub/webview/assets/{erDiagram-Q63AITRT-BMK30ekD.js → erDiagram-Q63AITRT-BYUDNAG5.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-BY_WSiz7.js";import{H as i,K as a,U as o,a as s,rt as c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-B91ryJFB.js";import{t as p}from"./channel-CSeXS2Ai.js";import{c as m,g as h}from"./chunk-ICXQ74PX-COcWu1Sq.js";import"./chunk-HOUHSVGY-CFjt2s0d.js";import"./chunk-Q4XR5HBZ-CtUzoHvJ.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-BVna3Z_8.js";import{t as g}from"./chunk-XXDRQBXY-DR-hrsFH.js";import{t as _}from"./chunk-VR4S4FIN-CbCTOh7J.js";import"./chunk-C7G6YPKG-CV2Ol95R.js";import"./chunk-ZGVPDNZ5-D5I51kcE.js";import"./chunk-52WLFC77-BWe_4R7D.js";import{r as v,t as y}from"./chunk-FWX5IMBZ-wv8Fkt1d.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,71,72],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],F=[66,67,68,69,70],I=[1,85],L=[1,84],R=[1,82],z=[1,83],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,93],U=[1,92],W=[1,91],G=[19,58],K=[1,102],q=[1,101],J=[19,58,61,63],Y={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,59:`?`,61:`,`,62:`ATTRIBUTE_KEY`,63:`COMMENT`,66:`ZERO_OR_ONE`,67:`ZERO_OR_MORE`,68:`ONE_OR_MORE`,69:`ONLY_ONE`,70:`MD_PARENT`,71:`NON_IDENTIFYING`,72:`IDENTIFYING`,73:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 68:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 80:case 81:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 82:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 67:case 70:this.$=a[s];break;case 66:this.$=a[s-1]+a[s];break;case 69:a[s-2].push(a[s]),this.$=a[s-2];break;case 71:this.$=a[s].replace(/"/g,``);break;case 72:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,5]),t(n,[2,6]),t(n,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:y,67:b,68:x,69:S,70:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(n,[2,27]),t(n,[2,28]),t(n,[2,29]),t(n,[2,30]),t(n,[2,31]),t(w,[2,54]),t(w,[2,55]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(n,[2,32]),t(n,[2,33]),t(n,[2,34]),t(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},t(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{65:57,71:[1,58],72:[1,59]},t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(O,[2,77]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},t(P,[2,37]),t(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},t(n,[2,17],{64:35,12:72,17:[1,73],42:j,66:y,67:b,68:x,69:S,70:C}),{19:[1,74]},t(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:y,67:b,68:x,69:S,70:C},t(F,[2,78]),t(F,[2,79]),{6:I,10:L,39:81,42:R,47:z},{40:[1,86],41:[1,87]},t(B,[2,43],{46:88,13:k,41:A,48:M,49:N}),t(V,[2,45]),t(V,[2,50]),t(V,[2,51]),t(V,[2,52]),t(V,[2,53]),t(n,[2,41],{42:j}),{6:I,10:L,39:89,42:R,47:z},{14:90,40:H,50:U,73:W},{16:94,40:T,41:E},{11:95,40:f,48:h,50:g,51:_,52:v},{18:96,19:[1,97],53:53,54:54,58:D},t(n,[2,12]),{19:[2,60]},t(G,[2,61],{56:98,57:99,60:100,62:K,63:q}),t([19,58,62,63],[2,67]),{58:[2,66]},t(n,[2,22],{15:[1,104],17:[1,103]}),t([40,48,50,51,52],[2,72]),t(n,[2,36]),{13:k,41:A,45:105,46:63,48:M,49:N},t(n,[2,47]),t(n,[2,48]),t(n,[2,49]),t(P,[2,39]),t(P,[2,40]),t(V,[2,46]),t(n,[2,42]),t(n,[2,8]),t(n,[2,80]),t(n,[2,81]),t(n,[2,82]),{13:[1,106],42:j},{13:[1,108],15:[1,107]},{19:[1,109]},t(n,[2,15]),t(G,[2,62],{57:110,61:[1,111],63:q}),t(G,[2,63]),t(J,[2,68]),t(G,[2,71]),t(J,[2,70]),{18:112,19:[1,113],53:53,54:54,58:D},{16:114,40:T,41:E},t(B,[2,44],{46:88,13:k,41:A,48:M,49:N}),{14:115,40:H,50:U,73:W},{16:116,40:T,41:E},{14:117,40:H,50:U,73:W},t(n,[2,13]),t(G,[2,64]),{60:118,62:K},{19:[1,119]},t(n,[2,20]),t(n,[2,23],{17:[1,120],42:j}),t(n,[2,11]),{13:[1,121],42:j},t(n,[2,10]),t(J,[2,69]),t(n,[2,18]),{18:122,19:[1,123],53:53,54:54,58:D},{14:124,40:H,50:U,73:W},{19:[1,125]},t(n,[2,21]),t(n,[2,9]),t(n,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-BY_WSiz7.js";import{H as i,K as a,U as o,a as s,rt as c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-Ht1kfqSA.js";import{t as p}from"./channel-BIC0YCzT.js";import{c as m,g as h}from"./chunk-ICXQ74PX-BSKRMyFr.js";import"./chunk-HOUHSVGY-B04R_umg.js";import"./chunk-Q4XR5HBZ-DkRpWOkn.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-CR4zh_DV.js";import{t as g}from"./chunk-XXDRQBXY-DR-hrsFH.js";import{t as _}from"./chunk-VR4S4FIN-NuklvPa4.js";import"./chunk-C7G6YPKG-DBhUCKu7.js";import"./chunk-ZGVPDNZ5-CeJ5hUbe.js";import"./chunk-52WLFC77-DEfoFGdq.js";import{r as v,t as y}from"./chunk-FWX5IMBZ-DO4vTS0i.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,71,72],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],F=[66,67,68,69,70],I=[1,85],L=[1,84],R=[1,82],z=[1,83],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,93],U=[1,92],W=[1,91],G=[19,58],K=[1,102],q=[1,101],J=[19,58,61,63],Y={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,59:`?`,61:`,`,62:`ATTRIBUTE_KEY`,63:`COMMENT`,66:`ZERO_OR_ONE`,67:`ZERO_OR_MORE`,68:`ONE_OR_MORE`,69:`ONLY_ONE`,70:`MD_PARENT`,71:`NON_IDENTIFYING`,72:`IDENTIFYING`,73:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 68:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 80:case 81:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 82:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 67:case 70:this.$=a[s];break;case 66:this.$=a[s-1]+a[s];break;case 69:a[s-2].push(a[s]),this.$=a[s-2];break;case 71:this.$=a[s].replace(/"/g,``);break;case 72:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,5]),t(n,[2,6]),t(n,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:y,67:b,68:x,69:S,70:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(n,[2,27]),t(n,[2,28]),t(n,[2,29]),t(n,[2,30]),t(n,[2,31]),t(w,[2,54]),t(w,[2,55]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(n,[2,32]),t(n,[2,33]),t(n,[2,34]),t(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},t(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{65:57,71:[1,58],72:[1,59]},t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(O,[2,77]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},t(P,[2,37]),t(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},t(n,[2,17],{64:35,12:72,17:[1,73],42:j,66:y,67:b,68:x,69:S,70:C}),{19:[1,74]},t(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:y,67:b,68:x,69:S,70:C},t(F,[2,78]),t(F,[2,79]),{6:I,10:L,39:81,42:R,47:z},{40:[1,86],41:[1,87]},t(B,[2,43],{46:88,13:k,41:A,48:M,49:N}),t(V,[2,45]),t(V,[2,50]),t(V,[2,51]),t(V,[2,52]),t(V,[2,53]),t(n,[2,41],{42:j}),{6:I,10:L,39:89,42:R,47:z},{14:90,40:H,50:U,73:W},{16:94,40:T,41:E},{11:95,40:f,48:h,50:g,51:_,52:v},{18:96,19:[1,97],53:53,54:54,58:D},t(n,[2,12]),{19:[2,60]},t(G,[2,61],{56:98,57:99,60:100,62:K,63:q}),t([19,58,62,63],[2,67]),{58:[2,66]},t(n,[2,22],{15:[1,104],17:[1,103]}),t([40,48,50,51,52],[2,72]),t(n,[2,36]),{13:k,41:A,45:105,46:63,48:M,49:N},t(n,[2,47]),t(n,[2,48]),t(n,[2,49]),t(P,[2,39]),t(P,[2,40]),t(V,[2,46]),t(n,[2,42]),t(n,[2,8]),t(n,[2,80]),t(n,[2,81]),t(n,[2,82]),{13:[1,106],42:j},{13:[1,108],15:[1,107]},{19:[1,109]},t(n,[2,15]),t(G,[2,62],{57:110,61:[1,111],63:q}),t(G,[2,63]),t(J,[2,68]),t(G,[2,71]),t(J,[2,70]),{18:112,19:[1,113],53:53,54:54,58:D},{16:114,40:T,41:E},t(B,[2,44],{46:88,13:k,41:A,48:M,49:N}),{14:115,40:H,50:U,73:W},{16:116,40:T,41:E},{14:117,40:H,50:U,73:W},t(n,[2,13]),t(G,[2,64]),{60:118,62:K},{19:[1,119]},t(n,[2,20]),t(n,[2,23],{17:[1,120],42:j}),t(n,[2,11]),{13:[1,121],42:j},t(n,[2,10]),t(J,[2,69]),t(n,[2,18]),{18:122,19:[1,123],53:53,54:54,58:D},{14:124,40:H,50:U,73:W},{19:[1,125]},t(n,[2,21]),t(n,[2,9]),t(n,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(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:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
package/cline-hub/webview/assets/{extensions-view-BPiQgdTf.js → extensions-view-B1b0tJ3t.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{a as t,r as n}from"./bundle-mjs-CSP5ngA5.js";import{F as r,L as i,R as a,c as o,w as s}from"./vscode-tfEHsPTc.js";import{i as c,o as l,r as u,t as d}from"./switch-1OAUgxzd.js";import{a as f,i as p,n as m,r as h,t as g}from"./desktop-client-Cc9yU7GV.js";import{C as _,E as v,S as y,T as b,d as x,f as ee,i as te,k as S,l as C,o as ne,s as re,u as ie}from"./index-D_uZQMMw.js";import{n as ae,t as w}from"./badge-DJicQweE.js";var T=i(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),E=i(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),oe=i(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),D=e(t(),1),O=`/api/marketplace/catalog`,k={version:1,counts:{total:0,plugins:0,skills:0,mcps:0},tags:[],entries:[]};function A(e){return e===`mcp`||e===`skill`||e===`plugin`}function j(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function M(e){return typeof e==`number`&&Number.isFinite(e)?e:0}function N(e){if(!Array.isArray(e))return;let t=e.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;if(typeof t.name!=`string`)return null;let n={name:t.name};return typeof t.required==`boolean`&&(n.required=t.required),typeof t.description==`string`&&(n.description=t.description),typeof t.url==`string`&&(n.url=t.url),n}).filter(e=>e!==null);return t.length>0?t:void 0}async function se(){let e=await fetch(O,{headers:{Accept:`application/json`}});if(!e.ok)throw Error(`Failed to fetch marketplace: ${e.status}`);let t=await e.json(),n=typeof t?.baseUrl==`string`?t.baseUrl:void 0,r=typeof t?.counts==`object`&&t.counts!==null?t.counts:{},i=Array.isArray(t?.tags)?t.tags.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;return typeof t.id!=`string`||typeof t.label!=`string`?null:{id:t.id,label:t.label,count:M(t.count)}}).filter(e=>e!==null):[],a=Array.isArray(t?.entries)?t.entries.map(e=>{if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.install==`object`&&t.install!==null?t.install:{};return typeof t.id!=`string`||!A(t.type)||typeof t.name!=`string`||typeof t.tagline!=`string`||typeof t.description!=`string`||typeof n.command!=`string`?null:{id:t.id,type:t.type,name:t.name,featured:typeof t.featured==`boolean`?t.featured:void 0,tagline:t.tagline,description:t.description,tags:j(t.tags),install:{args:j(n.args),command:n.command,env:N(n.env),notes:typeof n.notes==`string`?n.notes:void 0}}}).filter(e=>e!==null&&e.install.args.length>0):[];return{version:M(t?.version)||k.version,generatedAt:typeof t?.generatedAt==`string`?t.generatedAt:void 0,baseUrl:n,counts:{total:M(r.total)||a.length,plugins:M(r.plugins),skills:M(r.skills),mcps:M(r.mcps)},tags:i,entries:a}}var P=n(),F=3e5,ce={fontFamily:`ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace`},I={mcp:{title:`MCP Servers`,description:`Install Model Context Protocol servers into this CLI environment.`,emptyInstalled:`No MCP servers installed.`,emptyCatalog:`No MCP servers match the current filters.`,icon:_},skill:{title:`Skills`,description:`Install skills globally for Cline.`,emptyInstalled:`No skills installed.`,emptyCatalog:`No skills match the current filters.`,icon:m},plugin:{title:`Plugins`,description:`Install plugins into this CLI environment.`,emptyInstalled:`No plugins installed.`,emptyCatalog:`No plugins match the current filters.`,icon:E}},le={mcp:`cline mcp install`,plugin:`cline plugin install`,skill:`cline skill add`};function L(e){return`${e.type}:${e.id}`}function R(e,t){return Number(!!t.featured)-Number(!!e.featured)}function z(e){return e.trim().toLowerCase()}function B(e){return new Set([e.id,e.name,...e.install.args].map(z).filter(Boolean))}function V(e,t){let n=B(e);return t.matchValues.map(z).filter(Boolean).some(e=>n.has(e))}function H(e,t){return[e.name,e.tagline,e.description,e.type,...e.tags.map(e=>t.get(e)??e)].join(` `).toLowerCase()}function U(e){if(e?.status===`installed`||e?.status===`uninstalled`||e?.status===`failed`)return e.message}function W({actionState:e,entry:t}){let n=t.install.env?.filter(e=>e.required!==!1)??[],r=t.install.env?.filter(e=>e.required===!1)??[];return n.length>0||r.length>0||t.install.notes||e?.status===`failed`?(0,P.jsxs)(`div`,{className:`grid gap-3 border-t pt-3`,"data-marketplace-entry-details":!0,children:[n.length>0||r.length>0?(0,P.jsxs)(`div`,{className:`rounded-lg border border-amber-500/30 bg-amber-500/10 p-3`,children:[(0,P.jsx)(`p`,{className:`text-sm font-medium text-amber-800 dark:text-amber-200`,children:`Environment setup needed`}),(0,P.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-amber-800/80 dark:text-amber-100/80`,children:`Add these values to your Cline/plugin environment after install.`}),(0,P.jsx)(`div`,{className:`mt-3 grid gap-2`,children:[...n,...r].map(e=>(0,P.jsxs)(`div`,{className:`rounded-md border border-amber-500/20 bg-background/60 p-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,P.jsx)(`code`,{className:`font-mono text-xs font-semibold`,children:(0,P.jsx)(`span`,{style:ce,children:e.name})}),(0,P.jsx)(w,{variant:`outline`,children:e.required===!1?`Optional`:`Required`})]}),e.description?(0,P.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e.description}):null,e.url?(0,P.jsxs)(`a`,{className:`mt-1 inline-flex items-center gap-1 text-xs text-primary hover:underline`,href:e.url,rel:`noreferrer`,target:`_blank`,children:[`Get value`,(0,P.jsx)(f,{className:`size-3`})]}):null]},e.name))})]}):null,t.install.notes?(0,P.jsx)(`p`,{className:`rounded-lg border bg-muted/30 p-3 text-xs leading-5 text-muted-foreground`,children:t.install.notes}):null,e?.status===`failed`?(0,P.jsx)(`div`,{className:`max-h-44 overflow-auto rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive`,children:e.message}):null]}):null}function G({actionState:e,entry:t,expanded:n,installed:i,installedStatusReady:o,onInstall:c,onToggleExpanded:l,onUninstall:u,matchedLocalItems:d=[],showFeatured:f=!0,showTags:p=!0,sourceLabel:m,tagLabels:g}){let _=I[t.type].icon,v=e?.status===`installing`||e?.status===`uninstalling`,y=!!t.install.env?.length,b=y||!!t.install.notes||e?.status===`failed`,x=U(e),ee=e=>{if(e.stopPropagation(),i){u(t);return}c(t)},te=o?e?.status===`installing`?`Installing...`:e?.status===`uninstalling`?`Uninstalling...`:i?`Uninstall`:`Install`:`Checking...`,S=x?(0,P.jsx)(`output`,{className:a(`text-xs`,e?.status===`failed`?`text-destructive`:`text-muted-foreground`),children:x}):y?(0,P.jsx)(`span`,{className:`text-xs text-amber-700 dark:text-amber-300`,children:`Requires setup after install`}):null,C=(0,P.jsxs)(s,{disabled:!o||v,onClick:ee,size:`sm`,type:`button`,variant:i?`destructive`:`default`,children:[v||!o?(0,P.jsx)(ae,{}):null,i&&!v?(0,P.jsx)(r,{className:`size-4`}):null,te]}),ne=(0,P.jsxs)(P.Fragment,{children:[i?null:(0,P.jsx)(`div`,{className:`absolute top-4 right-4`,"data-marketplace-entry-interactive":!0,children:C}),(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-2`,children:[(0,P.jsxs)(`div`,{className:a(`flex min-w-0 flex-1 items-center gap-2`,!i&&`pr-24`),children:[(0,P.jsx)(_,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:t.name}),f&&t.featured?(0,P.jsxs)(w,{className:`border border-violet-500/20 bg-violet-500/10 text-violet-700 dark:text-violet-300`,children:[(0,P.jsx)(h,{className:`fill-current`}),`Featured`]}):null]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2`,children:[m?(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:m}):null,d.map(e=>e.renderMatchedBadges?(0,P.jsx)(`span`,{className:`contents`,children:e.renderMatchedBadges()},`${e.key}:badges`):null),d.map(e=>e.renderMatchedControls?(0,P.jsx)(`span`,{className:`contents`,"data-marketplace-entry-interactive":!0,children:e.renderMatchedControls()},`${e.key}:controls`):null)]})]}),d.some(e=>e.renderMatchedMeta)?(0,P.jsx)(`div`,{className:`mt-1 grid gap-1`,children:d.map(e=>e.renderMatchedMeta?(0,P.jsx)(`div`,{children:e.renderMatchedMeta()},`${e.key}:meta`):null)}):null]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-stretch sm:justify-between`,children:[(0,P.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-2`,children:[p&&t.tags.length>0?(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.tags.slice(0,5).map(e=>(0,P.jsx)(w,{variant:`outline`,className:`max-w-full text-muted-foreground`,children:(0,P.jsx)(`span`,{className:`truncate`,children:g.get(e)??e})},e))}):null,(0,P.jsx)(`p`,{className:`line-clamp-2 text-xs leading-5 text-muted-foreground`,children:t.description}),S]}),i?(0,P.jsx)(`div`,{className:`flex shrink-0 flex-col items-start gap-1 sm:items-end sm:justify-end`,children:C}):null]}),d.some(e=>e.renderMatchedDetails)?(0,P.jsx)(`div`,{className:`grid gap-2`,"data-marketplace-entry-details":!0,children:d.map(e=>e.renderMatchedDetails?(0,P.jsx)(`div`,{children:e.renderMatchedDetails()},e.key):null)}):null,n&&b?(0,P.jsx)(W,{actionState:e,entry:t}):null]});return b?(0,P.jsx)(`div`,{"aria-expanded":n,"aria-label":`${n?`Collapse`:`Expand`} ${t.name}`,className:`relative grid cursor-pointer gap-2 rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent/20 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none`,onClick:e=>{e.target instanceof HTMLElement&&e.target.closest(`[data-marketplace-entry-details], [data-marketplace-entry-interactive]`)||l(t)},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(t))},role:`button`,tabIndex:0,children:ne}):(0,P.jsx)(`div`,{className:`relative grid gap-2 rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent/20`,children:ne})}function ue({active:e,count:t,onClick:n,tag:r}){return(0,P.jsxs)(s,{"aria-pressed":e,onClick:n,size:`sm`,type:`button`,variant:e?`default`:`outline`,children:[(0,P.jsx)(`span`,{className:`truncate`,children:r.label}),(0,P.jsx)(`span`,{className:`rounded bg-background/30 px-1.5 py-0.5 text-xs`,children:t})]})}function K({actionStates:e,emptyMessage:t,entries:n,expandedEntryKey:r,headerContent:i,installedEntryKeys:a,installedStatusReady:o,localOnlyInstalledItems:s=[],matchedLocalItemsByEntryKey:c,onInstall:l,onToggleExpanded:u,onUninstall:d,showFeaturedBadges:f=!0,showEntryTags:p=!0,sourceLabel:m,tagLabels:h,title:g}){let _=n.length+s.length;return(0,P.jsxs)(`section`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,P.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:g}),(0,P.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:_})]}),i,_>0?(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[s.map(e=>e.render()),n.map(t=>{let n=L(t);return(0,P.jsx)(G,{actionState:e.get(n),entry:t,expanded:r===n,installed:a.has(n),installedStatusReady:o,onInstall:l,onToggleExpanded:u,onUninstall:d,matchedLocalItems:c?.get(n)??[],showFeatured:f,showTags:p,sourceLabel:m,tagLabels:h},n)})]}):(0,P.jsx)(`div`,{className:`rounded-lg border border-dashed bg-card p-6 text-center text-sm text-muted-foreground`,children:t})]})}function de({chrome:e=`page`,installedItems:t,onInstalledItemsChanged:n,primitive:r}){let[i,a]=(0,D.useState)(null),[c,l]=(0,D.useState)(null),[d,f]=(0,D.useState)(``),[p,m]=(0,D.useState)(null),[h,_]=(0,D.useState)(null),[v,y]=(0,D.useState)(()=>new Set),[b,x]=(0,D.useState)(()=>new Map),[ee,S]=(0,D.useState)(`loading`);(0,D.useEffect)(()=>{let e=!1;return(async()=>{try{e||S(`loading`);let t=await se();e||(a(t),l(null));try{let n=await g.invoke(`list_marketplace_installed_entries`,{entries:t.entries});e||(y(new Set(n.installedKeys)),S(`ready`))}catch{e||S(`ready`)}}catch(t){e||(l(t instanceof Error?t.message:String(t)),S(`ready`))}})(),()=>{e=!0}},[]);let C=I[r],ie=C.icon,w=(0,D.useMemo)(()=>new Map(i?.tags.map(e=>[e.id,e.label])??[]),[i?.tags]),T=(0,D.useMemo)(()=>(i?.entries.filter(e=>e.type===r)??[]).sort(R),[i?.entries,r]),E=(0,D.useMemo)(()=>{let e=d.trim().toLowerCase();return T.filter(t=>e.length===0||H(t,w).includes(e))},[T,d,w]),oe=(0,D.useMemo)(()=>E.filter(e=>v.has(L(e))),[E,v]),O=(0,D.useMemo)(()=>E.filter(e=>!v.has(L(e))),[E,v]),k=(0,D.useMemo)(()=>{let e=new Map;for(let t of O)for(let n of t.tags)e.set(n,(e.get(n)??0)+1);return e},[O]),A=(0,D.useMemo)(()=>(i?.tags??[]).filter(e=>(k.get(e.id)??0)>0),[i?.tags,k]),j=(0,D.useMemo)(()=>O.filter(e=>!p||e.tags.includes(p)),[O,p]),M=(0,D.useMemo)(()=>{let e=new Map;for(let n of t??[])for(let t of oe){let r=L(t);if(!V(t,n))continue;let i=e.get(r)??[];i.push(n),e.set(r,i)}return e},[oe,t]),N=(0,D.useMemo)(()=>{let e=new Set,n=T.filter(e=>v.has(L(e)));for(let r of t??[])n.some(e=>V(e,r))&&e.add(r.key);return e},[v,t,T]),ce=(0,D.useMemo)(()=>{let e=d.trim().toLowerCase();return(t??[]).filter(t=>N.has(t.key)?!1:e.length===0||t.matchValues.map(z).some(t=>t.includes(e)))},[t,N,d]),B=ee===`ready`,U=A.length>0?(0,P.jsxs)(`div`,{className:`flex flex-col gap-2 md:flex-row md:items-center md:justify-between`,children:[(0,P.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1`,children:A.map(e=>(0,P.jsx)(ue,{active:p===e.id,count:k.get(e.id)??0,onClick:()=>m(t=>t===e.id?null:e.id),tag:e},e.id))}),(0,P.jsxs)(`div`,{className:`flex min-h-8 shrink-0 items-center gap-2 text-sm text-muted-foreground`,children:[(0,P.jsx)(`span`,{className:`font-medium text-foreground`,children:j.length}),(0,P.jsx)(`span`,{children:j.length===1?`result`:`results`}),p?(0,P.jsx)(s,{onClick:()=>m(null),size:`sm`,type:`button`,variant:`ghost`,children:`Clear filters`}):null]})]}):null,W=(e,t)=>{let n=L(e);x(e=>{let r=new Map(e);return r.set(n,t),r})},G=e=>{y(t=>new Set(t).add(L(e)))},de=e=>{y(t=>{let n=new Set(t);return n.delete(L(e)),n})},fe=e=>{let t=L(e);_(e=>e===t?null:t)},pe=async e=>{let t=L(e),r=b.get(t);if(r?.status!==`installing`&&r?.status!==`uninstalling`){_(t),W(e,{status:`installing`});try{let t=await g.invoke(`install_marketplace_entry`,{entry:e},{timeoutMs:F});W(e,{status:`installed`,message:t.message}),G(e),await n?.()}catch(t){W(e,{status:`failed`,message:t instanceof Error?t.message:String(t)})}}},me=async e=>{let t=L(e),r=b.get(t);if(r?.status!==`installing`&&r?.status!==`uninstalling`){_(t),W(e,{status:`uninstalling`});try{let t=await g.invoke(`uninstall_marketplace_entry`,{entry:e},{timeoutMs:F});W(e,{status:`uninstalled`,message:t.message}),de(e),await n?.()}catch(t){W(e,{status:`failed`,message:t instanceof Error?t.message:String(t)})}}},q=(0,P.jsxs)(`div`,{className:`grid gap-6`,children:[e===`page`?(0,P.jsx)(re,{description:C.description,icon:ie,title:C.title,meta:(0,P.jsx)(te,{children:le[r]}),actions:i?.generatedAt?(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Updated`,` `,new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,year:`numeric`}).format(new Date(i.generatedAt))]}):null}):null,!i&&!c?(0,P.jsxs)(`div`,{className:`flex min-h-80 items-center justify-center rounded-lg border bg-card text-sm text-muted-foreground`,children:[(0,P.jsx)(ae,{className:`mr-2`}),`Loading marketplace...`]}):null,i&&!B?(0,P.jsxs)(`div`,{className:`flex min-h-80 items-center justify-center rounded-lg border bg-card text-sm text-muted-foreground`,children:[(0,P.jsx)(ae,{className:`mr-2`}),`Checking installed status...`]}):null,c?(0,P.jsx)(`div`,{className:`rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-sm text-destructive`,children:c}):null,i&&B?(0,P.jsxs)(`div`,{className:`grid gap-6`,children:[(0,P.jsx)(`div`,{className:`grid gap-3`,children:(0,P.jsx)(`div`,{className:`flex flex-col gap-3 md:flex-row md:items-center`,children:(0,P.jsxs)(`div`,{className:`relative block flex-1`,children:[(0,P.jsx)(u,{className:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),(0,P.jsx)(o,{"aria-label":`Search ${C.title}`,className:`h-10 pl-8`,onChange:e=>f(e.target.value),placeholder:`Search ${C.title.toLowerCase()}`,value:d})]})})}),(0,P.jsx)(K,{actionStates:b,emptyMessage:C.emptyInstalled,entries:oe,expandedEntryKey:h,installedEntryKeys:v,installedStatusReady:B,localOnlyInstalledItems:ce,matchedLocalItemsByEntryKey:M,onInstall:pe,onToggleExpanded:fe,onUninstall:me,showFeaturedBadges:!1,showEntryTags:!1,sourceLabel:`Marketplace`,tagLabels:w,title:`Installed`}),(0,P.jsx)(K,{actionStates:b,emptyMessage:C.emptyCatalog,entries:j,expandedEntryKey:h,headerContent:U,installedEntryKeys:v,installedStatusReady:B,onInstall:pe,onToggleExpanded:fe,onUninstall:me,tagLabels:w,title:`Marketplace`})]}):null]});return e===`embedded`?q:(0,P.jsx)(ne,{children:q})}var fe={Rules:`Review project and global rule files that shape Cline behavior.`,Hooks:`Inspect hook configuration and recent execution status.`,MCP:`Manage installed MCP servers and add new servers from the marketplace.`,Skills:`Manage installed skills and add new skills from the marketplace.`,Agents:`Review configured agents discovered from local settings.`,Plugins:`Manage installed plugins and add new plugins from the marketplace.`,Tools:`Inspect built-in tools and tools contributed by plugins.`},pe={Rules:`cline config rules`,Hooks:`cline config hooks`,MCP:`cline mcp install`,Skills:`cline skill`,Agents:`cline config agents`,Plugins:`cline plugin`,Tools:`cline config tools`},me={settingsPath:``,hasSettingsFile:!1,servers:[]};function q(e){return Array.isArray(e)?e:[]}function he(e){return{workspaceRoot:typeof e?.workspaceRoot==`string`?e.workspaceRoot:``,rules:q(e?.rules),workflows:q(e?.workflows),skills:q(e?.skills),agents:q(e?.agents),plugins:q(e?.plugins),tools:q(e?.tools),hooks:q(e?.hooks),mcp:e?.mcp&&typeof e.mcp==`object`?{settingsPath:typeof e.mcp.settingsPath==`string`?e.mcp.settingsPath:``,hasSettingsFile:!!e.mcp.hasSettingsFile,servers:q(e.mcp.servers)}:{...me},warnings:q(e?.warnings)}}var ge=6e4,_e=3e4,J=null,Y=null;function ve(e,t){return!!(e&&t-e.fetchedAt<ge&&Array.isArray(e.tools)&&e.tools.length>0)}function ye(e,t=150){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,t).trimEnd()}...`}function X(e){return e.replaceAll(`\\`,`/`)}function be(e,t){let n=X(t),r=X(e);return n&&r.startsWith(`${n}/`)?`Project`:`Global`}function Z({scope:e}){return(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e})}function xe(...e){let t=new Set;for(let n of e){let e=n?.trim().replaceAll(`\\`,`/`);if(!e)continue;t.add(e);let r=e.split(`/`).filter(Boolean);for(let e of r)t.add(e.replace(/\.[^.]+$/,``));for(let e=0;e<r.length-1;e+=1)t.add(`${r[e]}/${r[e+1]}`)}return[...t]}async function Se(){return he(await g.invoke(`list_user_instruction_configs`))}function Ce(e,t){return(e instanceof Error?e.message:String(e)).includes(`unsupported desktop command: ${t}`)}function we({catalogPrimitive:e,section:t=`Rules`,showTabs:n=!1}){let[i,o]=(0,D.useState)(t),[u,f]=(0,D.useState)(()=>!ve(J,Date.now())),[h,E]=(0,D.useState)(null),[O,k]=(0,D.useState)(()=>J?.workspaceRoot??``),[A,j]=(0,D.useState)(()=>J?.rules??[]),[M,N]=(0,D.useState)(()=>J?.workflows??[]),[se,F]=(0,D.useState)(()=>J?.skills??[]),[ce,I]=(0,D.useState)(()=>J?.agents??[]),[le,L]=(0,D.useState)(()=>J?.plugins??[]),[R,z]=(0,D.useState)(()=>J?.tools??[]),[B,V]=(0,D.useState)(()=>J?.hooks??[]),[H,U]=(0,D.useState)(()=>J?.mcp??me),[W,G]=(0,D.useState)(()=>J?.warnings??[]),[ue,K]=(0,D.useState)(()=>Y?.hookExecutionByEvent??{}),[q,ge]=(0,D.useState)(()=>Y?.hookExecutionSessionId??null),[we,Te]=(0,D.useState)(!1),[Ee,De]=(0,D.useState)(()=>new Set),[Oe,ke]=(0,D.useState)(()=>new Set),[Ae,je]=(0,D.useState)(()=>new Set),[Me,Ne]=(0,D.useState)(()=>new Map);(0,D.useEffect)(()=>{o(t)},[t]);let Q=(0,D.useCallback)(async(e=!1)=>{if(!e&&ve(J,Date.now())){k(J.workspaceRoot),j(J.rules),N(J.workflows),F(J.skills),I(J.agents),L(J.plugins),z(J.tools),V(J.hooks),U(J.mcp),G(J.warnings),E(null),f(!1);return}f(!0),E(null);try{let e=await Se();k(e.workspaceRoot),j(e.rules),N(e.workflows),F(e.skills),I(e.agents),L(e.plugins),z(e.tools),V(e.hooks),U(e.mcp),G(e.warnings),J={...e,fetchedAt:Date.now()}}catch(e){let t=e instanceof Error?e.message:String(e);E(t)}finally{f(!1)}},[]),Pe=(0,D.useCallback)(async(e=!1)=>{if(!e&&Y&&Date.now()-Y.fetchedAt<_e){K(Y.hookExecutionByEvent),ge(Y.hookExecutionSessionId);return}Te(!0);try{let e=(await g.invoke(`list_cli_sessions`,{limit:300})??[]).filter(e=>typeof e.sessionId==`string`&&e.sessionId.trim().length>0).sort((e,t)=>(t.startedAt??``).localeCompare(e.startedAt??``))[0];if(!e?.sessionId){K({}),ge(null),Y={hookExecutionByEvent:{},hookExecutionSessionId:null,fetchedAt:Date.now()};return}let t=await g.invoke(`read_session_hooks`,{sessionId:e.sessionId,limit:5e3}),n={};for(let e of t??[]){let t=e.hookEventName?.trim();if(!t)continue;let r=n[t]??{count:0,lastTs:null};r.count+=1,e.ts&&(!r.lastTs||e.ts>r.lastTs)&&(r.lastTs=e.ts),n[t]=r}K(n),ge(e.sessionId),Y={hookExecutionByEvent:n,hookExecutionSessionId:e.sessionId,fetchedAt:Date.now()}}catch{}finally{Te(!1)}},[]),Fe=(0,D.useCallback)(e=>{let t=he(e);k(t.workspaceRoot),j(t.rules),N(t.workflows),F(t.skills),I(t.agents),L(t.plugins),z(t.tools),V(t.hooks),U(t.mcp),G(t.warnings),J={...t,fetchedAt:Date.now()}},[]),Ie=(0,D.useCallback)(async e=>{De(t=>new Set(t).add(e.id)),E(null);try{let t=[e.name,...e.headlessToolNames??[]].filter(Boolean);if(t.length===0)throw Error(`tool name is required`);let n;try{n=await g.invoke(`set_tool_disabled`,{names:t,disabled:e.enabled})}catch(e){if(!Ce(e,`set_tool_disabled`))throw e;for(let e of t)n=await g.invoke(`toggle_disabled_plugin_tool`,{name:e})}if(!n)throw Error(`tool toggle did not return an updated extension list`);Fe(n)}catch(e){let t=e instanceof Error?e.message:String(e);E(t)}finally{De(t=>{let n=new Set(t);return n.delete(e.id),n})}},[Fe]),Le=(0,D.useCallback)(async e=>{ke(t=>new Set(t).add(e.path)),E(null);try{let t=await g.invoke(`set_plugin_disabled`,{path:e.path,disabled:e.enabled});Fe(t)}catch(e){let t=e instanceof Error?e.message:String(e);E(t)}finally{ke(t=>{let n=new Set(t);return n.delete(e.path),n})}},[Fe]),Re=(0,D.useCallback)(async e=>{if(!Ae.has(e.key)){je(t=>new Set(t).add(e.key)),Ne(t=>{let n=new Map(t);return n.delete(e.key),n}),E(null);try{let t=await g.invoke(`uninstall_local_primitive`,{type:e.type,id:e.id,name:e.name,path:e.path});Ne(n=>{let r=new Map(n);return r.set(e.key,{status:`success`,message:t.message??`Uninstalled ${e.name??e.id??e.path}.`}),r}),await Q(!0)}catch(t){let n=t instanceof Error?t.message:String(t);Ne(t=>{let r=new Map(t);return r.set(e.key,{status:`failed`,message:n}),r}),E(n)}finally{je(t=>{let n=new Set(t);return n.delete(e.key),n})}}},[Ae,Q]),ze=(0,D.useCallback)(e=>{if(!e)return`never`;let t=Number(e),n=Number.isFinite(t)?new Date(t):new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleString()},[]);(0,D.useEffect)(()=>{let e=window.setTimeout(()=>{Q(!1)},0);return()=>window.clearTimeout(e)},[Q]),(0,D.useEffect)(()=>{if(i!==`Hooks`)return;let e=window.setTimeout(()=>{Pe(!1)},0);return()=>window.clearTimeout(e)},[i,Pe]);let Be=[`Rules`,`Hooks`,`Skills`,`Agents`,`Plugins`,`Tools`],Ve=(0,D.useMemo)(()=>{let e=M.map(e=>({id:e.id,type:`workflow`,name:e.name,instructions:e.instructions,path:e.path,scope:be(e.path,O)})),t=se.map(e=>({id:X(e.path).toLowerCase(),type:`skill`,name:e.name,description:e.description,instructions:e.instructions,path:e.path,scope:be(e.path,O)}));return[...e,...t].sort((e,t)=>e.name.localeCompare(t.name))},[se,M,O]),{projectRules:He,globalRules:Ue}=(0,D.useMemo)(()=>{let e=X(O),t=[],n=[];for(let r of A){let i=X(r.path);e&&i.startsWith(`${e}/`)&&i.includes(`/.clinerules/`)?t.push(r):n.push(r)}return{projectRules:t,globalRules:n}},[A,O]),{projectHooks:We,globalHooks:Ge}=(0,D.useMemo)(()=>{let e=X(O),t=[],n=[];for(let r of B){let i=X(r.path);e&&i.startsWith(`${e}/`)&&i.includes(`/.clinerules/hooks`)?t.push(r):n.push(r)}return{projectHooks:t,globalHooks:n}},[B,O]),{projectPlugins:Ke,globalPlugins:qe}=(0,D.useMemo)(()=>{let e=X(O),t=[],n=[];for(let r of le){let i=X(r.path);e&&i.startsWith(`${e}/`)&&i.includes(`/.cline/plugins`)?t.push(r):n.push(r)}return{projectPlugins:t,globalPlugins:n}},[le,O]),Je=(0,D.useMemo)(()=>R.filter(e=>e.source===`builtin`),[R]),Ye=(0,D.useMemo)(()=>R.filter(e=>e.source!==`builtin`),[R]),$=(0,D.useMemo)(()=>{let e=new Map;for(let t of Ye){let n=t.path??``,r=e.get(n)??[];r.push(t),e.set(n,r)}for(let t of e.values())t.sort((e,t)=>e.name.localeCompare(t.name));return e},[Ye]),Xe=(0,D.useMemo)(()=>[...qe.map(e=>({plugin:e,scope:`Global`})),...Ke.map(e=>({plugin:e,scope:`Project`}))],[qe,Ke]),Ze=(0,D.useMemo)(()=>[...Ue.map(e=>({rule:e,scope:`Global`})),...He.map(e=>({rule:e,scope:`Project`}))],[Ue,He]),Qe=(0,D.useMemo)(()=>[...Ge.map(e=>({hook:e,scope:`Global`})),...We.map(e=>({hook:e,scope:`Project`}))],[Ge,We]),$e=e=>{let t=Me.get(e);return t?(0,P.jsx)(`output`,{className:a(`text-xs`,t.status===`failed`?`text-destructive`:`text-muted-foreground`),children:t.message}):null},et=e=>{let t=Ae.has(e.key);return(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,P.jsx)(`div`,{className:`min-h-5 text-xs text-muted-foreground`,children:$e(e.key)}),(0,P.jsxs)(s,{disabled:t,onClick:()=>{Re(e)},type:`button`,variant:`destructive`,children:[t?(0,P.jsx)(ae,{}):(0,P.jsx)(r,{className:`size-4`}),t?`Uninstalling...`:`Uninstall`]})]})},tt=e=>{let t=Ae.has(e.key);return(0,P.jsxs)(C,{children:[(0,P.jsx)(ee,{render:(0,P.jsx)(s,{"aria-label":`More actions for ${e.name??`plugin`}`,className:`m-0 size-auto shrink-0 p-0 text-muted-foreground`,onClick:e=>e.stopPropagation(),size:`icon`,type:`button`,variant:`ghost`}),children:(0,P.jsx)(T,{className:`size-4`})}),(0,P.jsxs)(ie,{align:`end`,children:[(0,P.jsxs)(x,{onClick:()=>void navigator.clipboard.writeText(e.path??``),children:[(0,P.jsx)(l,{className:`size-4`}),`Copy path`]}),(0,P.jsxs)(x,{className:`text-destructive focus:text-destructive`,disabled:t,onClick:()=>void Re(e),children:[t?(0,P.jsx)(ae,{}):(0,P.jsx)(r,{className:`size-4`}),t?`Uninstalling...`:`Uninstall`]})]})]})},nt=e=>{let t=`${e.type}:${e.path}`;return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.type===`workflow`?(0,P.jsx)(c,{className:`h-4 w-4 shrink-0 text-primary`}):(0,P.jsx)(m,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:e.scope}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.type})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||ye(e.instructions)}),(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path}),(0,P.jsx)(`div`,{className:`mt-3`,children:et({key:t,type:e.type,id:e.id,name:e.name,path:e.path})})]},t)},rt=e=>(0,P.jsxs)(`div`,{className:`grid gap-1`,children:[(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description?.trim()||ye(e.instructions)}),(0,P.jsx)(`p`,{className:`text-xs font-mono text-muted-foreground`,children:e.path})]}),it=({plugin:e,scope:t})=>{let n=e.path,r=[{label:`Tools`,items:e.contributions?.tools??($.get(e.path)??[]).map(e=>e.name)},{label:`Skills`,items:e.contributions?.skills??[]},{label:`Rules`,items:e.contributions?.rules??[]},{label:`Hooks`,items:e.contributions?.hooks??[]},{label:`Commands`,items:e.contributions?.commands??[]},{label:`MCP servers`,items:e.contributions?.mcpServers??[]},{label:`Providers`,items:e.contributions?.providers??[]},{label:`Capabilities`,items:e.contributions?.capabilities??[]}].filter(e=>e.items.length>0);return(0,P.jsxs)(`details`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-3`,children:[(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:t}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},onClick:e=>e.stopPropagation(),disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`}),tt({key:n,type:`plugin`,id:e.name,name:e.name,path:e.path})]}),(0,P.jsxs)(`div`,{className:`mt-3`,children:[e.contributions?.inspectionStatus===`disabled`?(0,P.jsx)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:`Enable this plugin to inspect its dynamic contributions.`}):null,r.length>0?(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-2 text-xs font-medium text-foreground`,children:[(0,P.jsx)(`span`,{className:`mr-1`,children:`Contributions`}),r.map(e=>(0,P.jsxs)(w,{variant:`outline`,children:[e.label,` `,e.items.length]},e.label))]}),(0,P.jsx)(`div`,{className:`grid max-h-56 gap-3 overflow-y-auto pt-2 sm:grid-cols-2`,children:r.map(e=>(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.label}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.items.map(e=>(0,P.jsx)(w,{variant:`secondary`,children:e},e))})]},e.label))})]}):(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No plugin contributions found.`})]}),$e(n)?(0,P.jsx)(`div`,{className:`mt-3`,children:$e(n)}):null]},e.path)},at=e=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`}),tt({key:e.path,type:`plugin`,id:e.name,name:e.name,path:e.path})]}),ot=e=>{let t=[{label:`Tools`,items:e.contributions?.tools??($.get(e.path)??[]).map(e=>e.name)},{label:`Skills`,items:e.contributions?.skills??[]},{label:`Rules`,items:e.contributions?.rules??[]},{label:`Hooks`,items:e.contributions?.hooks??[]},{label:`Commands`,items:e.contributions?.commands??[]},{label:`MCP servers`,items:e.contributions?.mcpServers??[]},{label:`Providers`,items:e.contributions?.providers??[]},{label:`Capabilities`,items:e.contributions?.capabilities??[]}].filter(e=>e.items.length>0);return t.length===0?null:(0,P.jsx)(`div`,{className:`grid max-h-56 gap-3 overflow-y-auto sm:grid-cols-2`,children:t.map(e=>(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.label}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.items.map(e=>(0,P.jsx)(w,{variant:`secondary`,children:e},e))})]},e.label))})},st=e=>{let t=e.name;return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(_,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:`Global`}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.transportType}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.disabled?`Disabled`:`Enabled`})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.url??([e.command,...e.args??[]].filter(Boolean).join(` `)||`No launch command configured.`)}),H.settingsPath?(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:H.settingsPath}):null,(0,P.jsx)(`div`,{className:`mt-3`,children:et({key:t,type:`mcp`,id:e.name,name:e.name})})]},e.name)},ct=e=>(0,P.jsxs)(`div`,{className:`grid gap-1`,children:[(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.disabled?`Disabled`:`Enabled`,` locally`,e.transportType?` via ${e.transportType}`:``]}),H.settingsPath?(0,P.jsx)(`p`,{className:`text-xs font-mono text-muted-foreground`,children:H.settingsPath}):null]}),lt=e===`skill`?Ve.map(e=>({key:`${e.type}:${e.path}`,matchValues:xe(e.id,e.name,e.path),render:()=>nt(e),renderMatchedBadges:()=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z,{scope:e.scope}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.type})]}),renderMatchedDetails:()=>rt(e)})):e===`plugin`?Xe.map(e=>({key:e.plugin.path,matchValues:xe(e.plugin.name,e.plugin.path),render:()=>it(e),renderMatchedBadges:()=>(0,P.jsx)(Z,{scope:e.scope}),renderMatchedControls:()=>at(e.plugin),renderMatchedDetails:Object.values(e.plugin.contributions??{}).some(e=>e.length>0)||($.get(e.plugin.path)??[]).length>0?()=>ot(e.plugin):void 0})):e===`mcp`?H.servers.map(e=>({key:e.name,matchValues:xe(e.name),render:()=>st(e),renderMatchedBadges:()=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z,{scope:`Global`}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.transportType})]}),renderMatchedDetails:()=>ct(e)})):null;return(0,P.jsxs)(ne,{children:[(0,P.jsx)(re,{description:fe[i],title:i,meta:(0,P.jsx)(te,{children:pe[i]}),actions:(0,P.jsx)(s,{variant:`outline`,size:`sm`,onClick:()=>{Q(!0),i===`Hooks`&&Pe(!0)},disabled:u,children:(0,P.jsx)(p,{className:a(`h-4 w-4`,u&&`animate-spin`)})})}),n?(0,P.jsx)(`div`,{className:`mb-6 flex items-center gap-0 border-b border-border`,children:Be.map(e=>(0,P.jsxs)(s,{variant:`ghost`,onClick:()=>o(e),className:a(`relative px-4 py-2.5 text-sm font-medium transition-colors`,i===e?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[e,i===e&&(0,P.jsx)(`span`,{className:`absolute inset-x-0 -bottom-px h-0.5 bg-foreground`})]},e))}):null,h&&(0,P.jsxs)(`div`,{className:`mb-4 rounded-lg border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive`,children:[`Failed to load configuration lists: `,h]}),W.length>0&&(0,P.jsxs)(`div`,{className:`mb-4 rounded-lg border border-yellow-500/40 bg-yellow-500/10 px-4 py-3 text-sm text-yellow-700 dark:text-yellow-300`,children:[(0,P.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 font-medium`,children:[(0,P.jsx)(oe,{className:`h-4 w-4`}),`Partial results`]}),(0,P.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:W.map(e=>(0,P.jsx)(`li`,{children:e},e))})]}),e?(0,P.jsx)(de,{chrome:`embedded`,installedItems:lt??void 0,onInstalledItemsChanged:()=>Q(!0),primitive:e}):null,i===`Rules`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Enabled rules discovered from configured workspace/global directories.`}),(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,P.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:`Installed`}),(0,P.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:Ze.length})]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ze.map(({rule:e,scope:t})=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-4 py-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(b,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,P.jsx)(`span`,{className:`flex-1 text-sm font-medium text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:t})]}),(0,P.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:ye(e.instructions)}),(0,P.jsx)(`p`,{className:`mt-1 text-xs font-mono text-muted-foreground`,children:e.path})]},e.path)),Ze.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No rules found.`})]})]})]}),i===`Hooks`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Hook config files from workspace and global hook directories.`}),we&&q&&(0,P.jsxs)(`p`,{className:`mb-4 text-xs text-muted-foreground`,children:[`Execution status is based on hook events in session`,` `,(0,P.jsx)(`span`,{className:`font-mono`,children:q}),`.`]}),(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,P.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:`Installed`}),(0,P.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:Qe.length})]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Qe.map(({hook:e,scope:t})=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-4 py-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(v,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,P.jsx)(`span`,{className:`flex-1 text-sm font-mono text-foreground`,children:e.fileName}),(0,P.jsx)(Z,{scope:t}),e.hookEventName&&(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`rounded border border-border px-2 py-0.5 text-xs text-muted-foreground`,children:e.hookEventName}),(()=>{let t=ue[e.hookEventName],n=(t?.count??0)>0;return(0,P.jsx)(`span`,{className:a(`rounded border px-2 py-0.5 text-xs`,n?`border-emerald-400/50 text-emerald-600 dark:text-emerald-400`:`border-border text-muted-foreground`),children:n?`${t?.count??0} executed`:`never executed`})})()]})]}),e.hookEventName?(0,P.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Last run:`,` `,ze(ue[e.hookEventName]?.lastTs??null)]}):null,(0,P.jsx)(`p`,{className:`mt-1 text-xs font-mono text-muted-foreground`,children:e.path})]},e.path)),Qe.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No hooks found.`})]})]})]}),i===`Skills`&&!e&&(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:[`Skills can be invoked in chat with`,` `,(0,P.jsx)(`code`,{className:`rounded bg-secondary px-1.5 py-0.5 text-xs font-mono text-foreground`,children:`/SKILL`}),`.`]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Ve.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.type===`workflow`?(0,P.jsx)(c,{className:`h-4 w-4 shrink-0 text-primary`}):(0,P.jsx)(m,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`rounded border border-border px-2 py-0.5 text-xs text-muted-foreground`,children:e.type})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||ye(e.instructions)}),(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path})]},`${e.type}:${e.path}`)),Ve.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No enabled skills or workflows found.`})]})]}),i===`Agents`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Configured agents discovered from Documents and settings directories.`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[ce.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(S,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:e.name})]}),(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path})]},e.path)),ce.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No configured agents found.`})]})]}),i===`Plugins`&&!e&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Plugins discovered from workspace and global plugin directories.`}),(0,P.jsxs)(`div`,{className:`mb-6`,children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Global Plugins`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[qe.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`})]}),(0,P.jsxs)(`div`,{className:`mt-3 ml-7 flex max-h-56 flex-col gap-2 overflow-y-auto`,children:[($.get(e.path)??[]).map(e=>(0,P.jsx)(`div`,{className:`flex items-center justify-between gap-4 rounded-md border border-border/70 px-3 py-2`,children:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:e.name}),(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`})]})},e.id)),($.get(e.path)?.length??0)===0&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No plugin tools found.`})]})]},e.path)),qe.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No global plugins found.`})]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Project Plugins`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Ke.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`})]}),(0,P.jsxs)(`div`,{className:`mt-3 ml-7 flex max-h-56 flex-col gap-2 overflow-y-auto`,children:[($.get(e.path)??[]).map(e=>(0,P.jsx)(`div`,{className:`flex items-center justify-between gap-4 rounded-md border border-border/70 px-3 py-2`,children:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:e.name}),(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`})]})},e.id)),($.get(e.path)?.length??0)===0&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No plugin tools found.`})]})]},e.path)),Ke.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No project plugins found.`})]})]})]}),i===`Tools`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Builtin tool groups and plugin-contributed tools available to the runtime.`}),(0,P.jsxs)(`div`,{className:`mb-6`,children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Builtin Tools`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Je.map(e=>(()=>{let t=Ee.has(e.id);return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(y,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Ie(e)},disabled:t,"aria-label":`Toggle ${e.name}`})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`}),!!e.headlessToolNames?.length&&(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.headlessToolNames.join(`, `)})]},e.id)})()),Je.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No builtin tools found.`})]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Plugin Tools`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Ye.map(e=>(()=>{let t=Ee.has(e.id);return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(y,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),e.pluginName&&(0,P.jsxs)(`span`,{className:`rounded border border-border px-2 py-0.5 text-xs text-muted-foreground`,children:[`plugin: `,e.pluginName]}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Ie(e)},disabled:t,"aria-label":`Toggle ${e.name}`})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`}),e.path&&(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path})]},e.id)})()),Ye.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No plugin tools found.`})]})]})]})]})}export{we as CustomizationSectionView};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{a as t,r as n}from"./bundle-mjs-CyB9GzWm.js";import{F as r,L as i,R as a,c as o,w as s}from"./vscode-2dRY2WFo.js";import{i as c,o as l,r as u,t as d}from"./switch-CsW_9J9M.js";import{a as f,i as p,n as m,r as h,t as g}from"./desktop-client-BzJm9_zB.js";import{C as _,E as v,S as y,T as b,d as x,f as ee,i as te,k as S,l as C,o as ne,s as re,u as ie}from"./index-B21Kqr_i.js";import{n as ae,t as w}from"./badge-6HhkS3z9.js";var T=i(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),E=i(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),oe=i(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),D=e(t(),1),O=`/api/marketplace/catalog`,k={version:1,counts:{total:0,plugins:0,skills:0,mcps:0},tags:[],entries:[]};function A(e){return e===`mcp`||e===`skill`||e===`plugin`}function j(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function M(e){return typeof e==`number`&&Number.isFinite(e)?e:0}function N(e){if(!Array.isArray(e))return;let t=e.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;if(typeof t.name!=`string`)return null;let n={name:t.name};return typeof t.required==`boolean`&&(n.required=t.required),typeof t.description==`string`&&(n.description=t.description),typeof t.url==`string`&&(n.url=t.url),n}).filter(e=>e!==null);return t.length>0?t:void 0}async function se(){let e=await fetch(O,{headers:{Accept:`application/json`}});if(!e.ok)throw Error(`Failed to fetch marketplace: ${e.status}`);let t=await e.json(),n=typeof t?.baseUrl==`string`?t.baseUrl:void 0,r=typeof t?.counts==`object`&&t.counts!==null?t.counts:{},i=Array.isArray(t?.tags)?t.tags.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;return typeof t.id!=`string`||typeof t.label!=`string`?null:{id:t.id,label:t.label,count:M(t.count)}}).filter(e=>e!==null):[],a=Array.isArray(t?.entries)?t.entries.map(e=>{if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.install==`object`&&t.install!==null?t.install:{};return typeof t.id!=`string`||!A(t.type)||typeof t.name!=`string`||typeof t.tagline!=`string`||typeof t.description!=`string`||typeof n.command!=`string`?null:{id:t.id,type:t.type,name:t.name,featured:typeof t.featured==`boolean`?t.featured:void 0,tagline:t.tagline,description:t.description,tags:j(t.tags),install:{args:j(n.args),command:n.command,env:N(n.env),notes:typeof n.notes==`string`?n.notes:void 0}}}).filter(e=>e!==null&&e.install.args.length>0):[];return{version:M(t?.version)||k.version,generatedAt:typeof t?.generatedAt==`string`?t.generatedAt:void 0,baseUrl:n,counts:{total:M(r.total)||a.length,plugins:M(r.plugins),skills:M(r.skills),mcps:M(r.mcps)},tags:i,entries:a}}var P=n(),F=3e5,ce={fontFamily:`ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace`},I={mcp:{title:`MCP Servers`,description:`Install Model Context Protocol servers into this CLI environment.`,emptyInstalled:`No MCP servers installed.`,emptyCatalog:`No MCP servers match the current filters.`,icon:_},skill:{title:`Skills`,description:`Install skills globally for Cline.`,emptyInstalled:`No skills installed.`,emptyCatalog:`No skills match the current filters.`,icon:m},plugin:{title:`Plugins`,description:`Install plugins into this CLI environment.`,emptyInstalled:`No plugins installed.`,emptyCatalog:`No plugins match the current filters.`,icon:E}},le={mcp:`cline mcp install`,plugin:`cline plugin install`,skill:`cline skill add`};function L(e){return`${e.type}:${e.id}`}function R(e,t){return Number(!!t.featured)-Number(!!e.featured)}function z(e){return e.trim().toLowerCase()}function B(e){return new Set([e.id,e.name,...e.install.args].map(z).filter(Boolean))}function V(e,t){let n=B(e);return t.matchValues.map(z).filter(Boolean).some(e=>n.has(e))}function H(e,t){return[e.name,e.tagline,e.description,e.type,...e.tags.map(e=>t.get(e)??e)].join(` `).toLowerCase()}function U(e){if(e?.status===`installed`||e?.status===`uninstalled`||e?.status===`failed`)return e.message}function W({actionState:e,entry:t}){let n=t.install.env?.filter(e=>e.required!==!1)??[],r=t.install.env?.filter(e=>e.required===!1)??[];return n.length>0||r.length>0||t.install.notes||e?.status===`failed`?(0,P.jsxs)(`div`,{className:`grid gap-3 border-t pt-3`,"data-marketplace-entry-details":!0,children:[n.length>0||r.length>0?(0,P.jsxs)(`div`,{className:`rounded-lg border border-amber-500/30 bg-amber-500/10 p-3`,children:[(0,P.jsx)(`p`,{className:`text-sm font-medium text-amber-800 dark:text-amber-200`,children:`Environment setup needed`}),(0,P.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-amber-800/80 dark:text-amber-100/80`,children:`Add these values to your Cline/plugin environment after install.`}),(0,P.jsx)(`div`,{className:`mt-3 grid gap-2`,children:[...n,...r].map(e=>(0,P.jsxs)(`div`,{className:`rounded-md border border-amber-500/20 bg-background/60 p-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,P.jsx)(`code`,{className:`font-mono text-xs font-semibold`,children:(0,P.jsx)(`span`,{style:ce,children:e.name})}),(0,P.jsx)(w,{variant:`outline`,children:e.required===!1?`Optional`:`Required`})]}),e.description?(0,P.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e.description}):null,e.url?(0,P.jsxs)(`a`,{className:`mt-1 inline-flex items-center gap-1 text-xs text-primary hover:underline`,href:e.url,rel:`noreferrer`,target:`_blank`,children:[`Get value`,(0,P.jsx)(f,{className:`size-3`})]}):null]},e.name))})]}):null,t.install.notes?(0,P.jsx)(`p`,{className:`rounded-lg border bg-muted/30 p-3 text-xs leading-5 text-muted-foreground`,children:t.install.notes}):null,e?.status===`failed`?(0,P.jsx)(`div`,{className:`max-h-44 overflow-auto rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive`,children:e.message}):null]}):null}function G({actionState:e,entry:t,expanded:n,installed:i,installedStatusReady:o,onInstall:c,onToggleExpanded:l,onUninstall:u,matchedLocalItems:d=[],showFeatured:f=!0,showTags:p=!0,sourceLabel:m,tagLabels:g}){let _=I[t.type].icon,v=e?.status===`installing`||e?.status===`uninstalling`,y=!!t.install.env?.length,b=y||!!t.install.notes||e?.status===`failed`,x=U(e),ee=e=>{if(e.stopPropagation(),i){u(t);return}c(t)},te=o?e?.status===`installing`?`Installing...`:e?.status===`uninstalling`?`Uninstalling...`:i?`Uninstall`:`Install`:`Checking...`,S=x?(0,P.jsx)(`output`,{className:a(`text-xs`,e?.status===`failed`?`text-destructive`:`text-muted-foreground`),children:x}):y?(0,P.jsx)(`span`,{className:`text-xs text-amber-700 dark:text-amber-300`,children:`Requires setup after install`}):null,C=(0,P.jsxs)(s,{disabled:!o||v,onClick:ee,size:`sm`,type:`button`,variant:i?`destructive`:`default`,children:[v||!o?(0,P.jsx)(ae,{}):null,i&&!v?(0,P.jsx)(r,{className:`size-4`}):null,te]}),ne=(0,P.jsxs)(P.Fragment,{children:[i?null:(0,P.jsx)(`div`,{className:`absolute top-4 right-4`,"data-marketplace-entry-interactive":!0,children:C}),(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-2`,children:[(0,P.jsxs)(`div`,{className:a(`flex min-w-0 flex-1 items-center gap-2`,!i&&`pr-24`),children:[(0,P.jsx)(_,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:t.name}),f&&t.featured?(0,P.jsxs)(w,{className:`border border-violet-500/20 bg-violet-500/10 text-violet-700 dark:text-violet-300`,children:[(0,P.jsx)(h,{className:`fill-current`}),`Featured`]}):null]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2`,children:[m?(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:m}):null,d.map(e=>e.renderMatchedBadges?(0,P.jsx)(`span`,{className:`contents`,children:e.renderMatchedBadges()},`${e.key}:badges`):null),d.map(e=>e.renderMatchedControls?(0,P.jsx)(`span`,{className:`contents`,"data-marketplace-entry-interactive":!0,children:e.renderMatchedControls()},`${e.key}:controls`):null)]})]}),d.some(e=>e.renderMatchedMeta)?(0,P.jsx)(`div`,{className:`mt-1 grid gap-1`,children:d.map(e=>e.renderMatchedMeta?(0,P.jsx)(`div`,{children:e.renderMatchedMeta()},`${e.key}:meta`):null)}):null]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-stretch sm:justify-between`,children:[(0,P.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-2`,children:[p&&t.tags.length>0?(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.tags.slice(0,5).map(e=>(0,P.jsx)(w,{variant:`outline`,className:`max-w-full text-muted-foreground`,children:(0,P.jsx)(`span`,{className:`truncate`,children:g.get(e)??e})},e))}):null,(0,P.jsx)(`p`,{className:`line-clamp-2 text-xs leading-5 text-muted-foreground`,children:t.description}),S]}),i?(0,P.jsx)(`div`,{className:`flex shrink-0 flex-col items-start gap-1 sm:items-end sm:justify-end`,children:C}):null]}),d.some(e=>e.renderMatchedDetails)?(0,P.jsx)(`div`,{className:`grid gap-2`,"data-marketplace-entry-details":!0,children:d.map(e=>e.renderMatchedDetails?(0,P.jsx)(`div`,{children:e.renderMatchedDetails()},e.key):null)}):null,n&&b?(0,P.jsx)(W,{actionState:e,entry:t}):null]});return b?(0,P.jsx)(`div`,{"aria-expanded":n,"aria-label":`${n?`Collapse`:`Expand`} ${t.name}`,className:`relative grid cursor-pointer gap-2 rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent/20 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none`,onClick:e=>{e.target instanceof HTMLElement&&e.target.closest(`[data-marketplace-entry-details], [data-marketplace-entry-interactive]`)||l(t)},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(t))},role:`button`,tabIndex:0,children:ne}):(0,P.jsx)(`div`,{className:`relative grid gap-2 rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent/20`,children:ne})}function ue({active:e,count:t,onClick:n,tag:r}){return(0,P.jsxs)(s,{"aria-pressed":e,onClick:n,size:`sm`,type:`button`,variant:e?`default`:`outline`,children:[(0,P.jsx)(`span`,{className:`truncate`,children:r.label}),(0,P.jsx)(`span`,{className:`rounded bg-background/30 px-1.5 py-0.5 text-xs`,children:t})]})}function K({actionStates:e,emptyMessage:t,entries:n,expandedEntryKey:r,headerContent:i,installedEntryKeys:a,installedStatusReady:o,localOnlyInstalledItems:s=[],matchedLocalItemsByEntryKey:c,onInstall:l,onToggleExpanded:u,onUninstall:d,showFeaturedBadges:f=!0,showEntryTags:p=!0,sourceLabel:m,tagLabels:h,title:g}){let _=n.length+s.length;return(0,P.jsxs)(`section`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,P.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:g}),(0,P.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:_})]}),i,_>0?(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[s.map(e=>e.render()),n.map(t=>{let n=L(t);return(0,P.jsx)(G,{actionState:e.get(n),entry:t,expanded:r===n,installed:a.has(n),installedStatusReady:o,onInstall:l,onToggleExpanded:u,onUninstall:d,matchedLocalItems:c?.get(n)??[],showFeatured:f,showTags:p,sourceLabel:m,tagLabels:h},n)})]}):(0,P.jsx)(`div`,{className:`rounded-lg border border-dashed bg-card p-6 text-center text-sm text-muted-foreground`,children:t})]})}function de({chrome:e=`page`,installedItems:t,onInstalledItemsChanged:n,primitive:r}){let[i,a]=(0,D.useState)(null),[c,l]=(0,D.useState)(null),[d,f]=(0,D.useState)(``),[p,m]=(0,D.useState)(null),[h,_]=(0,D.useState)(null),[v,y]=(0,D.useState)(()=>new Set),[b,x]=(0,D.useState)(()=>new Map),[ee,S]=(0,D.useState)(`loading`);(0,D.useEffect)(()=>{let e=!1;return(async()=>{try{e||S(`loading`);let t=await se();e||(a(t),l(null));try{let n=await g.invoke(`list_marketplace_installed_entries`,{entries:t.entries});e||(y(new Set(n.installedKeys)),S(`ready`))}catch{e||S(`ready`)}}catch(t){e||(l(t instanceof Error?t.message:String(t)),S(`ready`))}})(),()=>{e=!0}},[]);let C=I[r],ie=C.icon,w=(0,D.useMemo)(()=>new Map(i?.tags.map(e=>[e.id,e.label])??[]),[i?.tags]),T=(0,D.useMemo)(()=>(i?.entries.filter(e=>e.type===r)??[]).sort(R),[i?.entries,r]),E=(0,D.useMemo)(()=>{let e=d.trim().toLowerCase();return T.filter(t=>e.length===0||H(t,w).includes(e))},[T,d,w]),oe=(0,D.useMemo)(()=>E.filter(e=>v.has(L(e))),[E,v]),O=(0,D.useMemo)(()=>E.filter(e=>!v.has(L(e))),[E,v]),k=(0,D.useMemo)(()=>{let e=new Map;for(let t of O)for(let n of t.tags)e.set(n,(e.get(n)??0)+1);return e},[O]),A=(0,D.useMemo)(()=>(i?.tags??[]).filter(e=>(k.get(e.id)??0)>0),[i?.tags,k]),j=(0,D.useMemo)(()=>O.filter(e=>!p||e.tags.includes(p)),[O,p]),M=(0,D.useMemo)(()=>{let e=new Map;for(let n of t??[])for(let t of oe){let r=L(t);if(!V(t,n))continue;let i=e.get(r)??[];i.push(n),e.set(r,i)}return e},[oe,t]),N=(0,D.useMemo)(()=>{let e=new Set,n=T.filter(e=>v.has(L(e)));for(let r of t??[])n.some(e=>V(e,r))&&e.add(r.key);return e},[v,t,T]),ce=(0,D.useMemo)(()=>{let e=d.trim().toLowerCase();return(t??[]).filter(t=>N.has(t.key)?!1:e.length===0||t.matchValues.map(z).some(t=>t.includes(e)))},[t,N,d]),B=ee===`ready`,U=A.length>0?(0,P.jsxs)(`div`,{className:`flex flex-col gap-2 md:flex-row md:items-center md:justify-between`,children:[(0,P.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1`,children:A.map(e=>(0,P.jsx)(ue,{active:p===e.id,count:k.get(e.id)??0,onClick:()=>m(t=>t===e.id?null:e.id),tag:e},e.id))}),(0,P.jsxs)(`div`,{className:`flex min-h-8 shrink-0 items-center gap-2 text-sm text-muted-foreground`,children:[(0,P.jsx)(`span`,{className:`font-medium text-foreground`,children:j.length}),(0,P.jsx)(`span`,{children:j.length===1?`result`:`results`}),p?(0,P.jsx)(s,{onClick:()=>m(null),size:`sm`,type:`button`,variant:`ghost`,children:`Clear filters`}):null]})]}):null,W=(e,t)=>{let n=L(e);x(e=>{let r=new Map(e);return r.set(n,t),r})},G=e=>{y(t=>new Set(t).add(L(e)))},de=e=>{y(t=>{let n=new Set(t);return n.delete(L(e)),n})},fe=e=>{let t=L(e);_(e=>e===t?null:t)},pe=async e=>{let t=L(e),r=b.get(t);if(r?.status!==`installing`&&r?.status!==`uninstalling`){_(t),W(e,{status:`installing`});try{let t=await g.invoke(`install_marketplace_entry`,{entry:e},{timeoutMs:F});W(e,{status:`installed`,message:t.message}),G(e),await n?.()}catch(t){W(e,{status:`failed`,message:t instanceof Error?t.message:String(t)})}}},me=async e=>{let t=L(e),r=b.get(t);if(r?.status!==`installing`&&r?.status!==`uninstalling`){_(t),W(e,{status:`uninstalling`});try{let t=await g.invoke(`uninstall_marketplace_entry`,{entry:e},{timeoutMs:F});W(e,{status:`uninstalled`,message:t.message}),de(e),await n?.()}catch(t){W(e,{status:`failed`,message:t instanceof Error?t.message:String(t)})}}},q=(0,P.jsxs)(`div`,{className:`grid gap-6`,children:[e===`page`?(0,P.jsx)(re,{description:C.description,icon:ie,title:C.title,meta:(0,P.jsx)(te,{children:le[r]}),actions:i?.generatedAt?(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Updated`,` `,new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,year:`numeric`}).format(new Date(i.generatedAt))]}):null}):null,!i&&!c?(0,P.jsxs)(`div`,{className:`flex min-h-80 items-center justify-center rounded-lg border bg-card text-sm text-muted-foreground`,children:[(0,P.jsx)(ae,{className:`mr-2`}),`Loading marketplace...`]}):null,i&&!B?(0,P.jsxs)(`div`,{className:`flex min-h-80 items-center justify-center rounded-lg border bg-card text-sm text-muted-foreground`,children:[(0,P.jsx)(ae,{className:`mr-2`}),`Checking installed status...`]}):null,c?(0,P.jsx)(`div`,{className:`rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-sm text-destructive`,children:c}):null,i&&B?(0,P.jsxs)(`div`,{className:`grid gap-6`,children:[(0,P.jsx)(`div`,{className:`grid gap-3`,children:(0,P.jsx)(`div`,{className:`flex flex-col gap-3 md:flex-row md:items-center`,children:(0,P.jsxs)(`div`,{className:`relative block flex-1`,children:[(0,P.jsx)(u,{className:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),(0,P.jsx)(o,{"aria-label":`Search ${C.title}`,className:`h-10 pl-8`,onChange:e=>f(e.target.value),placeholder:`Search ${C.title.toLowerCase()}`,value:d})]})})}),(0,P.jsx)(K,{actionStates:b,emptyMessage:C.emptyInstalled,entries:oe,expandedEntryKey:h,installedEntryKeys:v,installedStatusReady:B,localOnlyInstalledItems:ce,matchedLocalItemsByEntryKey:M,onInstall:pe,onToggleExpanded:fe,onUninstall:me,showFeaturedBadges:!1,showEntryTags:!1,sourceLabel:`Marketplace`,tagLabels:w,title:`Installed`}),(0,P.jsx)(K,{actionStates:b,emptyMessage:C.emptyCatalog,entries:j,expandedEntryKey:h,headerContent:U,installedEntryKeys:v,installedStatusReady:B,onInstall:pe,onToggleExpanded:fe,onUninstall:me,tagLabels:w,title:`Marketplace`})]}):null]});return e===`embedded`?q:(0,P.jsx)(ne,{children:q})}var fe={Rules:`Review project and global rule files that shape Cline behavior.`,Hooks:`Inspect hook configuration and recent execution status.`,MCP:`Manage installed MCP servers and add new servers from the marketplace.`,Skills:`Manage installed skills and add new skills from the marketplace.`,Agents:`Review configured agents discovered from local settings.`,Plugins:`Manage installed plugins and add new plugins from the marketplace.`,Tools:`Inspect built-in tools and tools contributed by plugins.`},pe={Rules:`cline config rules`,Hooks:`cline config hooks`,MCP:`cline mcp install`,Skills:`cline skill`,Agents:`cline config agents`,Plugins:`cline plugin`,Tools:`cline config tools`},me={settingsPath:``,hasSettingsFile:!1,servers:[]};function q(e){return Array.isArray(e)?e:[]}function he(e){return{workspaceRoot:typeof e?.workspaceRoot==`string`?e.workspaceRoot:``,rules:q(e?.rules),workflows:q(e?.workflows),skills:q(e?.skills),agents:q(e?.agents),plugins:q(e?.plugins),tools:q(e?.tools),hooks:q(e?.hooks),mcp:e?.mcp&&typeof e.mcp==`object`?{settingsPath:typeof e.mcp.settingsPath==`string`?e.mcp.settingsPath:``,hasSettingsFile:!!e.mcp.hasSettingsFile,servers:q(e.mcp.servers)}:{...me},warnings:q(e?.warnings)}}var ge=6e4,_e=3e4,J=null,Y=null;function ve(e,t){return!!(e&&t-e.fetchedAt<ge&&Array.isArray(e.tools)&&e.tools.length>0)}function ye(e,t=150){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,t).trimEnd()}...`}function X(e){return e.replaceAll(`\\`,`/`)}function be(e,t){let n=X(t),r=X(e);return n&&r.startsWith(`${n}/`)?`Project`:`Global`}function Z({scope:e}){return(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e})}function xe(...e){let t=new Set;for(let n of e){let e=n?.trim().replaceAll(`\\`,`/`);if(!e)continue;t.add(e);let r=e.split(`/`).filter(Boolean);for(let e of r)t.add(e.replace(/\.[^.]+$/,``));for(let e=0;e<r.length-1;e+=1)t.add(`${r[e]}/${r[e+1]}`)}return[...t]}async function Se(){return he(await g.invoke(`list_user_instruction_configs`))}function Ce(e,t){return(e instanceof Error?e.message:String(e)).includes(`unsupported desktop command: ${t}`)}function we({catalogPrimitive:e,section:t=`Rules`,showTabs:n=!1}){let[i,o]=(0,D.useState)(t),[u,f]=(0,D.useState)(()=>!ve(J,Date.now())),[h,E]=(0,D.useState)(null),[O,k]=(0,D.useState)(()=>J?.workspaceRoot??``),[A,j]=(0,D.useState)(()=>J?.rules??[]),[M,N]=(0,D.useState)(()=>J?.workflows??[]),[se,F]=(0,D.useState)(()=>J?.skills??[]),[ce,I]=(0,D.useState)(()=>J?.agents??[]),[le,L]=(0,D.useState)(()=>J?.plugins??[]),[R,z]=(0,D.useState)(()=>J?.tools??[]),[B,V]=(0,D.useState)(()=>J?.hooks??[]),[H,U]=(0,D.useState)(()=>J?.mcp??me),[W,G]=(0,D.useState)(()=>J?.warnings??[]),[ue,K]=(0,D.useState)(()=>Y?.hookExecutionByEvent??{}),[q,ge]=(0,D.useState)(()=>Y?.hookExecutionSessionId??null),[we,Te]=(0,D.useState)(!1),[Ee,De]=(0,D.useState)(()=>new Set),[Oe,ke]=(0,D.useState)(()=>new Set),[Ae,je]=(0,D.useState)(()=>new Set),[Me,Ne]=(0,D.useState)(()=>new Map);(0,D.useEffect)(()=>{o(t)},[t]);let Q=(0,D.useCallback)(async(e=!1)=>{if(!e&&ve(J,Date.now())){k(J.workspaceRoot),j(J.rules),N(J.workflows),F(J.skills),I(J.agents),L(J.plugins),z(J.tools),V(J.hooks),U(J.mcp),G(J.warnings),E(null),f(!1);return}f(!0),E(null);try{let e=await Se();k(e.workspaceRoot),j(e.rules),N(e.workflows),F(e.skills),I(e.agents),L(e.plugins),z(e.tools),V(e.hooks),U(e.mcp),G(e.warnings),J={...e,fetchedAt:Date.now()}}catch(e){let t=e instanceof Error?e.message:String(e);E(t)}finally{f(!1)}},[]),Pe=(0,D.useCallback)(async(e=!1)=>{if(!e&&Y&&Date.now()-Y.fetchedAt<_e){K(Y.hookExecutionByEvent),ge(Y.hookExecutionSessionId);return}Te(!0);try{let e=(await g.invoke(`list_cli_sessions`,{limit:300})??[]).filter(e=>typeof e.sessionId==`string`&&e.sessionId.trim().length>0).sort((e,t)=>(t.startedAt??``).localeCompare(e.startedAt??``))[0];if(!e?.sessionId){K({}),ge(null),Y={hookExecutionByEvent:{},hookExecutionSessionId:null,fetchedAt:Date.now()};return}let t=await g.invoke(`read_session_hooks`,{sessionId:e.sessionId,limit:5e3}),n={};for(let e of t??[]){let t=e.hookEventName?.trim();if(!t)continue;let r=n[t]??{count:0,lastTs:null};r.count+=1,e.ts&&(!r.lastTs||e.ts>r.lastTs)&&(r.lastTs=e.ts),n[t]=r}K(n),ge(e.sessionId),Y={hookExecutionByEvent:n,hookExecutionSessionId:e.sessionId,fetchedAt:Date.now()}}catch{}finally{Te(!1)}},[]),Fe=(0,D.useCallback)(e=>{let t=he(e);k(t.workspaceRoot),j(t.rules),N(t.workflows),F(t.skills),I(t.agents),L(t.plugins),z(t.tools),V(t.hooks),U(t.mcp),G(t.warnings),J={...t,fetchedAt:Date.now()}},[]),Ie=(0,D.useCallback)(async e=>{De(t=>new Set(t).add(e.id)),E(null);try{let t=[e.name,...e.headlessToolNames??[]].filter(Boolean);if(t.length===0)throw Error(`tool name is required`);let n;try{n=await g.invoke(`set_tool_disabled`,{names:t,disabled:e.enabled})}catch(e){if(!Ce(e,`set_tool_disabled`))throw e;for(let e of t)n=await g.invoke(`toggle_disabled_plugin_tool`,{name:e})}if(!n)throw Error(`tool toggle did not return an updated extension list`);Fe(n)}catch(e){let t=e instanceof Error?e.message:String(e);E(t)}finally{De(t=>{let n=new Set(t);return n.delete(e.id),n})}},[Fe]),Le=(0,D.useCallback)(async e=>{ke(t=>new Set(t).add(e.path)),E(null);try{let t=await g.invoke(`set_plugin_disabled`,{path:e.path,disabled:e.enabled});Fe(t)}catch(e){let t=e instanceof Error?e.message:String(e);E(t)}finally{ke(t=>{let n=new Set(t);return n.delete(e.path),n})}},[Fe]),Re=(0,D.useCallback)(async e=>{if(!Ae.has(e.key)){je(t=>new Set(t).add(e.key)),Ne(t=>{let n=new Map(t);return n.delete(e.key),n}),E(null);try{let t=await g.invoke(`uninstall_local_primitive`,{type:e.type,id:e.id,name:e.name,path:e.path});Ne(n=>{let r=new Map(n);return r.set(e.key,{status:`success`,message:t.message??`Uninstalled ${e.name??e.id??e.path}.`}),r}),await Q(!0)}catch(t){let n=t instanceof Error?t.message:String(t);Ne(t=>{let r=new Map(t);return r.set(e.key,{status:`failed`,message:n}),r}),E(n)}finally{je(t=>{let n=new Set(t);return n.delete(e.key),n})}}},[Ae,Q]),ze=(0,D.useCallback)(e=>{if(!e)return`never`;let t=Number(e),n=Number.isFinite(t)?new Date(t):new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleString()},[]);(0,D.useEffect)(()=>{let e=window.setTimeout(()=>{Q(!1)},0);return()=>window.clearTimeout(e)},[Q]),(0,D.useEffect)(()=>{if(i!==`Hooks`)return;let e=window.setTimeout(()=>{Pe(!1)},0);return()=>window.clearTimeout(e)},[i,Pe]);let Be=[`Rules`,`Hooks`,`Skills`,`Agents`,`Plugins`,`Tools`],Ve=(0,D.useMemo)(()=>{let e=M.map(e=>({id:e.id,type:`workflow`,name:e.name,instructions:e.instructions,path:e.path,scope:be(e.path,O)})),t=se.map(e=>({id:X(e.path).toLowerCase(),type:`skill`,name:e.name,description:e.description,instructions:e.instructions,path:e.path,scope:be(e.path,O)}));return[...e,...t].sort((e,t)=>e.name.localeCompare(t.name))},[se,M,O]),{projectRules:He,globalRules:Ue}=(0,D.useMemo)(()=>{let e=X(O),t=[],n=[];for(let r of A){let i=X(r.path);e&&i.startsWith(`${e}/`)&&i.includes(`/.clinerules/`)?t.push(r):n.push(r)}return{projectRules:t,globalRules:n}},[A,O]),{projectHooks:We,globalHooks:Ge}=(0,D.useMemo)(()=>{let e=X(O),t=[],n=[];for(let r of B){let i=X(r.path);e&&i.startsWith(`${e}/`)&&i.includes(`/.clinerules/hooks`)?t.push(r):n.push(r)}return{projectHooks:t,globalHooks:n}},[B,O]),{projectPlugins:Ke,globalPlugins:qe}=(0,D.useMemo)(()=>{let e=X(O),t=[],n=[];for(let r of le){let i=X(r.path);e&&i.startsWith(`${e}/`)&&i.includes(`/.cline/plugins`)?t.push(r):n.push(r)}return{projectPlugins:t,globalPlugins:n}},[le,O]),Je=(0,D.useMemo)(()=>R.filter(e=>e.source===`builtin`),[R]),Ye=(0,D.useMemo)(()=>R.filter(e=>e.source!==`builtin`),[R]),$=(0,D.useMemo)(()=>{let e=new Map;for(let t of Ye){let n=t.path??``,r=e.get(n)??[];r.push(t),e.set(n,r)}for(let t of e.values())t.sort((e,t)=>e.name.localeCompare(t.name));return e},[Ye]),Xe=(0,D.useMemo)(()=>[...qe.map(e=>({plugin:e,scope:`Global`})),...Ke.map(e=>({plugin:e,scope:`Project`}))],[qe,Ke]),Ze=(0,D.useMemo)(()=>[...Ue.map(e=>({rule:e,scope:`Global`})),...He.map(e=>({rule:e,scope:`Project`}))],[Ue,He]),Qe=(0,D.useMemo)(()=>[...Ge.map(e=>({hook:e,scope:`Global`})),...We.map(e=>({hook:e,scope:`Project`}))],[Ge,We]),$e=e=>{let t=Me.get(e);return t?(0,P.jsx)(`output`,{className:a(`text-xs`,t.status===`failed`?`text-destructive`:`text-muted-foreground`),children:t.message}):null},et=e=>{let t=Ae.has(e.key);return(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,P.jsx)(`div`,{className:`min-h-5 text-xs text-muted-foreground`,children:$e(e.key)}),(0,P.jsxs)(s,{disabled:t,onClick:()=>{Re(e)},type:`button`,variant:`destructive`,children:[t?(0,P.jsx)(ae,{}):(0,P.jsx)(r,{className:`size-4`}),t?`Uninstalling...`:`Uninstall`]})]})},tt=e=>{let t=Ae.has(e.key);return(0,P.jsxs)(C,{children:[(0,P.jsx)(ee,{render:(0,P.jsx)(s,{"aria-label":`More actions for ${e.name??`plugin`}`,className:`m-0 size-auto shrink-0 p-0 text-muted-foreground`,onClick:e=>e.stopPropagation(),size:`icon`,type:`button`,variant:`ghost`}),children:(0,P.jsx)(T,{className:`size-4`})}),(0,P.jsxs)(ie,{align:`end`,children:[(0,P.jsxs)(x,{onClick:()=>void navigator.clipboard.writeText(e.path??``),children:[(0,P.jsx)(l,{className:`size-4`}),`Copy path`]}),(0,P.jsxs)(x,{className:`text-destructive focus:text-destructive`,disabled:t,onClick:()=>void Re(e),children:[t?(0,P.jsx)(ae,{}):(0,P.jsx)(r,{className:`size-4`}),t?`Uninstalling...`:`Uninstall`]})]})]})},nt=e=>{let t=`${e.type}:${e.path}`;return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.type===`workflow`?(0,P.jsx)(c,{className:`h-4 w-4 shrink-0 text-primary`}):(0,P.jsx)(m,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:e.scope}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.type})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||ye(e.instructions)}),(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path}),(0,P.jsx)(`div`,{className:`mt-3`,children:et({key:t,type:e.type,id:e.id,name:e.name,path:e.path})})]},t)},rt=e=>(0,P.jsxs)(`div`,{className:`grid gap-1`,children:[(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description?.trim()||ye(e.instructions)}),(0,P.jsx)(`p`,{className:`text-xs font-mono text-muted-foreground`,children:e.path})]}),it=({plugin:e,scope:t})=>{let n=e.path,r=[{label:`Tools`,items:e.contributions?.tools??($.get(e.path)??[]).map(e=>e.name)},{label:`Skills`,items:e.contributions?.skills??[]},{label:`Rules`,items:e.contributions?.rules??[]},{label:`Hooks`,items:e.contributions?.hooks??[]},{label:`Commands`,items:e.contributions?.commands??[]},{label:`MCP servers`,items:e.contributions?.mcpServers??[]},{label:`Providers`,items:e.contributions?.providers??[]},{label:`Capabilities`,items:e.contributions?.capabilities??[]}].filter(e=>e.items.length>0);return(0,P.jsxs)(`details`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-3`,children:[(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:t}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},onClick:e=>e.stopPropagation(),disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`}),tt({key:n,type:`plugin`,id:e.name,name:e.name,path:e.path})]}),(0,P.jsxs)(`div`,{className:`mt-3`,children:[e.contributions?.inspectionStatus===`disabled`?(0,P.jsx)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:`Enable this plugin to inspect its dynamic contributions.`}):null,r.length>0?(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-2 text-xs font-medium text-foreground`,children:[(0,P.jsx)(`span`,{className:`mr-1`,children:`Contributions`}),r.map(e=>(0,P.jsxs)(w,{variant:`outline`,children:[e.label,` `,e.items.length]},e.label))]}),(0,P.jsx)(`div`,{className:`grid max-h-56 gap-3 overflow-y-auto pt-2 sm:grid-cols-2`,children:r.map(e=>(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.label}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.items.map(e=>(0,P.jsx)(w,{variant:`secondary`,children:e},e))})]},e.label))})]}):(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No plugin contributions found.`})]}),$e(n)?(0,P.jsx)(`div`,{className:`mt-3`,children:$e(n)}):null]},e.path)},at=e=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`}),tt({key:e.path,type:`plugin`,id:e.name,name:e.name,path:e.path})]}),ot=e=>{let t=[{label:`Tools`,items:e.contributions?.tools??($.get(e.path)??[]).map(e=>e.name)},{label:`Skills`,items:e.contributions?.skills??[]},{label:`Rules`,items:e.contributions?.rules??[]},{label:`Hooks`,items:e.contributions?.hooks??[]},{label:`Commands`,items:e.contributions?.commands??[]},{label:`MCP servers`,items:e.contributions?.mcpServers??[]},{label:`Providers`,items:e.contributions?.providers??[]},{label:`Capabilities`,items:e.contributions?.capabilities??[]}].filter(e=>e.items.length>0);return t.length===0?null:(0,P.jsx)(`div`,{className:`grid max-h-56 gap-3 overflow-y-auto sm:grid-cols-2`,children:t.map(e=>(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.label}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.items.map(e=>(0,P.jsx)(w,{variant:`secondary`,children:e},e))})]},e.label))})},st=e=>{let t=e.name;return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(_,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:`Global`}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.transportType}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.disabled?`Disabled`:`Enabled`})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.url??([e.command,...e.args??[]].filter(Boolean).join(` `)||`No launch command configured.`)}),H.settingsPath?(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:H.settingsPath}):null,(0,P.jsx)(`div`,{className:`mt-3`,children:et({key:t,type:`mcp`,id:e.name,name:e.name})})]},e.name)},ct=e=>(0,P.jsxs)(`div`,{className:`grid gap-1`,children:[(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.disabled?`Disabled`:`Enabled`,` locally`,e.transportType?` via ${e.transportType}`:``]}),H.settingsPath?(0,P.jsx)(`p`,{className:`text-xs font-mono text-muted-foreground`,children:H.settingsPath}):null]}),lt=e===`skill`?Ve.map(e=>({key:`${e.type}:${e.path}`,matchValues:xe(e.id,e.name,e.path),render:()=>nt(e),renderMatchedBadges:()=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z,{scope:e.scope}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.type})]}),renderMatchedDetails:()=>rt(e)})):e===`plugin`?Xe.map(e=>({key:e.plugin.path,matchValues:xe(e.plugin.name,e.plugin.path),render:()=>it(e),renderMatchedBadges:()=>(0,P.jsx)(Z,{scope:e.scope}),renderMatchedControls:()=>at(e.plugin),renderMatchedDetails:Object.values(e.plugin.contributions??{}).some(e=>e.length>0)||($.get(e.plugin.path)??[]).length>0?()=>ot(e.plugin):void 0})):e===`mcp`?H.servers.map(e=>({key:e.name,matchValues:xe(e.name),render:()=>st(e),renderMatchedBadges:()=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z,{scope:`Global`}),(0,P.jsx)(w,{variant:`outline`,className:`shrink-0 text-muted-foreground`,children:e.transportType})]}),renderMatchedDetails:()=>ct(e)})):null;return(0,P.jsxs)(ne,{children:[(0,P.jsx)(re,{description:fe[i],title:i,meta:(0,P.jsx)(te,{children:pe[i]}),actions:(0,P.jsx)(s,{variant:`outline`,size:`sm`,onClick:()=>{Q(!0),i===`Hooks`&&Pe(!0)},disabled:u,children:(0,P.jsx)(p,{className:a(`h-4 w-4`,u&&`animate-spin`)})})}),n?(0,P.jsx)(`div`,{className:`mb-6 flex items-center gap-0 border-b border-border`,children:Be.map(e=>(0,P.jsxs)(s,{variant:`ghost`,onClick:()=>o(e),className:a(`relative px-4 py-2.5 text-sm font-medium transition-colors`,i===e?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[e,i===e&&(0,P.jsx)(`span`,{className:`absolute inset-x-0 -bottom-px h-0.5 bg-foreground`})]},e))}):null,h&&(0,P.jsxs)(`div`,{className:`mb-4 rounded-lg border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive`,children:[`Failed to load configuration lists: `,h]}),W.length>0&&(0,P.jsxs)(`div`,{className:`mb-4 rounded-lg border border-yellow-500/40 bg-yellow-500/10 px-4 py-3 text-sm text-yellow-700 dark:text-yellow-300`,children:[(0,P.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 font-medium`,children:[(0,P.jsx)(oe,{className:`h-4 w-4`}),`Partial results`]}),(0,P.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:W.map(e=>(0,P.jsx)(`li`,{children:e},e))})]}),e?(0,P.jsx)(de,{chrome:`embedded`,installedItems:lt??void 0,onInstalledItemsChanged:()=>Q(!0),primitive:e}):null,i===`Rules`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Enabled rules discovered from configured workspace/global directories.`}),(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,P.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:`Installed`}),(0,P.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:Ze.length})]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ze.map(({rule:e,scope:t})=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-4 py-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(b,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,P.jsx)(`span`,{className:`flex-1 text-sm font-medium text-foreground`,children:e.name}),(0,P.jsx)(Z,{scope:t})]}),(0,P.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:ye(e.instructions)}),(0,P.jsx)(`p`,{className:`mt-1 text-xs font-mono text-muted-foreground`,children:e.path})]},e.path)),Ze.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No rules found.`})]})]})]}),i===`Hooks`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Hook config files from workspace and global hook directories.`}),we&&q&&(0,P.jsxs)(`p`,{className:`mb-4 text-xs text-muted-foreground`,children:[`Execution status is based on hook events in session`,` `,(0,P.jsx)(`span`,{className:`font-mono`,children:q}),`.`]}),(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,P.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:`Installed`}),(0,P.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:Qe.length})]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Qe.map(({hook:e,scope:t})=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-4 py-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(v,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,P.jsx)(`span`,{className:`flex-1 text-sm font-mono text-foreground`,children:e.fileName}),(0,P.jsx)(Z,{scope:t}),e.hookEventName&&(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`rounded border border-border px-2 py-0.5 text-xs text-muted-foreground`,children:e.hookEventName}),(()=>{let t=ue[e.hookEventName],n=(t?.count??0)>0;return(0,P.jsx)(`span`,{className:a(`rounded border px-2 py-0.5 text-xs`,n?`border-emerald-400/50 text-emerald-600 dark:text-emerald-400`:`border-border text-muted-foreground`),children:n?`${t?.count??0} executed`:`never executed`})})()]})]}),e.hookEventName?(0,P.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Last run:`,` `,ze(ue[e.hookEventName]?.lastTs??null)]}):null,(0,P.jsx)(`p`,{className:`mt-1 text-xs font-mono text-muted-foreground`,children:e.path})]},e.path)),Qe.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No hooks found.`})]})]})]}),i===`Skills`&&!e&&(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:[`Skills can be invoked in chat with`,` `,(0,P.jsx)(`code`,{className:`rounded bg-secondary px-1.5 py-0.5 text-xs font-mono text-foreground`,children:`/SKILL`}),`.`]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Ve.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.type===`workflow`?(0,P.jsx)(c,{className:`h-4 w-4 shrink-0 text-primary`}):(0,P.jsx)(m,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`rounded border border-border px-2 py-0.5 text-xs text-muted-foreground`,children:e.type})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||ye(e.instructions)}),(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path})]},`${e.type}:${e.path}`)),Ve.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No enabled skills or workflows found.`})]})]}),i===`Agents`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Configured agents discovered from Documents and settings directories.`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[ce.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(S,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:e.name})]}),(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path})]},e.path)),ce.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No configured agents found.`})]})]}),i===`Plugins`&&!e&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Plugins discovered from workspace and global plugin directories.`}),(0,P.jsxs)(`div`,{className:`mb-6`,children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Global Plugins`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[qe.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`})]}),(0,P.jsxs)(`div`,{className:`mt-3 ml-7 flex max-h-56 flex-col gap-2 overflow-y-auto`,children:[($.get(e.path)??[]).map(e=>(0,P.jsx)(`div`,{className:`flex items-center justify-between gap-4 rounded-md border border-border/70 px-3 py-2`,children:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:e.name}),(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`})]})},e.id)),($.get(e.path)?.length??0)===0&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No plugin tools found.`})]})]},e.path)),qe.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No global plugins found.`})]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Project Plugins`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Ke.map(e=>(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Le(e)},disabled:Oe.has(e.path),"aria-label":`Toggle ${e.name}`})]}),(0,P.jsxs)(`div`,{className:`mt-3 ml-7 flex max-h-56 flex-col gap-2 overflow-y-auto`,children:[($.get(e.path)??[]).map(e=>(0,P.jsx)(`div`,{className:`flex items-center justify-between gap-4 rounded-md border border-border/70 px-3 py-2`,children:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:e.name}),(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`})]})},e.id)),($.get(e.path)?.length??0)===0&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No plugin tools found.`})]})]},e.path)),Ke.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No project plugins found.`})]})]})]}),i===`Tools`&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`mb-6 text-sm leading-relaxed text-muted-foreground`,children:`Builtin tool groups and plugin-contributed tools available to the runtime.`}),(0,P.jsxs)(`div`,{className:`mb-6`,children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Builtin Tools`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Je.map(e=>(()=>{let t=Ee.has(e.id);return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(y,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Ie(e)},disabled:t,"aria-label":`Toggle ${e.name}`})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`}),!!e.headlessToolNames?.length&&(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.headlessToolNames.join(`, `)})]},e.id)})()),Je.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No builtin tools found.`})]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Plugin Tools`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[Ye.map(e=>(()=>{let t=Ee.has(e.id);return(0,P.jsxs)(`div`,{className:`rounded-lg border border-border px-5 py-4`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,P.jsx)(y,{className:`h-4 w-4 shrink-0 text-primary`}),(0,P.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e.name}),e.pluginName&&(0,P.jsxs)(`span`,{className:`rounded border border-border px-2 py-0.5 text-xs text-muted-foreground`,children:[`plugin: `,e.pluginName]}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.enabled?`Enabled`:`Disabled`}),(0,P.jsx)(d,{checked:e.enabled,onCheckedChange:()=>{Ie(e)},disabled:t,"aria-label":`Toggle ${e.name}`})]}),(0,P.jsx)(`p`,{className:`mt-2 ml-7 text-xs text-muted-foreground`,children:e.description?.trim()||`No description available.`}),e.path&&(0,P.jsx)(`p`,{className:`mt-1 ml-7 text-xs font-mono text-muted-foreground`,children:e.path})]},e.id)})()),Ye.length===0&&(0,P.jsx)(`p`,{className:`rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground`,children:`No plugin tools found.`})]})]})]})]})}export{we as CustomizationSectionView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./src-BY_WSiz7.js";import"./chunk-WYO6CB5R-Ht1kfqSA.js";import"./chunk-ICXQ74PX-BSKRMyFr.js";import"./chunk-HOUHSVGY-B04R_umg.js";import"./chunk-Q4XR5HBZ-DkRpWOkn.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-CR4zh_DV.js";import"./chunk-32BRIVSS-7roN4V45.js";import"./chunk-XXDRQBXY-DR-hrsFH.js";import"./chunk-VR4S4FIN-NuklvPa4.js";import"./chunk-C7G6YPKG-DBhUCKu7.js";import"./chunk-ZGVPDNZ5-CeJ5hUbe.js";import"./chunk-52WLFC77-DEfoFGdq.js";import"./chunk-FWX5IMBZ-DO4vTS0i.js";import"./chunk-ZIRB5QZD-O39ZBUk3.js";import{n as e}from"./chunk-PUDLZKDR-C6jX_SVA.js";export{e as diagram};
|