kennel 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/external.d.ts +1 -0
- package/dist/plugins/external.js +10 -3
- package/package.json +2 -2
- package/web/assets/{abnfDiagram-VRR7QNED-BHyQWgE7.js → abnfDiagram-VRR7QNED-1RdiIYIR.js} +1 -1
- package/web/assets/app-CEQAoxzL.js +2 -0
- package/web/assets/{app-options-CKc3uI_8.js → app-options-CIiczgaQ.js} +1 -1
- package/web/assets/app-view-header-CNImosi9.js +1 -0
- package/web/assets/{arc-iqMSyq0j.js → arc-DCuRiob1.js} +1 -1
- package/web/assets/{architectureDiagram-ZJ3FMSHR-icE1qR4S.js → architectureDiagram-ZJ3FMSHR-CAcGR7BC.js} +1 -1
- package/web/assets/{ask-tray-DYxvqV-2.js → ask-tray-DpWLca3e.js} +1 -1
- package/web/assets/{blockDiagram-677ZJIJ3-DvszZf5O.js → blockDiagram-677ZJIJ3-B404lYhT.js} +1 -1
- package/web/assets/{c4Diagram-LMCZKHZV-DKGTFJdP.js → c4Diagram-LMCZKHZV-m6CP9WKP.js} +1 -1
- package/web/assets/channel-CGNx58wi.js +1 -0
- package/web/assets/{check-Cfaum8KK.js → check-DjJ4znpk.js} +1 -1
- package/web/assets/{chevron-down-BX9NAmJK.js → chevron-down-CiyxliRS.js} +1 -1
- package/web/assets/{chevron-right-ztDuzaVJ.js → chevron-right-BaJja2sG.js} +1 -1
- package/web/assets/{chevron-up-DuJcPAvZ.js → chevron-up-Xv7ii00h.js} +1 -1
- package/web/assets/{chunk-2Q5K7J3B-DfHQU7-4.js → chunk-2Q5K7J3B-lofRULSz.js} +1 -1
- package/web/assets/{chunk-32BRIVSS-CGVIeMh2.js → chunk-32BRIVSS-BtdUGMBQ.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-YC-XnadT.js → chunk-5VM5RSS4-BBjGl_Dr.js} +1 -1
- package/web/assets/{chunk-EX3LRPZG-D9hAmjFx.js → chunk-EX3LRPZG-DM3Qu278.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-CZJ17mca.js → chunk-JWPE2WC7-Bp1ws-G7.js} +1 -1
- package/web/assets/{chunk-MOJQB5TN-6c2Jo2zi.js → chunk-MOJQB5TN-C7smXTrN.js} +1 -1
- package/web/assets/{chunk-RYQCIY6F-1Nn1hRKy.js → chunk-RYQCIY6F-DODJCmXB.js} +1 -1
- package/web/assets/{chunk-V7JOEXUC-D1yjMw1v.js → chunk-V7JOEXUC-C7fI1RPs.js} +1 -1
- package/web/assets/{chunk-VR4S4FIN-BEXJFqwW.js → chunk-VR4S4FIN-BkMRGbPv.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-B8VOyKvi.js → chunk-XXDRQBXY-DGKhiMOo.js} +1 -1
- package/web/assets/classDiagram-OUVF2IWQ-CepcbkQI.js +1 -0
- package/web/assets/classDiagram-v2-EOCWNBFH-CepcbkQI.js +1 -0
- package/web/assets/{client-BrGya3CX.js → client-Bs3Sdel1.js} +2 -2
- package/web/assets/{client-C7VkMvLG.js → client-Bz9gxOoP.js} +2 -2
- package/web/assets/{command-Y1kMd3Z_.js → command-B-4JoDzT.js} +1 -1
- package/web/assets/{copy-COuKJWiP.js → copy-DKl_cZLH.js} +1 -1
- package/web/assets/{copy-context-DGGuwV3t.js → copy-context-Bj8Sfpo7.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-DPz8lvQv.js → cose-bilkent-JH36ORCC-rQPbqPgO.js} +1 -1
- package/web/assets/{cynefin-VYW2F7L2-BFTKvFOB.js → cynefin-VYW2F7L2-Co86WDlY.js} +1 -1
- package/web/assets/{cynefinDiagram-TSTJHNR4-DMEVtV_N.js → cynefinDiagram-TSTJHNR4-C9V3Tu3i.js} +1 -1
- package/web/assets/{dagre-VKFMJZFB-DBfLDvQQ.js → dagre-VKFMJZFB-2FzdH1tO.js} +1 -1
- package/web/assets/{diagram-FQU43EPY-Hg6dezar.js → diagram-FQU43EPY-D8oGdGs0.js} +1 -1
- package/web/assets/{diagram-G47NLZAW-B3By8CC3.js → diagram-G47NLZAW-Bav2L_9E.js} +1 -1
- package/web/assets/{diagram-NH7WQ7WH-VX-G6EM9.js → diagram-NH7WQ7WH-CxOSrenv.js} +1 -1
- package/web/assets/{diagram-OA4YK3LP-BDqJrmLH.js → diagram-OA4YK3LP-Dapxn_y5.js} +1 -1
- package/web/assets/{diagram-WEI45ONY-E_AxKlsP.js → diagram-WEI45ONY-CGAvJVWu.js} +1 -1
- package/web/assets/{document-CPUr6Ihg.js → document-C4ERzZZ-.js} +3 -3
- package/web/assets/{ebnfDiagram-CCIWWBDH-GqIG7eta.js → ebnfDiagram-CCIWWBDH-CmJpnBTF.js} +1 -1
- package/web/assets/{ellipsis-D2HGbhJm.js → ellipsis-DIDqkP8k.js} +1 -1
- package/web/assets/{entities-CKW3uiVH.js → entities-Ba9UFGWQ.js} +1 -1
- package/web/assets/{erDiagram-Q63AITRT-dYQlw4qh.js → erDiagram-Q63AITRT-BeWglGbe.js} +1 -1
- package/web/assets/{file-text-DcPqwYq5.js → file-text-C3hyr-Ql.js} +1 -1
- package/web/assets/{file-viewer-7SOU9CiS.js → file-viewer-CYCdL53W.js} +1 -1
- package/web/assets/{flowDiagram-23GEKE2U-Pc0YdspI.js → flowDiagram-23GEKE2U-DQSrCvnP.js} +1 -1
- package/web/assets/folder-filter-bar-Bl30Jv6B.js +4 -0
- package/web/assets/folder-image-Cy-8Vgmd.js +1 -0
- package/web/assets/folder-landing-BiswmWY0.js +55 -0
- package/web/assets/{folder-list-F-yrc7-p.js → folder-list-BPufqaem.js} +1 -1
- package/web/assets/folder-mobile-bar-Dxsu-jUM.js +1 -0
- package/web/assets/{folder-open-DOYzvzsN.js → folder-open-CqSoJtKT.js} +1 -1
- package/web/assets/folder-plugin-view-DiZbM5qv.js +2 -0
- package/web/assets/{ganttDiagram-NO4QXBWP-DZJOsUZz.js → ganttDiagram-NO4QXBWP-BHGXM83R.js} +1 -1
- package/web/assets/{gitGraphDiagram-IHSO6WYX-CgLODdVy.js → gitGraphDiagram-IHSO6WYX-DHoetr2P.js} +1 -1
- package/web/assets/index-B6ap1Jz7.js +1 -0
- package/web/assets/{index-D4WzK5IV.js → index-BSHr1oc9.js} +1 -1
- package/web/assets/{index-DnD4X7zc.js → index-CHgBEfsO.js} +1 -1
- package/web/assets/{index-BjrX8Pf-.js → index-CKJsEQtp.js} +1 -1
- package/web/assets/index-DbD-bwdm.js +2 -0
- package/web/assets/index-wmrfz8OS.css +1 -0
- package/web/assets/{infoDiagram-FWYZ7A6U-DX-ufAQe.js → infoDiagram-FWYZ7A6U-09XQL5OF.js} +1 -1
- package/web/assets/{ishikawaDiagram-FXEZZL3T-CuwECnGF.js → ishikawaDiagram-FXEZZL3T-zdZcsCSy.js} +1 -1
- package/web/assets/{journeyDiagram-5HDEW3XC-2zmihEh6.js → journeyDiagram-5HDEW3XC-Cyviy-mf.js} +1 -1
- package/web/assets/{kanban-definition-HUTT4EX6-BdQsyGLl.js → kanban-definition-HUTT4EX6-BEOdHBFJ.js} +1 -1
- package/web/assets/{linear-B-kLzgKS.js → linear-B0Elyctv.js} +1 -1
- package/web/assets/{mermaid.core-aYzB5any.js → mermaid.core-BEwF5fZo.js} +4 -4
- package/web/assets/{metadata-Clyy4qXZ.js → metadata-Dy1R-He2.js} +1 -1
- package/web/assets/{mindmap-definition-LN4V7U3C-BNBOyFsl.js → mindmap-definition-LN4V7U3C-DW5Nc3Z2.js} +1 -1
- package/web/assets/{pegDiagram-2B236MQR-BAvwpPbi.js → pegDiagram-2B236MQR-Cj3gTzwg.js} +1 -1
- package/web/assets/{pieDiagram-ENE6RG2P-BXCS7abV.js → pieDiagram-ENE6RG2P-DxF16ujD.js} +1 -1
- package/web/assets/plugin-host-modules-C_FG5LYc.js +10 -0
- package/web/assets/{plus-B3J-m78K.js → plus-TM7voyHO.js} +1 -1
- package/web/assets/popover-DvKy7gF6.js +9 -0
- package/web/assets/{project-search-dialog-B56ZSDPJ.js → project-search-dialog-Bm4cKotY.js} +1 -1
- package/web/assets/{quadrantDiagram-ABIIQ3AL-Coo6fFHf.js → quadrantDiagram-ABIIQ3AL-D6lKmduJ.js} +1 -1
- package/web/assets/{railroadDiagram-RFXS5EU6-BaNxlV1J.js → railroadDiagram-RFXS5EU6-CNMzdL0J.js} +1 -1
- package/web/assets/{requirementDiagram-TGXJPOKE-LMF4IfnZ.js → requirementDiagram-TGXJPOKE-DCWUvc_i.js} +1 -1
- package/web/assets/{sankeyDiagram-HTMAVEWB-C-yWLNPa.js → sankeyDiagram-HTMAVEWB-CQ4kDW3E.js} +1 -1
- package/web/assets/{search-DImG1V67.js → search-Cv1HqxUc.js} +1 -1
- package/web/assets/{search-BPF3ARQ9.js → search-Cx23EFPc.js} +1 -1
- package/web/assets/{selection-popup-B_zAXt8R.js → selection-popup-DPC2dc_s.js} +3 -3
- package/web/assets/{sequenceDiagram-DBY2YBRQ-DeHqYdg4.js → sequenceDiagram-DBY2YBRQ-C-ygrC5m.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-D2CDPOxg.js → sizeCapture-X5ZJPWSS-CWCSfdrg.js} +1 -1
- package/web/assets/{stateDiagram-2N3HPSRC-CNIYaeQH.js → stateDiagram-2N3HPSRC-BUJ8nxcE.js} +1 -1
- package/web/assets/stateDiagram-v2-6OUMAXLB-DgubHPLq.js +1 -0
- package/web/assets/{swimlanes-5IMT3BWC-CDsDmFBa.js → swimlanes-5IMT3BWC-rw0Loza_.js} +2 -2
- package/web/assets/swimlanesDiagram-G3AALYLV-CxNu_14L.js +8 -0
- package/web/assets/{timeline-definition-FHXFAJF6-C5ZIg5nr.js → timeline-definition-FHXFAJF6-D3kXwv5v.js} +1 -1
- package/web/assets/{vennDiagram-L72KCM5P-D6pkrFwZ.js → vennDiagram-L72KCM5P-DZhfR6LC.js} +1 -1
- package/web/assets/{view-context-DKIrg--H.js → view-context-DyuiMZAo.js} +3 -3
- package/web/assets/{viewer-capabilities-1a6IsY4l.js → viewer-capabilities-BkBR084B.js} +1 -1
- package/web/assets/{wardleyDiagram-EHGQE667-Yf1WJw-3.js → wardleyDiagram-EHGQE667-CzwAW4nO.js} +1 -1
- package/web/assets/{x-BZE9W34m.js → x-GGS-h4Nm.js} +1 -1
- package/web/assets/{xychartDiagram-FW5EYKEG-Ds8KCXv_.js → xychartDiagram-FW5EYKEG-CebaePFD.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/app-B0JvGgzJ.js +0 -2
- package/web/assets/app-view-header-O3qQjBZc.js +0 -1
- package/web/assets/channel-Dl1wIhHR.js +0 -1
- package/web/assets/classDiagram-OUVF2IWQ-B1y0va4e.js +0 -1
- package/web/assets/classDiagram-v2-EOCWNBFH-B1y0va4e.js +0 -1
- package/web/assets/folder-DTZcp2A6.js +0 -1
- package/web/assets/folder-filter-bar-B-i-4rbo.js +0 -4
- package/web/assets/folder-image-DU_poo8q.js +0 -1
- package/web/assets/folder-landing-UVkNL9G8.js +0 -55
- package/web/assets/folder-mobile-bar-DJPrKpxo.js +0 -1
- package/web/assets/folder-plugin-view-BT7to93n.js +0 -2
- package/web/assets/index-B9Ju-85a.js +0 -2
- package/web/assets/index-BFd02VlT.js +0 -1
- package/web/assets/index-BpMdYK6_.js +0 -1
- package/web/assets/index-uY9jLiL5.css +0 -1
- package/web/assets/plugin-host-modules-DEtx9Hq7.js +0 -10
- package/web/assets/popover-1LXR77r7.js +0 -9
- package/web/assets/stateDiagram-v2-6OUMAXLB-Kn8FnYqS.js +0 -1
- package/web/assets/swimlanesDiagram-G3AALYLV-FhTXuqD7.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as ut}from"./index-B9Ju-85a.js";var fk=Object.create,Lu=Object.defineProperty,dk=Object.getOwnPropertyDescriptor,vh=Object.getOwnPropertyNames,pk=Object.getPrototypeOf,mk=Object.prototype.hasOwnProperty,s=(t,e)=>Lu(t,"name",{value:e,configurable:!0}),hk=(t,e)=>function(){return t&&(e=(0,t[vh(t)[0]])(t=0)),e},X=(t,e)=>function(){return e||(0,t[vh(t)[0]])((e={exports:{}}).exports,e),e.exports},en=(t,e)=>{for(var r in e)Lu(t,r,{get:e[r],enumerable:!0})},Th=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vh(e))!mk.call(t,a)&&a!==r&&Lu(t,a,{get:()=>e[a],enumerable:!(n=dk(e,a))||n.enumerable});return t},kf=(t,e,r)=>(Th(t,e,"default"),r),$h=(t,e,r)=>(r=t!=null?fk(pk(t)):{},Th(Lu(r,"default",{value:t,enumerable:!0}),t)),Rh=t=>Th(Lu({},"__esModule",{value:!0}),t),Of={};en(Of,{AnnotatedTextEdit:()=>Ar,ChangeAnnotation:()=>pn,ChangeAnnotationIdentifier:()=>et,CodeAction:()=>Zp,CodeActionContext:()=>Jp,CodeActionKind:()=>Xp,CodeActionTriggerKind:()=>Yl,CodeDescription:()=>wp,CodeLens:()=>Qp,Color:()=>Ac,ColorInformation:()=>Ap,ColorPresentation:()=>Ep,Command:()=>dn,CompletionItem:()=>Gp,CompletionItemKind:()=>kp,CompletionItemLabelDetails:()=>Mp,CompletionItemTag:()=>Lp,CompletionList:()=>Fp,CreateFile:()=>Ca,DeleteFile:()=>Sa,Diagnostic:()=>Wl,DiagnosticRelatedInformation:()=>Ec,DiagnosticSeverity:()=>_p,DiagnosticTag:()=>Sp,DocumentHighlight:()=>Kp,DocumentHighlightKind:()=>Up,DocumentLink:()=>tm,DocumentSymbol:()=>Yp,DocumentUri:()=>Tp,EOL:()=>x$,FoldingRange:()=>Cp,FoldingRangeKind:()=>bp,FormattingOptions:()=>em,Hover:()=>zp,InlayHint:()=>cm,InlayHintKind:()=>_c,InlayHintLabelPart:()=>Sc,InlineCompletionContext:()=>ym,InlineCompletionItem:()=>dm,InlineCompletionList:()=>pm,InlineCompletionTriggerKind:()=>mm,InlineValueContext:()=>um,InlineValueEvaluatableExpression:()=>lm,InlineValueText:()=>sm,InlineValueVariableLookup:()=>om,InsertReplaceEdit:()=>Dp,InsertTextFormat:()=>Op,InsertTextMode:()=>xp,Location:()=>Kl,LocationLink:()=>Rp,MarkedString:()=>Hl,MarkupContent:()=>wa,MarkupKind:()=>Cc,OptionalVersionedTextDocumentIdentifier:()=>ql,ParameterInformation:()=>jp,Position:()=>oe,Range:()=>te,RenameFile:()=>_a,SelectedCompletionInfo:()=>hm,SelectionRange:()=>rm,SemanticTokenModifiers:()=>am,SemanticTokenTypes:()=>nm,SemanticTokens:()=>im,SignatureInformation:()=>Bp,StringValue:()=>fm,SymbolInformation:()=>qp,SymbolKind:()=>Wp,SymbolTag:()=>Vp,TextDocument:()=>vm,TextDocumentEdit:()=>Vl,TextDocumentIdentifier:()=>Ip,TextDocumentItem:()=>Pp,TextEdit:()=>ar,URI:()=>Rc,VersionedTextDocumentIdentifier:()=>Np,WorkspaceChange:()=>D$,WorkspaceEdit:()=>bc,WorkspaceFolder:()=>gm,WorkspaceSymbol:()=>Hp,integer:()=>$p,uinteger:()=>Ul});var Tp,Rc,$p,Ul,oe,te,Kl,Rp,Ac,Ap,Ep,bp,Cp,Ec,_p,Sp,wp,Wl,dn,ar,pn,et,Ar,Vl,Ca,_a,Sa,bc,Pl,Bd,D$,Ip,Np,ql,Pp,Cc,wa,kp,Op,Lp,Dp,xp,Mp,Gp,Fp,Hl,zp,jp,Bp,Up,Kp,Wp,Vp,qp,Hp,Yp,Xp,Yl,Jp,Zp,Qp,em,tm,rm,nm,am,im,sm,om,lm,um,_c,Sc,cm,fm,dm,pm,mm,hm,ym,gm,x$,vm,av,E,Du=hk({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Tp||(Tp={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Rc||(Rc={})),(function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})($p||($p={})),(function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(Ul||(Ul={})),(function(a){function i(u,l){return u===Number.MAX_VALUE&&(u=Ul.MAX_VALUE),l===Number.MAX_VALUE&&(l=Ul.MAX_VALUE),{line:u,character:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&E.uinteger(l.line)&&E.uinteger(l.character)}s(o,"is"),a.is=o})(oe||(oe={})),(function(a){function i(u,l,c,f){if(E.uinteger(u)&&E.uinteger(l)&&E.uinteger(c)&&E.uinteger(f))return{start:oe.create(u,l),end:oe.create(c,f)};if(oe.is(u)&&oe.is(l))return{start:u,end:l};throw new Error(`Range#create called with invalid arguments[${u}, ${l}, ${c}, ${f}]`)}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&oe.is(l.start)&&oe.is(l.end)}s(o,"is"),a.is=o})(te||(te={})),(function(a){function i(u,l){return{uri:u,range:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&te.is(l.range)&&(E.string(l.uri)||E.undefined(l.uri))}s(o,"is"),a.is=o})(Kl||(Kl={})),(function(a){function i(u,l,c,f){return{targetUri:u,targetRange:l,targetSelectionRange:c,originSelectionRange:f}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&te.is(l.targetRange)&&E.string(l.targetUri)&&te.is(l.targetSelectionRange)&&(te.is(l.originSelectionRange)||E.undefined(l.originSelectionRange))}s(o,"is"),a.is=o})(Rp||(Rp={})),(function(a){function i(u,l,c,f){return{red:u,green:l,blue:c,alpha:f}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.numberRange(l.red,0,1)&&E.numberRange(l.green,0,1)&&E.numberRange(l.blue,0,1)&&E.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o})(Ac||(Ac={})),(function(a){function i(u,l){return{range:u,color:l}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&te.is(l.range)&&Ac.is(l.color)}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(u,l,c){return{label:u,textEdit:l,additionalTextEdits:c}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.string(l.label)&&(E.undefined(l.textEdit)||ar.is(l))&&(E.undefined(l.additionalTextEdits)||E.typedArray(l.additionalTextEdits,ar.is))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(bp||(bp={})),(function(a){function i(u,l,c,f,d,p){const y={startLine:u,endLine:l};return E.defined(c)&&(y.startCharacter=c),E.defined(f)&&(y.endCharacter=f),E.defined(d)&&(y.kind=d),E.defined(p)&&(y.collapsedText=p),y}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.uinteger(l.startLine)&&E.uinteger(l.startLine)&&(E.undefined(l.startCharacter)||E.uinteger(l.startCharacter))&&(E.undefined(l.endCharacter)||E.uinteger(l.endCharacter))&&(E.undefined(l.kind)||E.string(l.kind))}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(u,l){return{location:u,message:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&Kl.is(l.location)&&E.string(l.message)}s(o,"is"),a.is=o})(Ec||(Ec={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(_p||(_p={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Sp||(Sp={})),(function(a){function i(o){const u=o;return E.objectLiteral(u)&&E.string(u.href)}s(i,"is"),a.is=i})(wp||(wp={})),(function(a){function i(u,l,c,f,d,p){let y={range:u,message:l};return E.defined(c)&&(y.severity=c),E.defined(f)&&(y.code=f),E.defined(d)&&(y.source=d),E.defined(p)&&(y.relatedInformation=p),y}s(i,"create"),a.create=i;function o(u){var l;let c=u;return E.defined(c)&&te.is(c.range)&&E.string(c.message)&&(E.number(c.severity)||E.undefined(c.severity))&&(E.integer(c.code)||E.string(c.code)||E.undefined(c.code))&&(E.undefined(c.codeDescription)||E.string((l=c.codeDescription)===null||l===void 0?void 0:l.href))&&(E.string(c.source)||E.undefined(c.source))&&(E.undefined(c.relatedInformation)||E.typedArray(c.relatedInformation,Ec.is))}s(o,"is"),a.is=o})(Wl||(Wl={})),(function(a){function i(u,l,...c){let f={title:u,command:l};return E.defined(c)&&c.length>0&&(f.arguments=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.title)&&E.string(l.command)}s(o,"is"),a.is=o})(dn||(dn={})),(function(a){function i(c,f){return{range:c,newText:f}}s(i,"replace"),a.replace=i;function o(c,f){return{range:{start:c,end:c},newText:f}}s(o,"insert"),a.insert=o;function u(c){return{range:c,newText:""}}s(u,"del"),a.del=u;function l(c){const f=c;return E.objectLiteral(f)&&E.string(f.newText)&&te.is(f.range)}s(l,"is"),a.is=l})(ar||(ar={})),(function(a){function i(u,l,c){const f={label:u};return l!==void 0&&(f.needsConfirmation=l),c!==void 0&&(f.description=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.string(l.label)&&(E.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(E.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o})(pn||(pn={})),(function(a){function i(o){const u=o;return E.string(u)}s(i,"is"),a.is=i})(et||(et={})),(function(a){function i(c,f,d){return{range:c,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(c,f,d){return{range:{start:c,end:c},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function u(c,f){return{range:c,newText:"",annotationId:f}}s(u,"del"),a.del=u;function l(c){const f=c;return ar.is(f)&&(pn.is(f.annotationId)||et.is(f.annotationId))}s(l,"is"),a.is=l})(Ar||(Ar={})),(function(a){function i(u,l){return{textDocument:u,edits:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&ql.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(Vl||(Vl={})),(function(a){function i(u,l,c){let f={kind:"create",uri:u};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="create"&&E.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o})(Ca||(Ca={})),(function(a){function i(u,l,c,f){let d={kind:"rename",oldUri:u,newUri:l};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(d.options=c),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="rename"&&E.string(l.oldUri)&&E.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o})(_a||(_a={})),(function(a){function i(u,l,c){let f={kind:"delete",uri:u};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="delete"&&E.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||E.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||E.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o})(Sa||(Sa={})),(function(a){function i(o){let u=o;return u&&(u.changes!==void 0||u.documentChanges!==void 0)&&(u.documentChanges===void 0||u.documentChanges.every(l=>E.string(l.kind)?Ca.is(l)||_a.is(l)||Sa.is(l):Vl.is(l)))}s(i,"is"),a.is=i})(bc||(bc={})),Pl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,u){let l,c;if(u===void 0?l=ar.insert(i,o):et.is(u)?(c=u,l=Ar.insert(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.insert(i,o,c)),this.edits.push(l),c!==void 0)return c}replace(i,o,u){let l,c;if(u===void 0?l=ar.replace(i,o):et.is(u)?(c=u,l=Ar.replace(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.replace(i,o,c)),this.edits.push(l),c!==void 0)return c}delete(i,o){let u,l;if(o===void 0?u=ar.del(i):et.is(o)?(l=o,u=Ar.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),u=Ar.del(i,l)),this.edits.push(u),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Bd=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let u;if(et.is(i)?u=i:(u=this.nextId(),o=i),this._annotations[u]!==void 0)throw new Error(`Id ${u} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${u}`);return this._annotations[u]=o,this._size++,u}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),D$=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Bd(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(Vl.is(o)){const u=new Pl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=u}})):i.changes&&Object.keys(i.changes).forEach(o=>{const u=new Pl(i.changes[o]);this._textEditChanges[o]=u})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(ql.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let u=this._textEditChanges[o.uri];if(!u){const l=[],c={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(c),u=new Pl(l,this._changeAnnotations),this._textEditChanges[o.uri]=u}return u}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let u=[];this._workspaceEdit.changes[i]=u,o=new Pl(u),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Bd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;pn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=Ca.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=Ca.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}renameFile(i,o,u,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let c;pn.is(u)||et.is(u)?c=u:l=u;let f,d;if(c===void 0?f=_a.create(i,o,l):(d=et.is(c)?c:this._changeAnnotations.manage(c),f=_a.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;pn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=Sa.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=Sa.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(u){return{uri:u}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)}s(o,"is"),a.is=o})(Ip||(Ip={})),(function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)&&E.integer(l.version)}s(o,"is"),a.is=o})(Np||(Np={})),(function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)&&(l.version===null||E.integer(l.version))}s(o,"is"),a.is=o})(ql||(ql={})),(function(a){function i(u,l,c,f){return{uri:u,languageId:l,version:c,text:f}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)&&E.string(l.languageId)&&E.integer(l.version)&&E.string(l.text)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const u=o;return u===a.PlainText||u===a.Markdown}s(i,"is"),a.is=i})(Cc||(Cc={})),(function(a){function i(o){const u=o;return E.objectLiteral(o)&&Cc.is(u.kind)&&E.string(u.value)}s(i,"is"),a.is=i})(wa||(wa={})),(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(kp||(kp={})),(function(a){a.PlainText=1,a.Snippet=2})(Op||(Op={})),(function(a){a.Deprecated=1})(Lp||(Lp={})),(function(a){function i(u,l,c){return{newText:u,insert:l,replace:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l&&E.string(l.newText)&&te.is(l.insert)&&te.is(l.replace)}s(o,"is"),a.is=o})(Dp||(Dp={})),(function(a){a.asIs=1,a.adjustIndentation=2})(xp||(xp={})),(function(a){function i(o){const u=o;return u&&(E.string(u.detail)||u.detail===void 0)&&(E.string(u.description)||u.description===void 0)}s(i,"is"),a.is=i})(Mp||(Mp={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(Gp||(Gp={})),(function(a){function i(o,u){return{items:o||[],isIncomplete:!!u}}s(i,"create"),a.create=i})(Fp||(Fp={})),(function(a){function i(u){return u.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(u){const l=u;return E.string(l)||E.objectLiteral(l)&&E.string(l.language)&&E.string(l.value)}s(o,"is"),a.is=o})(Hl||(Hl={})),(function(a){function i(o){let u=o;return!!u&&E.objectLiteral(u)&&(wa.is(u.contents)||Hl.is(u.contents)||E.typedArray(u.contents,Hl.is))&&(o.range===void 0||te.is(o.range))}s(i,"is"),a.is=i})(zp||(zp={})),(function(a){function i(o,u){return u?{label:o,documentation:u}:{label:o}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o,u,...l){let c={label:o};return E.defined(u)&&(c.documentation=u),E.defined(l)?c.parameters=l:c.parameters=[],c}s(i,"create"),a.create=i})(Bp||(Bp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(Up||(Up={})),(function(a){function i(o,u){let l={range:o};return E.number(u)&&(l.kind=u),l}s(i,"create"),a.create=i})(Kp||(Kp={})),(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(Wp||(Wp={})),(function(a){a.Deprecated=1})(Vp||(Vp={})),(function(a){function i(o,u,l,c,f){let d={name:o,kind:u,location:{uri:c,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(qp||(qp={})),(function(a){function i(o,u,l,c){return c!==void 0?{name:o,kind:u,location:{uri:l,range:c}}:{name:o,kind:u,location:{uri:l}}}s(i,"create"),a.create=i})(Hp||(Hp={})),(function(a){function i(u,l,c,f,d,p){let y={name:u,detail:l,kind:c,range:f,selectionRange:d};return p!==void 0&&(y.children=p),y}s(i,"create"),a.create=i;function o(u){let l=u;return l&&E.string(l.name)&&E.number(l.kind)&&te.is(l.range)&&te.is(l.selectionRange)&&(l.detail===void 0||E.string(l.detail))&&(l.deprecated===void 0||E.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o})(Yp||(Yp={})),(function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"})(Xp||(Xp={})),(function(a){a.Invoked=1,a.Automatic=2})(Yl||(Yl={})),(function(a){function i(u,l,c){let f={diagnostics:u};return l!=null&&(f.only=l),c!=null&&(f.triggerKind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.typedArray(l.diagnostics,Wl.is)&&(l.only===void 0||E.typedArray(l.only,E.string))&&(l.triggerKind===void 0||l.triggerKind===Yl.Invoked||l.triggerKind===Yl.Automatic)}s(o,"is"),a.is=o})(Jp||(Jp={})),(function(a){function i(u,l,c){let f={title:u},d=!0;return typeof l=="string"?(d=!1,f.kind=l):dn.is(l)?f.command=l:f.edit=l,d&&c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&E.string(l.title)&&(l.diagnostics===void 0||E.typedArray(l.diagnostics,Wl.is))&&(l.kind===void 0||E.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||dn.is(l.command))&&(l.isPreferred===void 0||E.boolean(l.isPreferred))&&(l.edit===void 0||bc.is(l.edit))}s(o,"is"),a.is=o})(Zp||(Zp={})),(function(a){function i(u,l){let c={range:u};return E.defined(l)&&(c.data=l),c}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&te.is(l.range)&&(E.undefined(l.command)||dn.is(l.command))}s(o,"is"),a.is=o})(Qp||(Qp={})),(function(a){function i(u,l){return{tabSize:u,insertSpaces:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.uinteger(l.tabSize)&&E.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(em||(em={})),(function(a){function i(u,l,c){return{range:u,target:l,data:c}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&te.is(l.range)&&(E.undefined(l.target)||E.string(l.target))}s(o,"is"),a.is=o})(tm||(tm={})),(function(a){function i(u,l){return{range:u,parent:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&te.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(rm||(rm={})),(function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"})(nm||(nm={})),(function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"})(am||(am={})),(function(a){function i(o){const u=o;return E.objectLiteral(u)&&(u.resultId===void 0||typeof u.resultId=="string")&&Array.isArray(u.data)&&(u.data.length===0||typeof u.data[0]=="number")}s(i,"is"),a.is=i})(im||(im={})),(function(a){function i(u,l){return{range:u,text:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&E.string(l.text)}s(o,"is"),a.is=o})(sm||(sm={})),(function(a){function i(u,l,c){return{range:u,variableName:l,caseSensitiveLookup:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&E.boolean(l.caseSensitiveLookup)&&(E.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(om||(om={})),(function(a){function i(u,l){return{range:u,expression:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&(E.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(lm||(lm={})),(function(a){function i(u,l){return{frameId:u,stoppedLocation:l}}s(i,"create"),a.create=i;function o(u){const l=u;return E.defined(l)&&te.is(u.stoppedLocation)}s(o,"is"),a.is=o})(um||(um={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(_c||(_c={})),(function(a){function i(u){return{value:u}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&(l.tooltip===void 0||E.string(l.tooltip)||wa.is(l.tooltip))&&(l.location===void 0||Kl.is(l.location))&&(l.command===void 0||dn.is(l.command))}s(o,"is"),a.is=o})(Sc||(Sc={})),(function(a){function i(u,l,c){const f={position:u,label:l};return c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&oe.is(l.position)&&(E.string(l.label)||E.typedArray(l.label,Sc.is))&&(l.kind===void 0||_c.is(l.kind))&&l.textEdits===void 0||E.typedArray(l.textEdits,ar.is)&&(l.tooltip===void 0||E.string(l.tooltip)||wa.is(l.tooltip))&&(l.paddingLeft===void 0||E.boolean(l.paddingLeft))&&(l.paddingRight===void 0||E.boolean(l.paddingRight))}s(o,"is"),a.is=o})(cm||(cm={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(fm||(fm={})),(function(a){function i(o,u,l,c){return{insertText:o,filterText:u,range:l,command:c}}s(i,"create"),a.create=i})(dm||(dm={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(pm||(pm={})),(function(a){a.Invoked=0,a.Automatic=1})(mm||(mm={})),(function(a){function i(o,u){return{range:o,text:u}}s(i,"create"),a.create=i})(hm||(hm={})),(function(a){function i(o,u){return{triggerKind:o,selectedCompletionInfo:u}}s(i,"create"),a.create=i})(ym||(ym={})),(function(a){function i(o){const u=o;return E.objectLiteral(u)&&Rc.is(u.uri)&&E.string(u.name)}s(i,"is"),a.is=i})(gm||(gm={})),x$=[`
|
|
1
|
+
import{_ as ut}from"./index-DbD-bwdm.js";var fk=Object.create,Lu=Object.defineProperty,dk=Object.getOwnPropertyDescriptor,vh=Object.getOwnPropertyNames,pk=Object.getPrototypeOf,mk=Object.prototype.hasOwnProperty,s=(t,e)=>Lu(t,"name",{value:e,configurable:!0}),hk=(t,e)=>function(){return t&&(e=(0,t[vh(t)[0]])(t=0)),e},X=(t,e)=>function(){return e||(0,t[vh(t)[0]])((e={exports:{}}).exports,e),e.exports},en=(t,e)=>{for(var r in e)Lu(t,r,{get:e[r],enumerable:!0})},Th=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vh(e))!mk.call(t,a)&&a!==r&&Lu(t,a,{get:()=>e[a],enumerable:!(n=dk(e,a))||n.enumerable});return t},kf=(t,e,r)=>(Th(t,e,"default"),r),$h=(t,e,r)=>(r=t!=null?fk(pk(t)):{},Th(Lu(r,"default",{value:t,enumerable:!0}),t)),Rh=t=>Th(Lu({},"__esModule",{value:!0}),t),Of={};en(Of,{AnnotatedTextEdit:()=>Ar,ChangeAnnotation:()=>pn,ChangeAnnotationIdentifier:()=>et,CodeAction:()=>Zp,CodeActionContext:()=>Jp,CodeActionKind:()=>Xp,CodeActionTriggerKind:()=>Yl,CodeDescription:()=>wp,CodeLens:()=>Qp,Color:()=>Ac,ColorInformation:()=>Ap,ColorPresentation:()=>Ep,Command:()=>dn,CompletionItem:()=>Gp,CompletionItemKind:()=>kp,CompletionItemLabelDetails:()=>Mp,CompletionItemTag:()=>Lp,CompletionList:()=>Fp,CreateFile:()=>Ca,DeleteFile:()=>Sa,Diagnostic:()=>Wl,DiagnosticRelatedInformation:()=>Ec,DiagnosticSeverity:()=>_p,DiagnosticTag:()=>Sp,DocumentHighlight:()=>Kp,DocumentHighlightKind:()=>Up,DocumentLink:()=>tm,DocumentSymbol:()=>Yp,DocumentUri:()=>Tp,EOL:()=>x$,FoldingRange:()=>Cp,FoldingRangeKind:()=>bp,FormattingOptions:()=>em,Hover:()=>zp,InlayHint:()=>cm,InlayHintKind:()=>_c,InlayHintLabelPart:()=>Sc,InlineCompletionContext:()=>ym,InlineCompletionItem:()=>dm,InlineCompletionList:()=>pm,InlineCompletionTriggerKind:()=>mm,InlineValueContext:()=>um,InlineValueEvaluatableExpression:()=>lm,InlineValueText:()=>sm,InlineValueVariableLookup:()=>om,InsertReplaceEdit:()=>Dp,InsertTextFormat:()=>Op,InsertTextMode:()=>xp,Location:()=>Kl,LocationLink:()=>Rp,MarkedString:()=>Hl,MarkupContent:()=>wa,MarkupKind:()=>Cc,OptionalVersionedTextDocumentIdentifier:()=>ql,ParameterInformation:()=>jp,Position:()=>oe,Range:()=>te,RenameFile:()=>_a,SelectedCompletionInfo:()=>hm,SelectionRange:()=>rm,SemanticTokenModifiers:()=>am,SemanticTokenTypes:()=>nm,SemanticTokens:()=>im,SignatureInformation:()=>Bp,StringValue:()=>fm,SymbolInformation:()=>qp,SymbolKind:()=>Wp,SymbolTag:()=>Vp,TextDocument:()=>vm,TextDocumentEdit:()=>Vl,TextDocumentIdentifier:()=>Ip,TextDocumentItem:()=>Pp,TextEdit:()=>ar,URI:()=>Rc,VersionedTextDocumentIdentifier:()=>Np,WorkspaceChange:()=>D$,WorkspaceEdit:()=>bc,WorkspaceFolder:()=>gm,WorkspaceSymbol:()=>Hp,integer:()=>$p,uinteger:()=>Ul});var Tp,Rc,$p,Ul,oe,te,Kl,Rp,Ac,Ap,Ep,bp,Cp,Ec,_p,Sp,wp,Wl,dn,ar,pn,et,Ar,Vl,Ca,_a,Sa,bc,Pl,Bd,D$,Ip,Np,ql,Pp,Cc,wa,kp,Op,Lp,Dp,xp,Mp,Gp,Fp,Hl,zp,jp,Bp,Up,Kp,Wp,Vp,qp,Hp,Yp,Xp,Yl,Jp,Zp,Qp,em,tm,rm,nm,am,im,sm,om,lm,um,_c,Sc,cm,fm,dm,pm,mm,hm,ym,gm,x$,vm,av,E,Du=hk({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Tp||(Tp={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Rc||(Rc={})),(function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})($p||($p={})),(function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(Ul||(Ul={})),(function(a){function i(u,l){return u===Number.MAX_VALUE&&(u=Ul.MAX_VALUE),l===Number.MAX_VALUE&&(l=Ul.MAX_VALUE),{line:u,character:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&E.uinteger(l.line)&&E.uinteger(l.character)}s(o,"is"),a.is=o})(oe||(oe={})),(function(a){function i(u,l,c,f){if(E.uinteger(u)&&E.uinteger(l)&&E.uinteger(c)&&E.uinteger(f))return{start:oe.create(u,l),end:oe.create(c,f)};if(oe.is(u)&&oe.is(l))return{start:u,end:l};throw new Error(`Range#create called with invalid arguments[${u}, ${l}, ${c}, ${f}]`)}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&oe.is(l.start)&&oe.is(l.end)}s(o,"is"),a.is=o})(te||(te={})),(function(a){function i(u,l){return{uri:u,range:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&te.is(l.range)&&(E.string(l.uri)||E.undefined(l.uri))}s(o,"is"),a.is=o})(Kl||(Kl={})),(function(a){function i(u,l,c,f){return{targetUri:u,targetRange:l,targetSelectionRange:c,originSelectionRange:f}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&te.is(l.targetRange)&&E.string(l.targetUri)&&te.is(l.targetSelectionRange)&&(te.is(l.originSelectionRange)||E.undefined(l.originSelectionRange))}s(o,"is"),a.is=o})(Rp||(Rp={})),(function(a){function i(u,l,c,f){return{red:u,green:l,blue:c,alpha:f}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.numberRange(l.red,0,1)&&E.numberRange(l.green,0,1)&&E.numberRange(l.blue,0,1)&&E.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o})(Ac||(Ac={})),(function(a){function i(u,l){return{range:u,color:l}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&te.is(l.range)&&Ac.is(l.color)}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(u,l,c){return{label:u,textEdit:l,additionalTextEdits:c}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.string(l.label)&&(E.undefined(l.textEdit)||ar.is(l))&&(E.undefined(l.additionalTextEdits)||E.typedArray(l.additionalTextEdits,ar.is))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(bp||(bp={})),(function(a){function i(u,l,c,f,d,p){const y={startLine:u,endLine:l};return E.defined(c)&&(y.startCharacter=c),E.defined(f)&&(y.endCharacter=f),E.defined(d)&&(y.kind=d),E.defined(p)&&(y.collapsedText=p),y}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.uinteger(l.startLine)&&E.uinteger(l.startLine)&&(E.undefined(l.startCharacter)||E.uinteger(l.startCharacter))&&(E.undefined(l.endCharacter)||E.uinteger(l.endCharacter))&&(E.undefined(l.kind)||E.string(l.kind))}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(u,l){return{location:u,message:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&Kl.is(l.location)&&E.string(l.message)}s(o,"is"),a.is=o})(Ec||(Ec={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(_p||(_p={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Sp||(Sp={})),(function(a){function i(o){const u=o;return E.objectLiteral(u)&&E.string(u.href)}s(i,"is"),a.is=i})(wp||(wp={})),(function(a){function i(u,l,c,f,d,p){let y={range:u,message:l};return E.defined(c)&&(y.severity=c),E.defined(f)&&(y.code=f),E.defined(d)&&(y.source=d),E.defined(p)&&(y.relatedInformation=p),y}s(i,"create"),a.create=i;function o(u){var l;let c=u;return E.defined(c)&&te.is(c.range)&&E.string(c.message)&&(E.number(c.severity)||E.undefined(c.severity))&&(E.integer(c.code)||E.string(c.code)||E.undefined(c.code))&&(E.undefined(c.codeDescription)||E.string((l=c.codeDescription)===null||l===void 0?void 0:l.href))&&(E.string(c.source)||E.undefined(c.source))&&(E.undefined(c.relatedInformation)||E.typedArray(c.relatedInformation,Ec.is))}s(o,"is"),a.is=o})(Wl||(Wl={})),(function(a){function i(u,l,...c){let f={title:u,command:l};return E.defined(c)&&c.length>0&&(f.arguments=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.title)&&E.string(l.command)}s(o,"is"),a.is=o})(dn||(dn={})),(function(a){function i(c,f){return{range:c,newText:f}}s(i,"replace"),a.replace=i;function o(c,f){return{range:{start:c,end:c},newText:f}}s(o,"insert"),a.insert=o;function u(c){return{range:c,newText:""}}s(u,"del"),a.del=u;function l(c){const f=c;return E.objectLiteral(f)&&E.string(f.newText)&&te.is(f.range)}s(l,"is"),a.is=l})(ar||(ar={})),(function(a){function i(u,l,c){const f={label:u};return l!==void 0&&(f.needsConfirmation=l),c!==void 0&&(f.description=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&E.string(l.label)&&(E.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(E.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o})(pn||(pn={})),(function(a){function i(o){const u=o;return E.string(u)}s(i,"is"),a.is=i})(et||(et={})),(function(a){function i(c,f,d){return{range:c,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(c,f,d){return{range:{start:c,end:c},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function u(c,f){return{range:c,newText:"",annotationId:f}}s(u,"del"),a.del=u;function l(c){const f=c;return ar.is(f)&&(pn.is(f.annotationId)||et.is(f.annotationId))}s(l,"is"),a.is=l})(Ar||(Ar={})),(function(a){function i(u,l){return{textDocument:u,edits:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&ql.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(Vl||(Vl={})),(function(a){function i(u,l,c){let f={kind:"create",uri:u};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="create"&&E.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o})(Ca||(Ca={})),(function(a){function i(u,l,c,f){let d={kind:"rename",oldUri:u,newUri:l};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(d.options=c),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="rename"&&E.string(l.oldUri)&&E.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o})(_a||(_a={})),(function(a){function i(u,l,c){let f={kind:"delete",uri:u};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="delete"&&E.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||E.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||E.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o})(Sa||(Sa={})),(function(a){function i(o){let u=o;return u&&(u.changes!==void 0||u.documentChanges!==void 0)&&(u.documentChanges===void 0||u.documentChanges.every(l=>E.string(l.kind)?Ca.is(l)||_a.is(l)||Sa.is(l):Vl.is(l)))}s(i,"is"),a.is=i})(bc||(bc={})),Pl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,u){let l,c;if(u===void 0?l=ar.insert(i,o):et.is(u)?(c=u,l=Ar.insert(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.insert(i,o,c)),this.edits.push(l),c!==void 0)return c}replace(i,o,u){let l,c;if(u===void 0?l=ar.replace(i,o):et.is(u)?(c=u,l=Ar.replace(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.replace(i,o,c)),this.edits.push(l),c!==void 0)return c}delete(i,o){let u,l;if(o===void 0?u=ar.del(i):et.is(o)?(l=o,u=Ar.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),u=Ar.del(i,l)),this.edits.push(u),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Bd=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let u;if(et.is(i)?u=i:(u=this.nextId(),o=i),this._annotations[u]!==void 0)throw new Error(`Id ${u} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${u}`);return this._annotations[u]=o,this._size++,u}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),D$=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Bd(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(Vl.is(o)){const u=new Pl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=u}})):i.changes&&Object.keys(i.changes).forEach(o=>{const u=new Pl(i.changes[o]);this._textEditChanges[o]=u})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(ql.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let u=this._textEditChanges[o.uri];if(!u){const l=[],c={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(c),u=new Pl(l,this._changeAnnotations),this._textEditChanges[o.uri]=u}return u}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let u=[];this._workspaceEdit.changes[i]=u,o=new Pl(u),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Bd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;pn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=Ca.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=Ca.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}renameFile(i,o,u,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let c;pn.is(u)||et.is(u)?c=u:l=u;let f,d;if(c===void 0?f=_a.create(i,o,l):(d=et.is(c)?c:this._changeAnnotations.manage(c),f=_a.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;pn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=Sa.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=Sa.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(u){return{uri:u}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)}s(o,"is"),a.is=o})(Ip||(Ip={})),(function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)&&E.integer(l.version)}s(o,"is"),a.is=o})(Np||(Np={})),(function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)&&(l.version===null||E.integer(l.version))}s(o,"is"),a.is=o})(ql||(ql={})),(function(a){function i(u,l,c,f){return{uri:u,languageId:l,version:c,text:f}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.string(l.uri)&&E.string(l.languageId)&&E.integer(l.version)&&E.string(l.text)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const u=o;return u===a.PlainText||u===a.Markdown}s(i,"is"),a.is=i})(Cc||(Cc={})),(function(a){function i(o){const u=o;return E.objectLiteral(o)&&Cc.is(u.kind)&&E.string(u.value)}s(i,"is"),a.is=i})(wa||(wa={})),(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(kp||(kp={})),(function(a){a.PlainText=1,a.Snippet=2})(Op||(Op={})),(function(a){a.Deprecated=1})(Lp||(Lp={})),(function(a){function i(u,l,c){return{newText:u,insert:l,replace:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l&&E.string(l.newText)&&te.is(l.insert)&&te.is(l.replace)}s(o,"is"),a.is=o})(Dp||(Dp={})),(function(a){a.asIs=1,a.adjustIndentation=2})(xp||(xp={})),(function(a){function i(o){const u=o;return u&&(E.string(u.detail)||u.detail===void 0)&&(E.string(u.description)||u.description===void 0)}s(i,"is"),a.is=i})(Mp||(Mp={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(Gp||(Gp={})),(function(a){function i(o,u){return{items:o||[],isIncomplete:!!u}}s(i,"create"),a.create=i})(Fp||(Fp={})),(function(a){function i(u){return u.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(u){const l=u;return E.string(l)||E.objectLiteral(l)&&E.string(l.language)&&E.string(l.value)}s(o,"is"),a.is=o})(Hl||(Hl={})),(function(a){function i(o){let u=o;return!!u&&E.objectLiteral(u)&&(wa.is(u.contents)||Hl.is(u.contents)||E.typedArray(u.contents,Hl.is))&&(o.range===void 0||te.is(o.range))}s(i,"is"),a.is=i})(zp||(zp={})),(function(a){function i(o,u){return u?{label:o,documentation:u}:{label:o}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o,u,...l){let c={label:o};return E.defined(u)&&(c.documentation=u),E.defined(l)?c.parameters=l:c.parameters=[],c}s(i,"create"),a.create=i})(Bp||(Bp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(Up||(Up={})),(function(a){function i(o,u){let l={range:o};return E.number(u)&&(l.kind=u),l}s(i,"create"),a.create=i})(Kp||(Kp={})),(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(Wp||(Wp={})),(function(a){a.Deprecated=1})(Vp||(Vp={})),(function(a){function i(o,u,l,c,f){let d={name:o,kind:u,location:{uri:c,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(qp||(qp={})),(function(a){function i(o,u,l,c){return c!==void 0?{name:o,kind:u,location:{uri:l,range:c}}:{name:o,kind:u,location:{uri:l}}}s(i,"create"),a.create=i})(Hp||(Hp={})),(function(a){function i(u,l,c,f,d,p){let y={name:u,detail:l,kind:c,range:f,selectionRange:d};return p!==void 0&&(y.children=p),y}s(i,"create"),a.create=i;function o(u){let l=u;return l&&E.string(l.name)&&E.number(l.kind)&&te.is(l.range)&&te.is(l.selectionRange)&&(l.detail===void 0||E.string(l.detail))&&(l.deprecated===void 0||E.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o})(Yp||(Yp={})),(function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"})(Xp||(Xp={})),(function(a){a.Invoked=1,a.Automatic=2})(Yl||(Yl={})),(function(a){function i(u,l,c){let f={diagnostics:u};return l!=null&&(f.only=l),c!=null&&(f.triggerKind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.typedArray(l.diagnostics,Wl.is)&&(l.only===void 0||E.typedArray(l.only,E.string))&&(l.triggerKind===void 0||l.triggerKind===Yl.Invoked||l.triggerKind===Yl.Automatic)}s(o,"is"),a.is=o})(Jp||(Jp={})),(function(a){function i(u,l,c){let f={title:u},d=!0;return typeof l=="string"?(d=!1,f.kind=l):dn.is(l)?f.command=l:f.edit=l,d&&c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&E.string(l.title)&&(l.diagnostics===void 0||E.typedArray(l.diagnostics,Wl.is))&&(l.kind===void 0||E.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||dn.is(l.command))&&(l.isPreferred===void 0||E.boolean(l.isPreferred))&&(l.edit===void 0||bc.is(l.edit))}s(o,"is"),a.is=o})(Zp||(Zp={})),(function(a){function i(u,l){let c={range:u};return E.defined(l)&&(c.data=l),c}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&te.is(l.range)&&(E.undefined(l.command)||dn.is(l.command))}s(o,"is"),a.is=o})(Qp||(Qp={})),(function(a){function i(u,l){return{tabSize:u,insertSpaces:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&E.uinteger(l.tabSize)&&E.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(em||(em={})),(function(a){function i(u,l,c){return{range:u,target:l,data:c}}s(i,"create"),a.create=i;function o(u){let l=u;return E.defined(l)&&te.is(l.range)&&(E.undefined(l.target)||E.string(l.target))}s(o,"is"),a.is=o})(tm||(tm={})),(function(a){function i(u,l){return{range:u,parent:l}}s(i,"create"),a.create=i;function o(u){let l=u;return E.objectLiteral(l)&&te.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(rm||(rm={})),(function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"})(nm||(nm={})),(function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"})(am||(am={})),(function(a){function i(o){const u=o;return E.objectLiteral(u)&&(u.resultId===void 0||typeof u.resultId=="string")&&Array.isArray(u.data)&&(u.data.length===0||typeof u.data[0]=="number")}s(i,"is"),a.is=i})(im||(im={})),(function(a){function i(u,l){return{range:u,text:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&E.string(l.text)}s(o,"is"),a.is=o})(sm||(sm={})),(function(a){function i(u,l,c){return{range:u,variableName:l,caseSensitiveLookup:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&E.boolean(l.caseSensitiveLookup)&&(E.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(om||(om={})),(function(a){function i(u,l){return{range:u,expression:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&(E.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(lm||(lm={})),(function(a){function i(u,l){return{frameId:u,stoppedLocation:l}}s(i,"create"),a.create=i;function o(u){const l=u;return E.defined(l)&&te.is(u.stoppedLocation)}s(o,"is"),a.is=o})(um||(um={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(_c||(_c={})),(function(a){function i(u){return{value:u}}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&(l.tooltip===void 0||E.string(l.tooltip)||wa.is(l.tooltip))&&(l.location===void 0||Kl.is(l.location))&&(l.command===void 0||dn.is(l.command))}s(o,"is"),a.is=o})(Sc||(Sc={})),(function(a){function i(u,l,c){const f={position:u,label:l};return c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return E.objectLiteral(l)&&oe.is(l.position)&&(E.string(l.label)||E.typedArray(l.label,Sc.is))&&(l.kind===void 0||_c.is(l.kind))&&l.textEdits===void 0||E.typedArray(l.textEdits,ar.is)&&(l.tooltip===void 0||E.string(l.tooltip)||wa.is(l.tooltip))&&(l.paddingLeft===void 0||E.boolean(l.paddingLeft))&&(l.paddingRight===void 0||E.boolean(l.paddingRight))}s(o,"is"),a.is=o})(cm||(cm={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(fm||(fm={})),(function(a){function i(o,u,l,c){return{insertText:o,filterText:u,range:l,command:c}}s(i,"create"),a.create=i})(dm||(dm={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(pm||(pm={})),(function(a){a.Invoked=0,a.Automatic=1})(mm||(mm={})),(function(a){function i(o,u){return{range:o,text:u}}s(i,"create"),a.create=i})(hm||(hm={})),(function(a){function i(o,u){return{triggerKind:o,selectedCompletionInfo:u}}s(i,"create"),a.create=i})(ym||(ym={})),(function(a){function i(o){const u=o;return E.objectLiteral(u)&&Rc.is(u.uri)&&E.string(u.name)}s(i,"is"),a.is=i})(gm||(gm={})),x$=[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`,"\r"],(function(a){function i(c,f,d,p){return new av(c,f,d,p)}s(i,"create"),a.create=i;function o(c){let f=c;return!!(E.defined(f)&&E.string(f.uri)&&(E.undefined(f.languageId)||E.string(f.languageId))&&E.uinteger(f.lineCount)&&E.func(f.getText)&&E.func(f.positionAt)&&E.func(f.offsetAt))}s(o,"is"),a.is=o;function u(c,f){let d=c.getText(),p=l(f,(h,T)=>{let b=h.range.start.line-T.range.start.line;return b===0?h.range.start.character-T.range.start.character:b}),y=d.length;for(let h=p.length-1;h>=0;h--){let T=p[h],b=c.offsetAt(T.range.start),v=c.offsetAt(T.range.end);if(v<=y)d=d.substring(0,b)+T.newText+d.substring(v,d.length);else throw new Error("Overlapping edit");y=b}return d}s(u,"applyEdits"),a.applyEdits=u;function l(c,f){if(c.length<=1)return c;const d=c.length/2|0,p=c.slice(0,d),y=c.slice(d);l(p,f),l(y,f);let h=0,T=0,b=0;for(;h<p.length&&T<y.length;)f(p[h],y[T])<=0?c[b++]=p[h++]:c[b++]=y[T++];for(;h<p.length;)c[b++]=p[h++];for(;T<y.length;)c[b++]=y[T++];return c}s(l,"mergeSort")})(vm||(vm={})),av=(n=class{constructor(i,o,u,l){this._uri=i,this._languageId=o,this._version=u,this._content=l,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let o=this.offsetAt(i.start),u=this.offsetAt(i.end);return this._content.substring(o,u)}return this._content}update(i,o){this._content=i.text,this._version=o,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],o=this._content,u=!0;for(let l=0;l<o.length;l++){u&&(i.push(l),u=!1);let c=o.charAt(l);u=c==="\r"||c===`
|
|
4
4
|
`,c==="\r"&&l+1<o.length&&o.charAt(l+1)===`
|
package/web/assets/{cynefinDiagram-TSTJHNR4-DMEVtV_N.js → cynefinDiagram-TSTJHNR4-C9V3Tu3i.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as xt}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as xt}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as i,s as gt,g as $t,o as bt,n as wt,a as Ct,b as vt,l as O,D as Dt,e as kt,p as At,A as U,y as Q,B as Tt,E as ot}from"./mermaid.core-BEwF5fZo.js";import{p as Bt}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var rt=i(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=i(()=>H.domains,"getDomains"),Mt=i(()=>H.transitions,"getTransitions"),zt=i(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=i(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=i(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=i(()=>{At(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=i(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),Wt={parse:i(async t=>{const e=await Bt("cynefin",t);O.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}i(V,"seededRandom");function it(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}i(it,"hashString");function st(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:it(e)}i(st,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,W=e/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*17)*m*2-m;d.push({x:c+p,y:o*W})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],s=d[o+1],f=(p.y+s.y)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*31+7),R=p.x+h,_=f,E=s.x-h;D+=` C${R},${_} ${E},${f} ${s.x},${s.y}`}return D}i(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,W=t/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*23)*m*2-m;d.push({x:o*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],s=d[o+1],f=(p.x+s.x)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*37+11),R=f,_=p.y+h,E=f,z=s.y-h;D+=` C${R},${_} ${E},${z} ${s.x},${s.y}`}return D}i(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}i(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}i(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=i((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=i(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=i((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();O.debug("Rendering Cynefin diagram");const s=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=s+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(s,f),Z=st(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(s,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(s,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(s,f)).attr("fill","none");const pt=s*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(s/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of X){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,G=-x/C,ht=$/C,et=M+G*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=i(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=i(()=>{const t=Vt();return`
|
|
2
2
|
.cynefinDomain {
|
|
3
3
|
stroke: none;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-
|
|
1
|
+
import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-DODJCmXB.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-BEwF5fZo.js";import{G as Q}from"./graph-BvS0Xx32.js";import{l as U}from"./layout-D4ui-CWC.js";import"./map-7eTsl7HP.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,d,`
|
|
3
3
|
data=`,u.height,`
|
|
4
4
|
Parent cluster`,c.height),t.setNode(c.id,u),t.parent(d)||(l.trace("Setting parent",d,c.id),t.setParent(d,c.id,u))}if(l.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){l.info("Cluster identified XBX",d,e.width,t.node(d));const{ranksep:u,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const N=await T(n,e.graph,g,m,t.node(d),o),M=N.elem;W(e,M),e.diff=N.diff||0,l.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),$(M,e)}else t.children(d).length>0?(l.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),l.trace(P(e.id,t)),E.set(e.id,{id:P(e.id,t),node:e})):(l.trace("Node - the non recursive path XAX",d,n,t.node(d),r),await j(n,t.node(d),{config:o,dir:r}))})),await w(async()=>{const d=t.edges().map(async function(e){const u=t.edge(e.v,e.w,e.name);if(l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.info("Fix",E,"ids:",e.v,e.w,"Translating: ",E.get(e.v),E.get(e.w)),p&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(i,u),u.id=x;return}await G(i,u)});await Promise.all(d)},"processEdges")(),l.info("Graph before layout:",JSON.stringify(I(t))),l.info("############################################# XXX"),l.info("### Layout ### XXX"),l.info("############################################# XXX"),U(t),l.info("Graph after layout:",JSON.stringify(I(t)));let X=0,{subGraphTitleTotalMargin:S}=q(o);await Promise.all(A(t).map(async function(d){const e=t.node(d);if(l.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=S,l.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),E.get(e.id).node=e,R(e);else if(t.children(d).length>0){l.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=S,t.node(e.parentId);const u=e?.padding/2||0,x=e?.labelBBox?.height||0,N=x-u||0;l.debug("OffsetY",N,"labelHeight",x,"halfPadding",u),await F(h,e),E.get(e.id).node=e}else{const u=t.node(e.parentId);e.y+=S/2,l.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",u,u?.offsetY,e),R(e)}}));const b=S/2;return ne(t,b,{mergeSelfLoops:p}).forEach(function({edge:d,start:e,end:u}){l.info("Edge "+e+" -> "+u+": "+JSON.stringify(d),d),d.points.forEach(k=>k.y+=b);const x=t.node(e),N=t.node(u),M=z(a,d,E,g,x,N,m);K(d,M)}),t.nodes().forEach(function(d){const e=t.node(d);l.info(d,e.type,e.diff),e.isGroup&&(X=e.diff)}),l.warn("Returning from recursive render XAX",f,X),{elem:f,diff:X}},"recursiveRender"),fe=w(async(s,t)=>{const g=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:s.direction,nodesep:s.config?.nodeSpacing||s.config?.flowchart?.nodeSpacing||s.nodeSpacing,ranksep:s.config?.rankSpacing||s.config?.flowchart?.rankSpacing||s.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),m=t.select("g");v(m,s.markers,s.type,s.diagramId),D(),H(),Y(),O(),s.nodes.forEach(o=>{g.setNode(o.id,{...o}),o.parentId&&g.setParent(o.id,o.parentId)}),l.debug("Edges:",s.edges),s.edges.forEach(o=>{if(o.start===o.end){const r=o.start,f=r+"---"+r+"---1",h=r+"---"+r+"---2",a=g.node(r);g.setNode(f,{domId:f,id:f,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),g.setParent(f,a.parentId),g.setNode(h,{domId:h,id:h,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),g.setParent(h,a.parentId);const i=structuredClone(o),n=structuredClone(o),p=structuredClone(o),y=structuredClone(o);n.originalEdge=i,n.selfLoop={id:i.id,order:0},p.originalEdge=i,p.selfLoop={id:i.id,order:1},y.originalEdge=i,y.selfLoop={id:i.id,order:2},n.label="",n.arrowTypeEnd="none",n.endLabelLeft="",n.endLabelRight="",n.startLabelLeft="",n.id=r+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=r+"-cyclic-special-mid",y.label="",y.startLabelRight="",y.startLabelLeft="",y.arrowTypeStart="none",a.isGroup&&(n.fromCluster=r,y.toCluster=r),y.id=r+"-cyclic-special-2",y.arrowTypeStart="none",g.setEdge(r,f,n,r+"-cyclic-special-0"),g.setEdge(f,h,p,r+"-cyclic-special-1"),g.setEdge(h,r,y,r+"-cyclic-special-2")}else g.setEdge(o.start,o.end,{...o},o.id)}),l.warn("Graph at first:",JSON.stringify(I(g))),J(g),l.warn("Graph after XAX:",JSON.stringify(I(g)));const c=_();await T(m,g,s.type,s.diagramId,void 0,c)},"render");export{ne as getEdgesToRender,fe as render};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{p as re}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as re}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as o,o as oe,n as se,s as de,g as le,a as ce,b as me,l as g,c as T,d as ue,z as xe,p as fe,A as ge,y as M,B as he,i as y,w as P,ak as pe}from"./mermaid.core-BEwF5fZo.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var $="position frame",D="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:$,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={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 s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
|
|
2
2
|
`)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:D,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const w=f[p],R=f[p-1];w.y=R.y+R.height+s.swimlaneGap}return h}o(Y,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[$]:V,[S]:J},Be={[D]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=T(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.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(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var Te=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+`
|
|
3
3
|
`,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=T(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).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",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),$e={draw:Te},De=o(e=>"","getStyles"),Ne=De,_e={parser:Ee,db:F,renderer:$e,styles:Ne};export{_e as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as ge}from"./chunk-JWPE2WC7-CZJ17mca.js";import{_ as w,E as ye,y as ae,A as ee,D as Se,e as ve,l as te,be as B,d as U,b as xe,a as be,n as we,o as Ce,g as Te,s as Le,B as $e,bf as Ae,p as Fe}from"./mermaid.core-aYzB5any.js";import{s as Ne}from"./chunk-VR4S4FIN-BEXJFqwW.js";import{p as Me}from"./cynefin-VYW2F7L2-BFTKvFOB.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as Q}from"./ordinal-Cboi1Yqb.js";import"./index-B9Ju-85a.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";import"./init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],r,i,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function De(t,a){for(var l=this,n=[l],r=[],i,h,d,g=-1;l=n.pop();)if(r.push(l),i=l.children)for(h=0,d=i.length;h<d;++h)n.push(i[h]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function Ee(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Re(t){for(var a=this,l=We(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function We(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*qe(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=je)):a===void 0&&(a=Ye);for(var l=new Z(t),n,r=[l],i,h,d,g;n=r.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)r.push(i=h[d]=new Z(h[d])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:Ee,path:Re,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:Xe,[Symbol.iterator]:qe};function Je(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(n-a)/t.value;++d<g;)h=i[d],h.y0=l,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(r-l)/t.value;++d<g;)h=i[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,r,i){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,W,M;p<s;){x=r-l,S=i-n;do u=d[b++].value;while(!u&&b<s);for(y=N=u,W=Math.max(S/x,x/S)/(v*t),M=u*u*W,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*W,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Qe(g,l,n,r,v?n+=S*u/v:i):et(g,l,n,v?l+=x*u/v:r,i),v-=u,p=b}return h}const nt=(function t(a){function l(n,r,i,h,d){at(a,n,r,i,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],i=G,h=G,d=G,g=G,c=G;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(b),r=[0],a&&s.eachBefore(Ke),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=i(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),t(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=Je(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:q(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var R,oe=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=xe,this.getAccTitle=be,this.setDiagramTitle=we,this.getDiagramTitle=Ce,this.getAccDescription=Te,this.setAccDescription=Le}getNodes(){return this.nodes}getConfig(){const a=$e,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{Ae(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const h=i.item;if(!h)continue;const d=i.indent?parseInt(i.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};l.push(b)}const n=ce(l),r=w((i,h)=>{for(const d of i)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{try{const l=await Me("treemap",t);te.debug("Treemap AST:",l);const n=he.parser?.yy;if(!(n instanceof oe))throw new 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.");rt(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,E=10,X=25,ot=w((t,a,l,n)=>{const r=n.db,i=r.getConfig(),h=i.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const p=d?30:0,b=Se(a),s=i.nodeWidth?i.nodeWidth*E:960,x=i.nodeHeight?i.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,i.useMaxWidth);let u;try{const e=i.valueFormat||",";if(e==="$0,0")u=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);u=w(f=>"$"+O(o||"")(f),"valueFormat")}else u=O(e)}catch(e){te.error("Error creating format function:",e),u=O(",")}const y=Q().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Q().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=Q().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),W=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([s,x]).paddingTop(e=>e.children&&e.children.length>0?X+E:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?E:0).paddingRight(e=>e.children&&e.children.length>0?E:0).paddingBottom(e=>e.children&&e.children.length>0?E:0).round(!0)(W),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=V.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=U(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=o.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){o.text("..."),_.getComputedTextLength()>m&&o.text("");break}if(o.text(z+"..."),_.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),A=re.length>20,pe=A?16:38,Y=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,se=A?8:10,K=A?1:2,j=V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${pe}px;fill:`+$(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=U(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),T=f-2*J,P=C-2*J;if(T<se||P<se){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,o.style("font-size",`${m}px`);let F=Math.max(I,Math.min(Y,Math.round(m*_))),k=m+K+F;for(;k>P&&m>D&&(m--,F=Math.max(I,Math.min(Y,Math.round(m*_))),!(F<I&&m===D));)o.style("font-size",`${m}px`),k=m+K+F;o.style("font-size",`${m}px`),A?(m<D||P<D)&&o.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&o.style("display","none")}),i.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:`+$(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?u(o.value):"").each(function(o){const f=U(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=U(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(I,Math.min(Y,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(o.y1-o.y0)/2+T/2+K;f.attr("y",F);const k=o.x1-o.x0,ie=o.y1-o.y0-4,me=k-2*J;f.node().getComputedTextLength()>me||F+m>ie||m<I?f.style("display","none"):f.style("display",null)});const ue=i.diagramPadding??8;Ne(b,ue,"flowchart",i?.useMaxWidth||!1)},"draw"),ct=w(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=w(({treemap:t}={})=>{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),i=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return`
|
|
1
|
+
import{p as ge}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as w,E as ye,y as ae,A as ee,D as Se,e as ve,l as te,be as B,d as U,b as xe,a as be,n as we,o as Ce,g as Te,s as Le,B as $e,bf as Ae,p as Fe}from"./mermaid.core-BEwF5fZo.js";import{s as Ne}from"./chunk-VR4S4FIN-BkMRGbPv.js";import{p as Me}from"./cynefin-VYW2F7L2-Co86WDlY.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as Q}from"./ordinal-Cboi1Yqb.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";import"./init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],r,i,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function De(t,a){for(var l=this,n=[l],r=[],i,h,d,g=-1;l=n.pop();)if(r.push(l),i=l.children)for(h=0,d=i.length;h<d;++h)n.push(i[h]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function Ee(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Re(t){for(var a=this,l=We(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function We(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*qe(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=je)):a===void 0&&(a=Ye);for(var l=new Z(t),n,r=[l],i,h,d,g;n=r.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)r.push(i=h[d]=new Z(h[d])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:Ee,path:Re,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:Xe,[Symbol.iterator]:qe};function Je(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(n-a)/t.value;++d<g;)h=i[d],h.y0=l,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(r-l)/t.value;++d<g;)h=i[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,r,i){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,W,M;p<s;){x=r-l,S=i-n;do u=d[b++].value;while(!u&&b<s);for(y=N=u,W=Math.max(S/x,x/S)/(v*t),M=u*u*W,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*W,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Qe(g,l,n,r,v?n+=S*u/v:i):et(g,l,n,v?l+=x*u/v:r,i),v-=u,p=b}return h}const nt=(function t(a){function l(n,r,i,h,d){at(a,n,r,i,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],i=G,h=G,d=G,g=G,c=G;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(b),r=[0],a&&s.eachBefore(Ke),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=i(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),t(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=Je(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:q(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var R,oe=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=xe,this.getAccTitle=be,this.setDiagramTitle=we,this.getDiagramTitle=Ce,this.getAccDescription=Te,this.setAccDescription=Le}getNodes(){return this.nodes}getConfig(){const a=$e,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{Ae(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const h=i.item;if(!h)continue;const d=i.indent?parseInt(i.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};l.push(b)}const n=ce(l),r=w((i,h)=>{for(const d of i)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{try{const l=await Me("treemap",t);te.debug("Treemap AST:",l);const n=he.parser?.yy;if(!(n instanceof oe))throw new 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.");rt(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,E=10,X=25,ot=w((t,a,l,n)=>{const r=n.db,i=r.getConfig(),h=i.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const p=d?30:0,b=Se(a),s=i.nodeWidth?i.nodeWidth*E:960,x=i.nodeHeight?i.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,i.useMaxWidth);let u;try{const e=i.valueFormat||",";if(e==="$0,0")u=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);u=w(f=>"$"+O(o||"")(f),"valueFormat")}else u=O(e)}catch(e){te.error("Error creating format function:",e),u=O(",")}const y=Q().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Q().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=Q().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),W=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([s,x]).paddingTop(e=>e.children&&e.children.length>0?X+E:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?E:0).paddingRight(e=>e.children&&e.children.length>0?E:0).paddingBottom(e=>e.children&&e.children.length>0?E:0).round(!0)(W),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=V.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=U(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=o.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){o.text("..."),_.getComputedTextLength()>m&&o.text("");break}if(o.text(z+"..."),_.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),A=re.length>20,pe=A?16:38,Y=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,se=A?8:10,K=A?1:2,j=V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${pe}px;fill:`+$(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=U(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),T=f-2*J,P=C-2*J;if(T<se||P<se){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,o.style("font-size",`${m}px`);let F=Math.max(I,Math.min(Y,Math.round(m*_))),k=m+K+F;for(;k>P&&m>D&&(m--,F=Math.max(I,Math.min(Y,Math.round(m*_))),!(F<I&&m===D));)o.style("font-size",`${m}px`),k=m+K+F;o.style("font-size",`${m}px`),A?(m<D||P<D)&&o.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&o.style("display","none")}),i.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:`+$(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?u(o.value):"").each(function(o){const f=U(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=U(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(I,Math.min(Y,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(o.y1-o.y0)/2+T/2+K;f.attr("y",F);const k=o.x1-o.x0,ie=o.y1-o.y0-4,me=k-2*J;f.node().getComputedTextLength()>me||F+m>ie||m<I?f.style("display","none"):f.style("display",null)});const ue=i.diagramPadding??8;Ne(b,ue,"flowchart",i?.useMaxWidth||!1)},"draw"),ct=w(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=w(({treemap:t}={})=>{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),i=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${r.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${r.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as $}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as $}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as b,A as m,D as C,e as S,l as w,b as D,a as T,n as P,o as z,g as A,s as E,y as F,B as W,p as _}from"./mermaid.core-BEwF5fZo.js";import{p as N}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=T,this.setDiagramTitle=P,this.getDiagramTitle=z,this.getAccDescription=A,this.setAccDescription=E}getConfig(){const t=m({...L,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{$(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[p,s]=I({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(t.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(o)},"populate"),I=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new 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.");w.debug(t),Y(t,r)},"parse")},O=b((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,B]of p.entries())j(f,B,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=b((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(o+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),G={draw:O},H={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},K=b(({packet:e}={})=>{const t=m(H,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as X}from"./chunk-2Q5K7J3B-
|
|
1
|
+
import{I as X}from"./chunk-2Q5K7J3B-lofRULSz.js";import{p as O}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as f,n as G,b as Y,s as P,o as j,g as F,a as Z,A,l as D,D as q,e as U,y as N,p as J,i as K,ai as Q,B as ee,aj as te}from"./mermaid.core-BEwF5fZo.js";import{p as ne}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(`
|
|
2
2
|
`),t=new Map;let r=-1;for(const[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};const i=[];for(let s=r+1;s<e.length;s++){const o=e[s];o.trim()===""||k.test(o)||$.test(o)||V.test(o)||i.push(o.replace(/\t/g," "))}if(!L(i))return{text:n,lineMap:t};const a=_(i),c=[];let l=0;for(let s=0;s<=r;s++)c.push(e[s]),l++,t.set(l,s+1);for(let s=r+1;s<e.length;s++){const o=e[s],h=o.trim(),p=s+1;if(h===""){c.push(o),l++,t.set(l,p);continue}if(k.test(o)){c.push(o),l++,t.set(l,p);continue}if($.test(o)){c.push(o),l++,t.set(l,p);continue}if(V.test(o))continue;const d=o.replace(/\t/g," "),w=S.exec(d);if(w?.index!==void 0){const g=w.index,m=Math.round(g/a)+1;let u=g+1;for(;u<d.length&&re.test(d[u]);)u++;for(;u<d.length&&d[u]===" ";)u++;const v=d.slice(u).trimEnd();if(!v)throw new Error(`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`);const W=ie.repeat(m);c.push(W+v),l++,t.set(l,p)}else{if(/^[\s─━│┃└┗├┣]+$/.test(d))continue;if(E.test(d))c.push(o),l++,t.set(l,p);else{if(/^\s+/.test(d))throw new Error(`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);c.push(o),l++,t.set(l,p)}}}return{text:c.join(`
|
|
3
3
|
`),lineMap:t}}f(R,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=f(()=>{x.reset(),J()},"clear"),se=f(()=>x.records.stack[0],"getRoot"),ae=f(()=>x.records.cnt,"getCount"),ce=ee.treeView,le=f(()=>A(ce,N().treeView),"getConfig"),de=f((n,e,t,r,i,a)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const c={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};x.records.stack[x.records.stack.length-1].children.push(c),x.records.stack.push(c)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:Z,getAccDescription:F,getDiagramTitle:j,setAccDescription:P,setAccTitle:Y,setDiagramTitle:G},I=he,pe=f(n=>{O(n,I);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let r=e.name;const i=r.endsWith("/");i&&(r=r.slice(0,-1));const a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,h=o?K(o,N()):void 0;I.addNode(t,r,a,c,s,h)}},"populate"),fe={parse:f(async n=>{const{text:e,lineMap:t}=R(n);try{const r=await ne("treeView",e);D.debug(r),pe(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=M(r.message,t)),r}},"parse")},b={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 H(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const r=n.lastIndexOf(".");if(r>0){const i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}f(H,"detectIcon");function C(n,e){return n.includes(":")?n:n in b.icons||!e?`${b.prefix}:${n}`:`${e}:${n}`}f(C,"qualifyIcon");function B(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=H(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}f(B,"getNodeIcon");te([{name:b.prefix,icons:b}]);var y=14,ge=4,ue=16,z=f((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),we=f(async(n,e,t,r)=>{const i=new Set,a=f(s=>{const o=B(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;const c=await Promise.all([...i].map(async s=>({icon:s,svg:await Q(s,{height:y,width:y})}))),l=n.append("defs");for(const{icon:s,svg:o}of c)l.append("g").attr("id",z(r,s)).html(o)},"injectIconDefs"),me=f((n,e,t,r,i,a)=>{const c=r.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const s=y+ge,o=B(t,i),h=o!==void 0;o&&c.append("use").attr("xlink:href",`#${z(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");const p=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:d,width:w}=p.node().getBBox(),g=d+i.paddingY*2,m=n+i.paddingX+(h?s:0);p.attr("x",m),p.attr("y",e+g/2);const u=m+w,v=w+i.paddingX*2+(h?s:0);return t.BBox={x:n,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:u,centerY:e+g/2}},"positionLabel"),T=f((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),xe=f((n,e,t,r)=>{let i=0,a=0;const c=[],l=f((h,p,d,w)=>{const g=w*(d.rowIndent+d.paddingX),m=me(g,i,p,h,d,r);c.push(m);const{height:u,width:v}=p.BBox;T(h,g-d.rowIndent,i+u/2,g,i+u/2,d.lineThickness),a=Math.max(a,g+v),i+=u},"drawNode"),s=f((h,p=0)=>{l(n,h,t,p),h.children.forEach(m=>{s(m,p+1)});const{x:d,y:w,height:g}=h.BBox;if(h.children.length){const{y:m,height:u}=h.children[h.children.length-1].BBox;T(n,d+t.paddingX,w+g,d+t.paddingX,m+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);const o=c.filter(h=>h.node.description);if(o.length>0){const p=Math.max(...c.map(d=>d.labelRightEdge))+ue;for(const d of o){const g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",d.centerY).node().getBBox();a=Math.max(a,p+g.width+t.paddingX)}}for(const h of c)if(h.node.cssClass?.split(/\s+/).includes("highlight")){const p=h.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const d=a-h.node.BBox.x+8;p.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),ve=f(async(n,e,t,r)=>{D.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);const i=r.db,a=i.getRoot(),c=i.getConfig(),l=q(e);await we(l,a,c,e);const s=l.append("g");s.attr("class","tree-view");const{totalHeight:o,totalWidth:h}=xe(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${h} ${o}`),U(l,o,h,c.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=f(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=A(Ce,n);return`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as k}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as k}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as c,s as R,g as E,o as I,n as _,a as D,b as F,D as P,p as z,A as y,y as C,B as G,l as B,E as W,e as V}from"./mermaid.core-BEwF5fZo.js";import{p as H}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:x},m=structuredClone(w),j=G.radar,N=c(()=>y({...j,...C().radar}),"getConfig"),b=c(()=>m.axes,"getAxes"),U=c(()=>m.curves,"getCurves"),X=c(()=>m.options,"getOptions"),Y=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule}},"setOptions"),K=c(()=>{z(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:U,getOptions:X,setAxes:Y,setCurves:Z,setOptions:J,getConfig:N,clear:K,setAccTitle:F,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:E,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=P(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${s};
|
|
4
4
|
fill: ${s};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/selection-popup-
|
|
2
|
-
import{p as J,h as fe,c as Y,b as j,e as I,_ as L}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/selection-popup-DPC2dc_s.js","assets/react-Dh7j6h1K.js","assets/markdown-BvBsne3X.js","assets/check-DjJ4znpk.js","assets/utils-CvINCDjn.js","assets/index-CKJsEQtp.js","assets/index-DbD-bwdm.js","assets/index-wmrfz8OS.css","assets/view-context-DyuiMZAo.js","assets/tanstack-CirxkzEx.js","assets/plus-TM7voyHO.js","assets/metadata-Dy1R-He2.js","assets/copy-context-Bj8Sfpo7.js","assets/copy-DKl_cZLH.js","assets/app-options-CIiczgaQ.js","assets/file-text-C3hyr-Ql.js","assets/index-4-yQR2Lz.js","assets/index-B6ap1Jz7.js","assets/popover-DvKy7gF6.js","assets/ellipsis-DIDqkP8k.js","assets/app-view-header-CNImosi9.js","assets/folder-image-Cy-8Vgmd.js","assets/chevron-down-CiyxliRS.js","assets/viewer-capabilities-BkBR084B.js","assets/x-GGS-h4Nm.js","assets/folder-open-CqSoJtKT.js","assets/ask-tray-DpWLca3e.js","assets/chevron-up-Xv7ii00h.js","assets/linked-session-header-D4SUBW0L.js","assets/folder-activity-Cv1X2ezj.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{p as J,h as fe,c as Y,b as j,e as I,_ as L}from"./index-DbD-bwdm.js";import{r as d,j as r}from"./react-Dh7j6h1K.js";import{u as pe,Q as me}from"./tanstack-CirxkzEx.js";import{B as he,m as z,e as we,q as xe,T as ge,b as ke,a as be,V as ye,l as ve}from"./view-context-DyuiMZAo.js";import{m as je}from"./metadata-Dy1R-He2.js";import{C as $e}from"./copy-context-Bj8Sfpo7.js";import{a as Ne}from"./utils-CvINCDjn.js";import{V as Re}from"./app-options-CIiczgaQ.js";import{c as h,e as Ae,r as Ce,t as x,a as _e,o as Le}from"./index-CKJsEQtp.js";import{A as Se}from"./app-view-header-CNImosi9.js";import{F as X}from"./file-text-C3hyr-Ql.js";import{u as Ee}from"./viewer-capabilities-BkBR084B.js";import{X as Oe}from"./x-GGS-h4Nm.js";import{F as Me}from"./folder-open-CqSoJtKT.js";const Pe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],qe=h("arrow-left",Pe);const De=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Te=h("arrow-right",De);const Ue=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Ie=h("download",Ue);const ze=[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]],He=h("highlighter",ze);const Be=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Fe=h("link",Be);const Ve=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],We=h("pencil",Ve);const Ke=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],H=h("share-2",Ke);const Qe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Je=h("sparkles",Qe);async function Ye(e,n){if(!n.ok)throw await Ae(n);if(!n.headers.get("content-type")?.includes("application/json"))throw new Error("The server returned a non-JSON response.");return e.parse(await n.json())}const Xe=e=>Ye(Ce.document.response,e),G=[];function Ge(){return G.flatMap(e=>e.renderers??[])}function Ze(){return Object.assign({},...G.map(e=>e.markdownComponents??{}))}function en(e){return e.slice(e.lastIndexOf(".")).toLowerCase()}function nn(e){return Ge().find(n=>{const t=n.kinds?.includes(e.kind)??!1,o=n.extensions?.includes(en(e.path))??!1;return t||o})}const B=/\.(?:aac|avif|bmp|flac|gif|ico|jpeg|jpg|m4a|m4v|mov|mp3|mp4|oga|ogg|ogv|opus|png|svg|wav|webm|webp)$/i,tn=/^(?:[a-z][a-z0-9+.-]*:|\/\/|[#~])/i;function F(e,n){const t=new URL("/api/media","http://localhost");return t.searchParams.set("path",e),t.searchParams.set("file",n),`${t.pathname}${t.search}`}function rn(e){const n=e.lastIndexOf("/");return n<0?"":e.slice(0,n+1)}function $(e){return e.split(/[\\/]+/).filter(n=>n&&n!==".")}function Z(e,n){const t=$(e);return n.length<t.length?!1:t.every((o,s)=>o.toLowerCase()===n[s]?.toLowerCase())}function ee(e,n){return n.slice($(e).length).join("/")}function on(e,n){if(!n)return;const t=$(n);return Z(e,t)&&ee(e,t)||void 0}function sn(e,n,t){const o=`${e.replace(/[\\/]+$/,"")}/${rn(n)}`,s=$(`${o}${t}`),a=[];for(const c of s){if(c===".."){if(!a.length)return;a.pop();continue}a.push(c)}if(Z(e,a))return ee(e,a)||void 0}function an(e){if(e.startsWith("/@fs/"))try{return decodeURIComponent(e.slice(4))}catch{return}}function cn(e,n){return t=>{const o=t.trim().replaceAll("\\","/");if(!o)return;const s=an(o);if(s!==void 0){const i=on(e,s);return!i||!B.test(i)?void 0:F(e,i)}if(tn.test(o))return;const a=o.split(/[?#]/)[0]??"";if(!B.test(a))return;const c=sn(e,n,o);return c?F(e,c):void 0}}function ln(e,n){let t=e.replaceAll(/(\s(?:src|poster)\s*=\s*)("([^"]*)"|'([^']*)')/gi,(o,s,a,c,i)=>{const l=n(c??i??"");return l?`${s}"${l}"`:o});return t=t.replaceAll(/\]\(([^()\s]+)(?:\s+"[^"]*")?\)/g,(o,s)=>{const a=n(s);return a?`](${a})`:o}),t}function dn(e,n,t){if(!n||!t)return e;const o=cn(n,t);let s=!1;return e.split(`
|
|
3
3
|
`).map(a=>/^\s*```/.test(a)?(s=!s,a):s?a:ln(a,o)).join(`
|
|
4
4
|
`)}const un=/\.(?:md|markdown|mdown|mdx)$/i,fn=/^(?:\/|[a-z][a-z0-9+.-]*:)/i;function pn(e){const n=e.lastIndexOf("/");return n<0?"":e.slice(0,n+1)}function mn(e){return e.replaceAll(/([\\\[\]])/g,"\\$1")}function hn(e){const n=e.trim().replaceAll("\\","/");if(!(!n||fn.test(n)))return un.test(n)?n:`${n}.md`}function wn(e){return e.toLowerCase().replaceAll(/[^\w\s-]/g,"").trim().replaceAll(/\s+/g,"-").replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"")}function ne(e){const n=e.split("|",2)[0]??"",[t="",o]=n.trim().split("#",2);if(!(!t&&!o))return{...o?.trim()?{heading:o.trim()}:{},...t.trim()?{reference:t.trim()}:{}}}function xn(e){let n=!1;return e.split(`
|
|
5
5
|
`).map(t=>/^\s*```/.test(t)?(n=!n,t):n?t:t.replaceAll(new RegExp("(?<![!\\\\])\\[\\[([^\\]\\n]+)\\]\\]","g"),(o,s)=>{const a=ne(s);if(!a)return o;const c=s.includes("|")?s.slice(s.indexOf("|")+1).trim():a.heading?a.reference?`${a.reference}#${a.heading}`:a.heading:a.reference??s;return`[${mn(c)}](/_obsidian-link/${encodeURIComponent(s)})`})).join(`
|
|
@@ -20,4 +20,4 @@ import{p as J,h as fe,c as Y,b as j,e as I,_ as L}from"./index-B9Ju-85a.js";impo
|
|
|
20
20
|
text-center`,children:[r.jsx("p",{className:"m-0 text-[0.9rem] text-[#6c7a6d]",children:"Kennel cannot render this file type inline."}),t?r.jsxs("a",{className:`rounded-lg border border-[#d8ddd4] bg-white px-4 py-2
|
|
21
21
|
text-[0.85rem] font-semibold text-[#24543a]`,href:t,children:["Download ",n]}):r.jsx("small",{className:"text-[0.8rem] text-[#6c7a6d]",children:n})]})}function qn({document:e,metadata:n,folder:t,session:o,selection:s=!1,documentHref:a,SelectionPopup:c}){const i=d.useMemo(()=>({...jn(n.lineOffset),...Ze(),a:k=>r.jsx(Nn,{...k,currentDocument:e.path,folder:t,session:o,documentHref:a})}),[n.lineOffset,e.path,t,o,a]),l=t??e.root??"",u=l?`${l.replace(/\/+$/,"")}/${e.path}`:void 0,m=e.kind==="markdown"?r.jsx(he,{components:i,headingCopyPath:u,mode:"markdown",value:dn(xn(n.body),l,e.path)}):null,w=d.useMemo(()=>nn(e),[e]),g=e.kind==="markdown"&&s&&t?.startsWith("/")&&c?r.jsx(d.Suspense,{fallback:m,children:r.jsx(c,{path:e.path,folder:t,content:e.content,children:m},`${t}:${e.path}`)}):w?r.jsx(w.component,{document:e}):e.kind==="markdown"?m:e.kind==="html"?r.jsx("iframe",{className:`h-full min-h-[min(60vh,60dvh)] w-full rounded-lg border
|
|
22
22
|
border-[#e7ebe7]`,sandbox:"",srcDoc:e.content,title:e.path}):e.kind==="text"?r.jsx("pre",{className:`m-0 overflow-auto rounded-lg bg-[#f8f9f8] p-4 text-[0.85rem]
|
|
23
|
-
leading-[1.6]`,children:e.content}):e.kind==="code"?r.jsx(Ln,{document:e}):e.kind==="image"?r.jsx(Rn,{document:e}):e.kind==="table"?r.jsx(En,{document:e}):e.kind==="eml"?r.jsx(Mn,{document:e}):r.jsx(Pn,{document:e});return r.jsxs("article",{className:"min-h-0 flex-1 overflow-auto px-6 py-5",style:{paddingBottom:"calc(var(--ask-tray-height, 0px) + 20px)"},children:[n.entries.length?r.jsx(_n,{entries:n.entries}):null,g]})}function Dn({renderer:e,embedded:n=!1,error:t,header:o,live:s=!1,loading:a=!1,panel:c=!1,sessionHeader:i,tray:l}){return r.jsxs("section",{className:"markdown-page","data-embedded":n||c?"true":void 0,"data-panel":c?"true":void 0,children:[o,i,s?r.jsxs("div",{className:"pop-live",role:"status",children:[r.jsx("span",{"aria-hidden":"true",children:"●"})," Live — refreshing on save"]}):null,t?r.jsx("p",{role:"alert",className:"p-6",children:t}):e?r.jsx(qn,{...e}):a?r.jsx("p",{role:"status",className:"p-6",children:"Loading file…"}):null,l]})}function _(e){const n=()=>x.success("Copied to clipboard"),t=()=>{const o=document.createElement("textarea");o.value=e,o.style.cssText="position:fixed;opacity:0",document.body.append(o),o.select();const s=document.execCommand("copy");if(o.remove(),!s)return x.error("Could not copy path");n()};if(!navigator.clipboard)return t();navigator.clipboard.writeText(e).then(n,t)}function re(e){return new URL(e,window.location.origin).searchParams}async function Tn(e,n){return _e.document(e,n)}function Un(e){if(e.rawUrl)return`${e.rawUrl}${e.rawUrl.includes("?")?"&":"?"}download=1`;if(e.root){const n=new URL("/api/raw",window.location.origin);return n.searchParams.set("path",e.root),n.searchParams.set("file",e.path),n.searchParams.set("download","1"),`${n.pathname}${n.search}`}}function W(e){try{const n=new URL(e);return n.username||n.password||n.protocol!=="https:"&&n.protocol!=="http:"||n.protocol==="http:"&&n.hostname!=="localhost"&&!n.hostname.startsWith("127.")&&n.hostname!=="[::1]"?void 0:n.origin}catch{return}}function In(e,n,t){const{panel:o}=J(e);if(!o)return[];const a=new URL(e,"http://127.0.0.1").searchParams.get("host");if(a!==null){const i=W(a);return i?[i]:[]}const c=new Set;for(const i of[n,t]){const l=i?W(i):void 0;l&&c.add(l)}return[...c]}function zn(e,n){return n.includes(e)}function Hn(e){if(!e||typeof e!="object")return;const n=e;if(n.type==="kennel:close")return{type:"kennel:close"};if(n.type==="kennel:resize")return{type:"kennel:resize"};if(n.type==="kennel:request"&&(n.request==="state"||n.request==="selection"))return{type:"kennel:request",request:n.request}}function Bn(e,n,t){return e===n||e===t}function Fn(e){const n=o=>{if(!zn(o.origin,e.allowedOrigins))return;const s=e.windowRef();if(!s||!Bn(o.source,s.parent,s.opener))return;const a=Hn(o.data);if(a)switch(a.type){case"kennel:close":e.onClose?.();break;case"kennel:resize":e.onResize?.();break;case"kennel:request":e.onRequest?.(a.request);break}},t=e.windowRef();return t?.addEventListener("message",n),e.post({type:"kennel:ready",payload:oe()}),()=>{t?.removeEventListener("message",n)}}function oe(){const e=document.documentElement.scrollWidth||document.documentElement.clientWidth;return{height:document.documentElement.scrollHeight||document.documentElement.clientHeight,url:window.location.href,width:e}}function K(e,n){return{...oe(),...e?{path:e}:{},...n?{title:n}:{}}}function Q(e,n){return{text:window.getSelection()?.toString().trim()??"",url:window.location.href,...e?{path:e}:{},...n?{title:n}:{}}}function Vn(e){e({type:"kennel:closed"}),window.close()}function Wn({href:e,folder:n,path:t,source:o}){const s=re(e).get("watch")==="1";return pe({gcTime:30*6e4,queryKey:["document",n?fe(n):"dropped",t],queryFn:async()=>{if(n?.startsWith("/"))return Tn(e,t);const a=await o.read(),c=a.documents.find(i=>i.path===t);if(!c)throw new Error("Document not found.");return Xe(Response.json({...c,root:a.root}))},refetchInterval:s?1500:void 0,staleTime:15e3})}function Kn(e){const n=we(),t=new URLSearchParams(window.location.search).get("collection");return r.jsx(Se,{folder:n.folder,name:n.document?.title,icon:n.kind==="document"?r.jsx(X,{"aria-hidden":"true"}):void 0,workspace:n.workspace,folderHref:o=>j(o,"notes"),collectionHref:n.folder?o=>I(n.folder,o):void 0,homeHref:n.folder?j(n.folder,"notes"):void 0,page:n.folder&&n.document?{title:n.document.title,href:Y(n.folder,n.document.path)}:void 0,...e,accessory:r.jsxs(r.Fragment,{children:[n.folder&&t?r.jsx("a",{className:"text-sm underline",href:I(n.folder,t),children:"Back to collection"}):null,e.accessory]}),children:n.workspaceError?r.jsx("small",{role:"status",children:"Folder path unavailable."}):null})}const Qn=d.lazy(async()=>({default:(await L(async()=>{const{SelectionPopup:e}=await import("./selection-popup-B_zAXt8R.js");return{SelectionPopup:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]))).SelectionPopup})),Jn=d.lazy(async()=>({default:(await L(async()=>{const{AskTray:e}=await import("./ask-tray-DYxvqV-2.js");return{AskTray:e}},__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,24,29,26,13]))).AskTray})),Yn=d.lazy(async()=>({default:(await L(async()=>{const{LinkedSessionHeader:e}=await import("./linked-session-header-D4SUBW0L.js");return{LinkedSessionHeader:e}},__vite__mapDeps([30,1,2,31,9]))).LinkedSessionHeader}));function Xn({path:e,folder:n,session:t,embedded:o=!1,panel:s=!1}){const a=Wn({href:window.location.href,folder:n,path:e,source:ve}),c=re(window.location.href).get("watch")==="1",i=a.data,l=d.useMemo(()=>i?.kind==="markdown"?je(i.content):{body:i?.content??"",entries:[],lineOffset:0,title:void 0},[i]),u=d.useMemo(()=>({path:e,title:l.title??e.split("/").at(-1)??e}),[e,l.title]),{enabled:m,setEnabled:w}=ke(),{draft:g}=be(n??""),[k,S]=d.useState(!1),[ie,N]=d.useState(!1),R=Ee().data,A=!!n?.startsWith("/"),E=R?.hostActions==="local",O=R?.acp===!0,C=O&&A&&!!(i&&i.kind!=="html"&&i.content),M=i?.root?`${i.root.replace(/\/+$/,"")}/${i.path}`:e,se=()=>{const f=window.location.href,p=()=>_(f);if(!navigator.share){p();return}navigator.share({title:u.title,text:`${u.title} — Kennel preview`,url:f}).catch(y=>{y instanceof DOMException&&y.name==="AbortError"||p()})},ae=()=>{const f=i?Un(i):void 0;if(!f||!i){x.error("This preview cannot be downloaded");return}const p=window.document.createElement("a");p.href=f,p.download=i.path.split("/").at(-1)??"download",window.document.body.append(p),p.click(),p.remove()},P=C&&i?.kind==="markdown"?{kind:"checkbox",id:"selection",label:"AI text selection",icon:r.jsx(He,{"aria-hidden":"true"}),description:"Select text to ask about it",checked:m,run:f=>{w(f),N(!1)}}:null,ce=C?[{kind:"separator"},{kind:"label",label:"AI"},{kind:"item",id:"ask",label:"Ask AI…",icon:r.jsx(Je,{"aria-hidden":"true"}),description:"Ask about this document",run:()=>{S(!0),N(!1)}},...P?[P]:[],{kind:"separator"}]:[],q=R?.download!==!1?{kind:"item",id:"download",label:"Download",icon:r.jsx(Ie,{"aria-hidden":"true"}),disabled:!i,disabledReason:"This preview cannot be downloaded",run:ae}:null,D=E&&n?{kind:"item",id:"folder",label:"Open containing folder",icon:r.jsx(Me,{"aria-hidden":"true"}),run:()=>{const f=e.includes("/")?`${n}/${e.slice(0,e.lastIndexOf("/"))}`:n;window.location.assign(j(f,"notes"))}}:null,T=E&&A&&i?.kind==="markdown"?{kind:"item",id:"open-default",label:"Open in default app",icon:r.jsx(We,{"aria-hidden":"true"}),run:()=>{Le(M).catch(f=>x.error(f instanceof Error?f.message:"Could not open file."))}}:null,le=[{kind:"label",label:"File"},{kind:"item",id:"copy",label:"Copy file path",icon:r.jsx(X,{"aria-hidden":"true"}),disabled:!i,disabledReason:"Loading file…",run:()=>_(M)},...D?[D]:[],...T?[T]:[],...q?[q]:[],...ce,{kind:"label",label:"Navigate"},{kind:"item",id:"back",label:"Back",icon:r.jsx(qe,{"aria-hidden":"true"}),run:()=>window.history.back()},{kind:"item",id:"forward",label:"Forward",icon:r.jsx(Te,{"aria-hidden":"true"}),run:()=>window.history.forward()},{kind:"separator"},{kind:"label",label:"Share"},{kind:"item",id:"share",label:"Share preview…",icon:r.jsx(H,{"aria-hidden":"true"}),run:se},{kind:"item",id:"copy-link",label:"Copy link",icon:r.jsx(Fe,{"aria-hidden":"true"}),run:()=>_(window.location.href)},{kind:"separator"},{kind:"item",id:"close",label:"Close preview",icon:r.jsx(Oe,{"aria-hidden":"true"}),variant:"destructive",run:()=>window.location.assign(n?j(n,"notes"):"/")}],de=A&&!ie&&(k||m||g.comments.length>0||g.attachments.length>0),b=d.useRef(null);return d.useEffect(()=>{if(!s){b.current=null;return}const f=In(window.location.href,window.document.referrer,window.opener?.origin);if(!f.length){x.error("Chat panel bridge has no trusted host origin");return}const p=v=>{for(const U of[window.parent,window.opener])if(U)try{U.postMessage(v,f[0])}catch{}},y=Fn({allowedOrigins:f,post:p,windowRef:()=>window,onClose:()=>Vn(p),onResize:()=>p({type:"kennel:state",payload:K(i?.path,u.title)}),onRequest:v=>{v==="selection"?p({type:"kennel:selection",payload:Q(i?.path,u.title)}):v==="state"&&p({type:"kennel:state",payload:K(i?.path,u.title)})}}),ue=()=>{p({type:"kennel:selection",payload:Q(i?.path,u.title)})};return b.current=ue,()=>{y(),b.current=null}},[i,s,u.title]),r.jsx(ye,{kind:"document",folder:n,document:u,children:r.jsx(Dn,{embedded:o,error:a.error?.message,header:r.jsx(Kn,{options:r.jsx(Re,{actions:le}),accessory:s?r.jsx("button",{type:"button",className:"app-options-trigger","aria-label":"Send selection to chat",title:"Send selection to chat",onClick:()=>b.current?.(),children:r.jsx(H,{"aria-hidden":"true"})}):null}),live:c,loading:!i,panel:s,sessionHeader:t?r.jsx(d.Suspense,{fallback:null,children:r.jsx(Yn,{session:t})}):void 0,tray:de&&n?r.jsx(d.Suspense,{fallback:r.jsx("p",{role:"status",children:"Loading AI composer…"}),children:r.jsx(Jn,{folder:n,open:k,onClose:()=>{S(!1),N(!0),w(!1)},note:C&&i?{path:i.path,content:i.content}:void 0})}):void 0,renderer:i?{document:i,metadata:l,folder:n,session:t,selection:m&&O,documentHref:Y,SelectionPopup:Qn}:void 0})})}function Gn(){const e=J(window.location.href);return e.document?r.jsxs(me,{client:xe,children:[r.jsx(Xn,{path:e.document,folder:e.folder,session:e.session,embedded:e.embedded,panel:e.panel},`${e.folder}:${e.document}`),r.jsx(ge,{})]}):null}const ht=Object.freeze(Object.defineProperty({__proto__:null,DocumentPage:Gn},Symbol.toStringTag,{value:"Module"}));export{ht as d,mt as s};
|
|
23
|
+
leading-[1.6]`,children:e.content}):e.kind==="code"?r.jsx(Ln,{document:e}):e.kind==="image"?r.jsx(Rn,{document:e}):e.kind==="table"?r.jsx(En,{document:e}):e.kind==="eml"?r.jsx(Mn,{document:e}):r.jsx(Pn,{document:e});return r.jsxs("article",{className:"min-h-0 flex-1 overflow-auto px-6 py-5",style:{paddingBottom:"calc(var(--ask-tray-height, 0px) + 20px)"},children:[n.entries.length?r.jsx(_n,{entries:n.entries}):null,g]})}function Dn({renderer:e,embedded:n=!1,error:t,header:o,live:s=!1,loading:a=!1,panel:c=!1,sessionHeader:i,tray:l}){return r.jsxs("section",{className:"markdown-page","data-embedded":n||c?"true":void 0,"data-panel":c?"true":void 0,children:[o,i,s?r.jsxs("div",{className:"pop-live",role:"status",children:[r.jsx("span",{"aria-hidden":"true",children:"●"})," Live — refreshing on save"]}):null,t?r.jsx("p",{role:"alert",className:"p-6",children:t}):e?r.jsx(qn,{...e}):a?r.jsx("p",{role:"status",className:"p-6",children:"Loading file…"}):null,l]})}function _(e){const n=()=>x.success("Copied to clipboard"),t=()=>{const o=document.createElement("textarea");o.value=e,o.style.cssText="position:fixed;opacity:0",document.body.append(o),o.select();const s=document.execCommand("copy");if(o.remove(),!s)return x.error("Could not copy path");n()};if(!navigator.clipboard)return t();navigator.clipboard.writeText(e).then(n,t)}function re(e){return new URL(e,window.location.origin).searchParams}async function Tn(e,n){return _e.document(e,n)}function Un(e){if(e.rawUrl)return`${e.rawUrl}${e.rawUrl.includes("?")?"&":"?"}download=1`;if(e.root){const n=new URL("/api/raw",window.location.origin);return n.searchParams.set("path",e.root),n.searchParams.set("file",e.path),n.searchParams.set("download","1"),`${n.pathname}${n.search}`}}function W(e){try{const n=new URL(e);return n.username||n.password||n.protocol!=="https:"&&n.protocol!=="http:"||n.protocol==="http:"&&n.hostname!=="localhost"&&!n.hostname.startsWith("127.")&&n.hostname!=="[::1]"?void 0:n.origin}catch{return}}function In(e,n,t){const{panel:o}=J(e);if(!o)return[];const a=new URL(e,"http://127.0.0.1").searchParams.get("host");if(a!==null){const i=W(a);return i?[i]:[]}const c=new Set;for(const i of[n,t]){const l=i?W(i):void 0;l&&c.add(l)}return[...c]}function zn(e,n){return n.includes(e)}function Hn(e){if(!e||typeof e!="object")return;const n=e;if(n.type==="kennel:close")return{type:"kennel:close"};if(n.type==="kennel:resize")return{type:"kennel:resize"};if(n.type==="kennel:request"&&(n.request==="state"||n.request==="selection"))return{type:"kennel:request",request:n.request}}function Bn(e,n,t){return e===n||e===t}function Fn(e){const n=o=>{if(!zn(o.origin,e.allowedOrigins))return;const s=e.windowRef();if(!s||!Bn(o.source,s.parent,s.opener))return;const a=Hn(o.data);if(a)switch(a.type){case"kennel:close":e.onClose?.();break;case"kennel:resize":e.onResize?.();break;case"kennel:request":e.onRequest?.(a.request);break}},t=e.windowRef();return t?.addEventListener("message",n),e.post({type:"kennel:ready",payload:oe()}),()=>{t?.removeEventListener("message",n)}}function oe(){const e=document.documentElement.scrollWidth||document.documentElement.clientWidth;return{height:document.documentElement.scrollHeight||document.documentElement.clientHeight,url:window.location.href,width:e}}function K(e,n){return{...oe(),...e?{path:e}:{},...n?{title:n}:{}}}function Q(e,n){return{text:window.getSelection()?.toString().trim()??"",url:window.location.href,...e?{path:e}:{},...n?{title:n}:{}}}function Vn(e){e({type:"kennel:closed"}),window.close()}function Wn({href:e,folder:n,path:t,source:o}){const s=re(e).get("watch")==="1";return pe({gcTime:30*6e4,queryKey:["document",n?fe(n):"dropped",t],queryFn:async()=>{if(n?.startsWith("/"))return Tn(e,t);const a=await o.read(),c=a.documents.find(i=>i.path===t);if(!c)throw new Error("Document not found.");return Xe(Response.json({...c,root:a.root}))},refetchInterval:s?1500:void 0,staleTime:15e3})}function Kn(e){const n=we(),t=new URLSearchParams(window.location.search).get("collection");return r.jsx(Se,{folder:n.folder,name:n.document?.title,icon:n.kind==="document"?r.jsx(X,{"aria-hidden":"true"}):void 0,workspace:n.workspace,folderHref:o=>j(o,"notes"),collectionHref:n.folder?o=>I(n.folder,o):void 0,homeHref:n.folder?j(n.folder,"notes"):void 0,page:n.folder&&n.document?{title:n.document.title,href:Y(n.folder,n.document.path)}:void 0,...e,accessory:r.jsxs(r.Fragment,{children:[n.folder&&t?r.jsx("a",{className:"text-sm underline",href:I(n.folder,t),children:"Back to collection"}):null,e.accessory]}),children:n.workspaceError?r.jsx("small",{role:"status",children:"Folder path unavailable."}):null})}const Qn=d.lazy(async()=>({default:(await L(async()=>{const{SelectionPopup:e}=await import("./selection-popup-DPC2dc_s.js");return{SelectionPopup:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]))).SelectionPopup})),Jn=d.lazy(async()=>({default:(await L(async()=>{const{AskTray:e}=await import("./ask-tray-DpWLca3e.js");return{AskTray:e}},__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,22,27,24,13]))).AskTray})),Yn=d.lazy(async()=>({default:(await L(async()=>{const{LinkedSessionHeader:e}=await import("./linked-session-header-D4SUBW0L.js");return{LinkedSessionHeader:e}},__vite__mapDeps([28,1,2,29,9]))).LinkedSessionHeader}));function Xn({path:e,folder:n,session:t,embedded:o=!1,panel:s=!1}){const a=Wn({href:window.location.href,folder:n,path:e,source:ve}),c=re(window.location.href).get("watch")==="1",i=a.data,l=d.useMemo(()=>i?.kind==="markdown"?je(i.content):{body:i?.content??"",entries:[],lineOffset:0,title:void 0},[i]),u=d.useMemo(()=>({path:e,title:l.title??e.split("/").at(-1)??e}),[e,l.title]),{enabled:m,setEnabled:w}=ke(),{draft:g}=be(n??""),[k,S]=d.useState(!1),[ie,N]=d.useState(!1),R=Ee().data,A=!!n?.startsWith("/"),E=R?.hostActions==="local",O=R?.acp===!0,C=O&&A&&!!(i&&i.kind!=="html"&&i.content),M=i?.root?`${i.root.replace(/\/+$/,"")}/${i.path}`:e,se=()=>{const f=window.location.href,p=()=>_(f);if(!navigator.share){p();return}navigator.share({title:u.title,text:`${u.title} — Kennel preview`,url:f}).catch(y=>{y instanceof DOMException&&y.name==="AbortError"||p()})},ae=()=>{const f=i?Un(i):void 0;if(!f||!i){x.error("This preview cannot be downloaded");return}const p=window.document.createElement("a");p.href=f,p.download=i.path.split("/").at(-1)??"download",window.document.body.append(p),p.click(),p.remove()},P=C&&i?.kind==="markdown"?{kind:"checkbox",id:"selection",label:"AI text selection",icon:r.jsx(He,{"aria-hidden":"true"}),description:"Select text to ask about it",checked:m,run:f=>{w(f),N(!1)}}:null,ce=C?[{kind:"separator"},{kind:"label",label:"AI"},{kind:"item",id:"ask",label:"Ask AI…",icon:r.jsx(Je,{"aria-hidden":"true"}),description:"Ask about this document",run:()=>{S(!0),N(!1)}},...P?[P]:[],{kind:"separator"}]:[],q=R?.download!==!1?{kind:"item",id:"download",label:"Download",icon:r.jsx(Ie,{"aria-hidden":"true"}),disabled:!i,disabledReason:"This preview cannot be downloaded",run:ae}:null,D=E&&n?{kind:"item",id:"folder",label:"Open containing folder",icon:r.jsx(Me,{"aria-hidden":"true"}),run:()=>{const f=e.includes("/")?`${n}/${e.slice(0,e.lastIndexOf("/"))}`:n;window.location.assign(j(f,"notes"))}}:null,T=E&&A&&i?.kind==="markdown"?{kind:"item",id:"open-default",label:"Open in default app",icon:r.jsx(We,{"aria-hidden":"true"}),run:()=>{Le(M).catch(f=>x.error(f instanceof Error?f.message:"Could not open file."))}}:null,le=[{kind:"label",label:"File"},{kind:"item",id:"copy",label:"Copy file path",icon:r.jsx(X,{"aria-hidden":"true"}),disabled:!i,disabledReason:"Loading file…",run:()=>_(M)},...D?[D]:[],...T?[T]:[],...q?[q]:[],...ce,{kind:"label",label:"Navigate"},{kind:"item",id:"back",label:"Back",icon:r.jsx(qe,{"aria-hidden":"true"}),run:()=>window.history.back()},{kind:"item",id:"forward",label:"Forward",icon:r.jsx(Te,{"aria-hidden":"true"}),run:()=>window.history.forward()},{kind:"separator"},{kind:"label",label:"Share"},{kind:"item",id:"share",label:"Share preview…",icon:r.jsx(H,{"aria-hidden":"true"}),run:se},{kind:"item",id:"copy-link",label:"Copy link",icon:r.jsx(Fe,{"aria-hidden":"true"}),run:()=>_(window.location.href)},{kind:"separator"},{kind:"item",id:"close",label:"Close preview",icon:r.jsx(Oe,{"aria-hidden":"true"}),variant:"destructive",run:()=>window.location.assign(n?j(n,"notes"):"/")}],de=A&&!ie&&(k||m||g.comments.length>0||g.attachments.length>0),b=d.useRef(null);return d.useEffect(()=>{if(!s){b.current=null;return}const f=In(window.location.href,window.document.referrer,window.opener?.origin);if(!f.length){x.error("Chat panel bridge has no trusted host origin");return}const p=v=>{for(const U of[window.parent,window.opener])if(U)try{U.postMessage(v,f[0])}catch{}},y=Fn({allowedOrigins:f,post:p,windowRef:()=>window,onClose:()=>Vn(p),onResize:()=>p({type:"kennel:state",payload:K(i?.path,u.title)}),onRequest:v=>{v==="selection"?p({type:"kennel:selection",payload:Q(i?.path,u.title)}):v==="state"&&p({type:"kennel:state",payload:K(i?.path,u.title)})}}),ue=()=>{p({type:"kennel:selection",payload:Q(i?.path,u.title)})};return b.current=ue,()=>{y(),b.current=null}},[i,s,u.title]),r.jsx(ye,{kind:"document",folder:n,document:u,children:r.jsx(Dn,{embedded:o,error:a.error?.message,header:r.jsx(Kn,{options:r.jsx(Re,{actions:le}),accessory:s?r.jsx("button",{type:"button",className:"app-options-trigger","aria-label":"Send selection to chat",title:"Send selection to chat",onClick:()=>b.current?.(),children:r.jsx(H,{"aria-hidden":"true"})}):null}),live:c,loading:!i,panel:s,sessionHeader:t?r.jsx(d.Suspense,{fallback:null,children:r.jsx(Yn,{session:t})}):void 0,tray:de&&n?r.jsx(d.Suspense,{fallback:r.jsx("p",{role:"status",children:"Loading AI composer…"}),children:r.jsx(Jn,{folder:n,open:k,onClose:()=>{S(!1),N(!0),w(!1)},note:C&&i?{path:i.path,content:i.content}:void 0})}):void 0,renderer:i?{document:i,metadata:l,folder:n,session:t,selection:m&&O,documentHref:Y,SelectionPopup:Qn}:void 0})})}function Gn(){const e=J(window.location.href);return e.document?r.jsxs(me,{client:xe,children:[r.jsx(Xn,{path:e.document,folder:e.folder,session:e.session,embedded:e.embedded,panel:e.panel},`${e.folder}:${e.document}`),r.jsx(ge,{})]}):null}const ht=Object.freeze(Object.defineProperty({__proto__:null,DocumentPage:Gn},Symbol.toStringTag,{value:"Module"}));export{ht as d,mt as s};
|