cc-viewer 1.6.263 → 1.6.264
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/README.md +13 -0
- package/cli.js +4 -0
- package/dist/assets/App-CKzgXXd9.js +1 -0
- package/dist/assets/{MdxEditorPanel--reKHew0.js → MdxEditorPanel-BUWD79wR.js} +1 -1
- package/dist/assets/Mobile-Dwh-S57S.js +1 -0
- package/dist/assets/{_baseUniq-DiLy7vi3.js → _baseUniq-Dgkw4IXM.js} +1 -1
- package/dist/assets/{arc-CAB2oIHx.js → arc-AiHQLijx.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-Cijl_JpW.js → architectureDiagram-Q4EWVU46-CPRvAIHK.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-Bk4yWCPQ.js → blockDiagram-DXYQGD6D-CK2cwrfX.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-Vz4JKuzi.js → c4Diagram-AHTNJAMY-BP-UBbgv.js} +1 -1
- package/dist/assets/{channel-BnYKz_zI.js → channel-Ny3Nm_-t.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DM3ZjqKX.js → chunk-4BX2VUAB-DdsULqPZ.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-BTiJOoNa.js → chunk-4TB4RGXK-BDSjQHh0.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-B4fMQcTE.js → chunk-55IACEB6-DrKr3wBa.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-B_WylnyS.js → chunk-EDXVE4YY-o_0SUbAB.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Cx2lqZi9.js → chunk-FMBD7UC4-Ca_AgqWi.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-CPZm7o6V.js → chunk-OYMX7WX6-CyWWbq5o.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DuYVzv7E.js → chunk-QZHKN3VN-5rXHErSL.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-Bk3OysLK.js → chunk-YZCP3GAM-DznXBadU.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-CLYcbnwx.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-CLYcbnwx.js +1 -0
- package/dist/assets/clone-5GFhU8Pv.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CQuaqKHt.js → cose-bilkent-S5V4N54A-BhGyix0v.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-BFdoRcuo.js → dagre-KV5264BT-CzzHxIvc.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-ByFdSFIu.js → diagram-5BDNPKRD-tu3BXl0c.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-C1TcKWp0.js → diagram-G4DWMVQ6-C6WkK7sj.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-B5N1Sn5F.js → diagram-MMDJMWI5-DBeD_WW-.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-B-payI0e.js → diagram-TYMM5635-BXUyHHJ4.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-zziefklH.js → erDiagram-SMLLAGMA-Bye5tnW2.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-BOSomu1b.js → flowDiagram-DWJPFMVM-C3pYOs38.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-DILUsv0T.js → ganttDiagram-T4ZO3ILL-DxXkI_FW.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-BKp2DE69.js → gitGraphDiagram-UUTBAWPF-nsxsXsGX.js} +1 -1
- package/dist/assets/{graph-NObGxitU.js → graph-Da-Z9hB7.js} +1 -1
- package/dist/assets/{index-Bq9Sic2n.js → index-4gmR7Eun.js} +1 -1
- package/dist/assets/{index-BI-0Lyyt.js → index-Brh2V8V0.js} +1 -1
- package/dist/assets/{index-0aPBVZuP.js → index-C0PhJcXG.js} +1 -1
- package/dist/assets/{index-BbXZgnby.js → index-C8w5Sxw3.js} +1 -1
- package/dist/assets/{index-VqFARC4A.js → index-CA8JGh5J.js} +1 -1
- package/dist/assets/{index-PsZiLKrC.js → index-CsuhosSl.js} +1 -1
- package/dist/assets/{index-C88BDuL0.js → index-D7XF7UJ8.js} +1 -1
- package/dist/assets/{index-DHUf_c1w.js → index-tHUiY0PG.js} +2 -2
- package/dist/assets/{infoDiagram-42DDH7IO-D409o-BL.js → infoDiagram-42DDH7IO-Ca9j90t5.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-CMVPOGr3.js → ishikawaDiagram-UXIWVN3A-DhjV0XPD.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-Bl_5WlaZ.js → journeyDiagram-VCZTEJTY-CRSHLZPV.js} +1 -1
- package/dist/assets/{jszip.min-C2654z9i.js → jszip.min-CcCCdMNW.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-BfCyUP29.js → kanban-definition-6JOO6SKY-Bg0CUwgc.js} +1 -1
- package/dist/assets/{layout-CgAMa0xE.js → layout-CWNu13XT.js} +1 -1
- package/dist/assets/{linear-J1N1npGr.js → linear-Dcmw1639.js} +1 -1
- package/dist/assets/{mermaid.core-YnqOkuoS.js → mermaid.core-1heNIJ5f.js} +2 -2
- package/dist/assets/{min-CowkZam8.js → min-CC9CkAxn.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-D7yMfot2.js → mindmap-definition-QFDTVHPH-Gr0ex_Ny.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-DKUHBCwB.js → pieDiagram-DEJITSTG-D7P3sUJY.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-DhRqBNfT.js → quadrantDiagram-34T5L4WZ-Bov3lcpV.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-DVE3wKT7.js → requirementDiagram-MS252O5E-BcLptaOU.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-Rn_9b5V_.js → sankeyDiagram-XADWPNL6-B2qAUsON.js} +1 -1
- package/dist/assets/{seqResourceLoaders-DZvMjXCl.css → seqResourceLoaders-BsgJ9V64.css} +2 -2
- package/dist/assets/seqResourceLoaders-LrrYgtsO.js +2 -0
- package/dist/assets/{sequenceDiagram-FGHM5R23-CemLRaXC.js → sequenceDiagram-FGHM5R23-Do62Uz-a.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-DNT1gAty.js → stateDiagram-FHFEXIEX-Wu8aqa8C.js} +1 -1
- package/dist/assets/{stateDiagram-v2-QKLJ7IA2-DPlMhu-M.js → stateDiagram-v2-QKLJ7IA2-BfYq7Jgo.js} +1 -1
- package/dist/assets/{timeline-definition-GMOUNBTQ-B-F8vgZN.js → timeline-definition-GMOUNBTQ-DYfz5xD6.js} +1 -1
- package/dist/assets/{vendor-antd-Dq3DHFa-.js → vendor-antd-BG1SvzuN.js} +2 -2
- package/dist/assets/{vendor-codemirror-DjMkT0sn.js → vendor-codemirror-8NDhydlF.js} +1 -1
- package/dist/assets/{vendor-mdxeditor-CrZ9SWce.js → vendor-mdxeditor-BB4hhpxM.js} +2 -2
- package/dist/assets/{vendor-qrcode-C_77dtHg.js → vendor-qrcode-DMsNGQ10.js} +1 -1
- package/dist/assets/{vendor-virtuoso-aMZPf2fi.js → vendor-virtuoso-BUT96ALa.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-K67JHnnN.js → vennDiagram-DHZGUBPP-CGr-cc7e.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-CCis01LD.js → wardley-RL74JXVD-BN899vMf.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-BjqRIOpN.js → wardleyDiagram-NUSXRM2D-xUsI1E7h.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-CaXETYTI.js → xychartDiagram-5P7HB3ND-woQrslzB.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/voice-packs/default/askQuestion.wav +0 -0
- package/dist/voice-packs/default/pack.json +34 -0
- package/dist/voice-packs/default/planApproval.wav +0 -0
- package/dist/voice-packs/default/timeoutWarning5min.wav +0 -0
- package/dist/voice-packs/default/timeoutWarning60s.wav +0 -0
- package/dist/voice-packs/default/turnEnd.wav +0 -0
- package/lib/approval-modal-prefs.js +71 -0
- package/lib/ensure-hooks.js +48 -4
- package/lib/sdk-manager.js +12 -1
- package/lib/turn-end-bridge.js +117 -0
- package/lib/voice-pack-events.js +32 -0
- package/lib/voice-pack-manager.js +246 -0
- package/package.json +1 -1
- package/pty-manager.js +8 -1
- package/server.js +304 -2
- package/dist/assets/App-CX6bF6ke.js +0 -1
- package/dist/assets/Mobile-YwIGAQWc.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-CeAAXpgl.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-CeAAXpgl.js +0 -1
- package/dist/assets/clone-BcGHaFBY.js +0 -1
- package/dist/assets/seqResourceLoaders-B9D4RGth.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as baseFlatten,a as baseEach,c as baseIteratee,d as arrayMap,i as isSymbol}from"./_baseUniq-
|
|
1
|
+
import{b as baseFlatten,a as baseEach,c as baseIteratee,d as arrayMap,i as isSymbol}from"./_baseUniq-Dgkw4IXM.js";import{aF as isArrayLike,aG as isArray,aH as identity}from"./mermaid.core-1heNIJ5f.js";function flatten(array){return(null==array?0:array.length)?baseFlatten(array):[]}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection2){result[++index]=iteratee(value,key,collection2)}),result}function map(collection,iteratee){return(isArray(collection)?arrayMap:baseMap)(collection,baseIteratee(iteratee))}function baseLt(value,other){return value<other}function baseExtremum(array,iteratee,comparator){for(var index=-1,length=array.length;++index<length;){var value=array[index],current=iteratee(value);if(null!=current&&(void 0===computed?current==current&&!isSymbol(current):comparator(current,computed)))var computed=current,result=value}return result}function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):void 0}export{baseLt as a,baseExtremum as b,baseMap as c,min as d,flatten as f,map as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _a;import{g as getDiagramElement}from"./chunk-55IACEB6-B4fMQcTE.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-B_WylnyS.js";import{_ as __name,l as log,o as getRegisteredLayoutAlgorithm,r as render,C as getConfig,F as defaultConfig_default,c as getConfig2,i as sanitizeText,aE as getUserDefinedConfig,U as isDark,V as lighten,W as darken}from"./mermaid.core-YnqOkuoS.js";import"./vendor-mdxeditor-CrZ9SWce.js";import"./vendor-antd-Dq3DHFa-.js";import"./vendor-codemirror-DjMkT0sn.js";import"./vendor-markdown-BFrYfpb0.js";const byteToHex=[];for(let i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));let getRandomValues;const rnds8=new Uint8Array(16);const native={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(options,buf,offset){var _a2;if(native.randomUUID&&!options)return native.randomUUID();const rnds=(options=options||{}).random??(null==(_a2=options.rng)?void 0:_a2.call(options))??function(){if(!getRandomValues){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}();if(rnds.length<16)throw new Error("Random bytes length must be >= 16");return rnds[6]=15&rnds[6]|64,rnds[8]=63&rnds[8]|128,function(arr,offset=0){return(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase()}(rnds)}var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,6,13,15,16,19,22],$Vd=[1,33],$Ve=[1,34],$Vf=[1,6,7,11,13,15,16,19,22],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 6:case 7:return yy;case 8:yy.getLogger().trace("Stop NL ");break;case 9:yy.getLogger().trace("Stop EOF ");break;case 11:yy.getLogger().trace("Stop NL2 ");break;case 12:yy.getLogger().trace("Stop EOF2 ");break;case 15:yy.getLogger().info("Node: ",$$[$0].id),yy.addNode($$[$0-1].length,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 16:yy.getLogger().trace("Icon: ",$$[$0]),yy.decorateNode({icon:$$[$0]});break;case 17:case 21:yy.decorateNode({class:$$[$0]});break;case 18:yy.getLogger().trace("SPACELIST");break;case 19:yy.getLogger().trace("Node: ",$$[$0].id),yy.addNode(0,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 20:yy.decorateNode({icon:$$[$0]});break;case 25:yy.getLogger().trace("node found ..",$$[$0-2]),this.$={id:$$[$0-1],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break;case 26:this.$={id:$$[$0],descr:$$[$0],type:yy.nodeType.DEFAULT};break;case 27:yy.getLogger().trace("node found ..",$$[$0-3]),this.$={id:$$[$0-3],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:$V5,22:$V6}),o($Vb,[2,18]),o($Vb,[2,19]),o($Vb,[2,20]),o($Vb,[2,21]),o($Vb,[2,23]),o($Vb,[2,24]),o($Vb,[2,26],{19:[1,30]}),{20:[1,31]},{6:$V8,7:$V9,10:32,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($Vc,[2,14],{7:$Vd,11:$Ve}),o($Vf,[2,8]),o($Vf,[2,9]),o($Vf,[2,10]),o($Vb,[2,15]),o($Vb,[2,16]),o($Vb,[2,17]),{20:[1,35]},{21:[1,36]},o($Vc,[2,13],{7:$Vd,11:$Ve}),o($Vf,[2,11]),o($Vf,[2,12]),{21:[1,37]},o($Vb,[2,25]),o($Vb,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return yy.getLogger().trace("Found comment",yy_.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:yy.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return yy.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:yy.getLogger().trace("end icon"),this.popState();break;case 10:return yy.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return yy.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return yy.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return yy.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:yy.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return yy.getLogger().trace("description:",yy_.yytext),"NODE_DESCR";case 27:return this.popState(),yy.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),yy.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),yy.getLogger().trace("node end ...",yy_.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),yy.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return yy.getLogger().trace("Long description:",yy_.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var mindmap_default=parser,nodeType={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},MindmapDB=(__name(_a=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=nodeType,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(level){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<level)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(level,id,descr,type){var _a2,_b;log.info("addNode",level,id,descr,type);let isRoot=!1;0===this.nodes.length?(this.baseLevel=level,level=0,isRoot=!0):void 0!==this.baseLevel&&(level-=this.baseLevel,isRoot=!1);const conf=getConfig2();let padding=(null==(_a2=conf.mindmap)?void 0:_a2.padding)??defaultConfig_default.mindmap.padding;switch(type){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:padding*=2}const node={id:this.count++,nodeId:sanitizeText(id,conf),level:level,descr:sanitizeText(descr,conf),type:type,children:[],width:(null==(_b=conf.mindmap)?void 0:_b.maxNodeWidth)??defaultConfig_default.mindmap.maxNodeWidth,padding:padding,isRoot:isRoot},parent=this.getParent(level);if(parent)parent.children.push(node),this.nodes.push(node);else{if(!isRoot)throw new Error(`There can be only one root. No parent could be found for ("${node.descr}")`);this.nodes.push(node)}}getType(startStr,endStr){switch(log.debug("In get type",startStr,endStr),startStr){case"[":return this.nodeType.RECT;case"(":return")"===endStr?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(id,element){this.elements[id]=element}getElementById(id){return this.elements[id]}decorateNode(decoration){if(!decoration)return;const config=getConfig2(),node=this.nodes[this.nodes.length-1];decoration.icon&&(node.icon=sanitizeText(decoration.icon,config)),decoration.class&&(node.class=sanitizeText(decoration.class,config))}type2Str(type){switch(type){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(node,sectionNumber){if(0===node.level?node.section=void 0:node.section=sectionNumber,node.children)for(const[index,child]of node.children.entries()){const childSectionNumber=0===node.level?index%11:sectionNumber;this.assignSections(child,childSectionNumber)}}flattenNodes(node,processedNodes){const conf=getConfig2(),cssClasses=["mindmap-node"];!0===node.isRoot?cssClasses.push("section-root","section--1"):void 0!==node.section&&cssClasses.push(`section-${node.section}`),node.class&&cssClasses.push(node.class);const classes=cssClasses.join(" "),getShapeFromType=__name(type=>{var _a2;const isReduxTheme=((null==(_a2=conf.theme)?void 0:_a2.toLowerCase())??"").includes("redux");switch(type){case nodeType.CIRCLE:return"mindmapCircle";case nodeType.RECT:return"rect";case nodeType.ROUNDED_RECT:return"rounded";case nodeType.CLOUD:return"cloud";case nodeType.BANG:return"bang";case nodeType.HEXAGON:return"hexagon";case nodeType.DEFAULT:return isReduxTheme?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),processedNode={id:node.id.toString(),domId:"node_"+node.id.toString(),label:node.descr,labelType:"markdown",isGroup:!1,shape:getShapeFromType(node.type),width:node.width,height:node.height??0,padding:node.padding,cssClasses:classes,cssStyles:[],look:conf.look,icon:node.icon,x:node.x,y:node.y,level:node.level,nodeId:node.nodeId,type:node.type,section:node.section};if(processedNodes.push(processedNode),node.children)for(const child of node.children)this.flattenNodes(child,processedNodes)}generateEdges(node,edges){if(!node.children)return;const conf=getConfig2();for(const child of node.children){let edgeClasses="edge";void 0!==child.section&&(edgeClasses+=` section-edge-${child.section}`);edgeClasses+=` edge-depth-${node.level+1}`;const edge={id:`edge_${node.id}_${child.id}`,start:node.id.toString(),end:child.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:conf.look,classes:edgeClasses,depth:node.level,section:child.section};edges.push(edge),this.generateEdges(child,edges)}}getData(){const mindmapRoot=this.getMindmap(),config=getConfig2(),finalConfig=config;if(void 0!==getUserDefinedConfig().layout||(finalConfig.layout="cose-bilkent"),!mindmapRoot)return{nodes:[],edges:[],config:finalConfig};log.debug("getData: mindmapRoot",mindmapRoot,config),this.assignSections(mindmapRoot);const processedNodes=[],processedEdges=[];this.flattenNodes(mindmapRoot,processedNodes),this.generateEdges(mindmapRoot,processedEdges),log.debug(`getData: processed ${processedNodes.length} nodes and ${processedEdges.length} edges`);const shapes=new Map;for(const node of processedNodes)shapes.set(node.id,{shape:node.shape,width:node.width,height:node.height,padding:node.padding});return{nodes:processedNodes,edges:processedEdges,config:finalConfig,rootNode:mindmapRoot,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(shapes),type:"mindmap",diagramId:"mindmap-"+v4()}}getLogger(){return log}},"MindmapDB"),_a),mindmapRenderer_default={draw:__name(async(text,id,_version,diagObj)=>{var _a2,_b;log.debug("Rendering mindmap diagram\n"+text);const db=diagObj.db,data4Layout=db.getData(),svg=getDiagramElement(id,data4Layout.config.securityLevel);data4Layout.type=diagObj.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(data4Layout.config.layout,{fallback:"cose-bilkent"}),data4Layout.diagramId=id;if(!db.getMindmap())return;data4Layout.nodes.forEach(node=>{"rounded"===node.shape?(node.radius=15,node.taper=15,node.stroke="none",node.width=0,node.padding=15):"circle"===node.shape?node.padding=10:"rect"===node.shape?(node.width=0,node.padding=10):"hexagon"===node.shape&&(node.width=0,node.height=0)}),await render(data4Layout,svg);const{themeVariables:themeVariables}=getConfig(),{useGradient:useGradient,gradientStart:gradientStart,gradientStop:gradientStop}=themeVariables;if(useGradient&&gradientStart&&gradientStop){const svgId=svg.attr("id"),gradient=svg.append("defs").append("linearGradient").attr("id",`${svgId}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");gradient.append("stop").attr("offset","0%").attr("stop-color",gradientStart).attr("stop-opacity",1),gradient.append("stop").attr("offset","100%").attr("stop-color",gradientStop).attr("stop-opacity",1)}setupViewPortForSVG(svg,(null==(_a2=data4Layout.config.mindmap)?void 0:_a2.padding)??defaultConfig_default.mindmap.padding,"mindmapDiagram",(null==(_b=data4Layout.config.mindmap)?void 0:_b.useMaxWidth)??defaultConfig_default.mindmap.useMaxWidth)},"draw")},genSections=__name(options=>{const{theme:theme,look:look}=options;let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)options["lineColor"+i]=options["lineColor"+i]||options["cScaleInv"+i],isDark(options["lineColor"+i])?options["lineColor"+i]=lighten(options["lineColor"+i],20):options["lineColor"+i]=darken(options["lineColor"+i],20);for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+("neo"===look?Math.max(10-2*(i-1),2):17-3*i);sections+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${options["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${options["cScaleLabel"+i]};\n }\n .section-${i-1} span {\n color: ${options["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${options["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${options["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${sw};\n }\n .section-${i-1} line {\n stroke: ${options["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {\n fill: ${"redux"===theme||"redux-dark"===theme||"neutral"===theme?options.mainBkg:options["cScale"+i]};\n stroke: ${"redux"===theme||"redux-dark"===theme?options.nodeBorder:options["cScale"+i]};\n stroke-width: ${options.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${i-1}{\n stroke: ${(null==theme?void 0:theme.includes("redux"))||"neo-dark"===theme?options.nodeBorder:options["cScale"+i]};\n }\n [data-look="neo"].mindmap-node.section-${i-1} text {\n fill: ${"redux"===theme||"redux-dark"===theme?options.nodeBorder:options["cScaleLabel"+("neutral"===theme?1:i)]};\n }\n `}return sections},"genSections"),genGradient=__name((THEME_COLOR_LIMIT,svgId,mainBkg)=>{let sections="";for(let i=0;i<THEME_COLOR_LIMIT;i++)sections+=`\n [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {\n stroke: url(${svgId}-gradient);\n fill: ${mainBkg};\n }\n .section-${i-1} line {\n stroke-width: 0;\n }`;return sections},"genGradient"),styles_default=__name(options=>{const{theme:theme}=options,svgId=options.svgId,scopedDropShadow=options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .section-root span {\n color: ${(null==theme?void 0:theme.includes("redux"))?options.nodeBorder:options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${scopedDropShadow};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${(null==theme?void 0:theme.includes("redux"))?options.mainBkg:options.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${(null==theme?void 0:theme.includes("redux"))?options.nodeBorder:options["cScaleLabel"+("neutral"===theme?1:0)]};\n }\n ${options.useGradient&&svgId&&options.mainBkg?genGradient(options.THEME_COLOR_LIMIT,svgId,options.mainBkg):""}\n`},"getStyles"),diagram={get db(){return new MindmapDB},renderer:mindmapRenderer_default,parser:mindmap_default,styles:styles_default};export{diagram};
|
|
1
|
+
var _a;import{g as getDiagramElement}from"./chunk-55IACEB6-DrKr3wBa.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-o_0SUbAB.js";import{_ as __name,l as log,o as getRegisteredLayoutAlgorithm,r as render,C as getConfig,F as defaultConfig_default,c as getConfig2,i as sanitizeText,aE as getUserDefinedConfig,U as isDark,V as lighten,W as darken}from"./mermaid.core-1heNIJ5f.js";import"./vendor-mdxeditor-BB4hhpxM.js";import"./vendor-antd-BG1SvzuN.js";import"./vendor-codemirror-8NDhydlF.js";import"./vendor-markdown-BFrYfpb0.js";const byteToHex=[];for(let i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));let getRandomValues;const rnds8=new Uint8Array(16);const native={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(options,buf,offset){var _a2;if(native.randomUUID&&!options)return native.randomUUID();const rnds=(options=options||{}).random??(null==(_a2=options.rng)?void 0:_a2.call(options))??function(){if(!getRandomValues){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}();if(rnds.length<16)throw new Error("Random bytes length must be >= 16");return rnds[6]=15&rnds[6]|64,rnds[8]=63&rnds[8]|128,function(arr,offset=0){return(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase()}(rnds)}var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,6,13,15,16,19,22],$Vd=[1,33],$Ve=[1,34],$Vf=[1,6,7,11,13,15,16,19,22],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 6:case 7:return yy;case 8:yy.getLogger().trace("Stop NL ");break;case 9:yy.getLogger().trace("Stop EOF ");break;case 11:yy.getLogger().trace("Stop NL2 ");break;case 12:yy.getLogger().trace("Stop EOF2 ");break;case 15:yy.getLogger().info("Node: ",$$[$0].id),yy.addNode($$[$0-1].length,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 16:yy.getLogger().trace("Icon: ",$$[$0]),yy.decorateNode({icon:$$[$0]});break;case 17:case 21:yy.decorateNode({class:$$[$0]});break;case 18:yy.getLogger().trace("SPACELIST");break;case 19:yy.getLogger().trace("Node: ",$$[$0].id),yy.addNode(0,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 20:yy.decorateNode({icon:$$[$0]});break;case 25:yy.getLogger().trace("node found ..",$$[$0-2]),this.$={id:$$[$0-1],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break;case 26:this.$={id:$$[$0],descr:$$[$0],type:yy.nodeType.DEFAULT};break;case 27:yy.getLogger().trace("node found ..",$$[$0-3]),this.$={id:$$[$0-3],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:$V5,22:$V6}),o($Vb,[2,18]),o($Vb,[2,19]),o($Vb,[2,20]),o($Vb,[2,21]),o($Vb,[2,23]),o($Vb,[2,24]),o($Vb,[2,26],{19:[1,30]}),{20:[1,31]},{6:$V8,7:$V9,10:32,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($Vc,[2,14],{7:$Vd,11:$Ve}),o($Vf,[2,8]),o($Vf,[2,9]),o($Vf,[2,10]),o($Vb,[2,15]),o($Vb,[2,16]),o($Vb,[2,17]),{20:[1,35]},{21:[1,36]},o($Vc,[2,13],{7:$Vd,11:$Ve}),o($Vf,[2,11]),o($Vf,[2,12]),{21:[1,37]},o($Vb,[2,25]),o($Vb,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return yy.getLogger().trace("Found comment",yy_.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:yy.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return yy.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:yy.getLogger().trace("end icon"),this.popState();break;case 10:return yy.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return yy.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return yy.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return yy.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:yy.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return yy.getLogger().trace("description:",yy_.yytext),"NODE_DESCR";case 27:return this.popState(),yy.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),yy.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),yy.getLogger().trace("node end ...",yy_.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),yy.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return yy.getLogger().trace("Long description:",yy_.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var mindmap_default=parser,nodeType={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},MindmapDB=(__name(_a=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=nodeType,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(level){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<level)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(level,id,descr,type){var _a2,_b;log.info("addNode",level,id,descr,type);let isRoot=!1;0===this.nodes.length?(this.baseLevel=level,level=0,isRoot=!0):void 0!==this.baseLevel&&(level-=this.baseLevel,isRoot=!1);const conf=getConfig2();let padding=(null==(_a2=conf.mindmap)?void 0:_a2.padding)??defaultConfig_default.mindmap.padding;switch(type){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:padding*=2}const node={id:this.count++,nodeId:sanitizeText(id,conf),level:level,descr:sanitizeText(descr,conf),type:type,children:[],width:(null==(_b=conf.mindmap)?void 0:_b.maxNodeWidth)??defaultConfig_default.mindmap.maxNodeWidth,padding:padding,isRoot:isRoot},parent=this.getParent(level);if(parent)parent.children.push(node),this.nodes.push(node);else{if(!isRoot)throw new Error(`There can be only one root. No parent could be found for ("${node.descr}")`);this.nodes.push(node)}}getType(startStr,endStr){switch(log.debug("In get type",startStr,endStr),startStr){case"[":return this.nodeType.RECT;case"(":return")"===endStr?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(id,element){this.elements[id]=element}getElementById(id){return this.elements[id]}decorateNode(decoration){if(!decoration)return;const config=getConfig2(),node=this.nodes[this.nodes.length-1];decoration.icon&&(node.icon=sanitizeText(decoration.icon,config)),decoration.class&&(node.class=sanitizeText(decoration.class,config))}type2Str(type){switch(type){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(node,sectionNumber){if(0===node.level?node.section=void 0:node.section=sectionNumber,node.children)for(const[index,child]of node.children.entries()){const childSectionNumber=0===node.level?index%11:sectionNumber;this.assignSections(child,childSectionNumber)}}flattenNodes(node,processedNodes){const conf=getConfig2(),cssClasses=["mindmap-node"];!0===node.isRoot?cssClasses.push("section-root","section--1"):void 0!==node.section&&cssClasses.push(`section-${node.section}`),node.class&&cssClasses.push(node.class);const classes=cssClasses.join(" "),getShapeFromType=__name(type=>{var _a2;const isReduxTheme=((null==(_a2=conf.theme)?void 0:_a2.toLowerCase())??"").includes("redux");switch(type){case nodeType.CIRCLE:return"mindmapCircle";case nodeType.RECT:return"rect";case nodeType.ROUNDED_RECT:return"rounded";case nodeType.CLOUD:return"cloud";case nodeType.BANG:return"bang";case nodeType.HEXAGON:return"hexagon";case nodeType.DEFAULT:return isReduxTheme?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),processedNode={id:node.id.toString(),domId:"node_"+node.id.toString(),label:node.descr,labelType:"markdown",isGroup:!1,shape:getShapeFromType(node.type),width:node.width,height:node.height??0,padding:node.padding,cssClasses:classes,cssStyles:[],look:conf.look,icon:node.icon,x:node.x,y:node.y,level:node.level,nodeId:node.nodeId,type:node.type,section:node.section};if(processedNodes.push(processedNode),node.children)for(const child of node.children)this.flattenNodes(child,processedNodes)}generateEdges(node,edges){if(!node.children)return;const conf=getConfig2();for(const child of node.children){let edgeClasses="edge";void 0!==child.section&&(edgeClasses+=` section-edge-${child.section}`);edgeClasses+=` edge-depth-${node.level+1}`;const edge={id:`edge_${node.id}_${child.id}`,start:node.id.toString(),end:child.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:conf.look,classes:edgeClasses,depth:node.level,section:child.section};edges.push(edge),this.generateEdges(child,edges)}}getData(){const mindmapRoot=this.getMindmap(),config=getConfig2(),finalConfig=config;if(void 0!==getUserDefinedConfig().layout||(finalConfig.layout="cose-bilkent"),!mindmapRoot)return{nodes:[],edges:[],config:finalConfig};log.debug("getData: mindmapRoot",mindmapRoot,config),this.assignSections(mindmapRoot);const processedNodes=[],processedEdges=[];this.flattenNodes(mindmapRoot,processedNodes),this.generateEdges(mindmapRoot,processedEdges),log.debug(`getData: processed ${processedNodes.length} nodes and ${processedEdges.length} edges`);const shapes=new Map;for(const node of processedNodes)shapes.set(node.id,{shape:node.shape,width:node.width,height:node.height,padding:node.padding});return{nodes:processedNodes,edges:processedEdges,config:finalConfig,rootNode:mindmapRoot,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(shapes),type:"mindmap",diagramId:"mindmap-"+v4()}}getLogger(){return log}},"MindmapDB"),_a),mindmapRenderer_default={draw:__name(async(text,id,_version,diagObj)=>{var _a2,_b;log.debug("Rendering mindmap diagram\n"+text);const db=diagObj.db,data4Layout=db.getData(),svg=getDiagramElement(id,data4Layout.config.securityLevel);data4Layout.type=diagObj.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(data4Layout.config.layout,{fallback:"cose-bilkent"}),data4Layout.diagramId=id;if(!db.getMindmap())return;data4Layout.nodes.forEach(node=>{"rounded"===node.shape?(node.radius=15,node.taper=15,node.stroke="none",node.width=0,node.padding=15):"circle"===node.shape?node.padding=10:"rect"===node.shape?(node.width=0,node.padding=10):"hexagon"===node.shape&&(node.width=0,node.height=0)}),await render(data4Layout,svg);const{themeVariables:themeVariables}=getConfig(),{useGradient:useGradient,gradientStart:gradientStart,gradientStop:gradientStop}=themeVariables;if(useGradient&&gradientStart&&gradientStop){const svgId=svg.attr("id"),gradient=svg.append("defs").append("linearGradient").attr("id",`${svgId}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");gradient.append("stop").attr("offset","0%").attr("stop-color",gradientStart).attr("stop-opacity",1),gradient.append("stop").attr("offset","100%").attr("stop-color",gradientStop).attr("stop-opacity",1)}setupViewPortForSVG(svg,(null==(_a2=data4Layout.config.mindmap)?void 0:_a2.padding)??defaultConfig_default.mindmap.padding,"mindmapDiagram",(null==(_b=data4Layout.config.mindmap)?void 0:_b.useMaxWidth)??defaultConfig_default.mindmap.useMaxWidth)},"draw")},genSections=__name(options=>{const{theme:theme,look:look}=options;let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)options["lineColor"+i]=options["lineColor"+i]||options["cScaleInv"+i],isDark(options["lineColor"+i])?options["lineColor"+i]=lighten(options["lineColor"+i],20):options["lineColor"+i]=darken(options["lineColor"+i],20);for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+("neo"===look?Math.max(10-2*(i-1),2):17-3*i);sections+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${options["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${options["cScaleLabel"+i]};\n }\n .section-${i-1} span {\n color: ${options["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${options["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${options["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${sw};\n }\n .section-${i-1} line {\n stroke: ${options["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {\n fill: ${"redux"===theme||"redux-dark"===theme||"neutral"===theme?options.mainBkg:options["cScale"+i]};\n stroke: ${"redux"===theme||"redux-dark"===theme?options.nodeBorder:options["cScale"+i]};\n stroke-width: ${options.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${i-1}{\n stroke: ${(null==theme?void 0:theme.includes("redux"))||"neo-dark"===theme?options.nodeBorder:options["cScale"+i]};\n }\n [data-look="neo"].mindmap-node.section-${i-1} text {\n fill: ${"redux"===theme||"redux-dark"===theme?options.nodeBorder:options["cScaleLabel"+("neutral"===theme?1:i)]};\n }\n `}return sections},"genSections"),genGradient=__name((THEME_COLOR_LIMIT,svgId,mainBkg)=>{let sections="";for(let i=0;i<THEME_COLOR_LIMIT;i++)sections+=`\n [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {\n stroke: url(${svgId}-gradient);\n fill: ${mainBkg};\n }\n .section-${i-1} line {\n stroke-width: 0;\n }`;return sections},"genGradient"),styles_default=__name(options=>{const{theme:theme}=options,svgId=options.svgId,scopedDropShadow=options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .section-root span {\n color: ${(null==theme?void 0:theme.includes("redux"))?options.nodeBorder:options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${scopedDropShadow};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${(null==theme?void 0:theme.includes("redux"))?options.mainBkg:options.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${(null==theme?void 0:theme.includes("redux"))?options.nodeBorder:options["cScaleLabel"+("neutral"===theme?1:0)]};\n }\n ${options.useGradient&&svgId&&options.mainBkg?genGradient(options.THEME_COLOR_LIMIT,svgId,options.mainBkg):""}\n`},"getStyles"),diagram={get db(){return new MindmapDB},renderer:mindmapRenderer_default,parser:mindmap_default,styles:styles_default};export{diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a3 as constant,a6 as tau,aD as array,g as getAccDescription,s as setAccDescription,a as getAccTitle,b as setAccTitle,q as getDiagramTitle,p as setDiagramTitle,_ as __name,l as log,c as getConfig2$1,E as cleanAndMerge,H as selectSvgElement,M as parseFontSize,e as configureSvgSize,y as clear,F as defaultConfig_default}from"./mermaid.core-
|
|
1
|
+
import{a3 as constant,a6 as tau,aD as array,g as getAccDescription,s as setAccDescription,a as getAccTitle,b as setAccTitle,q as getDiagramTitle,p as setDiagramTitle,_ as __name,l as log,c as getConfig2$1,E as cleanAndMerge,H as selectSvgElement,M as parseFontSize,e as configureSvgSize,y as clear,F as defaultConfig_default}from"./mermaid.core-1heNIJ5f.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-DdsULqPZ.js";import{p as parse}from"./wardley-RL74JXVD-BN899vMf.js";import{d as d3arc}from"./arc-AiHQLijx.js";import{o as ordinal}from"./ordinal-DA-_8pMy.js";import"./vendor-mdxeditor-BB4hhpxM.js";import"./vendor-antd-BG1SvzuN.js";import"./vendor-codemirror-8NDhydlF.js";import"./vendor-markdown-BFrYfpb0.js";import"./min-CC9CkAxn.js";import"./_baseUniq-Dgkw4IXM.js";import"./init-DMZMl1PR.js";function descending(a,b){return b<a?-1:b>a?1:b>=a?0:NaN}function identity(d){return d}var DEFAULT_PIE_CONFIG=defaultConfig_default.pie,DEFAULT_PIE_DB={sections:new Map,showData:!1},sections=DEFAULT_PIE_DB.sections,showData=DEFAULT_PIE_DB.showData,config=structuredClone(DEFAULT_PIE_CONFIG),db={getConfig:__name(()=>structuredClone(config),"getConfig"),clear:__name(()=>{sections=new Map,showData=DEFAULT_PIE_DB.showData,clear()},"clear"),setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,setAccTitle:setAccTitle,getAccTitle:getAccTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,addSection:__name(({label:label,value:value})=>{if(value<0)throw new Error(`"${label}" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);sections.has(label)||(sections.set(label,value),log.debug(`added new section: ${label}, with value: ${value}`))},"addSection"),getSections:__name(()=>sections,"getSections"),setShowData:__name(toggle=>{showData=toggle},"setShowData"),getShowData:__name(()=>showData,"getShowData")},populateDb=__name((ast,db2)=>{populateCommonDb(ast,db2),db2.setShowData(ast.showData),ast.sections.map(db2.addSection)},"populateDb"),parser={parse:__name(async input=>{const ast=await parse("pie",input);log.debug(ast),populateDb(ast,db)},"parse")},pieStyles_default=__name(options=>`\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${options.pieOuterStrokeColor};\n stroke-width: ${options.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`,"getStyles"),createPieArcs=__name(sections2=>{const sum=[...sections2.values()].reduce((acc,val)=>acc+val,0),pieData=[...sections2.entries()].map(([label,value])=>({label:label,value:value})).filter(d=>d.value/sum*100>=1),pie=function(){var value=identity,sortValues=descending,sort=null,startAngle=constant(0),endAngle=constant(tau),padAngle=constant(0);function pie(data){var i,j,k,a1,v,n=(data=array(data)).length,sum=0,index=new Array(n),arcs=new Array(n),a0=+startAngle.apply(this,arguments),da=Math.min(tau,Math.max(-tau,endAngle.apply(this,arguments)-a0)),p=Math.min(Math.abs(da)/n,padAngle.apply(this,arguments)),pa=p*(da<0?-1:1);for(i=0;i<n;++i)(v=arcs[index[i]=i]=+value(data[i],i,data))>0&&(sum+=v);for(null!=sortValues?index.sort(function(i2,j2){return sortValues(arcs[i2],arcs[j2])}):null!=sort&&index.sort(function(i2,j2){return sort(data[i2],data[j2])}),i=0,k=sum?(da-n*pa)/sum:0;i<n;++i,a0=a1)j=index[i],a1=a0+((v=arcs[j])>0?v*k:0)+pa,arcs[j]={data:data[j],index:i,value:v,startAngle:a0,endAngle:a1,padAngle:p};return arcs}return pie.value=function(_){return arguments.length?(value="function"==typeof _?_:constant(+_),pie):value},pie.sortValues=function(_){return arguments.length?(sortValues=_,sort=null,pie):sortValues},pie.sort=function(_){return arguments.length?(sort=_,sortValues=null,pie):sort},pie.startAngle=function(_){return arguments.length?(startAngle="function"==typeof _?_:constant(+_),pie):startAngle},pie.endAngle=function(_){return arguments.length?(endAngle="function"==typeof _?_:constant(+_),pie):endAngle},pie.padAngle=function(_){return arguments.length?(padAngle="function"==typeof _?_:constant(+_),pie):padAngle},pie}().value(d=>d.value).sort(null);return pie(pieData)},"createPieArcs"),diagram={parser:parser,db:db,renderer:{draw:__name((text,id,_version,diagObj)=>{var _a;log.debug("rendering pie chart\n"+text);const db2=diagObj.db,globalConfig=getConfig2$1(),pieConfig=cleanAndMerge(db2.getConfig(),globalConfig.pie),svg=selectSvgElement(id),group=svg.append("g");group.attr("transform","translate(225,225)");const{themeVariables:themeVariables}=globalConfig;let[outerStrokeWidth]=parseFontSize(themeVariables.pieOuterStrokeWidth);outerStrokeWidth??(outerStrokeWidth=2);const textPosition=pieConfig.textPosition,radius=Math.min(450,450)/2-40,arcGenerator=d3arc().innerRadius(0).outerRadius(radius),labelArcGenerator=d3arc().innerRadius(radius*textPosition).outerRadius(radius*textPosition);group.append("circle").attr("cx",0).attr("cy",0).attr("r",radius+outerStrokeWidth/2).attr("class","pieOuterCircle");const sections2=db2.getSections(),arcs=createPieArcs(sections2),myGeneratedColors=[themeVariables.pie1,themeVariables.pie2,themeVariables.pie3,themeVariables.pie4,themeVariables.pie5,themeVariables.pie6,themeVariables.pie7,themeVariables.pie8,themeVariables.pie9,themeVariables.pie10,themeVariables.pie11,themeVariables.pie12];let sum=0;sections2.forEach(section=>{sum+=section});const filteredArcs=arcs.filter(datum=>"0"!==(datum.data.value/sum*100).toFixed(0)),color=ordinal(myGeneratedColors).domain([...sections2.keys()]);group.selectAll("mySlices").data(filteredArcs).enter().append("path").attr("d",arcGenerator).attr("fill",datum=>color(datum.data.label)).attr("class","pieCircle"),group.selectAll("mySlices").data(filteredArcs).enter().append("text").text(datum=>(datum.data.value/sum*100).toFixed(0)+"%").attr("transform",datum=>"translate("+labelArcGenerator.centroid(datum)+")").style("text-anchor","middle").attr("class","slice");const titleText=group.append("text").text(db2.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),allSectionData=[...sections2.entries()].map(([label,value])=>({label:label,value:value})),legend=group.selectAll(".legend").data(allSectionData).enter().append("g").attr("class","legend").attr("transform",(_datum,index)=>"translate(216,"+(22*index-22*allSectionData.length/2)+")");legend.append("rect").attr("width",18).attr("height",18).style("fill",d=>color(d.label)).style("stroke",d=>color(d.label)),legend.append("text").attr("x",22).attr("y",14).text(d=>db2.getShowData()?`${d.label} [${d.value}]`:d.label);const chartAndLegendWidth=512+Math.max(...legend.selectAll("text").nodes().map(node=>(null==node?void 0:node.getBoundingClientRect().width)??0)),titleWidth=(null==(_a=titleText.node())?void 0:_a.getBoundingClientRect().width)??0,titleLeft=225-titleWidth/2,titleRight=225+titleWidth/2,viewBoxX=Math.min(0,titleLeft),totalWidth=Math.max(chartAndLegendWidth,titleRight)-viewBoxX;svg.attr("viewBox",`${viewBoxX} 0 ${totalWidth} 450`),configureSvgSize(svg,450,totalWidth,pieConfig.useMaxWidth)},"draw")},styles:pieStyles_default};export{diagram};
|
package/dist/assets/{quadrantDiagram-34T5L4WZ-DhRqBNfT.js → quadrantDiagram-34T5L4WZ-Bov3lcpV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _a,_b;import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,c as getConfig2,l as log,d as select,e as configureSvgSize,y as clear,F as defaultConfig_default,i as sanitizeText,I as getThemeVariables3}from"./mermaid.core-YnqOkuoS.js";import{l as linear}from"./linear-J1N1npGr.js";import"./vendor-mdxeditor-CrZ9SWce.js";import"./vendor-antd-Dq3DHFa-.js";import"./vendor-codemirror-DjMkT0sn.js";import"./vendor-markdown-BFrYfpb0.js";import"./init-DMZMl1PR.js";import"./defaultLocale-DZ7E7S9R.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[1,7],$V5=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V6=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V7=[55,56,57],$V8=[2,36],$V9=[1,37],$Va=[1,36],$Vb=[1,38],$Vc=[1,35],$Vd=[1,43],$Ve=[1,41],$Vf=[1,14],$Vg=[1,23],$Vh=[1,18],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,24],$Vn=[1,25],$Vo=[1,26],$Vp=[1,27],$Vq=[1,28],$Vr=[1,29],$Vs=[1,32],$Vt=[1,33],$Vu=[1,34],$Vv=[1,39],$Vw=[1,40],$Vx=[1,42],$Vy=[1,44],$Vz=[1,62],$VA=[1,61],$VB=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$VC=[1,65],$VD=[1,66],$VE=[1,67],$VF=[1,68],$VG=[1,69],$VH=[1,70],$VI=[1,71],$VJ=[1,72],$VK=[1,73],$VL=[1,74],$VM=[1,75],$VN=[1,76],$VO=[4,5,6,7,8,9,10,11,12,13,14,15,18],$VP=[1,90],$VQ=[1,91],$VR=[1,92],$VS=[1,99],$VT=[1,93],$VU=[1,96],$VV=[1,94],$VW=[1,95],$VX=[1,97],$VY=[1,98],$VZ=[1,102],$V_=[10,55,56,57],$V$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 23:case 68:this.$=$$[$0];break;case 24:case 69:this.$=$$[$0-1]+""+$$[$0];break;case 26:this.$=$$[$0-1]+$$[$0];break;case 27:this.$=[$$[$0].trim()];break;case 28:$$[$0-2].push($$[$0].trim()),this.$=$$[$0-2];break;case 29:this.$=$$[$0-4],yy.addClass($$[$0-2],$$[$0]);break;case 37:this.$=[];break;case 42:this.$=$$[$0].trim(),yy.setDiagramTitle(this.$);break;case 43:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 44:case 45:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 46:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 47:yy.addPoint($$[$0-3],"",$$[$0-1],$$[$0],[]);break;case 48:yy.addPoint($$[$0-4],$$[$0-3],$$[$0-1],$$[$0],[]);break;case 49:yy.addPoint($$[$0-4],"",$$[$0-2],$$[$0-1],$$[$0]);break;case 50:yy.addPoint($$[$0-5],$$[$0-4],$$[$0-2],$$[$0-1],$$[$0]);break;case 51:yy.setXAxisLeftText($$[$0-2]),yy.setXAxisRightText($$[$0]);break;case 52:$$[$0-1].text+=" ⟶ ",yy.setXAxisLeftText($$[$0-1]);break;case 53:yy.setXAxisLeftText($$[$0]);break;case 54:yy.setYAxisBottomText($$[$0-2]),yy.setYAxisTopText($$[$0]);break;case 55:$$[$0-1].text+=" ⟶ ",yy.setYAxisBottomText($$[$0-1]);break;case 56:yy.setYAxisBottomText($$[$0]);break;case 57:yy.setQuadrant1Text($$[$0]);break;case 58:yy.setQuadrant2Text($$[$0]);break;case 59:yy.setQuadrant3Text($$[$0]);break;case 60:yy.setQuadrant4Text($$[$0]);break;case 64:case 66:this.$={text:$$[$0],type:"text"};break;case 65:this.$={text:$$[$0-1].text+""+$$[$0],type:$$[$0-1].type};break;case 67:this.$={text:$$[$0],type:"markdown"}}},"anonymous"),table:[{18:$V0,26:1,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{1:[3]},{18:$V0,26:8,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{18:$V0,26:9,27:2,28:$V1,55:$V2,56:$V3,57:$V4},o($V5,[2,33],{29:10}),o($V6,[2,61]),o($V6,[2,62]),o($V6,[2,63]),{1:[2,30]},{1:[2,31]},o($V7,$V8,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V5,[2,34]),{27:45,55:$V2,56:$V3,57:$V4},o($V7,[2,37]),o($V7,$V8,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,39]),o($V7,[2,40]),o($V7,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},o($V7,[2,45]),o($V7,[2,46]),{18:[1,50]},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:51,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:52,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:53,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:54,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:55,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:56,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,44:[1,57],47:[1,58],58:60,59:59,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},o($VB,[2,64]),o($VB,[2,66]),o($VB,[2,67]),o($VB,[2,70]),o($VB,[2,71]),o($VB,[2,72]),o($VB,[2,73]),o($VB,[2,74]),o($VB,[2,75]),o($VB,[2,76]),o($VB,[2,77]),o($VB,[2,78]),o($VB,[2,79]),o($VB,[2,80]),o($V5,[2,35]),o($V7,[2,38]),o($V7,[2,42]),o($V7,[2,43]),o($V7,[2,44]),{3:64,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,21:63},o($V7,[2,53],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,77],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,56],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,78],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,57],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,58],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,59],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,60],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{45:[1,79]},{44:[1,80]},o($VB,[2,65]),o($VB,[2,81]),o($VB,[2,82]),o($VB,[2,83]),{3:82,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,18:[1,81]},o($VO,[2,23]),o($VO,[2,1]),o($VO,[2,2]),o($VO,[2,3]),o($VO,[2,4]),o($VO,[2,5]),o($VO,[2,6]),o($VO,[2,7]),o($VO,[2,8]),o($VO,[2,9]),o($VO,[2,10]),o($VO,[2,11]),o($VO,[2,12]),o($V7,[2,52],{58:31,43:83,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,55],{58:31,43:84,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{46:[1,85]},{45:[1,86]},{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:88,23:87},o($VO,[2,24]),o($V7,[2,51],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,54],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,47],{22:88,16:89,23:100,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{46:[1,101]},o($V7,[2,29],{10:$VZ}),o($V_,[2,27],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),o($V$,[2,25]),o($V$,[2,13]),o($V$,[2,14]),o($V$,[2,15]),o($V$,[2,16]),o($V$,[2,17]),o($V$,[2,18]),o($V$,[2,19]),o($V$,[2,20]),o($V$,[2,21]),o($V$,[2,22]),o($V7,[2,49],{10:$VZ}),o($V7,[2,48],{22:88,16:89,23:104,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:105},o($V$,[2,26]),o($V7,[2,50],{10:$VZ}),o($V_,[2,28],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY})],defaultActions:{8:[2,30],9:[2,31]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var quadrant_default=parser,defaultThemeVariables=getThemeVariables3(),QuadrantBuilder=(__name(_a=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var _a2,_b2,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(_a2=defaultConfig_default.quadrantChart)?void 0:_a2.chartWidth)||500,chartWidth:(null==(_b2=defaultConfig_default.quadrantChart)?void 0:_b2.chartHeight)||500,titlePadding:(null==(_c=defaultConfig_default.quadrantChart)?void 0:_c.titlePadding)||10,titleFontSize:(null==(_d=defaultConfig_default.quadrantChart)?void 0:_d.titleFontSize)||20,quadrantPadding:(null==(_e=defaultConfig_default.quadrantChart)?void 0:_e.quadrantPadding)||5,xAxisLabelPadding:(null==(_f=defaultConfig_default.quadrantChart)?void 0:_f.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(_g=defaultConfig_default.quadrantChart)?void 0:_g.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(_h=defaultConfig_default.quadrantChart)?void 0:_h.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(_i=defaultConfig_default.quadrantChart)?void 0:_i.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(_j=defaultConfig_default.quadrantChart)?void 0:_j.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(_k=defaultConfig_default.quadrantChart)?void 0:_k.quadrantTextTopPadding)||5,pointTextPadding:(null==(_l=defaultConfig_default.quadrantChart)?void 0:_l.pointTextPadding)||5,pointLabelFontSize:(null==(_m=defaultConfig_default.quadrantChart)?void 0:_m.pointLabelFontSize)||12,pointRadius:(null==(_n=defaultConfig_default.quadrantChart)?void 0:_n.pointRadius)||5,xAxisPosition:(null==(_o=defaultConfig_default.quadrantChart)?void 0:_o.xAxisPosition)||"top",yAxisPosition:(null==(_p=defaultConfig_default.quadrantChart)?void 0:_p.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(_q=defaultConfig_default.quadrantChart)?void 0:_q.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(_r=defaultConfig_default.quadrantChart)?void 0:_r.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:defaultThemeVariables.quadrant1Fill,quadrant2Fill:defaultThemeVariables.quadrant2Fill,quadrant3Fill:defaultThemeVariables.quadrant3Fill,quadrant4Fill:defaultThemeVariables.quadrant4Fill,quadrant1TextFill:defaultThemeVariables.quadrant1TextFill,quadrant2TextFill:defaultThemeVariables.quadrant2TextFill,quadrant3TextFill:defaultThemeVariables.quadrant3TextFill,quadrant4TextFill:defaultThemeVariables.quadrant4TextFill,quadrantPointFill:defaultThemeVariables.quadrantPointFill,quadrantPointTextFill:defaultThemeVariables.quadrantPointTextFill,quadrantXAxisTextFill:defaultThemeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:defaultThemeVariables.quadrantYAxisTextFill,quadrantTitleFill:defaultThemeVariables.quadrantTitleFill,quadrantInternalBorderStrokeFill:defaultThemeVariables.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:defaultThemeVariables.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,log.info("clear called")}setData(data){this.data={...this.data,...data}}addPoints(points){this.data.points=[...points,...this.data.points]}addClass(className,styles){this.classes.set(className,styles)}setConfig(config2){log.trace("setConfig called with: ",config2),this.config={...this.config,...config2}}setThemeConfig(themeConfig){log.trace("setThemeConfig called with: ",themeConfig),this.themeConfig={...this.themeConfig,...themeConfig}}calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle){const xAxisSpaceCalculation=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,xAxisSpace={top:"top"===xAxisPosition&&showXAxis?xAxisSpaceCalculation:0,bottom:"bottom"===xAxisPosition&&showXAxis?xAxisSpaceCalculation:0},yAxisSpaceCalculation=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,yAxisSpace={left:"left"===this.config.yAxisPosition&&showYAxis?yAxisSpaceCalculation:0,right:"right"===this.config.yAxisPosition&&showYAxis?yAxisSpaceCalculation:0},titleSpaceCalculation=this.config.titleFontSize+2*this.config.titlePadding,titleSpace={top:showTitle?titleSpaceCalculation:0},quadrantLeft=this.config.quadrantPadding+yAxisSpace.left,quadrantTop=this.config.quadrantPadding+xAxisSpace.top+titleSpace.top,quadrantWidth=this.config.chartWidth-2*this.config.quadrantPadding-yAxisSpace.left-yAxisSpace.right,quadrantHeight=this.config.chartHeight-2*this.config.quadrantPadding-xAxisSpace.top-xAxisSpace.bottom-titleSpace.top;return{xAxisSpace:xAxisSpace,yAxisSpace:yAxisSpace,titleSpace:titleSpace,quadrantSpace:{quadrantLeft:quadrantLeft,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth,quadrantHalfWidth:quadrantWidth/2,quadrantHeight:quadrantHeight,quadrantHalfHeight:quadrantHeight/2}}}getAxisLabels(xAxisPosition,showXAxis,showYAxis,spaceData){const{quadrantSpace:quadrantSpace,titleSpace:titleSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace,drawXAxisLabelsInMiddle=Boolean(this.data.xAxisRightText),drawYAxisLabelsInMiddle=Boolean(this.data.yAxisTopText),axisLabels=[];return this.data.xAxisLeftText&&showXAxis&&axisLabels.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:"top"===xAxisPosition?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&showXAxis&&axisLabels.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+quadrantHalfWidth+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:"top"===xAxisPosition?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&showYAxis&&axisLabels.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&showYAxis&&axisLabels.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHalfHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),axisLabels}getQuadrants(spaceData){const{quadrantSpace:quadrantSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop}=quadrantSpace,quadrants=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft+quadrantHalfWidth,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft+quadrantHalfWidth,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant4Fill}];for(const quadrant of quadrants)quadrant.text.x=quadrant.x+quadrant.width/2,0===this.data.points.length?(quadrant.text.y=quadrant.y+quadrant.height/2,quadrant.text.horizontalPos="middle"):(quadrant.text.y=quadrant.y+this.config.quadrantTextTopPadding,quadrant.text.horizontalPos="top");return quadrants}getQuadrantPoints(spaceData){const{quadrantSpace:quadrantSpace}=spaceData,{quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace,xAxis=linear().domain([0,1]).range([quadrantLeft,quadrantWidth+quadrantLeft]),yAxis=linear().domain([0,1]).range([quadrantHeight+quadrantTop,quadrantTop]);return this.data.points.map(point=>{const classStyles=this.classes.get(point.className);classStyles&&(point={...classStyles,...point});return{x:xAxis(point.x),y:yAxis(point.y),fill:point.color??this.themeConfig.quadrantPointFill,radius:point.radius??this.config.pointRadius,text:{text:point.text,fill:this.themeConfig.quadrantPointTextFill,x:xAxis(point.x),y:yAxis(point.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:point.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:point.strokeWidth??"0px"}})}getBorders(spaceData){const halfExternalBorderWidth=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:quadrantSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft+quadrantWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop+quadrantHeight,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop+quadrantHeight},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+quadrantHalfWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantHalfWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+halfExternalBorderWidth,y1:quadrantTop+quadrantHalfHeight,x2:quadrantLeft+quadrantWidth-halfExternalBorderWidth,y2:quadrantTop+quadrantHalfHeight}]}getTitle(showTitle){if(showTitle)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const showXAxis=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),showYAxis=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),showTitle=this.config.showTitle&&!!this.data.titleText,xAxisPosition=this.data.points.length>0?"bottom":this.config.xAxisPosition,calculatedSpace=this.calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle);return{points:this.getQuadrantPoints(calculatedSpace),quadrants:this.getQuadrants(calculatedSpace),axisLabels:this.getAxisLabels(xAxisPosition,showXAxis,showYAxis,calculatedSpace),borderLines:this.getBorders(calculatedSpace),title:this.getTitle(showTitle)}}},"QuadrantBuilder"),_a),InvalidStyleError=(_b=class extends Error{constructor(style,value,type){super(`value for ${style} ${value} is invalid, please use a valid ${type}`),this.name="InvalidStyleError"}},__name(_b,"InvalidStyleError"),_b);function validateHexCode(value){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(value)}function validateNumber(value){return!/^\d+$/.test(value)}function validateSizeInPixels(value){return!/^\d+px$/.test(value)}__name(validateHexCode,"validateHexCode"),__name(validateNumber,"validateNumber"),__name(validateSizeInPixels,"validateSizeInPixels");var config=getConfig2();function textSanitizer(text){return sanitizeText(text.trim(),config)}__name(textSanitizer,"textSanitizer");var quadrantBuilder=new QuadrantBuilder;function setQuadrant1Text(textObj){quadrantBuilder.setData({quadrant1Text:textSanitizer(textObj.text)})}function setQuadrant2Text(textObj){quadrantBuilder.setData({quadrant2Text:textSanitizer(textObj.text)})}function setQuadrant3Text(textObj){quadrantBuilder.setData({quadrant3Text:textSanitizer(textObj.text)})}function setQuadrant4Text(textObj){quadrantBuilder.setData({quadrant4Text:textSanitizer(textObj.text)})}function setXAxisLeftText(textObj){quadrantBuilder.setData({xAxisLeftText:textSanitizer(textObj.text)})}function setXAxisRightText(textObj){quadrantBuilder.setData({xAxisRightText:textSanitizer(textObj.text)})}function setYAxisTopText(textObj){quadrantBuilder.setData({yAxisTopText:textSanitizer(textObj.text)})}function setYAxisBottomText(textObj){quadrantBuilder.setData({yAxisBottomText:textSanitizer(textObj.text)})}function parseStyles(styles){const stylesObject={};for(const style of styles){const[key,value]=style.trim().split(/\s*:\s*/);if("radius"===key){if(validateNumber(value))throw new InvalidStyleError(key,value,"number");stylesObject.radius=parseInt(value)}else if("color"===key){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.color=value}else if("stroke-color"===key){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.strokeColor=value}else{if("stroke-width"!==key)throw new Error(`style named ${key} is not supported.`);if(validateSizeInPixels(value))throw new InvalidStyleError(key,value,"number of pixels (eg. 10px)");stylesObject.strokeWidth=value}}return stylesObject}function addPoint(textObj,className,x,y,styles){const stylesObject=parseStyles(styles);quadrantBuilder.addPoints([{x:x,y:y,text:textSanitizer(textObj.text),className:className,...stylesObject}])}function addClass(className,styles){quadrantBuilder.addClass(className,parseStyles(styles))}function setWidth(width){quadrantBuilder.setConfig({chartWidth:width})}function setHeight(height){quadrantBuilder.setConfig({chartHeight:height})}function getQuadrantData(){const config2=getConfig2(),{themeVariables:themeVariables,quadrantChart:quadrantChartConfig}=config2;return quadrantChartConfig&&quadrantBuilder.setConfig(quadrantChartConfig),quadrantBuilder.setThemeConfig({quadrant1Fill:themeVariables.quadrant1Fill,quadrant2Fill:themeVariables.quadrant2Fill,quadrant3Fill:themeVariables.quadrant3Fill,quadrant4Fill:themeVariables.quadrant4Fill,quadrant1TextFill:themeVariables.quadrant1TextFill,quadrant2TextFill:themeVariables.quadrant2TextFill,quadrant3TextFill:themeVariables.quadrant3TextFill,quadrant4TextFill:themeVariables.quadrant4TextFill,quadrantPointFill:themeVariables.quadrantPointFill,quadrantPointTextFill:themeVariables.quadrantPointTextFill,quadrantXAxisTextFill:themeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:themeVariables.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:themeVariables.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:themeVariables.quadrantInternalBorderStrokeFill,quadrantTitleFill:themeVariables.quadrantTitleFill}),quadrantBuilder.setData({titleText:getDiagramTitle()}),quadrantBuilder.build()}__name(setQuadrant1Text,"setQuadrant1Text"),__name(setQuadrant2Text,"setQuadrant2Text"),__name(setQuadrant3Text,"setQuadrant3Text"),__name(setQuadrant4Text,"setQuadrant4Text"),__name(setXAxisLeftText,"setXAxisLeftText"),__name(setXAxisRightText,"setXAxisRightText"),__name(setYAxisTopText,"setYAxisTopText"),__name(setYAxisBottomText,"setYAxisBottomText"),__name(parseStyles,"parseStyles"),__name(addPoint,"addPoint"),__name(addClass,"addClass"),__name(setWidth,"setWidth"),__name(setHeight,"setHeight"),__name(getQuadrantData,"getQuadrantData");var diagram={parser:quadrant_default,db:{setWidth:setWidth,setHeight:setHeight,setQuadrant1Text:setQuadrant1Text,setQuadrant2Text:setQuadrant2Text,setQuadrant3Text:setQuadrant3Text,setQuadrant4Text:setQuadrant4Text,setXAxisLeftText:setXAxisLeftText,setXAxisRightText:setXAxisRightText,setYAxisTopText:setYAxisTopText,setYAxisBottomText:setYAxisBottomText,parseStyles:parseStyles,addPoint:addPoint,addClass:addClass,getQuadrantData:getQuadrantData,clear:__name(function(){quadrantBuilder.clear(),clear()},"clear"),setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription},renderer:{draw:__name((txt,id,_version,diagObj)=>{var _a2,_b2,_c;function getDominantBaseLine(horizontalPos){return"top"===horizontalPos?"hanging":"middle"}function getTextAnchor(verticalPos){return"left"===verticalPos?"start":"middle"}function getTransformation(data){return`translate(${data.x}, ${data.y}) rotate(${data.rotation||0})`}__name(getDominantBaseLine,"getDominantBaseLine"),__name(getTextAnchor,"getTextAnchor"),__name(getTransformation,"getTransformation");const conf=getConfig2();log.debug("Rendering quadrant chart\n"+txt);const securityLevel=conf.securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const svg=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body").select(`[id="${id}"]`),group=svg.append("g").attr("class","main"),width=(null==(_a2=conf.quadrantChart)?void 0:_a2.chartWidth)??500,height=(null==(_b2=conf.quadrantChart)?void 0:_b2.chartHeight)??500;configureSvgSize(svg,height,width,(null==(_c=conf.quadrantChart)?void 0:_c.useMaxWidth)??!0),svg.attr("viewBox","0 0 "+width+" "+height),diagObj.db.setHeight(height),diagObj.db.setWidth(width);const quadrantData=diagObj.db.getQuadrantData(),quadrantsGroup=group.append("g").attr("class","quadrants"),borderGroup=group.append("g").attr("class","border"),dataPointGroup=group.append("g").attr("class","data-points"),labelGroup=group.append("g").attr("class","labels"),titleGroup=group.append("g").attr("class","title");quadrantData.title&&titleGroup.append("text").attr("x",0).attr("y",0).attr("fill",quadrantData.title.fill).attr("font-size",quadrantData.title.fontSize).attr("dominant-baseline",getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor",getTextAnchor(quadrantData.title.verticalPos)).attr("transform",getTransformation(quadrantData.title)).text(quadrantData.title.text),quadrantData.borderLines&&borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1",data=>data.x1).attr("y1",data=>data.y1).attr("x2",data=>data.x2).attr("y2",data=>data.y2).style("stroke",data=>data.strokeFill).style("stroke-width",data=>data.strokeWidth);const quadrants=quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class","quadrant");quadrants.append("rect").attr("x",data=>data.x).attr("y",data=>data.y).attr("width",data=>data.width).attr("height",data=>data.height).attr("fill",data=>data.fill),quadrants.append("text").attr("x",0).attr("y",0).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text)).text(data=>data.text.text);labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(data=>data.text).attr("fill",data=>data.fill).attr("font-size",data=>data.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.verticalPos)).attr("transform",data=>getTransformation(data));const dataPoints=dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class","data-point");dataPoints.append("circle").attr("cx",data=>data.x).attr("cy",data=>data.y).attr("r",data=>data.radius).attr("fill",data=>data.fill).attr("stroke",data=>data.strokeColor).attr("stroke-width",data=>data.strokeWidth),dataPoints.append("text").attr("x",0).attr("y",0).text(data=>data.text.text).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text))},"draw")},styles:__name(()=>"","styles")};export{diagram};
|
|
1
|
+
var _a,_b;import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,c as getConfig2,l as log,d as select,e as configureSvgSize,y as clear,F as defaultConfig_default,i as sanitizeText,I as getThemeVariables3}from"./mermaid.core-1heNIJ5f.js";import{l as linear}from"./linear-Dcmw1639.js";import"./vendor-mdxeditor-BB4hhpxM.js";import"./vendor-antd-BG1SvzuN.js";import"./vendor-codemirror-8NDhydlF.js";import"./vendor-markdown-BFrYfpb0.js";import"./init-DMZMl1PR.js";import"./defaultLocale-DZ7E7S9R.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[1,7],$V5=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V6=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V7=[55,56,57],$V8=[2,36],$V9=[1,37],$Va=[1,36],$Vb=[1,38],$Vc=[1,35],$Vd=[1,43],$Ve=[1,41],$Vf=[1,14],$Vg=[1,23],$Vh=[1,18],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,24],$Vn=[1,25],$Vo=[1,26],$Vp=[1,27],$Vq=[1,28],$Vr=[1,29],$Vs=[1,32],$Vt=[1,33],$Vu=[1,34],$Vv=[1,39],$Vw=[1,40],$Vx=[1,42],$Vy=[1,44],$Vz=[1,62],$VA=[1,61],$VB=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$VC=[1,65],$VD=[1,66],$VE=[1,67],$VF=[1,68],$VG=[1,69],$VH=[1,70],$VI=[1,71],$VJ=[1,72],$VK=[1,73],$VL=[1,74],$VM=[1,75],$VN=[1,76],$VO=[4,5,6,7,8,9,10,11,12,13,14,15,18],$VP=[1,90],$VQ=[1,91],$VR=[1,92],$VS=[1,99],$VT=[1,93],$VU=[1,96],$VV=[1,94],$VW=[1,95],$VX=[1,97],$VY=[1,98],$VZ=[1,102],$V_=[10,55,56,57],$V$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 23:case 68:this.$=$$[$0];break;case 24:case 69:this.$=$$[$0-1]+""+$$[$0];break;case 26:this.$=$$[$0-1]+$$[$0];break;case 27:this.$=[$$[$0].trim()];break;case 28:$$[$0-2].push($$[$0].trim()),this.$=$$[$0-2];break;case 29:this.$=$$[$0-4],yy.addClass($$[$0-2],$$[$0]);break;case 37:this.$=[];break;case 42:this.$=$$[$0].trim(),yy.setDiagramTitle(this.$);break;case 43:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 44:case 45:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 46:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 47:yy.addPoint($$[$0-3],"",$$[$0-1],$$[$0],[]);break;case 48:yy.addPoint($$[$0-4],$$[$0-3],$$[$0-1],$$[$0],[]);break;case 49:yy.addPoint($$[$0-4],"",$$[$0-2],$$[$0-1],$$[$0]);break;case 50:yy.addPoint($$[$0-5],$$[$0-4],$$[$0-2],$$[$0-1],$$[$0]);break;case 51:yy.setXAxisLeftText($$[$0-2]),yy.setXAxisRightText($$[$0]);break;case 52:$$[$0-1].text+=" ⟶ ",yy.setXAxisLeftText($$[$0-1]);break;case 53:yy.setXAxisLeftText($$[$0]);break;case 54:yy.setYAxisBottomText($$[$0-2]),yy.setYAxisTopText($$[$0]);break;case 55:$$[$0-1].text+=" ⟶ ",yy.setYAxisBottomText($$[$0-1]);break;case 56:yy.setYAxisBottomText($$[$0]);break;case 57:yy.setQuadrant1Text($$[$0]);break;case 58:yy.setQuadrant2Text($$[$0]);break;case 59:yy.setQuadrant3Text($$[$0]);break;case 60:yy.setQuadrant4Text($$[$0]);break;case 64:case 66:this.$={text:$$[$0],type:"text"};break;case 65:this.$={text:$$[$0-1].text+""+$$[$0],type:$$[$0-1].type};break;case 67:this.$={text:$$[$0],type:"markdown"}}},"anonymous"),table:[{18:$V0,26:1,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{1:[3]},{18:$V0,26:8,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{18:$V0,26:9,27:2,28:$V1,55:$V2,56:$V3,57:$V4},o($V5,[2,33],{29:10}),o($V6,[2,61]),o($V6,[2,62]),o($V6,[2,63]),{1:[2,30]},{1:[2,31]},o($V7,$V8,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V5,[2,34]),{27:45,55:$V2,56:$V3,57:$V4},o($V7,[2,37]),o($V7,$V8,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,39]),o($V7,[2,40]),o($V7,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},o($V7,[2,45]),o($V7,[2,46]),{18:[1,50]},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:51,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:52,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:53,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:54,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:55,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:56,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,44:[1,57],47:[1,58],58:60,59:59,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},o($VB,[2,64]),o($VB,[2,66]),o($VB,[2,67]),o($VB,[2,70]),o($VB,[2,71]),o($VB,[2,72]),o($VB,[2,73]),o($VB,[2,74]),o($VB,[2,75]),o($VB,[2,76]),o($VB,[2,77]),o($VB,[2,78]),o($VB,[2,79]),o($VB,[2,80]),o($V5,[2,35]),o($V7,[2,38]),o($V7,[2,42]),o($V7,[2,43]),o($V7,[2,44]),{3:64,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,21:63},o($V7,[2,53],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,77],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,56],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,78],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,57],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,58],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,59],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,60],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{45:[1,79]},{44:[1,80]},o($VB,[2,65]),o($VB,[2,81]),o($VB,[2,82]),o($VB,[2,83]),{3:82,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,18:[1,81]},o($VO,[2,23]),o($VO,[2,1]),o($VO,[2,2]),o($VO,[2,3]),o($VO,[2,4]),o($VO,[2,5]),o($VO,[2,6]),o($VO,[2,7]),o($VO,[2,8]),o($VO,[2,9]),o($VO,[2,10]),o($VO,[2,11]),o($VO,[2,12]),o($V7,[2,52],{58:31,43:83,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,55],{58:31,43:84,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{46:[1,85]},{45:[1,86]},{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:88,23:87},o($VO,[2,24]),o($V7,[2,51],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,54],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,47],{22:88,16:89,23:100,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{46:[1,101]},o($V7,[2,29],{10:$VZ}),o($V_,[2,27],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),o($V$,[2,25]),o($V$,[2,13]),o($V$,[2,14]),o($V$,[2,15]),o($V$,[2,16]),o($V$,[2,17]),o($V$,[2,18]),o($V$,[2,19]),o($V$,[2,20]),o($V$,[2,21]),o($V$,[2,22]),o($V7,[2,49],{10:$VZ}),o($V7,[2,48],{22:88,16:89,23:104,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:105},o($V$,[2,26]),o($V7,[2,50],{10:$VZ}),o($V_,[2,28],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY})],defaultActions:{8:[2,30],9:[2,31]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var quadrant_default=parser,defaultThemeVariables=getThemeVariables3(),QuadrantBuilder=(__name(_a=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var _a2,_b2,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(_a2=defaultConfig_default.quadrantChart)?void 0:_a2.chartWidth)||500,chartWidth:(null==(_b2=defaultConfig_default.quadrantChart)?void 0:_b2.chartHeight)||500,titlePadding:(null==(_c=defaultConfig_default.quadrantChart)?void 0:_c.titlePadding)||10,titleFontSize:(null==(_d=defaultConfig_default.quadrantChart)?void 0:_d.titleFontSize)||20,quadrantPadding:(null==(_e=defaultConfig_default.quadrantChart)?void 0:_e.quadrantPadding)||5,xAxisLabelPadding:(null==(_f=defaultConfig_default.quadrantChart)?void 0:_f.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(_g=defaultConfig_default.quadrantChart)?void 0:_g.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(_h=defaultConfig_default.quadrantChart)?void 0:_h.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(_i=defaultConfig_default.quadrantChart)?void 0:_i.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(_j=defaultConfig_default.quadrantChart)?void 0:_j.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(_k=defaultConfig_default.quadrantChart)?void 0:_k.quadrantTextTopPadding)||5,pointTextPadding:(null==(_l=defaultConfig_default.quadrantChart)?void 0:_l.pointTextPadding)||5,pointLabelFontSize:(null==(_m=defaultConfig_default.quadrantChart)?void 0:_m.pointLabelFontSize)||12,pointRadius:(null==(_n=defaultConfig_default.quadrantChart)?void 0:_n.pointRadius)||5,xAxisPosition:(null==(_o=defaultConfig_default.quadrantChart)?void 0:_o.xAxisPosition)||"top",yAxisPosition:(null==(_p=defaultConfig_default.quadrantChart)?void 0:_p.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(_q=defaultConfig_default.quadrantChart)?void 0:_q.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(_r=defaultConfig_default.quadrantChart)?void 0:_r.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:defaultThemeVariables.quadrant1Fill,quadrant2Fill:defaultThemeVariables.quadrant2Fill,quadrant3Fill:defaultThemeVariables.quadrant3Fill,quadrant4Fill:defaultThemeVariables.quadrant4Fill,quadrant1TextFill:defaultThemeVariables.quadrant1TextFill,quadrant2TextFill:defaultThemeVariables.quadrant2TextFill,quadrant3TextFill:defaultThemeVariables.quadrant3TextFill,quadrant4TextFill:defaultThemeVariables.quadrant4TextFill,quadrantPointFill:defaultThemeVariables.quadrantPointFill,quadrantPointTextFill:defaultThemeVariables.quadrantPointTextFill,quadrantXAxisTextFill:defaultThemeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:defaultThemeVariables.quadrantYAxisTextFill,quadrantTitleFill:defaultThemeVariables.quadrantTitleFill,quadrantInternalBorderStrokeFill:defaultThemeVariables.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:defaultThemeVariables.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,log.info("clear called")}setData(data){this.data={...this.data,...data}}addPoints(points){this.data.points=[...points,...this.data.points]}addClass(className,styles){this.classes.set(className,styles)}setConfig(config2){log.trace("setConfig called with: ",config2),this.config={...this.config,...config2}}setThemeConfig(themeConfig){log.trace("setThemeConfig called with: ",themeConfig),this.themeConfig={...this.themeConfig,...themeConfig}}calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle){const xAxisSpaceCalculation=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,xAxisSpace={top:"top"===xAxisPosition&&showXAxis?xAxisSpaceCalculation:0,bottom:"bottom"===xAxisPosition&&showXAxis?xAxisSpaceCalculation:0},yAxisSpaceCalculation=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,yAxisSpace={left:"left"===this.config.yAxisPosition&&showYAxis?yAxisSpaceCalculation:0,right:"right"===this.config.yAxisPosition&&showYAxis?yAxisSpaceCalculation:0},titleSpaceCalculation=this.config.titleFontSize+2*this.config.titlePadding,titleSpace={top:showTitle?titleSpaceCalculation:0},quadrantLeft=this.config.quadrantPadding+yAxisSpace.left,quadrantTop=this.config.quadrantPadding+xAxisSpace.top+titleSpace.top,quadrantWidth=this.config.chartWidth-2*this.config.quadrantPadding-yAxisSpace.left-yAxisSpace.right,quadrantHeight=this.config.chartHeight-2*this.config.quadrantPadding-xAxisSpace.top-xAxisSpace.bottom-titleSpace.top;return{xAxisSpace:xAxisSpace,yAxisSpace:yAxisSpace,titleSpace:titleSpace,quadrantSpace:{quadrantLeft:quadrantLeft,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth,quadrantHalfWidth:quadrantWidth/2,quadrantHeight:quadrantHeight,quadrantHalfHeight:quadrantHeight/2}}}getAxisLabels(xAxisPosition,showXAxis,showYAxis,spaceData){const{quadrantSpace:quadrantSpace,titleSpace:titleSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace,drawXAxisLabelsInMiddle=Boolean(this.data.xAxisRightText),drawYAxisLabelsInMiddle=Boolean(this.data.yAxisTopText),axisLabels=[];return this.data.xAxisLeftText&&showXAxis&&axisLabels.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:"top"===xAxisPosition?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&showXAxis&&axisLabels.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+quadrantHalfWidth+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:"top"===xAxisPosition?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&showYAxis&&axisLabels.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&showYAxis&&axisLabels.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHalfHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),axisLabels}getQuadrants(spaceData){const{quadrantSpace:quadrantSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop}=quadrantSpace,quadrants=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft+quadrantHalfWidth,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft+quadrantHalfWidth,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant4Fill}];for(const quadrant of quadrants)quadrant.text.x=quadrant.x+quadrant.width/2,0===this.data.points.length?(quadrant.text.y=quadrant.y+quadrant.height/2,quadrant.text.horizontalPos="middle"):(quadrant.text.y=quadrant.y+this.config.quadrantTextTopPadding,quadrant.text.horizontalPos="top");return quadrants}getQuadrantPoints(spaceData){const{quadrantSpace:quadrantSpace}=spaceData,{quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace,xAxis=linear().domain([0,1]).range([quadrantLeft,quadrantWidth+quadrantLeft]),yAxis=linear().domain([0,1]).range([quadrantHeight+quadrantTop,quadrantTop]);return this.data.points.map(point=>{const classStyles=this.classes.get(point.className);classStyles&&(point={...classStyles,...point});return{x:xAxis(point.x),y:yAxis(point.y),fill:point.color??this.themeConfig.quadrantPointFill,radius:point.radius??this.config.pointRadius,text:{text:point.text,fill:this.themeConfig.quadrantPointTextFill,x:xAxis(point.x),y:yAxis(point.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:point.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:point.strokeWidth??"0px"}})}getBorders(spaceData){const halfExternalBorderWidth=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:quadrantSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft+quadrantWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop+quadrantHeight,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop+quadrantHeight},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+quadrantHalfWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantHalfWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+halfExternalBorderWidth,y1:quadrantTop+quadrantHalfHeight,x2:quadrantLeft+quadrantWidth-halfExternalBorderWidth,y2:quadrantTop+quadrantHalfHeight}]}getTitle(showTitle){if(showTitle)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const showXAxis=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),showYAxis=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),showTitle=this.config.showTitle&&!!this.data.titleText,xAxisPosition=this.data.points.length>0?"bottom":this.config.xAxisPosition,calculatedSpace=this.calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle);return{points:this.getQuadrantPoints(calculatedSpace),quadrants:this.getQuadrants(calculatedSpace),axisLabels:this.getAxisLabels(xAxisPosition,showXAxis,showYAxis,calculatedSpace),borderLines:this.getBorders(calculatedSpace),title:this.getTitle(showTitle)}}},"QuadrantBuilder"),_a),InvalidStyleError=(_b=class extends Error{constructor(style,value,type){super(`value for ${style} ${value} is invalid, please use a valid ${type}`),this.name="InvalidStyleError"}},__name(_b,"InvalidStyleError"),_b);function validateHexCode(value){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(value)}function validateNumber(value){return!/^\d+$/.test(value)}function validateSizeInPixels(value){return!/^\d+px$/.test(value)}__name(validateHexCode,"validateHexCode"),__name(validateNumber,"validateNumber"),__name(validateSizeInPixels,"validateSizeInPixels");var config=getConfig2();function textSanitizer(text){return sanitizeText(text.trim(),config)}__name(textSanitizer,"textSanitizer");var quadrantBuilder=new QuadrantBuilder;function setQuadrant1Text(textObj){quadrantBuilder.setData({quadrant1Text:textSanitizer(textObj.text)})}function setQuadrant2Text(textObj){quadrantBuilder.setData({quadrant2Text:textSanitizer(textObj.text)})}function setQuadrant3Text(textObj){quadrantBuilder.setData({quadrant3Text:textSanitizer(textObj.text)})}function setQuadrant4Text(textObj){quadrantBuilder.setData({quadrant4Text:textSanitizer(textObj.text)})}function setXAxisLeftText(textObj){quadrantBuilder.setData({xAxisLeftText:textSanitizer(textObj.text)})}function setXAxisRightText(textObj){quadrantBuilder.setData({xAxisRightText:textSanitizer(textObj.text)})}function setYAxisTopText(textObj){quadrantBuilder.setData({yAxisTopText:textSanitizer(textObj.text)})}function setYAxisBottomText(textObj){quadrantBuilder.setData({yAxisBottomText:textSanitizer(textObj.text)})}function parseStyles(styles){const stylesObject={};for(const style of styles){const[key,value]=style.trim().split(/\s*:\s*/);if("radius"===key){if(validateNumber(value))throw new InvalidStyleError(key,value,"number");stylesObject.radius=parseInt(value)}else if("color"===key){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.color=value}else if("stroke-color"===key){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.strokeColor=value}else{if("stroke-width"!==key)throw new Error(`style named ${key} is not supported.`);if(validateSizeInPixels(value))throw new InvalidStyleError(key,value,"number of pixels (eg. 10px)");stylesObject.strokeWidth=value}}return stylesObject}function addPoint(textObj,className,x,y,styles){const stylesObject=parseStyles(styles);quadrantBuilder.addPoints([{x:x,y:y,text:textSanitizer(textObj.text),className:className,...stylesObject}])}function addClass(className,styles){quadrantBuilder.addClass(className,parseStyles(styles))}function setWidth(width){quadrantBuilder.setConfig({chartWidth:width})}function setHeight(height){quadrantBuilder.setConfig({chartHeight:height})}function getQuadrantData(){const config2=getConfig2(),{themeVariables:themeVariables,quadrantChart:quadrantChartConfig}=config2;return quadrantChartConfig&&quadrantBuilder.setConfig(quadrantChartConfig),quadrantBuilder.setThemeConfig({quadrant1Fill:themeVariables.quadrant1Fill,quadrant2Fill:themeVariables.quadrant2Fill,quadrant3Fill:themeVariables.quadrant3Fill,quadrant4Fill:themeVariables.quadrant4Fill,quadrant1TextFill:themeVariables.quadrant1TextFill,quadrant2TextFill:themeVariables.quadrant2TextFill,quadrant3TextFill:themeVariables.quadrant3TextFill,quadrant4TextFill:themeVariables.quadrant4TextFill,quadrantPointFill:themeVariables.quadrantPointFill,quadrantPointTextFill:themeVariables.quadrantPointTextFill,quadrantXAxisTextFill:themeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:themeVariables.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:themeVariables.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:themeVariables.quadrantInternalBorderStrokeFill,quadrantTitleFill:themeVariables.quadrantTitleFill}),quadrantBuilder.setData({titleText:getDiagramTitle()}),quadrantBuilder.build()}__name(setQuadrant1Text,"setQuadrant1Text"),__name(setQuadrant2Text,"setQuadrant2Text"),__name(setQuadrant3Text,"setQuadrant3Text"),__name(setQuadrant4Text,"setQuadrant4Text"),__name(setXAxisLeftText,"setXAxisLeftText"),__name(setXAxisRightText,"setXAxisRightText"),__name(setYAxisTopText,"setYAxisTopText"),__name(setYAxisBottomText,"setYAxisBottomText"),__name(parseStyles,"parseStyles"),__name(addPoint,"addPoint"),__name(addClass,"addClass"),__name(setWidth,"setWidth"),__name(setHeight,"setHeight"),__name(getQuadrantData,"getQuadrantData");var diagram={parser:quadrant_default,db:{setWidth:setWidth,setHeight:setHeight,setQuadrant1Text:setQuadrant1Text,setQuadrant2Text:setQuadrant2Text,setQuadrant3Text:setQuadrant3Text,setQuadrant4Text:setQuadrant4Text,setXAxisLeftText:setXAxisLeftText,setXAxisRightText:setXAxisRightText,setYAxisTopText:setYAxisTopText,setYAxisBottomText:setYAxisBottomText,parseStyles:parseStyles,addPoint:addPoint,addClass:addClass,getQuadrantData:getQuadrantData,clear:__name(function(){quadrantBuilder.clear(),clear()},"clear"),setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription},renderer:{draw:__name((txt,id,_version,diagObj)=>{var _a2,_b2,_c;function getDominantBaseLine(horizontalPos){return"top"===horizontalPos?"hanging":"middle"}function getTextAnchor(verticalPos){return"left"===verticalPos?"start":"middle"}function getTransformation(data){return`translate(${data.x}, ${data.y}) rotate(${data.rotation||0})`}__name(getDominantBaseLine,"getDominantBaseLine"),__name(getTextAnchor,"getTextAnchor"),__name(getTransformation,"getTransformation");const conf=getConfig2();log.debug("Rendering quadrant chart\n"+txt);const securityLevel=conf.securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const svg=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body").select(`[id="${id}"]`),group=svg.append("g").attr("class","main"),width=(null==(_a2=conf.quadrantChart)?void 0:_a2.chartWidth)??500,height=(null==(_b2=conf.quadrantChart)?void 0:_b2.chartHeight)??500;configureSvgSize(svg,height,width,(null==(_c=conf.quadrantChart)?void 0:_c.useMaxWidth)??!0),svg.attr("viewBox","0 0 "+width+" "+height),diagObj.db.setHeight(height),diagObj.db.setWidth(width);const quadrantData=diagObj.db.getQuadrantData(),quadrantsGroup=group.append("g").attr("class","quadrants"),borderGroup=group.append("g").attr("class","border"),dataPointGroup=group.append("g").attr("class","data-points"),labelGroup=group.append("g").attr("class","labels"),titleGroup=group.append("g").attr("class","title");quadrantData.title&&titleGroup.append("text").attr("x",0).attr("y",0).attr("fill",quadrantData.title.fill).attr("font-size",quadrantData.title.fontSize).attr("dominant-baseline",getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor",getTextAnchor(quadrantData.title.verticalPos)).attr("transform",getTransformation(quadrantData.title)).text(quadrantData.title.text),quadrantData.borderLines&&borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1",data=>data.x1).attr("y1",data=>data.y1).attr("x2",data=>data.x2).attr("y2",data=>data.y2).style("stroke",data=>data.strokeFill).style("stroke-width",data=>data.strokeWidth);const quadrants=quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class","quadrant");quadrants.append("rect").attr("x",data=>data.x).attr("y",data=>data.y).attr("width",data=>data.width).attr("height",data=>data.height).attr("fill",data=>data.fill),quadrants.append("text").attr("x",0).attr("y",0).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text)).text(data=>data.text.text);labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(data=>data.text).attr("fill",data=>data.fill).attr("font-size",data=>data.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.verticalPos)).attr("transform",data=>getTransformation(data));const dataPoints=dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class","data-point");dataPoints.append("circle").attr("cx",data=>data.x).attr("cy",data=>data.y).attr("r",data=>data.radius).attr("fill",data=>data.fill).attr("stroke",data=>data.strokeColor).attr("stroke-width",data=>data.strokeWidth),dataPoints.append("text").attr("x",0).attr("y",0).text(data=>data.text.text).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text))},"draw")},styles:__name(()=>"","styles")};export{diagram};
|