@codragraph/cli 2.1.5 → 2.2.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -13
- package/dist/cli/analyze.d.ts +9 -4
- package/dist/cli/analyze.js +37 -13
- package/dist/cli/graphpack.d.ts +48 -0
- package/dist/cli/graphpack.js +217 -0
- package/dist/cli/index.js +81 -3
- package/dist/cli/status.d.ts +1 -1
- package/dist/cli/status.js +8 -0
- package/dist/cli/tool.d.ts +11 -2
- package/dist/cli/tool.js +138 -8
- package/dist/core/adaptive-profile.d.ts +52 -0
- package/dist/core/adaptive-profile.js +180 -0
- package/dist/core/cgdb/cgdb-adapter.d.ts +34 -5
- package/dist/core/cgdb/cgdb-adapter.js +418 -5
- package/dist/core/cgdb/pool-adapter.js +1 -1
- package/dist/core/graphpack/index.d.ts +14 -0
- package/dist/core/graphpack/index.js +474 -0
- package/dist/core/graphpack/types.d.ts +129 -0
- package/dist/core/graphpack/types.js +4 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +3 -1
- package/dist/core/ingestion/pipeline-phases/structure.js +19 -3
- package/dist/core/ingestion/pipeline.d.ts +10 -0
- package/dist/core/run-analyze.d.ts +27 -2
- package/dist/core/run-analyze.js +598 -27
- package/dist/core/search/bm25-index.d.ts +19 -0
- package/dist/core/search/bm25-index.js +68 -29
- package/dist/core/semantic/relationships.d.ts +36 -0
- package/dist/core/semantic/relationships.js +261 -0
- package/dist/mcp/local/local-backend.js +48 -3
- package/dist/mcp/resources.js +125 -0
- package/dist/mcp/tools.js +105 -0
- package/dist/server/api.js +112 -0
- package/dist/storage/repo-manager.d.ts +29 -0
- package/dist/web/assets/agent-CQNZQ-hg.js +1139 -0
- package/dist/web/assets/architectureDiagram-UL44E2DR-B5_goS_i.js +36 -0
- package/dist/web/assets/blockDiagram-7IZFK4PR-D7ZAlDyv.js +132 -0
- package/dist/web/assets/{c4Diagram-DFAF54RM-C4Hl3J2U.js → c4Diagram-Y2BXMSZH-Djcgm_54.js} +1 -1
- package/dist/web/assets/{chunk-7RZVMHOQ-BitYcNVR.js → chunk-3SSMPTDK-Cv2Zy2FO.js} +1 -1
- package/dist/web/assets/{chunk-TBF5ZNIQ-DL5stGM1.js → chunk-6764PJDD-Cppb-jH-.js} +1 -1
- package/dist/web/assets/{chunk-KSICW3F5-BYzvDLNI.js → chunk-AZZRMDJM-BHlLC7p3.js} +1 -1
- package/dist/web/assets/{chunk-AEOMTBSW-BgTIXPsY.js → chunk-JQRUD6KW-3F8Zg-1N.js} +1 -1
- package/dist/web/assets/chunk-KRXBNO2N-C0mbN9a7.js +1 -0
- package/dist/web/assets/chunk-LCXTWHL2-BoiuJpIF.js +231 -0
- package/dist/web/assets/{chunk-O5ABG6QK-dHwHzA6n.js → chunk-LII3EMHJ-Dqq0Qguw.js} +1 -1
- package/dist/web/assets/chunk-RG4AUYOV-Bl5F_gDs.js +206 -0
- package/dist/web/assets/{chunk-TU3PZOEN-RLyvLcv-.js → chunk-T5OCTHI4-B2tIcggA.js} +1 -1
- package/dist/web/assets/chunk-W44A43WB-BHe37iN7.js +13 -0
- package/dist/web/assets/{chunk-RWUO3TPN-BgRTY0_k.js → chunk-ZXARS5L4-wcrIaQvY.js} +1 -1
- package/dist/web/assets/classDiagram-KGZ6W3CR-IbI6v_24.js +1 -0
- package/dist/web/assets/classDiagram-v2-72OJOZXJ-IbI6v_24.js +1 -0
- package/dist/web/assets/{cose-bilkent-PNC4W37J-DVhePRYg.js → cose-bilkent-UX7MHV2Q-BWr7v0Wr.js} +1 -1
- package/dist/web/assets/dagre-ND4H6XIP-De5LIh1B.js +4 -0
- package/dist/web/assets/diagram-3NCE3AQN-Dd22FSHy.js +43 -0
- package/dist/web/assets/diagram-GF46GFSD-Cev3THY8.js +24 -0
- package/dist/web/assets/diagram-HNR7UZ2L-D8Z8RQGs.js +3 -0
- package/dist/web/assets/diagram-QXG6HAR7-B8VOJOiE.js +24 -0
- package/dist/web/assets/diagram-WEQXMOUZ-va1bLoMD.js +10 -0
- package/dist/web/assets/{erDiagram-GCSMX5X6-C3dhDFA8.js → erDiagram-L5TCEMPS-B3_9uAoP.js} +5 -5
- package/dist/web/assets/{flowDiagram-OTCZ4VVT-CWSFWmhr.js → flowDiagram-H6V6AXG4-98m6maI1.js} +9 -9
- package/dist/web/assets/ganttDiagram-JCBTUEKG-vE2nzETb.js +292 -0
- package/dist/web/assets/gitGraphDiagram-S2ZK5IYY-DKc8uUg_.js +106 -0
- package/dist/web/assets/index-BAhe1HSk.css +1 -0
- package/dist/web/assets/index-VTKdaklA.js +1415 -0
- package/dist/web/assets/infoDiagram-3YFTVSEB-DYP-Srzx.js +2 -0
- package/dist/web/assets/{ishikawaDiagram-YMYX4NHK-DUoJvNP2.js → ishikawaDiagram-BNXS4ZKH-QZnkpmmb.js} +3 -3
- package/dist/web/assets/{journeyDiagram-SO5T7YLQ-RMFPNNqz.js → journeyDiagram-M6C3CM3L-B5ojIuqu.js} +1 -1
- package/dist/web/assets/{kanban-definition-LJHFXRCJ-BzpDs1K9.js → kanban-definition-75IXJCU3-BJA8liRR.js} +4 -4
- package/dist/web/assets/{katex-GD7MH7QM-DBQvrix-.js → katex-K3KEBU37-DUqZiCRL.js} +1 -1
- package/dist/web/assets/mindmap-definition-2TDM6QVE-BQj5yylD.js +96 -0
- package/dist/web/assets/pieDiagram-CU6KROY3-4eSrPiQz.js +30 -0
- package/dist/web/assets/quadrantDiagram-VICAPDV7-PzxN8j55.js +7 -0
- package/dist/web/assets/{requirementDiagram-M5DCFWZL-DLHOVTSv.js → requirementDiagram-JXO7QTGE-CtplTc5y.js} +2 -2
- package/dist/web/assets/sankeyDiagram-URQDO5SZ-CoSgvkxv.js +40 -0
- package/dist/web/assets/sequenceDiagram-VS2MUI6T-D7ygyXvJ.js +162 -0
- package/dist/web/assets/stateDiagram-7D4R322I-v01gvwji.js +1 -0
- package/dist/web/assets/stateDiagram-v2-36443NZ5-DFD2b8_x.js +1 -0
- package/dist/web/assets/{timeline-definition-5SPVSISX-TRSDRgPw.js → timeline-definition-O6YCAMPW-CTI3M65J.js} +4 -4
- package/dist/web/assets/{vennDiagram-IE5QUKF5-DNy7HRBM.js → vennDiagram-MWXL3ELB-RnB0XMP7.js} +6 -6
- package/dist/web/assets/wardley-L42UT6IY-5TKZOOLJ-C-ZcgEBb.js +173 -0
- package/dist/web/assets/wardleyDiagram-CUQ6CDDI-EwRi4kwo.js +78 -0
- package/dist/web/assets/{xychartDiagram-ZHJ5623Y-Dr9r7a35.js → xychartDiagram-N2JHSOCM-DA38II6y.js} +4 -4
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
- package/vendor/node_modules/node-addon-api/node_addon_api_except.stamp +0 -0
- package/dist/web/assets/agent-D5lb0zXz.js +0 -1089
- package/dist/web/assets/architectureDiagram-EMZXCZ2Q-CZtc99v_.js +0 -36
- package/dist/web/assets/blockDiagram-IGV67L2C-BtoUp-6Y.js +0 -132
- package/dist/web/assets/chunk-3GS5O3IE-DkUjU0WD.js +0 -231
- package/dist/web/assets/chunk-3YCYZ6SJ-CQkVgT_z.js +0 -1
- package/dist/web/assets/chunk-H3VCZNTA-Cx5XV_aC.js +0 -13
- package/dist/web/assets/chunk-HN6EAY2L-BBnyTNdB.js +0 -1
- package/dist/web/assets/chunk-PK6DOVAG-CvsEnugt.js +0 -206
- package/dist/web/assets/classDiagram-PPOCWD7C-DTr8QIOf.js +0 -1
- package/dist/web/assets/classDiagram-v2-23LJLIIU-DTr8QIOf.js +0 -1
- package/dist/web/assets/dagre-E77IOHMT-Dzx0A6ZU.js +0 -4
- package/dist/web/assets/diagram-H7BISOXX-CC9pRew1.js +0 -43
- package/dist/web/assets/diagram-JC5VWROH-Bau_i9tf.js +0 -24
- package/dist/web/assets/diagram-LXUTUG65-D9_FM2Gt.js +0 -10
- package/dist/web/assets/diagram-WEHSV5V5-BMlayouL.js +0 -24
- package/dist/web/assets/ganttDiagram-MUNLMDZQ-D3a67Yol.js +0 -292
- package/dist/web/assets/gitGraphDiagram-3HKGZ4G3-7jmry-vM.js +0 -106
- package/dist/web/assets/index-BgeqpYgd.js +0 -1415
- package/dist/web/assets/index-CT0GtFLZ.css +0 -1
- package/dist/web/assets/infoDiagram-MN7RKWGX-G7lhP0Ib.js +0 -2
- package/dist/web/assets/mindmap-definition-2EUWGEK5-Bk0O4roa.js +0 -96
- package/dist/web/assets/pieDiagram-3IATQBI2-DKU7kpgS.js +0 -30
- package/dist/web/assets/quadrantDiagram-E256RVCF-BY0TGWCS.js +0 -7
- package/dist/web/assets/sankeyDiagram-L3NBLAOT-DVMj5rX2.js +0 -10
- package/dist/web/assets/sequenceDiagram-ZOUHS735-CJC73bV-.js +0 -157
- package/dist/web/assets/stateDiagram-MLPALWAM-BCFyESls.js +0 -1
- package/dist/web/assets/stateDiagram-v2-B5LQ5ZB2-DahzzIca.js +0 -1
- package/dist/web/assets/wardley-RL74JXVD-BCRCBASE-B-eZEzf9.js +0 -161
- package/dist/web/assets/wardleyDiagram-XU3VSMPF-BP-r1xzR.js +0 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{m as ze}from"./chunk-TBF5ZNIQ-DL5stGM1.js";import{y as Ze}from"./chunk-RWUO3TPN-BgRTY0_k.js";import{m,O as Be,e as Je,s as et,a as tt,l as st,h as it,n as rt,q as Ne,p as qe,o as nt,v as at,g as lt,P as ot,U as ct}from"./index-BgeqpYgd.js";var Ce=function(){var e=m(function(F,i,n,s){for(n=n||{},s=F.length;s--;n[F[s]]=i);return n},"o"),r=[1,3],h=[1,4],c=[1,5],o=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],d=[1,22],E=[2,7],u=[1,26],y=[1,27],b=[1,28],k=[1,29],C=[1,33],A=[1,34],L=[1,35],v=[1,36],$=[1,37],O=[1,38],x=[1,24],M=[1,31],w=[1,32],D=[1,30],R=[1,39],g=[1,40],f=[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],pe=[27,29],Le=[1,70],ve=[1,71],$e=[1,72],Oe=[1,73],xe=[1,74],Me=[1,75],we=[1,76],ee=[1,83],V=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],oe=[1,91],ce=[1,92],de=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],ye=[1,114],me=[1,115],_e={trace:m(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:m(function(F,i,n,s,p,t,I){var a=t.length-1;switch(p){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:h,11:c,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:h,11:c,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:r,9:h,11:c,13:o},{1:[2,2]},{4:17,5:d,7:13,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:d,7:42,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:43,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:44,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:45,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:46,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:47,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:48,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:49,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:50,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:O,54:x,72:M,74:w,77:D,89:R,90:g},{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(f,[2,17]),e(f,[2,18]),e(f,[2,19]),e(f,[2,20]),{30:60,33:62,75:U,89:R,90:g},{30:63,33:62,75:U,89:R,90:g},{30:64,33:62,75:U,89:R,90:g},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(pe,[2,79]),e(pe,[2,80]),{27:[1,67],29:[1,68]},e(pe,[2,85]),e(pe,[2,86]),{62:69,65:Le,66:ve,67:$e,68:Oe,69:xe,70:Me,71:we},{62:77,65:Le,66:ve,67:$e,68:Oe,69:xe,70:Me,71:we},{30:78,33:62,75:U,89:R,90:g},{73:79,75:ee,76:V,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce},e(de,[2,60]),e(de,[2,62]),{73:93,75:ee,76:V,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce},{30:94,33:62,75:U,76:V,89:R,90:g},{5:[1,95]},{30:96,33:62,75:U,89:R,90:g},{5:[1,97]},{30:98,33:62,75:U,89:R,90:g},{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(f,[2,59],{76:V}),e(f,[2,64],{76:De}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(f,[2,57],{76:De}),e(f,[2,58],{76:V}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:V},{5:he,40:ue,56:113,57:ye,59:me},{27:[1,118],76:V},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce},e(de,[2,61]),e(de,[2,63]),e(N,[2,68]),e(f,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(f,[2,28]),{5:[1,127]},e(f,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:ye,59:me},e(f,[2,47]),{5:[1,131]},e(f,[2,48]),e(f,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce}),{33:132,89:R,90:g},{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(f,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(f,[2,46]),{5:he,40:ue,56:152,57:ye,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(f,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(f,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:ye,59:me},{5:he,40:ue,56:164,57:ye,59:me},e(f,[2,23]),e(f,[2,24]),e(f,[2,25]),e(f,[2,26]),e(f,[2,44]),e(f,[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:m(function(F,i){if(i.recoverable)this.trace(F);else{var n=new Error(F);throw n.hash=i,n}},"parseError"),parse:m(function(F){var i=this,n=[0],s=[],p=[null],t=[],I=this.table,a="",fe=0,Pe=0,Ke=0,We=2,Ue=1,je=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);_.setInput(F,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Se=_.yylloc;t.push(Se);var Ge=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xe(T){n.length=n.length-2*T,p.length=p.length-T,t.length=t.length-T}m(Xe,"popStack");function Ve(){var T;return T=s.pop()||_.lex()||Ue,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=i.symbols_[T]||T),T}m(Ve,"lex");for(var S,Ie,X,q,Et,Te,Z={},Re,P,Ye,ge;;){if(X=n[n.length-1],this.defaultActions[X]?q=this.defaultActions[X]:((S===null||typeof S>"u")&&(S=Ve()),q=I[X]&&I[X][S]),typeof q>"u"||!q.length||!q[0]){var ke="";ge=[];for(Re in I[X])this.terminals_[Re]&&Re>We&&ge.push("'"+this.terminals_[Re]+"'");_.showPosition?ke="Parse error on line "+(fe+1)+`:
|
|
1
|
+
import{m as ze}from"./chunk-6764PJDD-Cppb-jH-.js";import{y as Ze}from"./chunk-ZXARS5L4-wcrIaQvY.js";import{m,I as Be,e as Je,s as et,l as tt,a as st,n as it,o as rt,q as Ne,p as qe,u as nt,y as at,M as lt,j as ot,k as ct}from"./index-VTKdaklA.js";var Ce=function(){var e=m(function(F,i,n,s){for(n=n||{},s=F.length;s--;n[F[s]]=i);return n},"o"),r=[1,3],h=[1,4],c=[1,5],o=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],d=[1,22],E=[2,7],u=[1,26],y=[1,27],b=[1,28],k=[1,29],C=[1,33],A=[1,34],L=[1,35],v=[1,36],$=[1,37],x=[1,38],O=[1,24],M=[1,31],w=[1,32],D=[1,30],R=[1,39],g=[1,40],f=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],V=[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],pe=[27,29],Le=[1,70],ve=[1,71],$e=[1,72],xe=[1,73],Oe=[1,74],Me=[1,75],we=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],oe=[1,91],ce=[1,92],de=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],ye=[1,114],me=[1,115],_e={trace:m(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:m(function(F,i,n,s,p,t,I){var a=t.length-1;switch(p){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:h,11:c,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:h,11:c,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:r,9:h,11:c,13:o},{1:[2,2]},{4:17,5:d,7:13,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:d,7:42,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:43,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:44,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:45,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:46,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:47,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:48,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:49,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{4:17,5:d,7:50,8:E,9:h,11:c,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:y,23:b,24:k,25:23,33:25,41:C,42:A,43:L,44:v,45:$,46:x,54:O,72:M,74:w,77:D,89:R,90:g},{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(f,[2,17]),e(f,[2,18]),e(f,[2,19]),e(f,[2,20]),{30:60,33:62,75:V,89:R,90:g},{30:63,33:62,75:V,89:R,90:g},{30:64,33:62,75:V,89:R,90:g},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(pe,[2,79]),e(pe,[2,80]),{27:[1,67],29:[1,68]},e(pe,[2,85]),e(pe,[2,86]),{62:69,65:Le,66:ve,67:$e,68:xe,69:Oe,70:Me,71:we},{62:77,65:Le,66:ve,67:$e,68:xe,69:Oe,70:Me,71:we},{30:78,33:62,75:V,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce},e(de,[2,60]),e(de,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce},{30:94,33:62,75:V,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:V,89:R,90:g},{5:[1,97]},{30:98,33:62,75:V,89:R,90:g},{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(f,[2,59],{76:U}),e(f,[2,64],{76:De}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(f,[2,57],{76:De}),e(f,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:ye,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce},e(de,[2,61]),e(de,[2,63]),e(N,[2,68]),e(f,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(f,[2,28]),{5:[1,127]},e(f,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:ye,59:me},e(f,[2,47]),{5:[1,131]},e(f,[2,48]),e(f,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:oe,88:ce}),{33:132,89:R,90:g},{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(f,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(f,[2,46]),{5:he,40:ue,56:152,57:ye,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(f,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(f,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:ye,59:me},{5:he,40:ue,56:164,57:ye,59:me},e(f,[2,23]),e(f,[2,24]),e(f,[2,25]),e(f,[2,26]),e(f,[2,44]),e(f,[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:m(function(F,i){if(i.recoverable)this.trace(F);else{var n=new Error(F);throw n.hash=i,n}},"parseError"),parse:m(function(F){var i=this,n=[0],s=[],p=[null],t=[],I=this.table,a="",fe=0,Pe=0,Ke=0,We=2,Ve=1,je=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);_.setInput(F,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Se=_.yylloc;t.push(Se);var Ge=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xe(T){n.length=n.length-2*T,p.length=p.length-T,t.length=t.length-T}m(Xe,"popStack");function Ue(){var T;return T=s.pop()||_.lex()||Ve,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=i.symbols_[T]||T),T}m(Ue,"lex");for(var S,Ie,X,q,Et,Te,Z={},Re,P,Ye,ge;;){if(X=n[n.length-1],this.defaultActions[X]?q=this.defaultActions[X]:((S===null||typeof S>"u")&&(S=Ue()),q=I[X]&&I[X][S]),typeof q>"u"||!q.length||!q[0]){var ke="";ge=[];for(Re in I[X])this.terminals_[Re]&&Re>We&&ge.push("'"+this.terminals_[Re]+"'");_.showPosition?ke="Parse error on line "+(fe+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
|
-
Expecting `+ge.join(", ")+", got '"+(this.terminals_[S]||S)+"'":ke="Parse error on line "+(fe+1)+": Unexpected "+(S==
|
|
3
|
+
Expecting `+ge.join(", ")+", got '"+(this.terminals_[S]||S)+"'":ke="Parse error on line "+(fe+1)+": Unexpected "+(S==Ve?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(ke,{text:_.match,token:this.terminals_[S]||S,line:_.yylineno,loc:Se,expected:ge})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+S);switch(q[0]){case 1:n.push(S),p.push(_.yytext),t.push(_.yylloc),n.push(q[1]),S=null,Ie?(S=Ie,Ie=null):(Pe=_.yyleng,a=_.yytext,fe=_.yylineno,Se=_.yylloc,Ke>0);break;case 2:if(P=this.productions_[q[1]][1],Z.$=p[p.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},Ge&&(Z._$.range=[t[t.length-(P||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(Z,[a,Pe,fe,G.yy,q[1],p,t].concat(je)),typeof Te<"u")return Te;P&&(n=n.slice(0,-1*P*2),p=p.slice(0,-1*P),t=t.slice(0,-1*P)),n.push(this.productions_[q[1]][0]),p.push(Z.$),t.push(Z._$),Ye=I[n[n.length-2]][n[n.length-1]],n.push(Ye);break;case 3:return!0}}return!0},"parse")},He=function(){var F={EOF:1,parseError:m(function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw new Error(i)},"parseError"),setInput:m(function(i,n){return this.yy=n||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:m(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:m(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var p=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===p.length?this.yylloc.first_column:0)+p[p.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[t[0],t[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(i){this.unput(this.match.slice(i))},"less"),pastInput:m(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:m(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:m(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
5
|
`+n+"^"},"showPosition"),test_match:m(function(i,n){var s,p,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))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.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,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var I in t)this[I]=t[I];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,s,p;this._more||(this.yytext="",this.match="");for(var t=this._currentRules(),I=0;I<t.length;I++)if(s=this._input.match(this.rules[t[I]]),s&&(!n||s[0].length>n[0].length)){if(n=s,p=I,this.options.backtrack_lexer){if(i=this.test_match(s,t[I]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,t[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var i=this.next();return i||this.lex()},"lex"),begin:m(function(i){this.conditionStack.push(i)},"begin"),popState:m(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(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:m(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:m(function(i){this.begin(i)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:m(function(i,n,s,p){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 n.yytext=n.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=He;function Ee(){this.yy={}}return m(Ee,"Parser"),Ee.prototype=_e,_e.Parser=Ee,new Ee}();Ce.parser=Ce;var ht=Ce,J,ut=(J=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=Je,this.getAccTitle=et,this.setAccDescription=tt,this.getAccDescription=st,this.setDiagramTitle=it,this.getDiagramTitle=rt,this.getConfig=m(()=>Ne().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(r){this.direction=r}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(r,h){return this.requirements.has(r)||this.requirements.set(r,{name:r,type:h,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(r)}getRequirements(){return this.requirements}setNewReqId(r){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=r)}setNewReqText(r){this.latestRequirement!==void 0&&(this.latestRequirement.text=r)}setNewReqRisk(r){this.latestRequirement!==void 0&&(this.latestRequirement.risk=r)}setNewReqVerifyMethod(r){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=r)}addElement(r){return this.elements.has(r)||(this.elements.set(r,{name:r,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),qe.info("Added new element: ",r)),this.resetLatestElement(),this.elements.get(r)}getElements(){return this.elements}setNewElementType(r){this.latestElement!==void 0&&(this.latestElement.type=r)}setNewElementDocRef(r){this.latestElement!==void 0&&(this.latestElement.docRef=r)}addRelationship(r,h,c){this.relations.push({type:r,src:h,dst:c})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,nt()}setCssStyle(r,h){for(let c of r){let o=this.requirements.get(c)??this.elements.get(c);if(!h||!o)return;for(let l of h)l.includes(",")?o.cssStyles.push(...l.split(",")):o.cssStyles.push(l)}}setClass(r,h){var c;for(let o of r){let l=this.requirements.get(o)??this.elements.get(o);if(l)for(let d of h){l.classes.push(d);let E=(c=this.classes.get(d))==null?void 0:c.styles;E&&l.cssStyles.push(...E)}}}defineClass(r,h){for(let c of r){let o=this.classes.get(c);o===void 0&&(o={id:c,styles:[],textStyles:[]},this.classes.set(c,o)),h&&h.forEach(function(l){if(/color/.exec(l)){let d=l.replace("fill","bgFill");o.textStyles.push(d)}o.styles.push(l)}),this.requirements.forEach(l=>{l.classes.includes(c)&&l.cssStyles.push(...h.flatMap(d=>d.split(",")))}),this.elements.forEach(l=>{l.classes.includes(c)&&l.cssStyles.push(...h.flatMap(d=>d.split(",")))})}}getClasses(){return this.classes}getData(){var o,l,d,E;let r=Ne(),h=[],c=[];for(let u of this.requirements.values()){let y=u;y.id=u.name,y.cssStyles=u.cssStyles,y.cssClasses=u.classes.join(" "),y.shape="requirementBox",y.look=r.look,y.colorIndex=h.length,h.push(y)}for(let u of this.elements.values()){let y=u;y.shape="requirementBox",y.look=r.look,y.id=u.name,y.cssStyles=u.cssStyles,y.cssClasses=u.classes.join(" "),y.colorIndex=h.length,h.push(y)}for(let u of this.relations){let y=0,b=u.type===this.Relationships.CONTAINS,k={id:`${u.src}-${u.dst}-${y}`,start:((o=this.requirements.get(u.src))==null?void 0:o.name)??((l=this.elements.get(u.src))==null?void 0:l.name),end:((d=this.requirements.get(u.dst))==null?void 0:d.name)??((E=this.elements.get(u.dst))==null?void 0:E.name),label:`<<${u.type}>>`,classes:"relationshipLine",style:["fill:none",b?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:b?"normal":"dashed",arrowTypeStart:b?"requirement_contains":"",arrowTypeEnd:b?"":"requirement_arrow",look:r.look,labelType:"markdown"};c.push(k),y++}return{nodes:h,edges:c,other:{},config:r,direction:this.getDirection()}}},m(J,"RequirementDB"),J),yt=m(e=>{let r=Be(),{themeVariables:h,look:c}=r,{bkgColorArray:o,borderColorArray:l}=h;if(!(l!=null&&l.length))return"";let d="";for(let E=0;E<e.THEME_COLOR_LIMIT;E++)d+=`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{n as jt,o as zt,l as Bt,a as Ft,e as Wt,s as qt,m as i,q as dt,w as Ut,i as Y,aa as Vt,as as Gt,u as Ht,C as Rt,ay as Qt}from"./index-VTKdaklA.js";var st=function(){var t=i(function(x,s,h,d){for(h=h||{},d=x.length;d--;h[x[d]]=s);return h},"o"),r=[1,9],o=[1,10],u=[1,5,10,12],c={trace:i(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:i(function(x,s,h,d,k,g,w){var _=g.length-1;switch(k){case 7:let L=d.findOrCreateNode(g[_-4].trim().replaceAll('""','"')),A=d.findOrCreateNode(g[_-2].trim().replaceAll('""','"')),I=parseFloat(g[_].trim());d.addLink(L,A,I);break;case 8:case 9:case 11:this.$=g[_];break;case 10:this.$=g[_-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:r,20:o},{1:[2,6],7:11,10:[1,12]},t(o,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(u,[2,8]),t(u,[2,9]),{19:[1,16]},t(u,[2,11]),{1:[2,1]},{1:[2,5]},t(o,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:o},{15:18,16:7,17:8,18:r,20:o},{18:[1,19]},t(o,[2,3]),{12:[1,20]},t(u,[2,10]),{15:21,16:7,17:8,18:r,20:o},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:i(function(x,s){if(s.recoverable)this.trace(x);else{var h=new Error(x);throw h.hash=s,h}},"parseError"),parse:i(function(x){var s=this,h=[0],d=[],k=[null],g=[],w=this.table,_="",L=0,A=0,I=0,O=2,M=1,j=g.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(N.yy[W]=this.yy[W]);v.setInput(x,N.yy),N.yy.lexer=v,N.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var z=v.yylloc;g.push(z);var C=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(E){h.length=h.length-2*E,k.length=k.length-E,g.length=g.length-E}i(q,"popStack");function B(){var E;return E=d.pop()||v.lex()||M,typeof E!="number"&&(E instanceof Array&&(d=E,E=d.pop()),E=s.symbols_[E]||E),E}i(B,"lex");for(var S,$,T,e,y,n,l={},a,m,b,D;;){if(T=h[h.length-1],this.defaultActions[T]?e=this.defaultActions[T]:((S===null||typeof S>"u")&&(S=B()),e=w[T]&&w[T][S]),typeof e>"u"||!e.length||!e[0]){var P="";D=[];for(a in w[T])this.terminals_[a]&&a>O&&D.push("'"+this.terminals_[a]+"'");v.showPosition?P="Parse error on line "+(L+1)+`:
|
|
2
|
+
`+v.showPosition()+`
|
|
3
|
+
Expecting `+D.join(", ")+", got '"+(this.terminals_[S]||S)+"'":P="Parse error on line "+(L+1)+": Unexpected "+(S==M?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(P,{text:v.match,token:this.terminals_[S]||S,line:v.yylineno,loc:z,expected:D})}if(e[0]instanceof Array&&e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+S);switch(e[0]){case 1:h.push(S),k.push(v.yytext),g.push(v.yylloc),h.push(e[1]),S=null,$?(S=$,$=null):(A=v.yyleng,_=v.yytext,L=v.yylineno,z=v.yylloc,I>0);break;case 2:if(m=this.productions_[e[1]][1],l.$=k[k.length-m],l._$={first_line:g[g.length-(m||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(m||1)].first_column,last_column:g[g.length-1].last_column},C&&(l._$.range=[g[g.length-(m||1)].range[0],g[g.length-1].range[1]]),n=this.performAction.apply(l,[_,A,L,N.yy,e[1],k,g].concat(j)),typeof n<"u")return n;m&&(h=h.slice(0,-1*m*2),k=k.slice(0,-1*m),g=g.slice(0,-1*m)),h.push(this.productions_[e[1]][0]),k.push(l.$),g.push(l._$),b=w[h[h.length-2]][h[h.length-1]],h.push(b);break;case 3:return!0}}return!0},"parse")},f=function(){var x={EOF:1,parseError:i(function(s,h){if(this.yy.parser)this.yy.parser.parseError(s,h);else throw new Error(s)},"parseError"),setInput:i(function(s,h){return this.yy=h||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var h=s.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:i(function(s){var h=s.length,d=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var k=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),d.length-1&&(this.yylineno-=d.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===k.length?this.yylloc.first_column:0)+k[k.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(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:i(function(s){this.unput(this.match.slice(s))},"less"),pastInput:i(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var s=this.pastInput(),h=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+h+"^"},"showPosition"),test_match:i(function(s,h){var d,k,g;if(this.options.backtrack_lexer&&(g={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(g.yylloc.range=this.yylloc.range.slice(0))),k=s[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var w in g)this[w]=g[w];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,h,d,k;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),w=0;w<g.length;w++)if(d=this._input.match(this.rules[g[w]]),d&&(!h||d[0].length>h[0].length)){if(h=d,k=w,this.options.backtrack_lexer){if(s=this.test_match(d,g[w]),s!==!1)return s;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(s=this.test_match(h,g[k]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var s=this.next();return s||this.lex()},"lex"),begin:i(function(s){this.conditionStack.push(s)},"begin"),popState:i(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(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:i(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:i(function(s){this.begin(s)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(s,h,d,k){switch(d){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 x}();c.lexer=f;function p(){this.yy={}}return i(p,"Parser"),p.prototype=c,c.Parser=p,new p}();st.parser=st;var J=st,nt=[],it=[],tt=new Map,Xt=i(()=>{nt=[],it=[],tt=new Map,Ht()},"clear"),V,Yt=(V=class{constructor(r,o,u=0){this.source=r,this.target=o,this.value=u}},i(V,"SankeyLink"),V),Kt=i((t,r,o)=>{nt.push(new Yt(t,r,o))},"addLink"),G,Zt=(G=class{constructor(r){this.ID=r}},i(G,"SankeyNode"),G),Jt=i(t=>{t=Rt.sanitizeText(t,dt());let r=tt.get(t);return r===void 0&&(r=new Zt(t),tt.set(t,r),it.push(r)),r},"findOrCreateNode"),te=i(()=>it,"getNodes"),ee=i(()=>nt,"getLinks"),ne=i(()=>({nodes:it.map(t=>({id:t.ID})),links:nt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),ie={nodesMap:tt,getConfig:i(()=>dt().sankey,"getConfig"),getNodes:te,getLinks:ee,getGraph:ne,addLink:Kt,findOrCreateNode:Jt,getAccTitle:qt,setAccTitle:Wt,getAccDescription:Ft,setAccDescription:Bt,getDiagramTitle:zt,setDiagramTitle:jt,clear:Xt};function ot(t,r){let o;if(r===void 0)for(let u of t)u!=null&&(o<u||o===void 0&&u>=u)&&(o=u);else{let u=-1;for(let c of t)(c=r(c,++u,t))!=null&&(o<c||o===void 0&&c>=c)&&(o=c)}return o}i(ot,"max");function gt(t,r){let o;if(r===void 0)for(let u of t)u!=null&&(o>u||o===void 0&&u>=u)&&(o=u);else{let u=-1;for(let c of t)(c=r(c,++u,t))!=null&&(o>c||o===void 0&&c>=c)&&(o=c)}return o}i(gt,"min");function K(t,r){let o=0;if(r===void 0)for(let u of t)(u=+u)&&(o+=u);else{let u=-1;for(let c of t)(c=+r(c,++u,t))&&(o+=c)}return o}i(K,"sum");function xt(t){return t.target.depth}i(xt,"targetDepth");function _t(t){return t.depth}i(_t,"left");function vt(t,r){return r-1-t.height}i(vt,"right");function pt(t,r){return t.sourceLinks.length?t.depth:r-1}i(pt,"justify");function bt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?gt(t.sourceLinks,xt)-1:0}i(bt,"center");function Q(t){return function(){return t}}i(Q,"constant");function lt(t,r){return X(t.source,r.source)||t.index-r.index}i(lt,"ascendingSourceBreadth");function at(t,r){return X(t.target,r.target)||t.index-r.index}i(at,"ascendingTargetBreadth");function X(t,r){return t.y0-r.y0}i(X,"ascendingBreadth");function Z(t){return t.value}i(Z,"value");function wt(t){return t.index}i(wt,"defaultId");function St(t){return t.nodes}i(St,"defaultNodes");function Et(t){return t.links}i(Et,"defaultLinks");function ht(t,r){let o=t.get(r);if(!o)throw new Error("missing: "+r);return o}i(ht,"find");function ut({nodes:t}){for(let r of t){let o=r.y0,u=o;for(let c of r.sourceLinks)c.y0=o+c.width/2,o+=c.width;for(let c of r.targetLinks)c.y1=u+c.width/2,u+=c.width}}i(ut,"computeLinkBreadths");function At(){let t=0,r=0,o=1,u=1,c=24,f=8,p,x=wt,s=pt,h,d,k=St,g=Et,w=6;function _(){let e={nodes:k.apply(null,arguments),links:g.apply(null,arguments)};return L(e),A(e),I(e),O(e),v(e),ut(e),e}i(_,"sankey"),_.update=function(e){return ut(e),e},_.nodeId=function(e){return arguments.length?(x=typeof e=="function"?e:Q(e),_):x},_.nodeAlign=function(e){return arguments.length?(s=typeof e=="function"?e:Q(e),_):s},_.nodeSort=function(e){return arguments.length?(h=e,_):h},_.nodeWidth=function(e){return arguments.length?(c=+e,_):c},_.nodePadding=function(e){return arguments.length?(f=p=+e,_):f},_.nodes=function(e){return arguments.length?(k=typeof e=="function"?e:Q(e),_):k},_.links=function(e){return arguments.length?(g=typeof e=="function"?e:Q(e),_):g},_.linkSort=function(e){return arguments.length?(d=e,_):d},_.size=function(e){return arguments.length?(t=r=0,o=+e[0],u=+e[1],_):[o-t,u-r]},_.extent=function(e){return arguments.length?(t=+e[0][0],o=+e[1][0],r=+e[0][1],u=+e[1][1],_):[[t,r],[o,u]]},_.iterations=function(e){return arguments.length?(w=+e,_):w};function L({nodes:e,links:y}){for(let[l,a]of e.entries())a.index=l,a.sourceLinks=[],a.targetLinks=[];let n=new Map(e.map((l,a)=>[x(l,a,e),l]));for(let[l,a]of y.entries()){a.index=l;let{source:m,target:b}=a;typeof m!="object"&&(m=a.source=ht(n,m)),typeof b!="object"&&(b=a.target=ht(n,b)),m.sourceLinks.push(a),b.targetLinks.push(a)}if(d!=null)for(let{sourceLinks:l,targetLinks:a}of e)l.sort(d),a.sort(d)}i(L,"computeNodeLinks");function A({nodes:e}){for(let y of e)y.value=y.fixedValue===void 0?Math.max(K(y.sourceLinks,Z),K(y.targetLinks,Z)):y.fixedValue}i(A,"computeNodeValues");function I({nodes:e}){let y=e.length,n=new Set(e),l=new Set,a=0;for(;n.size;){for(let m of n){m.depth=a;for(let{target:b}of m.sourceLinks)l.add(b)}if(++a>y)throw new Error("circular link");n=l,l=new Set}}i(I,"computeNodeDepths");function O({nodes:e}){let y=e.length,n=new Set(e),l=new Set,a=0;for(;n.size;){for(let m of n){m.height=a;for(let{source:b}of m.targetLinks)l.add(b)}if(++a>y)throw new Error("circular link");n=l,l=new Set}}i(O,"computeNodeHeights");function M({nodes:e}){let y=ot(e,a=>a.depth)+1,n=(o-t-c)/(y-1),l=new Array(y);for(let a of e){let m=Math.max(0,Math.min(y-1,Math.floor(s.call(null,a,y))));a.layer=m,a.x0=t+m*n,a.x1=a.x0+c,l[m]?l[m].push(a):l[m]=[a]}if(h)for(let a of l)a.sort(h);return l}i(M,"computeNodeLayers");function j(e){let y=gt(e,n=>(u-r-(n.length-1)*p)/K(n,Z));for(let n of e){let l=r;for(let a of n){a.y0=l,a.y1=l+a.value*y,l=a.y1+p;for(let m of a.sourceLinks)m.width=m.value*y}l=(u-l+p)/(n.length+1);for(let a=0;a<n.length;++a){let m=n[a];m.y0+=l*(a+1),m.y1+=l*(a+1)}S(n)}}i(j,"initializeNodeBreadths");function v(e){let y=M(e);p=Math.min(f,(u-r)/(ot(y,n=>n.length)-1)),j(y);for(let n=0;n<w;++n){let l=Math.pow(.99,n),a=Math.max(1-l,(n+1)/w);W(y,l,a),N(y,l,a)}}i(v,"computeNodeBreadths");function N(e,y,n){for(let l=1,a=e.length;l<a;++l){let m=e[l];for(let b of m){let D=0,P=0;for(let{source:H,value:rt}of b.targetLinks){let R=rt*(b.layer-H.layer);D+=$(H,b)*R,P+=R}if(!(P>0))continue;let E=(D/P-b.y0)*y;b.y0+=E,b.y1+=E,B(b)}h===void 0&&m.sort(X),z(m,n)}}i(N,"relaxLeftToRight");function W(e,y,n){for(let l=e.length,a=l-2;a>=0;--a){let m=e[a];for(let b of m){let D=0,P=0;for(let{target:H,value:rt}of b.sourceLinks){let R=rt*(H.layer-b.layer);D+=T(b,H)*R,P+=R}if(!(P>0))continue;let E=(D/P-b.y0)*y;b.y0+=E,b.y1+=E,B(b)}h===void 0&&m.sort(X),z(m,n)}}i(W,"relaxRightToLeft");function z(e,y){let n=e.length>>1,l=e[n];q(e,l.y0-p,n-1,y),C(e,l.y1+p,n+1,y),q(e,u,e.length-1,y),C(e,r,0,y)}i(z,"resolveCollisions");function C(e,y,n,l){for(;n<e.length;++n){let a=e[n],m=(y-a.y0)*l;m>1e-6&&(a.y0+=m,a.y1+=m),y=a.y1+p}}i(C,"resolveCollisionsTopToBottom");function q(e,y,n,l){for(;n>=0;--n){let a=e[n],m=(a.y1-y)*l;m>1e-6&&(a.y0-=m,a.y1-=m),y=a.y0-p}}i(q,"resolveCollisionsBottomToTop");function B({sourceLinks:e,targetLinks:y}){if(d===void 0){for(let{source:{sourceLinks:n}}of y)n.sort(at);for(let{target:{targetLinks:n}}of e)n.sort(lt)}}i(B,"reorderNodeLinks");function S(e){if(d===void 0)for(let{sourceLinks:y,targetLinks:n}of e)y.sort(at),n.sort(lt)}i(S,"reorderLinks");function $(e,y){let n=e.y0-(e.sourceLinks.length-1)*p/2;for(let{target:l,width:a}of e.sourceLinks){if(l===y)break;n+=a+p}for(let{source:l,width:a}of y.targetLinks){if(l===e)break;n-=a}return n}i($,"targetTop");function T(e,y){let n=y.y0-(y.targetLinks.length-1)*p/2;for(let{source:l,width:a}of y.targetLinks){if(l===e)break;n+=a+p}for(let{target:l,width:a}of e.sourceLinks){if(l===y)break;n-=a}return n}return i(T,"sourceTop"),_}i(At,"Sankey");var ct=Math.PI,ft=2*ct,U=1e-6,re=ft-U;function et(){this._x0=this._y0=this._x1=this._y1=null,this._=""}i(et,"Path");function mt(){return new et}i(mt,"path");et.prototype=mt.prototype={constructor:et,moveTo:i(function(t,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+r)},"moveTo"),closePath:i(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:i(function(t,r){this._+="L"+(this._x1=+t)+","+(this._y1=+r)},"lineTo"),quadraticCurveTo:i(function(t,r,o,u){this._+="Q"+ +t+","+ +r+","+(this._x1=+o)+","+(this._y1=+u)},"quadraticCurveTo"),bezierCurveTo:i(function(t,r,o,u,c,f){this._+="C"+ +t+","+ +r+","+ +o+","+ +u+","+(this._x1=+c)+","+(this._y1=+f)},"bezierCurveTo"),arcTo:i(function(t,r,o,u,c){t=+t,r=+r,o=+o,u=+u,c=+c;var f=this._x1,p=this._y1,x=o-t,s=u-r,h=f-t,d=p-r,k=h*h+d*d;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=r);else if(k>U)if(!(Math.abs(d*x-s*h)>U)||!c)this._+="L"+(this._x1=t)+","+(this._y1=r);else{var g=o-f,w=u-p,_=x*x+s*s,L=g*g+w*w,A=Math.sqrt(_),I=Math.sqrt(k),O=c*Math.tan((ct-Math.acos((_+k-L)/(2*A*I)))/2),M=O/I,j=O/A;Math.abs(M-1)>U&&(this._+="L"+(t+M*h)+","+(r+M*d)),this._+="A"+c+","+c+",0,0,"+ +(d*g>h*w)+","+(this._x1=t+j*x)+","+(this._y1=r+j*s)}},"arcTo"),arc:i(function(t,r,o,u,c,f){t=+t,r=+r,o=+o,f=!!f;var p=o*Math.cos(u),x=o*Math.sin(u),s=t+p,h=r+x,d=1^f,k=f?u-c:c-u;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+s+","+h:(Math.abs(this._x1-s)>U||Math.abs(this._y1-h)>U)&&(this._+="L"+s+","+h),o&&(k<0&&(k=k%ft+ft),k>re?this._+="A"+o+","+o+",0,1,"+d+","+(t-p)+","+(r-x)+"A"+o+","+o+",0,1,"+d+","+(this._x1=s)+","+(this._y1=h):k>U&&(this._+="A"+o+","+o+",0,"+ +(k>=ct)+","+d+","+(this._x1=t+o*Math.cos(c))+","+(this._y1=r+o*Math.sin(c))))},"arc"),rect:i(function(t,r,o,u){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+r)+"h"+ +o+"v"+ +u+"h"+-o+"Z"},"rect"),toString:i(function(){return this._},"toString")};var se=mt;function yt(t){return i(function(){return t},"constant")}i(yt,"default");function Lt(t){return t[0]}i(Lt,"x");function Tt(t){return t[1]}i(Tt,"y");var oe=Array.prototype.slice;function Mt(t){return t.source}i(Mt,"linkSource");function Nt(t){return t.target}i(Nt,"linkTarget");function It(t){var r=Mt,o=Nt,u=Lt,c=Tt,f=null;function p(){var x,s=oe.call(arguments),h=r.apply(this,s),d=o.apply(this,s);if(f||(f=x=se()),t(f,+u.apply(this,(s[0]=h,s)),+c.apply(this,s),+u.apply(this,(s[0]=d,s)),+c.apply(this,s)),x)return f=null,x+""||null}return i(p,"link"),p.source=function(x){return arguments.length?(r=x,p):r},p.target=function(x){return arguments.length?(o=x,p):o},p.x=function(x){return arguments.length?(u=typeof x=="function"?x:yt(+x),p):u},p.y=function(x){return arguments.length?(c=typeof x=="function"?x:yt(+x),p):c},p.context=function(x){return arguments.length?(f=x??null,p):f},p}i(It,"link");function Ct(t,r,o,u,c){t.moveTo(r,o),t.bezierCurveTo(r=(r+u)/2,o,r,c,u,c)}i(Ct,"curveHorizontal");function Pt(){return It(Ct)}i(Pt,"linkHorizontal");function $t(t){return[t.source.x1,t.y0]}i($t,"horizontalSource");function Dt(t){return[t.target.x0,t.y1]}i(Dt,"horizontalTarget");function Ot(){return Pt().source($t).target(Dt)}i(Ot,"default");var F,kt=(F=class{static next(r){return new F(r+ ++F.count)}constructor(r){this.id=r,this.href=`#${r}`}toString(){return"url("+this.href+")"}},i(F,"Uid"),F.count=0,F),le={left:_t,right:vt,center:bt,justify:pt},ae=i(t=>{let r=0,o=0;for(let u of t){let c=u.value??0;c>r&&(r=c,o=u.layer??0)}return o},"findCentralNodeLayer"),he=i(function(t,r,o,u){let{securityLevel:c,sankey:f}=dt(),p=Ut.sankey,x;c==="sandbox"&&(x=Y("#i"+r));let s=c==="sandbox"?Y(x.nodes()[0].contentDocument.body):Y("body"),h=c==="sandbox"?s.select(`[id="${r}"]`):Y(`[id="${r}"]`),d=(f==null?void 0:f.width)??p.width,k=(f==null?void 0:f.height)??p.width,g=(f==null?void 0:f.useMaxWidth)??p.useMaxWidth,w=(f==null?void 0:f.nodeAlignment)??p.nodeAlignment,_=(f==null?void 0:f.prefix)??p.prefix,L=(f==null?void 0:f.suffix)??p.suffix,A=(f==null?void 0:f.showValues)??p.showValues,I=(f==null?void 0:f.nodeWidth)??p.nodeWidth??10,O=(f==null?void 0:f.nodePadding)??p.nodePadding??12,M=(f==null?void 0:f.labelStyle)??p.labelStyle??"legacy",j=(f==null?void 0:f.nodeColors)??{},v=u.db.getGraph(),N=le[w];At().nodeId(n=>n.id).nodeWidth(I).nodePadding(O+(A?15:0)).nodeAlign(N).extent([[0,0],[d,k]])(v);let W=ae(v.nodes),z=Vt(Qt),C=i(n=>j[n]??z(n),"getNodeColor");h.append("g").attr("class","nodes").selectAll(".node").data(v.nodes).join("g").attr("class","node").attr("id",n=>(n.uid=kt.next("node-")).id).attr("transform",function(n){return"translate("+n.x0+","+n.y0+")"}).attr("x",n=>n.x0).attr("y",n=>n.y0).append("rect").attr("height",n=>n.y1-n.y0).attr("width",n=>n.x1-n.x0).attr("fill",n=>C(n.id));let q=i(({id:n,value:l})=>A?`${n}
|
|
7
|
+
${_}${Math.round(l*100)/100}${L}`:n,"getText"),B=i(n=>M==="outlined"?(n.layer??0)<W?{x:n.x0-6,anchor:"end"}:{x:n.x1+6,anchor:"start"}:n.x0<d/2?{x:n.x1+6,anchor:"start"}:{x:n.x0-6,anchor:"end"},"getLabelPosition"),S=h.append("g").attr("class","node-labels").attr("font-size",14),$=i(n=>S.selectAll(n?`.${n}`:"text").data(v.nodes).join("text").attr("class",n??null).attr("x",l=>B(l).x).attr("y",l=>(l.y1+l.y0)/2).attr("dy",`${A?"0":"0.35"}em`).attr("text-anchor",l=>B(l).anchor).text(q),"appendLabel");M==="outlined"?($("sankey-label-bg"),$("sankey-label-fg")):$();let T=h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(v.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),e=(f==null?void 0:f.linkColor)??"gradient";if(e==="gradient"){let n=T.append("linearGradient").attr("id",l=>(l.uid=kt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",l=>l.source.x1).attr("x2",l=>l.target.x0);n.append("stop").attr("offset","0%").attr("stop-color",l=>C(l.source.id)),n.append("stop").attr("offset","100%").attr("stop-color",l=>C(l.target.id))}let y;switch(e){case"gradient":y=i(n=>n.uid,"coloring");break;case"source":y=i(n=>C(n.source.id),"coloring");break;case"target":y=i(n=>C(n.target.id),"coloring");break;default:y=e}T.append("path").attr("d",Ot()).attr("stroke",y).attr("stroke-width",n=>Math.max(1,n.width)),Gt(void 0,h,0,g)},"draw"),ue={draw:he},ce=i(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),fe=i(t=>`.label {
|
|
9
|
+
font-family: ${t.fontFamily};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.node-labels {
|
|
13
|
+
font-family: ${t.fontFamily};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Outlined label style - background stroke for better readability */
|
|
17
|
+
.sankey-label-bg {
|
|
18
|
+
stroke: ${t.mainBkg||t.background||"#fff"};
|
|
19
|
+
stroke-width: 4px;
|
|
20
|
+
stroke-linejoin: round;
|
|
21
|
+
paint-order: stroke;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Foreground label text */
|
|
25
|
+
.sankey-label-fg {
|
|
26
|
+
fill: ${t.textColor};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Node styling */
|
|
30
|
+
.node rect {
|
|
31
|
+
shape-rendering: crispEdges;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Link styling */
|
|
35
|
+
.link {
|
|
36
|
+
fill: none;
|
|
37
|
+
stroke-opacity: 0.5;
|
|
38
|
+
mix-blend-mode: multiply;
|
|
39
|
+
}
|
|
40
|
+
`,"getStyles"),ye=fe,de=J.parse.bind(J);J.parse=t=>de(ce(t));var pe={styles:ye,parser:J,db:ie,renderer:ue};export{pe as diagram};
|