orbitchat 2.2.3 → 2.2.5
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/bin/orbitchat.js +1 -1
- package/dist/assets/_basePickBy-BjEly54R-DqvpNhss.js +1 -0
- package/dist/assets/_baseUniq-DRc_T5HB-BD-eiKhZ.js +1 -0
- package/dist/assets/{api-CUMR6WpG.js → api-B0lJClJq.js} +1 -1
- package/dist/assets/arc-CZCQSTaI-COU74SO_.js +1 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-Cfm45ePu-DpyHVagy.js +36 -0
- package/dist/assets/blockDiagram-VD42YOAC-BRbgLESd-Ck20-ft3.js +122 -0
- package/dist/assets/c4Diagram-YG6GDRKO-DLei6MnZ-CyXWsii7.js +10 -0
- package/dist/assets/channel-DkFrLL9m-pXEXdU8i.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-DeMNg1Xd-CrtFwSE5.js +1 -0
- package/dist/assets/chunk-55IACEB6-_r7qMy9s-CVsj1DxS.js +1 -0
- package/dist/assets/chunk-B4BG7PRW-CIxgz8SC-at5hJRU9.js +165 -0
- package/dist/assets/chunk-DI55MBZ5-i035IDz6-DxOVU1og.js +220 -0
- package/dist/assets/chunk-FMBD7UC4-Bm0ev8jq-BTHOwKty.js +15 -0
- package/dist/assets/chunk-QN33PNHL-C8-RyAc3-DADdydNm.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-DMEEp6GB-MKN7DFjX.js +1 -0
- package/dist/assets/chunk-TZMSLE5B-CNFsEzOl-BT3YM95Y.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-DnsiOvOV-CXFnq-_j.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-DnsiOvOV-CXFnq-_j.js +1 -0
- package/dist/assets/clone-DduvFCk3-BXgbo_Py.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-VxeRCpgs-ToXg3tv0.js +1 -0
- package/dist/assets/cytoscape.esm-CjI2IsL8-Da6dFVsf.js +331 -0
- package/dist/assets/dagre-6UL2VRFP-B-o0qgxK-B7jIOGhI.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-CoKmJ9sN-CeSAdKE7.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-ETMfkzYL-BXfUD6Bz.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-BgLbl6rv-Bq7z4qcN.js +24 -0
- package/dist/assets/erDiagram-Q2GNP2WA-Swwdy5pk-CDqK5rW5.js +60 -0
- package/dist/assets/flowDiagram-NV44I4VS-DXJdBBSZ-BwK5ukuy.js +162 -0
- package/dist/assets/ganttDiagram-LVOFAZNH-DmRbHwxf-DcLr4kCw.js +267 -0
- package/dist/assets/gitGraphDiagram-NY62KEGX-D30uHfXn-CQ3udd86.js +65 -0
- package/dist/assets/graph-ClfIprSM-Bo9NcOv2.js +1 -0
- package/dist/assets/{index-DlFdZiHl-C7HbEZKd.js → index-Bny2bm5_-BTHX9t_s.js} +1 -1
- package/dist/assets/index-CIi9dO9d.js +1184 -0
- package/dist/assets/infoDiagram-ER5ION4S-C0DTNQfZ-LvJs62gz.js +2 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-53CUbf20-CN2QFlhq.js +139 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-B-HAgUf7-CCmqybnp.js +89 -0
- package/dist/assets/layout-DoRwGyA9-iPNfcIdd.js +1 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-JxieKS1D-C0G1Iimv.js +68 -0
- package/dist/assets/pieDiagram-ADFJNKIX-vEsBIPBi-B9KBvrYJ.js +30 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-DuNXQUnS-aaneQodw.js +7 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-Ajt9-U96-DJ47o9fU.js +64 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-BNMEPupP-BUQLAXZ-.js +10 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-D2j881gi-DESm0zUV.js +145 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-D9G5SS9f-BGFYCrOw.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D0cjqibA-CBYfNThC.js +1 -0
- package/dist/assets/timeline-definition-IT6M3QCI-B95452nE-BhqaFUs-.js +61 -0
- package/dist/assets/treemap-KMMF4GRG-Dfxm7cSf-B7pg2atG.js +128 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-CZX71UOJ-zWpWPPXY.js +7 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/Tableau10-D7jGxypv-Cyu9clx1.js +0 -1
- package/dist/assets/arc-m8RC5oDD-D_zqriJo.js +0 -1
- package/dist/assets/blockDiagram-c4efeb88-CZ2mpei3-DNgkbqw8.js +0 -118
- package/dist/assets/c4Diagram-c83219d4-DL2EmCLj-CuUh45wR.js +0 -10
- package/dist/assets/channel-BKp1WYnX-Bfkn8_bQ.js +0 -1
- package/dist/assets/classDiagram-beda092f-vKbJ2bcD-CWrQ3PmP.js +0 -2
- package/dist/assets/classDiagram-v2-2358418a-BHXpn1Du-v6U68RJv.js +0 -2
- package/dist/assets/clone-B1V2003j-C6XGoCe0.js +0 -1
- package/dist/assets/createText-1719965b-C2-AT0ab-CSaYVcyR.js +0 -7
- package/dist/assets/edges-96097737-Zk-qG_8u-BvX-rD_e.js +0 -4
- package/dist/assets/erDiagram-0228fc6a-B94anMjz-C0RUxFzz.js +0 -51
- package/dist/assets/flowDb-c6c81e3f-CRRW-bQO-Dv8ApRnS.js +0 -10
- package/dist/assets/flowDiagram-50d868cf-DPzQMhJv-qcXw24Z1.js +0 -4
- package/dist/assets/flowDiagram-v2-4f6560a1-Si9enBmB-BosOeZuP.js +0 -1
- package/dist/assets/flowchart-elk-definition-6af322e1-CULhtvD--CMyJERSt.js +0 -139
- package/dist/assets/ganttDiagram-a2739b55-Bp8yOLEz-0p0LU6B2.js +0 -257
- package/dist/assets/gitGraphDiagram-82fe8481-BYtOQJl0-Cdvv8RH9.js +0 -70
- package/dist/assets/graph-BV6jB5rk-BPsWqwd1.js +0 -1
- package/dist/assets/index-5325376f-DrY72DrM-cyJIharh.js +0 -1
- package/dist/assets/index-CBAg0_Do.js +0 -1008
- package/dist/assets/infoDiagram-8eee0895-C6GFnrZ7-B58B7U0j.js +0 -7
- package/dist/assets/journeyDiagram-c64418c1-daS1W8qe-i2hoPaI4.js +0 -139
- package/dist/assets/layout-LXMv3mSS-D7gLeKlL.js +0 -1
- package/dist/assets/mindmap-definition-8da855dc-DmNQYVT1-8qfS2G_Q.js +0 -425
- package/dist/assets/pieDiagram-a8764435-381urBY5-BL34EuZ1.js +0 -35
- package/dist/assets/quadrantDiagram-1e28029f-hgRmK2bX-D0tGtC6c.js +0 -7
- package/dist/assets/requirementDiagram-08caed73-BB0Q-cI9-C_nbMj6N.js +0 -52
- package/dist/assets/sankeyDiagram-a04cb91d-BpsipZNt-BWArNeVf.js +0 -8
- package/dist/assets/sequenceDiagram-c5b8d532-xoAvPcQJ-DAGq-LjC.js +0 -122
- package/dist/assets/stateDiagram-1ecb1508-b721R49K-BIX80hin.js +0 -1
- package/dist/assets/stateDiagram-v2-c2b004d7-BmSbrbqZ-1xTqgfV7.js +0 -1
- package/dist/assets/styles-b4e223ce-TYmJC5IN-Bh92tu5N.js +0 -160
- package/dist/assets/styles-ca3715f6-CfJZu0Yn-DDmGuNcW.js +0 -207
- package/dist/assets/styles-d45a18b0-DZ8oSYcV-BPX-QgIY.js +0 -116
- package/dist/assets/svgDrawCommon-b86b1483-CXPkN8HW-BDGr_arU.js +0 -1
- package/dist/assets/timeline-definition-faaaa080-LDFf1jfb-C-sZwXLb.js +0 -61
- package/dist/assets/xychartDiagram-f5964ef8-DdhO5-Bp-BJGdviNy.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{R as l,f as be,u as _e,o as ee,n as Se,l as ke,s as Fe,c as zt,O as mt,e as vt,B as Pe,t as ve,M as D,at as Ce,U as te,w as Le}from"./index-CIi9dO9d.js";var Et=function(){var t=l(function(Q,n,d,c){for(d=d||{},c=Q.length;c--;d[Q[c]]=n);return d},"o"),a=[1,3],f=[1,4],u=[1,5],o=[1,6],x=[1,7],b=[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],s=[55,56,57],_=[2,36],p=[1,37],q=[1,36],T=[1,38],y=[1,35],g=[1,43],m=[1,41],H=[1,14],C=[1,23],ct=[1,18],dt=[1,19],ut=[1,20],xt=[1,21],ft=[1,22],ot=[1,24],ht=[1,25],i=[1,26],It=[1,27],Wt=[1,28],Rt=[1,29],U=[1,32],N=[1,33],S=[1,34],k=[1,39],F=[1,40],P=[1,42],v=[1,44],Y=[1,62],M=[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],$t=[1,67],Ot=[1,68],Ut=[1,69],Nt=[1,70],Qt=[1,71],Xt=[1,72],Ht=[1,73],Yt=[1,74],Mt=[1,75],jt=[1,76],W=[4,5,6,7,8,9,10,11,12,13,14,15,18],V=[1,90],J=[1,91],Z=[1,92],tt=[1,99],et=[1,93],it=[1,96],at=[1,94],nt=[1,95],st=[1,97],rt=[1,98],bt=[1,102],Gt=[10,55,56,57],$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:l(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:l(function(Q,n,d,c,A,e,R){var r=e.length-1;switch(A){case 23:this.$=e[r];break;case 24:this.$=e[r-1]+""+e[r];break;case 26:this.$=e[r-1]+e[r];break;case 27:this.$=[e[r].trim()];break;case 28:e[r-2].push(e[r].trim()),this.$=e[r-2];break;case 29:this.$=e[r-4],c.addClass(e[r-2],e[r]);break;case 37:this.$=[];break;case 42:this.$=e[r].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[r].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[r].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[r].substr(8)),this.$=e[r].substr(8);break;case 47:c.addPoint(e[r-3],"",e[r-1],e[r],[]);break;case 48:c.addPoint(e[r-4],e[r-3],e[r-1],e[r],[]);break;case 49:c.addPoint(e[r-4],"",e[r-2],e[r-1],e[r]);break;case 50:c.addPoint(e[r-5],e[r-4],e[r-2],e[r-1],e[r]);break;case 51:c.setXAxisLeftText(e[r-2]),c.setXAxisRightText(e[r]);break;case 52:e[r-1].text+=" ⟶ ",c.setXAxisLeftText(e[r-1]);break;case 53:c.setXAxisLeftText(e[r]);break;case 54:c.setYAxisBottomText(e[r-2]),c.setYAxisTopText(e[r]);break;case 55:e[r-1].text+=" ⟶ ",c.setYAxisBottomText(e[r-1]);break;case 56:c.setYAxisBottomText(e[r]);break;case 57:c.setQuadrant1Text(e[r]);break;case 58:c.setQuadrant2Text(e[r]);break;case 59:c.setQuadrant3Text(e[r]);break;case 60:c.setQuadrant4Text(e[r]);break;case 64:this.$={text:e[r],type:"text"};break;case 65:this.$={text:e[r-1].text+""+e[r],type:e[r-1].type};break;case 66:this.$={text:e[r],type:"text"};break;case 67:this.$={text:e[r],type:"markdown"};break;case 68:this.$=e[r];break;case 69:this.$=e[r-1]+""+e[r];break}},"anonymous"),table:[{18:a,26:1,27:2,28:f,55:u,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:f,55:u,56:o,57:x},{18:a,26:9,27:2,28:f,55:u,56:o,57:x},t(b,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(s,_,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:p,5:q,10:T,12:y,13:g,14:m,18:H,25:C,35:ct,37:dt,39:ut,41:xt,42:ft,48:ot,50:ht,51:i,52:It,53:Wt,54:Rt,60:U,61:N,63:S,64:k,65:F,66:P,67:v}),t(b,[2,34]),{27:45,55:u,56:o,57:x},t(s,[2,37]),t(s,_,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:p,5:q,10:T,12:y,13:g,14:m,18:H,25:C,35:ct,37:dt,39:ut,41:xt,42:ft,48:ot,50:ht,51:i,52:It,53:Wt,54:Rt,60:U,61:N,63:S,64:k,65:F,66:P,67:v}),t(s,[2,39]),t(s,[2,40]),t(s,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(s,[2,45]),t(s,[2,46]),{18:[1,50]},{4:p,5:q,10:T,12:y,13:g,14:m,43:51,58:31,60:U,61:N,63:S,64:k,65:F,66:P,67:v},{4:p,5:q,10:T,12:y,13:g,14:m,43:52,58:31,60:U,61:N,63:S,64:k,65:F,66:P,67:v},{4:p,5:q,10:T,12:y,13:g,14:m,43:53,58:31,60:U,61:N,63:S,64:k,65:F,66:P,67:v},{4:p,5:q,10:T,12:y,13:g,14:m,43:54,58:31,60:U,61:N,63:S,64:k,65:F,66:P,67:v},{4:p,5:q,10:T,12:y,13:g,14:m,43:55,58:31,60:U,61:N,63:S,64:k,65:F,66:P,67:v},{4:p,5:q,10:T,12:y,13:g,14:m,43:56,58:31,60:U,61:N,63:S,64:k,65:F,66:P,67:v},{4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,44:[1,57],47:[1,58],58:60,59:59,63:S,64:k,65:F,66:P,67:v},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(b,[2,35]),t(s,[2,38]),t(s,[2,42]),t(s,[2,43]),t(s,[2,44]),{3:64,4:wt,5:Bt,6:$t,7:Ot,8:Ut,9:Nt,10:Qt,11:Xt,12:Ht,13:Yt,14:Mt,15:jt,21:63},t(s,[2,53],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,49:[1,77],63:S,64:k,65:F,66:P,67:v}),t(s,[2,56],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,49:[1,78],63:S,64:k,65:F,66:P,67:v}),t(s,[2,57],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,63:S,64:k,65:F,66:P,67:v}),t(s,[2,58],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,63:S,64:k,65:F,66:P,67:v}),t(s,[2,59],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,63:S,64:k,65:F,66:P,67:v}),t(s,[2,60],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,63:S,64:k,65:F,66:P,67:v}),{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:$t,7:Ot,8:Ut,9:Nt,10:Qt,11:Xt,12:Ht,13:Yt,14:Mt,15:jt,18:[1,81]},t(W,[2,23]),t(W,[2,1]),t(W,[2,2]),t(W,[2,3]),t(W,[2,4]),t(W,[2,5]),t(W,[2,6]),t(W,[2,7]),t(W,[2,8]),t(W,[2,9]),t(W,[2,10]),t(W,[2,11]),t(W,[2,12]),t(s,[2,52],{58:31,43:83,4:p,5:q,10:T,12:y,13:g,14:m,60:U,61:N,63:S,64:k,65:F,66:P,67:v}),t(s,[2,55],{58:31,43:84,4:p,5:q,10:T,12:y,13:g,14:m,60:U,61:N,63:S,64:k,65:F,66:P,67:v}),{46:[1,85]},{45:[1,86]},{4:V,5:J,6:Z,8:tt,11:et,13:it,16:89,17:at,18:nt,19:st,20:rt,22:88,23:87},t(W,[2,24]),t(s,[2,51],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,63:S,64:k,65:F,66:P,67:v}),t(s,[2,54],{59:59,58:60,4:p,5:q,8:Y,10:T,12:y,13:g,14:m,18:M,63:S,64:k,65:F,66:P,67:v}),t(s,[2,47],{22:88,16:89,23:100,4:V,5:J,6:Z,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),{46:[1,101]},t(s,[2,29],{10:bt}),t(Gt,[2,27],{16:103,4:V,5:J,6:Z,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),t($,[2,25]),t($,[2,13]),t($,[2,14]),t($,[2,15]),t($,[2,16]),t($,[2,17]),t($,[2,18]),t($,[2,19]),t($,[2,20]),t($,[2,21]),t($,[2,22]),t(s,[2,49],{10:bt}),t(s,[2,48],{22:88,16:89,23:104,4:V,5:J,6:Z,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),{4:V,5:J,6:Z,8:tt,11:et,13:it,16:89,17:at,18:nt,19:st,20:rt,22:105},t($,[2,26]),t(s,[2,50],{10:bt}),t(Gt,[2,28],{16:103,4:V,5:J,6:Z,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt})],defaultActions:{8:[2,30],9:[2,31]},parseError:l(function(Q,n){if(n.recoverable)this.trace(Q);else{var d=new Error(Q);throw d.hash=n,d}},"parseError"),parse:l(function(Q){var n=this,d=[0],c=[],A=[null],e=[],R=this.table,r="",pt=0,Kt=0,Te=2,Vt=1,qe=e.slice.call(arguments,1),E=Object.create(this.lexer),G={yy:{}};for(var St in this.yy)Object.prototype.hasOwnProperty.call(this.yy,St)&&(G.yy[St]=this.yy[St]);E.setInput(Q,G.yy),G.yy.lexer=E,G.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var kt=E.yylloc;e.push(kt);var me=E.options&&E.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(B){d.length=d.length-2*B,A.length=A.length-B,e.length=e.length-B}l(Ae,"popStack");function Jt(){var B;return B=c.pop()||E.lex()||Vt,typeof B!="number"&&(B instanceof Array&&(c=B,B=c.pop()),B=n.symbols_[B]||B),B}l(Jt,"lex");for(var w,K,O,Ft,lt={},yt,j,Zt,Tt;;){if(K=d[d.length-1],this.defaultActions[K]?O=this.defaultActions[K]:((w===null||typeof w>"u")&&(w=Jt()),O=R[K]&&R[K][w]),typeof O>"u"||!O.length||!O[0]){var Pt="";Tt=[];for(yt in R[K])this.terminals_[yt]&&yt>Te&&Tt.push("'"+this.terminals_[yt]+"'");E.showPosition?Pt="Parse error on line "+(pt+1)+`:
|
|
2
|
+
`+E.showPosition()+`
|
|
3
|
+
Expecting `+Tt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Pt="Parse error on line "+(pt+1)+": Unexpected "+(w==Vt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Pt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:kt,expected:Tt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+w);switch(O[0]){case 1:d.push(w),A.push(E.yytext),e.push(E.yylloc),d.push(O[1]),w=null,Kt=E.yyleng,r=E.yytext,pt=E.yylineno,kt=E.yylloc;break;case 2:if(j=this.productions_[O[1]][1],lt.$=A[A.length-j],lt._$={first_line:e[e.length-(j||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(j||1)].first_column,last_column:e[e.length-1].last_column},me&&(lt._$.range=[e[e.length-(j||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(lt,[r,Kt,pt,G.yy,O[1],A,e].concat(qe)),typeof Ft<"u")return Ft;j&&(d=d.slice(0,-1*j*2),A=A.slice(0,-1*j),e=e.slice(0,-1*j)),d.push(this.productions_[O[1]][0]),A.push(lt.$),e.push(lt._$),Zt=R[d[d.length-2]][d[d.length-1]],d.push(Zt);break;case 3:return!0}}return!0},"parse")},ye=function(){var Q={EOF:1,parseError:l(function(n,d){if(this.yy.parser)this.yy.parser.parseError(n,d);else throw new Error(n)},"parseError"),setInput:l(function(n,d){return this.yy=d||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:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var d=n.match(/(?:\r\n?|\n).*/g);return d?(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:l(function(n){var d=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;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),c.length-1&&(this.yylineno-=c.length-1);var e=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===A.length?this.yylloc.first_column:0)+A[A.length-c.length].length-c[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(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:l(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:l(function(){var n=this.pastInput(),d=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
|
+
`+d+"^"},"showPosition"),test_match:l(function(n,d){var c,A,e;if(this.options.backtrack_lexer&&(e={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&&(e.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],c=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var R in e)this[R]=e[R];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,d,c,A;this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),R=0;R<e.length;R++)if(c=this._input.match(this.rules[e[R]]),c&&(!d||c[0].length>d[0].length)){if(d=c,A=R,this.options.backtrack_lexer){if(n=this.test_match(c,e[R]),n!==!1)return n;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(n=this.test_match(d,e[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:l(function(){var n=this.next();return n||this.lex()},"lex"),begin:l(function(n){this.conditionStack.push(n)},"begin"),popState:l(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:l(function(n){this.begin(n)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(n,d,c,A){switch(c){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 Q}();_t.lexer=ye;function gt(){this.yy={}}return l(gt,"Parser"),gt.prototype=_t,_t.Parser=gt,new gt}();Et.parser=Et;var Ee=Et,I=Ce(),Ct,De=(Ct=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,a,f,u,o,x,b,h,s,_,p,q,T,y,g,m,H,C;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((t=D.quadrantChart)==null?void 0:t.chartWidth)||500,chartWidth:((a=D.quadrantChart)==null?void 0:a.chartHeight)||500,titlePadding:((f=D.quadrantChart)==null?void 0:f.titlePadding)||10,titleFontSize:((u=D.quadrantChart)==null?void 0:u.titleFontSize)||20,quadrantPadding:((o=D.quadrantChart)==null?void 0:o.quadrantPadding)||5,xAxisLabelPadding:((x=D.quadrantChart)==null?void 0:x.xAxisLabelPadding)||5,yAxisLabelPadding:((b=D.quadrantChart)==null?void 0:b.yAxisLabelPadding)||5,xAxisLabelFontSize:((h=D.quadrantChart)==null?void 0:h.xAxisLabelFontSize)||16,yAxisLabelFontSize:((s=D.quadrantChart)==null?void 0:s.yAxisLabelFontSize)||16,quadrantLabelFontSize:((_=D.quadrantChart)==null?void 0:_.quadrantLabelFontSize)||16,quadrantTextTopPadding:((p=D.quadrantChart)==null?void 0:p.quadrantTextTopPadding)||5,pointTextPadding:((q=D.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((T=D.quadrantChart)==null?void 0:T.pointLabelFontSize)||12,pointRadius:((y=D.quadrantChart)==null?void 0:y.pointRadius)||5,xAxisPosition:((g=D.quadrantChart)==null?void 0:g.xAxisPosition)||"top",yAxisPosition:((m=D.quadrantChart)==null?void 0:m.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((H=D.quadrantChart)==null?void 0:H.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((C=D.quadrantChart)==null?void 0:C.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,mt.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){mt.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){mt.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,a,f,u){const o=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,x={top:t==="top"&&a?o:0,bottom:t==="bottom"&&a?o:0},b=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,h={left:this.config.yAxisPosition==="left"&&f?b:0,right:this.config.yAxisPosition==="right"&&f?b:0},s=this.config.titleFontSize+this.config.titlePadding*2,_={top:u?s:0},p=this.config.quadrantPadding+h.left,q=this.config.quadrantPadding+x.top+_.top,T=this.config.chartWidth-this.config.quadrantPadding*2-h.left-h.right,y=this.config.chartHeight-this.config.quadrantPadding*2-x.top-x.bottom-_.top,g=T/2,m=y/2;return{xAxisSpace:x,yAxisSpace:h,titleSpace:_,quadrantSpace:{quadrantLeft:p,quadrantTop:q,quadrantWidth:T,quadrantHalfWidth:g,quadrantHeight:y,quadrantHalfHeight:m}}}getAxisLabels(t,a,f,u){const{quadrantSpace:o,titleSpace:x}=u,{quadrantHalfHeight:b,quadrantHeight:h,quadrantLeft:s,quadrantHalfWidth:_,quadrantTop:p,quadrantWidth:q}=o,T=!!this.data.xAxisRightText,y=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&a&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(T?_/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+p+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&a&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+_+(T?_/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+p+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&f&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+q+this.config.quadrantPadding,y:p+h-(y?b/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&f&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+q+this.config.quadrantPadding,y:p+b-(y?b/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:a}=t,{quadrantHalfHeight:f,quadrantLeft:u,quadrantHalfWidth:o,quadrantTop:x}=a,b=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:u+o,y:x,width:o,height:f,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:u,y:x,width:o,height:f,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:u,y:x+f,width:o,height:f,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:u+o,y:x+f,width:o,height:f,fill:this.themeConfig.quadrant4Fill}];for(const h of b)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 b}getQuadrantPoints(t){const{quadrantSpace:a}=t,{quadrantHeight:f,quadrantLeft:u,quadrantTop:o,quadrantWidth:x}=a,b=te().domain([0,1]).range([u,x+u]),h=te().domain([0,1]).range([f+o,o]);return this.data.points.map(s=>{const _=this.classes.get(s.className);return _&&(s={..._,...s}),{x:b(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:b(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:f}=t,{quadrantHalfHeight:u,quadrantHeight:o,quadrantLeft:x,quadrantHalfWidth:b,quadrantTop:h,quadrantWidth:s}=f;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h,x2:x+s+a,y2:h},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x+s,y1:h+a,x2:x+s,y2:h+o-a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h+o,x2:x+s+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+b,y1:h+a,x2:x+b,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+a,y1:h+u,x2:x+s-a,y2:h+u}]}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),f=this.config.showTitle&&!!this.data.titleText,u=this.data.points.length>0?"bottom":this.config.xAxisPosition,o=this.calculateSpace(u,t,a,f);return{points:this.getQuadrantPoints(o),quadrants:this.getQuadrants(o),axisLabels:this.getAxisLabels(u,t,a,o),borderLines:this.getBorders(o),title:this.getTitle(f)}}},l(Ct,"QuadrantBuilder"),Ct),Lt,qt=(Lt=class extends Error{constructor(t,a,f){super(`value for ${t} ${a} is invalid, please use a valid ${f}`),this.name="InvalidStyleError"}},l(Lt,"InvalidStyleError"),Lt);function Dt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}l(Dt,"validateHexCode");function ie(t){return!/^\d+$/.test(t)}l(ie,"validateNumber");function ae(t){return!/^\d+px$/.test(t)}l(ae,"validateSizeInPixels");var ze=zt();function X(t){return Le(t.trim(),ze)}l(X,"textSanitizer");var z=new De;function ne(t){z.setData({quadrant1Text:X(t.text)})}l(ne,"setQuadrant1Text");function se(t){z.setData({quadrant2Text:X(t.text)})}l(se,"setQuadrant2Text");function re(t){z.setData({quadrant3Text:X(t.text)})}l(re,"setQuadrant3Text");function le(t){z.setData({quadrant4Text:X(t.text)})}l(le,"setQuadrant4Text");function oe(t){z.setData({xAxisLeftText:X(t.text)})}l(oe,"setXAxisLeftText");function he(t){z.setData({xAxisRightText:X(t.text)})}l(he,"setXAxisRightText");function ce(t){z.setData({yAxisTopText:X(t.text)})}l(ce,"setYAxisTopText");function de(t){z.setData({yAxisBottomText:X(t.text)})}l(de,"setYAxisBottomText");function At(t){const a={};for(const f of t){const[u,o]=f.trim().split(/\s*:\s*/);if(u==="radius"){if(ie(o))throw new qt(u,o,"number");a.radius=parseInt(o)}else if(u==="color"){if(Dt(o))throw new qt(u,o,"hex code");a.color=o}else if(u==="stroke-color"){if(Dt(o))throw new qt(u,o,"hex code");a.strokeColor=o}else if(u==="stroke-width"){if(ae(o))throw new qt(u,o,"number of pixels (eg. 10px)");a.strokeWidth=o}else throw new Error(`style named ${u} is not supported.`)}return a}l(At,"parseStyles");function ue(t,a,f,u,o){const x=At(o);z.addPoints([{x:f,y:u,text:X(t.text),className:a,...x}])}l(ue,"addPoint");function xe(t,a){z.addClass(t,At(a))}l(xe,"addClass");function fe(t){z.setConfig({chartWidth:t})}l(fe,"setWidth");function ge(t){z.setConfig({chartHeight:t})}l(ge,"setHeight");function pe(){const t=zt(),{themeVariables:a,quadrantChart:f}=t;return f&&z.setConfig(f),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:ee()}),z.build()}l(pe,"getQuadrantData");var Ie=l(function(){z.clear(),ve()},"clear"),We={setWidth:fe,setHeight:ge,setQuadrant1Text:ne,setQuadrant2Text:se,setQuadrant3Text:re,setQuadrant4Text:le,setXAxisLeftText:oe,setXAxisRightText:he,setYAxisTopText:ce,setYAxisBottomText:de,parseStyles:At,addPoint:ue,addClass:xe,getQuadrantData:pe,clear:Ie,setAccTitle:Fe,getAccTitle:ke,setDiagramTitle:Se,getDiagramTitle:ee,getAccDescription:_e,setAccDescription:be},Re=l((t,a,f,u)=>{var o,x,b;function h(i){return i==="top"?"hanging":"middle"}l(h,"getDominantBaseLine");function s(i){return i==="left"?"start":"middle"}l(s,"getTextAnchor");function _(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}l(_,"getTransformation");const p=zt();mt.debug(`Rendering quadrant chart
|
|
7
|
+
`+t);const q=p.securityLevel;let T;q==="sandbox"&&(T=vt("#i"+a));const y=(q==="sandbox"?vt(T.nodes()[0].contentDocument.body):vt("body")).select(`[id="${a}"]`),g=y.append("g").attr("class","main"),m=((o=p.quadrantChart)==null?void 0:o.chartWidth)??500,H=((x=p.quadrantChart)==null?void 0:x.chartHeight)??500;Pe(y,H,m,((b=p.quadrantChart)==null?void 0:b.useMaxWidth)??!0),y.attr("viewBox","0 0 "+m+" "+H),u.db.setHeight(H),u.db.setWidth(m);const C=u.db.getQuadrantData(),ct=g.append("g").attr("class","quadrants"),dt=g.append("g").attr("class","border"),ut=g.append("g").attr("class","data-points"),xt=g.append("g").attr("class","labels"),ft=g.append("g").attr("class","title");C.title&&ft.append("text").attr("x",0).attr("y",0).attr("fill",C.title.fill).attr("font-size",C.title.fontSize).attr("dominant-baseline",h(C.title.horizontalPos)).attr("text-anchor",s(C.title.verticalPos)).attr("transform",_(C.title)).text(C.title.text),C.borderLines&&dt.selectAll("line").data(C.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=ct.selectAll("g.quadrant").data(C.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=>h(i.text.horizontalPos)).attr("text-anchor",i=>s(i.text.verticalPos)).attr("transform",i=>_(i.text)).text(i=>i.text.text),xt.selectAll("g.label").data(C.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=>h(i.horizontalPos)).attr("text-anchor",i=>s(i.verticalPos)).attr("transform",i=>_(i));const ht=ut.selectAll("g.data-point").data(C.points).enter().append("g").attr("class","data-point");ht.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),ht.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=>h(i.text.horizontalPos)).attr("text-anchor",i=>s(i.text.verticalPos)).attr("transform",i=>_(i.text))},"draw"),we={draw:Re},$e={parser:Ee,db:We,renderer:we,styles:l(()=>"","styles")};export{$e as diagram};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{d as We}from"./chunk-55IACEB6-_r7qMy9s-CVsj1DxS.js";import{d as Ge}from"./chunk-QN33PNHL-C8-RyAc3-DADdydNm.js";import{R as o,s as Xe,l as Ze,f as ze,u as Je,n as et,o as tt,c as ke,O as Ne,t as st,E as it,Z as rt,X as nt,k as at}from"./index-CIi9dO9d.js";var Ce=function(){var e=o(function(F,i,r,s){for(r=r||{},s=F.length;s--;r[F[s]]=i);return r},"o"),E=[1,3],h=[1,4],c=[1,5],a=[1,6],m=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],f=[1,22],l=[2,7],u=[1,26],g=[1,27],b=[1,28],C=[1,29],A=[1,33],q=[1,34],v=[1,35],L=[1,36],O=[1,37],x=[1,38],w=[1,24],D=[1,31],M=[1,32],$=[1,30],d=[1,39],R=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],U=[1,61],Z=[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],me=[27,29],qe=[1,70],ve=[1,71],Le=[1,72],Oe=[1,73],xe=[1,74],we=[1,75],De=[1,76],J=[1,83],V=[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],Ee=[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],Me=[1,101],$e=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[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],j=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[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(F,i,r,s,y,t,S){var n=t.length-1;switch(y){case 4:this.$=t[n].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[n].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[n-3],t[n-4]);break;case 22:s.addRequirement(t[n-5],t[n-6]),s.setClass([t[n-5]],t[n-3]);break;case 23:s.setNewReqId(t[n-2]);break;case 24:s.setNewReqText(t[n-2]);break;case 25:s.setNewReqRisk(t[n-2]);break;case 26:s.setNewReqVerifyMethod(t[n-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[n-3]);break;case 43:s.addElement(t[n-5]),s.setClass([t[n-5]],t[n-3]);break;case 44:s.setNewElementType(t[n-2]);break;case 45:s.setNewElementDocRef(t[n-2]);break;case 48:s.addRelationship(t[n-2],t[n],t[n-4]);break;case 49:s.addRelationship(t[n-2],t[n-4],t[n]);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[n-2],s.defineClass(t[n-1],t[n]);break;case 58:s.setClass(t[n-1],t[n]);break;case 59:s.setClass([t[n-2]],t[n]);break;case 60:case 62:this.$=[t[n]];break;case 61:case 63:this.$=t[n-2].concat([t[n]]);break;case 64:this.$=t[n-2],s.setCssStyle(t[n-1],t[n]);break;case 65:this.$=[t[n]];break;case 66:t[n-2].push(t[n]),this.$=t[n-2];break;case 68:this.$=t[n-1]+t[n];break}},"anonymous"),table:[{3:1,4:2,6:E,9:h,11:c,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:E,9:h,11:c,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(m,[2,6]),{3:12,4:2,6:E,9:h,11:c,13:a},{1:[2,2]},{4:17,5:f,7:13,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},e(m,[2,4]),e(m,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:f,7:42,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:43,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:44,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:45,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:46,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:47,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:48,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:49,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{4:17,5:f,7:50,8:l,9:h,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:g,23:b,24:C,25:23,33:25,41:A,42:q,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:d,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:U,89:d,90:R},{30:63,33:62,75:U,89:d,90:R},{30:64,33:62,75:U,89:d,90:R},e(Z,[2,29]),e(Z,[2,30]),e(Z,[2,31]),e(Z,[2,32]),e(Z,[2,33]),e(Z,[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(me,[2,79]),e(me,[2,80]),{27:[1,67],29:[1,68]},e(me,[2,85]),e(me,[2,86]),{62:69,65:qe,66:ve,67:Le,68:Oe,69:xe,70:we,71:De},{62:77,65:qe,66:ve,67:Le,68:Oe,69:xe,70:we,71:De},{30:78,33:62,75:U,89:d,90:R},{73:79,75:J,76:V,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:J,76:V,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:U,76:V,89:d,90:R},{5:[1,95]},{30:96,33:62,75:U,89:d,90:R},{5:[1,97]},{30:98,33:62,75:U,89:d,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:V}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:d,90:R},e($e,[2,65],{79:104,75:J,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:V}),{5:B,28:105,31:Q,34:H,36:K,38:j,40:W},{27:[1,112],76:V},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:V},{33:119,89:d,90:R},{33:120,89:d,90:R},{75:J,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(k,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:j,40:W},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e($e,[2,66],{79:104,75:J,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:d,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:j,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:j,40:W},{5:B,28:160,31:Q,34:H,36:K,38:j,40:W},{5:B,28:161,31:Q,34:H,36:K,38:j,40:W},{5:B,28:162,31:Q,34:H,36:K,38:j,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:o(function(F,i){if(i.recoverable)this.trace(F);else{var r=new Error(F);throw r.hash=i,r}},"parseError"),parse:o(function(F){var i=this,r=[0],s=[],y=[null],t=[],S=this.table,n="",de=0,Fe=0,Qe=2,Pe=1,He=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(G.yy[ge]=this.yy[ge]);_.setInput(F,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Se=_.yylloc;t.push(Se);var Ke=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(T){r.length=r.length-2*T,y.length=y.length-T,t.length=t.length-T}o(je,"popStack");function Ue(){var T;return T=s.pop()||_.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=i.symbols_[T]||T),T}o(Ue,"lex");for(var I,X,N,Ie,z={},Re,P,Ve,fe;;){if(X=r[r.length-1],this.defaultActions[X]?N=this.defaultActions[X]:((I===null||typeof I>"u")&&(I=Ue()),N=S[X]&&S[X][I]),typeof N>"u"||!N.length||!N[0]){var Te="";fe=[];for(Re in S[X])this.terminals_[Re]&&Re>Qe&&fe.push("'"+this.terminals_[Re]+"'");_.showPosition?Te="Parse error on line "+(de+1)+`:
|
|
2
|
+
`+_.showPosition()+`
|
|
3
|
+
Expecting `+fe.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Te="Parse error on line "+(de+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Te,{text:_.match,token:this.terminals_[I]||I,line:_.yylineno,loc:Se,expected:fe})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+I);switch(N[0]){case 1:r.push(I),y.push(_.yytext),t.push(_.yylloc),r.push(N[1]),I=null,Fe=_.yyleng,n=_.yytext,de=_.yylineno,Se=_.yylloc;break;case 2:if(P=this.productions_[N[1]][1],z.$=y[y.length-P],z._$={first_line:t[t.length-(P||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(P||1)].first_column,last_column:t[t.length-1].last_column},Ke&&(z._$.range=[t[t.length-(P||1)].range[0],t[t.length-1].range[1]]),Ie=this.performAction.apply(z,[n,Fe,de,G.yy,N[1],y,t].concat(He)),typeof Ie<"u")return Ie;P&&(r=r.slice(0,-1*P*2),y=y.slice(0,-1*P),t=t.slice(0,-1*P)),r.push(this.productions_[N[1]][0]),y.push(z.$),t.push(z._$),Ve=S[r[r.length-2]][r[r.length-1]],r.push(Ve);break;case 3:return!0}}return!0},"parse")},Be=function(){var F={EOF:1,parseError:o(function(i,r){if(this.yy.parser)this.yy.parser.parseError(i,r);else throw new Error(i)},"parseError"),setInput:o(function(i,r){return this.yy=r||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 r=i.match(/(?:\r\n?|\n).*/g);return r?(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 r=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var y=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),s.length-1&&(this.yylineno-=s.length-1);var t=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:s?(s.length===y.length?this.yylloc.first_column:0)+y[y.length-s.length].length-s[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[t[0],t[0]+this.yyleng-r]),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(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+r+"^"},"showPosition"),test_match:o(function(i,r){var s,y,t;if(this.options.backtrack_lexer&&(t={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&&(t.yylloc.range=this.yylloc.range.slice(0))),y=i[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.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],s=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var S in t)this[S]=t[S];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,s,y;this._more||(this.yytext="",this.match="");for(var t=this._currentRules(),S=0;S<t.length;S++)if(s=this._input.match(this.rules[t[S]]),s&&(!r||s[0].length>r[0].length)){if(r=s,y=S,this.options.backtrack_lexer){if(i=this.test_match(s,t[S]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,t[y]),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 i=this.next();return i||this.lex()},"lex"),begin:o(function(i){this.conditionStack.push(i)},"begin"),popState:o(function(){var i=this.conditionStack.length-1;return i>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(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:o(function(i){this.begin(i)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(i,r,s,y){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 r.yytext=r.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 F}();_e.lexer=Be;function pe(){this.yy={}}return o(pe,"Parser"),pe.prototype=_e,_e.Parser=pe,new pe}();Ce.parser=Ce;var lt=Ce,be,ct=(be=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=Xe,this.getAccTitle=Ze,this.setAccDescription=ze,this.getAccDescription=Je,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)}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,E){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:E,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,E,h){this.relations.push({type:e,src:E,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,E){for(const h of e){const c=this.requirements.get(h)??this.elements.get(h);if(!E||!c)return;for(const a of E)a.includes(",")?c.cssStyles.push(...a.split(",")):c.cssStyles.push(a)}}setClass(e,E){var h;for(const c of e){const a=this.requirements.get(c)??this.elements.get(c);if(a)for(const m of E){a.classes.push(m);const f=(h=this.classes.get(m))==null?void 0:h.styles;f&&a.cssStyles.push(...f)}}}defineClass(e,E){for(const h of e){let c=this.classes.get(h);c===void 0&&(c={id:h,styles:[],textStyles:[]},this.classes.set(h,c)),E&&E.forEach(function(a){if(/color/.exec(a)){const m=a.replace("fill","bgFill");c.textStyles.push(m)}c.styles.push(a)}),this.requirements.forEach(a=>{a.classes.includes(h)&&a.cssStyles.push(...E.flatMap(m=>m.split(",")))}),this.elements.forEach(a=>{a.classes.includes(h)&&a.cssStyles.push(...E.flatMap(m=>m.split(",")))})}}getClasses(){return this.classes}getData(){var e,E,h,c;const a=ke(),m=[],f=[];for(const l of this.requirements.values()){const u=l;u.id=l.name,u.cssStyles=l.cssStyles,u.cssClasses=l.classes.join(" "),u.shape="requirementBox",u.look=a.look,m.push(u)}for(const l of this.elements.values()){const u=l;u.shape="requirementBox",u.look=a.look,u.id=l.name,u.cssStyles=l.cssStyles,u.cssClasses=l.classes.join(" "),m.push(u)}for(const l of this.relations){let u=0;const g=l.type===this.Relationships.CONTAINS,b={id:`${l.src}-${l.dst}-${u}`,start:((e=this.requirements.get(l.src))==null?void 0:e.name)??((E=this.elements.get(l.src))==null?void 0:E.name),end:((h=this.requirements.get(l.dst))==null?void 0:h.name)??((c=this.elements.get(l.dst))==null?void 0:c.name),label:`<<${l.type}>>`,classes:"relationshipLine",style:["fill:none",g?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:g?"normal":"dashed",arrowTypeStart:g?"requirement_contains":"",arrowTypeEnd:g?"":"requirement_arrow",look:a.look};f.push(b),u++}return{nodes:m,edges:f,other:{},config:a,direction:this.getDirection()}}},o(be,"RequirementDB"),be),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,E,h,c){Ne.info("REF0:"),Ne.info("Drawing requirement diagram (unified)",E);const{securityLevel:a,state:m,layout:f}=ke(),l=c.db.getData(),u=We(E,a);l.type=c.type,l.layoutAlgorithm=rt(f),l.nodeSpacing=(m==null?void 0:m.nodeSpacing)??50,l.rankSpacing=(m==null?void 0:m.rankSpacing)??50,l.markers=["requirement_contains","requirement_arrow"],l.diagramId=E,await nt(l,u),at.insertTitle(u,"requirementDiagramTitleText",(m==null?void 0:m.titleTopMargin)??25,c.db.getDiagramTitle()),Ge(u,8,"requirementDiagram",(m==null?void 0:m.useMaxWidth)??!0)},"draw"),pt={parser:lt,get db(){return new ct},renderer:Ye,styles:ht};export{pt as diagram};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{R as p,n as xt,o as kt,f as vt,u as bt,s as wt,l as St,c as lt,D as Et,e as X,ap as Lt,aT as Mt,t as At,x as Tt}from"./index-CIi9dO9d.js";function Pt(t){for(var n=t.length/6|0,r=new Array(n),a=0;a<n;)r[a]="#"+t.slice(a*6,++a*6);return r}const Nt=Pt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let r;if(n===void 0)for(const a of t)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let c of t)(c=n(c,++a,t))!=null&&(r<c||r===void 0&&c>=c)&&(r=c)}return r}function pt(t,n){let r;if(n===void 0)for(const a of t)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let c of t)(c=n(c,++a,t))!=null&&(r>c||r===void 0&&c>=c)&&(r=c)}return r}function tt(t,n){let r=0;if(n===void 0)for(let a of t)(a=+a)&&(r+=a);else{let a=-1;for(let c of t)(c=+n(c,++a,t))&&(r+=c)}return r}function Ot(t){return t.target.depth}function Ct(t){return t.depth}function It(t,n){return n-1-t.height}function _t(t,n){return t.sourceLinks.length?t.depth:n-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Ot)-1:0}function Y(t){return function(){return t}}function ut(t,n){return K(t.source,n.source)||t.index-n.index}function ht(t,n){return K(t.target,n.target)||t.index-n.index}function K(t,n){return t.y0-n.y0}function et(t){return t.value}function $t(t){return t.index}function jt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const r=t.get(n);if(!r)throw new Error("missing: "+n);return r}function yt({nodes:t}){for(const n of t){let r=n.y0,a=r;for(const c of n.sourceLinks)c.y0=r+c.width/2,r+=c.width;for(const c of n.targetLinks)c.y1=a+c.width/2,a+=c.width}}function Ft(){let t=0,n=0,r=1,a=1,c=24,k=8,_,m=$t,i=_t,o,f,d=jt,y=zt,w=6;function v(){const e={nodes:d.apply(null,arguments),links:y.apply(null,arguments)};return N(e),A(e),T(e),I(e),O(e),yt(e),e}v.update=function(e){return yt(e),e},v.nodeId=function(e){return arguments.length?(m=typeof e=="function"?e:Y(e),v):m},v.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:Y(e),v):i},v.nodeSort=function(e){return arguments.length?(o=e,v):o},v.nodeWidth=function(e){return arguments.length?(c=+e,v):c},v.nodePadding=function(e){return arguments.length?(k=_=+e,v):k},v.nodes=function(e){return arguments.length?(d=typeof e=="function"?e:Y(e),v):d},v.links=function(e){return arguments.length?(y=typeof e=="function"?e:Y(e),v):y},v.linkSort=function(e){return arguments.length?(f=e,v):f},v.size=function(e){return arguments.length?(t=n=0,r=+e[0],a=+e[1],v):[r-t,a-n]},v.extent=function(e){return arguments.length?(t=+e[0][0],r=+e[1][0],n=+e[0][1],a=+e[1][1],v):[[t,n],[r,a]]},v.iterations=function(e){return arguments.length?(w=+e,v):w};function N({nodes:e,links:h}){for(const[u,s]of e.entries())s.index=u,s.sourceLinks=[],s.targetLinks=[];const l=new Map(e.map((u,s)=>[m(u,s,e),u]));for(const[u,s]of h.entries()){s.index=u;let{source:x,target:b}=s;typeof x!="object"&&(x=s.source=ft(l,x)),typeof b!="object"&&(b=s.target=ft(l,b)),x.sourceLinks.push(s),b.targetLinks.push(s)}if(f!=null)for(const{sourceLinks:u,targetLinks:s}of e)u.sort(f),s.sort(f)}function A({nodes:e}){for(const h of e)h.value=h.fixedValue===void 0?Math.max(tt(h.sourceLinks,et),tt(h.targetLinks,et)):h.fixedValue}function T({nodes:e}){const h=e.length;let l=new Set(e),u=new Set,s=0;for(;l.size;){for(const x of l){x.depth=s;for(const{target:b}of x.sourceLinks)u.add(b)}if(++s>h)throw new Error("circular link");l=u,u=new Set}}function I({nodes:e}){const h=e.length;let l=new Set(e),u=new Set,s=0;for(;l.size;){for(const x of l){x.height=s;for(const{source:b}of x.targetLinks)u.add(b)}if(++s>h)throw new Error("circular link");l=u,u=new Set}}function P({nodes:e}){const h=ct(e,s=>s.depth)+1,l=(r-t-c)/(h-1),u=new Array(h);for(const s of e){const x=Math.max(0,Math.min(h-1,Math.floor(i.call(null,s,h))));s.layer=x,s.x0=t+x*l,s.x1=s.x0+c,u[x]?u[x].push(s):u[x]=[s]}if(o)for(const s of u)s.sort(o);return u}function S(e){const h=pt(e,l=>(a-n-(l.length-1)*_)/tt(l,et));for(const l of e){let u=n;for(const s of l){s.y0=u,s.y1=u+s.value*h,u=s.y1+_;for(const x of s.sourceLinks)x.width=x.value*h}u=(a-u+_)/(l.length+1);for(let s=0;s<l.length;++s){const x=l[s];x.y0+=u*(s+1),x.y1+=u*(s+1)}$(l)}}function O(e){const h=P(e);_=Math.min(k,(a-n)/(ct(h,l=>l.length)-1)),S(h);for(let l=0;l<w;++l){const u=Math.pow(.99,l),s=Math.max(1-u,(l+1)/w);C(h,u,s),D(h,u,s)}}function D(e,h,l){for(let u=1,s=e.length;u<s;++u){const x=e[u];for(const b of x){let W=0,j=0;for(const{source:R,value:H}of b.targetLinks){let V=H*(b.layer-R.layer);W+=M(R,b)*V,j+=V}if(!(j>0))continue;let q=(W/j-b.y0)*h;b.y0+=q,b.y1+=q,E(b)}o===void 0&&x.sort(K),g(x,l)}}function C(e,h,l){for(let u=e.length,s=u-2;s>=0;--s){const x=e[s];for(const b of x){let W=0,j=0;for(const{target:R,value:H}of b.sourceLinks){let V=H*(R.layer-b.layer);W+=G(b,R)*V,j+=V}if(!(j>0))continue;let q=(W/j-b.y0)*h;b.y0+=q,b.y1+=q,E(b)}o===void 0&&x.sort(K),g(x,l)}}function g(e,h){const l=e.length>>1,u=e[l];U(e,u.y0-_,l-1,h),L(e,u.y1+_,l+1,h),U(e,a,e.length-1,h),L(e,n,0,h)}function L(e,h,l,u){for(;l<e.length;++l){const s=e[l],x=(h-s.y0)*u;x>1e-6&&(s.y0+=x,s.y1+=x),h=s.y1+_}}function U(e,h,l,u){for(;l>=0;--l){const s=e[l],x=(s.y1-h)*u;x>1e-6&&(s.y0-=x,s.y1-=x),h=s.y0-_}}function E({sourceLinks:e,targetLinks:h}){if(f===void 0){for(const{source:{sourceLinks:l}}of h)l.sort(ht);for(const{target:{targetLinks:l}}of e)l.sort(ut)}}function $(e){if(f===void 0)for(const{sourceLinks:h,targetLinks:l}of e)h.sort(ht),l.sort(ut)}function M(e,h){let l=e.y0-(e.sourceLinks.length-1)*_/2;for(const{target:u,width:s}of e.sourceLinks){if(u===h)break;l+=s+_}for(const{source:u,width:s}of h.targetLinks){if(u===e)break;l-=s}return l}function G(e,h){let l=h.y0-(h.targetLinks.length-1)*_/2;for(const{source:u,width:s}of h.targetLinks){if(u===e)break;l+=s+_}for(const{target:u,width:s}of e.sourceLinks){if(u===h)break;l-=s}return l}return v}var rt=Math.PI,st=2*rt,z=1e-6,Ut=st-z;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,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,r,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+r)+","+(this._y1=+a)},bezierCurveTo:function(t,n,r,a,c,k){this._+="C"+ +t+","+ +n+","+ +r+","+ +a+","+(this._x1=+c)+","+(this._y1=+k)},arcTo:function(t,n,r,a,c){t=+t,n=+n,r=+r,a=+a,c=+c;var k=this._x1,_=this._y1,m=r-t,i=a-n,o=k-t,f=_-n,d=o*o+f*f;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(d>z)if(!(Math.abs(f*m-i*o)>z)||!c)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var y=r-k,w=a-_,v=m*m+i*i,N=y*y+w*w,A=Math.sqrt(v),T=Math.sqrt(d),I=c*Math.tan((rt-Math.acos((v+d-N)/(2*A*T)))/2),P=I/T,S=I/A;Math.abs(P-1)>z&&(this._+="L"+(t+P*o)+","+(n+P*f)),this._+="A"+c+","+c+",0,0,"+ +(f*y>o*w)+","+(this._x1=t+S*m)+","+(this._y1=n+S*i)}},arc:function(t,n,r,a,c,k){t=+t,n=+n,r=+r,k=!!k;var _=r*Math.cos(a),m=r*Math.sin(a),i=t+_,o=n+m,f=1^k,d=k?a-c:c-a;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>z||Math.abs(this._y1-o)>z)&&(this._+="L"+i+","+o),r&&(d<0&&(d=d%st+st),d>Ut?this._+="A"+r+","+r+",0,1,"+f+","+(t-_)+","+(n-m)+"A"+r+","+r+",0,1,"+f+","+(this._x1=i)+","+(this._y1=o):d>z&&(this._+="A"+r+","+r+",0,"+ +(d>=rt)+","+f+","+(this._x1=t+r*Math.cos(c))+","+(this._y1=n+r*Math.sin(c))))},rect:function(t,n,r,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +r+"v"+ +a+"h"+-r+"Z"},toString:function(){return this._}};function gt(t){return function(){return t}}function Gt(t){return t[0]}function Wt(t){return t[1]}var qt=Array.prototype.slice;function Rt(t){return t.source}function Vt(t){return t.target}function Xt(t){var n=Rt,r=Vt,a=Gt,c=Wt,k=null;function _(){var m,i=qt.call(arguments),o=n.apply(this,i),f=r.apply(this,i);if(k||(k=m=mt()),t(k,+a.apply(this,(i[0]=o,i)),+c.apply(this,i),+a.apply(this,(i[0]=f,i)),+c.apply(this,i)),m)return k=null,m+""||null}return _.source=function(m){return arguments.length?(n=m,_):n},_.target=function(m){return arguments.length?(r=m,_):r},_.x=function(m){return arguments.length?(a=typeof m=="function"?m:gt(+m),_):a},_.y=function(m){return arguments.length?(c=typeof m=="function"?m:gt(+m),_):c},_.context=function(m){return arguments.length?(k=m??null,_):k},_}function Yt(t,n,r,a,c){t.moveTo(n,r),t.bezierCurveTo(n=(n+a)/2,r,n,c,a,c)}function Kt(){return Xt(Yt)}function Qt(t){return[t.source.x1,t.y0]}function Zt(t){return[t.target.x0,t.y1]}function Bt(){return Kt().source(Qt).target(Zt)}var at=function(){var t=p(function(m,i,o,f){for(o=o||{},f=m.length;f--;o[m[f]]=i);return o},"o"),n=[1,9],r=[1,10],a=[1,5,10,12],c={trace:p(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:p(function(m,i,o,f,d,y,w){var v=y.length-1;switch(d){case 7:const N=f.findOrCreateNode(y[v-4].trim().replaceAll('""','"')),A=f.findOrCreateNode(y[v-2].trim().replaceAll('""','"')),T=parseFloat(y[v].trim());f.addLink(N,A,T);break;case 8:case 9:case 11:this.$=y[v];break;case 10:this.$=y[v-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:r},{1:[2,6],7:11,10:[1,12]},t(r,[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(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:p(function(m,i){if(i.recoverable)this.trace(m);else{var o=new Error(m);throw o.hash=i,o}},"parseError"),parse:p(function(m){var i=this,o=[0],f=[],d=[null],y=[],w=this.table,v="",N=0,A=0,T=2,I=1,P=y.slice.call(arguments,1),S=Object.create(this.lexer),O={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(O.yy[D]=this.yy[D]);S.setInput(m,O.yy),O.yy.lexer=S,O.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var C=S.yylloc;y.push(C);var g=S.options&&S.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(b){o.length=o.length-2*b,d.length=d.length-b,y.length=y.length-b}p(L,"popStack");function U(){var b;return b=f.pop()||S.lex()||I,typeof b!="number"&&(b instanceof Array&&(f=b,b=f.pop()),b=i.symbols_[b]||b),b}p(U,"lex");for(var E,$,M,G,e={},h,l,u,s;;){if($=o[o.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((E===null||typeof E>"u")&&(E=U()),M=w[$]&&w[$][E]),typeof M>"u"||!M.length||!M[0]){var x="";s=[];for(h in w[$])this.terminals_[h]&&h>T&&s.push("'"+this.terminals_[h]+"'");S.showPosition?x="Parse error on line "+(N+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+s.join(", ")+", got '"+(this.terminals_[E]||E)+"'":x="Parse error on line "+(N+1)+": Unexpected "+(E==I?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(x,{text:S.match,token:this.terminals_[E]||E,line:S.yylineno,loc:C,expected:s})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+E);switch(M[0]){case 1:o.push(E),d.push(S.yytext),y.push(S.yylloc),o.push(M[1]),E=null,A=S.yyleng,v=S.yytext,N=S.yylineno,C=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=d[d.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},g&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),G=this.performAction.apply(e,[v,A,N,O.yy,M[1],d,y].concat(P)),typeof G<"u")return G;l&&(o=o.slice(0,-1*l*2),d=d.slice(0,-1*l),y=y.slice(0,-1*l)),o.push(this.productions_[M[1]][0]),d.push(e.$),y.push(e._$),u=w[o[o.length-2]][o[o.length-1]],o.push(u);break;case 3:return!0}}return!0},"parse")},k=function(){var m={EOF:1,parseError:p(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:p(function(i,o){return this.yy=o||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:p(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.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),i},"input"),unput:p(function(i){var o=i.length,f=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;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),f.length-1&&(this.yylineno-=f.length-1);var y=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:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(i){this.unput(this.match.slice(i))},"less"),pastInput:p(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:p(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:p(function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:p(function(i,o){var f,d,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),d=i[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+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],f=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var w in y)this[w]=y[w];return!1}return!1},"test_match"),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,f,d;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),w=0;w<y.length;w++)if(f=this._input.match(this.rules[y[w]]),f&&(!o||f[0].length>o[0].length)){if(o=f,d=w,this.options.backtrack_lexer){if(i=this.test_match(f,y[w]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,y[d]),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:p(function(){var i=this.next();return i||this.lex()},"lex"),begin:p(function(i){this.conditionStack.push(i)},"begin"),popState:p(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(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:p(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:p(function(i){this.begin(i)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:p(function(i,o,f,d){switch(f){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 m}();c.lexer=k;function _(){this.yy={}}return p(_,"Parser"),_.prototype=c,c.Parser=_,new _}();at.parser=at;var Q=at,B=[],J=[],Z=new Map,Jt=p(()=>{B=[],J=[],Z=new Map,At()},"clear"),nt,Ht=(nt=class{constructor(t,n,r=0){this.source=t,this.target=n,this.value=r}},p(nt,"SankeyLink"),nt),te=p((t,n,r)=>{B.push(new Ht(t,n,r))},"addLink"),it,ee=(it=class{constructor(t){this.ID=t}},p(it,"SankeyNode"),it),ne=p(t=>{t=Tt.sanitizeText(t,lt());let n=Z.get(t);return n===void 0&&(n=new ee(t),Z.set(t,n),J.push(n)),n},"findOrCreateNode"),ie=p(()=>J,"getNodes"),re=p(()=>B,"getLinks"),se=p(()=>({nodes:J.map(t=>({id:t.ID})),links:B.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:p(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:re,getGraph:se,addLink:te,findOrCreateNode:ne,getAccTitle:St,setAccTitle:wt,getAccDescription:bt,setAccDescription:vt,getDiagramTitle:kt,setDiagramTitle:xt,clear:Jt},F,dt=(F=class{static next(t){return new F(t+ ++F.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},p(F,"Uid"),F.count=0,F),ae={left:Ct,right:It,center:Dt,justify:_t},le=p(function(t,n,r,a){const{securityLevel:c,sankey:k}=lt(),_=Et.sankey;let m;c==="sandbox"&&(m=X("#i"+n));const i=c==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body"),o=c==="sandbox"?i.select(`[id="${n}"]`):X(`[id="${n}"]`),f=(k==null?void 0:k.width)??_.width,d=(k==null?void 0:k.height)??_.width,y=(k==null?void 0:k.useMaxWidth)??_.useMaxWidth,w=(k==null?void 0:k.nodeAlignment)??_.nodeAlignment,v=(k==null?void 0:k.prefix)??_.prefix,N=(k==null?void 0:k.suffix)??_.suffix,A=(k==null?void 0:k.showValues)??_.showValues,T=a.db.getGraph(),I=ae[w];Ft().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(A?15:0)).nodeAlign(I).extent([[0,0],[f,d]])(T);const P=Lt(Nt);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=dt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>P(g.id));const S=p(({id:g,value:L})=>A?`${g}
|
|
7
|
+
${v}${Math.round(L*100)/100}${N}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",g=>g.x0<f/2?g.x1+6:g.x0-6).attr("y",g=>(g.y1+g.y0)/2).attr("dy",`${A?"0":"0.35"}em`).attr("text-anchor",g=>g.x0<f/2?"start":"end").text(S);const O=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),D=(k==null?void 0:k.linkColor)??"gradient";if(D==="gradient"){const g=O.append("linearGradient").attr("id",L=>(L.uid=dt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",L=>L.source.x1).attr("x2",L=>L.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",L=>P(L.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",L=>P(L.target.id))}let C;switch(D){case"gradient":C=p(g=>g.uid,"coloring");break;case"source":C=p(g=>P(g.source.id),"coloring");break;case"target":C=p(g=>P(g.target.id),"coloring");break;default:C=D}O.append("path").attr("d",Bt()).attr("stroke",C).attr("stroke-width",g=>Math.max(1,g.width)),Mt(void 0,o,0,y)},"draw"),ce={draw:le},ue=p(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),he=p(t=>`.label {
|
|
9
|
+
font-family: ${t.fontFamily};
|
|
10
|
+
}`,"getStyles"),fe=he,ye=Q.parse.bind(Q);Q.parse=t=>ye(ue(t));var de={styles:fe,parser:Q,db:oe,renderer:ce};export{de as diagram};
|