cc-viewer 1.8.11 → 1.8.13
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/assets/{App-vpm6omRY.js → App-R6odqLoE.js} +2 -2
- package/dist/assets/MdxEditorPanel-CTqsETwc.js +1 -0
- package/dist/assets/{Mobile-BHIBdqHs.js → Mobile-o_QrQ_eI.js} +1 -1
- package/dist/assets/{ProxyStatsModal-DdV7wN2V.js → ProxyStatsModal-CM2H8JYh.js} +1 -1
- package/dist/assets/{_baseUniq-C2FCldN4.js → _baseUniq-B3e4JaL0.js} +1 -1
- package/dist/assets/{arc-CSzd_bdT.js → arc-DnoPn_qY.js} +1 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-DrPKTbxH.js +1 -0
- package/dist/assets/blockDiagram-DXYQGD6D-CEaO0Vcw.js +1 -0
- package/dist/assets/c4Diagram-AHTNJAMY-BLaawFeg.js +1 -0
- package/dist/assets/{channel-xMmQtLq9.js → channel-DnYR1fF4.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DnFoMzQG.js → chunk-4BX2VUAB-Bfd4edKZ.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-Dc5reuwv.js → chunk-4TB4RGXK-t2nMQmY7.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DTKTLKcJ.js → chunk-55IACEB6-C6tLOjGX.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-BNqgeN9r.js → chunk-EDXVE4YY-dWCvxbCb.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DzJVZ11t.js → chunk-FMBD7UC4-BHELZLPK.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-CjYwzMor.js → chunk-OYMX7WX6-C8XTkH1S.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-C0KVKecr.js → chunk-QZHKN3VN-CD0j6SAs.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-3VhNeNVm.js → chunk-YZCP3GAM-D4dKfXJJ.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-BecPAAuk.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-BecPAAuk.js +1 -0
- package/dist/assets/clone-B0_ghF3F.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-BF2HsiSD.js +1 -0
- package/dist/assets/dagre-KV5264BT-f3h967yx.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-B9PzHQfh.js +1 -0
- package/dist/assets/diagram-G4DWMVQ6-kR953Bqm.js +1 -0
- package/dist/assets/diagram-MMDJMWI5-DAewa2eg.js +1 -0
- package/dist/assets/diagram-TYMM5635-C8HNTH6I.js +1 -0
- package/dist/assets/erDiagram-SMLLAGMA-BQ5P8wWK.js +1 -0
- package/dist/assets/flowDiagram-DWJPFMVM-BIpEkrMR.js +1 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-CWqSfB5v.js +1 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-Ba-9yEbQ.js +1 -0
- package/dist/assets/{graph-CwiXMdRR.js → graph-D3zXKQ6P.js} +1 -1
- package/dist/assets/index--yjDHxJD.js +2 -0
- package/dist/assets/index-Bm3A5VLb.js +1 -0
- package/dist/assets/index-C9N0rZ7Z.js +1 -0
- package/dist/assets/index-DClD_EkN.js +1 -0
- package/dist/assets/index-DSd5P3WQ.js +1 -0
- package/dist/assets/index-G3xd-gLo.js +1 -0
- package/dist/assets/index-HLrnYsI1.js +1 -0
- package/dist/assets/index-Q8wp4Nof.js +1 -0
- package/dist/assets/infoDiagram-42DDH7IO-Cxm79ZJR.js +1 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-Cd0vZP1B.js +1 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-B2b57HXk.js +1 -0
- package/dist/assets/{jszip.min-Bq1JxqcN.js → jszip.min-Bj5uiEb2.js} +1 -1
- package/dist/assets/kanban-definition-6JOO6SKY-YCERiUCO.js +1 -0
- package/dist/assets/{layout-BQFiWq71.js → layout-Do5TlO2U.js} +1 -1
- package/dist/assets/{linear-BNV4po81.js → linear-BiJNTDgN.js} +1 -1
- package/dist/assets/{mermaid.core-DvwEdatr.js → mermaid.core-Dg0McRZt.js} +2 -2
- package/dist/assets/{min-DFik8k4L.js → min-T51iefht.js} +1 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-Cu_GJxY3.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-DldHHZXi.js +1 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-BzyTPNAJ.js +1 -0
- package/dist/assets/requirementDiagram-MS252O5E-C5xxFkvG.js +1 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-OxdjoaE1.js +1 -0
- package/dist/assets/seqResourceLoaders-BgeRQt8C.js +2 -0
- package/dist/assets/{seqResourceLoaders-1EWxJwEP.css → seqResourceLoaders-Xx6a8E03.css} +2 -2
- package/dist/assets/sequenceDiagram-FGHM5R23-C7c89uIS.js +1 -0
- package/dist/assets/stateDiagram-FHFEXIEX-ssdJnDrO.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-BP-0WClK.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-sWScEpSM.js +1 -0
- package/dist/assets/{vendor-antd-BTBRwbax.js → vendor-antd-DKIytXho.js} +1 -1
- package/dist/assets/vendor-codemirror-4qgXq03k.js +1 -0
- package/dist/assets/vendor-mdxeditor-D5Z5D9fq.js +2 -0
- package/dist/assets/{vendor-qrcode-E9ld0lSz.js → vendor-qrcode-B7lb5qk1.js} +1 -1
- package/dist/assets/vendor-virtuoso-BqoXlbhH.js +1 -0
- package/dist/assets/vennDiagram-DHZGUBPP-DNfXR0ge.js +1 -0
- package/dist/assets/{wardley-RL74JXVD-BFcIn2-Q.js → wardley-RL74JXVD-JXd--CRD.js} +1 -1
- package/dist/assets/wardleyDiagram-NUSXRM2D-DHmNyVPM.js +1 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-CTb0gltZ.js +1 -0
- package/dist/index.html +4 -5
- package/package.json +1 -1
- package/server/routes/files-content.js +2 -1
- package/server/routes/files-fs.js +3 -1
- package/dist/assets/MdxEditorPanel-CpknU7SR.js +0 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-CjEbBe2R.js +0 -1
- package/dist/assets/blockDiagram-DXYQGD6D-BYzl2ukW.js +0 -1
- package/dist/assets/c4Diagram-AHTNJAMY-0x0_8O_X.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DdUtH789.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-DdUtH789.js +0 -1
- package/dist/assets/clone-C6d2XDvR.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-DGE02sJS.js +0 -1
- package/dist/assets/dagre-KV5264BT-CY4eCcwS.js +0 -1
- package/dist/assets/diagram-5BDNPKRD-DHq2THYn.js +0 -1
- package/dist/assets/diagram-G4DWMVQ6-DD_76oJg.js +0 -1
- package/dist/assets/diagram-MMDJMWI5-BvQxk1jl.js +0 -1
- package/dist/assets/diagram-TYMM5635-B_tMXPJl.js +0 -1
- package/dist/assets/erDiagram-SMLLAGMA-DpuGbN9e.js +0 -1
- package/dist/assets/flowDiagram-DWJPFMVM-BW0xGFBf.js +0 -1
- package/dist/assets/ganttDiagram-T4ZO3ILL-BSzTiT93.js +0 -1
- package/dist/assets/gitGraphDiagram-UUTBAWPF-1tsgBlcn.js +0 -1
- package/dist/assets/index-9e6BGquk.js +0 -1
- package/dist/assets/index-BmpXfVQ8.js +0 -1
- package/dist/assets/index-CZWNaOo8.js +0 -1
- package/dist/assets/index-Cixs7aRD.js +0 -1
- package/dist/assets/index-Ct6Fi103.js +0 -1
- package/dist/assets/index-DIAMN9QO.js +0 -1
- package/dist/assets/index-DhjwHRxk.js +0 -1
- package/dist/assets/index-tnWldUm3.js +0 -2
- package/dist/assets/infoDiagram-42DDH7IO-Dk1ESZFk.js +0 -1
- package/dist/assets/ishikawaDiagram-UXIWVN3A-DcPyNwkI.js +0 -1
- package/dist/assets/journeyDiagram-VCZTEJTY-CZWieu1U.js +0 -1
- package/dist/assets/kanban-definition-6JOO6SKY-S1sSSTKx.js +0 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-CebeX76u.js +0 -1
- package/dist/assets/pieDiagram-DEJITSTG-DMB5JbMP.js +0 -1
- package/dist/assets/quadrantDiagram-34T5L4WZ-BAYzoLVo.js +0 -1
- package/dist/assets/requirementDiagram-MS252O5E-CUQoAuOc.js +0 -1
- package/dist/assets/sankeyDiagram-XADWPNL6-Dt0AQuLW.js +0 -1
- package/dist/assets/seqResourceLoaders-C-QHRkUq.js +0 -2
- package/dist/assets/sequenceDiagram-FGHM5R23-HyZFUlMU.js +0 -1
- package/dist/assets/stateDiagram-FHFEXIEX-B8x24fuD.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-2qtHlnwO.js +0 -1
- package/dist/assets/timeline-definition-GMOUNBTQ-TnbjDVtB.js +0 -1
- package/dist/assets/vendor-codemirror-CPWlhuQ1.js +0 -1
- package/dist/assets/vendor-mdxeditor-Cy5Xg_90.js +0 -2
- package/dist/assets/vendor-virtuoso-Bq6QMhgG.js +0 -1
- package/dist/assets/vennDiagram-DHZGUBPP-BqgIjkBO.js +0 -1
- package/dist/assets/wardleyDiagram-NUSXRM2D-CYDWQLb6.js +0 -1
- package/dist/assets/xychartDiagram-5P7HB3ND-zfusE3BC.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _a;import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,l as log,H as selectSvgElement,e as configureSvgSize,y as clear,c as getConfig2$1,i as sanitizeText}from"./mermaid.core-Dg0McRZt.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-Bfd4edKZ.js";import{p as parse}from"./wardley-RL74JXVD-JXd--CRD.js";import"./vendor-mdxeditor-D5Z5D9fq.js";import"./vendor-antd-DKIytXho.js";import"./vendor-codemirror-4qgXq03k.js";import"./vendor-markdown-DOJHsAxX.js";import"./min-T51iefht.js";import"./_baseUniq-B3e4JaL0.js";var toPercent=__name((value,context)=>{const normalized=value<=1?100*value:value;if(normalized<0||normalized>100)throw new Error(`${context} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${value}`);return normalized},"toPercent"),toCoordinates=__name((visibility,evolution,context)=>({x:toPercent(evolution,`${context} evolution`),y:toPercent(visibility,`${context} visibility`)}),"toCoordinates"),getFlowFromPort=__name(port=>{if(port)return"+<>"===port?"bidirectional":"+<"===port?"backward":"+>"===port?"forward":void 0},"getFlowFromPort"),extractFlowFromArrow=__name(arrow=>{if(!(null==arrow?void 0:arrow.startsWith("+")))return{};const labelMatch=/^\+'([^']*)'/.exec(arrow),flowLabel=null==labelMatch?void 0:labelMatch[1];return arrow.includes("<>")?{flow:"bidirectional",label:flowLabel}:arrow.includes("<")?{flow:"backward",label:flowLabel}:arrow.includes(">")?{flow:"forward",label:flowLabel}:{label:flowLabel}},"extractFlowFromArrow"),populateDb=__name((ast,db)=>{if(populateCommonDb(ast,db),ast.size&&db.setSize(ast.size.width,ast.size.height),ast.evolution){const stages=ast.evolution.stages.map(stage=>stage.secondName?`${stage.name.trim()} / ${stage.secondName.trim()}`:stage.name.trim()),stageBoundaries=ast.evolution.stages.filter(stage=>void 0!==stage.boundary).map(stage=>stage.boundary);db.updateAxes({stages:stages,stageBoundaries:stageBoundaries})}if(ast.anchors.forEach(anchor=>{const coords=toCoordinates(anchor.visibility,anchor.evolution,`Anchor "${anchor.name}"`);db.addNode(anchor.name,anchor.name,coords.x,coords.y,"anchor")}),ast.components.forEach(component=>{var _a2;const coords=toCoordinates(component.visibility,component.evolution,`Component "${component.name}"`),labelOffsetX=component.label?(component.label.negX?-1:1)*component.label.offsetX:void 0,labelOffsetY=component.label?(component.label.negY?-1:1)*component.label.offsetY:void 0,sourceStrategy=null==(_a2=component.decorator)?void 0:_a2.strategy;db.addNode(component.name,component.name,coords.x,coords.y,"component",labelOffsetX,labelOffsetY,component.inertia,sourceStrategy)}),ast.notes.forEach(note=>{const coords=toCoordinates(note.visibility,note.evolution,`Note "${note.text}"`);db.addNote(note.text,coords.x,coords.y)}),ast.pipelines.forEach(pipeline=>{const parentNode=db.getNode(pipeline.parent);if(!parentNode||"number"!=typeof parentNode.y)throw new Error(`Pipeline "${pipeline.parent}" must reference an existing component with coordinates.`);const parentY=parentNode.y;db.startPipeline(pipeline.parent),pipeline.components.forEach(component=>{const componentId=`${pipeline.parent}_${component.name}`,labelOffsetX=component.label?(component.label.negX?-1:1)*component.label.offsetX:void 0,labelOffsetY=component.label?(component.label.negY?-1:1)*component.label.offsetY:void 0,x=toPercent(component.evolution,`Pipeline component "${component.name}" evolution`);db.addNode(componentId,component.name,x,parentY,"pipeline-component",labelOffsetX,labelOffsetY),db.addPipelineComponent(pipeline.parent,componentId)})}),ast.links.forEach(link=>{const isDashed=!!link.arrow&&(link.arrow.includes("-.->")||link.arrow.includes(".-."));let flow=getFlowFromPort(link.fromPort)??getFlowFromPort(link.toPort);const{flow:arrowFlow,label:flowLabel}=extractFlowFromArrow(link.arrow);!flow&&arrowFlow&&(flow=arrowFlow);const annotation=link.linkLabel,label=flowLabel??annotation;db.addLink(link.from,link.to,isDashed,label,flow)}),ast.evolves.forEach(evolve=>{const node=db.getNode(evolve.component);if(void 0!==(null==node?void 0:node.y)){const target=toPercent(evolve.target,`Evolve target for "${evolve.component}"`);db.addTrend(evolve.component,target,node.y)}}),ast.annotations.length>0){const annotationsBox=ast.annotations[0],coords=toCoordinates(annotationsBox.x,annotationsBox.y,"Annotations box");db.setAnnotationsBox(coords.x,coords.y)}ast.annotation.forEach(annotation=>{const coords=toCoordinates(annotation.x,annotation.y,`Annotation ${annotation.number}`);db.addAnnotation(annotation.number,[{x:coords.x,y:coords.y}],annotation.text)}),ast.accelerators.forEach(accelerator=>{const coords=toCoordinates(accelerator.x,accelerator.y,`Accelerator "${accelerator.name}"`);db.addAccelerator(accelerator.name,coords.x,coords.y)}),ast.deaccelerators.forEach(deaccelerator=>{const coords=toCoordinates(deaccelerator.x,deaccelerator.y,`Deaccelerator "${deaccelerator.name}"`);db.addDeaccelerator(deaccelerator.name,coords.x,coords.y)})},"populateDb"),parser={parser:{yy:void 0},parse:__name(async input=>{var _a2;const ast=await parse("wardley",input);log.debug(ast);const db=null==(_a2=parser.parser)?void 0:_a2.yy;if(!db||"function"!=typeof db.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");populateDb(ast,db)},"parse")},builder=new(__name(_a=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(node){const existing=this.nodes.get(node.id)??{id:node.id,label:node.label},merged={...existing,...node,className:node.className??existing.className,labelOffsetX:node.labelOffsetX??existing.labelOffsetX,labelOffsetY:node.labelOffsetY??existing.labelOffsetY};this.nodes.set(node.id,merged)}addLink(link){this.links.push(link)}addTrend(trend){this.trends.set(trend.nodeId,trend)}startPipeline(nodeId){this.pipelines.set(nodeId,{nodeId:nodeId,componentIds:[]});const node=this.nodes.get(nodeId);node&&(node.isPipelineParent=!0)}addPipelineComponent(pipelineNodeId,componentId){const pipeline=this.pipelines.get(pipelineNodeId);pipeline&&pipeline.componentIds.push(componentId);const node=this.nodes.get(componentId);node&&(node.inPipeline=!0)}addAnnotation(annotation){this.annotations.push(annotation)}addNote(note){this.notes.push(note)}addAccelerator(accelerator){this.accelerators.push(accelerator)}addDeaccelerator(deaccelerator){this.deaccelerators.push(deaccelerator)}setAnnotationsBox(x,y){this.annotationsBox={x:x,y:y}}setAxes(partial){this.axes={...this.axes,...partial}}setSize(width,height){this.size={width:width,height:height}}getNode(id){return this.nodes.get(id)}build(){const nodes=[];for(const node of this.nodes.values()){if("number"!=typeof node.x||"number"!=typeof node.y)throw new Error(`Node "${node.label}" is missing coordinates`);nodes.push(node)}return{nodes:nodes,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},"WardleyBuilder"),_a);function textSanitizer(text){const config=getConfig2$1();return sanitizeText(text.trim(),config)}function getConfig2(){return getConfig2$1()["wardley-beta"]}function addNode(id,label,x,y,className,labelOffsetX,labelOffsetY,inertia,sourceStrategy){builder.addNode({id:id,label:textSanitizer(label),x:x,y:y,className:className,labelOffsetX:labelOffsetX,labelOffsetY:labelOffsetY,inertia:inertia,sourceStrategy:sourceStrategy})}function addLink(sourceId,targetId,dashed=!1,label,flow){builder.addLink({source:sourceId,target:targetId,dashed:dashed,label:label,flow:flow})}function addTrend(nodeId,targetX,targetY){builder.addTrend({nodeId:nodeId,targetX:targetX,targetY:targetY})}function addAnnotation(number,coordinates,text){builder.addAnnotation({number:number,coordinates:coordinates,text:text?textSanitizer(text):void 0})}function addNote(text,x,y){builder.addNote({text:textSanitizer(text),x:x,y:y})}function addAccelerator(name,x,y){builder.addAccelerator({name:textSanitizer(name),x:x,y:y})}function addDeaccelerator(name,x,y){builder.addDeaccelerator({name:textSanitizer(name),x:x,y:y})}function setAnnotationsBox(x,y){builder.setAnnotationsBox(x,y)}function setSize(width,height){builder.setSize(width,height)}function startPipeline(nodeId){builder.startPipeline(nodeId)}function addPipelineComponent(pipelineNodeId,componentId){builder.addPipelineComponent(pipelineNodeId,componentId)}function updateAxes(partial){const sanitized={};partial.xLabel&&(sanitized.xLabel=textSanitizer(partial.xLabel)),partial.yLabel&&(sanitized.yLabel=textSanitizer(partial.yLabel)),partial.stages&&(sanitized.stages=partial.stages.map(stage=>textSanitizer(stage))),partial.stageBoundaries&&(sanitized.stageBoundaries=partial.stageBoundaries),builder.setAxes(sanitized)}function getNode(id){return builder.getNode(id)}function getWardleyData(){return builder.build()}function clear2(){builder.clear(),clear()}__name(textSanitizer,"textSanitizer"),__name(getConfig2,"getConfig"),__name(addNode,"addNode"),__name(addLink,"addLink"),__name(addTrend,"addTrend"),__name(addAnnotation,"addAnnotation"),__name(addNote,"addNote"),__name(addAccelerator,"addAccelerator"),__name(addDeaccelerator,"addDeaccelerator"),__name(setAnnotationsBox,"setAnnotationsBox"),__name(setSize,"setSize"),__name(startPipeline,"startPipeline"),__name(addPipelineComponent,"addPipelineComponent"),__name(updateAxes,"updateAxes"),__name(getNode,"getNode"),__name(getWardleyData,"getWardleyData"),__name(clear2,"clear");var wardleyDb_default={getConfig:getConfig2,addNode:addNode,addLink:addLink,addTrend:addTrend,addAnnotation:addAnnotation,addNote:addNote,addAccelerator:addAccelerator,addDeaccelerator:addDeaccelerator,setAnnotationsBox:setAnnotationsBox,setSize:setSize,startPipeline:startPipeline,addPipelineComponent:addPipelineComponent,updateAxes:updateAxes,getNode:getNode,getWardleyData:getWardleyData,clear:clear2,setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription},DEFAULT_STAGES=["Genesis","Custom Built","Product","Commodity"],getTheme=__name(()=>{var _a2,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l;const{themeVariables:themeVariables}=getConfig2$1();return{backgroundColor:(null==(_a2=themeVariables.wardley)?void 0:_a2.backgroundColor)??themeVariables.background??"#fff",axisColor:(null==(_b=themeVariables.wardley)?void 0:_b.axisColor)??"#000",axisTextColor:(null==(_c=themeVariables.wardley)?void 0:_c.axisTextColor)??themeVariables.primaryTextColor??"#222",gridColor:(null==(_d=themeVariables.wardley)?void 0:_d.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:(null==(_e=themeVariables.wardley)?void 0:_e.componentFill)??"#fff",componentStroke:(null==(_f=themeVariables.wardley)?void 0:_f.componentStroke)??"#000",componentLabelColor:(null==(_g=themeVariables.wardley)?void 0:_g.componentLabelColor)??themeVariables.primaryTextColor??"#222",linkStroke:(null==(_h=themeVariables.wardley)?void 0:_h.linkStroke)??"#000",evolutionStroke:(null==(_i=themeVariables.wardley)?void 0:_i.evolutionStroke)??"#dc3545",annotationStroke:(null==(_j=themeVariables.wardley)?void 0:_j.annotationStroke)??"#000",annotationTextColor:(null==(_k=themeVariables.wardley)?void 0:_k.annotationTextColor)??themeVariables.primaryTextColor??"#222",annotationFill:(null==(_l=themeVariables.wardley)?void 0:_l.annotationFill)??themeVariables.background??"#fff"}},"getTheme"),getConfigValues=__name(()=>{const wardleyConfig=getConfig2$1()["wardley-beta"];return{width:(null==wardleyConfig?void 0:wardleyConfig.width)??900,height:(null==wardleyConfig?void 0:wardleyConfig.height)??600,padding:(null==wardleyConfig?void 0:wardleyConfig.padding)??48,nodeRadius:(null==wardleyConfig?void 0:wardleyConfig.nodeRadius)??6,nodeLabelOffset:(null==wardleyConfig?void 0:wardleyConfig.nodeLabelOffset)??8,axisFontSize:(null==wardleyConfig?void 0:wardleyConfig.axisFontSize)??12,labelFontSize:(null==wardleyConfig?void 0:wardleyConfig.labelFontSize)??10,showGrid:(null==wardleyConfig?void 0:wardleyConfig.showGrid)??!1,useMaxWidth:(null==wardleyConfig?void 0:wardleyConfig.useMaxWidth)??!0}},"getConfigValues"),diagram={parser:parser,db:wardleyDb_default,renderer:{draw:__name((text,id,_version,diagObj)=>{var _a2,_b;log.debug("Rendering Wardley map\n"+text);const configValues=getConfigValues(),theme=getTheme(),squareSize=1.6*configValues.nodeRadius,db=diagObj.db,data=db.getWardleyData(),title=db.getDiagramTitle(),width=(null==(_a2=data.size)?void 0:_a2.width)??configValues.width,height=(null==(_b=data.size)?void 0:_b.height)??configValues.height,svg=selectSvgElement(id);svg.selectAll("*").remove(),configureSvgSize(svg,height,width,configValues.useMaxWidth),svg.attr("viewBox",`0 0 ${width} ${height}`);const root=svg.append("g").attr("class","wardley-map"),defs=svg.append("defs");defs.append("marker").attr("id",`arrow-${id}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",theme.evolutionStroke).attr("stroke","none"),defs.append("marker").attr("id",`link-arrow-end-${id}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",theme.linkStroke).attr("stroke","none"),defs.append("marker").attr("id",`link-arrow-start-${id}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",theme.linkStroke).attr("stroke","none"),root.append("rect").attr("class","wardley-background").attr("width",width).attr("height",height).attr("fill",theme.backgroundColor);const chartWidth=width-2*configValues.padding,chartHeight=height-2*configValues.padding;title&&root.append("text").attr("class","wardley-title").attr("x",width/2).attr("y",configValues.padding/2).attr("fill",theme.axisTextColor).attr("font-size",1.05*configValues.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(title);const projectX=__name(value=>configValues.padding+value/100*chartWidth,"projectX"),projectY=__name(value=>height-configValues.padding-value/100*chartHeight,"projectY"),axisGroup=root.append("g").attr("class","wardley-axes");axisGroup.append("line").attr("x1",configValues.padding).attr("x2",width-configValues.padding).attr("y1",height-configValues.padding).attr("y2",height-configValues.padding).attr("stroke",theme.axisColor).attr("stroke-width",1),axisGroup.append("line").attr("x1",configValues.padding).attr("x2",configValues.padding).attr("y1",configValues.padding).attr("y2",height-configValues.padding).attr("stroke",theme.axisColor).attr("stroke-width",1);const xLabel=data.axes.xLabel??"Evolution",yLabel=data.axes.yLabel??"Visibility";axisGroup.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",configValues.padding+chartWidth/2).attr("y",height-configValues.padding/4).attr("fill",theme.axisTextColor).attr("font-size",configValues.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(xLabel),axisGroup.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",configValues.padding/3).attr("y",configValues.padding+chartHeight/2).attr("fill",theme.axisTextColor).attr("font-size",configValues.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${configValues.padding/3} ${configValues.padding+chartHeight/2})`).text(yLabel);const stages=data.axes.stages&&data.axes.stages.length>0?data.axes.stages:DEFAULT_STAGES;if(stages.length>0){const stageGroup=root.append("g").attr("class","wardley-stages"),boundaries=data.axes.stageBoundaries,stagePositions=[];if(boundaries&&boundaries.length===stages.length){let prevBoundary=0;boundaries.forEach(boundary=>{stagePositions.push({start:prevBoundary,end:boundary}),prevBoundary=boundary})}else{const stageWidth=1/stages.length;stages.forEach((_,index)=>{stagePositions.push({start:index*stageWidth,end:(index+1)*stageWidth})})}stages.forEach((stage,index)=>{const pos=stagePositions[index],startX=configValues.padding+pos.start*chartWidth,centerX=(startX+(configValues.padding+pos.end*chartWidth))/2;index>0&&stageGroup.append("line").attr("x1",startX).attr("x2",startX).attr("y1",configValues.padding).attr("y2",height-configValues.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),stageGroup.append("text").attr("class","wardley-stage-label").attr("x",centerX).attr("y",height-configValues.padding/1.5).attr("fill",theme.axisTextColor).attr("font-size",configValues.axisFontSize-2).attr("text-anchor","middle").text(stage)})}if(configValues.showGrid){const gridGroup=root.append("g").attr("class","wardley-grid");for(let i=1;i<4;i++){const ratio=i/4,x=configValues.padding+chartWidth*ratio;gridGroup.append("line").attr("x1",x).attr("x2",x).attr("y1",configValues.padding).attr("y2",height-configValues.padding).attr("stroke",theme.gridColor).attr("stroke-dasharray","2 6"),gridGroup.append("line").attr("x1",configValues.padding).attr("x2",width-configValues.padding).attr("y1",height-configValues.padding-chartHeight*ratio).attr("y2",height-configValues.padding-chartHeight*ratio).attr("stroke",theme.gridColor).attr("stroke-dasharray","2 6")}}const positions=new Map;if(data.nodes.forEach(node=>{positions.set(node.id,{x:projectX(node.x),y:projectY(node.y),node:node})}),data.pipelines.length>0){const pipelineGroup=root.append("g").attr("class","wardley-pipelines"),pipelineLinksGroup=root.append("g").attr("class","wardley-pipeline-links");data.pipelines.forEach(pipeline=>{if(0===pipeline.componentIds.length)return;const sortedComponents=pipeline.componentIds.map(id2=>({id:id2,pos:positions.get(id2),node:data.nodes.find(n=>n.id===id2)})).filter(c=>c.pos&&c.node).sort((a,b)=>a.node.x-b.node.x);for(let i=0;i<sortedComponents.length-1;i++){const current=sortedComponents[i],next=sortedComponents[i+1];pipelineLinksGroup.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",current.pos.x).attr("y1",current.pos.y).attr("x2",next.pos.x).attr("y2",next.pos.y).attr("stroke",theme.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let minX=1/0,maxX=-1/0,y=0;if(pipeline.componentIds.forEach(componentId=>{const pos=positions.get(componentId);pos&&(minX=Math.min(minX,pos.x),maxX=Math.max(maxX,pos.x),y=pos.y)}),minX!==1/0&&maxX!==-1/0){const padding=15,height2=4*configValues.nodeRadius,boxTop=y-height2/2,parentPos=positions.get(pipeline.nodeId);if(parentPos){const centerX=(minX+maxX)/2;parentPos.x=centerX,parentPos.y=boxTop-squareSize/6}pipelineGroup.append("rect").attr("class","wardley-pipeline-box").attr("x",minX-padding).attr("y",boxTop).attr("width",maxX-minX+2*padding).attr("height",height2).attr("fill","none").attr("stroke",theme.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const linksGroup=root.append("g").attr("class","wardley-links"),pipelineMap=new Map;data.pipelines.forEach(pipeline=>{pipelineMap.set(pipeline.nodeId,new Set(pipeline.componentIds))});const validLinks=data.links.filter(link=>{if(!positions.has(link.source)||!positions.has(link.target))return!1;const pipelineComponents=pipelineMap.get(link.target);return!(null==pipelineComponents?void 0:pipelineComponents.has(link.source))});linksGroup.selectAll("line").data(validLinks).enter().append("line").attr("class",link=>"wardley-link"+(link.dashed?" wardley-link--dashed":"")).attr("x1",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),radius=data.nodes.find(n=>n.id===link.source).isPipelineParent?squareSize/Math.sqrt(2):configValues.nodeRadius,dx=targetPos.x-sourcePos.x,dy=targetPos.y-sourcePos.y,distance=Math.sqrt(dx*dx+dy*dy);return sourcePos.x+dx/distance*radius}).attr("y1",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),radius=data.nodes.find(n=>n.id===link.source).isPipelineParent?squareSize/Math.sqrt(2):configValues.nodeRadius,dx=targetPos.x-sourcePos.x,dy=targetPos.y-sourcePos.y,distance=Math.sqrt(dx*dx+dy*dy);return sourcePos.y+dy/distance*radius}).attr("x2",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),radius=data.nodes.find(n=>n.id===link.target).isPipelineParent?squareSize/Math.sqrt(2):configValues.nodeRadius,dx=sourcePos.x-targetPos.x,dy=sourcePos.y-targetPos.y,distance=Math.sqrt(dx*dx+dy*dy);return targetPos.x+dx/distance*radius}).attr("y2",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),radius=data.nodes.find(n=>n.id===link.target).isPipelineParent?squareSize/Math.sqrt(2):configValues.nodeRadius,dx=sourcePos.x-targetPos.x,dy=sourcePos.y-targetPos.y,distance=Math.sqrt(dx*dx+dy*dy);return targetPos.y+dy/distance*radius}).attr("stroke",theme.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",link=>link.dashed?"6 6":null).attr("marker-end",link=>"forward"===link.flow||"bidirectional"===link.flow?`url(#link-arrow-end-${id})`:null).attr("marker-start",link=>"backward"===link.flow||"bidirectional"===link.flow?`url(#link-arrow-start-${id})`:null),linksGroup.selectAll("text").data(validLinks.filter(link=>link.label)).enter().append("text").attr("class","wardley-link-label").attr("x",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),midX=(sourcePos.x+targetPos.x)/2,dy=targetPos.y-sourcePos.y,dx=targetPos.x-sourcePos.x;return midX+8*(dy/Math.sqrt(dx*dx+dy*dy))}).attr("y",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),midY=(sourcePos.y+targetPos.y)/2,dx=targetPos.x-sourcePos.x,dy=targetPos.y-sourcePos.y;return midY+8*(-dx/Math.sqrt(dx*dx+dy*dy))}).attr("fill",theme.axisTextColor).attr("font-size",configValues.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",link=>{const sourcePos=positions.get(link.source),targetPos=positions.get(link.target),midX=(sourcePos.x+targetPos.x)/2,midY=(sourcePos.y+targetPos.y)/2,dx=targetPos.x-sourcePos.x,dy=targetPos.y-sourcePos.y,distance=Math.sqrt(dx*dx+dy*dy),labelX=midX+8*(dy/distance),labelY=midY+8*(-dx/distance);let angle=180*Math.atan2(dy,dx)/Math.PI;return(angle>90||angle<-90)&&(angle+=180),`rotate(${angle} ${labelX} ${labelY})`}).text(link=>link.label);const trendGroup=root.append("g").attr("class","wardley-trends"),trendsWithPositions=data.trends.map(trend=>{const origin=positions.get(trend.nodeId);if(!origin)return null;const targetX=projectX(trend.targetX),targetY=projectY(trend.targetY),dx=targetX-origin.x,dy=targetY-origin.y,distance=Math.sqrt(dx*dx+dy*dy),shortenBy=configValues.nodeRadius+2;return{origin:origin,targetX:targetX,targetY:targetY,adjustedX2:distance>shortenBy?targetX-dx/distance*shortenBy:targetX,adjustedY2:distance>shortenBy?targetY-dy/distance*shortenBy:targetY}}).filter(trend=>null!==trend);trendGroup.selectAll("line").data(trendsWithPositions).enter().append("line").attr("class","wardley-trend").attr("x1",trend=>trend.origin.x).attr("y1",trend=>trend.origin.y).attr("x2",trend=>trend.adjustedX2).attr("y2",trend=>trend.adjustedY2).attr("stroke",theme.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${id})`);const nodeEnter=root.append("g").attr("class","wardley-nodes").selectAll("g").data(data.nodes).enter().append("g").attr("class",node=>["wardley-node",node.className?`wardley-node--${node.className}`:""].filter(Boolean).join(" "));nodeEnter.filter(node=>"outsource"===node.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",node=>positions.get(node.id).x).attr("cy",node=>positions.get(node.id).y).attr("r",2*configValues.nodeRadius).attr("fill","#666").attr("stroke",theme.componentStroke).attr("stroke-width",1),nodeEnter.filter(node=>"buy"===node.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",node=>positions.get(node.id).x).attr("cy",node=>positions.get(node.id).y).attr("r",2*configValues.nodeRadius).attr("fill","#ccc").attr("stroke",theme.componentStroke).attr("stroke-width",1),nodeEnter.filter(node=>"build"===node.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",node=>positions.get(node.id).x).attr("cy",node=>positions.get(node.id).y).attr("r",2*configValues.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const marketNodes=nodeEnter.filter(node=>"market"===node.sourceStrategy);marketNodes.append("circle").attr("class","wardley-market-overlay").attr("cx",node=>positions.get(node.id).x).attr("cy",node=>positions.get(node.id).y).attr("r",2*configValues.nodeRadius).attr("fill","white").attr("stroke",theme.componentStroke).attr("stroke-width",1),nodeEnter.filter(node=>!node.isPipelineParent&&"market"!==node.sourceStrategy&&"anchor"!==node.className).append("circle").attr("cx",node=>positions.get(node.id).x).attr("cy",node=>positions.get(node.id).y).attr("r",configValues.nodeRadius).attr("fill",theme.componentFill).attr("stroke",theme.componentStroke).attr("stroke-width",1);const smallCircleRadius=.7*configValues.nodeRadius,triangleRadius=1.2*configValues.nodeRadius;if(marketNodes.append("line").attr("class","wardley-market-line").attr("x1",node=>positions.get(node.id).x).attr("y1",node=>positions.get(node.id).y-triangleRadius).attr("x2",node=>positions.get(node.id).x-triangleRadius*Math.cos(Math.PI/6)).attr("y2",node=>positions.get(node.id).y+triangleRadius*Math.sin(Math.PI/6)).attr("stroke",theme.componentStroke).attr("stroke-width",1),marketNodes.append("line").attr("class","wardley-market-line").attr("x1",node=>positions.get(node.id).x-triangleRadius*Math.cos(Math.PI/6)).attr("y1",node=>positions.get(node.id).y+triangleRadius*Math.sin(Math.PI/6)).attr("x2",node=>positions.get(node.id).x+triangleRadius*Math.cos(Math.PI/6)).attr("y2",node=>positions.get(node.id).y+triangleRadius*Math.sin(Math.PI/6)).attr("stroke",theme.componentStroke).attr("stroke-width",1),marketNodes.append("line").attr("class","wardley-market-line").attr("x1",node=>positions.get(node.id).x+triangleRadius*Math.cos(Math.PI/6)).attr("y1",node=>positions.get(node.id).y+triangleRadius*Math.sin(Math.PI/6)).attr("x2",node=>positions.get(node.id).x).attr("y2",node=>positions.get(node.id).y-triangleRadius).attr("stroke",theme.componentStroke).attr("stroke-width",1),marketNodes.append("circle").attr("class","wardley-market-dot").attr("cx",node=>positions.get(node.id).x).attr("cy",node=>positions.get(node.id).y-triangleRadius).attr("r",smallCircleRadius).attr("fill","white").attr("stroke",theme.componentStroke).attr("stroke-width",2),marketNodes.append("circle").attr("class","wardley-market-dot").attr("cx",node=>positions.get(node.id).x-triangleRadius*Math.cos(Math.PI/6)).attr("cy",node=>positions.get(node.id).y+triangleRadius*Math.sin(Math.PI/6)).attr("r",smallCircleRadius).attr("fill","white").attr("stroke",theme.componentStroke).attr("stroke-width",2),marketNodes.append("circle").attr("class","wardley-market-dot").attr("cx",node=>positions.get(node.id).x+triangleRadius*Math.cos(Math.PI/6)).attr("cy",node=>positions.get(node.id).y+triangleRadius*Math.sin(Math.PI/6)).attr("r",smallCircleRadius).attr("fill","white").attr("stroke",theme.componentStroke).attr("stroke-width",2),nodeEnter.filter(node=>!0===node.isPipelineParent).append("rect").attr("x",node=>positions.get(node.id).x-squareSize/2).attr("y",node=>positions.get(node.id).y-squareSize/2).attr("width",squareSize).attr("height",squareSize).attr("fill",theme.componentFill).attr("stroke",theme.componentStroke).attr("stroke-width",1),nodeEnter.filter(node=>!0===node.inertia).append("line").attr("class","wardley-inertia").attr("x1",node=>{const pos=positions.get(node.id);let offset=node.isPipelineParent?squareSize/2+15:configValues.nodeRadius+15;return node.sourceStrategy&&(offset+=configValues.nodeRadius+10),pos.x+offset}).attr("y1",node=>{const pos=positions.get(node.id),lineHeight=node.isPipelineParent?squareSize:2*configValues.nodeRadius;return pos.y-lineHeight/2}).attr("x2",node=>{const pos=positions.get(node.id);let offset=node.isPipelineParent?squareSize/2+15:configValues.nodeRadius+15;return node.sourceStrategy&&(offset+=configValues.nodeRadius+10),pos.x+offset}).attr("y2",node=>{const pos=positions.get(node.id),lineHeight=node.isPipelineParent?squareSize:2*configValues.nodeRadius;return pos.y+lineHeight/2}).attr("stroke",theme.componentStroke).attr("stroke-width",6),nodeEnter.append("text").attr("x",node=>{const pos=positions.get(node.id);if("anchor"===node.className)return void 0!==node.labelOffsetX?pos.x+node.labelOffsetX:pos.x;let defaultOffset=configValues.nodeLabelOffset;node.sourceStrategy&&void 0===node.labelOffsetX&&(defaultOffset+=10);const customOffset=node.labelOffsetX??defaultOffset;return pos.x+customOffset}).attr("y",node=>{const pos=positions.get(node.id);if("anchor"===node.className)return void 0!==node.labelOffsetY?pos.y+node.labelOffsetY:pos.y-3;let defaultOffset=-configValues.nodeLabelOffset;node.sourceStrategy&&void 0===node.labelOffsetY&&(defaultOffset-=10);const customOffset=node.labelOffsetY??defaultOffset;return pos.y+customOffset}).attr("class","wardley-node-label").attr("fill",node=>"evolved"===node.className?theme.evolutionStroke:"anchor"===node.className?"#000":theme.componentLabelColor).attr("font-size",configValues.labelFontSize).attr("font-weight",node=>"anchor"===node.className?"bold":"normal").attr("text-anchor",node=>"anchor"===node.className?"middle":"start").attr("dominant-baseline",node=>"anchor"===node.className?"middle":"auto").text(node=>node.label),data.annotations.length>0){const annotationsGroup=root.append("g").attr("class","wardley-annotations");if(data.annotations.forEach(annotation=>{const projectedCoords=annotation.coordinates.map(coord=>({x:projectX(coord.x),y:projectY(coord.y)}));if(projectedCoords.length>1)for(let i=0;i<projectedCoords.length-1;i++)annotationsGroup.append("line").attr("class","wardley-annotation-line").attr("x1",projectedCoords[i].x).attr("y1",projectedCoords[i].y).attr("x2",projectedCoords[i+1].x).attr("y2",projectedCoords[i+1].y).attr("stroke",theme.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");projectedCoords.forEach(coord=>{const annotationNode=annotationsGroup.append("g").attr("class","wardley-annotation");annotationNode.append("circle").attr("cx",coord.x).attr("cy",coord.y).attr("r",10).attr("fill","white").attr("stroke",theme.axisColor).attr("stroke-width",1.5),annotationNode.append("text").attr("x",coord.x).attr("y",coord.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",theme.axisTextColor).attr("font-weight","bold").text(annotation.number)})}),data.annotationsBox){let boxX=projectX(data.annotationsBox.x),boxY=projectY(data.annotationsBox.y);const padding=10,lineHeight=16,fontSize=11,textBoxGroup=annotationsGroup.append("g").attr("class","wardley-annotations-box"),sortedAnnotations=[...data.annotations].filter(a=>a.text).sort((a,b)=>a.number-b.number),textElements=[];if(sortedAnnotations.forEach((annotation,idx)=>{const text2=textBoxGroup.append("text").attr("x",boxX+padding).attr("y",boxY+padding+(idx+1)*lineHeight).attr("font-size",fontSize).attr("fill",theme.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${annotation.number}. ${annotation.text}`);textElements.push(text2)}),textElements.length>0){let maxWidth=0,maxHeight=0;textElements.forEach(text2=>{const textNode=text2.node(),textWidth=textNode.getComputedTextLength();maxWidth=Math.max(maxWidth,textWidth);const bbox=textNode.getBBox();maxHeight=Math.max(maxHeight,bbox.height)});const boxWidth=maxWidth+2*padding+105,boxHeight=sortedAnnotations.length*lineHeight+2*padding+maxHeight/2,minX=configValues.padding,maxX=width-configValues.padding-boxWidth,minY=configValues.padding,maxY=height-configValues.padding-boxHeight;boxX=Math.max(minX,Math.min(boxX,maxX)),boxY=Math.max(minY,Math.min(boxY,maxY)),textElements.forEach((text2,idx)=>{text2.attr("x",boxX+padding).attr("y",boxY+padding+(idx+1)*lineHeight)}),textBoxGroup.insert("rect","text").attr("x",boxX).attr("y",boxY).attr("width",boxWidth).attr("height",boxHeight).attr("fill","white").attr("stroke",theme.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(data.notes.length>0){const notesGroup=root.append("g").attr("class","wardley-notes");data.notes.forEach(note=>{const noteX=projectX(note.x),noteY=projectY(note.y);notesGroup.append("text").attr("x",noteX).attr("y",noteY).attr("text-anchor","start").attr("font-size",11).attr("fill",theme.axisTextColor).attr("font-weight","bold").text(note.text)})}if(data.accelerators.length>0){const acceleratorsGroup=root.append("g").attr("class","wardley-accelerators");data.accelerators.forEach(accelerator=>{const accX=projectX(accelerator.x),accY=projectY(accelerator.y),arrowPath=`\n M ${accX} ${accY-15}\n L ${accX+60-20} ${accY-15}\n L ${accX+60-20} ${accY-15-8}\n L ${accX+60} ${accY}\n L ${accX+60-20} ${accY+15+8}\n L ${accX+60-20} ${accY+15}\n L ${accX} ${accY+15}\n Z\n `;acceleratorsGroup.append("path").attr("d",arrowPath).attr("fill","white").attr("stroke",theme.componentStroke).attr("stroke-width",1),acceleratorsGroup.append("text").attr("x",accX+30).attr("y",accY+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",theme.axisTextColor).attr("font-weight","bold").text(accelerator.name)})}if(data.deaccelerators.length>0){const deacceleratorsGroup=root.append("g").attr("class","wardley-deaccelerators");data.deaccelerators.forEach(deaccelerator=>{const decX=projectX(deaccelerator.x),decY=projectY(deaccelerator.y),arrowPath=`\n M ${decX+60} ${decY-15}\n L ${decX+20} ${decY-15}\n L ${decX+20} ${decY-15-8}\n L ${decX} ${decY}\n L ${decX+20} ${decY+15+8}\n L ${decX+20} ${decY+15}\n L ${decX+60} ${decY+15}\n Z\n `;deacceleratorsGroup.append("path").attr("d",arrowPath).attr("fill","white").attr("stroke",theme.componentStroke).attr("stroke-width",1),deacceleratorsGroup.append("text").attr("x",decX+30).attr("y",decY+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",theme.axisTextColor).attr("font-weight","bold").text(deaccelerator.name)})}},"draw")},styles:__name(()=>"","styles")};export{diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _a,_b,_c,_d,_e,_f,_g,_h,_i,_j;import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,l as log,H as selectSvgElement,e as configureSvgSize,y as clear,C as getConfig,i as sanitizeText,E as cleanAndMerge,F as defaultConfig_default,I as getThemeVariables3,aB as computeDimensionOfText,Q as line}from"./mermaid.core-Dg0McRZt.js";import{i as initRange}from"./init-DMZMl1PR.js";import{o as ordinal}from"./ordinal-DA-_8pMy.js";import{l as linear}from"./linear-BiJNTDgN.js";import"./vendor-mdxeditor-D5Z5D9fq.js";import"./vendor-antd-DKIytXho.js";import"./vendor-codemirror-4qgXq03k.js";import"./vendor-markdown-DOJHsAxX.js";import"./defaultLocale-DZ7E7S9R.js";function band(){var step,bandwidth,scale=ordinal().unknown(void 0),domain=scale.domain,ordinalRange=scale.range,r0=0,r1=1,round=!1,paddingInner=0,paddingOuter=0,align=.5;function rescale(){var n=domain().length,reverse=r1<r0,start=reverse?r1:r0,stop=reverse?r0:r1;step=(stop-start)/Math.max(1,n-paddingInner+2*paddingOuter),round&&(step=Math.floor(step)),start+=(stop-start-step*(n-paddingInner))*align,bandwidth=step*(1-paddingInner),round&&(start=Math.round(start),bandwidth=Math.round(bandwidth));var values=function(start,stop,step){start=+start,stop=+stop,step=(n=arguments.length)<2?(stop=start,start=0,1):n<3?1:+step;for(var i=-1,n=0|Math.max(0,Math.ceil((stop-start)/step)),range2=new Array(n);++i<n;)range2[i]=start+i*step;return range2}(n).map(function(i){return start+step*i});return ordinalRange(reverse?values.reverse():values)}return delete scale.unknown,scale.domain=function(_){return arguments.length?(domain(_),rescale()):domain()},scale.range=function(_){return arguments.length?([r0,r1]=_,r0=+r0,r1=+r1,rescale()):[r0,r1]},scale.rangeRound=function(_){return[r0,r1]=_,r0=+r0,r1=+r1,round=!0,rescale()},scale.bandwidth=function(){return bandwidth},scale.step=function(){return step},scale.round=function(_){return arguments.length?(round=!!_,rescale()):round},scale.padding=function(_){return arguments.length?(paddingInner=Math.min(1,paddingOuter=+_),rescale()):paddingInner},scale.paddingInner=function(_){return arguments.length?(paddingInner=Math.min(1,_),rescale()):paddingInner},scale.paddingOuter=function(_){return arguments.length?(paddingOuter=+_,rescale()):paddingOuter},scale.align=function(_){return arguments.length?(align=Math.max(0,Math.min(1,_)),rescale()):align},scale.copy=function(){return band(domain(),[r0,r1]).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align)},initRange.apply(rescale(),arguments)}var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,10,12,14,16,18,19,21,23],$V1=[2,6],$V2=[1,3],$V3=[1,5],$V4=[1,6],$V5=[1,7],$V6=[1,5,10,12,14,16,18,19,21,23,34,35,36],$V7=[1,25],$V8=[1,26],$V9=[1,28],$Va=[1,29],$Vb=[1,30],$Vc=[1,31],$Vd=[1,32],$Ve=[1,33],$Vf=[1,34],$Vg=[1,35],$Vh=[1,36],$Vi=[1,37],$Vj=[1,43],$Vk=[1,42],$Vl=[1,47],$Vm=[1,50],$Vn=[1,10,12,14,16,18,19,21,23,34,35,36],$Vo=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],$Vp=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],$Vq=[1,64],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 5:yy.setOrientation($$[$0]);break;case 9:yy.setDiagramTitle($$[$0].text.trim());break;case 12:yy.setLineData({text:"",type:"text"},$$[$0]);break;case 13:yy.setLineData($$[$0-1],$$[$0]);break;case 14:yy.setBarData({text:"",type:"text"},$$[$0]);break;case 15:yy.setBarData($$[$0-1],$$[$0]);break;case 16:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 17:case 18:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 19:case 27:this.$=$$[$0-1];break;case 20:this.$=[Number($$[$0-2]),...$$[$0]];break;case 21:this.$=[Number($$[$0])];break;case 22:yy.setXAxisTitle($$[$0]);break;case 23:yy.setXAxisTitle($$[$0-1]);break;case 24:yy.setXAxisTitle({type:"text",text:""});break;case 25:yy.setXAxisBand($$[$0]);break;case 26:yy.setXAxisRangeData(Number($$[$0-2]),Number($$[$0]));break;case 28:this.$=[$$[$0-2],...$$[$0]];break;case 29:this.$=[$$[$0]];break;case 30:yy.setYAxisTitle($$[$0]);break;case 31:yy.setYAxisTitle($$[$0-1]);break;case 32:yy.setYAxisTitle({type:"text",text:""});break;case 33:yy.setYAxisRangeData(Number($$[$0-2]),Number($$[$0]));break;case 37:case 38:this.$={text:$$[$0],type:"text"};break;case 39:this.$={text:$$[$0],type:"markdown"};break;case 40:this.$=$$[$0];break;case 41:this.$=$$[$0-1]+""+$$[$0]}},"anonymous"),table:[o($V0,$V1,{3:1,4:2,7:4,5:$V2,34:$V3,35:$V4,36:$V5}),{1:[3]},o($V0,$V1,{4:2,7:4,3:8,5:$V2,34:$V3,35:$V4,36:$V5}),o($V0,$V1,{4:2,7:4,6:9,3:10,5:$V2,8:[1,11],34:$V3,35:$V4,36:$V5}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},o($V6,[2,34]),o($V6,[2,35]),o($V6,[2,36]),{1:[2,1]},o($V0,$V1,{4:2,7:4,3:21,5:$V2,34:$V3,35:$V4,36:$V5}),{1:[2,3]},o($V6,[2,5]),o($V0,[2,7],{4:22,34:$V3,35:$V4,36:$V5}),{11:23,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:39,13:38,24:$Vj,27:$Vk,29:40,30:41,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:45,15:44,27:$Vl,33:46,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:49,17:48,24:$Vm,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:52,17:51,24:$Vm,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{20:[1,53]},{22:[1,54]},o($Vn,[2,18]),{1:[2,2]},o($Vn,[2,8]),o($Vn,[2,9]),o($Vo,[2,37],{40:55,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi}),o($Vo,[2,38]),o($Vo,[2,39]),o($Vp,[2,40]),o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($Vp,[2,48]),o($Vp,[2,49]),o($Vp,[2,50]),o($Vp,[2,51]),o($Vn,[2,10]),o($Vn,[2,22],{30:41,29:56,24:$Vj,27:$Vk}),o($Vn,[2,24]),o($Vn,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},o($Vn,[2,11]),o($Vn,[2,30],{33:60,27:$Vl}),o($Vn,[2,32]),{31:[1,61]},o($Vn,[2,12]),{17:62,24:$Vm},{25:63,27:$Vq},o($Vn,[2,14]),{17:65,24:$Vm},o($Vn,[2,16]),o($Vn,[2,17]),o($Vp,[2,41]),o($Vn,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},o($Vn,[2,31]),{27:[1,69]},o($Vn,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},o($Vn,[2,15]),o($Vn,[2,26]),o($Vn,[2,27]),{11:59,32:72,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},o($Vn,[2,33]),o($Vn,[2,19]),{25:73,27:$Vq},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var xychart_default=parser;function isBarPlot(data){return"bar"===data.type}function isBandAxisData(data){return"band"===data.type}function isLinearAxisData(data){return"linear"===data.type}__name(isBarPlot,"isBarPlot"),__name(isBandAxisData,"isBandAxisData"),__name(isLinearAxisData,"isLinearAxisData");var TextDimensionCalculatorWithFont=(__name(_a=class{constructor(parentGroup){this.parentGroup=parentGroup}getMaxDimension(texts,fontSize){if(!this.parentGroup)return{width:texts.reduce((acc,cur)=>Math.max(cur.length,acc),0)*fontSize,height:fontSize};const dimension={width:0,height:0},elem=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",fontSize);for(const t of texts){const bbox=computeDimensionOfText(elem,1,t),width=bbox?bbox.width:t.length*fontSize,height=bbox?bbox.height:fontSize;dimension.width=Math.max(dimension.width,width),dimension.height=Math.max(dimension.height,height)}return elem.remove(),dimension}},"TextDimensionCalculatorWithFont"),_a),BaseAxis=(__name(_b=class{constructor(axisConfig,title,textDimensionCalculator,axisThemeConfig){this.axisConfig=axisConfig,this.title=title,this.textDimensionCalculator=textDimensionCalculator,this.axisThemeConfig=axisThemeConfig,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(range2){this.range=range2,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=range2[1]-range2[0]:this.boundingRect.width=range2[1]-range2[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(axisPosition){this.axisPosition=axisPosition,this.setRange(this.range)}getTickDistance(){const range2=this.getRange();return Math.abs(range2[0]-range2[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(tick=>tick.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(availableSpace){let availableHeight=availableSpace.height;if(this.axisConfig.showAxisLine&&availableHeight>this.axisConfig.axisLineWidth&&(availableHeight-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const spaceRequired=this.getLabelDimension(),maxPadding=.2*availableSpace.width;this.outerPadding=Math.min(spaceRequired.width/2,maxPadding);const heightRequired=spaceRequired.height+2*this.axisConfig.labelPadding;this.labelTextHeight=spaceRequired.height,heightRequired<=availableHeight&&(availableHeight-=heightRequired,this.showLabel=!0)}if(this.axisConfig.showTick&&availableHeight>=this.axisConfig.tickLength&&(this.showTick=!0,availableHeight-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const spaceRequired=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),heightRequired=spaceRequired.height+2*this.axisConfig.titlePadding;this.titleTextHeight=spaceRequired.height,heightRequired<=availableHeight&&(availableHeight-=heightRequired,this.showTitle=!0)}this.boundingRect.width=availableSpace.width,this.boundingRect.height=availableSpace.height-availableHeight}calculateSpaceIfDrawnVertical(availableSpace){let availableWidth=availableSpace.width;if(this.axisConfig.showAxisLine&&availableWidth>this.axisConfig.axisLineWidth&&(availableWidth-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const spaceRequired=this.getLabelDimension(),maxPadding=.2*availableSpace.height;this.outerPadding=Math.min(spaceRequired.height/2,maxPadding);const widthRequired=spaceRequired.width+2*this.axisConfig.labelPadding;widthRequired<=availableWidth&&(availableWidth-=widthRequired,this.showLabel=!0)}if(this.axisConfig.showTick&&availableWidth>=this.axisConfig.tickLength&&(this.showTick=!0,availableWidth-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const spaceRequired=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),widthRequired=spaceRequired.height+2*this.axisConfig.titlePadding;this.titleTextHeight=spaceRequired.height,widthRequired<=availableWidth&&(availableWidth-=widthRequired,this.showTitle=!0)}this.boundingRect.width=availableSpace.width-availableWidth,this.boundingRect.height=availableSpace.height}calculateSpace(availableSpace){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(availableSpace):this.calculateSpaceIfDrawnHorizontally(availableSpace),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(point){this.boundingRect.x=point.x,this.boundingRect.y=point.y}getDrawableElementsForLeftAxis(){const drawableElement=[];if(this.showAxisLine){const x=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;drawableElement.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${x},${this.boundingRect.y} L ${x},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&drawableElement.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(tick=>({text:tick.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(tick),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const x=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);drawableElement.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(tick=>({path:`M ${x},${this.getScaleValue(tick)} L ${x-this.axisConfig.tickLength},${this.getScaleValue(tick)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&drawableElement.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),drawableElement}getDrawableElementsForBottomAxis(){const drawableElement=[];if(this.showAxisLine){const y=this.boundingRect.y+this.axisConfig.axisLineWidth/2;drawableElement.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${y} L ${this.boundingRect.x+this.boundingRect.width},${y}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&drawableElement.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(tick=>({text:tick.toString(),x:this.getScaleValue(tick),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const y=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);drawableElement.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(tick=>({path:`M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${y+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&drawableElement.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),drawableElement}getDrawableElementsForTopAxis(){const drawableElement=[];if(this.showAxisLine){const y=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;drawableElement.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${y} L ${this.boundingRect.x+this.boundingRect.width},${y}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&drawableElement.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(tick=>({text:tick.toString(),x:this.getScaleValue(tick),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const y=this.boundingRect.y;drawableElement.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(tick=>({path:`M ${this.getScaleValue(tick)},${y+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(tick)},${y+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&drawableElement.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),drawableElement}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},"BaseAxis"),_b),BandAxis=(__name(_c=class extends BaseAxis{constructor(axisConfig,axisThemeConfig,categories,title,textDimensionCalculator){super(axisConfig,title,textDimensionCalculator,axisThemeConfig),this.categories=categories,this.scale=band().domain(this.categories).range(this.getRange())}setRange(range2){super.setRange(range2)}recalculateScale(){this.scale=band().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(value){return this.scale(value)??this.getRange()[0]}},"BandAxis"),_c),LinearAxis=(__name(_d=class extends BaseAxis{constructor(axisConfig,axisThemeConfig,domain,title,textDimensionCalculator){super(axisConfig,title,textDimensionCalculator,axisThemeConfig),this.domain=domain,this.scale=linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const domain=[...this.domain];"left"===this.axisPosition&&domain.reverse(),this.scale=linear().domain(domain).range(this.getRange())}getScaleValue(value){return this.scale(value)}},"LinearAxis"),_d);function getAxis(data,axisConfig,axisThemeConfig,tmpSVGGroup2){const textDimensionCalculator=new TextDimensionCalculatorWithFont(tmpSVGGroup2);return isBandAxisData(data)?new BandAxis(axisConfig,axisThemeConfig,data.categories,data.title,textDimensionCalculator):new LinearAxis(axisConfig,axisThemeConfig,[data.min,data.max],data.title,textDimensionCalculator)}__name(getAxis,"getAxis");var ChartTitle=(__name(_e=class{constructor(textDimensionCalculator,chartConfig,chartData,chartThemeConfig){this.textDimensionCalculator=textDimensionCalculator,this.chartConfig=chartConfig,this.chartData=chartData,this.chartThemeConfig=chartThemeConfig,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(point){this.boundingRect.x=point.x,this.boundingRect.y=point.y}calculateSpace(availableSpace){const titleDimension=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),widthRequired=Math.max(titleDimension.width,availableSpace.width),heightRequired=titleDimension.height+2*this.chartConfig.titlePadding;return titleDimension.width<=widthRequired&&titleDimension.height<=heightRequired&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=widthRequired,this.boundingRect.height=heightRequired,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const drawableElem=[];return this.showChartTitle&&drawableElem.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),drawableElem}},"ChartTitle"),_e);function getChartTitleComponent(chartConfig,chartData,chartThemeConfig,tmpSVGGroup2){const textDimensionCalculator=new TextDimensionCalculatorWithFont(tmpSVGGroup2);return new ChartTitle(textDimensionCalculator,chartConfig,chartData,chartThemeConfig)}__name(getChartTitleComponent,"getChartTitleComponent");var LinePlot=(__name(_f=class{constructor(plotData,xAxis,yAxis,orientation,plotIndex2){this.plotData=plotData,this.xAxis=xAxis,this.yAxis=yAxis,this.orientation=orientation,this.plotIndex=plotIndex2}getDrawableElement(){const finalData=this.plotData.data.map(d=>[this.xAxis.getScaleValue(d[0]),this.yAxis.getScaleValue(d[1])]);let path;return path="horizontal"===this.orientation?line().y(d=>d[0]).x(d=>d[1])(finalData):line().x(d=>d[0]).y(d=>d[1])(finalData),path?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:path,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},"LinePlot"),_f),BarPlot=(__name(_g=class{constructor(barData,boundingRect,xAxis,yAxis,orientation,plotIndex2){this.barData=barData,this.boundingRect=boundingRect,this.xAxis=xAxis,this.yAxis=yAxis,this.orientation=orientation,this.plotIndex=plotIndex2}getDrawableElement(){const finalData=this.barData.data.map(d=>[this.xAxis.getScaleValue(d[0]),this.yAxis.getScaleValue(d[1])]),barWidth=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),barWidthHalf=barWidth/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:finalData.map(data=>({x:this.boundingRect.x,y:data[0]-barWidthHalf,height:barWidth,width:data[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:finalData.map(data=>({x:data[0]-barWidthHalf,y:data[1],width:barWidth,height:this.boundingRect.y+this.boundingRect.height-data[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},"BarPlot"),_g),BasePlot=(__name(_h=class{constructor(chartConfig,chartData,chartThemeConfig){this.chartConfig=chartConfig,this.chartData=chartData,this.chartThemeConfig=chartThemeConfig,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(xAxis,yAxis){this.xAxis=xAxis,this.yAxis=yAxis}setBoundingBoxXY(point){this.boundingRect.x=point.x,this.boundingRect.y=point.y}calculateSpace(availableSpace){return this.boundingRect.width=availableSpace.width,this.boundingRect.height=availableSpace.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const drawableElem=[];for(const[i,plot]of this.chartData.plots.entries())switch(plot.type){case"line":{const linePlot=new LinePlot(plot,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);drawableElem.push(...linePlot.getDrawableElement())}break;case"bar":{const barPlot=new BarPlot(plot,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);drawableElem.push(...barPlot.getDrawableElement())}}return drawableElem}},"BasePlot"),_h);function getPlotComponent(chartConfig,chartData,chartThemeConfig){return new BasePlot(chartConfig,chartData,chartThemeConfig)}__name(getPlotComponent,"getPlotComponent");var tmpSVGGroup,Orchestrator=(__name(_i=class{constructor(chartConfig,chartData,chartThemeConfig,tmpSVGGroup2){this.chartConfig=chartConfig,this.chartData=chartData,this.componentStore={title:getChartTitleComponent(chartConfig,chartData,chartThemeConfig,tmpSVGGroup2),plot:getPlotComponent(chartConfig,chartData,chartThemeConfig),xAxis:getAxis(chartData.xAxis,chartConfig.xAxis,{titleColor:chartThemeConfig.xAxisTitleColor,labelColor:chartThemeConfig.xAxisLabelColor,tickColor:chartThemeConfig.xAxisTickColor,axisLineColor:chartThemeConfig.xAxisLineColor},tmpSVGGroup2),yAxis:getAxis(chartData.yAxis,chartConfig.yAxis,{titleColor:chartThemeConfig.yAxisTitleColor,labelColor:chartThemeConfig.yAxisLabelColor,tickColor:chartThemeConfig.yAxisTickColor,axisLineColor:chartThemeConfig.yAxisLineColor},tmpSVGGroup2)}}calculateVerticalSpace(){let availableWidth=this.chartConfig.width,availableHeight=this.chartConfig.height,plotX=0,plotY=0,chartWidth=Math.floor(availableWidth*this.chartConfig.plotReservedSpacePercent/100),chartHeight=Math.floor(availableHeight*this.chartConfig.plotReservedSpacePercent/100),spaceUsed=this.componentStore.plot.calculateSpace({width:chartWidth,height:chartHeight});availableWidth-=spaceUsed.width,availableHeight-=spaceUsed.height,spaceUsed=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:availableHeight}),plotY=spaceUsed.height,availableHeight-=spaceUsed.height,this.componentStore.xAxis.setAxisPosition("bottom"),spaceUsed=this.componentStore.xAxis.calculateSpace({width:availableWidth,height:availableHeight}),availableHeight-=spaceUsed.height,this.componentStore.yAxis.setAxisPosition("left"),spaceUsed=this.componentStore.yAxis.calculateSpace({width:availableWidth,height:availableHeight}),plotX=spaceUsed.width,availableWidth-=spaceUsed.width,availableWidth>0&&(chartWidth+=availableWidth,availableWidth=0),availableHeight>0&&(chartHeight+=availableHeight,availableHeight=0),this.componentStore.plot.calculateSpace({width:chartWidth,height:chartHeight}),this.componentStore.plot.setBoundingBoxXY({x:plotX,y:plotY}),this.componentStore.xAxis.setRange([plotX,plotX+chartWidth]),this.componentStore.xAxis.setBoundingBoxXY({x:plotX,y:plotY+chartHeight}),this.componentStore.yAxis.setRange([plotY,plotY+chartHeight]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:plotY}),this.chartData.plots.some(p=>isBarPlot(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let availableWidth=this.chartConfig.width,availableHeight=this.chartConfig.height,titleYEnd=0,plotX=0,plotY=0,chartWidth=Math.floor(availableWidth*this.chartConfig.plotReservedSpacePercent/100),chartHeight=Math.floor(availableHeight*this.chartConfig.plotReservedSpacePercent/100),spaceUsed=this.componentStore.plot.calculateSpace({width:chartWidth,height:chartHeight});availableWidth-=spaceUsed.width,availableHeight-=spaceUsed.height,spaceUsed=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:availableHeight}),titleYEnd=spaceUsed.height,availableHeight-=spaceUsed.height,this.componentStore.xAxis.setAxisPosition("left"),spaceUsed=this.componentStore.xAxis.calculateSpace({width:availableWidth,height:availableHeight}),availableWidth-=spaceUsed.width,plotX=spaceUsed.width,this.componentStore.yAxis.setAxisPosition("top"),spaceUsed=this.componentStore.yAxis.calculateSpace({width:availableWidth,height:availableHeight}),availableHeight-=spaceUsed.height,plotY=titleYEnd+spaceUsed.height,availableWidth>0&&(chartWidth+=availableWidth,availableWidth=0),availableHeight>0&&(chartHeight+=availableHeight,availableHeight=0),this.componentStore.plot.calculateSpace({width:chartWidth,height:chartHeight}),this.componentStore.plot.setBoundingBoxXY({x:plotX,y:plotY}),this.componentStore.yAxis.setRange([plotX,plotX+chartWidth]),this.componentStore.yAxis.setBoundingBoxXY({x:plotX,y:titleYEnd}),this.componentStore.xAxis.setRange([plotY,plotY+chartHeight]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:plotY}),this.chartData.plots.some(p=>isBarPlot(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const drawableElem=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const component of Object.values(this.componentStore))drawableElem.push(...component.getDrawableElements());return drawableElem}},"Orchestrator"),_i),XYChartBuilder=(__name(_j=class{static build(config,chartData,chartThemeConfig,tmpSVGGroup2){return new Orchestrator(config,chartData,chartThemeConfig,tmpSVGGroup2).getDrawableElement()}},"XYChartBuilder"),_j),plotIndex=0,xyChartConfig=getChartDefaultConfig(),xyChartThemeConfig=getChartDefaultThemeConfig(),xyChartData=getChartDefaultData(),plotColorPalette=xyChartThemeConfig.plotColorPalette.split(",").map(color=>color.trim()),hasSetXAxis=!1,hasSetYAxis=!1;function getChartDefaultThemeConfig(){const defaultThemeVariables=getThemeVariables3(),config=getConfig();return cleanAndMerge(defaultThemeVariables.xyChart,config.themeVariables.xyChart)}function getChartDefaultConfig(){const config=getConfig();return cleanAndMerge(defaultConfig_default.xyChart,config.xyChart)}function getChartDefaultData(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function textSanitizer(text){const config=getConfig();return sanitizeText(text.trim(),config)}function setTmpSVGG(SVGG){tmpSVGGroup=SVGG}function setOrientation(orientation){xyChartConfig.chartOrientation="horizontal"===orientation?"horizontal":"vertical"}function setXAxisTitle(title){xyChartData.xAxis.title=textSanitizer(title.text)}function setXAxisRangeData(min,max){xyChartData.xAxis={type:"linear",title:xyChartData.xAxis.title,min:min,max:max},hasSetXAxis=!0}function setXAxisBand(categories){xyChartData.xAxis={type:"band",title:xyChartData.xAxis.title,categories:categories.map(c=>textSanitizer(c.text))},hasSetXAxis=!0}function setYAxisTitle(title){xyChartData.yAxis.title=textSanitizer(title.text)}function setYAxisRangeData(min,max){xyChartData.yAxis={type:"linear",title:xyChartData.yAxis.title,min:min,max:max},hasSetYAxis=!0}function setYAxisRangeFromPlotData(data){const minValue=Math.min(...data),maxValue=Math.max(...data),prevMinValue=isLinearAxisData(xyChartData.yAxis)?xyChartData.yAxis.min:1/0,prevMaxValue=isLinearAxisData(xyChartData.yAxis)?xyChartData.yAxis.max:-1/0;xyChartData.yAxis={type:"linear",title:xyChartData.yAxis.title,min:Math.min(prevMinValue,minValue),max:Math.max(prevMaxValue,maxValue)}}function transformDataWithoutCategory(data){let retData=[];if(0===data.length)return retData;if(!hasSetXAxis){const prevMinValue=isLinearAxisData(xyChartData.xAxis)?xyChartData.xAxis.min:1/0,prevMaxValue=isLinearAxisData(xyChartData.xAxis)?xyChartData.xAxis.max:-1/0;setXAxisRangeData(Math.min(prevMinValue,1),Math.max(prevMaxValue,data.length))}if(hasSetYAxis||setYAxisRangeFromPlotData(data),isBandAxisData(xyChartData.xAxis)&&(retData=xyChartData.xAxis.categories.map((c,i)=>[c,data[i]])),isLinearAxisData(xyChartData.xAxis)){const min=xyChartData.xAxis.min,max=xyChartData.xAxis.max,step=(max-min)/(data.length-1),categories=[];for(let i=min;i<=max;i+=step)categories.push(`${i}`);retData=categories.map((c,i)=>[c,data[i]])}return retData}function getPlotColorFromPalette(plotIndex2){return plotColorPalette[0===plotIndex2?0:plotIndex2%plotColorPalette.length]}function setLineData(title,data){const plotData=transformDataWithoutCategory(data);xyChartData.plots.push({type:"line",strokeFill:getPlotColorFromPalette(plotIndex),strokeWidth:2,data:plotData}),plotIndex++}function setBarData(title,data){const plotData=transformDataWithoutCategory(data);xyChartData.plots.push({type:"bar",fill:getPlotColorFromPalette(plotIndex),data:plotData}),plotIndex++}function getDrawableElem(){if(0===xyChartData.plots.length)throw Error("No Plot to render, please provide a plot with some data");return xyChartData.title=getDiagramTitle(),XYChartBuilder.build(xyChartConfig,xyChartData,xyChartThemeConfig,tmpSVGGroup)}function getChartThemeConfig(){return xyChartThemeConfig}function getChartConfig(){return xyChartConfig}function getXYChartData(){return xyChartData}__name(getChartDefaultThemeConfig,"getChartDefaultThemeConfig"),__name(getChartDefaultConfig,"getChartDefaultConfig"),__name(getChartDefaultData,"getChartDefaultData"),__name(textSanitizer,"textSanitizer"),__name(setTmpSVGG,"setTmpSVGG"),__name(setOrientation,"setOrientation"),__name(setXAxisTitle,"setXAxisTitle"),__name(setXAxisRangeData,"setXAxisRangeData"),__name(setXAxisBand,"setXAxisBand"),__name(setYAxisTitle,"setYAxisTitle"),__name(setYAxisRangeData,"setYAxisRangeData"),__name(setYAxisRangeFromPlotData,"setYAxisRangeFromPlotData"),__name(transformDataWithoutCategory,"transformDataWithoutCategory"),__name(getPlotColorFromPalette,"getPlotColorFromPalette"),__name(setLineData,"setLineData"),__name(setBarData,"setBarData"),__name(getDrawableElem,"getDrawableElem"),__name(getChartThemeConfig,"getChartThemeConfig"),__name(getChartConfig,"getChartConfig"),__name(getXYChartData,"getXYChartData");var diagram={parser:xychart_default,db:{getDrawableElem:getDrawableElem,clear:__name(function(){clear(),plotIndex=0,xyChartConfig=getChartDefaultConfig(),xyChartData={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},xyChartThemeConfig=getChartDefaultThemeConfig(),plotColorPalette=xyChartThemeConfig.plotColorPalette.split(",").map(color=>color.trim()),hasSetXAxis=!1,hasSetYAxis=!1},"clear"),setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,setOrientation:setOrientation,setXAxisTitle:setXAxisTitle,setXAxisRangeData:setXAxisRangeData,setXAxisBand:setXAxisBand,setYAxisTitle:setYAxisTitle,setYAxisRangeData:setYAxisRangeData,setLineData:setLineData,setBarData:setBarData,setTmpSVGG:setTmpSVGG,getChartThemeConfig:getChartThemeConfig,getChartConfig:getChartConfig,getXYChartData:getXYChartData},renderer:{draw:__name((txt,id,_version,diagObj)=>{const db=diagObj.db,themeConfig=db.getChartThemeConfig(),chartConfig=db.getChartConfig(),labelData=db.getXYChartData().plots[0].data.map(data=>data[1]);function getDominantBaseLine(horizontalPos){return"top"===horizontalPos?"text-before-edge":"middle"}function getTextAnchor(verticalPos){return"left"===verticalPos?"start":"right"===verticalPos?"end":"middle"}function getTextTransformation(data){return`translate(${data.x}, ${data.y}) rotate(${data.rotation||0})`}__name(getDominantBaseLine,"getDominantBaseLine"),__name(getTextAnchor,"getTextAnchor"),__name(getTextTransformation,"getTextTransformation"),log.debug("Rendering xychart chart\n"+txt);const svg=selectSvgElement(id),group=svg.append("g").attr("class","main"),background=group.append("rect").attr("width",chartConfig.width).attr("height",chartConfig.height).attr("class","background");configureSvgSize(svg,chartConfig.height,chartConfig.width,!0),svg.attr("viewBox",`0 0 ${chartConfig.width} ${chartConfig.height}`),background.attr("fill",themeConfig.backgroundColor),db.setTmpSVGG(svg.append("g").attr("class","mermaid-tmp-group"));const shapes=db.getDrawableElem(),groups={};function getGroup(gList){let elem=group,prefix="";for(const[i]of gList.entries()){let parent=group;i>0&&groups[prefix]&&(parent=groups[prefix]),prefix+=gList[i],elem=groups[prefix],elem||(elem=groups[prefix]=parent.append("g").attr("class",gList[i]))}return elem}__name(getGroup,"getGroup");for(const shape of shapes){if(0===shape.data.length)continue;const shapeGroup=getGroup(shape.groupTexts);switch(shape.type){case"rect":if(shapeGroup.selectAll("rect").data(shape.data).enter().append("rect").attr("x",data=>data.x).attr("y",data=>data.y).attr("width",data=>data.width).attr("height",data=>data.height).attr("fill",data=>data.fill).attr("stroke",data=>data.strokeFill).attr("stroke-width",data=>data.strokeWidth),chartConfig.showDataLabel){const showDataLabelOutsideBar=chartConfig.showDataLabelOutsideBar;if("horizontal"===chartConfig.chartOrientation){let fitsHorizontally2=function(item,fontSize){const{data:data,label:label}=item;return fontSize*label.length*charWidthFactor<=data.width-rightMargin};__name(fitsHorizontally2,"fitsHorizontally");const charWidthFactor=.7,rightMargin=10,validItems=shape.data.map((d,i)=>({data:d,label:labelData[i].toString()})).filter(item=>item.data.width>0&&item.data.height>0),candidateFontSizes=validItems.map(item=>{const{data:data}=item;let fontSize=.7*data.height;for(;!fitsHorizontally2(item,fontSize)&&fontSize>0;)fontSize-=1;return fontSize}),uniformFontSize=Math.floor(Math.min(...candidateFontSizes)),determineLabelXPosition=__name(item=>showDataLabelOutsideBar?item.data.x+item.data.width+rightMargin:item.data.x+item.data.width-rightMargin,"determineLabelXPosition");shapeGroup.selectAll("text").data(validItems).enter().append("text").attr("x",determineLabelXPosition).attr("y",item=>item.data.y+item.data.height/2).attr("text-anchor",showDataLabelOutsideBar?"start":"end").attr("dominant-baseline","middle").attr("fill",themeConfig.dataLabelColor).attr("font-size",`${uniformFontSize}px`).text(item=>item.label)}else{let fitsInBar2=function(item,fontSize,yOffset2){const{data:data,label:label}=item,textWidth=fontSize*label.length*.7,centerX=data.x+data.width/2,rightEdge=centerX+textWidth/2,horizontalFits=centerX-textWidth/2>=data.x&&rightEdge<=data.x+data.width,verticalFits=data.y+yOffset2+fontSize<=data.y+data.height;return horizontalFits&&verticalFits};__name(fitsInBar2,"fitsInBar");const yOffset=10,validItems=shape.data.map((d,i)=>({data:d,label:labelData[i].toString()})).filter(item=>item.data.width>0&&item.data.height>0),candidateFontSizes=validItems.map(item=>{const{data:data,label:label}=item;let fontSize=data.width/(.7*label.length);for(;!fitsInBar2(item,fontSize,yOffset)&&fontSize>0;)fontSize-=1;return fontSize}),uniformFontSize=Math.floor(Math.min(...candidateFontSizes)),determineLabelYPosition=__name(item=>showDataLabelOutsideBar?item.data.y-yOffset:item.data.y+yOffset,"determineLabelYPosition");shapeGroup.selectAll("text").data(validItems).enter().append("text").attr("x",item=>item.data.x+item.data.width/2).attr("y",determineLabelYPosition).attr("text-anchor","middle").attr("dominant-baseline",showDataLabelOutsideBar?"auto":"hanging").attr("fill",themeConfig.dataLabelColor).attr("font-size",`${uniformFontSize}px`).text(item=>item.label)}}break;case"text":shapeGroup.selectAll("text").data(shape.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",data=>data.fill).attr("font-size",data=>data.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.verticalPos)).attr("text-anchor",data=>getTextAnchor(data.horizontalPos)).attr("transform",data=>getTextTransformation(data)).text(data=>data.text);break;case"path":shapeGroup.selectAll("path").data(shape.data).enter().append("path").attr("d",data=>data.path).attr("fill",data=>data.fill?data.fill:"none").attr("stroke",data=>data.strokeFill).attr("stroke-width",data=>data.strokeWidth)}}},"draw")}};export{diagram};
|
package/dist/index.html
CHANGED
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
// 整体显示大小已弃用 CSS zoom:Electron 改用 webFrame.setZoomFactor(首屏抢占见
|
|
22
22
|
// electron/tab-content-preload.js),纯浏览器交由用户用浏览器自带快捷键缩放,故此处不再设 zoom。
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="./assets/index
|
|
25
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-antd-
|
|
26
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-
|
|
27
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-
|
|
28
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-mdxeditor-Cy5Xg_90.js">
|
|
24
|
+
<script type="module" crossorigin src="./assets/index--yjDHxJD.js"></script>
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-antd-DKIytXho.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-codemirror-4qgXq03k.js">
|
|
27
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-mdxeditor-D5Z5D9fq.js">
|
|
29
28
|
<link rel="stylesheet" crossorigin href="./assets/index-D1yGak8I.css">
|
|
30
29
|
</head>
|
|
31
30
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-viewer",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.13",
|
|
4
4
|
"description": "Claude Code logging, visualization, and management toolkit — launch a web viewer alongside Claude Code with full request/response tracing, proxy, and mobile support",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "server.js",
|
|
@@ -17,7 +17,8 @@ import { _projectName } from '../interceptor.js';
|
|
|
17
17
|
const FILE_RAW_MIME = {
|
|
18
18
|
'.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg',
|
|
19
19
|
'.gif': 'image/gif', '.svg': 'image/svg+xml', '.ico': 'image/x-icon',
|
|
20
|
-
'.webp': 'image/webp', '.
|
|
20
|
+
'.webp': 'image/webp', '.bmp': 'image/bmp', '.avif': 'image/avif',
|
|
21
|
+
'.html': 'text/html', '.htm': 'text/html',
|
|
21
22
|
'.css': 'text/css', '.js': 'text/javascript', '.mjs': 'text/javascript',
|
|
22
23
|
'.json': 'application/json', '.map': 'application/json', '.txt': 'text/plain',
|
|
23
24
|
'.woff': 'font/woff', '.woff2': 'font/woff2', '.ttf': 'font/ttf',
|
|
@@ -357,7 +357,9 @@ function moveFile(req, res, parsedUrl, isLocal, deps) {
|
|
|
357
357
|
}
|
|
358
358
|
try {
|
|
359
359
|
const { fromPath, toDir } = parsed;
|
|
360
|
-
|
|
360
|
+
// toDir === '' 合法:移到项目根目录(侧边栏/弹窗的「拖到空白 = 移到根」依赖于此;
|
|
361
|
+
// 此前用 !toDir 误判 400,该交互从未生效)。undefined/null/非字符串仍是缺失/非法。
|
|
362
|
+
if (!fromPath || typeof toDir !== 'string') {
|
|
361
363
|
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
362
364
|
res.end(JSON.stringify({ error: 'Missing fromPath or toDir' }));
|
|
363
365
|
return;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as jsxRuntimeExports}from"./vendor-virtuoso-Bq6QMhgG.js";import{a as reactExports,s as staticMethods}from"./vendor-antd-BTBRwbax.js";import{M as MDXEditor,h as headingsPlugin,l as listsPlugin,q as quotePlugin,a as linkPlugin,b as linkDialogPlugin,i as imagePlugin,t as tablePlugin,c as codeBlockPlugin,d as codeMirrorPlugin,e as thematicBreakPlugin,m as markdownShortcutPlugin,f as diffSourcePlugin,g as toolbarPlugin,D as DiffSourceToggleWrapper,U as UndoRedo,S as Separator,B as BoldItalicUnderlineToggles,C as CodeToggle,j as BlockTypeSelect,L as ListsToggle,k as CreateLink,I as InsertImage,n as InsertTable,o as InsertCodeBlock,p as InsertThematicBreak}from"./vendor-mdxeditor-Cy5Xg_90.js";import{g as getLang,t}from"./index-tnWldUm3.js";import"./vendor-codemirror-CPWlhuQ1.js";const styles={container:"_container_odc2w_25",light:"_light_odc2w_3",contentEditable:"_contentEditable_odc2w_16"},PASSTHROUGH_TYPES=new Set(["image/png","image/gif","image/webp","image/svg+xml"]);function readAsDataURL(file){return new Promise((resolve,reject)=>{const reader=new FileReader;reader.onload=()=>resolve(reader.result),reader.onerror=()=>reject(new Error("FileReader failed")),reader.readAsDataURL(file)})}async function compressImageToDataURL(file,opts={}){if(!(file instanceof Blob))throw new Error("compressImageToDataURL: input must be a File or Blob");if(!file.type||!file.type.startsWith("image/"))throw new Error(`Unsupported file type: ${file.type||"unknown"}`);if(file.size>10485760)throw new Error(`Image too large: ${(file.size/1024/1024).toFixed(1)}MB > 10MB limit`);const maxEdge=opts.maxEdge??2e3,quality=opts.quality??.85;if(PASSTHROUGH_TYPES.has(file.type))return await readAsDataURL(file);const originalDataURL=await readAsDataURL(file),img=await(src=originalDataURL,new Promise((resolve,reject)=>{const img=new Image;img.onload=()=>resolve(img),img.onerror=()=>reject(new Error("Image decode failed")),img.src=src}));var src;const longestEdge=Math.max(img.naturalWidth,img.naturalHeight),scale=longestEdge>maxEdge?maxEdge/longestEdge:1,targetW=Math.max(1,Math.round(img.naturalWidth*scale)),targetH=Math.max(1,Math.round(img.naturalHeight*scale)),canvas=document.createElement("canvas");canvas.width=targetW,canvas.height=targetH;const ctx=canvas.getContext("2d");if(!ctx)return originalDataURL;let compressed;ctx.drawImage(img,0,0,targetW,targetH);try{compressed=canvas.toDataURL("image/jpeg",quality)}catch{return originalDataURL}return!compressed||"data:,"===compressed||compressed.length>=originalDataURL.length?originalDataURL:compressed}const TRANSLATIONS={zh:{contentArea:{editableMarkdown:"可编辑 Markdown"},dialog:{close:"关闭"},dialogControls:{cancel:"取消",save:"保存"},createLink:{text:"链接文字",textTooltip:"链接显示的文字",title:"标题",titleTooltip:"链接的 title 属性(鼠标悬停时显示)",url:"链接地址",urlPlaceholder:"请输入链接地址",saveTooltip:"保存链接",cancelTooltip:"取消编辑"},linkPreview:{open:"在新窗口打开 {{url}}",edit:"编辑链接",copyToClipboard:"复制链接到剪贴板",copied:"已复制",remove:"移除链接"},uploadImage:{dialogTitle:"插入图片",uploadInstructions:"从本地选择图片上传",addViaUrlInstructions:"或输入图片地址",addViaUrlInstructionsNoUpload:"请输入图片地址",autoCompletePlaceholder:"搜索已有图片",alt:"替代文字",title:"标题",width:"宽度",height:"高度"},imageEditor:{editImage:"编辑图片",deleteImage:"删除图片"},table:{columnMenu:"列菜单",rowMenu:"行菜单",textAlignment:"文字对齐",alignLeft:"左对齐",alignCenter:"居中",alignRight:"右对齐",insertColumnLeft:"在左侧插入列",insertColumnRight:"在右侧插入列",insertRowAbove:"在上方插入行",insertRowBelow:"在下方插入行",deleteColumn:"删除列",deleteRow:"删除行",deleteTable:"删除表格"},codeBlock:{language:"语言",inlineLanguage:"行内语言",selectLanguage:"选择语言"},codeblock:{delete:"删除代码块"},toolbar:{undo:"撤销 {{shortcut}}",redo:"重做 {{shortcut}}",bold:"加粗",italic:"斜体",underline:"下划线",removeBold:"取消加粗",removeItalic:"取消斜体",removeUnderline:"取消下划线",inlineCode:"行内代码",removeInlineCode:"取消行内代码",bulletedList:"无序列表",numberedList:"有序列表",checkList:"任务列表",toggleGroup:"列表样式",link:"插入链接",image:"插入图片",table:"插入表格",codeBlock:"插入代码块",thematicBreak:"插入分隔线",richText:"富文本",diffMode:"对比视图",source:"源代码",blockTypeSelect:{placeholder:"块类型",selectBlockTypeTooltip:"选择块类型"},blockTypes:{paragraph:"段落",heading:"标题 {{level}}",quote:"引用"}}},"zh-TW":{contentArea:{editableMarkdown:"可編輯 Markdown"},dialog:{close:"關閉"},dialogControls:{cancel:"取消",save:"儲存"},createLink:{text:"連結文字",textTooltip:"連結顯示的文字",title:"標題",titleTooltip:"連結的 title 屬性(滑鼠懸停時顯示)",url:"連結網址",urlPlaceholder:"請輸入連結網址",saveTooltip:"儲存連結",cancelTooltip:"取消編輯"},linkPreview:{open:"在新視窗開啟 {{url}}",edit:"編輯連結",copyToClipboard:"複製連結至剪貼簿",copied:"已複製",remove:"移除連結"},uploadImage:{dialogTitle:"插入圖片",uploadInstructions:"從本地選擇圖片上傳",addViaUrlInstructions:"或輸入圖片網址",addViaUrlInstructionsNoUpload:"請輸入圖片網址",autoCompletePlaceholder:"搜尋現有圖片",alt:"替代文字",title:"標題",width:"寬度",height:"高度"},imageEditor:{editImage:"編輯圖片",deleteImage:"刪除圖片"},table:{columnMenu:"欄選單",rowMenu:"列選單",textAlignment:"文字對齊",alignLeft:"靠左",alignCenter:"置中",alignRight:"靠右",insertColumnLeft:"在左側插入欄",insertColumnRight:"在右側插入欄",insertRowAbove:"在上方插入列",insertRowBelow:"在下方插入列",deleteColumn:"刪除欄",deleteRow:"刪除列",deleteTable:"刪除表格"},codeBlock:{language:"語言",inlineLanguage:"行內語言",selectLanguage:"選擇語言"},codeblock:{delete:"刪除程式碼區塊"},toolbar:{undo:"復原 {{shortcut}}",redo:"重做 {{shortcut}}",bold:"粗體",italic:"斜體",underline:"底線",removeBold:"取消粗體",removeItalic:"取消斜體",removeUnderline:"取消底線",inlineCode:"行內程式碼",removeInlineCode:"取消行內程式碼",bulletedList:"項目符號清單",numberedList:"編號清單",checkList:"工作清單",toggleGroup:"清單樣式",link:"插入連結",image:"插入圖片",table:"插入表格",codeBlock:"插入程式碼區塊",thematicBreak:"插入分隔線",richText:"所見即所得",diffMode:"比對檢視",source:"原始碼",blockTypeSelect:{placeholder:"區塊類型",selectBlockTypeTooltip:"選擇區塊類型"},blockTypes:{paragraph:"段落",heading:"標題 {{level}}",quote:"引用"}}},ja:{toolbar:{undo:"元に戻す {{shortcut}}",redo:"やり直し {{shortcut}}",bold:"太字",italic:"イタリック",underline:"下線",removeBold:"太字を解除",removeItalic:"イタリックを解除",removeUnderline:"下線を解除",inlineCode:"インラインコード",removeInlineCode:"インラインコードを解除",bulletedList:"箇条書き",numberedList:"番号付きリスト",checkList:"チェックリスト",toggleGroup:"リストスタイル",link:"リンクを挿入",image:"画像を挿入",table:"表を挿入",codeBlock:"コードブロックを挿入",thematicBreak:"区切り線を挿入",richText:"リッチテキスト",diffMode:"差分表示",source:"ソース",blockTypeSelect:{placeholder:"ブロック種別",selectBlockTypeTooltip:"ブロック種別を選択"},blockTypes:{paragraph:"段落",heading:"見出し {{level}}",quote:"引用"}}},ko:{toolbar:{undo:"실행 취소 {{shortcut}}",redo:"다시 실행 {{shortcut}}",bold:"굵게",italic:"기울임",underline:"밑줄",removeBold:"굵게 해제",removeItalic:"기울임 해제",removeUnderline:"밑줄 해제",inlineCode:"인라인 코드",removeInlineCode:"인라인 코드 해제",bulletedList:"글머리 기호 목록",numberedList:"번호 매기기 목록",checkList:"체크리스트",toggleGroup:"목록 스타일",link:"링크 삽입",image:"이미지 삽입",table:"표 삽입",codeBlock:"코드 블록 삽입",thematicBreak:"구분선 삽입",richText:"서식있는 텍스트",diffMode:"비교 보기",source:"소스",blockTypeSelect:{placeholder:"블록 유형",selectBlockTypeTooltip:"블록 유형 선택"},blockTypes:{paragraph:"단락",heading:"제목 {{level}}",quote:"인용"}}},de:{toolbar:{undo:"Rückgängig {{shortcut}}",redo:"Wiederherstellen {{shortcut}}",bold:"Fett",italic:"Kursiv",underline:"Unterstrichen",removeBold:"Fett entfernen",removeItalic:"Kursiv entfernen",removeUnderline:"Unterstrichen entfernen",inlineCode:"Inline-Code",removeInlineCode:"Inline-Code entfernen",bulletedList:"Aufzählungsliste",numberedList:"Nummerierte Liste",checkList:"Aufgabenliste",toggleGroup:"Listenstil",link:"Link einfügen",image:"Bild einfügen",table:"Tabelle einfügen",codeBlock:"Codeblock einfügen",thematicBreak:"Trennlinie einfügen",richText:"Rich-Text",diffMode:"Diff-Ansicht",source:"Quelltext",blockTypeSelect:{placeholder:"Blocktyp",selectBlockTypeTooltip:"Blocktyp auswählen"},blockTypes:{paragraph:"Absatz",heading:"Überschrift {{level}}",quote:"Zitat"}}},es:{toolbar:{undo:"Deshacer {{shortcut}}",redo:"Rehacer {{shortcut}}",bold:"Negrita",italic:"Cursiva",underline:"Subrayado",removeBold:"Quitar negrita",removeItalic:"Quitar cursiva",removeUnderline:"Quitar subrayado",inlineCode:"Código en línea",removeInlineCode:"Quitar código en línea",bulletedList:"Lista con viñetas",numberedList:"Lista numerada",checkList:"Lista de tareas",toggleGroup:"Estilo de lista",link:"Insertar enlace",image:"Insertar imagen",table:"Insertar tabla",codeBlock:"Insertar bloque de código",thematicBreak:"Insertar separador",richText:"Texto enriquecido",diffMode:"Vista comparativa",source:"Código fuente",blockTypeSelect:{placeholder:"Tipo de bloque",selectBlockTypeTooltip:"Seleccionar tipo de bloque"},blockTypes:{paragraph:"Párrafo",heading:"Encabezado {{level}}",quote:"Cita"}}},fr:{toolbar:{undo:"Annuler {{shortcut}}",redo:"Rétablir {{shortcut}}",bold:"Gras",italic:"Italique",underline:"Souligné",removeBold:"Retirer le gras",removeItalic:"Retirer l’italique",removeUnderline:"Retirer le soulignement",inlineCode:"Code en ligne",removeInlineCode:"Retirer le code en ligne",bulletedList:"Liste à puces",numberedList:"Liste numérotée",checkList:"Liste de tâches",toggleGroup:"Style de liste",link:"Insérer un lien",image:"Insérer une image",table:"Insérer un tableau",codeBlock:"Insérer un bloc de code",thematicBreak:"Insérer un séparateur",richText:"Texte enrichi",diffMode:"Vue comparative",source:"Source",blockTypeSelect:{placeholder:"Type de bloc",selectBlockTypeTooltip:"Choisir le type de bloc"},blockTypes:{paragraph:"Paragraphe",heading:"Titre {{level}}",quote:"Citation"}}},it:{toolbar:{undo:"Annulla {{shortcut}}",redo:"Ripristina {{shortcut}}",bold:"Grassetto",italic:"Corsivo",underline:"Sottolineato",removeBold:"Rimuovi grassetto",removeItalic:"Rimuovi corsivo",removeUnderline:"Rimuovi sottolineato",inlineCode:"Codice in linea",removeInlineCode:"Rimuovi codice in linea",bulletedList:"Elenco puntato",numberedList:"Elenco numerato",checkList:"Elenco di attività",toggleGroup:"Stile elenco",link:"Inserisci link",image:"Inserisci immagine",table:"Inserisci tabella",codeBlock:"Inserisci blocco di codice",thematicBreak:"Inserisci separatore",richText:"Testo formattato",diffMode:"Vista differenze",source:"Sorgente",blockTypeSelect:{placeholder:"Tipo di blocco",selectBlockTypeTooltip:"Seleziona tipo di blocco"},blockTypes:{paragraph:"Paragrafo",heading:"Titolo {{level}}",quote:"Citazione"}}},da:{toolbar:{undo:"Fortryd {{shortcut}}",redo:"Gentag {{shortcut}}",bold:"Fed",italic:"Kursiv",underline:"Understreget",removeBold:"Fjern fed",removeItalic:"Fjern kursiv",removeUnderline:"Fjern understregning",inlineCode:"Indlejret kode",removeInlineCode:"Fjern indlejret kode",bulletedList:"Punktopstilling",numberedList:"Nummereret liste",checkList:"Tjekliste",toggleGroup:"Listestil",link:"Indsæt link",image:"Indsæt billede",table:"Indsæt tabel",codeBlock:"Indsæt kodeblok",thematicBreak:"Indsæt skillelinje",richText:"Formateret tekst",diffMode:"Diff-visning",source:"Kilde",blockTypeSelect:{placeholder:"Bloktype",selectBlockTypeTooltip:"Vælg bloktype"},blockTypes:{paragraph:"Afsnit",heading:"Overskrift {{level}}",quote:"Citat"}}},pl:{toolbar:{undo:"Cofnij {{shortcut}}",redo:"Ponów {{shortcut}}",bold:"Pogrubienie",italic:"Kursywa",underline:"Podkreślenie",removeBold:"Usuń pogrubienie",removeItalic:"Usuń kursywę",removeUnderline:"Usuń podkreślenie",inlineCode:"Kod w linii",removeInlineCode:"Usuń kod w linii",bulletedList:"Lista punktowana",numberedList:"Lista numerowana",checkList:"Lista zadań",toggleGroup:"Styl listy",link:"Wstaw link",image:"Wstaw obraz",table:"Wstaw tabelę",codeBlock:"Wstaw blok kodu",thematicBreak:"Wstaw separator",richText:"Tekst sformatowany",diffMode:"Widok porównania",source:"Źródło",blockTypeSelect:{placeholder:"Typ bloku",selectBlockTypeTooltip:"Wybierz typ bloku"},blockTypes:{paragraph:"Akapit",heading:"Nagłówek {{level}}",quote:"Cytat"}}},ru:{toolbar:{undo:"Отменить {{shortcut}}",redo:"Повторить {{shortcut}}",bold:"Полужирный",italic:"Курсив",underline:"Подчёркнутый",removeBold:"Убрать полужирный",removeItalic:"Убрать курсив",removeUnderline:"Убрать подчёркивание",inlineCode:"Встроенный код",removeInlineCode:"Убрать встроенный код",bulletedList:"Маркированный список",numberedList:"Нумерованный список",checkList:"Список задач",toggleGroup:"Стиль списка",link:"Вставить ссылку",image:"Вставить изображение",table:"Вставить таблицу",codeBlock:"Вставить блок кода",thematicBreak:"Вставить разделитель",richText:"Форматированный текст",diffMode:"Вид сравнения",source:"Исходный код",blockTypeSelect:{placeholder:"Тип блока",selectBlockTypeTooltip:"Выбрать тип блока"},blockTypes:{paragraph:"Абзац",heading:"Заголовок {{level}}",quote:"Цитата"}}},ar:{toolbar:{undo:"تراجع {{shortcut}}",redo:"إعادة {{shortcut}}",bold:"عريض",italic:"مائل",underline:"تسطير",removeBold:"إزالة العريض",removeItalic:"إزالة المائل",removeUnderline:"إزالة التسطير",inlineCode:"كود مضمن",removeInlineCode:"إزالة الكود المضمن",bulletedList:"قائمة نقطية",numberedList:"قائمة مرقمة",checkList:"قائمة مهام",toggleGroup:"نمط القائمة",link:"إدراج رابط",image:"إدراج صورة",table:"إدراج جدول",codeBlock:"إدراج كتلة كود",thematicBreak:"إدراج فاصل",richText:"نص منسق",diffMode:"عرض المقارنة",source:"المصدر",blockTypeSelect:{placeholder:"نوع الكتلة",selectBlockTypeTooltip:"اختر نوع الكتلة"},blockTypes:{paragraph:"فقرة",heading:"عنوان {{level}}",quote:"اقتباس"}}},no:{toolbar:{undo:"Angre {{shortcut}}",redo:"Gjør om {{shortcut}}",bold:"Fet",italic:"Kursiv",underline:"Understreket",removeBold:"Fjern fet",removeItalic:"Fjern kursiv",removeUnderline:"Fjern understreking",inlineCode:"Inline-kode",removeInlineCode:"Fjern inline-kode",bulletedList:"Punktliste",numberedList:"Nummerert liste",checkList:"Sjekkliste",toggleGroup:"Listestil",link:"Sett inn lenke",image:"Sett inn bilde",table:"Sett inn tabell",codeBlock:"Sett inn kodeblokk",thematicBreak:"Sett inn skillelinje",richText:"Formatert tekst",diffMode:"Diff-visning",source:"Kilde",blockTypeSelect:{placeholder:"Blokktype",selectBlockTypeTooltip:"Velg blokktype"},blockTypes:{paragraph:"Avsnitt",heading:"Overskrift {{level}}",quote:"Sitat"}}},"pt-BR":{toolbar:{undo:"Desfazer {{shortcut}}",redo:"Refazer {{shortcut}}",bold:"Negrito",italic:"Itálico",underline:"Sublinhado",removeBold:"Remover negrito",removeItalic:"Remover itálico",removeUnderline:"Remover sublinhado",inlineCode:"Código em linha",removeInlineCode:"Remover código em linha",bulletedList:"Lista com marcadores",numberedList:"Lista numerada",checkList:"Lista de tarefas",toggleGroup:"Estilo da lista",link:"Inserir link",image:"Inserir imagem",table:"Inserir tabela",codeBlock:"Inserir bloco de código",thematicBreak:"Inserir separador",richText:"Texto formatado",diffMode:"Visualização de diferenças",source:"Código-fonte",blockTypeSelect:{placeholder:"Tipo de bloco",selectBlockTypeTooltip:"Selecionar tipo de bloco"},blockTypes:{paragraph:"Parágrafo",heading:"Título {{level}}",quote:"Citação"}}},th:{toolbar:{undo:"เลิกทำ {{shortcut}}",redo:"ทำซ้ำ {{shortcut}}",bold:"ตัวหนา",italic:"ตัวเอียง",underline:"ขีดเส้นใต้",removeBold:"ยกเลิกตัวหนา",removeItalic:"ยกเลิกตัวเอียง",removeUnderline:"ยกเลิกขีดเส้นใต้",inlineCode:"โค้ดในบรรทัด",removeInlineCode:"ยกเลิกโค้ดในบรรทัด",bulletedList:"รายการแบบจุด",numberedList:"รายการตัวเลข",checkList:"รายการตรวจสอบ",toggleGroup:"รูปแบบรายการ",link:"แทรกลิงก์",image:"แทรกรูปภาพ",table:"แทรกตาราง",codeBlock:"แทรกบล็อกโค้ด",thematicBreak:"แทรกเส้นคั่น",richText:"ข้อความรูปแบบ",diffMode:"มุมมองเปรียบเทียบ",source:"ซอร์ส",blockTypeSelect:{placeholder:"ประเภทบล็อก",selectBlockTypeTooltip:"เลือกประเภทบล็อก"},blockTypes:{paragraph:"ย่อหน้า",heading:"หัวข้อ {{level}}",quote:"คำพูดอ้างอิง"}}},tr:{toolbar:{undo:"Geri al {{shortcut}}",redo:"Yinele {{shortcut}}",bold:"Kalın",italic:"İtalik",underline:"Altı çizili",removeBold:"Kalını kaldır",removeItalic:"İtaliği kaldır",removeUnderline:"Altı çiziliyi kaldır",inlineCode:"Satır içi kod",removeInlineCode:"Satır içi kodu kaldır",bulletedList:"Madde işaretli liste",numberedList:"Numaralı liste",checkList:"Kontrol listesi",toggleGroup:"Liste stili",link:"Bağlantı ekle",image:"Resim ekle",table:"Tablo ekle",codeBlock:"Kod bloğu ekle",thematicBreak:"Ayraç ekle",richText:"Zengin metin",diffMode:"Karşılaştırma görünümü",source:"Kaynak",blockTypeSelect:{placeholder:"Blok türü",selectBlockTypeTooltip:"Blok türü seç"},blockTypes:{paragraph:"Paragraf",heading:"Başlık {{level}}",quote:"Alıntı"}}},uk:{toolbar:{undo:"Скасувати {{shortcut}}",redo:"Повторити {{shortcut}}",bold:"Жирний",italic:"Курсив",underline:"Підкреслений",removeBold:"Прибрати жирний",removeItalic:"Прибрати курсив",removeUnderline:"Прибрати підкреслення",inlineCode:"Вбудований код",removeInlineCode:"Прибрати вбудований код",bulletedList:"Маркований список",numberedList:"Нумерований список",checkList:"Список завдань",toggleGroup:"Стиль списку",link:"Вставити посилання",image:"Вставити зображення",table:"Вставити таблицю",codeBlock:"Вставити блок коду",thematicBreak:"Вставити роздільник",richText:"Форматований текст",diffMode:"Перегляд порівняння",source:"Джерело",blockTypeSelect:{placeholder:"Тип блоку",selectBlockTypeTooltip:"Виберіть тип блоку"},blockTypes:{paragraph:"Абзац",heading:"Заголовок {{level}}",quote:"Цитата"}}}};function mdxTranslation(key,defaultValue,interpolations){const lang=("function"==typeof getLang?getLang():"en")||"en",langTable=TRANSLATIONS[lang]||TRANSLATIONS[lang.split("-")[0]];return function(template,values){if(!values)return template;let out=template.replace(/\{\{\s*(\w+)\s*\}\}/g,(_,k)=>k in values?String(values[k]):`{{${k}}}`);return out=out.replace(/\{(\w+)\}/g,(_,k)=>k in values?String(values[k]):`{${k}}`),out}((langTable&&function(obj,path){const parts=path.split(".");let cur=obj;for(const p of parts){if(!cur||"object"!=typeof cur||!(p in cur))return;cur=cur[p]}return"string"==typeof cur?cur:void 0}(langTable,key))??defaultValue??key,interpolations)}function getDocTheme(){return"undefined"==typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}const CODE_BLOCK_LANGUAGES={"":"Plain text",js:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",py:"Python",sh:"Shell",bash:"Bash",json:"JSON",yaml:"YAML",md:"Markdown",html:"HTML",css:"CSS",sql:"SQL",go:"Go",rust:"Rust",java:"Java",cpp:"C++"},MdxEditorPanel=reactExports.forwardRef(function({initialMarkdown:initialMarkdown,onChange:onChange,onError:onError,onParseError:onParseError},ref){const editorRef=reactExports.useRef(null),[theme,setTheme]=reactExports.useState(getDocTheme),lang="function"==typeof getLang?getLang():"en";reactExports.useEffect(()=>{const target=document.documentElement,obs=new MutationObserver(()=>setTheme(getDocTheme()));return obs.observe(target,{attributes:!0,attributeFilter:["data-theme"]}),()=>obs.disconnect()},[]);const imageUploadHandler=reactExports.useCallback(async file=>{try{return await compressImageToDataURL(file,{maxEdge:2e3,quality:.85})}catch(err){const msg=`${t("ui.mdEditor.uploadFailed")}: ${err.message??err}`;try{staticMethods.error(msg)}catch{}throw"function"==typeof onError&&onError(err),err}},[onError]),wrapperRef=reactExports.useRef(null);return reactExports.useImperativeHandle(ref,()=>({getMarkdown:()=>{var _a,_b;return(null==(_b=null==(_a=editorRef.current)?void 0:_a.getMarkdown)?void 0:_b.call(_a))??""},setMarkdown:md=>{var _a,_b;return null==(_b=null==(_a=editorRef.current)?void 0:_a.setMarkdown)?void 0:_b.call(_a,md??"")},focus:()=>{var _a,_b;return null==(_b=null==(_a=editorRef.current)?void 0:_a.focus)?void 0:_b.call(_a)},getScrollEl:()=>{var _a;return(null==(_a=wrapperRef.current)?void 0:_a.querySelector(".mdxeditor-root-contenteditable"))||wrapperRef.current||null}}),[]),jsxRuntimeExports.jsx("div",{ref:wrapperRef,className:`${styles.container} ${"dark"===theme?`dark-theme ${styles.dark}`:styles.light}`,children:jsxRuntimeExports.jsx(MDXEditor,{ref:editorRef,markdown:initialMarkdown??"",onChange:onChange,onError:payload=>{if("function"==typeof onParseError)try{onParseError(payload)}catch{}},translation:mdxTranslation,contentEditableClassName:styles.contentEditable,plugins:[headingsPlugin(),listsPlugin(),quotePlugin(),linkPlugin(),linkDialogPlugin(),imagePlugin({imageUploadHandler:imageUploadHandler}),tablePlugin(),codeBlockPlugin({defaultCodeBlockLanguage:""}),codeMirrorPlugin({codeBlockLanguages:CODE_BLOCK_LANGUAGES}),thematicBreakPlugin(),markdownShortcutPlugin(),diffSourcePlugin({viewMode:"rich-text",diffMarkdown:initialMarkdown??""}),toolbarPlugin({toolbarContents:()=>jsxRuntimeExports.jsxs(DiffSourceToggleWrapper,{children:[jsxRuntimeExports.jsx(UndoRedo,{}),jsxRuntimeExports.jsx(Separator,{}),jsxRuntimeExports.jsx(BoldItalicUnderlineToggles,{}),jsxRuntimeExports.jsx(CodeToggle,{}),jsxRuntimeExports.jsx(Separator,{}),jsxRuntimeExports.jsx(BlockTypeSelect,{}),jsxRuntimeExports.jsx(ListsToggle,{}),jsxRuntimeExports.jsx(Separator,{}),jsxRuntimeExports.jsx(CreateLink,{}),jsxRuntimeExports.jsx(InsertImage,{}),jsxRuntimeExports.jsx(InsertTable,{}),jsxRuntimeExports.jsx(InsertCodeBlock,{}),jsxRuntimeExports.jsx(InsertThematicBreak,{})]})})]},lang)})});export{MdxEditorPanel as default};
|