@screenbook/ui 0.0.1
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/.astro/content-assets.mjs +1 -0
- package/.astro/content-modules.mjs +1 -0
- package/.astro/content.d.ts +199 -0
- package/.astro/data-store.json +1 -0
- package/.astro/settings.json +5 -0
- package/.astro/types.d.ts +2 -0
- package/.prettierrc +15 -0
- package/.screenbook/coverage.json +37 -0
- package/.screenbook/screens.json +90 -0
- package/LICENSE +21 -0
- package/astro.config.mjs +18 -0
- package/dist/client/_astro/_baseUniq.BGai4mcc.js +1 -0
- package/dist/client/_astro/arc.DUp0dfXj.js +1 -0
- package/dist/client/_astro/architectureDiagram-VXUJARFQ.De_Gt-YC.js +36 -0
- package/dist/client/_astro/blockDiagram-VD42YOAC.BBt_VNhR.js +122 -0
- package/dist/client/_astro/c4Diagram-YG6GDRKO.DfgUlHvt.js +10 -0
- package/dist/client/_astro/channel.CNyr52v1.js +1 -0
- package/dist/client/_astro/chunk-4BX2VUAB.BL0ar6du.js +1 -0
- package/dist/client/_astro/chunk-55IACEB6.CI6SkZkY.js +1 -0
- package/dist/client/_astro/chunk-B4BG7PRW.Z25N80K6.js +165 -0
- package/dist/client/_astro/chunk-DI55MBZ5.BqjPVmi1.js +220 -0
- package/dist/client/_astro/chunk-FMBD7UC4.bZ9DWnFm.js +15 -0
- package/dist/client/_astro/chunk-QN33PNHL.BkzuUgWB.js +1 -0
- package/dist/client/_astro/chunk-QZHKN3VN.C__d68N_.js +1 -0
- package/dist/client/_astro/chunk-TZMSLE5B.BIpu8bMn.js +1 -0
- package/dist/client/_astro/classDiagram-2ON5EDUG.CxT3aW-h.js +1 -0
- package/dist/client/_astro/classDiagram-v2-WZHVMYZB.CxT3aW-h.js +1 -0
- package/dist/client/_astro/clone.U_lSZ6fe.js +1 -0
- package/dist/client/_astro/cose-bilkent-S5V4N54A.D48yfMll.js +1 -0
- package/dist/client/_astro/coverage.CKIVg4LY.css +1 -0
- package/dist/client/_astro/coverage.DDJMzKCq.css +1 -0
- package/dist/client/_astro/cytoscape.esm.DtBltrT8.js +331 -0
- package/dist/client/_astro/dagre-6UL2VRFP.LKVH7b30.js +4 -0
- package/dist/client/_astro/defaultLocale.C4B-KCzX.js +1 -0
- package/dist/client/_astro/diagram-PSM6KHXK.AHgUjH56.js +24 -0
- package/dist/client/_astro/diagram-QEK2KX5R.DvS33xWZ.js +43 -0
- package/dist/client/_astro/diagram-S2PKOQOG.BWisaYrQ.js +24 -0
- package/dist/client/_astro/erDiagram-Q2GNP2WA.B7oID6oT.js +60 -0
- package/dist/client/_astro/flowDiagram-NV44I4VS.Bb1qJLxr.js +162 -0
- package/dist/client/_astro/ganttDiagram-JELNMOA3.3vGHETyo.js +267 -0
- package/dist/client/_astro/gitGraphDiagram-NY62KEGX.Co2SKcif.js +65 -0
- package/dist/client/_astro/graph.B5fevUwB.js +1 -0
- package/dist/client/_astro/graph.astro_astro_type_script_index_0_lang.1HlATQ1g.js +1 -0
- package/dist/client/_astro/impact.Cvhl64u1.css +1 -0
- package/dist/client/_astro/impact.astro_astro_type_script_index_0_lang.D4cAR9AL.js +6 -0
- package/dist/client/_astro/infoDiagram-WHAUD3N6.B6ULtps1.js +2 -0
- package/dist/client/_astro/init.Gi6I4Gst.js +1 -0
- package/dist/client/_astro/journeyDiagram-XKPGCS4Q.BSOCzWmw.js +139 -0
- package/dist/client/_astro/kanban-definition-3W4ZIXB7.D8KKGc1o.js +89 -0
- package/dist/client/_astro/katex.XbL3y5x-.js +261 -0
- package/dist/client/_astro/layout.8vv24qEg.js +1 -0
- package/dist/client/_astro/linear.B6O9ymuK.js +1 -0
- package/dist/client/_astro/mermaid.core.CReXU7YN.js +256 -0
- package/dist/client/_astro/min.CdGMGVU0.js +1 -0
- package/dist/client/_astro/mindmap-definition-VGOIOE7T.G14HgtDw.js +68 -0
- package/dist/client/_astro/ordinal.BYWQX77i.js +1 -0
- package/dist/client/_astro/pieDiagram-ADFJNKIX.bC2VkyoW.js +30 -0
- package/dist/client/_astro/quadrantDiagram-AYHSOK5B.BlLaQQxO.js +7 -0
- package/dist/client/_astro/requirementDiagram-UZGBJVZJ.DHRnMofO.js +64 -0
- package/dist/client/_astro/sankeyDiagram-TZEHDZUN.BMuaJBmt.js +10 -0
- package/dist/client/_astro/sequenceDiagram-WL72ISMW.CnU62wqy.js +145 -0
- package/dist/client/_astro/stateDiagram-FKZM4ZOC.CewI55YO.js +1 -0
- package/dist/client/_astro/stateDiagram-v2-4FDKWEC3.7xUQqoNr.js +1 -0
- package/dist/client/_astro/timeline-definition-IT6M3QCI.D1PLRwss.js +61 -0
- package/dist/client/_astro/treemap-KMMF4GRG.D3VNVvXF.js +128 -0
- package/dist/client/_astro/xychartDiagram-PRI3JC2R.CQex0-ul.js +7 -0
- package/dist/client/logo.svg +5 -0
- package/dist/server/_@astrojs-ssr-adapter.mjs +1 -0
- package/dist/server/_noop-middleware.mjs +3 -0
- package/dist/server/chunks/_@astrojs-ssr-adapter_DgsYudHz.mjs +4385 -0
- package/dist/server/chunks/astro/server_m7yT4wCr.mjs +2787 -0
- package/dist/server/chunks/astro-designed-error-pages_BvPhMmw0.mjs +364 -0
- package/dist/server/chunks/fs-lite_COtHaKzy.mjs +157 -0
- package/dist/server/chunks/impactAnalysis_Bz5lMdmy.mjs +188 -0
- package/dist/server/chunks/loadScreens_DJf-tycc.mjs +39 -0
- package/dist/server/chunks/node_DoTkMCOi.mjs +1673 -0
- package/dist/server/chunks/remote_B3W5fv4r.mjs +188 -0
- package/dist/server/chunks/sharp_DHNfMLYY.mjs +99 -0
- package/dist/server/entry.mjs +47 -0
- package/dist/server/manifest_-V1HEnR8.mjs +101 -0
- package/dist/server/noop-entrypoint.mjs +3 -0
- package/dist/server/pages/_image.astro.mjs +2 -0
- package/dist/server/pages/coverage.astro.mjs +65 -0
- package/dist/server/pages/graph.astro.mjs +107 -0
- package/dist/server/pages/impact.astro.mjs +52 -0
- package/dist/server/pages/index.astro.mjs +28 -0
- package/dist/server/pages/screen/_id_.astro.mjs +52 -0
- package/dist/server/renderers.mjs +3 -0
- package/package.json +42 -0
- package/public/logo.svg +5 -0
- package/src/layouts/Layout.astro +60 -0
- package/src/pages/coverage.astro +399 -0
- package/src/pages/graph.astro +330 -0
- package/src/pages/impact.astro +459 -0
- package/src/pages/index.astro +167 -0
- package/src/pages/screen/[id].astro +186 -0
- package/src/styles/global.css +862 -0
- package/src/utils/impactAnalysis.ts +297 -0
- package/src/utils/loadCoverage.ts +30 -0
- package/src/utils/loadScreens.ts +18 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b,a as m,c as d,d as h,i as l}from"./_baseUniq.BGai4mcc.js";import{aE as g,aF as o,aG as p}from"./mermaid.core.CReXU7YN.js";function L(a){var n=a==null?0:a.length;return n?b(a):[]}function v(a,n){var s=-1,t=g(a)?Array(a.length):[];return m(a,function(f,i,e){t[++s]=n(f,i,e)}),t}function M(a,n){var s=o(a)?d:v;return s(a,h(n))}function x(a,n){return a<n}function A(a,n,s){for(var t=-1,f=a.length;++t<f;){var i=a[t],e=n(i);if(e!=null&&(r===void 0?e===e&&!l(e):s(e,r)))var r=e,u=i}return u}function k(a){return a&&a.length?A(a,p,x):void 0}export{x as a,A as b,v as c,k as d,L as f,M as m};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import{g as ce}from"./chunk-55IACEB6.CI6SkZkY.js";import{s as le}from"./chunk-QN33PNHL.BkzuUgWB.js";import{_ as c,l as O,p as he,r as de,G as M,c as $,i as P,aD as ge,X as ue,Y as pe,$ as fe}from"./mermaid.core.CReXU7YN.js";const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function ye(e,r=0){return(m[e[r+0]]+m[e[r+1]]+m[e[r+2]]+m[e[r+3]]+"-"+m[e[r+4]]+m[e[r+5]]+"-"+m[e[r+6]]+m[e[r+7]]+"-"+m[e[r+8]]+m[e[r+9]]+"-"+m[e[r+10]]+m[e[r+11]]+m[e[r+12]]+m[e[r+13]]+m[e[r+14]]+m[e[r+15]]).toLowerCase()}let H;const me=new Uint8Array(16);function Ee(){if(!H){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");H=crypto.getRandomValues.bind(crypto)}return H(me)}const _e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:_e};function be(e,r,i){if(ie.randomUUID&&!e)return ie.randomUUID();e=e||{};const l=e.random??e.rng?.()??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,ye(l)}var z=(function(){var e=c(function(L,n,t,o){for(t=t||{},o=L.length;o--;t[L[o]]=n);return t},"o"),r=[1,4],i=[1,13],l=[1,12],p=[1,15],h=[1,16],f=[1,20],E=[1,19],u=[6,7,8],W=[1,26],X=[1,24],Y=[1,25],b=[6,7,11],q=[1,6,13,15,16,19,22],J=[1,33],K=[1,34],I=[1,6,7,11,13,15,16,19,22],V={trace:c(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:c(function(n,t,o,a,g,s,C){var d=s.length-1;switch(g){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: ",s[d].id),a.addNode(s[d-1].length,s[d].id,s[d].descr,s[d].type);break;case 16:a.getLogger().trace("Icon: ",s[d]),a.decorateNode({icon:s[d]});break;case 17:case 21:a.decorateNode({class:s[d]});break;case 18:a.getLogger().trace("SPACELIST");break;case 19:a.getLogger().trace("Node: ",s[d].id),a.addNode(0,s[d].id,s[d].descr,s[d].type);break;case 20:a.decorateNode({icon:s[d]});break;case 25:a.getLogger().trace("node found ..",s[d-2]),this.$={id:s[d-1],descr:s[d-1],type:a.getType(s[d-2],s[d])};break;case 26:this.$={id:s[d],descr:s[d],type:a.nodeType.DEFAULT};break;case 27:a.getLogger().trace("node found ..",s[d-3]),this.$={id:s[d-3],descr:s[d-1],type:a.getType(s[d-2],s[d])};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:i,7:[1,10],9:9,12:11,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:i,12:21,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},{6:i,9:22,12:11,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},{6:W,7:X,10:23,11:Y},e(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:E}),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,23]),e(b,[2,24]),e(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:W,7:X,10:32,11:Y},{1:[2,7],6:i,12:21,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},e(q,[2,14],{7:J,11:K}),e(I,[2,8]),e(I,[2,9]),e(I,[2,10]),e(b,[2,15]),e(b,[2,16]),e(b,[2,17]),{20:[1,35]},{21:[1,36]},e(q,[2,13],{7:J,11:K}),e(I,[2,11]),e(I,[2,12]),{21:[1,37]},e(b,[2,25]),e(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(n,t){if(t.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=t,o}},"parseError"),parse:c(function(n){var t=this,o=[0],a=[],g=[null],s=[],C=this.table,d="",w=0,Q=0,se=2,Z=1,re=s.slice.call(arguments,1),y=Object.create(this.lexer),x={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(x.yy[B]=this.yy[B]);y.setInput(n,x.yy),x.yy.lexer=y,x.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var F=y.yylloc;s.push(F);var oe=y.options&&y.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(S){o.length=o.length-2*S,g.length=g.length-S,s.length=s.length-S}c(ae,"popStack");function ee(){var S;return S=a.pop()||y.lex()||Z,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=t.symbols_[S]||S),S}c(ee,"lex");for(var _,v,D,G,T={},A,N,te,U;;){if(v=o[o.length-1],this.defaultActions[v]?D=this.defaultActions[v]:((_===null||typeof _>"u")&&(_=ee()),D=C[v]&&C[v][_]),typeof D>"u"||!D.length||!D[0]){var j="";U=[];for(A in C[v])this.terminals_[A]&&A>se&&U.push("'"+this.terminals_[A]+"'");y.showPosition?j="Parse error on line "+(w+1)+`:
|
|
2
|
+
`+y.showPosition()+`
|
|
3
|
+
Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":j="Parse error on line "+(w+1)+": Unexpected "+(_==Z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(j,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:F,expected:U})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(D[0]){case 1:o.push(_),g.push(y.yytext),s.push(y.yylloc),o.push(D[1]),_=null,Q=y.yyleng,d=y.yytext,w=y.yylineno,F=y.yylloc;break;case 2:if(N=this.productions_[D[1]][1],T.$=g[g.length-N],T._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},oe&&(T._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),G=this.performAction.apply(T,[d,Q,w,x.yy,D[1],g,s].concat(re)),typeof G<"u")return G;N&&(o=o.slice(0,-1*N*2),g=g.slice(0,-1*N),s=s.slice(0,-1*N)),o.push(this.productions_[D[1]][0]),g.push(T.$),s.push(T._$),te=C[o[o.length-2]][o[o.length-1]],o.push(te);break;case 3:return!0}}return!0},"parse")},ne=(function(){var L={EOF:1,parseError:c(function(t,o){if(this.yy.parser)this.yy.parser.parseError(t,o);else throw new Error(t)},"parseError"),setInput:c(function(n,t){return this.yy=t||this.yy||{},this._input=n,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:c(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var t=n.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:c(function(n){var t=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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 g=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-t},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(n){this.unput(this.match.slice(n))},"less"),pastInput:c(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var n=this.pastInput(),t=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
|
+
`+t+"^"},"showPosition"),test_match:c(function(n,t){var o,a,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),a=n[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+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],o=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var s in g)this[s]=g[s];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,t,o,a;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),s=0;s<g.length;s++)if(o=this._input.match(this.rules[g[s]]),o&&(!t||o[0].length>t[0].length)){if(t=o,a=s,this.options.backtrack_lexer){if(n=this.test_match(o,g[s]),n!==!1)return n;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(n=this.test_match(t,g[a]),n!==!1?n:!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:c(function(){var t=this.next();return t||this.lex()},"lex"),begin:c(function(t){this.conditionStack.push(t)},"begin"),popState:c(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:c(function(t){this.begin(t)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(t,o,a,g){switch(a){case 0:return t.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:return t.getLogger().trace("Long description:",o.yytext),20;case 36:return t.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return L})();V.lexer=ne;function R(){this.yy={}}return c(R,"Parser"),R.prototype=V,V.Parser=R,new R})();z.parser=z;var Se=z,k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},De=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=k,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{c(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,i,l){O.info("addNode",e,r,i,l);let p=!1;this.nodes.length===0?(this.baseLevel=e,e=0,p=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,p=!1);const h=$();let f=h.mindmap?.padding??M.mindmap.padding;switch(l){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:f*=2;break}const E={id:this.count++,nodeId:P(r,h),level:e,descr:P(i,h),type:l,children:[],width:h.mindmap?.maxNodeWidth??M.mindmap.maxNodeWidth,padding:f,isRoot:p},u=this.getParent(e);if(u)u.children.push(E),this.nodes.push(E);else if(p)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,r){switch(O.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;const r=$(),i=this.nodes[this.nodes.length-1];e.icon&&(i.icon=P(e.icon,r)),e.class&&(i.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){if(e.level===0?e.section=void 0:e.section=r,e.children)for(const[i,l]of e.children.entries()){const p=e.level===0?i:r;this.assignSections(l,p)}}flattenNodes(e,r){const i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);const l=i.join(" "),p=c(f=>{switch(f){case k.CIRCLE:return"mindmapCircle";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexagon";case k.DEFAULT:return"defaultMindmapNode";case k.NO_BORDER:default:return"rect"}},"getShapeFromType"),h={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:p(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:l,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(r.push(h),e.children)for(const f of e.children)this.flattenNodes(f,r)}generateEdges(e,r){if(e.children)for(const i of e.children){let l="edge";i.section!==void 0&&(l+=` section-edge-${i.section}`);const p=e.level+1;l+=` edge-depth-${p}`;const h={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:l,depth:e.level,section:i.section};r.push(h),this.generateEdges(i,r)}}getData(){const e=this.getMindmap(),r=$(),l=ge().layout!==void 0,p=r;if(l||(p.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:p};O.debug("getData: mindmapRoot",e,r),this.assignSections(e);const h=[],f=[];this.flattenNodes(e,h),this.generateEdges(e,f),O.debug(`getData: processed ${h.length} nodes and ${f.length} edges`);const E=new Map;for(const u of h)E.set(u.id,{shape:u.shape,width:u.width,height:u.height,padding:u.padding});return{nodes:h,edges:f,config:p,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+be()}}getLogger(){return O}},Ne=c(async(e,r,i,l)=>{O.debug(`Rendering mindmap diagram
|
|
7
|
+
`+e);const p=l.db,h=p.getData(),f=ce(r,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=he(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=r,p.getMindmap()&&(h.nodes.forEach(u=>{u.shape==="rounded"?(u.radius=15,u.taper=15,u.stroke="none",u.width=0,u.padding=15):u.shape==="circle"?u.padding=10:u.shape==="rect"&&(u.width=0,u.padding=10)}),await de(h,f),le(f,h.config.mindmap?.padding??M.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??M.mindmap.useMaxWidth))},"draw"),ke={draw:Ne},Le=c(e=>{let r="";for(let i=0;i<e.THEME_COLOR_LIMIT;i++)e["lineColor"+i]=e["lineColor"+i]||e["cScaleInv"+i],ue(e["lineColor"+i])?e["lineColor"+i]=pe(e["lineColor"+i],20):e["lineColor"+i]=fe(e["lineColor"+i],20);for(let i=0;i<e.THEME_COLOR_LIMIT;i++){const l=""+(17-3*i);r+=`
|
|
8
|
+
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
|
|
9
|
+
fill: ${e["cScale"+i]};
|
|
10
|
+
}
|
|
11
|
+
.section-${i-1} text {
|
|
12
|
+
fill: ${e["cScaleLabel"+i]};
|
|
13
|
+
}
|
|
14
|
+
.node-icon-${i-1} {
|
|
15
|
+
font-size: 40px;
|
|
16
|
+
color: ${e["cScaleLabel"+i]};
|
|
17
|
+
}
|
|
18
|
+
.section-edge-${i-1}{
|
|
19
|
+
stroke: ${e["cScale"+i]};
|
|
20
|
+
}
|
|
21
|
+
.edge-depth-${i-1}{
|
|
22
|
+
stroke-width: ${l};
|
|
23
|
+
}
|
|
24
|
+
.section-${i-1} line {
|
|
25
|
+
stroke: ${e["cScaleInv"+i]} ;
|
|
26
|
+
stroke-width: 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.disabled, .disabled circle, .disabled text {
|
|
30
|
+
fill: lightgray;
|
|
31
|
+
}
|
|
32
|
+
.disabled text {
|
|
33
|
+
fill: #efefef;
|
|
34
|
+
}
|
|
35
|
+
`}return r},"genSections"),xe=c(e=>`
|
|
36
|
+
.edge {
|
|
37
|
+
stroke-width: 3;
|
|
38
|
+
}
|
|
39
|
+
${Le(e)}
|
|
40
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
41
|
+
fill: ${e.git0};
|
|
42
|
+
}
|
|
43
|
+
.section-root text {
|
|
44
|
+
fill: ${e.gitBranchLabel0};
|
|
45
|
+
}
|
|
46
|
+
.section-root span {
|
|
47
|
+
color: ${e.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.section-2 span {
|
|
50
|
+
color: ${e.gitBranchLabel0};
|
|
51
|
+
}
|
|
52
|
+
.icon-container {
|
|
53
|
+
height:100%;
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
.edge {
|
|
59
|
+
fill: none;
|
|
60
|
+
}
|
|
61
|
+
.mindmap-node-label {
|
|
62
|
+
dy: 1em;
|
|
63
|
+
alignment-baseline: middle;
|
|
64
|
+
text-anchor: middle;
|
|
65
|
+
dominant-baseline: middle;
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
`,"getStyles"),ve=xe,Ce={get db(){return new De},renderer:ke,parser:Se,styles:ve};export{Ce as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a}from"./init.Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{a9 as S,a4 as z,aC as j,_ as p,g as q,s as Z,a as H,b as J,t as K,q as Q,l as F,c as X,E as Y,I as ee,O as te,e as ae,z as re,G as ne}from"./mermaid.core.CReXU7YN.js";import{p as ie}from"./chunk-4BX2VUAB.BL0ar6du.js";import{p as se}from"./treemap-KMMF4GRG.D3VNVvXF.js";import{d as R}from"./arc.DUp0dfXj.js";import{o as le}from"./ordinal.BYWQX77i.js";import"./min.CdGMGVU0.js";import"./_baseUniq.BGai4mcc.js";import"./init.Gi6I4Gst.js";function oe(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,f=null,x=S(0),s=S(z),o=S(0);function l(t){var n,c=(t=j(t)).length,d,y,m=0,u=new Array(c),i=new Array(c),v=+x.apply(this,arguments),w=Math.min(z,Math.max(-z,s.apply(this,arguments)-v)),h,D=Math.min(Math.abs(w)/c,o.apply(this,arguments)),$=D*(w<0?-1:1),g;for(n=0;n<c;++n)(g=i[u[n]=n]=+e(t[n],n,t))>0&&(m+=g);for(a!=null?u.sort(function(A,C){return a(i[A],i[C])}):f!=null&&u.sort(function(A,C){return f(t[A],t[C])}),n=0,y=m?(w-c*$)/m:0;n<c;++n,v=h)d=u[n],g=i[d],h=v+(g>0?g*y:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:h,padAngle:D};return i}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,f=null,l):a},l.sort=function(t){return arguments.length?(f=t,a=null,l):f},l.startAngle=function(t){return arguments.length?(x=typeof t=="function"?t:S(+t),l):x},l.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),l):s},l.padAngle=function(t){return arguments.length?(o=typeof t=="function"?t:S(+t),l):o},l}var pe=ne.pie,G={sections:new Map,showData:!1},T=G.sections,N=G.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{T=new Map,N=G.showData,re()},"clear"),he=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),F.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),me=p(()=>T,"getSections"),ve=p(e=>{N=e},"setShowData"),Se=p(()=>N,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:Q,getDiagramTitle:K,setAccTitle:J,getAccTitle:H,setAccDescription:Z,getAccDescription:q,addSection:he,getSections:me,setShowData:ve,getShowData:Se},xe=p((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ye={parse:p(async e=>{const a=await se("pie",e);F.debug(a),xe(a,L)},"parse")},we=p(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),Ae=we,Ce=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),De=p((e,a,f,x)=>{F.debug(`rendering pie chart
|
|
30
|
+
`+e);const s=x.db,o=X(),l=Y(s.getConfig(),o.pie),t=40,n=18,c=4,d=450,y=d,m=ee(a),u=m.append("g");u.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:i}=o;let[v]=te(i.pieOuterStrokeWidth);v??=2;const w=l.textPosition,h=Math.min(y,d)/2-t,D=R().innerRadius(0).outerRadius(h),$=R().innerRadius(h*w).outerRadius(h*w);u.append("circle").attr("cx",0).attr("cy",0).attr("r",h+v/2).attr("class","pieOuterCircle");const g=s.getSections(),A=Ce(g),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let E=0;g.forEach(r=>{E+=r});const O=A.filter(r=>(r.data.value/E*100).toFixed(0)!=="0"),b=le(C);u.selectAll("mySlices").data(O).enter().append("path").attr("d",D).attr("fill",r=>b(r.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(O).enter().append("text").text(r=>(r.data.value/E*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const W=[...g.entries()].map(([r,M])=>({label:r,value:M})),k=u.selectAll(".legend").data(W).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const P=n+c,B=P*W.length/2,V=12*n,U=M*P-B;return"translate("+V+","+U+")"});k.append("rect").attr("width",n).attr("height",n).style("fill",r=>b(r.label)).style("stroke",r=>b(r.label)),k.append("text").attr("x",n+c).attr("y",n-c).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const _=Math.max(...k.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),I=y+t+n+c+_;m.attr("viewBox",`0 0 ${I} ${d}`),ae(m,d,I,l.useMaxWidth)},"draw"),$e={draw:De},Ne={parser:ye,db:L,renderer:$e,styles:Ae};export{Ne as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{_ as r,s as be,g as Se,t as te,q as _e,a as Ae,b as ke,c as Et,l as qt,d as vt,e as Fe,z as Pe,G as D,L as ve,i as Ce}from"./mermaid.core.CReXU7YN.js";import{l as $t}from"./linear.B6O9ymuK.js";import"./init.Gi6I4Gst.js";import"./defaultLocale.C4B-KCzX.js";var Ct=(function(){var t=r(function(M,s,l,u){for(l=l||{},u=M.length;u--;l[M[u]]=s);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,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,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],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],rt=[1,14],ct=[1,23],dt=[1,18],ut=[1,19],xt=[1,20],ot=[1,21],bt=[1,22],lt=[1,24],i=[1,25],Dt=[1,26],zt=[1,27],Vt=[1,28],It=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],O=[1,62],H=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],wt=[1,65],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],G=[1,90],K=[1,91],Z=[1,92],J=[1,99],$=[1,93],tt=[1,96],et=[1,94],it=[1,95],at=[1,97],nt=[1,98],St=[1,102],jt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){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+=" ⟶ ",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+=" ⟶ ",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,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,18:rt,25:ct,35:dt,37:ut,39:xt,41:ot,42:bt,48:lt,50:i,51:Dt,52:zt,53:Vt,54:It,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(_,[2,34]),{27:45,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:m,5:b,10:y,12:T,13:q,14:g,18:rt,25:ct,35:dt,37:ut,39:xt,41:ot,42:bt,48:lt,50:i,51:Dt,52:zt,53:Vt,54:It,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(c,[2,45]),t(c,[2,46]),{18:[1,50]},{4:m,5:b,10:y,12:T,13:q,14:g,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:64,4:wt,5:Bt,6:Rt,7:Nt,8:Wt,9:Ut,10:Qt,11:Ot,12:Ht,13:Xt,14:Mt,15:Yt,21:63},t(c,[2,53],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(c,[2,56],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(c,[2,57],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,58],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,59],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,60],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:wt,5:Bt,6:Rt,7:Nt,8:Wt,9:Ut,10:Qt,11:Ot,12:Ht,13:Xt,14:Mt,15:Yt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(c,[2,52],{58:31,43:83,4:m,5:b,10:y,12:T,13:q,14:g,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(c,[2,55],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:G,5:K,6:Z,8:J,11:$,13:tt,16:89,17:et,18:it,19:at,20:nt,22:88,23:87},t(I,[2,24]),t(c,[2,51],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,54],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,47],{22:88,16:89,23:100,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt}),{46:[1,101]},t(c,[2,29],{10:St}),t(jt,[2,27],{16:103,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:88,16:89,23:104,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt}),{4:G,5:K,6:Z,8:J,11:$,13:tt,16:89,17:et,18:it,19:at,20:nt,22:105},t(R,[2,26]),t(c,[2,50],{10:St}),t(jt,[2,28],{16:103,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Gt=0,ye=2,Kt=1,Te=e.slice.call(arguments,1),E=Object.create(this.lexer),Y={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(Y.yy[At]=this.yy[At]);E.setInput(s,Y.yy),Y.yy.lexer=E,Y.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var kt=E.yylloc;e.push(kt);var qe=E.options&&E.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(B){u.length=u.length-2*B,A.length=A.length-B,e.length=e.length-B}r(me,"popStack");function Zt(){var B;return B=d.pop()||E.lex()||Kt,typeof B!="number"&&(B instanceof Array&&(d=B,B=d.pop()),B=l.symbols_[B]||B),B}r(Zt,"lex");for(var w,j,N,Ft,st={},pt,X,Jt,yt;;){if(j=u[u.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((w===null||typeof w>"u")&&(w=Zt()),N=ht[j]&&ht[j][w]),typeof N>"u"||!N.length||!N[0]){var Pt="";yt=[];for(pt in ht[j])this.terminals_[pt]&&pt>ye&&yt.push("'"+this.terminals_[pt]+"'");E.showPosition?Pt="Parse error on line "+(gt+1)+`:
|
|
2
|
+
`+E.showPosition()+`
|
|
3
|
+
Expecting `+yt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(w==Kt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Pt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:kt,expected:yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+w);switch(N[0]){case 1:u.push(w),A.push(E.yytext),e.push(E.yylloc),u.push(N[1]),w=null,Gt=E.yyleng,n=E.yytext,gt=E.yylineno,kt=E.yylloc;break;case 2:if(X=this.productions_[N[1]][1],st.$=A[A.length-X],st._$={first_line:e[e.length-(X||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(X||1)].first_column,last_column:e[e.length-1].last_column},qe&&(st._$.range=[e[e.length-(X||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(st,[n,Gt,gt,Y.yy,N[1],A,e].concat(Te)),typeof Ft<"u")return Ft;X&&(u=u.slice(0,-1*X*2),A=A.slice(0,-1*X),e=e.slice(0,-1*X)),u.push(this.productions_[N[1]][0]),A.push(st.$),e.push(st._$),Jt=ht[u[u.length-2]][u[u.length-1]],u.push(Jt);break;case 3:return!0}}return!0},"parse")},pe=(function(){var M={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||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:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.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),s},"input"),unput:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+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 A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column: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=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(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:r(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:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:r(function(s,l){var u,d,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),d=s[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+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],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 A)this[e]=A[e];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,l,u,d;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),e=0;e<A.length;e++)if(u=this._input.match(this.rules[A[e]]),u&&(!l||u[0].length>l[0].length)){if(l=u,d=e,this.options.backtrack_lexer){if(s=this.test_match(u,A[e]),s!==!1)return s;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(s=this.test_match(l,A[d]),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:r(function(){var l=this.next();return l||this.lex()},"lex"),begin:r(function(l){this.conditionStack.push(l)},"begin"),popState:r(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:r(function(l){this.begin(l)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(l,u,d,A){switch(d){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11: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;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return M})();_t.lexer=pe;function ft(){this.yy={}}return r(ft,"Parser"),ft.prototype=_t,_t.Parser=ft,new ft})();Ct.parser=Ct;var Le=Ct,V=ve(),Ee=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{r(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:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,qt.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){qt.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){qt.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,a,p,f){const 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,S={top:f?c:0},m=this.config.quadrantPadding+h.left,b=this.config.quadrantPadding+x.top+S.top,y=this.config.chartWidth-this.config.quadrantPadding*2-h.left-h.right,T=this.config.chartHeight-this.config.quadrantPadding*2-x.top-x.bottom-S.top,q=y/2,g=T/2;return{xAxisSpace:x,yAxisSpace:h,titleSpace:S,quadrantSpace:{quadrantLeft:m,quadrantTop:b,quadrantWidth:y,quadrantHalfWidth:q,quadrantHeight:T,quadrantHalfHeight:g}}}getAxisLabels(t,a,p,f){const{quadrantSpace:o,titleSpace:x}=f,{quadrantHalfHeight:_,quadrantHeight:h,quadrantLeft:c,quadrantHalfWidth:S,quadrantTop:m,quadrantWidth:b}=o,y=!!this.data.xAxisRightText,T=!!this.data.yAxisTopText,q=[];return this.data.xAxisLeftText&&a&&q.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(y?S/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&&q.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+S+(y?S/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&&q.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+b+this.config.quadrantPadding,y:m+h-(T?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&p&&q.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+b+this.config.quadrantPadding,y:m+_-(T?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:-90}),q}getQuadrants(t){const{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(const 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){const{quadrantSpace:a}=t,{quadrantHeight:p,quadrantLeft:f,quadrantTop:o,quadrantWidth:x}=a,_=$t().domain([0,1]).range([f,x+f]),h=$t().domain([0,1]).range([p+o,o]);return this.data.points.map(S=>{const m=this.classes.get(S.className);return m&&(S={...m,...S}),{x:_(S.x),y:h(S.y),fill:S.color??this.themeConfig.quadrantPointFill,radius:S.radius??this.config.pointRadius,text:{text:S.text,fill:this.themeConfig.quadrantPointTextFill,x:_(S.x),y:h(S.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:S.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:S.strokeWidth??"0px"}})}getBorders(t){const 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(){const 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)}}},Tt=class extends Error{static{r(this,"InvalidStyleError")}constructor(t,a,p){super(`value for ${t} ${a} is invalid, please use a valid ${p}`),this.name="InvalidStyleError"}};function Lt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}r(Lt,"validateHexCode");function ee(t){return!/^\d+$/.test(t)}r(ee,"validateNumber");function ie(t){return!/^\d+px$/.test(t)}r(ie,"validateSizeInPixels");var De=Et();function Q(t){return Ce(t.trim(),De)}r(Q,"textSanitizer");var z=new Ee;function ae(t){z.setData({quadrant1Text:Q(t.text)})}r(ae,"setQuadrant1Text");function ne(t){z.setData({quadrant2Text:Q(t.text)})}r(ne,"setQuadrant2Text");function se(t){z.setData({quadrant3Text:Q(t.text)})}r(se,"setQuadrant3Text");function re(t){z.setData({quadrant4Text:Q(t.text)})}r(re,"setQuadrant4Text");function oe(t){z.setData({xAxisLeftText:Q(t.text)})}r(oe,"setXAxisLeftText");function le(t){z.setData({xAxisRightText:Q(t.text)})}r(le,"setXAxisRightText");function he(t){z.setData({yAxisTopText:Q(t.text)})}r(he,"setYAxisTopText");function ce(t){z.setData({yAxisBottomText:Q(t.text)})}r(ce,"setYAxisBottomText");function mt(t){const a={};for(const p of t){const[f,o]=p.trim().split(/\s*:\s*/);if(f==="radius"){if(ee(o))throw new Tt(f,o,"number");a.radius=parseInt(o)}else if(f==="color"){if(Lt(o))throw new Tt(f,o,"hex code");a.color=o}else if(f==="stroke-color"){if(Lt(o))throw new Tt(f,o,"hex code");a.strokeColor=o}else if(f==="stroke-width"){if(ie(o))throw new Tt(f,o,"number of pixels (eg. 10px)");a.strokeWidth=o}else throw new Error(`style named ${f} is not supported.`)}return a}r(mt,"parseStyles");function de(t,a,p,f,o){const x=mt(o);z.addPoints([{x:p,y:f,text:Q(t.text),className:a,...x}])}r(de,"addPoint");function ue(t,a){z.addClass(t,mt(a))}r(ue,"addClass");function xe(t){z.setConfig({chartWidth:t})}r(xe,"setWidth");function fe(t){z.setConfig({chartHeight:t})}r(fe,"setHeight");function ge(){const t=Et(),{themeVariables:a,quadrantChart:p}=t;return p&&z.setConfig(p),z.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}),z.setData({titleText:te()}),z.build()}r(ge,"getQuadrantData");var ze=r(function(){z.clear(),Pe()},"clear"),Ve={setWidth:xe,setHeight:fe,setQuadrant1Text:ae,setQuadrant2Text:ne,setQuadrant3Text:se,setQuadrant4Text:re,setXAxisLeftText:oe,setXAxisRightText:le,setYAxisTopText:he,setYAxisBottomText:ce,parseStyles:mt,addPoint:de,addClass:ue,getQuadrantData:ge,clear:ze,setAccTitle:ke,getAccTitle:Ae,setDiagramTitle:_e,getDiagramTitle:te,getAccDescription:Se,setAccDescription:be},Ie=r((t,a,p,f)=>{function o(i){return i==="top"?"hanging":"middle"}r(o,"getDominantBaseLine");function x(i){return i==="left"?"start":"middle"}r(x,"getTextAnchor");function _(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}r(_,"getTransformation");const h=Et();qt.debug(`Rendering quadrant chart
|
|
7
|
+
`+t);const c=h.securityLevel;let S;c==="sandbox"&&(S=vt("#i"+a));const b=(c==="sandbox"?vt(S.nodes()[0].contentDocument.body):vt("body")).select(`[id="${a}"]`),y=b.append("g").attr("class","main"),T=h.quadrantChart?.chartWidth??500,q=h.quadrantChart?.chartHeight??500;Fe(b,q,T,h.quadrantChart?.useMaxWidth??!0),b.attr("viewBox","0 0 "+T+" "+q),f.db.setHeight(q),f.db.setWidth(T);const g=f.db.getQuadrantData(),rt=y.append("g").attr("class","quadrants"),ct=y.append("g").attr("class","border"),dt=y.append("g").attr("class","data-points"),ut=y.append("g").attr("class","labels"),xt=y.append("g").attr("class","title");g.title&&xt.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&&ct.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);const ot=rt.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),ut.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));const lt=dt.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"),we={draw:Ie},Ue={parser:Le,db:Ve,renderer:we,styles:r(()=>"","styles")};export{Ue as diagram};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{g as je}from"./chunk-55IACEB6.CI6SkZkY.js";import{s as ze}from"./chunk-QN33PNHL.BkzuUgWB.js";import{_ as o,b as Ge,a as Xe,s as Je,g as Ze,q as et,t as tt,c as ke,l as Ne,z as st,C as it,p as rt,r as nt,u as at}from"./mermaid.core.CReXU7YN.js";var qe=(function(){var e=o(function(P,i,a,c){for(a=a||{},c=P.length;c--;a[P[c]]=i);return a},"o"),u=[1,3],h=[1,4],r=[1,5],n=[1,6],E=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],g=[1,22],R=[2,7],_=[1,26],b=[1,27],N=[1,28],q=[1,29],A=[1,33],C=[1,34],V=[1,35],v=[1,36],x=[1,37],L=[1,38],D=[1,24],O=[1,31],w=[1,32],M=[1,30],d=[1,39],p=[1,40],m=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$=[1,61],X=[89,90],Ae=[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],Ee=[27,29],Ce=[1,70],Ve=[1,71],ve=[1,72],xe=[1,73],Le=[1,74],De=[1,75],Oe=[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],ce=[1,92],de=[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],we=[1,101],Me=[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],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:o(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:o(function(i,a,c,s,f,t,me){var l=t.length-1;switch(f){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].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[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-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[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);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[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:h,11:r,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:h,11:r,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(E,[2,6]),{3:12,4:2,6:u,9:h,11:r,13:n},{1:[2,2]},{4:17,5:g,7:13,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},e(E,[2,4]),e(E,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:g,7:42,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:43,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:44,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:45,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:46,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:47,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:48,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:49,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:50,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{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(m,[2,17]),e(m,[2,18]),e(m,[2,19]),e(m,[2,20]),{30:60,33:62,75:$,89:d,90:p},{30:63,33:62,75:$,89:d,90:p},{30:64,33:62,75:$,89:d,90:p},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(Ae,[2,81]),e(Ae,[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(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ce,66:Ve,67:ve,68:xe,69:Le,70:De,71:Oe},{62:77,65:Ce,66:Ve,67:ve,68:xe,69:Le,70:De,71:Oe},{30:78,33:62,75:$,89:d,90:p},{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:ce},e(de,[2,60]),e(de,[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:ce},{30:94,33:62,75:$,76:U,89:d,90:p},{5:[1,95]},{30:96,33:62,75:$,89:d,90:p},{5:[1,97]},{30:98,33:62,75:$,89:d,90:p},{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(m,[2,59],{76:U}),e(m,[2,64],{76:we}),{33:103,75:[1,102],89:d,90:p},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),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(m,[2,57],{76:we}),e(m,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:d,90:p},{33:120,89:d,90:p},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(de,[2,61]),e(de,[2,63]),e(T,[2,68]),e(m,[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(m,[2,28]),{5:[1,127]},e(m,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(m,[2,47]),{5:[1,131]},e(m,[2,48]),e(m,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:d,90:p},{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(m,[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(m,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{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(m,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(m,[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:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(m,[2,23]),e(m,[2,24]),e(m,[2,25]),e(m,[2,26]),e(m,[2,44]),e(m,[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:o(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:o(function(i){var a=this,c=[0],s=[],f=[null],t=[],me=this.table,l="",Re=0,Fe=0,Qe=2,Pe=1,He=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(i,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var Ke=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function We(I){c.length=c.length-2*I,f.length=f.length-I,t.length=t.length-I}o(We,"popStack");function $e(){var I;return I=s.pop()||y.lex()||Pe,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}o($e,"lex");for(var S,G,k,be,J={},ye,F,Ue,ge;;){if(G=c[c.length-1],this.defaultActions[G]?k=this.defaultActions[G]:((S===null||typeof S>"u")&&(S=$e()),k=me[G]&&me[G][S]),typeof k>"u"||!k.length||!k[0]){var Te="";ge=[];for(ye in me[G])this.terminals_[ye]&&ye>Qe&&ge.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(Re+1)+`:
|
|
2
|
+
`+y.showPosition()+`
|
|
3
|
+
Expecting `+ge.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Te="Parse error on line "+(Re+1)+": Unexpected "+(S==Pe?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[S]||S,line:y.yylineno,loc:Ie,expected:ge})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+S);switch(k[0]){case 1:c.push(S),f.push(y.yytext),t.push(y.yylloc),c.push(k[1]),S=null,Fe=y.yyleng,l=y.yytext,Re=y.yylineno,Ie=y.yylloc;break;case 2:if(F=this.productions_[k[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},Ke&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),be=this.performAction.apply(J,[l,Fe,Re,z.yy,k[1],f,t].concat(He)),typeof be<"u")return be;F&&(c=c.slice(0,-1*F*2),f=f.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[k[1]][0]),f.push(J.$),t.push(J._$),Ue=me[c[c.length-2]][c[c.length-1]],c.push(Ue);break;case 3:return!0}}return!0},"parse")},Be=(function(){var P={EOF:1,parseError:o(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:o(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),c.length-1&&(this.yylineno-=c.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:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+a+"^"},"showPosition"),test_match:o(function(i,a){var c,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=i[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+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,s;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;t<f.length;t++)if(c=this._input.match(this.rules[f[t]]),c&&(!a||c[0].length>a[0].length)){if(a=c,s=t,this.options.backtrack_lexer){if(i=this.test_match(c,f[t]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,f[s]),i!==!1?i:!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:o(function(){var a=this.next();return a||this.lex()},"lex"),begin:o(function(a){this.conditionStack.push(a)},"begin"),popState:o(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:o(function(a){this.begin(a)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(a,c,s,f){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";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;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;case 60:return this.begin("style"),74;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 c.yytext=c.yytext.trim(),89;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 P})();_e.lexer=Be;function pe(){this.yy={}}return o(pe,"Parser"),pe.prototype=_e,_e.Parser=pe,new pe})();qe.parser=qe;var lt=qe,ct=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=Ge,this.getAccTitle=Xe,this.setAccDescription=Je,this.getAccDescription=Ze,this.setDiagramTitle=et,this.getDiagramTitle=tt,this.getConfig=o(()=>ke().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{o(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,u){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:u,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"]}),Ne.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,u,h){this.relations.push({type:e,src:u,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,st()}setCssStyle(e,u){for(const h of e){const r=this.requirements.get(h)??this.elements.get(h);if(!u||!r)return;for(const n of u)n.includes(",")?r.cssStyles.push(...n.split(",")):r.cssStyles.push(n)}}setClass(e,u){for(const h of e){const r=this.requirements.get(h)??this.elements.get(h);if(r)for(const n of u){r.classes.push(n);const E=this.classes.get(n)?.styles;E&&r.cssStyles.push(...E)}}}defineClass(e,u){for(const h of e){let r=this.classes.get(h);r===void 0&&(r={id:h,styles:[],textStyles:[]},this.classes.set(h,r)),u&&u.forEach(function(n){if(/color/.exec(n)){const E=n.replace("fill","bgFill");r.textStyles.push(E)}r.styles.push(n)}),this.requirements.forEach(n=>{n.classes.includes(h)&&n.cssStyles.push(...u.flatMap(E=>E.split(",")))}),this.elements.forEach(n=>{n.classes.includes(h)&&n.cssStyles.push(...u.flatMap(E=>E.split(",")))})}}getClasses(){return this.classes}getData(){const e=ke(),u=[],h=[];for(const r of this.requirements.values()){const n=r;n.id=r.name,n.cssStyles=r.cssStyles,n.cssClasses=r.classes.join(" "),n.shape="requirementBox",n.look=e.look,u.push(n)}for(const r of this.elements.values()){const n=r;n.shape="requirementBox",n.look=e.look,n.id=r.name,n.cssStyles=r.cssStyles,n.cssClasses=r.classes.join(" "),u.push(n)}for(const r of this.relations){let n=0;const E=r.type===this.Relationships.CONTAINS,g={id:`${r.src}-${r.dst}-${n}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",E?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:E?"normal":"dashed",arrowTypeStart:E?"requirement_contains":"",arrowTypeEnd:E?"":"requirement_arrow",look:e.look};h.push(g),n++}return{nodes:u,edges:h,other:{},config:e,direction:this.getDirection()}}},ot=o(e=>`
|
|
7
|
+
|
|
8
|
+
marker {
|
|
9
|
+
fill: ${e.relationColor};
|
|
10
|
+
stroke: ${e.relationColor};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
marker.cross {
|
|
14
|
+
stroke: ${e.lineColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
svg {
|
|
18
|
+
font-family: ${e.fontFamily};
|
|
19
|
+
font-size: ${e.fontSize};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.reqBox {
|
|
23
|
+
fill: ${e.requirementBackground};
|
|
24
|
+
fill-opacity: 1.0;
|
|
25
|
+
stroke: ${e.requirementBorderColor};
|
|
26
|
+
stroke-width: ${e.requirementBorderSize};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.reqTitle, .reqLabel{
|
|
30
|
+
fill: ${e.requirementTextColor};
|
|
31
|
+
}
|
|
32
|
+
.reqLabelBox {
|
|
33
|
+
fill: ${e.relationLabelBackground};
|
|
34
|
+
fill-opacity: 1.0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.req-title-line {
|
|
38
|
+
stroke: ${e.requirementBorderColor};
|
|
39
|
+
stroke-width: ${e.requirementBorderSize};
|
|
40
|
+
}
|
|
41
|
+
.relationshipLine {
|
|
42
|
+
stroke: ${e.relationColor};
|
|
43
|
+
stroke-width: 1;
|
|
44
|
+
}
|
|
45
|
+
.relationshipLabel {
|
|
46
|
+
fill: ${e.relationLabelColor};
|
|
47
|
+
}
|
|
48
|
+
.divider {
|
|
49
|
+
stroke: ${e.nodeBorder};
|
|
50
|
+
stroke-width: 1;
|
|
51
|
+
}
|
|
52
|
+
.label {
|
|
53
|
+
font-family: ${e.fontFamily};
|
|
54
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
55
|
+
}
|
|
56
|
+
.label text,span {
|
|
57
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
58
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
59
|
+
}
|
|
60
|
+
.labelBkg {
|
|
61
|
+
background-color: ${e.edgeLabelBackground};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
`,"getStyles"),ht=ot,Ye={};it(Ye,{draw:()=>ut});var ut=o(async function(e,u,h,r){Ne.info("REF0:"),Ne.info("Drawing requirement diagram (unified)",u);const{securityLevel:n,state:E,layout:g}=ke(),R=r.db.getData(),_=je(u,n);R.type=r.type,R.layoutAlgorithm=rt(g),R.nodeSpacing=E?.nodeSpacing??50,R.rankSpacing=E?.rankSpacing??50,R.markers=["requirement_contains","requirement_arrow"],R.diagramId=u,await nt(R,_);const b=8;at.insertTitle(_,"requirementDiagramTitleText",E?.titleTopMargin??25,r.db.getDiagramTitle()),ze(_,b,"requirementDiagram",E?.useMaxWidth??!0)},"draw"),dt={parser:lt,get db(){return new ct},renderer:Ye,styles:ht};export{dt as diagram};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{_ as g,q as mt,t as kt,s as _t,g as xt,b as vt,a as bt,c as ot,A as wt,d as G,W as St,z as Lt,k as Et}from"./mermaid.core.CReXU7YN.js";import{o as At}from"./ordinal.BYWQX77i.js";import"./init.Gi6I4Gst.js";function Tt(t){for(var n=t.length/6|0,i=new Array(n),a=0;a<n;)i[a]="#"+t.slice(a*6,++a*6);return i}const Mt=Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,n){let i;if(n===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=n(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function dt(t,n){let i;if(n===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=n(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function J(t,n){let i=0;if(n===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+n(h,++a,t))&&(i+=h)}return i}function Nt(t){return t.target.depth}function It(t){return t.depth}function Pt(t,n){return n-1-t.height}function gt(t,n){return t.sourceLinks.length?t.depth:n-1}function Ct(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,n){return q(t.source,n.source)||t.index-n.index}function ct(t,n){return q(t.target,n.target)||t.index-n.index}function q(t,n){return t.y0-n.y0}function tt(t){return t.value}function Ot(t){return t.index}function zt(t){return t.nodes}function Dt(t){return t.links}function ut(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function ht({nodes:t}){for(const n of t){let i=n.y0,a=i;for(const h of n.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of n.targetLinks)h.y1=a+h.width/2,a+=h.width}}function $t(){let t=0,n=0,i=1,a=1,h=24,b=8,p,k=Ot,s=gt,o,l,_=zt,x=Dt,y=6;function v(){const e={nodes:_.apply(null,arguments),links:x.apply(null,arguments)};return M(e),T(e),N(e),C(e),S(e),ht(e),e}v.update=function(e){return ht(e),e},v.nodeId=function(e){return arguments.length?(k=typeof e=="function"?e:Y(e),v):k},v.nodeAlign=function(e){return arguments.length?(s=typeof e=="function"?e:Y(e),v):s},v.nodeSort=function(e){return arguments.length?(o=e,v):o},v.nodeWidth=function(e){return arguments.length?(h=+e,v):h},v.nodePadding=function(e){return arguments.length?(b=p=+e,v):b},v.nodes=function(e){return arguments.length?(_=typeof e=="function"?e:Y(e),v):_},v.links=function(e){return arguments.length?(x=typeof e=="function"?e:Y(e),v):x},v.linkSort=function(e){return arguments.length?(l=e,v):l},v.size=function(e){return arguments.length?(t=n=0,i=+e[0],a=+e[1],v):[i-t,a-n]},v.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],a=+e[1][1],v):[[t,n],[i,a]]},v.iterations=function(e){return arguments.length?(y=+e,v):y};function M({nodes:e,links:f}){for(const[c,r]of e.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(e.map((c,r)=>[k(c,r,e),c]));for(const[c,r]of f.entries()){r.index=c;let{source:m,target:w}=r;typeof m!="object"&&(m=r.source=ut(u,m)),typeof w!="object"&&(w=r.target=ut(u,w)),m.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of e)c.sort(l),r.sort(l)}function T({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function N({nodes:e}){const f=e.length;let u=new Set(e),c=new Set,r=0;for(;u.size;){for(const m of u){m.depth=r;for(const{target:w}of m.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:e}){const f=e.length;let u=new Set(e),c=new Set,r=0;for(;u.size;){for(const m of u){m.height=r;for(const{source:w}of m.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function D({nodes:e}){const f=at(e,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of e){const m=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=m,r.x0=t+m*u,r.x1=r.x0+h,c[m]?c[m].push(r):c[m]=[r]}if(o)for(const r of c)r.sort(o);return c}function B(e){const f=dt(e,u=>(a-n-(u.length-1)*p)/J(u,tt));for(const u of e){let c=n;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const m of r.sourceLinks)m.width=m.value*f}c=(a-c+p)/(u.length+1);for(let r=0;r<u.length;++r){const m=u[r];m.y0+=c*(r+1),m.y1+=c*(r+1)}A(u)}}function S(e){const f=D(e);p=Math.min(b,(a-n)/(at(f,u=>u.length)-1)),B(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);j(f,c,r),P(f,c,r)}}function P(e,f,u){for(let c=1,r=e.length;c<r;++c){const m=e[c];for(const w of m){let L=0,R=0;for(const{source:W,value:Z}of w.targetLinks){let U=Z*(w.layer-W.layer);L+=$(W,w)*U,R+=U}if(!(R>0))continue;let V=(L/R-w.y0)*f;w.y0+=V,w.y1+=V,E(w)}o===void 0&&m.sort(q),O(m,u)}}function j(e,f,u){for(let c=e.length,r=c-2;r>=0;--r){const m=e[r];for(const w of m){let L=0,R=0;for(const{target:W,value:Z}of w.sourceLinks){let U=Z*(W.layer-w.layer);L+=I(w,W)*U,R+=U}if(!(R>0))continue;let V=(L/R-w.y0)*f;w.y0+=V,w.y1+=V,E(w)}o===void 0&&m.sort(q),O(m,u)}}function O(e,f){const u=e.length>>1,c=e[u];d(e,c.y0-p,u-1,f),z(e,c.y1+p,u+1,f),d(e,a,e.length-1,f),z(e,n,0,f)}function z(e,f,u,c){for(;u<e.length;++u){const r=e[u],m=(f-r.y0)*c;m>1e-6&&(r.y0+=m,r.y1+=m),f=r.y1+p}}function d(e,f,u,c){for(;u>=0;--u){const r=e[u],m=(r.y1-f)*c;m>1e-6&&(r.y0-=m,r.y1-=m),f=r.y0-p}}function E({sourceLinks:e,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ct);for(const{target:{targetLinks:u}}of e)u.sort(lt)}}function A(e){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of e)f.sort(ct),u.sort(lt)}function $(e,f){let u=e.y0-(e.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of e.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===e)break;u-=r}return u}function I(e,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===e)break;u+=r+p}for(const{target:c,width:r}of e.sourceLinks){if(c===f)break;u-=r}return u}return v}var et=Math.PI,nt=2*et,F=1e-6,jt=nt-F;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,n,i,a,h,b){this._+="C"+ +t+","+ +n+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,n,i,a,h){t=+t,n=+n,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,k=i-t,s=a-n,o=b-t,l=p-n,_=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(_>F)if(!(Math.abs(l*k-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var x=i-b,y=a-p,v=k*k+s*s,M=x*x+y*y,T=Math.sqrt(v),N=Math.sqrt(_),C=h*Math.tan((et-Math.acos((v+_-M)/(2*T*N)))/2),D=C/N,B=C/T;Math.abs(D-1)>F&&(this._+="L"+(t+D*o)+","+(n+D*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*y)+","+(this._x1=t+B*k)+","+(this._y1=n+B*s)}},arc:function(t,n,i,a,h,b){t=+t,n=+n,i=+i,b=!!b;var p=i*Math.cos(a),k=i*Math.sin(a),s=t+p,o=n+k,l=1^b,_=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(_<0&&(_=_%nt+nt),_>jt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(n-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):_>F&&(this._+="A"+i+","+i+",0,"+ +(_>=et)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=n+i*Math.sin(h))))},rect:function(t,n,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Rt(t){return t[1]}var Ft=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var n=Vt,i=Wt,a=Bt,h=Rt,b=null;function p(){var k,s=Ft.call(arguments),o=n.apply(this,s),l=i.apply(this,s);if(b||(b=k=pt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),k)return b=null,k+""||null}return p.source=function(k){return arguments.length?(n=k,p):n},p.target=function(k){return arguments.length?(i=k,p):i},p.x=function(k){return arguments.length?(a=typeof k=="function"?k:ft(+k),p):a},p.y=function(k){return arguments.length?(h=typeof k=="function"?k:ft(+k),p):h},p.context=function(k){return arguments.length?(b=k??null,p):b},p}function Gt(t,n,i,a,h){t.moveTo(n,i),t.bezierCurveTo(n=(n+a)/2,i,n,h,a,h)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var st=(function(){var t=g(function(k,s,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=s);return o},"o"),n=[1,9],i=[1,10],a=[1,5,10,12],h={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:g(function(s,o,l,_,x,y,v){var M=y.length-1;switch(x){case 7:const T=_.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=_.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());_.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:i},{15:18,16:7,17:8,18:n,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:g(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:g(function(s){var o=this,l=[0],_=[],x=[null],y=[],v=this.table,M="",T=0,N=0,C=2,D=1,B=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(P.yy[j]=this.yy[j]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var z=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(L){l.length=l.length-2*L,x.length=x.length-L,y.length=y.length-L}g(d,"popStack");function E(){var L;return L=_.pop()||S.lex()||D,typeof L!="number"&&(L instanceof Array&&(_=L,L=_.pop()),L=o.symbols_[L]||L),L}g(E,"lex");for(var A,$,I,e,f={},u,c,r,m;;){if($=l[l.length-1],this.defaultActions[$]?I=this.defaultActions[$]:((A===null||typeof A>"u")&&(A=E()),I=v[$]&&v[$][A]),typeof I>"u"||!I.length||!I[0]){var w="";m=[];for(u in v[$])this.terminals_[u]&&u>C&&m.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+m.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==D?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:m})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+A);switch(I[0]){case 1:l.push(A),x.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=x[x.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},z&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),e=this.performAction.apply(f,[M,N,T,P.yy,I[1],x,y].concat(B)),typeof e<"u")return e;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),x.push(f.$),y.push(f._$),r=v[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},b=(function(){var k={EOF:1,parseError:g(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:g(function(s,o){return this.yy=o||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:g(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(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:g(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var _=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 x=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===_.length?this.yylloc.first_column:0)+_[_.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(s){this.unput(this.match.slice(s))},"less"),pastInput:g(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:g(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:g(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:g(function(s,o){var l,_,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),_=s[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.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],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in x)this[y]=x[y];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,_;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),y=0;y<x.length;y++)if(l=this._input.match(this.rules[x[y]]),l&&(!o||l[0].length>o[0].length)){if(o=l,_=y,this.options.backtrack_lexer){if(s=this.test_match(l,x[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,x[_]),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:g(function(){var o=this.next();return o||this.lex()},"lex"),begin:g(function(o){this.conditionStack.push(o)},"begin"),popState:g(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:g(function(o){this.begin(o)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(o,l,_,x){switch(_){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return k})();h.lexer=b;function p(){this.yy={}}return g(p,"Parser"),p.prototype=h,h.Parser=p,new p})();st.parser=st;var H=st,Q=[],K=[],X=new Map,Qt=g(()=>{Q=[],K=[],X=new Map,Lt()},"clear"),Kt=class{constructor(t,n,i=0){this.source=t,this.target=n,this.value=i}static{g(this,"SankeyLink")}},Zt=g((t,n,i)=>{Q.push(new Kt(t,n,i))},"addLink"),Jt=class{constructor(t){this.ID=t}static{g(this,"SankeyNode")}},te=g(t=>{t=Et.sanitizeText(t,ot());let n=X.get(t);return n===void 0&&(n=new Jt(t),X.set(t,n),K.push(n)),n},"findOrCreateNode"),ee=g(()=>K,"getNodes"),ne=g(()=>Q,"getLinks"),ie=g(()=>({nodes:K.map(t=>({id:t.ID})),links:Q.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),se={nodesMap:X,getConfig:g(()=>ot().sankey,"getConfig"),getNodes:ee,getLinks:ne,getGraph:ie,addLink:Zt,findOrCreateNode:te,getAccTitle:bt,setAccTitle:vt,getAccDescription:xt,setAccDescription:_t,getDiagramTitle:kt,setDiagramTitle:mt,clear:Qt},yt=class rt{static{g(this,"Uid")}static{this.count=0}static next(n){return new rt(n+ ++rt.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}},re={left:It,right:Pt,center:Ct,justify:gt},oe=g(function(t,n,i,a){const{securityLevel:h,sankey:b}=ot(),p=wt.sankey;let k;h==="sandbox"&&(k=G("#i"+n));const s=h==="sandbox"?G(k.nodes()[0].contentDocument.body):G("body"),o=h==="sandbox"?s.select(`[id="${n}"]`):G(`[id="${n}"]`),l=b?.width??p.width,_=b?.height??p.width,x=b?.useMaxWidth??p.useMaxWidth,y=b?.nodeAlignment??p.nodeAlignment,v=b?.prefix??p.prefix,M=b?.suffix??p.suffix,T=b?.showValues??p.showValues,N=a.db.getGraph(),C=re[y];$t().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,_]])(N);const S=At(Mt);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=yt.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const P=g(({id:d,value:E})=>T?`${d}
|
|
7
|
+
${v}${Math.round(E*100)/100}${M}`:d,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",d=>d.x0<l/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<l/2?"start":"end").text(P);const j=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(N.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=b?.linkColor??"gradient";if(O==="gradient"){const d=j.append("linearGradient").attr("id",E=>(E.uid=yt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let z;switch(O){case"gradient":z=g(d=>d.uid,"coloring");break;case"source":z=g(d=>S(d.source.id),"coloring");break;case"target":z=g(d=>S(d.target.id),"coloring");break;default:z=O}j.append("path").attr("d",Xt()).attr("stroke",z).attr("stroke-width",d=>Math.max(1,d.width)),St(void 0,o,0,x)},"draw"),ae={draw:oe},le=g(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),ce=g(t=>`.label {
|
|
9
|
+
font-family: ${t.fontFamily};
|
|
10
|
+
}`,"getStyles"),ue=ce,he=H.parse.bind(H);H.parse=t=>he(le(t));var ge={styles:ue,parser:H,db:se,renderer:ae};export{ge as diagram};
|