@agent-link/server 0.1.533 → 0.1.535
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/package.json +4 -3
- package/web/dist/assets/{abnfDiagram-VRR7QNED-DTqibD6g.js → abnfDiagram-VRR7QNED-CF7P098z.js} +1 -1
- package/web/dist/assets/{arc-C3eew4e6.js → arc-C59x_NX0.js} +1 -1
- package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-uRA0GwvC.js → architectureDiagram-ZJ3FMSHR-BgiRZC4X.js} +1 -1
- package/web/dist/assets/{blockDiagram-677ZJIJ3-BfGl7qbg.js → blockDiagram-677ZJIJ3-DbyyYQVu.js} +1 -1
- package/web/dist/assets/{c4Diagram-LMCZKHZV-1hm38Bwl.js → c4Diagram-LMCZKHZV-j9yfsB9T.js} +1 -1
- package/web/dist/assets/channel-DUGYP_Ga.js +1 -0
- package/web/dist/assets/{chunk-2Q5K7J3B-BUP52oYq.js → chunk-2Q5K7J3B-DBA35W4b.js} +1 -1
- package/web/dist/assets/{chunk-32BRIVSS-yQKEtQBT.js → chunk-32BRIVSS-49t1AAEq.js} +1 -1
- package/web/dist/assets/{chunk-5VM5RSS4-Cz5gzMlS.js → chunk-5VM5RSS4-BH4tn2Bl.js} +1 -1
- package/web/dist/assets/{chunk-EX3LRPZG-rI_5p8L1.js → chunk-EX3LRPZG-DPfAknnN.js} +1 -1
- package/web/dist/assets/{chunk-JWPE2WC7-DdFuOOTn.js → chunk-JWPE2WC7-diP27-v4.js} +1 -1
- package/web/dist/assets/{chunk-MOJQB5TN-C7pc0vwS.js → chunk-MOJQB5TN-D5rohUBO.js} +1 -1
- package/web/dist/assets/{chunk-RYQCIY6F-B3lsjb_M.js → chunk-RYQCIY6F-CWwReH1T.js} +1 -1
- package/web/dist/assets/{chunk-V7JOEXUC-D06UIgKi.js → chunk-V7JOEXUC-DX_exavz.js} +1 -1
- package/web/dist/assets/{chunk-VR4S4FIN-W4KDoSuZ.js → chunk-VR4S4FIN-d8jJiY_O.js} +1 -1
- package/web/dist/assets/{chunk-XXDRQBXY-DzYnzvEh.js → chunk-XXDRQBXY-BMsRmNA_.js} +1 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-IDWWW0hg.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-IDWWW0hg.js +1 -0
- package/web/dist/assets/{cose-bilkent-JH36ORCC-CLRpdoFA.js → cose-bilkent-JH36ORCC-B5nwmF3_.js} +1 -1
- package/web/dist/assets/{cssMode-0qcDWPvz.js → cssMode-CcQVS6p2.js} +1 -1
- package/web/dist/assets/{cynefin-VYW2F7L2-D6nSGz8H.js → cynefin-VYW2F7L2-BhPPuLEh.js} +1 -1
- package/web/dist/assets/{cynefinDiagram-TSTJHNR4-9SSw1ZA7.js → cynefinDiagram-TSTJHNR4-CRDySWA4.js} +1 -1
- package/web/dist/assets/{dagre-VKFMJZFB-CZQ-wTmp.js → dagre-VKFMJZFB-Dkg9XDp_.js} +1 -1
- package/web/dist/assets/{diagram-FQU43EPY-CGfxGAx4.js → diagram-FQU43EPY-zuvpKPT_.js} +1 -1
- package/web/dist/assets/{diagram-G47NLZAW-iy9kh8dP.js → diagram-G47NLZAW-DLbZ7e8v.js} +1 -1
- package/web/dist/assets/{diagram-NH7WQ7WH-DYHISN3A.js → diagram-NH7WQ7WH-XB9yrVBk.js} +1 -1
- package/web/dist/assets/{diagram-OA4YK3LP-DHXgq-9w.js → diagram-OA4YK3LP-xVMLcUPT.js} +1 -1
- package/web/dist/assets/{diagram-WEI45ONY-tzoJ1nXV.js → diagram-WEI45ONY-B2wLh5Ur.js} +1 -1
- package/web/dist/assets/{ebnfDiagram-CCIWWBDH-B-Ad4Y1C.js → ebnfDiagram-CCIWWBDH-kGQOKNjc.js} +1 -1
- package/web/dist/assets/{editor.main-CRrZGcc8.js → editor.main-Dnk9sp-f.js} +3 -3
- package/web/dist/assets/{erDiagram-Q63AITRT-aiuxwx7u.js → erDiagram-Q63AITRT-UM746MeO.js} +1 -1
- package/web/dist/assets/{flowDiagram-23GEKE2U-HsTatdI5.js → flowDiagram-23GEKE2U-ClRiFeQ7.js} +1 -1
- package/web/dist/assets/{freemarker2-DJDpp-Fv.js → freemarker2-BR_vBZso.js} +1 -1
- package/web/dist/assets/{ganttDiagram-NO4QXBWP-QNOROSP_.js → ganttDiagram-NO4QXBWP-COkrmlRK.js} +1 -1
- package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-D7txQhQa.js → gitGraphDiagram-IHSO6WYX-Dv9WIrPI.js} +1 -1
- package/web/dist/assets/{handlebars-CWDbpKYW.js → handlebars-BT3ojp_S.js} +1 -1
- package/web/dist/assets/{html-BS45kqgL.js → html-Nfq0m1I8.js} +1 -1
- package/web/dist/assets/{htmlMode-CAnCR40m.js → htmlMode-BS4gsjsW.js} +1 -1
- package/web/dist/assets/{index-DxesAJ2s.js → index-CA5N4n3x.js} +6 -6
- package/web/dist/assets/{index-BBwchZ8I.css → index-P--EnTnB.css} +1 -1
- package/web/dist/assets/{infoDiagram-FWYZ7A6U-DWu6EBgQ.js → infoDiagram-FWYZ7A6U-DVDsQpsP.js} +1 -1
- package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-DwEW4qqa.js → ishikawaDiagram-FXEZZL3T-caLJ7q48.js} +1 -1
- package/web/dist/assets/{javascript-BF80ERom.js → javascript-BuLRuirW.js} +1 -1
- package/web/dist/assets/{journeyDiagram-5HDEW3XC-O_oDrYzt.js → journeyDiagram-5HDEW3XC-CFo7pcyA.js} +1 -1
- package/web/dist/assets/{jsonMode-D1HXiMjp.js → jsonMode-CtWdfVP4.js} +1 -1
- package/web/dist/assets/{kanban-definition-HUTT4EX6-DIJ6SMSe.js → kanban-definition-HUTT4EX6-mm_sHCRv.js} +1 -1
- package/web/dist/assets/{linear-CmbVRcR_.js → linear-BT-MpMsf.js} +1 -1
- package/web/dist/assets/{liquid-Dr7uz6WX.js → liquid-CepXiWiD.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-CdykXsuW.js → lspLanguageFeatures-CYV708a2.js} +1 -1
- package/web/dist/assets/{mdx-Yx41ZcrW.js → mdx-Cg6hI2dr.js} +1 -1
- package/web/dist/assets/{mermaid.core-CXWrxBgC.js → mermaid.core-DzASjxSb.js} +2 -2
- package/web/dist/assets/{mindmap-definition-LN4V7U3C-DwxZKA6c.js → mindmap-definition-LN4V7U3C-CQllaqbn.js} +1 -1
- package/web/dist/assets/{pegDiagram-2B236MQR-D8-bMh8z.js → pegDiagram-2B236MQR-BZjsDU53.js} +1 -1
- package/web/dist/assets/{pieDiagram-ENE6RG2P-Dgk7sruZ.js → pieDiagram-ENE6RG2P-DT-yCgy4.js} +1 -1
- package/web/dist/assets/{python-B6tr8PTH.js → python-DlYwMsHj.js} +1 -1
- package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-CODtFODk.js → quadrantDiagram-ABIIQ3AL-BifCy1v2.js} +1 -1
- package/web/dist/assets/{railroadDiagram-RFXS5EU6-DAe_gRtf.js → railroadDiagram-RFXS5EU6-Ddj5F2cR.js} +1 -1
- package/web/dist/assets/{razor-CEKCSzig.js → razor-DfctSx4t.js} +1 -1
- package/web/dist/assets/{requirementDiagram-TGXJPOKE-CY--9zSb.js → requirementDiagram-TGXJPOKE-BODdjtNi.js} +1 -1
- package/web/dist/assets/{sankeyDiagram-HTMAVEWB-Ct9U2-g_.js → sankeyDiagram-HTMAVEWB--7NcLvqQ.js} +1 -1
- package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-DIqIRBpX.js → sequenceDiagram-DBY2YBRQ-mgenv1mg.js} +1 -1
- package/web/dist/assets/{sizeCapture-X5ZJPWSS-DrnpGiKz.js → sizeCapture-X5ZJPWSS-DmdLa5Dd.js} +1 -1
- package/web/dist/assets/{stateDiagram-2N3HPSRC-X95EIyN0.js → stateDiagram-2N3HPSRC-CbaAR2rb.js} +1 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-D1D_VAAU.js +1 -0
- package/web/dist/assets/{swimlanes-5IMT3BWC-BeOG0dPV.js → swimlanes-5IMT3BWC-BXnBFUJL.js} +2 -2
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-rAYhu43H.js +1 -0
- package/web/dist/assets/{timeline-definition-FHXFAJF6-BQ5Vnv63.js → timeline-definition-FHXFAJF6-DTZ87MqH.js} +1 -1
- package/web/dist/assets/{tsMode-EwiMaZm0.js → tsMode-DeS4GNee.js} +1 -1
- package/web/dist/assets/{typescript-CBmYQinx.js → typescript-BlpXNGCd.js} +1 -1
- package/web/dist/assets/{vennDiagram-L72KCM5P-CEgiFAHT.js → vennDiagram-L72KCM5P-gcsGexxE.js} +1 -1
- package/web/dist/assets/{wardleyDiagram-EHGQE667-D7ypEdSe.js → wardleyDiagram-EHGQE667-CKvl03Jz.js} +1 -1
- package/web/dist/assets/{xml-CyQ2wxNX.js → xml-B9eDYoD1.js} +1 -1
- package/web/dist/assets/{xychartDiagram-FW5EYKEG-IaYJgy1U.js → xychartDiagram-FW5EYKEG-B3bYNF8r.js} +1 -1
- package/web/dist/assets/{yaml-DEs_nBjf.js → yaml-B4h8_T1W.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/channel-DOciy6CL.js +0 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-D8vBbsZC.js +0 -1
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-D8vBbsZC.js +0 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-DRdWHuhY.js +0 -1
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-HQ82s869.js +0 -1
package/web/dist/assets/{wardleyDiagram-EHGQE667-D7ypEdSe.js → wardleyDiagram-EHGQE667-CKvl03Jz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;import{p as e}from"./chunk-JWPE2WC7-DdFuOOTn.js";import{s as a,g as r,p as n,o,a as i,b as s,_ as l,W as d,z as c,B as p,l as x,F as h,e as y,q as g,c as f}from"./mermaid.core-CXWrxBgC.js";import{p as u}from"./cynefin-VYW2F7L2-D6nSGz8H.js";import"./index-DxesAJ2s.js";var m=l((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),w=l((t,e,a)=>({x:m(e,`${a} evolution`),y:m(t,`${a} visibility`)}),"toCoordinates"),k=l(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),b=l(t=>{if(!(null==t?void 0:t.startsWith("+")))return{};const e=/^\+'([^']*)'/.exec(t),a=null==e?void 0:e[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),v=l((t,a)=>{if(e(t,a),t.size&&a.setSize(t.size.width,t.size.height),t.evolution){const e=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);a.updateAxes({stages:e,stageBoundaries:r})}if(t.anchors.forEach(t=>{const e=w(t.visibility,t.evolution,`Anchor "${t.name}"`);a.addNode(t.name,t.name,e.x,e.y,"anchor")}),t.components.forEach(t=>{var e;const r=w(t.visibility,t.evolution,`Component "${t.name}"`),n=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,o=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,i=null==(e=t.decorator)?void 0:e.strategy;a.addNode(t.name,t.name,r.x,r.y,"component",n,o,t.inertia,i)}),t.notes.forEach(t=>{const e=w(t.visibility,t.evolution,`Note "${t.text}"`);a.addNote(t.text,e.x,e.y)}),t.pipelines.forEach(t=>{const e=a.getNode(t.parent);if(!e||"number"!=typeof e.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=e.y;a.startPipeline(t.parent),t.components.forEach(e=>{const n=`${t.parent}_${e.name}`,o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,s=m(e.evolution,`Pipeline component "${e.name}" evolution`);a.addNode(n,e.name,s,r,"pipeline-component",o,i),a.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const e=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=k(t.fromPort)??k(t.toPort);const{flow:n,label:o}=b(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;a.addLink(a.resolveNodeId(t.from),a.resolveNodeId(t.to),e,s,r)}),t.evolves.forEach(t=>{const e=a.getNode(t.component);if(void 0!==(null==e?void 0:e.y)){const r=m(t.target,`Evolve target for "${t.component}"`);a.addTrend(t.component,r,e.y)}}),t.annotations.length>0){const e=t.annotations[0],r=w(e.x,e.y,"Annotations box");a.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const e=w(t.x,t.y,`Annotation ${t.number}`);a.addAnnotation(t.number,[{x:e.x,y:e.y}],t.text)}),t.accelerators.forEach(t=>{const e=w(t.x,t.y,`Accelerator "${t.name}"`);a.addAccelerator(t.name,e.x,e.y)}),t.deaccelerators.forEach(t=>{const e=w(t.x,t.y,`Deaccelerator "${t.name}"`);a.addDeaccelerator(t.name,e.x,e.y)})},"populateDb"),$={parser:{yy:void 0},parse:l(async t=>{var e;const a=await u("wardley",t);x.debug(a);const r=null==(e=$.parser)?void 0:e.yy;if(!r||"function"!=typeof r.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.");v(a,r)},"parse")},S=new(l(t=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(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(const[e,a]of this.nodes)if(a.label===t)return e;return t}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,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"),t);function M(){return f()["wardley-beta"]}function C(t,e,a,r,n,o,i,s,l){S.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function P(t,e,a=!1,r,n){S.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function N(t,e,a){S.addTrend({nodeId:t,targetX:e,targetY:a})}function z(t,e,a){S.addAnnotation({number:t,coordinates:e,text:a})}function L(t,e,a){S.addNote({text:t,x:e,y:a})}function T(t,e,a){S.addAccelerator({name:t,x:e,y:a})}function A(t,e,a){S.addDeaccelerator({name:t,x:e,y:a})}function E(t,e){S.setAnnotationsBox(t,e)}function I(t,e){S.setSize(t,e)}function B(t){S.startPipeline(t)}function F(t,e){S.addPipelineComponent(t,e)}function R(t){S.setAxes(t)}function Y(t){return S.getNode(t)}function X(t){return S.resolveNodeId(t)}function O(){return S.build()}function W(){S.clear(),g()}l(M,"getConfig"),l(C,"addNode"),l(P,"addLink"),l(N,"addTrend"),l(z,"addAnnotation"),l(L,"addNote"),l(T,"addAccelerator"),l(A,"addDeaccelerator"),l(E,"setAnnotationsBox"),l(I,"setSize"),l(B,"startPipeline"),l(F,"addPipelineComponent"),l(R,"updateAxes"),l(Y,"getNode"),l(X,"resolveNodeId"),l(O,"getWardleyData"),l(W,"clear");var D={getConfig:M,addNode:C,addLink:P,addTrend:N,addAnnotation:z,addNote:L,addAccelerator:T,addDeaccelerator:A,setAnnotationsBox:E,setSize:I,startPipeline:B,addPipelineComponent:F,updateAxes:R,getNode:Y,resolveNodeId:X,getWardleyData:O,clear:W,setAccTitle:s,getAccTitle:i,setDiagramTitle:o,getDiagramTitle:n,getAccDescription:r,setAccDescription:a},q=["Genesis","Custom Built","Product","Commodity"],j=l(()=>{var t,e,a,r,n,o,i,s,l,d,c,p;const{themeVariables:x}=f();return{backgroundColor:(null==(t=x.wardley)?void 0:t.backgroundColor)??x.background??"#fff",axisColor:(null==(e=x.wardley)?void 0:e.axisColor)??"#000",axisTextColor:(null==(a=x.wardley)?void 0:a.axisTextColor)??x.primaryTextColor??"#222",gridColor:(null==(r=x.wardley)?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:(null==(n=x.wardley)?void 0:n.componentFill)??"#fff",componentStroke:(null==(o=x.wardley)?void 0:o.componentStroke)??"#000",componentLabelColor:(null==(i=x.wardley)?void 0:i.componentLabelColor)??x.primaryTextColor??"#222",linkStroke:(null==(s=x.wardley)?void 0:s.linkStroke)??"#000",evolutionStroke:(null==(l=x.wardley)?void 0:l.evolutionStroke)??"#dc3545",annotationStroke:(null==(d=x.wardley)?void 0:d.annotationStroke)??"#000",annotationTextColor:(null==(c=x.wardley)?void 0:c.annotationTextColor)??x.primaryTextColor??"#222",annotationFill:(null==(p=x.wardley)?void 0:p.annotationFill)??x.background??"#fff"}},"getTheme"),V=l(()=>{const t=f()["wardley-beta"];return{width:(null==t?void 0:t.width)??900,height:(null==t?void 0:t.height)??600,padding:(null==t?void 0:t.padding)??48,nodeRadius:(null==t?void 0:t.nodeRadius)??6,nodeLabelOffset:(null==t?void 0:t.nodeLabelOffset)??8,axisFontSize:(null==t?void 0:t.axisFontSize)??12,labelFontSize:(null==t?void 0:t.labelFontSize)??10,showGrid:(null==t?void 0:t.showGrid)??!1,useMaxWidth:(null==t?void 0:t.useMaxWidth)??!0}},"getConfigValues"),G={parser:$,db:D,renderer:{draw:l((t,e,a,r)=>{var n,o;x.debug("Rendering Wardley map\n"+t);const i=V(),s=j(),d=1.6*i.nodeRadius,c=r.db,p=c.getWardleyData(),g=c.getDiagramTitle(),f=(null==(n=p.size)?void 0:n.width)??i.width,u=(null==(o=p.size)?void 0:o.height)??i.height,m=h(e);m.selectAll("*").remove(),y(m,u,f,i.useMaxWidth),m.attr("viewBox",`0 0 ${f} ${u}`);const w=m.append("g").attr("class","wardley-map"),k=m.append("defs");k.append("marker").attr("id",`arrow-${e}`).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",s.evolutionStroke).attr("stroke","none"),k.append("marker").attr("id",`link-arrow-end-${e}`).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",s.linkStroke).attr("stroke","none"),k.append("marker").attr("id",`link-arrow-start-${e}`).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",s.linkStroke).attr("stroke","none"),w.append("rect").attr("class","wardley-background").attr("width",f).attr("height",u).attr("fill",s.backgroundColor);const b=f-2*i.padding,v=u-2*i.padding;g&&w.append("text").attr("class","wardley-title").attr("x",f/2).attr("y",i.padding/2).attr("fill",s.axisTextColor).attr("font-size",1.05*i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(g);const $=l(t=>i.padding+t/100*b,"projectX"),S=l(t=>u-i.padding-t/100*v,"projectY"),M=w.append("g").attr("class","wardley-axes");M.append("line").attr("x1",i.padding).attr("x2",f-i.padding).attr("y1",u-i.padding).attr("y2",u-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1),M.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1);const C=p.axes.xLabel??"Evolution",P=p.axes.yLabel??"Visibility";M.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+b/2).attr("y",u-i.padding/4).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(C),M.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+v/2).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+v/2})`).text(P);const N=p.axes.stages&&p.axes.stages.length>0?p.axes.stages:q;if(N.length>0){const t=w.append("g").attr("class","wardley-stages"),e=p.axes.stageBoundaries,a=[];if(e&&e.length===N.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/N.length;N.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}N.forEach((e,r)=>{const n=a[r],o=i.padding+n.start*b,l=(o+(i.padding+n.end*b))/2;r>0&&t.append("line").attr("x1",o).attr("x2",o).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",l).attr("y",u-i.padding/1.5).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(i.showGrid){const t=w.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=i.padding+b*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",i.padding).attr("x2",f-i.padding).attr("y1",u-i.padding-v*a).attr("y2",u-i.padding-v*a).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6")}}const z=new Map;if(p.nodes.forEach(t=>{z.set(t.id,{x:$(t.x),y:S(t.y),node:t})}),p.pipelines.length>0){const t=w.append("g").attr("class","wardley-pipelines"),e=w.append("g").attr("class","wardley-pipeline-links");p.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:z.get(t),node:p.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<r.length-1;t++){const a=r[t],n=r[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",a.pos.x).attr("y1",a.pos.y).attr("x2",n.pos.x).attr("y2",n.pos.y).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let n=1/0,o=-1/0,l=0;if(a.componentIds.forEach(t=>{const e=z.get(t);e&&(n=Math.min(n,e.x),o=Math.max(o,e.x),l=e.y)}),n!==1/0&&o!==-1/0){const e=15,r=4*i.nodeRadius,c=l-r/2,p=z.get(a.nodeId);if(p){const t=(n+o)/2;p.x=t,p.y=c-d/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",c).attr("width",o-n+2*e).attr("height",r).attr("fill","none").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const L=w.append("g").attr("class","wardley-links"),T=new Map;p.pipelines.forEach(t=>{T.set(t.nodeId,new Set(t.componentIds))});const A=p.links.filter(t=>{if(!z.has(t.source)||!z.has(t.target))return!1;const e=T.get(t.target);return!(null==e?void 0:e.has(t.source))});L.selectAll("line").data(A).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=a.x-e.x,o=a.y-e.y,s=Math.sqrt(n*n+o*o);return e.x+n/s*r}).attr("y1",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=a.x-e.x,o=a.y-e.y,s=Math.sqrt(n*n+o*o);return e.y+o/s*r}).attr("x2",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=e.x-a.x,o=e.y-a.y,s=Math.sqrt(n*n+o*o);return a.x+n/s*r}).attr("y2",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=e.x-a.x,o=e.y-a.y,s=Math.sqrt(n*n+o*o);return a.y+o/s*r}).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),L.selectAll("text").data(A.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.x+a.x)/2,n=a.y-e.y,o=a.x-e.x;return r+8*(n/Math.sqrt(o*o+n*n))}).attr("y",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.y+a.y)/2,n=a.x-e.x,o=a.y-e.y;return r+8*(-n/Math.sqrt(n*n+o*o))}).attr("fill",s.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.x+a.x)/2,n=(e.y+a.y)/2,o=a.x-e.x,i=a.y-e.y,s=Math.sqrt(o*o+i*i),l=r+8*(i/s),d=n+8*(-o/s);let c=180*Math.atan2(i,o)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${l} ${d})`}).text(t=>t.label);const E=w.append("g").attr("class","wardley-trends"),I=p.trends.map(t=>{const e=z.get(t.nodeId);if(!e)return null;const a=$(t.targetX),r=S(t.targetY),n=a-e.x,o=r-e.y,s=Math.sqrt(n*n+o*o),l=i.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-o/s*l:r}}).filter(t=>null!==t);E.selectAll("line").data(I).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",s.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const B=w.append("g").attr("class","wardley-nodes").selectAll("g").data(p.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));B.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#666").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#ccc").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const F=B.filter(t=>"market"===t.sourceStrategy);F.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",i.nodeRadius).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1);const R=.7*i.nodeRadius,Y=1.2*i.nodeRadius;if(F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x).attr("y1",t=>z.get(t.id).y-Y).attr("x2",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("y2",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("y1",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("x2",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("y2",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("y1",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("x2",t=>z.get(t.id).x).attr("y2",t=>z.get(t.id).y-Y).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y-Y).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("cy",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("cy",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),B.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>z.get(t.id).x-d/2).attr("y",t=>z.get(t.id).y-d/2).attr("width",d).attr("height",d).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=z.get(t.id);let a=t.isPipelineParent?d/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=z.get(t.id),a=t.isPipelineParent?d:2*i.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=z.get(t.id);let a=t.isPipelineParent?d/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=z.get(t.id),a=t.isPipelineParent?d:2*i.nodeRadius;return e.y+a/2}).attr("stroke",s.componentStroke).attr("stroke-width",6),B.append("text").attr("x",t=>{const e=z.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=i.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=z.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-i.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?s.evolutionStroke:"anchor"===t.className?"#000":s.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),p.annotations.length>0){const t=w.append("g").attr("class","wardley-annotations");if(p.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:$(t.x),y:S(t.y)}));if(a.length>1)for(let r=0;r<a.length-1;r++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[r].x).attr("y1",a[r].y).attr("x2",a[r+1].x).attr("y2",a[r+1].y).attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");a.forEach(a=>{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.number)})}),p.annotationsBox){let e=$(p.annotationsBox.x),a=S(p.annotationsBox.y);const r=10,n=16,o=11,l=t.append("g").attr("class","wardley-annotations-box"),d=[...p.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(d.forEach((t,i)=>{const d=l.append("text").attr("x",e+r).attr("y",a+r+(i+1)*n).attr("font-size",o).attr("fill",s.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(d)}),c.length>0){let t=0,o=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();o=Math.max(o,n.height)});const p=t+2*r+105,x=d.length*n+2*r+o/2,h=i.padding,y=f-i.padding-p,g=i.padding,m=u-i.padding-x;e=Math.max(h,Math.min(e,y)),a=Math.max(g,Math.min(a,m)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),l.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",x).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(p.notes.length>0){const t=w.append("g").attr("class","wardley-notes");p.notes.forEach(e=>{const a=$(e.x),r=S(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.text)})}if(p.accelerators.length>0){const t=w.append("g").attr("class","wardley-accelerators");p.accelerators.forEach(e=>{const a=$(e.x),r=S(e.y),n=60,o=`\n M ${a} ${r-15}\n L ${a+n-20} ${r-15}\n L ${a+n-20} ${r-15-8}\n L ${a+n} ${r}\n L ${a+n-20} ${r+15+8}\n L ${a+n-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.name)})}if(p.deaccelerators.length>0){const t=w.append("g").attr("class","wardley-deaccelerators");p.deaccelerators.forEach(e=>{const a=$(e.x),r=S(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:l(({wardley:t}={})=>{const e=d(),a=c(),r=p(e,a.themeVariables),n=p(r.wardley,t);return`\n .wardley-background {\n fill: ${n.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${n.axisColor};\n }\n .wardley-axis-label {\n fill: ${n.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${n.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${n.gridColor};\n }\n .wardley-node circle {\n fill: ${n.componentFill};\n stroke: ${n.componentStroke};\n }\n .wardley-node-label {\n fill: ${n.componentLabelColor};\n }\n .wardley-link {\n stroke: ${n.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${n.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${n.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${n.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${n.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${n.componentStroke};\n }\n .wardley-notes text {\n fill: ${n.axisTextColor};\n }\n `},"styles")};export{G as diagram};
|
|
1
|
+
var t;import{p as e}from"./chunk-JWPE2WC7-diP27-v4.js";import{s as a,g as r,p as n,o,a as i,b as s,_ as l,W as d,z as c,B as p,l as x,F as h,e as y,q as g,c as f}from"./mermaid.core-DzASjxSb.js";import{p as u}from"./cynefin-VYW2F7L2-BhPPuLEh.js";import"./index-CA5N4n3x.js";var m=l((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),w=l((t,e,a)=>({x:m(e,`${a} evolution`),y:m(t,`${a} visibility`)}),"toCoordinates"),k=l(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),b=l(t=>{if(!(null==t?void 0:t.startsWith("+")))return{};const e=/^\+'([^']*)'/.exec(t),a=null==e?void 0:e[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),v=l((t,a)=>{if(e(t,a),t.size&&a.setSize(t.size.width,t.size.height),t.evolution){const e=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);a.updateAxes({stages:e,stageBoundaries:r})}if(t.anchors.forEach(t=>{const e=w(t.visibility,t.evolution,`Anchor "${t.name}"`);a.addNode(t.name,t.name,e.x,e.y,"anchor")}),t.components.forEach(t=>{var e;const r=w(t.visibility,t.evolution,`Component "${t.name}"`),n=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,o=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,i=null==(e=t.decorator)?void 0:e.strategy;a.addNode(t.name,t.name,r.x,r.y,"component",n,o,t.inertia,i)}),t.notes.forEach(t=>{const e=w(t.visibility,t.evolution,`Note "${t.text}"`);a.addNote(t.text,e.x,e.y)}),t.pipelines.forEach(t=>{const e=a.getNode(t.parent);if(!e||"number"!=typeof e.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=e.y;a.startPipeline(t.parent),t.components.forEach(e=>{const n=`${t.parent}_${e.name}`,o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,s=m(e.evolution,`Pipeline component "${e.name}" evolution`);a.addNode(n,e.name,s,r,"pipeline-component",o,i),a.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const e=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=k(t.fromPort)??k(t.toPort);const{flow:n,label:o}=b(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;a.addLink(a.resolveNodeId(t.from),a.resolveNodeId(t.to),e,s,r)}),t.evolves.forEach(t=>{const e=a.getNode(t.component);if(void 0!==(null==e?void 0:e.y)){const r=m(t.target,`Evolve target for "${t.component}"`);a.addTrend(t.component,r,e.y)}}),t.annotations.length>0){const e=t.annotations[0],r=w(e.x,e.y,"Annotations box");a.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const e=w(t.x,t.y,`Annotation ${t.number}`);a.addAnnotation(t.number,[{x:e.x,y:e.y}],t.text)}),t.accelerators.forEach(t=>{const e=w(t.x,t.y,`Accelerator "${t.name}"`);a.addAccelerator(t.name,e.x,e.y)}),t.deaccelerators.forEach(t=>{const e=w(t.x,t.y,`Deaccelerator "${t.name}"`);a.addDeaccelerator(t.name,e.x,e.y)})},"populateDb"),$={parser:{yy:void 0},parse:l(async t=>{var e;const a=await u("wardley",t);x.debug(a);const r=null==(e=$.parser)?void 0:e.yy;if(!r||"function"!=typeof r.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.");v(a,r)},"parse")},S=new(l(t=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(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(const[e,a]of this.nodes)if(a.label===t)return e;return t}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,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"),t);function M(){return f()["wardley-beta"]}function C(t,e,a,r,n,o,i,s,l){S.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function P(t,e,a=!1,r,n){S.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function N(t,e,a){S.addTrend({nodeId:t,targetX:e,targetY:a})}function z(t,e,a){S.addAnnotation({number:t,coordinates:e,text:a})}function L(t,e,a){S.addNote({text:t,x:e,y:a})}function T(t,e,a){S.addAccelerator({name:t,x:e,y:a})}function A(t,e,a){S.addDeaccelerator({name:t,x:e,y:a})}function E(t,e){S.setAnnotationsBox(t,e)}function I(t,e){S.setSize(t,e)}function B(t){S.startPipeline(t)}function F(t,e){S.addPipelineComponent(t,e)}function R(t){S.setAxes(t)}function Y(t){return S.getNode(t)}function X(t){return S.resolveNodeId(t)}function O(){return S.build()}function W(){S.clear(),g()}l(M,"getConfig"),l(C,"addNode"),l(P,"addLink"),l(N,"addTrend"),l(z,"addAnnotation"),l(L,"addNote"),l(T,"addAccelerator"),l(A,"addDeaccelerator"),l(E,"setAnnotationsBox"),l(I,"setSize"),l(B,"startPipeline"),l(F,"addPipelineComponent"),l(R,"updateAxes"),l(Y,"getNode"),l(X,"resolveNodeId"),l(O,"getWardleyData"),l(W,"clear");var D={getConfig:M,addNode:C,addLink:P,addTrend:N,addAnnotation:z,addNote:L,addAccelerator:T,addDeaccelerator:A,setAnnotationsBox:E,setSize:I,startPipeline:B,addPipelineComponent:F,updateAxes:R,getNode:Y,resolveNodeId:X,getWardleyData:O,clear:W,setAccTitle:s,getAccTitle:i,setDiagramTitle:o,getDiagramTitle:n,getAccDescription:r,setAccDescription:a},q=["Genesis","Custom Built","Product","Commodity"],j=l(()=>{var t,e,a,r,n,o,i,s,l,d,c,p;const{themeVariables:x}=f();return{backgroundColor:(null==(t=x.wardley)?void 0:t.backgroundColor)??x.background??"#fff",axisColor:(null==(e=x.wardley)?void 0:e.axisColor)??"#000",axisTextColor:(null==(a=x.wardley)?void 0:a.axisTextColor)??x.primaryTextColor??"#222",gridColor:(null==(r=x.wardley)?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:(null==(n=x.wardley)?void 0:n.componentFill)??"#fff",componentStroke:(null==(o=x.wardley)?void 0:o.componentStroke)??"#000",componentLabelColor:(null==(i=x.wardley)?void 0:i.componentLabelColor)??x.primaryTextColor??"#222",linkStroke:(null==(s=x.wardley)?void 0:s.linkStroke)??"#000",evolutionStroke:(null==(l=x.wardley)?void 0:l.evolutionStroke)??"#dc3545",annotationStroke:(null==(d=x.wardley)?void 0:d.annotationStroke)??"#000",annotationTextColor:(null==(c=x.wardley)?void 0:c.annotationTextColor)??x.primaryTextColor??"#222",annotationFill:(null==(p=x.wardley)?void 0:p.annotationFill)??x.background??"#fff"}},"getTheme"),V=l(()=>{const t=f()["wardley-beta"];return{width:(null==t?void 0:t.width)??900,height:(null==t?void 0:t.height)??600,padding:(null==t?void 0:t.padding)??48,nodeRadius:(null==t?void 0:t.nodeRadius)??6,nodeLabelOffset:(null==t?void 0:t.nodeLabelOffset)??8,axisFontSize:(null==t?void 0:t.axisFontSize)??12,labelFontSize:(null==t?void 0:t.labelFontSize)??10,showGrid:(null==t?void 0:t.showGrid)??!1,useMaxWidth:(null==t?void 0:t.useMaxWidth)??!0}},"getConfigValues"),G={parser:$,db:D,renderer:{draw:l((t,e,a,r)=>{var n,o;x.debug("Rendering Wardley map\n"+t);const i=V(),s=j(),d=1.6*i.nodeRadius,c=r.db,p=c.getWardleyData(),g=c.getDiagramTitle(),f=(null==(n=p.size)?void 0:n.width)??i.width,u=(null==(o=p.size)?void 0:o.height)??i.height,m=h(e);m.selectAll("*").remove(),y(m,u,f,i.useMaxWidth),m.attr("viewBox",`0 0 ${f} ${u}`);const w=m.append("g").attr("class","wardley-map"),k=m.append("defs");k.append("marker").attr("id",`arrow-${e}`).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",s.evolutionStroke).attr("stroke","none"),k.append("marker").attr("id",`link-arrow-end-${e}`).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",s.linkStroke).attr("stroke","none"),k.append("marker").attr("id",`link-arrow-start-${e}`).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",s.linkStroke).attr("stroke","none"),w.append("rect").attr("class","wardley-background").attr("width",f).attr("height",u).attr("fill",s.backgroundColor);const b=f-2*i.padding,v=u-2*i.padding;g&&w.append("text").attr("class","wardley-title").attr("x",f/2).attr("y",i.padding/2).attr("fill",s.axisTextColor).attr("font-size",1.05*i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(g);const $=l(t=>i.padding+t/100*b,"projectX"),S=l(t=>u-i.padding-t/100*v,"projectY"),M=w.append("g").attr("class","wardley-axes");M.append("line").attr("x1",i.padding).attr("x2",f-i.padding).attr("y1",u-i.padding).attr("y2",u-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1),M.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1);const C=p.axes.xLabel??"Evolution",P=p.axes.yLabel??"Visibility";M.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+b/2).attr("y",u-i.padding/4).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(C),M.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+v/2).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+v/2})`).text(P);const N=p.axes.stages&&p.axes.stages.length>0?p.axes.stages:q;if(N.length>0){const t=w.append("g").attr("class","wardley-stages"),e=p.axes.stageBoundaries,a=[];if(e&&e.length===N.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/N.length;N.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}N.forEach((e,r)=>{const n=a[r],o=i.padding+n.start*b,l=(o+(i.padding+n.end*b))/2;r>0&&t.append("line").attr("x1",o).attr("x2",o).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",l).attr("y",u-i.padding/1.5).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(i.showGrid){const t=w.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=i.padding+b*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",i.padding).attr("x2",f-i.padding).attr("y1",u-i.padding-v*a).attr("y2",u-i.padding-v*a).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6")}}const z=new Map;if(p.nodes.forEach(t=>{z.set(t.id,{x:$(t.x),y:S(t.y),node:t})}),p.pipelines.length>0){const t=w.append("g").attr("class","wardley-pipelines"),e=w.append("g").attr("class","wardley-pipeline-links");p.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:z.get(t),node:p.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<r.length-1;t++){const a=r[t],n=r[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",a.pos.x).attr("y1",a.pos.y).attr("x2",n.pos.x).attr("y2",n.pos.y).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let n=1/0,o=-1/0,l=0;if(a.componentIds.forEach(t=>{const e=z.get(t);e&&(n=Math.min(n,e.x),o=Math.max(o,e.x),l=e.y)}),n!==1/0&&o!==-1/0){const e=15,r=4*i.nodeRadius,c=l-r/2,p=z.get(a.nodeId);if(p){const t=(n+o)/2;p.x=t,p.y=c-d/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",c).attr("width",o-n+2*e).attr("height",r).attr("fill","none").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const L=w.append("g").attr("class","wardley-links"),T=new Map;p.pipelines.forEach(t=>{T.set(t.nodeId,new Set(t.componentIds))});const A=p.links.filter(t=>{if(!z.has(t.source)||!z.has(t.target))return!1;const e=T.get(t.target);return!(null==e?void 0:e.has(t.source))});L.selectAll("line").data(A).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=a.x-e.x,o=a.y-e.y,s=Math.sqrt(n*n+o*o);return e.x+n/s*r}).attr("y1",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=a.x-e.x,o=a.y-e.y,s=Math.sqrt(n*n+o*o);return e.y+o/s*r}).attr("x2",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=e.x-a.x,o=e.y-a.y,s=Math.sqrt(n*n+o*o);return a.x+n/s*r}).attr("y2",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=e.x-a.x,o=e.y-a.y,s=Math.sqrt(n*n+o*o);return a.y+o/s*r}).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),L.selectAll("text").data(A.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.x+a.x)/2,n=a.y-e.y,o=a.x-e.x;return r+8*(n/Math.sqrt(o*o+n*n))}).attr("y",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.y+a.y)/2,n=a.x-e.x,o=a.y-e.y;return r+8*(-n/Math.sqrt(n*n+o*o))}).attr("fill",s.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.x+a.x)/2,n=(e.y+a.y)/2,o=a.x-e.x,i=a.y-e.y,s=Math.sqrt(o*o+i*i),l=r+8*(i/s),d=n+8*(-o/s);let c=180*Math.atan2(i,o)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${l} ${d})`}).text(t=>t.label);const E=w.append("g").attr("class","wardley-trends"),I=p.trends.map(t=>{const e=z.get(t.nodeId);if(!e)return null;const a=$(t.targetX),r=S(t.targetY),n=a-e.x,o=r-e.y,s=Math.sqrt(n*n+o*o),l=i.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-o/s*l:r}}).filter(t=>null!==t);E.selectAll("line").data(I).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",s.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const B=w.append("g").attr("class","wardley-nodes").selectAll("g").data(p.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));B.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#666").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#ccc").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const F=B.filter(t=>"market"===t.sourceStrategy);F.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",i.nodeRadius).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1);const R=.7*i.nodeRadius,Y=1.2*i.nodeRadius;if(F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x).attr("y1",t=>z.get(t.id).y-Y).attr("x2",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("y2",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("y1",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("x2",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("y2",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("y1",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("x2",t=>z.get(t.id).x).attr("y2",t=>z.get(t.id).y-Y).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y-Y).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("cy",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("cy",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),B.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>z.get(t.id).x-d/2).attr("y",t=>z.get(t.id).y-d/2).attr("width",d).attr("height",d).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=z.get(t.id);let a=t.isPipelineParent?d/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=z.get(t.id),a=t.isPipelineParent?d:2*i.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=z.get(t.id);let a=t.isPipelineParent?d/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=z.get(t.id),a=t.isPipelineParent?d:2*i.nodeRadius;return e.y+a/2}).attr("stroke",s.componentStroke).attr("stroke-width",6),B.append("text").attr("x",t=>{const e=z.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=i.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=z.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-i.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?s.evolutionStroke:"anchor"===t.className?"#000":s.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),p.annotations.length>0){const t=w.append("g").attr("class","wardley-annotations");if(p.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:$(t.x),y:S(t.y)}));if(a.length>1)for(let r=0;r<a.length-1;r++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[r].x).attr("y1",a[r].y).attr("x2",a[r+1].x).attr("y2",a[r+1].y).attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");a.forEach(a=>{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.number)})}),p.annotationsBox){let e=$(p.annotationsBox.x),a=S(p.annotationsBox.y);const r=10,n=16,o=11,l=t.append("g").attr("class","wardley-annotations-box"),d=[...p.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(d.forEach((t,i)=>{const d=l.append("text").attr("x",e+r).attr("y",a+r+(i+1)*n).attr("font-size",o).attr("fill",s.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(d)}),c.length>0){let t=0,o=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();o=Math.max(o,n.height)});const p=t+2*r+105,x=d.length*n+2*r+o/2,h=i.padding,y=f-i.padding-p,g=i.padding,m=u-i.padding-x;e=Math.max(h,Math.min(e,y)),a=Math.max(g,Math.min(a,m)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),l.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",x).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(p.notes.length>0){const t=w.append("g").attr("class","wardley-notes");p.notes.forEach(e=>{const a=$(e.x),r=S(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.text)})}if(p.accelerators.length>0){const t=w.append("g").attr("class","wardley-accelerators");p.accelerators.forEach(e=>{const a=$(e.x),r=S(e.y),n=60,o=`\n M ${a} ${r-15}\n L ${a+n-20} ${r-15}\n L ${a+n-20} ${r-15-8}\n L ${a+n} ${r}\n L ${a+n-20} ${r+15+8}\n L ${a+n-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.name)})}if(p.deaccelerators.length>0){const t=w.append("g").attr("class","wardley-deaccelerators");p.deaccelerators.forEach(e=>{const a=$(e.x),r=S(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:l(({wardley:t}={})=>{const e=d(),a=c(),r=p(e,a.themeVariables),n=p(r.wardley,t);return`\n .wardley-background {\n fill: ${n.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${n.axisColor};\n }\n .wardley-axis-label {\n fill: ${n.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${n.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${n.gridColor};\n }\n .wardley-node circle {\n fill: ${n.componentFill};\n stroke: ${n.componentStroke};\n }\n .wardley-node-label {\n fill: ${n.componentLabelColor};\n }\n .wardley-link {\n stroke: ${n.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${n.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${n.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${n.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${n.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${n.componentStroke};\n }\n .wardley-notes text {\n fill: ${n.axisTextColor};\n }\n `},"styles")};export{G as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./editor.main-
|
|
1
|
+
import{l as e}from"./editor.main-Dnk9sp-f.js";import"./index-CA5N4n3x.js";const t={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{t as conf,n as language};
|
package/web/dist/assets/{xychartDiagram-FW5EYKEG-IaYJgy1U.js → xychartDiagram-FW5EYKEG-B3bYNF8r.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,i,e,s,a,n,o,h,r,l;import{s as c,g,p as u,o as x,a as d,b as p,_ as f,l as m,F as y,e as b,q as A,z as w,i as C,B as S,D as k,W as _,ay as R,a6 as T}from"./mermaid.core-CXWrxBgC.js";import{i as D}from"./init-C0SZ43gy.js";import{o as L}from"./ordinal-CVjKTKEW.js";import{l as P}from"./linear-CmbVRcR_.js";import"./index-DxesAJ2s.js";import"./defaultLocale-BsH76t_G.js";function v(){var t,i,e=L().unknown(void 0),s=e.domain,a=e.range,n=0,o=1,h=!1,r=0,l=0,c=.5;function g(){var e=s().length,g=o<n,u=g?o:n,x=g?n:o;t=(x-u)/Math.max(1,e-r+2*l),h&&(t=Math.floor(t)),u+=(x-u-t*(e-r))*c,i=t*(1-r),h&&(u=Math.round(u),i=Math.round(i));var d=function(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=0|Math.max(0,Math.ceil((i-t)/e)),n=new Array(a);++s<a;)n[s]=t+s*e;return n}(e).map(function(i){return u+t*i});return a(g?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(s(t),g()):s()},e.range=function(t){return arguments.length?([n,o]=t,n=+n,o=+o,g()):[n,o]},e.rangeRound=function(t){return[n,o]=t,n=+n,o=+o,h=!0,g()},e.bandwidth=function(){return i},e.step=function(){return t},e.round=function(t){return arguments.length?(h=!!t,g()):h},e.padding=function(t){return arguments.length?(r=Math.min(1,l=+t),g()):r},e.paddingInner=function(t){return arguments.length?(r=Math.min(1,t),g()):r},e.paddingOuter=function(t){return arguments.length?(l=+t,g()):l},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),g()):c},e.copy=function(){return v(s(),[n,o]).round(h).paddingInner(r).paddingOuter(l).align(c)},D.apply(g(),arguments)}var E=function(){var t=f(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,36,37,38],r=[1,25],l=[1,26],c=[1,28],g=[1,29],u=[1,30],x=[1,31],d=[1,32],p=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],w=[1,43],C=[1,42],S=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],R=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:f(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,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$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",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"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],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:f(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:o}),{11:23,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:39,13:38,24:w,29:C,30:r,31:40,32:41,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:45,15:44,29:S,30:r,35:46,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:49,17:48,24:k,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:52,17:51,24:k,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(R,[2,39],{41:55,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A}),t(R,[2,40]),t(R,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(_,[2,10]),t(_,[2,24],{32:41,31:56,24:w,29:C}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:r,34:58,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},t(_,[2,11]),t(_,[2,32],{35:60,29:S}),t(_,[2,34]),{33:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(_,[2,14]),{17:66,24:k},t(_,[2,16]),t(_,[2,17]),t(T,[2,43]),t(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(_,[2,33]),{29:[1,70]},t(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(_,[2,15]),t(_,[2,28]),t(_,[2,29]),{11:59,30:r,34:74,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},t(_,[2,35]),t(_,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:f(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:f(function(t){var i=this,e=[0],s=[],a=[null],n=[],o=this.table,h="",r=0,l=0,c=n.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var d=g.yylloc;n.push(d);var p=g.options&&g.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,f(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),f(m,"lex");for(var y,b,A,w,C,S,k,_,R={};;){if(b=e[e.length-1],this.defaultActions[b]?A=this.defaultActions[b]:(null==y&&(y=m()),A=o[b]&&o[b][y]),void 0===A||!A.length||!A[0]){var T="";for(C in _=[],o[b])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");T=g.showPosition?"Parse error on line "+(r+1)+":\n"+g.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:d,expected:_})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(A[0]){case 1:e.push(y),a.push(g.yytext),n.push(g.yylloc),e.push(A[1]),y=null,l=g.yyleng,h=g.yytext,r=g.yylineno,d=g.yylloc;break;case 2:if(S=this.productions_[A[1]][1],R.$=a[a.length-S],R._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},p&&(R._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),void 0!==(w=this.performAction.apply(R,[h,l,r,u.yy,A[1],a,n].concat(c))))return w;S&&(e=e.slice(0,-1*S*2),a=a.slice(0,-1*S),n=n.slice(0,-1*S)),e.push(this.productions_[A[1]][0]),a.push(R.$),n.push(R._$),k=o[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:f(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:f(function(t,i){return this.yy=i||this.yy||{},this._input=t,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:f(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:f(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(t){this.unput(this.match.slice(t))},"less"),pastInput:f(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:f(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===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:f(function(){var t=this.next();return t||this.lex()},"lex"),begin:f(function(t){this.conditionStack.push(t)},"begin"),popState:f(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:f(function(t){this.begin(t)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;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 33;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 29;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 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"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 E(){this.yy={}}return P.lexer=v,f(E,"Parser"),E.prototype=P,P.Parser=E,new E}();E.parser=E;var M=E;function I(t){return"bar"===t.type}function z(t){return"band"===t.type}function $(t){return"linear"===t.type}f(I,"isBarPlot"),f(z,"isBandAxisData"),f($,"isLinearAxisData");var B=(f(t=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=R(s,1,a),n=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,n),e.height=Math.max(e.height,o)}return s.remove(),e}},"TextDimensionCalculatorWithFont"),t),O=(f(i=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,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.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}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"),i),F=(f(e=class extends O{constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=v().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=v().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),m.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},"BandAxis"),e),W=(f(s=class extends O{constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=P().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=P().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},"LinearAxis"),s);function X(t,i,e,s){const a=new B(s);return z(t)?new F(i,e,t.categories,t.title,a):new W(i,e,[t.min,t.max],t.title,a)}f(X,"getAxis");var N=(f(a=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.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}]}),t}},"ChartTitle"),a);function V(t,i,e,s){const a=new B(s);return new N(a,t,i,e)}f(V,"getChartTitleComponent");var Y=(f(n=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?T().y(t=>t[0]).x(t=>t[1])(t):T().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},"LinePlot"),n),H=(f(o=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},"BarPlot"),o),U=(f(h=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.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 t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new Y(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new H(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}},"BasePlot"),h);function j(t,i,e){return new U(t,i,e)}f(j,"getPlotComponent");var G,Q=(f(r=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:V(t,i,e,s),plot:j(t,i,e),xAxis:X(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:X(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:n});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>I(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,a=e+h.height,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>I(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},"Orchestrator"),r),K=(f(l=class{static build(t,i,e,s){return new Q(t,i,e,s).getDrawableElement()}},"XYChartBuilder"),l),q=0,Z=nt(),J=at(),tt=ot(),it=J.plotColorPalette.split(",").map(t=>t.trim()),et=!1,st=!1;function at(){const t=_(),i=w();return S(t.xyChart,i.themeVariables.xyChart)}function nt(){const t=w();return S(k.xyChart,t.xyChart)}function ot(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function ht(t){const i=w();return C(t.trim(),i)}function rt(t){G=t}function lt(t){Z.chartOrientation="horizontal"===t?"horizontal":"vertical"}function ct(t){tt.xAxis.title=ht(t.text)}function gt(t,i){tt.xAxis={type:"linear",title:tt.xAxis.title,min:t,max:i},et=!0}function ut(t){tt.xAxis={type:"band",title:tt.xAxis.title,categories:t.map(t=>ht(t.text))},et=!0}function xt(t){tt.yAxis.title=ht(t.text)}function dt(t,i){tt.yAxis={type:"linear",title:tt.yAxis.title,min:t,max:i},st=!0}function pt(t){const i=Math.min(...t),e=Math.max(...t),s=$(tt.yAxis)?tt.yAxis.min:1/0,a=$(tt.yAxis)?tt.yAxis.max:-1/0;tt.yAxis={type:"linear",title:tt.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function ft(t){let i=[];if(0===t.length)return i;if(!et){const i=$(tt.xAxis)?tt.xAxis.min:1/0,e=$(tt.xAxis)?tt.xAxis.max:-1/0;gt(Math.min(i,1),Math.max(e,t.length))}if(z(tt.xAxis)&&t.length>tt.xAxis.categories.length&&(t=t.slice(0,tt.xAxis.categories.length)),st||pt(t),z(tt.xAxis)&&(i=tt.xAxis.categories.map((i,e)=>[i,t[e]])),$(tt.xAxis)){const e=tt.xAxis.min,s=tt.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function mt(t){return it[0===t?0:t%it.length]}function yt(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?ht(t.label):""),a=ft(e),n=s.some(t=>""!==t);tt.plots.push({type:"line",strokeFill:mt(q),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),q++}function bt(t,i){const e=ft(i.map(t=>t.value));tt.plots.push({type:"bar",fill:mt(q),data:e}),q++}function At(){if(0===tt.plots.length)throw Error("No Plot to render, please provide a plot with some data");return tt.title=u(),K.build(Z,tt,J,G)}function wt(){return J}function Ct(){return Z}function St(){return tt}f(at,"getChartDefaultThemeConfig"),f(nt,"getChartDefaultConfig"),f(ot,"getChartDefaultData"),f(ht,"textSanitizer"),f(rt,"setTmpSVGG"),f(lt,"setOrientation"),f(ct,"setXAxisTitle"),f(gt,"setXAxisRangeData"),f(ut,"setXAxisBand"),f(xt,"setYAxisTitle"),f(dt,"setYAxisRangeData"),f(pt,"setYAxisRangeFromPlotData"),f(ft,"transformDataWithoutCategory"),f(mt,"getPlotColorFromPalette"),f(yt,"setLineData"),f(bt,"setBarData"),f(At,"getDrawableElem"),f(wt,"getChartThemeConfig"),f(Ct,"getChartConfig"),f(St,"getXYChartData");var kt={parser:M,db:{getDrawableElem:At,clear:f(function(){A(),q=0,Z=nt(),tt={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},J=at(),it=J.plotColorPalette.split(",").map(t=>t.trim()),et=!1,st=!1},"clear"),setAccTitle:p,getAccTitle:d,setDiagramTitle:x,getDiagramTitle:u,getAccDescription:g,setAccDescription:c,setOrientation:lt,setXAxisTitle:ct,setXAxisRangeData:gt,setXAxisBand:ut,setYAxisTitle:xt,setYAxisRangeData:dt,setLineData:yt,setBarData:bt,setTmpSVGG:rt,getChartThemeConfig:wt,getChartConfig:Ct,getXYChartData:St},renderer:{draw:f((t,i,e,s)=>{const a=s.db,n=a.getChartThemeConfig(),o=a.getChartConfig(),h=a.getXYChartData().plots[0].data.map(t=>t[1]);function r(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}f(r,"getDominantBaseLine"),f(l,"getTextAnchor"),f(c,"getTextTransformation"),m.debug("Rendering xychart chart\n"+t);const g=y(i),u=g.append("g").attr("class","main"),x=u.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");b(g,o.height,o.width,!0),g.attr("viewBox",`0 0 ${o.width} ${o.height}`),x.attr("fill",n.backgroundColor),a.setTmpSVGG(g.append("g").attr("class","mermaid-tmp-group"));const d=a.getDrawableElem(),p={};function A(t){let i=u,e="";for(const[s]of t.entries()){let a=u;s>0&&p[e]&&(a=p[e]),e+=t[s],i=p[e],i||(i=p[e]=a.append("g").attr("class",t[s]))}return i}f(A,"getGroup");for(const m of d){if(0===m.data.length)continue;const t=A(m.groupTexts);switch(m.type){case"rect":if(t.selectAll("rect").data(m.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),o.showDataLabel){const i=o.showDataLabelOutsideBar;if("horizontal"===o.chartOrientation){let e=function(t,i){const{data:e,label:n}=t;return i*n.length*s<=e.width-a};f(e,"fitsHorizontally");const s=.7,a=10,o=m.data.map((t,i)=>({data:t,label:h[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=o.map(t=>{const{data:i}=t;let s=.7*i.height;for(;!e(t,s)&&s>0;)s-=1;return s}),l=Math.floor(Math.min(...r)),c=f(t=>i?t.data.x+t.data.width+a:t.data.x+t.data.width-a,"determineLabelXPosition");t.selectAll("text").data(o).enter().append("text").attr("x",c).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",i?"start":"end").attr("dominant-baseline","middle").attr("fill",n.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}else{let e=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};f(e,"fitsInBar");const s=10,a=m.data.map((t,i)=>({data:t,label:h[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=a.map(t=>{const{data:i,label:a}=t;let n=i.width/(.7*a.length);for(;!e(t,n,s)&&n>0;)n-=1;return n}),r=Math.floor(Math.min(...o)),l=f(t=>i?t.data.y-s:t.data.y+s,"determineLabelYPosition");t.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",l).attr("text-anchor","middle").attr("dominant-baseline",i?"auto":"hanging").attr("fill",n.dataLabelColor).attr("font-size",`${r}px`).text(t=>t.label)}}break;case"text":t.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>r(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(m.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};export{kt as diagram};
|
|
1
|
+
var t,i,e,s,a,n,o,h,r,l;import{s as c,g,p as u,o as x,a as d,b as p,_ as f,l as m,F as y,e as b,q as A,z as w,i as C,B as S,D as k,W as _,ay as R,a6 as T}from"./mermaid.core-DzASjxSb.js";import{i as D}from"./init-C0SZ43gy.js";import{o as L}from"./ordinal-CVjKTKEW.js";import{l as P}from"./linear-BT-MpMsf.js";import"./index-CA5N4n3x.js";import"./defaultLocale-BsH76t_G.js";function v(){var t,i,e=L().unknown(void 0),s=e.domain,a=e.range,n=0,o=1,h=!1,r=0,l=0,c=.5;function g(){var e=s().length,g=o<n,u=g?o:n,x=g?n:o;t=(x-u)/Math.max(1,e-r+2*l),h&&(t=Math.floor(t)),u+=(x-u-t*(e-r))*c,i=t*(1-r),h&&(u=Math.round(u),i=Math.round(i));var d=function(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=0|Math.max(0,Math.ceil((i-t)/e)),n=new Array(a);++s<a;)n[s]=t+s*e;return n}(e).map(function(i){return u+t*i});return a(g?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(s(t),g()):s()},e.range=function(t){return arguments.length?([n,o]=t,n=+n,o=+o,g()):[n,o]},e.rangeRound=function(t){return[n,o]=t,n=+n,o=+o,h=!0,g()},e.bandwidth=function(){return i},e.step=function(){return t},e.round=function(t){return arguments.length?(h=!!t,g()):h},e.padding=function(t){return arguments.length?(r=Math.min(1,l=+t),g()):r},e.paddingInner=function(t){return arguments.length?(r=Math.min(1,t),g()):r},e.paddingOuter=function(t){return arguments.length?(l=+t,g()):l},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),g()):c},e.copy=function(){return v(s(),[n,o]).round(h).paddingInner(r).paddingOuter(l).align(c)},D.apply(g(),arguments)}var E=function(){var t=f(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,36,37,38],r=[1,25],l=[1,26],c=[1,28],g=[1,29],u=[1,30],x=[1,31],d=[1,32],p=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],w=[1,43],C=[1,42],S=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],R=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:f(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,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$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",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"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],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:f(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:o}),{11:23,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:39,13:38,24:w,29:C,30:r,31:40,32:41,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:45,15:44,29:S,30:r,35:46,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:49,17:48,24:k,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:52,17:51,24:k,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(R,[2,39],{41:55,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A}),t(R,[2,40]),t(R,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(_,[2,10]),t(_,[2,24],{32:41,31:56,24:w,29:C}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:r,34:58,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},t(_,[2,11]),t(_,[2,32],{35:60,29:S}),t(_,[2,34]),{33:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(_,[2,14]),{17:66,24:k},t(_,[2,16]),t(_,[2,17]),t(T,[2,43]),t(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(_,[2,33]),{29:[1,70]},t(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(_,[2,15]),t(_,[2,28]),t(_,[2,29]),{11:59,30:r,34:74,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},t(_,[2,35]),t(_,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:f(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:f(function(t){var i=this,e=[0],s=[],a=[null],n=[],o=this.table,h="",r=0,l=0,c=n.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var d=g.yylloc;n.push(d);var p=g.options&&g.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,f(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),f(m,"lex");for(var y,b,A,w,C,S,k,_,R={};;){if(b=e[e.length-1],this.defaultActions[b]?A=this.defaultActions[b]:(null==y&&(y=m()),A=o[b]&&o[b][y]),void 0===A||!A.length||!A[0]){var T="";for(C in _=[],o[b])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");T=g.showPosition?"Parse error on line "+(r+1)+":\n"+g.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:d,expected:_})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(A[0]){case 1:e.push(y),a.push(g.yytext),n.push(g.yylloc),e.push(A[1]),y=null,l=g.yyleng,h=g.yytext,r=g.yylineno,d=g.yylloc;break;case 2:if(S=this.productions_[A[1]][1],R.$=a[a.length-S],R._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},p&&(R._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),void 0!==(w=this.performAction.apply(R,[h,l,r,u.yy,A[1],a,n].concat(c))))return w;S&&(e=e.slice(0,-1*S*2),a=a.slice(0,-1*S),n=n.slice(0,-1*S)),e.push(this.productions_[A[1]][0]),a.push(R.$),n.push(R._$),k=o[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:f(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:f(function(t,i){return this.yy=i||this.yy||{},this._input=t,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:f(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:f(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(t){this.unput(this.match.slice(t))},"less"),pastInput:f(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:f(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===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:f(function(){var t=this.next();return t||this.lex()},"lex"),begin:f(function(t){this.conditionStack.push(t)},"begin"),popState:f(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:f(function(t){this.begin(t)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;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 33;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 29;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 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"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 E(){this.yy={}}return P.lexer=v,f(E,"Parser"),E.prototype=P,P.Parser=E,new E}();E.parser=E;var M=E;function I(t){return"bar"===t.type}function z(t){return"band"===t.type}function $(t){return"linear"===t.type}f(I,"isBarPlot"),f(z,"isBandAxisData"),f($,"isLinearAxisData");var B=(f(t=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=R(s,1,a),n=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,n),e.height=Math.max(e.height,o)}return s.remove(),e}},"TextDimensionCalculatorWithFont"),t),O=(f(i=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,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.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}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"),i),F=(f(e=class extends O{constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=v().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=v().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),m.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},"BandAxis"),e),W=(f(s=class extends O{constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=P().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=P().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},"LinearAxis"),s);function X(t,i,e,s){const a=new B(s);return z(t)?new F(i,e,t.categories,t.title,a):new W(i,e,[t.min,t.max],t.title,a)}f(X,"getAxis");var N=(f(a=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.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}]}),t}},"ChartTitle"),a);function V(t,i,e,s){const a=new B(s);return new N(a,t,i,e)}f(V,"getChartTitleComponent");var Y=(f(n=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?T().y(t=>t[0]).x(t=>t[1])(t):T().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},"LinePlot"),n),H=(f(o=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},"BarPlot"),o),U=(f(h=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.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 t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new Y(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new H(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}},"BasePlot"),h);function j(t,i,e){return new U(t,i,e)}f(j,"getPlotComponent");var G,Q=(f(r=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:V(t,i,e,s),plot:j(t,i,e),xAxis:X(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:X(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:n});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>I(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,a=e+h.height,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>I(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},"Orchestrator"),r),K=(f(l=class{static build(t,i,e,s){return new Q(t,i,e,s).getDrawableElement()}},"XYChartBuilder"),l),q=0,Z=nt(),J=at(),tt=ot(),it=J.plotColorPalette.split(",").map(t=>t.trim()),et=!1,st=!1;function at(){const t=_(),i=w();return S(t.xyChart,i.themeVariables.xyChart)}function nt(){const t=w();return S(k.xyChart,t.xyChart)}function ot(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function ht(t){const i=w();return C(t.trim(),i)}function rt(t){G=t}function lt(t){Z.chartOrientation="horizontal"===t?"horizontal":"vertical"}function ct(t){tt.xAxis.title=ht(t.text)}function gt(t,i){tt.xAxis={type:"linear",title:tt.xAxis.title,min:t,max:i},et=!0}function ut(t){tt.xAxis={type:"band",title:tt.xAxis.title,categories:t.map(t=>ht(t.text))},et=!0}function xt(t){tt.yAxis.title=ht(t.text)}function dt(t,i){tt.yAxis={type:"linear",title:tt.yAxis.title,min:t,max:i},st=!0}function pt(t){const i=Math.min(...t),e=Math.max(...t),s=$(tt.yAxis)?tt.yAxis.min:1/0,a=$(tt.yAxis)?tt.yAxis.max:-1/0;tt.yAxis={type:"linear",title:tt.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function ft(t){let i=[];if(0===t.length)return i;if(!et){const i=$(tt.xAxis)?tt.xAxis.min:1/0,e=$(tt.xAxis)?tt.xAxis.max:-1/0;gt(Math.min(i,1),Math.max(e,t.length))}if(z(tt.xAxis)&&t.length>tt.xAxis.categories.length&&(t=t.slice(0,tt.xAxis.categories.length)),st||pt(t),z(tt.xAxis)&&(i=tt.xAxis.categories.map((i,e)=>[i,t[e]])),$(tt.xAxis)){const e=tt.xAxis.min,s=tt.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function mt(t){return it[0===t?0:t%it.length]}function yt(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?ht(t.label):""),a=ft(e),n=s.some(t=>""!==t);tt.plots.push({type:"line",strokeFill:mt(q),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),q++}function bt(t,i){const e=ft(i.map(t=>t.value));tt.plots.push({type:"bar",fill:mt(q),data:e}),q++}function At(){if(0===tt.plots.length)throw Error("No Plot to render, please provide a plot with some data");return tt.title=u(),K.build(Z,tt,J,G)}function wt(){return J}function Ct(){return Z}function St(){return tt}f(at,"getChartDefaultThemeConfig"),f(nt,"getChartDefaultConfig"),f(ot,"getChartDefaultData"),f(ht,"textSanitizer"),f(rt,"setTmpSVGG"),f(lt,"setOrientation"),f(ct,"setXAxisTitle"),f(gt,"setXAxisRangeData"),f(ut,"setXAxisBand"),f(xt,"setYAxisTitle"),f(dt,"setYAxisRangeData"),f(pt,"setYAxisRangeFromPlotData"),f(ft,"transformDataWithoutCategory"),f(mt,"getPlotColorFromPalette"),f(yt,"setLineData"),f(bt,"setBarData"),f(At,"getDrawableElem"),f(wt,"getChartThemeConfig"),f(Ct,"getChartConfig"),f(St,"getXYChartData");var kt={parser:M,db:{getDrawableElem:At,clear:f(function(){A(),q=0,Z=nt(),tt={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},J=at(),it=J.plotColorPalette.split(",").map(t=>t.trim()),et=!1,st=!1},"clear"),setAccTitle:p,getAccTitle:d,setDiagramTitle:x,getDiagramTitle:u,getAccDescription:g,setAccDescription:c,setOrientation:lt,setXAxisTitle:ct,setXAxisRangeData:gt,setXAxisBand:ut,setYAxisTitle:xt,setYAxisRangeData:dt,setLineData:yt,setBarData:bt,setTmpSVGG:rt,getChartThemeConfig:wt,getChartConfig:Ct,getXYChartData:St},renderer:{draw:f((t,i,e,s)=>{const a=s.db,n=a.getChartThemeConfig(),o=a.getChartConfig(),h=a.getXYChartData().plots[0].data.map(t=>t[1]);function r(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}f(r,"getDominantBaseLine"),f(l,"getTextAnchor"),f(c,"getTextTransformation"),m.debug("Rendering xychart chart\n"+t);const g=y(i),u=g.append("g").attr("class","main"),x=u.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");b(g,o.height,o.width,!0),g.attr("viewBox",`0 0 ${o.width} ${o.height}`),x.attr("fill",n.backgroundColor),a.setTmpSVGG(g.append("g").attr("class","mermaid-tmp-group"));const d=a.getDrawableElem(),p={};function A(t){let i=u,e="";for(const[s]of t.entries()){let a=u;s>0&&p[e]&&(a=p[e]),e+=t[s],i=p[e],i||(i=p[e]=a.append("g").attr("class",t[s]))}return i}f(A,"getGroup");for(const m of d){if(0===m.data.length)continue;const t=A(m.groupTexts);switch(m.type){case"rect":if(t.selectAll("rect").data(m.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),o.showDataLabel){const i=o.showDataLabelOutsideBar;if("horizontal"===o.chartOrientation){let e=function(t,i){const{data:e,label:n}=t;return i*n.length*s<=e.width-a};f(e,"fitsHorizontally");const s=.7,a=10,o=m.data.map((t,i)=>({data:t,label:h[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=o.map(t=>{const{data:i}=t;let s=.7*i.height;for(;!e(t,s)&&s>0;)s-=1;return s}),l=Math.floor(Math.min(...r)),c=f(t=>i?t.data.x+t.data.width+a:t.data.x+t.data.width-a,"determineLabelXPosition");t.selectAll("text").data(o).enter().append("text").attr("x",c).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",i?"start":"end").attr("dominant-baseline","middle").attr("fill",n.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}else{let e=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};f(e,"fitsInBar");const s=10,a=m.data.map((t,i)=>({data:t,label:h[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=a.map(t=>{const{data:i,label:a}=t;let n=i.width/(.7*a.length);for(;!e(t,n,s)&&n>0;)n-=1;return n}),r=Math.floor(Math.min(...o)),l=f(t=>i?t.data.y-s:t.data.y+s,"determineLabelYPosition");t.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",l).attr("text-anchor","middle").attr("dominant-baseline",i?"auto":"hanging").attr("fill",n.dataLabelColor).attr("font-size",`${r}px`).text(t=>t.label)}}break;case"text":t.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>r(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(m.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};export{kt as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./editor.main-
|
|
1
|
+
import{l as e}from"./editor.main-Dnk9sp-f.js";import"./index-CA5N4n3x.js";const n={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},t={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{n as conf,t as language};
|
package/web/dist/index.html
CHANGED
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
: './vendor/github-dark.min.css';
|
|
58
58
|
})();
|
|
59
59
|
</script>
|
|
60
|
-
<script type="module" crossorigin src="./assets/index-
|
|
61
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
60
|
+
<script type="module" crossorigin src="./assets/index-CA5N4n3x.js"></script>
|
|
61
|
+
<link rel="stylesheet" crossorigin href="./assets/index-P--EnTnB.css">
|
|
62
62
|
</head>
|
|
63
63
|
<body>
|
|
64
64
|
<div id="app"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as r,C as a}from"./mermaid.core-CXWrxBgC.js";const o=(o,s)=>r.lang.round(a.parse(o)[s]);export{o as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,c as s,a,C as e}from"./chunk-V7JOEXUC-D06UIgKi.js";import{_ as o}from"./mermaid.core-CXWrxBgC.js";import"./chunk-5VM5RSS4-Cz5gzMlS.js";import"./chunk-XXDRQBXY-DzYnzvEh.js";import"./chunk-VR4S4FIN-W4KDoSuZ.js";import"./chunk-32BRIVSS-yQKEtQBT.js";import"./index-DxesAJ2s.js";var t={parser:a,get db(){return new e},renderer:s,styles:r,init:o(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{t as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,c as s,a,C as e}from"./chunk-V7JOEXUC-D06UIgKi.js";import{_ as o}from"./mermaid.core-CXWrxBgC.js";import"./chunk-5VM5RSS4-Cz5gzMlS.js";import"./chunk-XXDRQBXY-DzYnzvEh.js";import"./chunk-VR4S4FIN-W4KDoSuZ.js";import"./chunk-32BRIVSS-yQKEtQBT.js";import"./index-DxesAJ2s.js";var t={parser:a,get db(){return new e},renderer:s,styles:r,init:o(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{t as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as s,a as t,S as e}from"./chunk-EX3LRPZG-rI_5p8L1.js";import{_ as a}from"./mermaid.core-CXWrxBgC.js";import"./chunk-XXDRQBXY-DzYnzvEh.js";import"./chunk-VR4S4FIN-W4KDoSuZ.js";import"./chunk-32BRIVSS-yQKEtQBT.js";import"./index-DxesAJ2s.js";var o={parser:t,get db(){return new e(2)},renderer:s,styles:r,init:a(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{o as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r,s as t}from"./flowDiagram-23GEKE2U-HsTatdI5.js";import{_ as o}from"./mermaid.core-CXWrxBgC.js";import"./chunk-5VM5RSS4-Cz5gzMlS.js";import"./chunk-XXDRQBXY-DzYnzvEh.js";import"./chunk-VR4S4FIN-W4KDoSuZ.js";import"./chunk-32BRIVSS-yQKEtQBT.js";import"./index-DxesAJ2s.js";import"./channel-DOciy6CL.js";var s=r({defaultLayout:"swimlane",styles:o(r=>`${t(r)}\n .swimlane.cluster rect {\n stroke: ${r.clusterBorder} !important;\n }\n [data-look="neo"].cluster rect {\n filter: none;\n }\n`,"getStyles")});export{s as diagram};
|