@layers-app/editor 0.5.1 → 0.5.2

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.
Files changed (240) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.d.ts +315 -0
  3. package/dist/index.js +13 -0
  4. package/dist/layers.-TbWEgSf.js +425 -0
  5. package/dist/layers.0aivjg14.js +202 -0
  6. package/dist/layers.1kchl9Fg.js +33 -0
  7. package/dist/layers.2RmTpOSe.js +65 -0
  8. package/dist/layers.37cL7YbN.js +40 -0
  9. package/dist/layers.4q_x5roN.js +5 -0
  10. package/dist/layers.52famHy6.js +1 -0
  11. package/dist/layers.68ma6K6f.js +1 -0
  12. package/dist/layers.6HZckrJk.js +1 -0
  13. package/dist/layers.7JqFgE4-.js +15 -0
  14. package/dist/layers.8xliMm_4.js +14 -0
  15. package/dist/layers.9pNaFvaX.js +1 -0
  16. package/dist/layers.A7FX8Cpf.js +220 -0
  17. package/dist/layers.B-MfAaIy.js +1 -0
  18. package/dist/layers.B17DijoR.js +6 -0
  19. package/dist/layers.B1970UjZ.js +282 -0
  20. package/dist/layers.B19hGmey.js +1 -0
  21. package/dist/layers.B1IP0xF5.js +122 -0
  22. package/dist/layers.B1TVCKFc.js +423 -0
  23. package/dist/layers.B2wb1BnV.js +1 -0
  24. package/dist/layers.B3D4g2HH.js +1 -0
  25. package/dist/layers.B3QZKSP7.js +4 -0
  26. package/dist/layers.B4cctrKy.js +2235 -0
  27. package/dist/layers.B5eIpqUm.js +5 -0
  28. package/dist/layers.B5fhqRqQ.js +32 -0
  29. package/dist/layers.B5o5YNLY.js +41 -0
  30. package/dist/layers.B7QKbjTP.js +1 -0
  31. package/dist/layers.B7R5e9nb.js +39 -0
  32. package/dist/layers.B9H_VqGH.js +38 -0
  33. package/dist/layers.B9gDt0mt.js +2 -0
  34. package/dist/layers.BAtv1CM7.js +1 -0
  35. package/dist/layers.BAx1rxXM.js +1 -0
  36. package/dist/layers.BBu8KTxD.js +40 -0
  37. package/dist/layers.BC0UHUHZ.js +6 -0
  38. package/dist/layers.BEsDNARG.js +2966 -0
  39. package/dist/layers.BIFfWqjp.js +6 -0
  40. package/dist/layers.BIRO82v2.js +1 -0
  41. package/dist/layers.BIXkxpJg.js +7 -0
  42. package/dist/layers.BIeVwYKL.js +1 -0
  43. package/dist/layers.BJDrjORS.js +244 -0
  44. package/dist/layers.BJWQnQ1b.js +931 -0
  45. package/dist/layers.BKA3G4tE.js +8 -0
  46. package/dist/layers.BKcOrB7G.js +8 -0
  47. package/dist/layers.BLd2spTm.js +1 -0
  48. package/dist/layers.BLomL8Y1.js +40 -0
  49. package/dist/layers.BOGcxS4S.js +11 -0
  50. package/dist/layers.BPpqQ2zl.js +10 -0
  51. package/dist/layers.BQGV7_aP.js +7 -0
  52. package/dist/layers.BQvMgKOV.js +257 -0
  53. package/dist/layers.BRVeeDcH.js +802 -0
  54. package/dist/layers.BSB9eX8_.js +96 -0
  55. package/dist/layers.BSDp4pjf.js +160 -0
  56. package/dist/layers.BSTBZrFn.js +1 -0
  57. package/dist/layers.BWwCeuKP.js +39 -0
  58. package/dist/layers.BXYVnzZo.js +10 -0
  59. package/dist/layers.BYxlPasW.js +9 -0
  60. package/dist/layers.B_C8Ox8-.js +320 -0
  61. package/dist/layers.B_rZy9ZE.js +10 -0
  62. package/dist/layers.BbCfEXyj.js +55 -0
  63. package/dist/layers.Becl7PvM.js +1 -0
  64. package/dist/layers.BekArbNQ.js +501 -0
  65. package/dist/layers.BgOa2ZQq.js +7 -0
  66. package/dist/layers.BhZmc2PE.js +1 -0
  67. package/dist/layers.BhaSD27u.js +8 -0
  68. package/dist/layers.BiJ8hfRt.js +1510 -0
  69. package/dist/layers.Bm7EN78W.js +5 -0
  70. package/dist/layers.BocrFl_z.js +1265 -0
  71. package/dist/layers.BpilXLfW.js +6 -0
  72. package/dist/layers.BrBnUsI5.js +41 -0
  73. package/dist/layers.BrhJtZkc.js +84 -0
  74. package/dist/layers.Bsxy-Zmv.js +7 -0
  75. package/dist/layers.Bu9go6nF.js +10 -0
  76. package/dist/layers.BuJFmhxG.js +1 -0
  77. package/dist/layers.BuNBio9d.js +10 -0
  78. package/dist/layers.BufbpNF2.js +35 -0
  79. package/dist/layers.Bv6t74Ng.js +37 -0
  80. package/dist/layers.Bw7AFM_C.js +39 -0
  81. package/dist/layers.ByEhw12k.js +40 -0
  82. package/dist/layers.Bz8CGnnD.js +32 -0
  83. package/dist/layers.BzfTuld3.js +304 -0
  84. package/dist/layers.C-f2Ts9u.js +32 -0
  85. package/dist/layers.C0Lgw_Sx.js +11688 -0
  86. package/dist/layers.C0xLKPSB.js +7 -0
  87. package/dist/layers.C8_lu5UH.js +23 -0
  88. package/dist/layers.C8d9V9GQ.js +1619 -0
  89. package/dist/layers.C9KUAI3S.js +9 -0
  90. package/dist/layers.C9Qm4iyY.js +51 -0
  91. package/dist/layers.CAAtHbGC.js +1034 -0
  92. package/dist/layers.CBTk7340.js +41 -0
  93. package/dist/layers.CCGTXI7t.js +37 -0
  94. package/dist/layers.CDnEPiFS.js +13 -0
  95. package/dist/layers.CF0jHwg8.js +36 -0
  96. package/dist/layers.CFEmW02q.js +189 -0
  97. package/dist/layers.CFpY72SE.js +1 -0
  98. package/dist/layers.CG-pQKxy.js +32 -0
  99. package/dist/layers.CHZsXQcr.js +1 -0
  100. package/dist/layers.CIBiA4cp.js +9 -0
  101. package/dist/layers.CJ5oFhK5.js +9 -0
  102. package/dist/layers.CLG-12Ft.js +803 -0
  103. package/dist/layers.CLQVPEWO.js +70 -0
  104. package/dist/layers.CNAZOY0z.js +42 -0
  105. package/dist/layers.CNAp0agL.js +11 -0
  106. package/dist/layers.CNNAjKqx.js +42 -0
  107. package/dist/layers.CO0NalVl.js +1283 -0
  108. package/dist/layers.COTtcXWr.js +38 -0
  109. package/dist/layers.COsJBDU8.js +11 -0
  110. package/dist/layers.CPdjh9hT.js +373 -0
  111. package/dist/layers.CSFyrYzY.js +118 -0
  112. package/dist/layers.CX_ayh7E.js +42 -0
  113. package/dist/layers.CeNyh2LV.js +41 -0
  114. package/dist/layers.Ce_CBSin.js +9 -0
  115. package/dist/layers.CfjCZzg8.js +33 -0
  116. package/dist/layers.CfsQNfbN.js +35 -0
  117. package/dist/layers.CgqehJlq.js +268 -0
  118. package/dist/layers.CildyhOW.js +1 -0
  119. package/dist/layers.CjBfNqWg.js +207 -0
  120. package/dist/layers.CjZ_56YO.js +39 -0
  121. package/dist/layers.CqVTtuYm.js +6 -0
  122. package/dist/layers.Ct7y2KbU.js +1 -0
  123. package/dist/layers.CtASemAs.js +1 -0
  124. package/dist/layers.CvCe_XZO.js +44 -0
  125. package/dist/layers.CvF4WyAB.js +8 -0
  126. package/dist/layers.CvgnifSj.js +10 -0
  127. package/dist/layers.CyGuH0wW.js +84 -0
  128. package/dist/layers.Cyzu9PKQ.js +1 -0
  129. package/dist/layers.CzZCiNn3.js +1 -0
  130. package/dist/layers.Cz_HcKZR.js +9 -0
  131. package/dist/layers.CzqAzeMM.js +295 -0
  132. package/dist/layers.D-0DKizI.js +36 -0
  133. package/dist/layers.D-4uOpUj.js +2479 -0
  134. package/dist/layers.D-P1auk3.js +40 -0
  135. package/dist/layers.D-z4IZwp.js +139 -0
  136. package/dist/layers.D0zn4_Mx.js +1 -0
  137. package/dist/layers.D176Y7Vo.js +437 -0
  138. package/dist/layers.D1TLKJdE.js +2 -0
  139. package/dist/layers.D4SM8Ihn.js +10 -0
  140. package/dist/layers.D4T8fTcj.js +1223 -0
  141. package/dist/layers.D7jGxypv.js +8 -0
  142. package/dist/layers.D819V-1U.js +5 -0
  143. package/dist/layers.D92dwfZm.js +9 -0
  144. package/dist/layers.D9oxm2Q3.js +36 -0
  145. package/dist/layers.DAUiVpfA.js +41 -0
  146. package/dist/layers.DAgjLyi0.js +21938 -0
  147. package/dist/layers.DG5DkMsX.js +4 -0
  148. package/dist/layers.DG5nJvev.js +41 -0
  149. package/dist/layers.DGIvTJgm.js +1 -0
  150. package/dist/layers.DGKHsEgL.js +37 -0
  151. package/dist/layers.DJINSxsc.js +1 -0
  152. package/dist/layers.DJJF7QHv.js +39 -0
  153. package/dist/layers.DLK9DV2V.js +40 -0
  154. package/dist/layers.DLNMmOF6.js +10 -0
  155. package/dist/layers.DLwuMfdd.js +84 -0
  156. package/dist/layers.DMkBISW1.js +1 -0
  157. package/dist/layers.DN9HoVxI.js +18 -0
  158. package/dist/layers.DO3jf13r.js +139 -0
  159. package/dist/layers.DOrgOHBr.js +1 -0
  160. package/dist/layers.DRi0nv8t.js +769 -0
  161. package/dist/layers.DTEtUQ-N.js +11 -0
  162. package/dist/layers.DXM-M_t4.js +904 -0
  163. package/dist/layers.DZ4rueAA.js +1126 -0
  164. package/dist/layers.DZAc2rlA.js +19 -0
  165. package/dist/layers.DZAwluRX.js +7 -0
  166. package/dist/layers.D__Ge0jR.js +1580 -0
  167. package/dist/layers.D_qBxnuW.js +6 -0
  168. package/dist/layers.Da7N3t0o.js +59 -0
  169. package/dist/layers.DbCde96z.js +61 -0
  170. package/dist/layers.DbaKVP5e.js +1 -0
  171. package/dist/layers.Deuxf8WS.js +37 -0
  172. package/dist/layers.DgQ6wjQ6.js +1089 -0
  173. package/dist/layers.Dhs3Sikn.js +230 -0
  174. package/dist/layers.DizdRJDv.js +10 -0
  175. package/dist/layers.DjUOC4st.js +16 -0
  176. package/dist/layers.DkRaFpYI.js +39 -0
  177. package/dist/layers.Dn0j_OK5.js +8 -0
  178. package/dist/layers.DneF9QFl.js +39 -0
  179. package/dist/layers.DnohNr8z.js +2 -0
  180. package/dist/layers.DtjaV33P.js +4 -0
  181. package/dist/layers.DtwPvqvM.js +1359 -0
  182. package/dist/layers.DuQS64hQ.js +35 -0
  183. package/dist/layers.DvcL-c1J.js +10 -0
  184. package/dist/layers.DwGEUGi4.js +1 -0
  185. package/dist/layers.Dwf-cmfl.js +1 -0
  186. package/dist/layers.DxA6ocdw.js +70 -0
  187. package/dist/layers.DxuaZtRi.js +116 -0
  188. package/dist/layers.Dy1naDTQ.js +14 -0
  189. package/dist/layers.DyVeJ5nq.js +41 -0
  190. package/dist/layers.Dz5Fekdu.js +8 -0
  191. package/dist/layers.DzTjTsrg.js +52 -0
  192. package/dist/layers.DzWSztoe.js +8 -0
  193. package/dist/layers.DzWUGmmi.js +21763 -0
  194. package/dist/layers.Fv2UzX_J.js +40 -0
  195. package/dist/layers.GGg0Uela.js +48146 -0
  196. package/dist/layers.HISmbvvZ.js +41 -0
  197. package/dist/layers.J-SBicA2.js +39 -0
  198. package/dist/layers.JWCLFILJ.js +1 -0
  199. package/dist/layers.Jy2BJnrD.js +7 -0
  200. package/dist/layers.KNG61fVD.js +32 -0
  201. package/dist/layers.KZKDnGbd.js +9166 -0
  202. package/dist/layers.Kcxw1ZN5.js +8 -0
  203. package/dist/layers.LG7pZboq.js +42 -0
  204. package/dist/layers.N7uLiJJF.js +791 -0
  205. package/dist/layers.P0mMn9V6.js +4 -0
  206. package/dist/layers.RY1Pc_vI.js +39 -0
  207. package/dist/layers.T5F5IY6f.js +38 -0
  208. package/dist/layers.UBsT16id.js +9 -0
  209. package/dist/layers.Ww9bBIaA.js +32 -0
  210. package/dist/layers.YUbPYUxB.js +1088 -0
  211. package/dist/layers.YejPlmok.js +34 -0
  212. package/dist/layers.YsjMDe1Z.js +8 -0
  213. package/dist/layers._IMfh4Om.js +1 -0
  214. package/dist/layers.b0h5ZBmD.js +61 -0
  215. package/dist/layers.cXShihLV.js +793 -0
  216. package/dist/layers.dBCFbDUQ.js +5 -0
  217. package/dist/layers.dsZSDggl.js +1 -0
  218. package/dist/layers.dzPD2Tq6.js +8 -0
  219. package/dist/layers.fdHV7i_n.js +47540 -0
  220. package/dist/layers.g0MJEmgM.js +36 -0
  221. package/dist/layers.g6KGAlYG.js +7 -0
  222. package/dist/layers.gAwY5NlW.js +6 -0
  223. package/dist/layers.hJXmn9h9.js +3 -0
  224. package/dist/layers.hMr_bHrn.js +1 -0
  225. package/dist/layers.hweLqW3I.js +261 -0
  226. package/dist/layers.ifrGR0tH.js +1 -0
  227. package/dist/layers.jS5D2j9k.js +186 -0
  228. package/dist/layers.k5zSy7kx.js +40 -0
  229. package/dist/layers.ku7sc5w7.js +40 -0
  230. package/dist/layers.l0OsrJxT.js +9 -0
  231. package/dist/layers.lCpg7dOn.js +21 -0
  232. package/dist/layers.mcrEJ5IL.js +1 -0
  233. package/dist/layers.mkPf05Ff.js +960 -0
  234. package/dist/layers.n8BNeBDu.js +40 -0
  235. package/dist/layers.nesKhKqv.js +9 -0
  236. package/dist/layers.o8uxn2z6.js +6 -0
  237. package/dist/layers.qKFGZSrv.js +42 -0
  238. package/dist/layers.tehvhFRL.js +11 -0
  239. package/dist/layers.yaVCGcoo.js +7 -0
  240. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./layers.BSB9eX8_.js");require("lodash-es");const Ve=require("./layers.Cyzu9PKQ.js"),Oe=require("./layers.BLd2spTm.js");require("./layers.Dhs3Sikn.js");const Le=require("./layers.BIRO82v2.js");var ce=(function(){var e=function(V,i,r,a){for(r=r||{},a=V.length;a--;r[V[a]]=i);return r},t=[1,3],l=[1,4],c=[1,5],u=[1,6],d=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],p=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],v=[1,25],N=[1,26],x=[1,27],$=[1,20],S=[1,28],A=[1,29],M=[62,63],de=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],pe=[1,47],ye=[1,48],fe=[1,49],_e=[1,50],ge=[1,51],Ee=[1,52],Re=[1,53],L=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],z=[1,69],X=[1,70],J=[1,67],Z=[1,68],I=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:function(){},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,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$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",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"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],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(i,r,a,n,y,s,K){var _=s.length-1;switch(y){case 4:this.$=s[_].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[_].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[_-3],s[_-4]);break;case 14:n.setNewReqId(s[_-2]);break;case 15:n.setNewReqText(s[_-2]);break;case 16:n.setNewReqRisk(s[_-2]);break;case 17:n.setNewReqVerifyMethod(s[_-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[_-3]);break;case 34:n.setNewElementType(s[_-2]);break;case 35:n.setNewElementDocRef(s[_-2]);break;case 38:n.addRelationship(s[_-2],s[_],s[_-4]);break;case 39:n.addRelationship(s[_-2],s[_-4],s[_]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:l,11:c,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:l,11:c,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(d,[2,6]),{3:12,4:2,6:t,9:l,11:c,13:u},{1:[2,2]},{4:17,5:p,7:13,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},e(d,[2,4]),e(d,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:p,7:31,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:32,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:33,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:34,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:35,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(M,[2,20]),e(M,[2,21]),e(M,[2,22]),e(M,[2,23]),e(M,[2,24]),e(M,[2,25]),e(de,[2,49]),e(de,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:pe,56:ye,57:fe,58:_e,59:ge,60:Ee,61:Re},{52:54,55:pe,56:ye,57:fe,58:_e,59:ge,60:Ee,61:Re},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(L,[2,40]),e(L,[2,41]),e(L,[2,42]),e(L,[2,43]),e(L,[2,44]),e(L,[2,45]),e(L,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:z,30:X,46:66,47:J,49:Z},{23:71,62:S,63:A},{23:72,62:S,63:A},e(I,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(I,[2,19]),e(I,[2,33]),{22:[1,78]},{22:[1,79]},{5:z,30:X,46:80,47:J,49:Z},e(I,[2,37]),e(I,[2,38]),e(I,[2,39]),{23:81,62:S,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(I,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(I,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:z,30:X,46:110,47:J,49:Z},{5:z,30:X,46:111,47:J,49:Z},e(I,[2,14]),e(I,[2,15]),e(I,[2,16]),e(I,[2,17]),e(I,[2,34]),e(I,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var a=new Error(i);throw a.hash=r,a}},parse:function(i){var r=this,a=[0],n=[],y=[null],s=[],K=this.table,_="",ee=0,me=0,ve=2,Ie=1,$e=s.slice.call(arguments,1),E=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);E.setInput(i,C.yy),C.yy.lexer=E,C.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ae=E.yylloc;s.push(ae);var we=E.options&&E.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qe(){var q;return q=n.pop()||E.lex()||Ie,typeof q!="number"&&(q instanceof Array&&(n=q,q=n.pop()),q=r.symbols_[q]||q),q}for(var b,F,T,le,H={},te,w,be,ie;;){if(F=a[a.length-1],this.defaultActions[F]?T=this.defaultActions[F]:((b===null||typeof b>"u")&&(b=qe()),T=K[F]&&K[F][b]),typeof T>"u"||!T.length||!T[0]){var oe="";ie=[];for(te in K[F])this.terminals_[te]&&te>ve&&ie.push("'"+this.terminals_[te]+"'");E.showPosition?oe="Parse error on line "+(ee+1)+`:
2
+ `+E.showPosition()+`
3
+ Expecting `+ie.join(", ")+", got '"+(this.terminals_[b]||b)+"'":oe="Parse error on line "+(ee+1)+": Unexpected "+(b==Ie?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(oe,{text:E.match,token:this.terminals_[b]||b,line:E.yylineno,loc:ae,expected:ie})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+b);switch(T[0]){case 1:a.push(b),y.push(E.yytext),s.push(E.yylloc),a.push(T[1]),b=null,me=E.yyleng,_=E.yytext,ee=E.yylineno,ae=E.yylloc;break;case 2:if(w=this.productions_[T[1]][1],H.$=y[y.length-w],H._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},we&&(H._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),le=this.performAction.apply(H,[_,me,ee,C.yy,T[1],y,s].concat($e)),typeof le<"u")return le;w&&(a=a.slice(0,-1*w*2),y=y.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[T[1]][0]),y.push(H.$),s.push(H._$),be=K[a[a.length-2]][a[a.length-1]],a.push(be);break;case 3:return!0}}return!0}},Ae=(function(){var V={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput: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},input: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},unput:function(i){var r=i.length,a=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 n=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),a.length-1&&(this.yylineno-=a.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:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+r+"^"},test_match:function(i,r){var a,n,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))),n=i[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],a=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var s in y)this[s]=y[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,a,n;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),s=0;s<y.length;s++)if(a=this._input.match(this.rules[y[s]]),a&&(!r||a[0].length>r[0].length)){if(r=a,n=s,this.options.backtrack_lexer){if(i=this.test_match(a,y[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,y[n]),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})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,a,n,y){switch(n){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 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return a.yytext=a.yytext.trim(),62}},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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/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,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],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,50],inclusive:!0}}};return V})();ne.lexer=Ae;function re(){this.yy={}}return re.prototype=ne,ne.Parser=re,new re})();ce.parser=ce;const Ce=ce;let ue=[],k={},G={},O={},j={};const Fe={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},Me={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},De={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Pe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Ye=(e,t)=>(G[e]===void 0&&(G[e]={name:e,type:t,id:k.id,text:k.text,risk:k.risk,verifyMethod:k.verifyMethod}),k={},G[e]),Ue=()=>G,Be=e=>{k!==void 0&&(k.id=e)},Qe=e=>{k!==void 0&&(k.text=e)},He=e=>{k!==void 0&&(k.risk=e)},We=e=>{k!==void 0&&(k.verifyMethod=e)},Ke=e=>(j[e]===void 0&&(j[e]={name:e,type:O.type,docRef:O.docRef},m.log$1.info("Added new requirement: ",e)),O={},j[e]),Ge=()=>j,je=e=>{O!==void 0&&(O.type=e)},ze=e=>{O!==void 0&&(O.docRef=e)},Xe=(e,t,l)=>{ue.push({type:e,src:t,dst:l})},Je=()=>ue,Ze=()=>{ue=[],k={},G={},O={},j={},m.clear()},et={RequirementType:Fe,RiskLevel:Me,VerifyType:De,Relationships:Pe,getConfig:()=>m.getConfig().req,addRequirement:Ye,getRequirements:Ue,setNewReqId:Be,setNewReqText:Qe,setNewReqRisk:He,setNewReqVerifyMethod:We,setAccTitle:m.setAccTitle,getAccTitle:m.getAccTitle,setAccDescription:m.setAccDescription,getAccDescription:m.getAccDescription,addElement:Ke,getElements:Ge,setNewElementType:je,setNewElementDocRef:ze,addRelationship:Xe,getRelationships:Je,clear:Ze},tt=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
+
49
+ `,it=tt,he={CONTAINS:"contains",ARROW:"arrow"},nt=(e,t)=>{let l=e.append("defs").append("marker").attr("id",he.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");l.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),l.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),l.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",he.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0
50
+ L${t.line_height},${t.line_height/2}
51
+ M${t.line_height},${t.line_height/2}
52
+ L0,${t.line_height}`).attr("stroke-width",1)},Se={ReqMarkers:he,insertLineEndings:nt};let f={},ke=0;const Te=(e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",f.rect_min_width+"px").attr("height",f.rect_min_height+"px"),Ne=(e,t,l)=>{let c=f.rect_min_width/2,u=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",c).attr("y",f.rect_padding).attr("dominant-baseline","hanging"),d=0;l.forEach(g=>{d==0?u.append("tspan").attr("text-anchor","middle").attr("x",f.rect_min_width/2).attr("dy",0).text(g):u.append("tspan").attr("text-anchor","middle").attr("x",f.rect_min_width/2).attr("dy",f.line_height*.75).text(g),d++});let p=1.5*f.rect_padding,h=d*f.line_height*.75,o=p+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",f.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:u,y:o}},xe=(e,t,l,c)=>{let u=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",f.rect_padding).attr("y",c).attr("dominant-baseline","hanging"),d=0;const p=30;let h=[];return l.forEach(o=>{let g=o.length;for(;g>p&&d<3;){let R=o.substring(0,p);o=o.substring(p,o.length),g=o.length,h[h.length]=R,d++}if(d==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;d=0}),h.forEach(o=>{u.append("tspan").attr("x",f.rect_padding).attr("dy",f.line_height).text(o)}),u},rt=(e,t,l,c)=>{const u=t.node().getTotalLength(),d=t.node().getPointAtLength(u*.5),p="rel"+ke;ke++;const o=e.append("text").attr("class","req relationshipLabel").attr("id",p).attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(c).node().getBBox();e.insert("rect","#"+p).attr("class","req reqLabelBox").attr("x",d.x-o.width/2).attr("y",d.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},st=function(e,t,l,c,u){const d=l.edge(W(t.src),W(t.dst)),p=Le.line().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+c).attr("class","er relationshipLine").attr("d",p(d.points)).attr("fill","none");t.type==u.db.Relationships.CONTAINS?h.attr("marker-start","url("+m.common$1.getUrl(f.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+m.common$1.getUrl(f.arrowMarkerAbsolute)+"#"+Se.ReqMarkers.ARROW+"_line_ending)")),rt(e,h,f,`<<${t.type}>>`)},at=(e,t,l)=>{Object.keys(e).forEach(c=>{let u=e[c];c=W(c),m.log$1.info("Added new requirement: ",c);const d=l.append("g").attr("id",c),p="req-"+c,h=Te(d,p);let o=Ne(d,c+"_title",[`<<${u.type}>>`,`${u.name}`]);xe(d,c+"_body",[`Id: ${u.id}`,`Text: ${u.text}`,`Risk: ${u.risk}`,`Verification: ${u.verifyMethod}`],o.y);const g=h.node().getBBox();t.setNode(c,{width:g.width,height:g.height,shape:"rect",id:c})})},lt=(e,t,l)=>{Object.keys(e).forEach(c=>{let u=e[c];const d=W(c),p=l.append("g").attr("id",d),h="element-"+d,o=Te(p,h);let g=Ne(p,h+"_title",["<<Element>>",`${c}`]);xe(p,h+"_body",[`Type: ${u.type||"Not Specified"}`,`Doc Ref: ${u.docRef||"None"}`],g.y);const R=o.node().getBBox();t.setNode(d,{width:R.width,height:R.height,shape:"rect",id:d})})},ot=(e,t)=>(e.forEach(function(l){let c=W(l.src),u=W(l.dst);t.setEdge(c,u,{relationship:l})}),e),ct=function(e,t){t.nodes().forEach(function(l){l!==void 0&&t.node(l)!==void 0&&(e.select("#"+l),e.select("#"+l).attr("transform","translate("+(t.node(l).x-t.node(l).width/2)+","+(t.node(l).y-t.node(l).height/2)+" )"))})},W=e=>e.replace(/\s/g,"").replace(/\./g,"_"),ht=(e,t,l,c)=>{f=m.getConfig().requirement;const u=f.securityLevel;let d;u==="sandbox"&&(d=m.select("#i"+t));const h=(u==="sandbox"?m.select(d.nodes()[0].contentDocument.body):m.select("body")).select(`[id='${t}']`);Se.insertLineEndings(h,f);const o=new Oe.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:f.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let g=c.db.getRequirements(),R=c.db.getElements(),v=c.db.getRelationships();at(g,o,h),lt(R,o,h),ot(v,o),Ve.layout(o),ct(h,o),v.forEach(function(A){st(h,A,o,t,c)});const N=f.rect_padding,x=h.node().getBBox(),$=x.width+N*2,S=x.height+N*2;m.configureSvgSize(h,S,$,f.useMaxWidth),h.attr("viewBox",`${x.x-N} ${x.y-N} ${$} ${S}`)},ut={draw:ht},dt={parser:Ce,db:et,renderer:ut,styles:it};exports.diagram=dt;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.BSB9eX8_.js");require("./layers.Dhs3Sikn.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let U=0,z=0;for(const{source:F,value:K}of v.targetLinks){let q=K*(v.layer-F.layer);U+=M(F,v)*q,z+=q}if(!(z>0))continue;let W=(U/z-v.y0)*f;v.y0+=W,v.y1+=W,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let U=0,z=0;for(const{target:F,value:K}of v.sourceLinks){let q=K*(F.layer-v.layer);U+=R(v,F)*q,z+=q}if(!(z>0))continue;let W=(U/z-v.y0)*f;v.y0+=W,v.y1+=W,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function R(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,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,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},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:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[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(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,R,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.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},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),R=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof R<"u")return R;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput: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},input: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},unput:function(i){var o=i.length,c=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 m=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 b=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===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),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,b[m]),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})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\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:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],V={};const zt=()=>{X=[],Q=[],V={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const Vt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Rt{constructor(n){this.ID=n}}const Ut=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),V[t]||(V[t]=new Rt(t),Q.push(V[t])),V[t]),Wt=()=>Q,Ft=()=>X,qt=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:V,getConfig:()=>L.getConfig().sankey,getNodes:Wt,getLinks:Ft,getGraph:qt,addLink:Vt,findOrCreateNode:Ut,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
7
+ ${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=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"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;