@oevery/rsp 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-AUZYUJ46.mjs +418 -0
- package/dist/chunk-DNRGBQS7.mjs +108 -0
- package/dist/chunk-LGDCIQYL.mjs +725 -0
- package/dist/chunk-P3KO3GZW.mjs +1023 -0
- package/dist/{chunk-HFSTLCCK.mjs → chunk-VDRXFKBP.mjs} +133 -1800
- package/dist/cli.mjs +286 -294
- package/dist/client-U2PN3VS4.mjs +108 -0
- package/dist/{entry-RIJQ2X46.mjs → entry-NDASTAI5.mjs} +13 -9
- package/dist/viewer/NOTICE.txt +299 -0
- package/dist/viewer/app.css +2 -0
- package/dist/viewer/app.js +670 -0
- package/dist/viewer/chunks/abnfDiagram-S7VZAUFO-K5EOZOEF.js +1 -0
- package/dist/viewer/chunks/architecture-WOLXFQ4H-UAT5D5BF.js +1 -0
- package/dist/viewer/chunks/architectureDiagram-YGSQEFNW-UNPSYM2L.js +36 -0
- package/dist/viewer/chunks/blockDiagram-APKKGZFW-2F7TTPAV.js +140 -0
- package/dist/viewer/chunks/bpmnIcons-APHXDYXF-ZWPFFN3O.js +1 -0
- package/dist/viewer/chunks/c4Diagram-KJ2TOQU5-KNLN6CME.js +38 -0
- package/dist/viewer/chunks/chunk-274PZN6B.js +1 -0
- package/dist/viewer/chunks/chunk-2VGDQLQD.js +1 -0
- package/dist/viewer/chunks/chunk-33XESOCS.js +1 -0
- package/dist/viewer/chunks/chunk-3ZSL2TGQ.js +1 -0
- package/dist/viewer/chunks/chunk-432I4U3B.js +1 -0
- package/dist/viewer/chunks/chunk-4PJNGS3V.js +1 -0
- package/dist/viewer/chunks/chunk-54NLSLTF.js +9 -0
- package/dist/viewer/chunks/chunk-6QRHYJ5Q.js +1 -0
- package/dist/viewer/chunks/chunk-6RCFKBVR.js +1 -0
- package/dist/viewer/chunks/chunk-6Y2HP7DC.js +213 -0
- package/dist/viewer/chunks/chunk-7MAT7NHP.js +1 -0
- package/dist/viewer/chunks/chunk-AKHBD6LT.js +2 -0
- package/dist/viewer/chunks/chunk-CZIM56BV.js +1 -0
- package/dist/viewer/chunks/chunk-DN4Y7LXJ.js +1 -0
- package/dist/viewer/chunks/chunk-E2UQN267.js +1 -0
- package/dist/viewer/chunks/chunk-GBARLDDT.js +1 -0
- package/dist/viewer/chunks/chunk-H4YEV7VR.js +1 -0
- package/dist/viewer/chunks/chunk-HUVVDQHZ.js +1 -0
- package/dist/viewer/chunks/chunk-IAKC32WV.js +72 -0
- package/dist/viewer/chunks/chunk-JTW4SY4L.js +1 -0
- package/dist/viewer/chunks/chunk-JZV675LF.js +1 -0
- package/dist/viewer/chunks/chunk-KDUDYTWO.js +1 -0
- package/dist/viewer/chunks/chunk-KHX3A5RZ.js +331 -0
- package/dist/viewer/chunks/chunk-KPXJJSUR.js +15 -0
- package/dist/viewer/chunks/chunk-LEGNM6PH.js +1 -0
- package/dist/viewer/chunks/chunk-LYY4ZY72.js +1 -0
- package/dist/viewer/chunks/chunk-MKDEK2LU.js +1 -0
- package/dist/viewer/chunks/chunk-MYJRFART.js +129 -0
- package/dist/viewer/chunks/chunk-NUXZBURC.js +1 -0
- package/dist/viewer/chunks/chunk-NXHT5I2L.js +1 -0
- package/dist/viewer/chunks/chunk-OF62XRVM.js +62 -0
- package/dist/viewer/chunks/chunk-ONCOEVBS.js +1 -0
- package/dist/viewer/chunks/chunk-P44SH3OO.js +1 -0
- package/dist/viewer/chunks/chunk-PDXKDBIX.js +1 -0
- package/dist/viewer/chunks/chunk-PHKIAKHS.js +1 -0
- package/dist/viewer/chunks/chunk-PJDMAGPE.js +2 -0
- package/dist/viewer/chunks/chunk-RC2NPHSX.js +88 -0
- package/dist/viewer/chunks/chunk-T6DM5RSK.js +10 -0
- package/dist/viewer/chunks/chunk-U5STX66M.js +2 -0
- package/dist/viewer/chunks/chunk-UIAJQPOF.js +1 -0
- package/dist/viewer/chunks/chunk-UX2S3LP3.js +1 -0
- package/dist/viewer/chunks/chunk-VEMTQQ7Y.js +2 -0
- package/dist/viewer/chunks/chunk-WKCPBR3C.js +1 -0
- package/dist/viewer/chunks/chunk-WMQ4Y2MS.js +32 -0
- package/dist/viewer/chunks/chunk-YPWIQAHX.js +3 -0
- package/dist/viewer/chunks/chunk-Z4ZDIMO2.js +136 -0
- package/dist/viewer/chunks/chunk-ZATQCNXH.js +1 -0
- package/dist/viewer/chunks/chunk-ZE5RDJX6.js +1 -0
- package/dist/viewer/chunks/chunk-ZO62R4L2.js +1 -0
- package/dist/viewer/chunks/classDiagram-v2-L25IHNXF-5F2M2CZ4.js +217 -0
- package/dist/viewer/chunks/cose-bilkent-JH36ORCC-S56HJ5WN.js +1 -0
- package/dist/viewer/chunks/cynefin-EF2NZ3EQ-6WY2NCLE.js +1 -0
- package/dist/viewer/chunks/cynefinDiagram-L36ESFBY-DE6PZNQA.js +62 -0
- package/dist/viewer/chunks/dagre-SPEB5RXH-QEOTKFV2.js +4 -0
- package/dist/viewer/chunks/diagram-3B7GL73J-RZPIU7FY.js +200 -0
- package/dist/viewer/chunks/diagram-DNEMPZML-YD26TJKC.js +24 -0
- package/dist/viewer/chunks/diagram-L3MUGCDN-TJUEX4QI.js +41 -0
- package/dist/viewer/chunks/diagram-LA4NIPWU-3PUQS6UW.js +24 -0
- package/dist/viewer/chunks/diagram-MHCOC4E2-YBTBD4PG.js +3 -0
- package/dist/viewer/chunks/diagram-XPFHEONP-VF2TQBNR.js +30 -0
- package/dist/viewer/chunks/ebnfDiagram-UZSYDL2S-QE7DIEME.js +1 -0
- package/dist/viewer/chunks/elk-XV6XMXQE-X5OZRIL3.js +27 -0
- package/dist/viewer/chunks/erDiagram-EYBAPDEH-5B2S7VB4.js +99 -0
- package/dist/viewer/chunks/eventmodeling-K75KTNOO-CHCQYZBI.js +1 -0
- package/dist/viewer/chunks/flowDiagram-MALGAFMO-XJFC5NTN.js +1 -0
- package/dist/viewer/chunks/ganttDiagram-23REXITY-TUUZ3QYO.js +292 -0
- package/dist/viewer/chunks/gitGraph-VSP46ZUC-VFZPJQ6A.js +1 -0
- package/dist/viewer/chunks/gitGraphDiagram-STJD7YCW-4CVV5LSH.js +106 -0
- package/dist/viewer/chunks/info-OHQRW6UA-P4744SJ6.js +1 -0
- package/dist/viewer/chunks/infoDiagram-KBXO4MBG-Q2WYYNNN.js +2 -0
- package/dist/viewer/chunks/ishikawaDiagram-M35NCXHK-PLQPTX2U.js +70 -0
- package/dist/viewer/chunks/journeyDiagram-OPLOXDXO-FB73RE6F.js +139 -0
- package/dist/viewer/chunks/kanban-definition-BZKZHSQY-6FU4TXYJ.js +89 -0
- package/dist/viewer/chunks/katex-IN4S3RHS.js +257 -0
- package/dist/viewer/chunks/mindmap-definition-I2QAS2VK-ZQ36ABVW.js +98 -0
- package/dist/viewer/chunks/packet-JDAUHWVQ-NYXIQQVA.js +1 -0
- package/dist/viewer/chunks/pegDiagram-FD4XPPHP-5XXVT6XN.js +1 -0
- package/dist/viewer/chunks/pie-XZMESJXO-32CUE6KZ.js +1 -0
- package/dist/viewer/chunks/pieDiagram-J4AKIIQI-WRTBDFM5.js +39 -0
- package/dist/viewer/chunks/quadrantDiagram-XTYBLID2-YPBDQIAK.js +7 -0
- package/dist/viewer/chunks/radar-ABXABTNO-272FILRO.js +1 -0
- package/dist/viewer/chunks/railroad-I3PHUGI6-6EGAH4XA.js +1 -0
- package/dist/viewer/chunks/railroad-abnf-LNEFI6M7-G6E7ATER.js +1 -0
- package/dist/viewer/chunks/railroad-ebnf-DWYD2UWJ-MR4P6BDR.js +1 -0
- package/dist/viewer/chunks/railroad-peg-JR7BVNR7-WXLQUGUO.js +1 -0
- package/dist/viewer/chunks/railroadDiagram-MRQ6NCDL-XHZQ2BLY.js +1 -0
- package/dist/viewer/chunks/requirementDiagram-Y7LWUY3S-W5FHRRML.js +84 -0
- package/dist/viewer/chunks/sankeyDiagram-WGJFYUXA-OJJIRVTI.js +40 -0
- package/dist/viewer/chunks/sequenceDiagram-5NDRBG5M-D6T4DRNG.js +169 -0
- package/dist/viewer/chunks/sizeCapture-INFHLROL-WL3FTUJX.js +1 -0
- package/dist/viewer/chunks/stateDiagram-v2-FJ4FJNEA-LAXL7KGG.js +291 -0
- package/dist/viewer/chunks/swimlanes-UMQ2AFYF-XIJBD726.js +1 -0
- package/dist/viewer/chunks/swimlanesDiagram-OMPLPG4O-7O7MHFW7.js +8 -0
- package/dist/viewer/chunks/timeline-definition-SEUHKTQE-BAZQA47I.js +120 -0
- package/dist/viewer/chunks/treeView-D4JQ5SDB-6YMDAAPA.js +1 -0
- package/dist/viewer/chunks/treemap-SAJKECNS-2X573PPS.js +1 -0
- package/dist/viewer/chunks/usecaseDiagram-AFA6YXN4-4YCEMWJB.js +370 -0
- package/dist/viewer/chunks/vennDiagram-NNMJR3RB-GEMROLAE.js +34 -0
- package/dist/viewer/chunks/wardley-7MLQ67FV-DGTGHYYC.js +1 -0
- package/dist/viewer/chunks/wardleyDiagram-S7YFUSEH-K4HVD3SS.js +78 -0
- package/dist/viewer/chunks/xychartDiagram-GGNKY7IX-HVLWCUEO.js +7 -0
- package/dist/viewer/mermaid.js +12 -0
- package/dist/viewer-build.json +1 -0
- package/dist/viewer-service.mjs +607 -0
- package/package.json +27 -8
- package/skills/rsp/SKILL.md +13 -10
- package/skills/rsp/references/architecture.md +39 -0
- package/skills/rsp/references/closeout.md +4 -4
- package/skills/rsp/references/durable-review.md +6 -9
- package/skills/rsp/references/focus-continuation.md +6 -2
- package/skills/rsp/references/setup-repair.md +11 -6
- package/skills/rsp/references/work-model.md +14 -4
- package/skills/rsp-commit/SKILL.md +2 -2
- package/skills/rsp-doc/SKILL.md +13 -10
- package/skills/rsp-doc/references/skill-authoring.md +2 -2
- package/skills/rsp-implement/SKILL.md +16 -12
- package/skills/rsp-review/SKILL.md +12 -12
- package/skills/rsp-review/references/code-review.md +11 -5
- package/skills/rsp-review/references/document-review.md +8 -10
- package/skills/rsp-shape/SKILL.md +3 -1
- package/skills/rsp-shape/references/planning.md +4 -4
- package/skills/rsp-verify/SKILL.md +9 -14
- package/skills/rsp-doc/references/artifact-lenses.md +0 -43
- package/skills/rsp-review/references/structural-review.md +0 -41
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import{a as le}from"./chunk-2VGDQLQD.js";import{a as he}from"./chunk-274PZN6B.js";import{b as ae,c as ce}from"./chunk-33XESOCS.js";import"./chunk-P44SH3OO.js";import"./chunk-JTW4SY4L.js";import"./chunk-T6DM5RSK.js";import"./chunk-PDXKDBIX.js";import"./chunk-OF62XRVM.js";import"./chunk-4PJNGS3V.js";import"./chunk-ZATQCNXH.js";import"./chunk-IAKC32WV.js";import"./chunk-KDUDYTWO.js";import"./chunk-MKDEK2LU.js";import"./chunk-VEMTQQ7Y.js";import"./chunk-NXHT5I2L.js";import{$ as C,C as re,F as oe,I as P,c as ie,d as ne,e as se,r as B}from"./chunk-MYJRFART.js";import{b as v}from"./chunk-3ZSL2TGQ.js";import{a as l}from"./chunk-ZE5RDJX6.js";import"./chunk-PHKIAKHS.js";var Y=(function(){var e=l(function(L,s,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=s);return i},"o"),r=[1,4],g=[1,13],c=[1,12],t=[1,15],h=[1,16],p=[1,20],m=[1,19],k=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],G={trace:l(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:l(function(s,i,o,a,f,n,$){var u=n.length-1;switch(f){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",n[u].id),a.addNode(n[u-1].length,n[u].id,n[u].descr,n[u].type);break;case 16:a.getLogger().trace("Icon: ",n[u]),a.decorateNode({icon:n[u]});break;case 17:case 21:a.decorateNode({class:n[u]});break;case 18:a.getLogger().trace("SPACELIST");break;case 19:a.getLogger().trace("Node: ",n[u].id),a.addNode(0,n[u].id,n[u].descr,n[u].type);break;case 20:a.decorateNode({icon:n[u]});break;case 25:a.getLogger().trace("node found ..",n[u-2]),this.$={id:n[u-1],descr:n[u-1],type:a.getType(n[u-2],n[u])};break;case 26:this.$={id:n[u],descr:n[u],type:a.nodeType.DEFAULT};break;case 27:a.getLogger().trace("node found ..",n[u-3]),this.$={id:n[u-3],descr:n[u-1],type:a.getType(n[u-2],n[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:g,7:[1,10],9:9,12:11,13:c,14:14,15:t,16:h,17:17,18:18,19:p,22:m},e(k,[2,3]),{1:[2,2]},e(k,[2,4]),e(k,[2,5]),{1:[2,6],6:g,12:21,13:c,14:14,15:t,16:h,17:17,18:18,19:p,22:m},{6:g,9:22,12:11,13:c,14:14,15:t,16:h,17:17,18:18,19:p,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:c,14:14,15:t,16:h,17:17,18:18,19:p,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],a=[],f=[null],n=[],$=this.table,u="",U=0,K=0,Q=0,ue=2,Z=1,pe=n.slice.call(arguments,1),y=Object.create(this.lexer),x={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(x.yy[j]=this.yy[j]);y.setInput(s,x.yy),x.yy.lexer=y,x.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var H=y.yylloc;n.push(H);var fe=y.options&&y.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(E){o.length=o.length-2*E,f.length=f.length-E,n.length=n.length-E}l(me,"popStack");function ee(){var E;return E=a.pop()||y.lex()||Z,typeof E!="number"&&(E instanceof Array&&(a=E,E=a.pop()),E=i.symbols_[E]||E),E}l(ee,"lex");for(var b,W,D,_,xe,z,O={},V,S,te,F;;){if(D=o[o.length-1],this.defaultActions[D]?_=this.defaultActions[D]:((b===null||typeof b>"u")&&(b=ee()),_=$[D]&&$[D][b]),typeof _>"u"||!_.length||!_[0]){var X="";F=[];for(V in $[D])this.terminals_[V]&&V>ue&&F.push("'"+this.terminals_[V]+"'");y.showPosition?X="Parse error on line "+(U+1)+`:
|
|
2
|
+
`+y.showPosition()+`
|
|
3
|
+
Expecting `+F.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(U+1)+": Unexpected "+(b==Z?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:H,expected:F})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+b);switch(_[0]){case 1:o.push(b),f.push(y.yytext),n.push(y.yylloc),o.push(_[1]),b=null,W?(b=W,W=null):(K=y.yyleng,u=y.yytext,U=y.yylineno,H=y.yylloc,Q>0&&Q--);break;case 2:if(S=this.productions_[_[1]][1],O.$=f[f.length-S],O._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},fe&&(O._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),z=this.performAction.apply(O,[u,K,U,x.yy,_[1],f,n].concat(pe)),typeof z<"u")return z;S&&(o=o.slice(0,-1*S*2),f=f.slice(0,-1*S),n=n.slice(0,-1*S)),o.push(this.productions_[_[1]][0]),f.push(O.$),n.push(O._$),te=$[o[o.length-2]][o[o.length-1]],o.push(te);break;case 3:return!0}}return!0},"parse")},ge=(function(){var L={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||this.yy||{},this._input=s,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:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=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),o.length-1&&(this.yylineno-=o.length-1);var f=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:o?(o.length===a.length?this.yylloc.first_column:0)+a[a.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+i+"^"},"showPosition"),test_match:l(function(s,i){var o,a,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),a=s[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var n in f)this[n]=f[n];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,a;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),n=0;n<f.length;n++)if(o=this._input.match(this.rules[f[n]]),o&&(!i||o[0].length>i[0].length)){if(i=o,a=n,this.options.backtrack_lexer){if(s=this.test_match(o,f[n]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,f[a]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var i=this.next();return i||this.lex()},"lex"),begin:l(function(i){this.conditionStack.push(i)},"begin"),popState:l(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:l(function(i){this.begin(i)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(i,o,a,f){var n=f;switch(a){case 0:return i.getLogger().trace("Found comment",o.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return i.getLogger().trace("Long description:",o.yytext),20;break;case 36:return i.getLogger().trace("Long description:",o.yytext),20;break}},"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}}};return L})();G.lexer=ge;function M(){this.yy={}}return l(M,"Parser"),M.prototype=G,G.Parser=M,new M})();Y.parser=Y;var ye=Y,de=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ke=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,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)}static{l(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let r=this.nodes.length-1;r>=0;r--)if(this.nodes[r].level<e)return this.nodes[r];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,r,g,c){v.info("addNode",e,r,g,c);let t=!1;this.nodes.length===0?(this.baseLevel=e,e=0,t=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,t=!1);let h=C(),p=h.mindmap?.padding??B.mindmap.padding;switch(c){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:p*=2;break}let m={id:this.count++,nodeId:P(r,h),level:e,descr:P(g,h),type:c,children:[],width:h.mindmap?.maxNodeWidth??B.mindmap.maxNodeWidth,padding:p,isRoot:t},k=this.getParent(e);if(k)k.children.push(m),this.nodes.push(m);else if(t)this.nodes.push(m);else throw new Error(`There can be only one root. No parent could be found for ("${m.descr}")`)}getType(e,r){switch(v.debug("In get type",e,r),e){case"[":return this.nodeType.RECT;case"(":return r===")"?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(e,r){this.elements[e]=r}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let r=C(),g=this.nodes[this.nodes.length-1];e.icon&&(g.icon=P(e.icon,r)),e.class&&(g.class=P(e.class,r))}type2Str(e){switch(e){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(e,r,g=0,c=!1){if(e.level===0?e.section=void 0:e.section=c?(g-1)%(de-1):r,e.children)for(let[t,h]of e.children.entries()){let p=e.level===0?t%(de-1):r;this.assignSections(h,p,g+1,c)}}flattenNodes(e,r){let g=C(),c=["mindmap-node"];e.isRoot===!0?c.push("section-root","section--1"):e.section!==void 0&&c.push(`section-${e.section}`),e.class&&c.push(e.class);let t=c.join(" "),h=l(m=>{let T=(g.theme?.toLowerCase()??"").includes("redux");switch(m){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return T?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),p={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:t,cssStyles:[],centerLabel:!0,look:g.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(r.push(p),e.children)for(let m of e.children)this.flattenNodes(m,r)}generateEdges(e,r){if(!e.children)return;let g=C();for(let c of e.children){let t="edge";c.section!==void 0&&(t+=` section-edge-${c.section}`);let h=e.level+1;t+=` edge-depth-${h}`;let p={id:`edge_${e.id}_${c.id}`,start:e.id.toString(),end:c.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:g.look,classes:t,depth:e.level,section:c.section};r.push(p),this.generateEdges(c,r)}}getData(){let e=this.getMindmap(),r=C(),c=oe().layout!==void 0,t=r;if(c||(t.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:t};v.debug("getData: mindmapRoot",e,r),this.assignSections(e,void 0,0,r.mindmap?.colorBy==="depth");let h=[],p=[];this.flattenNodes(e,h),this.generateEdges(e,p),v.debug(`getData: processed ${h.length} nodes and ${p.length} edges`);let m=new Map;for(let k of h)m.set(k.id,{shape:k.shape,width:k.width,height:k.height,padding:k.padding});return{nodes:h,edges:p,config:t,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(m),type:"mindmap"}}getLogger(){return v}},be=l(async(e,r,g,c)=>{v.debug(`Rendering mindmap diagram
|
|
7
|
+
`+e);let t=c.db,h=t.getData(),p=le(r,h.config.securityLevel);if(h.type=c.type,h.layoutAlgorithm=ce(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=r,!t.getMindmap())return;h.nodes.forEach(d=>{d.shape==="rounded"?(d.radius=15,d.taper=15,d.stroke="none",d.width=0,d.padding=15):d.shape==="circle"?d.padding=10:d.shape==="rect"?(d.width=0,d.padding=10):d.shape==="hexagon"&&(d.width=0,d.height=0)}),await ae(h,p);let{themeVariables:k}=re(),{useGradient:T,gradientStart:I,gradientStop:w}=k;if(T&&I&&w){let d=p.attr("id"),R=p.append("defs").append("linearGradient").attr("id",`${d}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");R.append("stop").attr("offset","0%").attr("stop-color",I).attr("stop-opacity",1),R.append("stop").attr("offset","100%").attr("stop-color",w).attr("stop-opacity",1)}he(p,h.config.mindmap?.padding??B.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??B.mindmap.useMaxWidth)},"draw"),Ee={draw:be},_e=l(e=>{let{theme:r,look:g}=e,c="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],ie(e["lineColor"+t])?e["lineColor"+t]=ne(e["lineColor"+t],20):e["lineColor"+t]=se(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let h=""+(g==="neo"?Math.max(10-(t-1)*2,2):17-3*t),p=r==="redux"||r==="redux-dark"?e.nodeBorder:e["cScaleLabel"+(r==="neutral"?1:t)];c+=`
|
|
8
|
+
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
|
|
9
|
+
fill: ${e["cScale"+t]};
|
|
10
|
+
}
|
|
11
|
+
.section-${t-1} text {
|
|
12
|
+
fill: ${e["cScaleLabel"+t]};
|
|
13
|
+
}
|
|
14
|
+
.section-${t-1} span {
|
|
15
|
+
color: ${e["cScaleLabel"+t]};
|
|
16
|
+
}
|
|
17
|
+
.node-icon-${t-1} {
|
|
18
|
+
font-size: 40px;
|
|
19
|
+
color: ${e["cScaleLabel"+t]};
|
|
20
|
+
}
|
|
21
|
+
.section-edge-${t-1}{
|
|
22
|
+
stroke: ${e["cScale"+t]};
|
|
23
|
+
}
|
|
24
|
+
.edge-depth-${t-1}{
|
|
25
|
+
stroke-width: ${h};
|
|
26
|
+
}
|
|
27
|
+
.section-${t-1} line {
|
|
28
|
+
stroke: ${e["cScaleInv"+t]} ;
|
|
29
|
+
stroke-width: 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
[data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
|
|
39
|
+
fill: ${r==="redux"||r==="redux-dark"||r==="neutral"?e.mainBkg:e["cScale"+t]};
|
|
40
|
+
stroke: ${r==="redux"||r==="redux-dark"?e.nodeBorder:e["cScale"+t]};
|
|
41
|
+
stroke-width: ${e.strokeWidth??2}px;
|
|
42
|
+
}
|
|
43
|
+
[data-look="neo"].section-edge-${t-1}{
|
|
44
|
+
stroke: ${r?.includes("redux")||r==="neo-dark"?e.nodeBorder:e["cScale"+t]};
|
|
45
|
+
}
|
|
46
|
+
[data-look="neo"].mindmap-node.section-${t-1} text, [data-look="neo"].mindmap-node.section-${t-1} span {
|
|
47
|
+
fill: ${p};
|
|
48
|
+
color: ${p};
|
|
49
|
+
}
|
|
50
|
+
`}return c},"genSections"),Se=l((e,r,g)=>{let c="";for(let t=0;t<e;t++)c+=`
|
|
51
|
+
[data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
|
|
52
|
+
stroke: url(${r}-gradient);
|
|
53
|
+
fill: ${g};
|
|
54
|
+
}
|
|
55
|
+
.section-${t-1} line {
|
|
56
|
+
stroke-width: 0;
|
|
57
|
+
}`;return c},"genGradient"),Ne=l(e=>{let{theme:r}=e,g=e.svgId,c=r?.includes("redux")?e.nodeBorder:e["cScaleLabel"+(r==="neutral"?1:0)],t=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${g}-drop-shadow)`):"none";return`
|
|
58
|
+
.edge {
|
|
59
|
+
stroke-width: 3;
|
|
60
|
+
}
|
|
61
|
+
${_e(e)}
|
|
62
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
|
+
fill: ${e.git0};
|
|
64
|
+
}
|
|
65
|
+
.section-root text {
|
|
66
|
+
fill: ${e.gitBranchLabel0};
|
|
67
|
+
}
|
|
68
|
+
.section-root span {
|
|
69
|
+
color: ${r?.includes("redux")?e.nodeBorder:e.gitBranchLabel0};
|
|
70
|
+
}
|
|
71
|
+
.icon-container {
|
|
72
|
+
height:100%;
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
.edge {
|
|
78
|
+
fill: none;
|
|
79
|
+
}
|
|
80
|
+
.mindmap-node-label {
|
|
81
|
+
dy: 1em;
|
|
82
|
+
alignment-baseline: middle;
|
|
83
|
+
text-anchor: middle;
|
|
84
|
+
dominant-baseline: middle;
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
[data-look="neo"].mindmap-node {
|
|
88
|
+
filter: ${t};
|
|
89
|
+
}
|
|
90
|
+
[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 {
|
|
91
|
+
fill: ${r?.includes("redux")?e.mainBkg:e.git0};
|
|
92
|
+
}
|
|
93
|
+
[data-look="neo"].mindmap-node.section-root .text-inner-tspan, [data-look="neo"].mindmap-node.section-root span {
|
|
94
|
+
fill: ${c};
|
|
95
|
+
color: ${c};
|
|
96
|
+
}
|
|
97
|
+
${e.useGradient&&g&&e.mainBkg?Se(e.THEME_COLOR_LIMIT,g,e.mainBkg):""}
|
|
98
|
+
`},"getStyles"),Le=Ne,je={get db(){return new ke},renderer:Ee,parser:ye,styles:Le};export{je as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as r}from"./chunk-ONCOEVBS.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{e as PacketModule,r as createPacketServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b as m,c as p}from"./chunk-RC2NPHSX.js";import{a as s}from"./chunk-LEGNM6PH.js";import{b as l}from"./chunk-YPWIQAHX.js";import{b as i}from"./chunk-PJDMAGPE.js";import"./chunk-DN4Y7LXJ.js";import"./chunk-H4YEV7VR.js";import"./chunk-JZV675LF.js";import"./chunk-E2UQN267.js";import"./chunk-CZIM56BV.js";import"./chunk-6QRHYJ5Q.js";import"./chunk-GBARLDDT.js";import"./chunk-6RCFKBVR.js";import"./chunk-AKHBD6LT.js";import"./chunk-U5STX66M.js";import"./chunk-HUVVDQHZ.js";import"./chunk-432I4U3B.js";import"./chunk-ONCOEVBS.js";import"./chunk-WKCPBR3C.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-UX2S3LP3.js";import"./chunk-MYJRFART.js";import{b as n}from"./chunk-3ZSL2TGQ.js";import{a as t}from"./chunk-ZE5RDJX6.js";import"./chunk-PHKIAKHS.js";var f=i().RailroadPeg.parser.LangiumParser,c=t(e=>{let r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{let r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{let r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${u(r)}`:`!${u(r)}`}:r},"transformPrefix"),u=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{let r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return c(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:c(e.definition)}),"transformRule"),h=t(e=>{s(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),n.debug("[PEG Parser] Starting Langium parse");let r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new l(r);let o=r.value;n.debug("[PEG Parser] Parsed rules:",o.rules.length),h(o),n.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},R={parser:b,db:a,renderer:p,styles:m};export{R as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as r}from"./chunk-WKCPBR3C.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{e as PieModule,r as createPieServices};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{a as ot}from"./chunk-LEGNM6PH.js";import{w as tt}from"./chunk-UIAJQPOF.js";import{a as nt}from"./chunk-YPWIQAHX.js";import"./chunk-PJDMAGPE.js";import"./chunk-DN4Y7LXJ.js";import"./chunk-H4YEV7VR.js";import"./chunk-JZV675LF.js";import"./chunk-E2UQN267.js";import"./chunk-CZIM56BV.js";import"./chunk-6QRHYJ5Q.js";import"./chunk-GBARLDDT.js";import"./chunk-6RCFKBVR.js";import"./chunk-AKHBD6LT.js";import"./chunk-U5STX66M.js";import"./chunk-HUVVDQHZ.js";import"./chunk-432I4U3B.js";import"./chunk-ONCOEVBS.js";import"./chunk-WKCPBR3C.js";import"./chunk-Z4ZDIMO2.js";import{a as it}from"./chunk-UX2S3LP3.js";import{o as at,p as rt}from"./chunk-VEMTQQ7Y.js";import{b as R,e as et}from"./chunk-NXHT5I2L.js";import{$ as Y,P as V,U as X,V as Z,W as j,X as q,Y as J,Z as K,_ as Q,r as U}from"./chunk-MYJRFART.js";import{b as T}from"./chunk-3ZSL2TGQ.js";import{a as l}from"./chunk-ZE5RDJX6.js";import"./chunk-PHKIAKHS.js";var lt=U.pie,L={sections:new Map,showData:!1,config:lt},b=L.sections,O=L.showData,St=structuredClone(lt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,O=L.showData,X()},"clear"),Ct=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),T.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),$t=l(()=>b,"getSections"),Dt=l(t=>{O=t},"setShowData"),yt=l(()=>O,"getShowData"),st={getConfig:xt,clear:wt,setDiagramTitle:K,getDiagramTitle:Q,setAccTitle:Z,getAccTitle:j,setAccDescription:q,getAccDescription:J,addSection:Ct,getSections:$t,setShowData:Dt,getShowData:yt},Tt=l((t,a)=>{ot(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),bt={parse:l(async t=>{let a=await nt("pie",t);T.debug(a),Tt(a,st)},"parse")},At=l(t=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${t.pieStrokeColor};
|
|
4
|
+
stroke-width : ${t.pieStrokeWidth};
|
|
5
|
+
opacity : ${t.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieCircle.highlighted{
|
|
8
|
+
scale: 1.05;
|
|
9
|
+
opacity: 1;
|
|
10
|
+
}
|
|
11
|
+
.pieCircle.highlightedOnHover:hover{
|
|
12
|
+
transition-duration: 250ms;
|
|
13
|
+
scale: 1.05;
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
.pieOuterCircle{
|
|
17
|
+
stroke: ${t.pieOuterStrokeColor};
|
|
18
|
+
stroke-width: ${t.pieOuterStrokeWidth};
|
|
19
|
+
fill: none;
|
|
20
|
+
}
|
|
21
|
+
.pieTitleText {
|
|
22
|
+
text-anchor: middle;
|
|
23
|
+
font-size: ${t.pieTitleTextSize};
|
|
24
|
+
fill: ${t.pieTitleTextColor};
|
|
25
|
+
font-family: ${t.fontFamily};
|
|
26
|
+
}
|
|
27
|
+
.slice {
|
|
28
|
+
font-family: ${t.fontFamily};
|
|
29
|
+
fill: ${t.pieSectionTextColor};
|
|
30
|
+
font-size:${t.pieSectionTextSize};
|
|
31
|
+
// fill: white;
|
|
32
|
+
}
|
|
33
|
+
.legend text {
|
|
34
|
+
fill: ${t.pieLegendTextColor};
|
|
35
|
+
font-family: ${t.fontFamily};
|
|
36
|
+
font-size: ${t.pieLegendTextSize};
|
|
37
|
+
}
|
|
38
|
+
`,"getStyles"),kt=At,_t=l(t=>{let a=[...t.values()].reduce((n,m)=>n+m,0),W=[...t.entries()].map(([n,m])=>({label:n,value:m})).filter(n=>n.value/a*100>=1);return et().value(n=>n.value).sort(null)(W)},"createPieArcs"),zt=l((t,a,W,F)=>{T.debug(`rendering pie chart
|
|
39
|
+
`+t);let n=F.db,m=Y(),h=rt(n.getConfig(),m.pie),H=40,i=18,c=4,S=450,x=S,A=it(a),$=A.append("g");$.attr("transform","translate("+x/2+","+S/2+")");let{themeVariables:o}=m,[M]=at(o.pieOuterStrokeWidth);M??=2;let ct=h.legendPosition,P=h.textPosition,dt=h.donutHole>0&&h.donutHole<=.9?h.donutHole:0,f=Math.min(x,S)/2-H,gt=R().innerRadius(dt*f).outerRadius(f),pt=R().innerRadius(f*P).outerRadius(f*P),w=$.append("g");w.append("circle").attr("cx",0).attr("cy",0).attr("r",f+M/2).attr("class","pieOuterCircle");let D=n.getSections(),ht=_t(D),ft=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12],k=0;D.forEach(e=>{k+=e});let G=ht.filter(e=>(e.data.value/k*100).toFixed(0)!=="0"),_=tt(ft).domain([...D.keys()]);w.selectAll("mySlices").data(G).enter().append("path").attr("d",gt).attr("fill",e=>_(e.data.label)).attr("class",e=>{let r="pieCircle";return h.highlightSlice==="hover"?r+=" highlightedOnHover":h.highlightSlice===e.data.label&&(r+=" highlighted"),r}),w.selectAll("mySlices").data(G).enter().append("text").text(e=>(e.data.value/k*100).toFixed(0)+"%").attr("transform",e=>"translate("+pt.centroid(e)+")").style("text-anchor","middle").attr("class","slice");let ut=$.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-(S-50)/2).attr("class","pieTitleText"),C=[...D.entries()].map(([e,r])=>({label:e,value:r})),u=$.selectAll(".legend").data(C).enter().append("g").attr("class","legend");u.append("rect").attr("width",i).attr("height",i).style("fill",e=>_(e.label)).style("stroke",e=>_(e.label)),u.append("text").attr("x",i+c).attr("y",i-c).text(e=>n.getShowData()?`${e.label} [${e.value}]`:e.label);let v=Math.max(...u.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),y=S,z=x+H,s=i+c,E=C.length*s;switch(ct){case"center":u.attr("transform",(e,r)=>{let d=s*C.length/2,g=-v/2-(i+c),p=r*s-d;return"translate("+g+","+p+")"});break;case"top":y+=E,u.attr("transform",(e,r)=>{let d=f,g=-v/2-(i+c),p=r*s-d;return`translate(${g}, ${p})`}),w.attr("transform",()=>`translate(0, ${E+s})`);break;case"bottom":y+=E,u.attr("transform",(e,r)=>{let d=-f-s,g=-v/2-(i+c),p=r*s-d;return"translate("+g+","+p+")"});break;case"left":z+=i+c+v,u.attr("transform",(e,r)=>{let d=s*C.length/2,g=-f-(i+c),p=r*s-d;return"translate("+g+","+p+")"}),w.attr("transform",()=>`translate(${v+i+c}, 0)`);break;default:z+=i+c+v,u.attr("transform",(e,r)=>{let d=s*C.length/2,g=12*i,p=r*s-d;return"translate("+g+","+p+")"});break}let B=ut.node()?.getBoundingClientRect().width??0,mt=x/2-B/2,vt=x/2+B/2,N=Math.min(0,mt),I=Math.max(z,vt)-N;A.attr("viewBox",`${N} 0 ${I} ${y}`),V(A,y,I,h.useMaxWidth)},"draw"),Et={draw:zt},Bt={parser:bt,db:st,renderer:Et,styles:kt};export{Bt as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{y as Dt}from"./chunk-UIAJQPOF.js";import{$ as Tt,I as re,P as se,U as oe,V as le,W as he,X as ce,Y as de,Z as ue,_ as Et,p as ne,r as D}from"./chunk-MYJRFART.js";import{b as ct,d as mt}from"./chunk-3ZSL2TGQ.js";import{a as s}from"./chunk-ZE5RDJX6.js";import"./chunk-PHKIAKHS.js";var zt=(function(){var t=s(function(Y,r,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=r);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],k=[2,36],m=[1,37],q=[1,36],y=[1,38],b=[1,35],T=[1,43],g=[1,41],A=[1,45],dt=[1,14],ut=[1,23],xt=[1,18],ft=[1,19],ot=[1,20],St=[1,21],lt=[1,22],i=[1,24],It=[1,25],wt=[1,26],Bt=[1,27],Rt=[1,28],Nt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Wt=[1,66],Ut=[1,67],Qt=[1,68],Ot=[1,69],Ht=[1,70],Xt=[1,71],Mt=[1,72],Yt=[1,73],jt=[1,74],Gt=[1,75],Kt=[1,76],Zt=[1,77],B=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],rt=[1,99],_t=[1,103],Jt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],At={trace:s(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],[58,1],[59,1],[59,1],[59,1]],performAction:s(function(r,l,u,d,S,e,ht){var n=e.length-1;switch(S){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" \u27F6 ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" \u27F6 ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:q,10:y,12:b,13:T,14:g,15:A,18:dt,25:ut,35:xt,37:ft,39:ot,41:St,42:lt,48:i,50:It,51:wt,52:Bt,53:Rt,54:Nt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:q,10:y,12:b,13:T,14:g,15:A,18:dt,25:ut,35:xt,37:ft,39:ot,41:St,42:lt,48:i,50:It,51:wt,52:Bt,53:Rt,54:Nt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Wt,5:Ut,6:Qt,7:Ot,8:Ht,9:Xt,10:Mt,11:Yt,12:jt,13:Gt,14:Kt,15:Zt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Wt,5:Ut,6:Qt,7:Ot,8:Ht,9:Xt,10:Mt,11:Yt,12:jt,13:Gt,14:Kt,15:Zt,18:[1,82]},t(B,[2,23]),t(B,[2,1]),t(B,[2,2]),t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(B,[2,11]),t(B,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:q,10:y,12:b,13:T,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:q,10:y,12:b,13:T,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:rt,22:89,23:88},t(B,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt}),{46:[1,102]},t(c,[2,29],{10:_t}),t(Jt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:_t}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:rt,22:106},t(N,[2,26]),t(c,[2,50],{10:_t}),t(Jt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt})],defaultActions:{8:[2,30],9:[2,31]},parseError:s(function(r,l){if(l.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=l,u}},"parseError"),parse:s(function(r){var l=this,u=[0],d=[],S=[null],e=[],ht=this.table,n="",pt=0,$t=0,te=0,Ce=2,ee=1,Le=e.slice.call(arguments,1),z=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);z.setInput(r,j.yy),j.yy.lexer=z,j.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var Pt=z.yylloc;e.push(Pt);var Ee=z.options&&z.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(R){u.length=u.length-2*R,S.length=S.length-R,e.length=e.length-R}s(De,"popStack");function ie(){var R;return R=d.pop()||z.lex()||ee,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}s(ie,"lex");for(var I,vt,G,W,Ne,Ct,st={},yt,M,ae,bt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=ie()),W=ht[G]&&ht[G][I]),typeof W>"u"||!W.length||!W[0]){var Lt="";bt=[];for(yt in ht[G])this.terminals_[yt]&&yt>Ce&&bt.push("'"+this.terminals_[yt]+"'");z.showPosition?Lt="Parse error on line "+(pt+1)+`:
|
|
2
|
+
`+z.showPosition()+`
|
|
3
|
+
Expecting `+bt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Lt="Parse error on line "+(pt+1)+": Unexpected "+(I==ee?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Lt,{text:z.match,token:this.terminals_[I]||I,line:z.yylineno,loc:Pt,expected:bt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(W[0]){case 1:u.push(I),S.push(z.yytext),e.push(z.yylloc),u.push(W[1]),I=null,vt?(I=vt,vt=null):($t=z.yyleng,n=z.yytext,pt=z.yylineno,Pt=z.yylloc,te>0&&te--);break;case 2:if(M=this.productions_[W[1]][1],st.$=S[S.length-M],st._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Ee&&(st._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ct=this.performAction.apply(st,[n,$t,pt,j.yy,W[1],S,e].concat(Le)),typeof Ct<"u")return Ct;M&&(u=u.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),S.push(st.$),e.push(st._$),ae=ht[u[u.length-2]][u[u.length-1]],u.push(ae);break;case 3:return!0}}return!0},"parse")},ve=(function(){var Y={EOF:1,parseError:s(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:s(function(r,l){return this.yy=l||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var l=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),u.length-1&&(this.yylineno-=u.length-1);var S=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:s(function(r,l){var u,d,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),d=r[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],u=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,u,d;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(u=this._input.match(this.rules[S[e]]),u&&(!l||u[0].length>l[0].length)){if(l=u,d=e,this.options.backtrack_lexer){if(r=this.test_match(u,S[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,S[d]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var l=this.next();return l||this.lex()},"lex"),begin:s(function(l){this.conditionStack.push(l)},"begin"),popState:s(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:s(function(l){this.begin(l)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(l,u,d,S){var e=S;switch(d){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11: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 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52: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,/^(?:[^\x00-\x7F]+)/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,52],inclusive:!0}}};return Y})();At.lexer=ve;function gt(){this.yy={}}return s(gt,"Parser"),gt.prototype=At,At.Parser=gt,new gt})();zt.parser=zt;var ze=zt,w=ne(),Ve=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{s(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:D.quadrantChart?.chartWidth||500,chartWidth:D.quadrantChart?.chartHeight||500,titlePadding:D.quadrantChart?.titlePadding||10,titleFontSize:D.quadrantChart?.titleFontSize||20,quadrantPadding:D.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:D.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:D.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:D.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:D.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:D.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:D.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:D.quadrantChart?.pointTextPadding||5,pointLabelFontSize:D.quadrantChart?.pointLabelFontSize||12,pointRadius:D.quadrantChart?.pointRadius||5,xAxisPosition:D.quadrantChart?.xAxisPosition||"top",yAxisPosition:D.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:D.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:D.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:w.quadrant1Fill,quadrant2Fill:w.quadrant2Fill,quadrant3Fill:w.quadrant3Fill,quadrant4Fill:w.quadrant4Fill,quadrant1TextFill:w.quadrant1TextFill,quadrant2TextFill:w.quadrant2TextFill,quadrant3TextFill:w.quadrant3TextFill,quadrant4TextFill:w.quadrant4TextFill,quadrantPointFill:w.quadrantPointFill,quadrantPointTextFill:w.quadrantPointTextFill,quadrantXAxisTextFill:w.quadrantXAxisTextFill,quadrantYAxisTextFill:w.quadrantYAxisTextFill,quadrantTitleFill:w.quadrantTitleFill,quadrantInternalBorderStrokeFill:w.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:w.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,ct.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,a){this.classes.set(t,a)}setConfig(t){ct.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){ct.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,a,p,f){let o=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,x={top:t==="top"&&a?o:0,bottom:t==="bottom"&&a?o:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,h={left:this.config.yAxisPosition==="left"&&p?_:0,right:this.config.yAxisPosition==="right"&&p?_:0},c=this.config.titleFontSize+this.config.titlePadding*2,k={top:f?c:0},m=this.config.quadrantPadding+h.left,q=this.config.quadrantPadding+x.top+k.top,y=this.config.chartWidth-this.config.quadrantPadding*2-h.left-h.right,b=this.config.chartHeight-this.config.quadrantPadding*2-x.top-x.bottom-k.top,T=y/2,g=b/2;return{xAxisSpace:x,yAxisSpace:h,titleSpace:k,quadrantSpace:{quadrantLeft:m,quadrantTop:q,quadrantWidth:y,quadrantHalfWidth:T,quadrantHeight:b,quadrantHalfHeight:g}}}getAxisLabels(t,a,p,f){let{quadrantSpace:o,titleSpace:x}=f,{quadrantHalfHeight:_,quadrantHeight:h,quadrantLeft:c,quadrantHalfWidth:k,quadrantTop:m,quadrantWidth:q}=o,y=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,T=[];return this.data.xAxisLeftText&&a&&T.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(y?k/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+m+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&a&&T.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+k+(y?k/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+m+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&p&&T.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+q+this.config.quadrantPadding,y:m+h-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&p&&T.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+q+this.config.quadrantPadding,y:m+_-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),T}getQuadrants(t){let{quadrantSpace:a}=t,{quadrantHalfHeight:p,quadrantLeft:f,quadrantHalfWidth:o,quadrantTop:x}=a,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f+o,y:x,width:o,height:p,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:f,y:x,width:o,height:p,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:f,y:x+p,width:o,height:p,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:f+o,y:x+p,width:o,height:p,fill:this.themeConfig.quadrant4Fill}];for(let h of _)h.text.x=h.x+h.width/2,this.data.points.length===0?(h.text.y=h.y+h.height/2,h.text.horizontalPos="middle"):(h.text.y=h.y+this.config.quadrantTextTopPadding,h.text.horizontalPos="top");return _}getQuadrantPoints(t){let{quadrantSpace:a}=t,{quadrantHeight:p,quadrantLeft:f,quadrantTop:o,quadrantWidth:x}=a,_=Dt().domain([0,1]).range([f,x+f]),h=Dt().domain([0,1]).range([p+o,o]);return this.data.points.map(k=>{let m=this.classes.get(k.className);return m&&(k={...m,...k}),{x:_(k.x),y:h(k.y),fill:k.color??this.themeConfig.quadrantPointFill,radius:k.radius??this.config.pointRadius,text:{text:k.text,fill:this.themeConfig.quadrantPointTextFill,x:_(k.x),y:h(k.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:k.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:k.strokeWidth??"0px"}})}getBorders(t){let a=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:p}=t,{quadrantHalfHeight:f,quadrantHeight:o,quadrantLeft:x,quadrantHalfWidth:_,quadrantTop:h,quadrantWidth:c}=p;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h,x2:x+c+a,y2:h},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x+c,y1:h+a,x2:x+c,y2:h+o-a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h+o,x2:x+c+a,y2:h+o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x,y1:h+a,x2:x,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+_,y1:h+a,x2:x+_,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+a,y1:h+f,x2:x+c-a,y2:h+f}]}getTitle(t){if(t)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(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),a=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),p=this.config.showTitle&&!!this.data.titleText,f=this.data.points.length>0?"bottom":this.config.xAxisPosition,o=this.calculateSpace(f,t,a,p);return{points:this.getQuadrantPoints(o),quadrants:this.getQuadrants(o),axisLabels:this.getAxisLabels(f,t,a,o),borderLines:this.getBorders(o),title:this.getTitle(p)}}},qt=class extends Error{static{s(this,"InvalidStyleError")}constructor(t,a,p){super(`value for ${t} ${a} is invalid, please use a valid ${p}`),this.name="InvalidStyleError"}};function Vt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}s(Vt,"validateHexCode");function xe(t){return!/^\d+$/.test(t)}s(xe,"validateNumber");function fe(t){return!/^\d+px$/.test(t)}s(fe,"validateSizeInPixels");function O(t){return re(t.trim(),Tt())}s(O,"textSanitizer");var V=new Ve;function ge(t){V.setData({quadrant1Text:O(t.text)})}s(ge,"setQuadrant1Text");function pe(t){V.setData({quadrant2Text:O(t.text)})}s(pe,"setQuadrant2Text");function ye(t){V.setData({quadrant3Text:O(t.text)})}s(ye,"setQuadrant3Text");function be(t){V.setData({quadrant4Text:O(t.text)})}s(be,"setQuadrant4Text");function Te(t){V.setData({xAxisLeftText:O(t.text)})}s(Te,"setXAxisLeftText");function me(t){V.setData({xAxisRightText:O(t.text)})}s(me,"setXAxisRightText");function qe(t){V.setData({yAxisTopText:O(t.text)})}s(qe,"setYAxisTopText");function ke(t){V.setData({yAxisBottomText:O(t.text)})}s(ke,"setYAxisBottomText");function kt(t){let a={};for(let p of t){let[f,o]=p.trim().split(/\s*:\s*/);if(f==="radius"){if(xe(o))throw new qt(f,o,"number");a.radius=parseInt(o)}else if(f==="color"){if(Vt(o))throw new qt(f,o,"hex code");a.color=o}else if(f==="stroke-color"){if(Vt(o))throw new qt(f,o,"hex code");a.strokeColor=o}else if(f==="stroke-width"){if(fe(o))throw new qt(f,o,"number of pixels (eg. 10px)");a.strokeWidth=o}else throw new Error(`style named ${f} is not supported.`)}return a}s(kt,"parseStyles");function Se(t,a,p,f,o){let x=kt(o);V.addPoints([{x:p,y:f,text:O(t.text),className:a,...x}])}s(Se,"addPoint");function _e(t,a){V.addClass(t,kt(a))}s(_e,"addClass");function Ae(t){V.setConfig({chartWidth:t})}s(Ae,"setWidth");function Fe(t){V.setConfig({chartHeight:t})}s(Fe,"setHeight");function Pe(){let t=Tt(),{themeVariables:a,quadrantChart:p}=t;return p&&V.setConfig(p),V.setThemeConfig({quadrant1Fill:a.quadrant1Fill,quadrant2Fill:a.quadrant2Fill,quadrant3Fill:a.quadrant3Fill,quadrant4Fill:a.quadrant4Fill,quadrant1TextFill:a.quadrant1TextFill,quadrant2TextFill:a.quadrant2TextFill,quadrant3TextFill:a.quadrant3TextFill,quadrant4TextFill:a.quadrant4TextFill,quadrantPointFill:a.quadrantPointFill,quadrantPointTextFill:a.quadrantPointTextFill,quadrantXAxisTextFill:a.quadrantXAxisTextFill,quadrantYAxisTextFill:a.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:a.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:a.quadrantInternalBorderStrokeFill,quadrantTitleFill:a.quadrantTitleFill}),V.setData({titleText:Et()}),V.build()}s(Pe,"getQuadrantData");var Ie=s(function(){V.clear(),oe()},"clear"),we={setWidth:Ae,setHeight:Fe,setQuadrant1Text:ge,setQuadrant2Text:pe,setQuadrant3Text:ye,setQuadrant4Text:be,setXAxisLeftText:Te,setXAxisRightText:me,setYAxisTopText:qe,setYAxisBottomText:ke,parseStyles:kt,addPoint:Se,addClass:_e,getQuadrantData:Pe,clear:Ie,setAccTitle:le,getAccTitle:he,setDiagramTitle:ue,getDiagramTitle:Et,getAccDescription:de,setAccDescription:ce},Be=s((t,a,p,f)=>{function o(i){return i==="top"?"hanging":"middle"}s(o,"getDominantBaseLine");function x(i){return i==="left"?"start":"middle"}s(x,"getTextAnchor");function _(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}s(_,"getTransformation");let h=Tt();ct.debug(`Rendering quadrant chart
|
|
7
|
+
`+t);let c=h.securityLevel,k;c==="sandbox"&&(k=mt("#i"+a));let q=(c==="sandbox"?mt(k.nodes()[0].contentDocument.body):mt("body")).select(`[id="${a}"]`),y=q.append("g").attr("class","main"),b=h.quadrantChart?.chartWidth??500,T=h.quadrantChart?.chartHeight??500;se(q,T,b,h.quadrantChart?.useMaxWidth??!0),q.attr("viewBox","0 0 "+b+" "+T),f.db.setHeight(T),f.db.setWidth(b);let g=f.db.getQuadrantData(),A=y.append("g").attr("class","quadrants"),dt=y.append("g").attr("class","border"),ut=y.append("g").attr("class","data-points"),xt=y.append("g").attr("class","labels"),ft=y.append("g").attr("class","title");g.title&&ft.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",o(g.title.horizontalPos)).attr("text-anchor",x(g.title.verticalPos)).attr("transform",_(g.title)).text(g.title.text),g.borderLines&&dt.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);let ot=A.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");ot.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ot.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>o(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>_(i.text)).text(i=>i.text.text),xt.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>o(i.horizontalPos)).attr("text-anchor",i=>x(i.verticalPos)).attr("transform",i=>_(i));let lt=ut.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");lt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),lt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>o(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>_(i.text))},"draw"),Re={draw:Be},Xe={parser:ze,db:we,renderer:Re,styles:s(()=>"","styles")};export{Xe as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,b as e}from"./chunk-6RCFKBVR.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{r as RadarModule,e as createRadarServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,b as o}from"./chunk-AKHBD6LT.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{r as RailroadModule,o as createRailroadServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,b as o}from"./chunk-HUVVDQHZ.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{r as RailroadAbnfModule,o as createRailroadAbnfServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,b as o}from"./chunk-U5STX66M.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{r as RailroadEbnfModule,o as createRailroadEbnfServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as r}from"./chunk-PJDMAGPE.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-PHKIAKHS.js";export{e as RailroadPegModule,r as createRailroadPegServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b as p,c as u}from"./chunk-RC2NPHSX.js";import{a as l}from"./chunk-LEGNM6PH.js";import{b as m}from"./chunk-YPWIQAHX.js";import"./chunk-PJDMAGPE.js";import"./chunk-DN4Y7LXJ.js";import"./chunk-H4YEV7VR.js";import"./chunk-JZV675LF.js";import"./chunk-E2UQN267.js";import"./chunk-CZIM56BV.js";import"./chunk-6QRHYJ5Q.js";import"./chunk-GBARLDDT.js";import"./chunk-6RCFKBVR.js";import{b as s}from"./chunk-AKHBD6LT.js";import"./chunk-U5STX66M.js";import"./chunk-HUVVDQHZ.js";import"./chunk-432I4U3B.js";import"./chunk-ONCOEVBS.js";import"./chunk-WKCPBR3C.js";import"./chunk-Z4ZDIMO2.js";import"./chunk-UX2S3LP3.js";import"./chunk-MYJRFART.js";import{b as i}from"./chunk-3ZSL2TGQ.js";import{a as n}from"./chunk-ZE5RDJX6.js";import"./chunk-PHKIAKHS.js";var d=s().Railroad.parser.LangiumParser,t=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let r=e.elements.map(t);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{let r=e.alternatives.map(t);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:t(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:t(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:t(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:t(e.definition)}),"transformRule"),f=n(e=>{l(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(c(r)))},"populateDb"),g={parse:n(e=>{a.clear(),i.debug("[Railroad Parser] Starting Langium parse");let r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new m(r);let o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),f(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:a}},y={parser:g,db:a,renderer:u,styles:p},w=y;export{w as default,y as diagram};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{a as at}from"./chunk-2VGDQLQD.js";import{a as lt}from"./chunk-274PZN6B.js";import{b as rt,c as nt}from"./chunk-33XESOCS.js";import"./chunk-P44SH3OO.js";import"./chunk-JTW4SY4L.js";import"./chunk-T6DM5RSK.js";import"./chunk-PDXKDBIX.js";import"./chunk-OF62XRVM.js";import"./chunk-4PJNGS3V.js";import"./chunk-ZATQCNXH.js";import"./chunk-IAKC32WV.js";import"./chunk-KDUDYTWO.js";import{b as et,c as tt,d as st,e as it}from"./chunk-MKDEK2LU.js";import{q as Ze}from"./chunk-VEMTQQ7Y.js";import"./chunk-NXHT5I2L.js";import{$ as ye,C as Ce,U as Ke,V as We,W as je,X as Ge,Y as ze,Z as Xe,_ as Je}from"./chunk-MYJRFART.js";import{b as ge}from"./chunk-3ZSL2TGQ.js";import{a as u,b as He}from"./chunk-ZE5RDJX6.js";import"./chunk-PHKIAKHS.js";var Ae=(function(){var e=u(function($,r,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=r);return n},"o"),m=[1,3],h=[1,4],c=[1,5],i=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],k=[1,22],S=[2,7],d=[1,26],g=[1,27],y=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],E=[1,39],b=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],ve=[1,70],Le=[1,71],xe=[1,72],we=[1,73],De=[1,74],Oe=[1,75],Me=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Fe=[1,101],$e=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],ce=[1,116],he=[1,117],ue=[1,114],me=[1,115],_e={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(r,n,l,s,f,t,fe){var a=t.length-1;switch(f){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:m,9:h,11:c,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:m,9:h,11:c,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:m,9:h,11:c,13:i},{1:[2,2]},{4:17,5:k,7:13,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:k,7:42,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:43,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:44,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:45,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:46,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:47,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:48,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:49,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{4:17,5:k,7:50,8:S,9:h,11:c,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:g,23:y,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:E,90:b},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:E,90:b},{30:63,33:62,75:P,89:E,90:b},{30:64,33:62,75:P,89:E,90:b},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:ve,66:Le,67:xe,68:we,69:De,70:Oe,71:Me},{62:77,65:ve,66:Le,67:xe,68:we,69:De,70:Oe,71:Me},{30:78,33:62,75:P,89:E,90:b},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:oe},{30:94,33:62,75:P,76:U,89:E,90:b},{5:[1,95]},{30:96,33:62,75:P,89:E,90:b},{5:[1,97]},{30:98,33:62,75:P,89:E,90:b},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Fe}),{33:103,75:[1,102],89:E,90:b},e($e,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Fe}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:ce,40:he,56:113,57:ue,59:me},{27:[1,118],76:U},{33:119,89:E,90:b},{33:120,89:E,90:b},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:ce,40:he,56:130,57:ue,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e($e,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:oe}),{33:132,89:E,90:b},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:ce,40:he,56:152,57:ue,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:ce,40:he,56:163,57:ue,59:me},{5:ce,40:he,56:164,57:ue,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:u(function(r){var n=this,l=[0],s=[],f=[null],t=[],fe=this.table,a="",be=0,Pe=0,Ue=0,ht=2,Ye=1,ut=t.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(G.yy[Se]=this.yy[Se]);R.setInput(r,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var Ie=R.yylloc;t.push(Ie);var mt=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(I){l.length=l.length-2*I,f.length=f.length-I,t.length=t.length-I}u(ft,"popStack");function Be(){var I;return I=s.pop()||R.lex()||Ye,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=n.symbols_[I]||I),I}u(Be,"lex");for(var _,Te,z,N,gt,Ne,J={},Re,F,Qe,ke;;){if(z=l[l.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((_===null||typeof _>"u")&&(_=Be()),N=fe[z]&&fe[z][_]),typeof N>"u"||!N.length||!N[0]){var qe="";ke=[];for(Re in fe[z])this.terminals_[Re]&&Re>ht&&ke.push("'"+this.terminals_[Re]+"'");R.showPosition?qe="Parse error on line "+(be+1)+`:
|
|
2
|
+
`+R.showPosition()+`
|
|
3
|
+
Expecting `+ke.join(", ")+", got '"+(this.terminals_[_]||_)+"'":qe="Parse error on line "+(be+1)+": Unexpected "+(_==Ye?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(qe,{text:R.match,token:this.terminals_[_]||_,line:R.yylineno,loc:Ie,expected:ke})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+_);switch(N[0]){case 1:l.push(_),f.push(R.yytext),t.push(R.yylloc),l.push(N[1]),_=null,Te?(_=Te,Te=null):(Pe=R.yyleng,a=R.yytext,be=R.yylineno,Ie=R.yylloc,Ue>0&&Ue--);break;case 2:if(F=this.productions_[N[1]][1],J.$=f[f.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},mt&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ne=this.performAction.apply(J,[a,Pe,be,G.yy,N[1],f,t].concat(ut)),typeof Ne<"u")return Ne;F&&(l=l.slice(0,-1*F*2),f=f.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[N[1]][0]),f.push(J.$),t.push(J._$),Qe=fe[l[l.length-2]][l[l.length-1]],l.push(Qe);break;case 3:return!0}}return!0},"parse")},ct=(function(){var $={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(function(r,n){return this.yy=n||this.yy||{},this._input=r,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:u(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:u(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=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:l?(l.length===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(r){this.unput(this.match.slice(r))},"less"),pastInput:u(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},"showPosition"),test_match:u(function(r,n){var l,s,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),s=r[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,n,l,s;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;t<f.length;t++)if(l=this._input.match(this.rules[f[t]]),l&&(!n||l[0].length>n[0].length)){if(n=l,s=t,this.options.backtrack_lexer){if(r=this.test_match(l,f[t]),r!==!1)return r;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(r=this.test_match(n,f[s]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var n=this.next();return n||this.lex()},"lex"),begin:u(function(n){this.conditionStack.push(n)},"begin"),popState:u(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(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:u(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:u(function(n){this.begin(n)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(n,l,s,f){var t=f;switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return l.yytext=l.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return $})();_e.lexer=ct;function Ee(){this.yy={}}return u(Ee,"Parser"),Ee.prototype=_e,_e.Parser=Ee,new Ee})();Ae.parser=Ae;var dt=Ae,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=We,this.getAccTitle=je,this.setAccDescription=Ge,this.getAccDescription=ze,this.setDiagramTitle=Xe,this.getDiagramTitle=Je,this.getConfig=u(()=>ye().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{u(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,m){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:m,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),ge.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,m,h){this.relations.push({type:e,src:m,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ke()}setCssStyle(e,m){for(let h of e){let c=this.requirements.get(h)??this.elements.get(h);if(!m||!c)return;for(let i of m)i.includes(",")?c.cssStyles.push(...i.split(",")):c.cssStyles.push(i)}}setClass(e,m){for(let h of e){let c=this.requirements.get(h)??this.elements.get(h);if(c)for(let i of m){c.classes.push(i);let o=this.classes.get(i)?.styles;o&&c.cssStyles.push(...o)}}}defineClass(e,m){for(let h of e){let c=this.classes.get(h);c===void 0&&(c={id:h,styles:[],textStyles:[]},this.classes.set(h,c)),m&&m.forEach(function(i){if(/color/.exec(i)){let o=i.replace("fill","bgFill");c.textStyles.push(o)}c.styles.push(i)}),this.requirements.forEach(i=>{i.classes.includes(h)&&i.cssStyles.push(...m.flatMap(o=>o.split(",")))}),this.elements.forEach(i=>{i.classes.includes(h)&&i.cssStyles.push(...m.flatMap(o=>o.split(",")))})}}getClasses(){return this.classes}getData(){let e=ye(),m=[],h=[];for(let i of this.requirements.values()){let o=i;o.id=i.name,o.cssStyles=i.cssStyles,o.cssClasses=i.classes.join(" "),o.shape="requirementBox",o.look=e.look,o.colorIndex=m.length,m.push(o)}for(let i of this.elements.values()){let o=i;o.shape="requirementBox",o.look=e.look,o.id=i.name,o.cssStyles=i.cssStyles,o.cssClasses=i.classes.join(" "),o.colorIndex=m.length,m.push(o)}let c=0;for(let i of this.relations){let o=i.type===this.Relationships.CONTAINS,k={id:`${i.src}-${i.dst}-${c++}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",o?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:o?"normal":"dashed",arrowTypeStart:o?"requirement_contains":"",arrowTypeEnd:o?"":"requirement_arrow",look:e.look,labelType:"markdown"};h.push(k)}return{nodes:m,edges:h,other:{},config:e,direction:this.getDirection()}}},Et=u(()=>{let e=Ce(),{theme:m,themeVariables:h}=e,{bkgColorArray:c,borderColorArray:i}=h;if(!tt(m,i))return"";let o=st(e.look),k="",S=et(c);for(let d=0;d<it(i);d++){let g=i[d],y=S?`fill: ${c[d%c.length]};`:"";k+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${o}"][data-color-id="color-${d}"].node path {
|
|
9
|
+
stroke: ${g};
|
|
10
|
+
${y}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${o}"][data-color-id="color-${d}"].node rect {
|
|
14
|
+
stroke: ${g};
|
|
15
|
+
${y}
|
|
16
|
+
}
|
|
17
|
+
`}return k},"genColor"),bt=u(e=>{let m=Ce(),{look:h,themeVariables:c}=m,{requirementEdgeLabelBackground:i}=c;return`
|
|
18
|
+
${Et()}
|
|
19
|
+
marker {
|
|
20
|
+
fill: ${e.relationColor};
|
|
21
|
+
stroke: ${e.relationColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
marker.cross {
|
|
25
|
+
stroke: ${e.lineColor};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
svg {
|
|
29
|
+
font-family: ${e.fontFamily};
|
|
30
|
+
font-size: ${e.fontSize};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.reqBox {
|
|
34
|
+
fill: ${e.requirementBackground};
|
|
35
|
+
fill-opacity: 1.0;
|
|
36
|
+
stroke: ${e.requirementBorderColor};
|
|
37
|
+
stroke-width: ${e.requirementBorderSize};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.reqTitle, .reqLabel{
|
|
41
|
+
fill: ${e.requirementTextColor};
|
|
42
|
+
}
|
|
43
|
+
.reqLabelBox {
|
|
44
|
+
fill: ${e.relationLabelBackground};
|
|
45
|
+
fill-opacity: 1.0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.req-title-line {
|
|
49
|
+
stroke: ${e.requirementBorderColor};
|
|
50
|
+
stroke-width: ${e.requirementBorderSize};
|
|
51
|
+
}
|
|
52
|
+
.relationshipLine {
|
|
53
|
+
stroke: ${e.relationColor};
|
|
54
|
+
stroke-width: ${h==="neo"?e.strokeWidth:"1px"};
|
|
55
|
+
}
|
|
56
|
+
.relationshipLabel {
|
|
57
|
+
fill: ${e.relationLabelColor};
|
|
58
|
+
}
|
|
59
|
+
.edgeLabel {
|
|
60
|
+
background-color: ${e.edgeLabelBackground};
|
|
61
|
+
}
|
|
62
|
+
.edgeLabel .label rect {
|
|
63
|
+
fill: ${e.edgeLabelBackground};
|
|
64
|
+
}
|
|
65
|
+
.edgeLabel .label text {
|
|
66
|
+
fill: ${e.relationLabelColor};
|
|
67
|
+
}
|
|
68
|
+
.divider {
|
|
69
|
+
stroke: ${e.nodeBorder};
|
|
70
|
+
stroke-width: 1;
|
|
71
|
+
}
|
|
72
|
+
.label {
|
|
73
|
+
font-family: ${e.fontFamily};
|
|
74
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
75
|
+
}
|
|
76
|
+
.label text,span {
|
|
77
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
78
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
79
|
+
}
|
|
80
|
+
.labelBkg {
|
|
81
|
+
background-color: ${i??e.edgeLabelBackground};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`},"getStyles"),Rt=bt,ot={};He(ot,{draw:()=>kt});var kt=u(async function(e,m,h,c){ge.info("REF0:"),ge.info("Drawing requirement diagram (unified)",m);let{securityLevel:i,state:o,layout:k,look:S}=ye(),d=c.db.getData(),g=at(m,i);d.type=c.type,d.layoutAlgorithm=nt(k),d.nodeSpacing=o?.nodeSpacing??50,d.rankSpacing=o?.rankSpacing??50,d.markers=S==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],d.diagramId=m,await rt(d,g);let y=8;Ze.insertTitle(g,"requirementDiagramTitleText",o?.titleTopMargin??25,c.db.getDiagramTitle()),lt(g,y,"requirementDiagram",o?.useMaxWidth??!0)},"draw"),Mt={parser:dt,get db(){return new pt},renderer:ot,styles:Rt};export{Mt as diagram};
|