@ashwin_droid/notion-stream 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/{_baseUniq-DSwfPiGC.js → _baseUniq-CWfjzMhC.js} +1 -1
  2. package/dist/{_baseUniq-CT-tc-CG.mjs → _baseUniq-Db9ouzA-.mjs} +51 -51
  3. package/dist/{arc-DmoYXidQ.mjs → arc-CHlsWOEE.mjs} +1 -1
  4. package/dist/{arc-BBnIBs2j.js → arc-DxDH4CNq.js} +1 -1
  5. package/dist/{architecture-U656AL7Q-CMPtJMZ-.mjs → architecture-U656AL7Q-DpmenltQ.mjs} +1 -1
  6. package/dist/{architecture-U656AL7Q-C0ZB2O9M.js → architecture-U656AL7Q-DqUhwOXk.js} +1 -1
  7. package/dist/{architectureDiagram-VXUJARFQ-BYzpbF40.mjs → architectureDiagram-VXUJARFQ-C2hauZCK.mjs} +1846 -1850
  8. package/dist/architectureDiagram-VXUJARFQ-LwDhoqXa.js +36 -0
  9. package/dist/blockDiagram-VD42YOAC-Cws7af6P.js +122 -0
  10. package/dist/{blockDiagram-VD42YOAC-DPVTCHn5.mjs → blockDiagram-VD42YOAC-yWS4_TxE.mjs} +913 -922
  11. package/dist/c4Diagram-YG6GDRKO-DLoBqiir.js +10 -0
  12. package/dist/{c4Diagram-YG6GDRKO-C2Y4q08p.mjs → c4Diagram-YG6GDRKO-K4ShvkML.mjs} +169 -170
  13. package/dist/channel-BqjR_aPb.js +1 -0
  14. package/dist/{channel-DVpqhnow.mjs → channel-_5jzmP-I.mjs} +1 -1
  15. package/dist/chunk-4BX2VUAB-6hr5PCkV.js +1 -0
  16. package/dist/chunk-4BX2VUAB-DBTu5W6L.mjs +8 -0
  17. package/dist/{chunk-55IACEB6-P_FVKIbW.js → chunk-55IACEB6-BLs0Xswy.js} +1 -1
  18. package/dist/{chunk-55IACEB6-Du1Simcj.mjs → chunk-55IACEB6-_brNODlK.mjs} +1 -1
  19. package/dist/chunk-B4BG7PRW-6HdbiUFA.js +165 -0
  20. package/dist/{chunk-B4BG7PRW-BUKsa2yH.mjs → chunk-B4BG7PRW-CWohxZt0.mjs} +251 -252
  21. package/dist/chunk-DI55MBZ5-DehdsbpI.js +220 -0
  22. package/dist/{chunk-DI55MBZ5-C9h0qLVI.mjs → chunk-DI55MBZ5-db62NlMD.mjs} +444 -456
  23. package/dist/{chunk-FMBD7UC4-48-zdz-1.js → chunk-FMBD7UC4-B2j81cAo.js} +1 -1
  24. package/dist/{chunk-FMBD7UC4-C08-zA06.mjs → chunk-FMBD7UC4-BegOwXuP.mjs} +1 -1
  25. package/dist/chunk-QN33PNHL-CJ1oa0p-.js +1 -0
  26. package/dist/chunk-QN33PNHL-CpBQYWWf.mjs +19 -0
  27. package/dist/{chunk-QZHKN3VN-DbO6TJSK.mjs → chunk-QZHKN3VN-BG9vC9tQ.mjs} +1 -1
  28. package/dist/{chunk-QZHKN3VN-Dy2264ui.js → chunk-QZHKN3VN-DV3-w0rK.js} +1 -1
  29. package/dist/{chunk-TZMSLE5B-BPmI9i6R.mjs → chunk-TZMSLE5B-D3cmOS_D.mjs} +20 -20
  30. package/dist/{chunk-TZMSLE5B-COENnLAZ.js → chunk-TZMSLE5B-DtKjE4RE.js} +1 -1
  31. package/dist/{classDiagram-v2-WZHVMYZB-mzvV1Ifg.mjs → classDiagram-2ON5EDUG-DAL3V7Dx.mjs} +2 -2
  32. package/dist/{classDiagram-2ON5EDUG-CFFwYK87.js → classDiagram-2ON5EDUG-uOMmrtgR.js} +1 -1
  33. package/dist/{classDiagram-2ON5EDUG-mzvV1Ifg.mjs → classDiagram-v2-WZHVMYZB-DAL3V7Dx.mjs} +2 -2
  34. package/dist/{classDiagram-v2-WZHVMYZB-CFFwYK87.js → classDiagram-v2-WZHVMYZB-uOMmrtgR.js} +1 -1
  35. package/dist/{clone-KtLCwiKH.mjs → clone-BiSDKkgs.mjs} +1 -1
  36. package/dist/clone-Bl9s3LR9.js +1 -0
  37. package/dist/{code-block-37QAKDTI-sxlq94xm.js → code-block-37QAKDTI-BILtfzQC.js} +1 -1
  38. package/dist/{code-block-37QAKDTI-CmykMxjQ.mjs → code-block-37QAKDTI-MauA-22z.mjs} +1 -1
  39. package/dist/cose-bilkent-S5V4N54A-CPJoKUiO.js +1 -0
  40. package/dist/{cose-bilkent-S5V4N54A-BXcldnso.mjs → cose-bilkent-S5V4N54A-rUEUYQdF.mjs} +592 -589
  41. package/dist/cytoscape.esm-CNUX3VTg.js +321 -0
  42. package/dist/{cytoscape.esm-ZmItrg9y.mjs → cytoscape.esm-Cvf3sx9F.mjs} +56 -83
  43. package/dist/dagre-6UL2VRFP-b0VfOp5y.mjs +443 -0
  44. package/dist/dagre-6UL2VRFP-r_ADTb0O.js +4 -0
  45. package/dist/diagram-PSM6KHXK-CuHqLGUt.js +24 -0
  46. package/dist/{diagram-PSM6KHXK-DIV3jw9d.mjs → diagram-PSM6KHXK-ax3IfFcX.mjs} +45 -48
  47. package/dist/diagram-QEK2KX5R-B5Lo9E-s.js +43 -0
  48. package/dist/{diagram-QEK2KX5R-Q0M2_YtR.mjs → diagram-QEK2KX5R-Dn47K2He.mjs} +10 -14
  49. package/dist/diagram-S2PKOQOG-B0W-tWPV.js +24 -0
  50. package/dist/{diagram-S2PKOQOG-_WGA6s2-.mjs → diagram-S2PKOQOG-C5jPENyu.mjs} +22 -23
  51. package/dist/{erDiagram-Q2GNP2WA-CW0D_QGb.mjs → erDiagram-Q2GNP2WA-XP6-Fsuy.mjs} +77 -78
  52. package/dist/erDiagram-Q2GNP2WA-k7niLq9H.js +60 -0
  53. package/dist/flowDiagram-NV44I4VS-BAdaW0zG.js +162 -0
  54. package/dist/{flowDiagram-NV44I4VS-DVQ8Ntc4.mjs → flowDiagram-NV44I4VS-DzHvKZ3e.mjs} +442 -449
  55. package/dist/{ganttDiagram-JELNMOA3-Bk-dX6qT.mjs → ganttDiagram-JELNMOA3-BRenKPXr.mjs} +1049 -1041
  56. package/dist/ganttDiagram-JELNMOA3-CddDOxeO.js +267 -0
  57. package/dist/{gitGraph-F6HP7TQM-DvIgo2TM.js → gitGraph-F6HP7TQM-BLshE7A8.js} +1 -1
  58. package/dist/{gitGraph-F6HP7TQM-CsdwxYUE.mjs → gitGraph-F6HP7TQM-Dq8gDI5R.mjs} +1 -1
  59. package/dist/gitGraphDiagram-NY62KEGX-B-rSecLz.mjs +699 -0
  60. package/dist/gitGraphDiagram-NY62KEGX-C980oVrU.js +65 -0
  61. package/dist/{graph-BNpx6ebg.js → graph-BlL96kLy.js} +1 -1
  62. package/dist/{graph-C_T4ZBuC.mjs → graph-DxtCPktv.mjs} +8 -8
  63. package/dist/index-DIQbvlIr.js +670 -0
  64. package/dist/{index-oe4HpmeG.mjs → index-yf1-93v5.mjs} +22534 -22642
  65. package/dist/index.js +1 -1
  66. package/dist/index.mjs +3 -3
  67. package/dist/info-NVLQJR56-BQNoY6_p.mjs +5 -0
  68. package/dist/{info-NVLQJR56-BwFQRguW.js → info-NVLQJR56-Bls_Dqxs.js} +1 -1
  69. package/dist/{infoDiagram-WHAUD3N6-CCb5k_S7.js → infoDiagram-WHAUD3N6-DwsUlSxN.js} +1 -1
  70. package/dist/{infoDiagram-WHAUD3N6-C-gzsm95.mjs → infoDiagram-WHAUD3N6-FnUO4LNo.mjs} +2 -2
  71. package/dist/journeyDiagram-XKPGCS4Q-7k1g8rPF.js +139 -0
  72. package/dist/{journeyDiagram-XKPGCS4Q-DzkUL_YG.mjs → journeyDiagram-XKPGCS4Q-Bvn5lhxn.mjs} +24 -26
  73. package/dist/kanban-definition-3W4ZIXB7-Cqf7XpzW.js +89 -0
  74. package/dist/kanban-definition-3W4ZIXB7-D29d9Rl2.mjs +719 -0
  75. package/dist/{layout-CuWQnP5Y.js → layout-B_kkbzwQ.js} +1 -1
  76. package/dist/{layout-Cd98WJ7r.mjs → layout-BlUfzTib.mjs} +22 -22
  77. package/dist/{linear-SU4e8MRt.mjs → linear-CC_oUBkf.mjs} +20 -20
  78. package/dist/{linear-DFDw13y6.js → linear-DF2d9TVq.js} +1 -1
  79. package/dist/{mermaid-4DMBBIKO-BihEtyib.js → mermaid-4DMBBIKO-2ufyMRt4.js} +1 -1
  80. package/dist/mermaid-4DMBBIKO-BizANXE3.mjs +4 -0
  81. package/dist/{mermaid-parser.core-C8Sxzqul.mjs → mermaid-parser.core-CkXMNpV7.mjs} +3404 -3369
  82. package/dist/mermaid-parser.core-DQkQZAvG.js +128 -0
  83. package/dist/{min-CppMRDFn.js → min-I7eFb2cg.js} +1 -1
  84. package/dist/{min-C2k771MZ.mjs → min-VPOHWCTf.mjs} +2 -2
  85. package/dist/{mindmap-definition-VGOIOE7T-BUd354uH.mjs → mindmap-definition-VGOIOE7T-CawQ5XYo.mjs} +170 -172
  86. package/dist/mindmap-definition-VGOIOE7T-d8uGKtHO.js +68 -0
  87. package/dist/{ordinal-C0oynhte.mjs → ordinal-B-KqvkJf.mjs} +1 -1
  88. package/dist/{packet-BFZMPI3H-Cz_A86d3.mjs → packet-BFZMPI3H-BbdhMsyD.mjs} +1 -1
  89. package/dist/{packet-BFZMPI3H-CFx3kSkL.js → packet-BFZMPI3H-CiqPNXx_.js} +1 -1
  90. package/dist/{pie-7BOR55EZ-_1MqisBd.js → pie-7BOR55EZ-BfYvvrxF.js} +1 -1
  91. package/dist/pie-7BOR55EZ-CkKpjIfF.mjs +5 -0
  92. package/dist/{pieDiagram-ADFJNKIX-Bg0_gu43.js → pieDiagram-ADFJNKIX-BlNrJLdh.js} +2 -2
  93. package/dist/{pieDiagram-ADFJNKIX-lRs_rpwI.mjs → pieDiagram-ADFJNKIX-TQppVIgS.mjs} +21 -21
  94. package/dist/{quadrantDiagram-AYHSOK5B-D9kypJt6.mjs → quadrantDiagram-AYHSOK5B-CysN5Kyu.mjs} +230 -232
  95. package/dist/quadrantDiagram-AYHSOK5B-fy7-bMNk.js +7 -0
  96. package/dist/{radar-NHE76QYJ-CdtC4C8F.js → radar-NHE76QYJ-BjbmLxde.js} +1 -1
  97. package/dist/{radar-NHE76QYJ-B-PvZD0K.mjs → radar-NHE76QYJ-BlbyKqWL.mjs} +1 -1
  98. package/dist/requirementDiagram-UZGBJVZJ-CGgt75Rl.js +64 -0
  99. package/dist/{requirementDiagram-UZGBJVZJ-B5ulaHjE.mjs → requirementDiagram-UZGBJVZJ-CfMcIbMc.mjs} +190 -192
  100. package/dist/{sankeyDiagram-TZEHDZUN-DprIPFbe.mjs → sankeyDiagram-TZEHDZUN-aFz48-W2.mjs} +189 -189
  101. package/dist/sankeyDiagram-TZEHDZUN-q-r70ybp.js +10 -0
  102. package/dist/{sequenceDiagram-WL72ISMW-B4m4oag0.mjs → sequenceDiagram-WL72ISMW-B9w1iL31.mjs} +222 -229
  103. package/dist/sequenceDiagram-WL72ISMW-nlFlEmNQ.js +145 -0
  104. package/dist/{stateDiagram-FKZM4ZOC-BD4tnS-V.js → stateDiagram-FKZM4ZOC-C9DXFs3P.js} +1 -1
  105. package/dist/{stateDiagram-FKZM4ZOC-DjkdDbQ2.mjs → stateDiagram-FKZM4ZOC-e4SGJ8oh.mjs} +4 -4
  106. package/dist/{stateDiagram-v2-4FDKWEC3-sybMoxOk.js → stateDiagram-v2-4FDKWEC3-FoEBCoPy.js} +1 -1
  107. package/dist/{stateDiagram-v2-4FDKWEC3-AK86F3i6.mjs → stateDiagram-v2-4FDKWEC3-QUPk_c9P.mjs} +2 -2
  108. package/dist/timeline-definition-IT6M3QCI-BqUt3ka4.js +61 -0
  109. package/dist/{timeline-definition-IT6M3QCI-BFuQEeZP.mjs → timeline-definition-IT6M3QCI-Br9KrJcU.mjs} +217 -223
  110. package/dist/{treemap-KMMF4GRG-DTnRa789.js → treemap-KMMF4GRG-DTii969M.js} +1 -1
  111. package/dist/{treemap-KMMF4GRG-gtrnY16v.mjs → treemap-KMMF4GRG-DVxjgEhu.mjs} +1 -1
  112. package/dist/xychartDiagram-PRI3JC2R-Bi02nVw4.js +7 -0
  113. package/dist/{xychartDiagram-PRI3JC2R-CjXiy6m0.mjs → xychartDiagram-PRI3JC2R-BygtBGgX.mjs} +7 -7
  114. package/package.json +4 -4
  115. package/dist/architectureDiagram-VXUJARFQ-BPQoZmaM.js +0 -36
  116. package/dist/blockDiagram-VD42YOAC-Z3Fc3Bew.js +0 -122
  117. package/dist/c4Diagram-YG6GDRKO-LzDuCZ2V.js +0 -10
  118. package/dist/channel-6dUO0MQi.js +0 -1
  119. package/dist/chunk-4BX2VUAB-BwubFldI.js +0 -1
  120. package/dist/chunk-4BX2VUAB-DldMXCTt.mjs +0 -9
  121. package/dist/chunk-B4BG7PRW-CKX0VJ-S.js +0 -165
  122. package/dist/chunk-DI55MBZ5-CMq-O8k2.js +0 -220
  123. package/dist/chunk-QN33PNHL-B0sO38bZ.js +0 -1
  124. package/dist/chunk-QN33PNHL-B_PGnTkk.mjs +0 -20
  125. package/dist/clone-B0UaPT2Z.js +0 -1
  126. package/dist/cose-bilkent-S5V4N54A-BCaAPmuF.js +0 -1
  127. package/dist/cytoscape.esm-DkGgpG6d.js +0 -331
  128. package/dist/dagre-6UL2VRFP-By42zbLA.mjs +0 -446
  129. package/dist/dagre-6UL2VRFP-DCwfkcWi.js +0 -4
  130. package/dist/diagram-PSM6KHXK-hjXN9n1N.js +0 -24
  131. package/dist/diagram-QEK2KX5R-B04ODMim.js +0 -43
  132. package/dist/diagram-S2PKOQOG-BmCs4MZE.js +0 -24
  133. package/dist/erDiagram-Q2GNP2WA-4KtQUUuI.js +0 -60
  134. package/dist/flowDiagram-NV44I4VS-BwpfJE0U.js +0 -162
  135. package/dist/ganttDiagram-JELNMOA3-D7rI7u8B.js +0 -267
  136. package/dist/gitGraphDiagram-NY62KEGX-BDTsbSkO.mjs +0 -712
  137. package/dist/gitGraphDiagram-NY62KEGX-IQ8KriUw.js +0 -65
  138. package/dist/index-CkYZRBYn.js +0 -676
  139. package/dist/info-NVLQJR56-B5gDnSIT.mjs +0 -5
  140. package/dist/journeyDiagram-XKPGCS4Q-POnSekz9.js +0 -139
  141. package/dist/kanban-definition-3W4ZIXB7-BPr0_7wG.mjs +0 -720
  142. package/dist/kanban-definition-3W4ZIXB7-Bm064qrf.js +0 -89
  143. package/dist/mermaid-4DMBBIKO-DDxvQcE9.mjs +0 -4
  144. package/dist/mermaid-parser.core-BHAgLMGa.js +0 -128
  145. package/dist/mindmap-definition-VGOIOE7T-CV7bD4HY.js +0 -68
  146. package/dist/pie-7BOR55EZ-B0-atE_o.mjs +0 -5
  147. package/dist/quadrantDiagram-AYHSOK5B-B4gVakRV.js +0 -7
  148. package/dist/requirementDiagram-UZGBJVZJ-0zMPj-SD.js +0 -64
  149. package/dist/sankeyDiagram-TZEHDZUN-Cl8-L83T.js +0 -10
  150. package/dist/sequenceDiagram-WL72ISMW-DRQn7Fe4.js +0 -145
  151. package/dist/timeline-definition-IT6M3QCI-2X4dfyLj.js +0 -61
  152. package/dist/xychartDiagram-PRI3JC2R-BaFd1In8.js +0 -7
@@ -1,9 +1,9 @@
1
- import { _ as w, K as te, L as ae, P as he, i as ue, l as J, bf as P, h as Y, e as pe, d as fe, y as ge, z as me, g as ye, s as Se, M as ve, bg as xe, D as be } from "./index-oe4HpmeG.mjs";
2
- import { s as we } from "./chunk-QN33PNHL-B_PGnTkk.mjs";
3
- import { p as Ce } from "./chunk-4BX2VUAB-DldMXCTt.mjs";
4
- import { p as Te } from "./mermaid-parser.core-C8Sxzqul.mjs";
1
+ import { _ as w, K as te, L as ae, P as he, i as ue, l as J, be as P, h as Y, e as pe, d as fe, y as ge, z as me, g as ye, s as Se, M as ve, bf as xe, D as be } from "./index-yf1-93v5.mjs";
2
+ import { s as we } from "./chunk-QN33PNHL-CpBQYWWf.mjs";
3
+ import { p as Ce } from "./chunk-4BX2VUAB-DBTu5W6L.mjs";
4
+ import { p as Te } from "./mermaid-parser.core-CkXMNpV7.mjs";
5
5
  import { b as O } from "./defaultLocale-BgPVtth8.mjs";
6
- import { o as Z } from "./ordinal-C0oynhte.mjs";
6
+ import { o as Z } from "./ordinal-B-KqvkJf.mjs";
7
7
  function Le(t) {
8
8
  var a = 0, l = t.children, n = l && l.length;
9
9
  if (!n) a = 1;
@@ -182,14 +182,14 @@ function Ue(t, a, l, n, o, s) {
182
182
  }
183
183
  return d;
184
184
  }
185
- const Ze = function t(a) {
185
+ const Ze = (function t(a) {
186
186
  function l(n, o, s, d, h) {
187
187
  Ue(a, n, o, s, d, h);
188
188
  }
189
189
  return l.ratio = function(n) {
190
190
  return t((n = +n) > 1 ? n : 1);
191
191
  }, l;
192
- }(Ke);
192
+ })(Ke);
193
193
  function Je() {
194
194
  var t = Ze, a = !1, l = 1, n = 1, o = [0], s = G, d = G, h = G, g = G, c = G;
195
195
  function u(r) {
@@ -236,7 +236,7 @@ var R, ne = (R = class {
236
236
  });
237
237
  }
238
238
  addNode(a, l) {
239
- this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ?? (this.root = a));
239
+ this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ??= a);
240
240
  }
241
241
  getRoot() {
242
242
  return { name: "", children: this.outerNodes };
@@ -244,15 +244,14 @@ var R, ne = (R = class {
244
244
  addClass(a, l) {
245
245
  const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, o = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
246
246
  o && o.forEach((s) => {
247
- xe(s) && (n != null && n.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n != null && n.styles ? n.styles.push(s) : n.styles = [s];
247
+ xe(s) && (n?.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n?.styles ? n.styles.push(s) : n.styles = [s];
248
248
  }), this.classes.set(a, n);
249
249
  }
250
250
  getClasses() {
251
251
  return this.classes;
252
252
  }
253
253
  getStylesForClass(a) {
254
- var l;
255
- return ((l = this.classes.get(a)) == null ? void 0 : l.styles) ?? [];
254
+ return this.classes.get(a)?.styles ?? [];
256
255
  }
257
256
  clear() {
258
257
  be(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
@@ -267,7 +266,7 @@ function le(t) {
267
266
  name: n.name,
268
267
  children: n.type === "Leaf" ? void 0 : []
269
268
  };
270
- for (o.classSelector = n == null ? void 0 : n.classSelector, n != null && n.cssCompiledStyles && (o.cssCompiledStyles = [n.cssCompiledStyles]), n.type === "Leaf" && n.value !== void 0 && (o.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
269
+ for (o.classSelector = n?.classSelector, n?.cssCompiledStyles && (o.cssCompiledStyles = [n.cssCompiledStyles]), n.type === "Leaf" && n.value !== void 0 && (o.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
271
270
  l.pop();
272
271
  if (l.length === 0)
273
272
  a.push(o);
@@ -307,18 +306,17 @@ var Qe = /* @__PURE__ */ w((t, a) => {
307
306
  // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
308
307
  parser: { yy: void 0 },
309
308
  parse: /* @__PURE__ */ w(async (t) => {
310
- var a;
311
309
  try {
312
- const n = await Te("treemap", t);
313
- J.debug("Treemap AST:", n);
314
- const o = (a = re.parser) == null ? void 0 : a.yy;
315
- if (!(o instanceof ne))
310
+ const l = await Te("treemap", t);
311
+ J.debug("Treemap AST:", l);
312
+ const n = re.parser?.yy;
313
+ if (!(n instanceof ne))
316
314
  throw new Error(
317
315
  "parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
318
316
  );
319
- Qe(n, o);
320
- } catch (l) {
321
- throw J.error("Error parsing treemap:", l), l;
317
+ Qe(l, n);
318
+ } catch (a) {
319
+ throw J.error("Error parsing treemap:", a), a;
322
320
  }
323
321
  }, "parse")
324
322
  }, tt = 10, B = 10, X = 25, at = /* @__PURE__ */ w((t, a, l, n) => {
@@ -404,19 +402,18 @@ var Qe = /* @__PURE__ */ w((t, a) => {
404
402
  return;
405
403
  const i = Y(this), f = e.data.name;
406
404
  i.text(f);
407
- const C = e.x1 - e.x0, $ = 6;
408
- let A;
409
- s.showValues !== !1 && e.value ? A = C - 10 - 30 - 10 - $ : A = C - $ - 6;
410
- const F = Math.max(15, A), y = i.node();
411
- if (y.getComputedTextLength() > F) {
412
- const T = "...";
413
- let L = f;
414
- for (; L.length > 0; ) {
415
- if (L = f.substring(0, L.length - 1), L.length === 0) {
416
- i.text(T), y.getComputedTextLength() > F && i.text("");
405
+ const C = e.x1 - e.x0, L = 6;
406
+ let $;
407
+ s.showValues !== !1 && e.value ? $ = C - 10 - 30 - 10 - L : $ = C - L - 6;
408
+ const A = Math.max(15, $), y = i.node();
409
+ if (y.getComputedTextLength() > A) {
410
+ let T = f;
411
+ for (; T.length > 0; ) {
412
+ if (T = f.substring(0, T.length - 1), T.length === 0) {
413
+ i.text("..."), y.getComputedTextLength() > A && i.text("");
417
414
  break;
418
415
  }
419
- if (i.text(L + T), y.getComputedTextLength() <= F)
416
+ if (i.text(T + "..."), y.getComputedTextLength() <= A)
420
417
  break;
421
418
  }
422
419
  }
@@ -431,25 +428,25 @@ var Qe = /* @__PURE__ */ w((t, a) => {
431
428
  const i = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + k(e.data.name) + ";", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
432
429
  return i + f.labelStyles.replace("color:", "fill:");
433
430
  }).attr("clip-path", (e, i) => `url(#clip-${a}-${i})`).text((e) => e.data.name).each(function(e) {
434
- const i = Y(this), f = e.x1 - e.x0, C = e.y1 - e.y0, $ = i.node(), A = 4, D = f - 2 * A, F = C - 2 * A;
435
- if (D < 10 || F < 10) {
431
+ const i = Y(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = i.node(), $ = 4, D = f - 2 * $, A = C - 2 * $;
432
+ if (D < 10 || A < 10) {
436
433
  i.style("display", "none");
437
434
  return;
438
435
  }
439
436
  let y = parseInt(i.style("font-size"), 10);
440
- const _ = 8, T = 28, L = 0.6, z = 6, H = 2;
441
- for (; $.getComputedTextLength() > D && y > _; )
437
+ const _ = 8, F = 28, T = 0.6, z = 6, H = 2;
438
+ for (; L.getComputedTextLength() > D && y > _; )
442
439
  y--, i.style("font-size", `${y}px`);
443
440
  let I = Math.max(
444
441
  z,
445
- Math.min(T, Math.round(y * L))
442
+ Math.min(F, Math.round(y * T))
446
443
  ), U = y + H + I;
447
- for (; U > F && y > _ && (y--, I = Math.max(
444
+ for (; U > A && y > _ && (y--, I = Math.max(
448
445
  z,
449
- Math.min(T, Math.round(y * L))
446
+ Math.min(F, Math.round(y * T))
450
447
  ), !(I < z && y === _)); )
451
448
  i.style("font-size", `${y}px`), U = y + H + I;
452
- i.style("font-size", `${y}px`), ($.getComputedTextLength() > D || y < _ || F < y) && i.style("display", "none");
449
+ i.style("font-size", `${y}px`), (L.getComputedTextLength() > D || y < _ || A < y) && i.style("display", "none");
453
450
  }), s.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
454
451
  return (i.y1 - i.y0) / 2;
455
452
  }).attr("style", (i) => {
@@ -461,23 +458,23 @@ var Qe = /* @__PURE__ */ w((t, a) => {
461
458
  f.style("display", "none");
462
459
  return;
463
460
  }
464
- const $ = Y(C).select(".treemapLabel");
465
- if ($.empty() || $.style("display") === "none") {
461
+ const L = Y(C).select(".treemapLabel");
462
+ if (L.empty() || L.style("display") === "none") {
466
463
  f.style("display", "none");
467
464
  return;
468
465
  }
469
- const A = parseFloat($.style("font-size")), D = 28, F = 0.6, y = 6, _ = 2, T = Math.max(
466
+ const $ = parseFloat(L.style("font-size")), D = 28, A = 0.6, y = 6, _ = 2, F = Math.max(
470
467
  y,
471
- Math.min(D, Math.round(A * F))
468
+ Math.min(D, Math.round($ * A))
472
469
  );
473
- f.style("font-size", `${T}px`);
474
- const z = (i.y1 - i.y0) / 2 + A / 2 + _;
470
+ f.style("font-size", `${F}px`);
471
+ const z = (i.y1 - i.y0) / 2 + $ / 2 + _;
475
472
  f.attr("y", z);
476
- const H = i.x1 - i.x0, ce = i.y1 - i.y0 - 4, de = H - 2 * 4;
477
- f.node().getComputedTextLength() > de || z + T > ce || T < y ? f.style("display", "none") : f.style("display", null);
473
+ const H = i.x1 - i.x0, ce = i.y1 - i.y0 - 4, de = H - 8;
474
+ f.node().getComputedTextLength() > de || z + F > ce || F < y ? f.style("display", "none") : f.style("display", null);
478
475
  });
479
476
  const oe = s.diagramPadding ?? 8;
480
- we(b, oe, "flowchart", (s == null ? void 0 : s.useMaxWidth) || !1);
477
+ we(b, oe, "flowchart", s?.useMaxWidth || !1);
481
478
  }, "draw"), nt = /* @__PURE__ */ w(function(t, a) {
482
479
  return a.db.getClasses();
483
480
  }, "getClasses"), lt = { draw: at, getClasses: nt }, rt = {
@@ -0,0 +1,43 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-DIQbvlIr.js"),L=require("./chunk-4BX2VUAB-6hr5PCkV.js"),O=require("./mermaid-parser.core-DQkQZAvG.js");var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y={axes:[],curves:[],options:h},p=structuredClone(y),S=n.defaultConfig_default.radar,k=n.__name(()=>n.cleanAndMerge({...S,...n.getConfig().radar}),"getConfig"),f=n.__name(()=>p.axes,"getAxes"),D=n.__name(()=>p.curves,"getCurves"),R=n.__name(()=>p.options,"getOptions"),I=n.__name(a=>{p.axes=a.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),E=n.__name(a=>{p.curves=a.map(e=>({name:e.name,label:e.label??e.name,entries:F(e.entries)}))},"setCurves"),F=n.__name(a=>{if(a[0].axis==null)return a.map(t=>t.value);const e=f();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{const r=a.find(s=>s.axis?.$refText===t.name);if(r===void 0)throw new Error("Missing entry for axis "+t.label);return r.value})},"computeCurveEntries"),P=n.__name(a=>{const e=a.reduce((t,r)=>(t[r.name]=r,t),{});p.options={showLegend:e.showLegend?.value??h.showLegend,ticks:e.ticks?.value??h.ticks,max:e.max?.value??h.max,min:e.min?.value??h.min,graticule:e.graticule?.value??h.graticule}},"setOptions"),G=n.__name(()=>{n.clear(),p=structuredClone(y)},"clear"),_={getAxes:f,getCurves:D,getOptions:R,setAxes:I,setCurves:E,setOptions:P,getConfig:k,clear:G,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,getAccDescription:n.getAccDescription,setAccDescription:n.setAccDescription},z=n.__name(a=>{L.populateCommonDb(a,_);const{axes:e,curves:t,options:r}=a;_.setAxes(e),_.setCurves(t),_.setOptions(r)},"populate"),B={parse:n.__name(async a=>{const e=await O.parse("radar",a);n.log.debug(e),z(e)},"parse")},V=n.__name((a,e,t,r)=>{const s=r.db,o=s.getAxes(),l=s.getCurves(),i=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),m=n.selectSvgElement(e),u=W(m,c),g=i.max??Math.max(...l.map($=>Math.max(...$.entries))),x=i.min,v=Math.min(c.width,c.height)/2;j(u,o,v,i.ticks,i.graticule),q(u,o,v,c),C(u,o,l,x,g,i.graticule,c),A(u,l,i.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),W=n.__name((a,e)=>{const t=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,s={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return a.attr("viewbox",`0 0 ${t} ${r}`).attr("width",t).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),j=n.__name((a,e,t,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const l=t*(o+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const o=e.length;for(let l=0;l<r;l++){const i=t*(l+1)/r,c=e.map((d,m)=>{const u=2*m*Math.PI/o-Math.PI/2,g=i*Math.cos(u),x=i*Math.sin(u);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),q=n.__name((a,e,t,r)=>{const s=e.length;for(let o=0;o<s;o++){const l=e[o].label,i=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",t*r.axisScaleFactor*Math.cos(i)).attr("y2",t*r.axisScaleFactor*Math.sin(i)).attr("class","radarAxisLine"),a.append("text").text(l).attr("x",t*r.axisLabelFactor*Math.cos(i)).attr("y",t*r.axisLabelFactor*Math.sin(i)).attr("class","radarAxisLabel")}},"drawAxes");function C(a,e,t,r,s,o,l){const i=e.length,c=Math.min(l.width,l.height)/2;t.forEach((d,m)=>{if(d.entries.length!==i)return;const u=d.entries.map((g,x)=>{const v=2*Math.PI*x/i-Math.PI/2,$=w(g,r,s,c),M=$*Math.cos(v),T=$*Math.sin(v);return{x:M,y:T}});o==="circle"?a.append("path").attr("d",b(u,l.curveTension)).attr("class",`radarCurve-${m}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}n.__name(C,"drawCurves");function w(a,e,t,r){const s=Math.min(Math.max(a,e),t);return r*(s-e)/(t-e)}n.__name(w,"relativeRadius");function b(a,e){const t=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<t;s++){const o=a[(s-1+t)%t],l=a[s],i=a[(s+1)%t],c=a[(s+2)%t],d={x:l.x+(i.x-o.x)*e,y:l.y+(i.y-o.y)*e},m={x:i.x-(c.x-l.x)*e,y:i.y-(c.y-l.y)*e};r+=` C${d.x},${d.y} ${m.x},${m.y} ${i.x},${i.y}`}return`${r} Z`}n.__name(b,"closedRoundCurve");function A(a,e,t,r){if(!t)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,l=20;e.forEach((i,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(i.label)})}n.__name(A,"drawLegend");var H={draw:V},U=n.__name((a,e)=>{let t="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];t+=`
2
+ .radarCurve-${r} {
3
+ color: ${s};
4
+ fill: ${s};
5
+ fill-opacity: ${e.curveOpacity};
6
+ stroke: ${s};
7
+ stroke-width: ${e.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${r} {
10
+ fill: ${s};
11
+ fill-opacity: ${e.curveOpacity};
12
+ stroke: ${s};
13
+ }
14
+ `}return t},"genIndexStyles"),X=n.__name(a=>{const e=n.getThemeVariables3(),t=n.getConfig(),r=n.cleanAndMerge(e,t.themeVariables),s=n.cleanAndMerge(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),N=n.__name(({radar:a}={})=>{const{themeVariables:e,radarOptions:t}=X(a);return`
15
+ .radarTitle {
16
+ font-size: ${e.fontSize};
17
+ color: ${e.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${t.axisColor};
23
+ stroke-width: ${t.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ dominant-baseline: middle;
27
+ text-anchor: middle;
28
+ font-size: ${t.axisLabelFontSize}px;
29
+ color: ${t.axisColor};
30
+ }
31
+ .radarGraticule {
32
+ fill: ${t.graticuleColor};
33
+ fill-opacity: ${t.graticuleOpacity};
34
+ stroke: ${t.graticuleColor};
35
+ stroke-width: ${t.graticuleStrokeWidth};
36
+ }
37
+ .radarLegendText {
38
+ text-anchor: start;
39
+ font-size: ${t.legendFontSize}px;
40
+ dominant-baseline: hanging;
41
+ }
42
+ ${U(e,t)}
43
+ `},"styles"),Y={parser:B,db:_,renderer:H,styles:N};exports.diagram=Y;
@@ -1,6 +1,6 @@
1
- import { _ as l, s as k, g as R, z as I, y as _, d as D, e as E, P as F, D as P, K as f, L as C, M as z, l as G, a6 as V } from "./index-oe4HpmeG.mjs";
2
- import { p as W } from "./chunk-4BX2VUAB-DldMXCTt.mjs";
3
- import { p as B } from "./mermaid-parser.core-C8Sxzqul.mjs";
1
+ import { _ as l, s as k, g as R, z as I, y as _, d as D, e as E, P as F, D as P, K as f, L as C, M as z, l as G, a6 as V } from "./index-yf1-93v5.mjs";
2
+ import { p as W } from "./chunk-4BX2VUAB-DBTu5W6L.mjs";
3
+ import { p as B } from "./mermaid-parser.core-CkXMNpV7.mjs";
4
4
  var x = {
5
5
  showLegend: !0,
6
6
  ticks: 5,
@@ -32,26 +32,22 @@ var x = {
32
32
  if (t.length === 0)
33
33
  throw new Error("Axes must be populated before curves for reference entries");
34
34
  return t.map((e) => {
35
- const r = a.find((s) => {
36
- var o;
37
- return ((o = s.axis) == null ? void 0 : o.$refText) === e.name;
38
- });
35
+ const r = a.find((s) => s.axis?.$refText === e.name);
39
36
  if (r === void 0)
40
37
  throw new Error("Missing entry for axis " + e.label);
41
38
  return r.value;
42
39
  });
43
40
  }, "computeCurveEntries"), Z = /* @__PURE__ */ l((a) => {
44
- var e, r, s, o, i;
45
41
  const t = a.reduce(
46
- (n, c) => (n[c.name] = c, n),
42
+ (e, r) => (e[r.name] = r, e),
47
43
  {}
48
44
  );
49
45
  h.options = {
50
- showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ?? x.showLegend,
51
- ticks: ((r = t.ticks) == null ? void 0 : r.value) ?? x.ticks,
52
- max: ((s = t.max) == null ? void 0 : s.value) ?? x.max,
53
- min: ((o = t.min) == null ? void 0 : o.value) ?? x.min,
54
- graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? x.graticule
46
+ showLegend: t.showLegend?.value ?? x.showLegend,
47
+ ticks: t.ticks?.value ?? x.ticks,
48
+ max: t.max?.value ?? x.max,
49
+ min: t.min?.value ?? x.min,
50
+ graticule: t.graticule?.value ?? x.graticule
55
51
  };
56
52
  }, "setOptions"), q = /* @__PURE__ */ l(() => {
57
53
  P(), h = structuredClone(w);
@@ -0,0 +1,24 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-DIQbvlIr.js"),y=require("./chunk-4BX2VUAB-6hr5PCkV.js"),B=require("./mermaid-parser.core-DQkQZAvG.js");var $=a.defaultConfig_default.packet,b,m=(b=class{constructor(){this.packet=[],this.setAccTitle=a.setAccTitle,this.getAccTitle=a.getAccTitle,this.setDiagramTitle=a.setDiagramTitle,this.getDiagramTitle=a.getDiagramTitle,this.getAccDescription=a.getAccDescription,this.setAccDescription=a.setAccDescription}getConfig(){const t=a.cleanAndMerge({...$,...a.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){a.clear(),this.packet=[]}},a.__name(b,"PacketDB"),b),C=1e4,_=a.__name((e,t)=>{y.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:n,bits:p,label:d}of e.blocks){if(r!==void 0&&n!==void 0&&n<r)throw new Error(`Packet block ${r} - ${n} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${n??r} is not contiguous. It should start from ${o+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(n??=r+(p??1)-1,p??=n-r+1,o=n,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,s]=S({start:r,end:n,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!s)break;({start:r,end:n,bits:p,label:d}=s)}}t.pushWord(i)},"populate"),S=a.__name((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const i=t*o-1,l=t*o;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),w={parser:{yy:void 0},parse:a.__name(async e=>{const t=await B.parse("packet",e),o=w.parser?.yy;if(!(o instanceof m))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.log.debug(t),_(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:n,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),s=l.getDiagramTitle(),k=r+n,h=k*(g.length+1)-(s?0:r),f=p*d+2,u=a.selectSvgElement(t);u.attr("viewbox",`0 0 ${f} ${h}`),a.configureSvgSize(u,h,f,c.useMaxWidth);for(const[v,x]of g.entries())T(u,x,v,c);u.append("text").text(s).attr("x",f/2).attr("y",h-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=a.__name((e,t,o,{rowHeight:i,paddingX:l,paddingY:c,bitWidth:r,bitsPerRow:n,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const s of t){const k=s.start%n*r+1,h=(s.end-s.start+1)*r-l;if(d.append("rect").attr("x",k).attr("y",g).attr("width",h).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+h/2).attr("y",g+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!p)continue;const f=s.end===s.start,u=g-2;d.append("text").attr("x",k+(f?h/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(s.start),f||d.append("text").attr("x",k+h).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),D={draw:P},A={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},z=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(A,e);return`
2
+ .packetByte {
3
+ font-size: ${t.byteFontSize};
4
+ }
5
+ .packetByte.start {
6
+ fill: ${t.startByteColor};
7
+ }
8
+ .packetByte.end {
9
+ fill: ${t.endByteColor};
10
+ }
11
+ .packetLabel {
12
+ fill: ${t.labelColor};
13
+ font-size: ${t.labelFontSize};
14
+ }
15
+ .packetTitle {
16
+ fill: ${t.titleColor};
17
+ font-size: ${t.titleFontSize};
18
+ }
19
+ .packetBlock {
20
+ stroke: ${t.blockStrokeColor};
21
+ stroke-width: ${t.blockStrokeWidth};
22
+ fill: ${t.blockFillColor};
23
+ }
24
+ `},"styles"),E={parser:w,get db(){return new m},renderer:D,styles:z};exports.diagram=E;
@@ -1,6 +1,6 @@
1
- import { _ as b, K as m, P as B, i as C, l as w, e as S, d as D, y as P, z as T, g as z, s as E, L as F, M as A, D as W } from "./index-oe4HpmeG.mjs";
2
- import { p as _ } from "./chunk-4BX2VUAB-DldMXCTt.mjs";
3
- import { p as L } from "./mermaid-parser.core-C8Sxzqul.mjs";
1
+ import { _ as b, K as m, P as B, i as C, l as w, e as S, d as D, y as P, z as T, g as z, s as E, L as F, M as A, D as W } from "./index-yf1-93v5.mjs";
2
+ import { p as _ } from "./chunk-4BX2VUAB-DBTu5W6L.mjs";
3
+ import { p as L } from "./mermaid-parser.core-CkXMNpV7.mjs";
4
4
  var M = A.packet, u, v = (u = class {
5
5
  constructor() {
6
6
  this.packet = [], this.setAccTitle = S, this.getAccTitle = D, this.setDiagramTitle = P, this.getDiagramTitle = T, this.getAccDescription = z, this.setAccDescription = E;
@@ -23,41 +23,41 @@ var M = A.packet, u, v = (u = class {
23
23
  }
24
24
  }, b(u, "PacketDB"), u), N = 1e4, Y = /* @__PURE__ */ b((e, t) => {
25
25
  _(e, t);
26
- let s = -1, r = [], n = 1;
26
+ let r = -1, s = [], n = 1;
27
27
  const { bitsPerRow: l } = t.getConfig();
28
28
  for (let { start: a, end: i, bits: d, label: c } of e.blocks) {
29
29
  if (a !== void 0 && i !== void 0 && i < a)
30
30
  throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
31
- if (a ?? (a = s + 1), a !== s + 1)
31
+ if (a ??= r + 1, a !== r + 1)
32
32
  throw new Error(
33
- `Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${s + 1}.`
33
+ `Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${r + 1}.`
34
34
  );
35
35
  if (d === 0)
36
36
  throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
37
- for (i ?? (i = a + (d ?? 1) - 1), d ?? (d = i - a + 1), s = i, w.debug(`Packet block ${a} - ${s} with label ${c}`); r.length <= l + 1 && t.getPacket().length < N; ) {
37
+ for (i ??= a + (d ?? 1) - 1, d ??= i - a + 1, r = i, w.debug(`Packet block ${a} - ${r} with label ${c}`); s.length <= l + 1 && t.getPacket().length < N; ) {
38
38
  const [p, o] = I({ start: a, end: i, bits: d, label: c }, n, l);
39
- if (r.push(p), p.end + 1 === n * l && (t.pushWord(r), r = [], n++), !o)
39
+ if (s.push(p), p.end + 1 === n * l && (t.pushWord(s), s = [], n++), !o)
40
40
  break;
41
41
  ({ start: a, end: i, bits: d, label: c } = o);
42
42
  }
43
43
  }
44
- t.pushWord(r);
45
- }, "populate"), I = /* @__PURE__ */ b((e, t, s) => {
44
+ t.pushWord(s);
45
+ }, "populate"), I = /* @__PURE__ */ b((e, t, r) => {
46
46
  if (e.start === void 0)
47
47
  throw new Error("start should have been set during first phase");
48
48
  if (e.end === void 0)
49
49
  throw new Error("end should have been set during first phase");
50
50
  if (e.start > e.end)
51
51
  throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);
52
- if (e.end + 1 <= t * s)
52
+ if (e.end + 1 <= t * r)
53
53
  return [e, void 0];
54
- const r = t * s - 1, n = t * s;
54
+ const s = t * r - 1, n = t * r;
55
55
  return [
56
56
  {
57
57
  start: e.start,
58
- end: r,
58
+ end: s,
59
59
  label: e.label,
60
- bits: r - e.start
60
+ bits: s - e.start
61
61
  },
62
62
  {
63
63
  start: n,
@@ -70,25 +70,24 @@ var M = A.packet, u, v = (u = class {
70
70
  // @ts-expect-error - PacketDB is not assignable to DiagramDB
71
71
  parser: { yy: void 0 },
72
72
  parse: /* @__PURE__ */ b(async (e) => {
73
- var r;
74
- const t = await L("packet", e), s = (r = x.parser) == null ? void 0 : r.yy;
75
- if (!(s instanceof v))
73
+ const t = await L("packet", e), r = x.parser?.yy;
74
+ if (!(r instanceof v))
76
75
  throw new Error(
77
76
  "parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
78
77
  );
79
- w.debug(t), Y(t, s);
78
+ w.debug(t), Y(t, r);
80
79
  }, "parse")
81
- }, K = /* @__PURE__ */ b((e, t, s, r) => {
82
- const n = r.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = B(t);
80
+ }, K = /* @__PURE__ */ b((e, t, r, s) => {
81
+ const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = B(t);
83
82
  f.attr("viewbox", `0 0 ${k} ${g}`), C(f, g, k, l.useMaxWidth);
84
83
  for (const [y, $] of p.entries())
85
84
  O(f, $, y, l);
86
85
  f.append("text").text(o).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
87
- }, "draw"), O = /* @__PURE__ */ b((e, t, s, { rowHeight: r, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
88
- const c = e.append("g"), p = s * (r + l) + l;
86
+ }, "draw"), O = /* @__PURE__ */ b((e, t, r, { rowHeight: s, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
87
+ const c = e.append("g"), p = r * (s + l) + l;
89
88
  for (const o of t) {
90
89
  const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
91
- if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", r).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
90
+ if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
92
91
  continue;
93
92
  const k = o.end === o.start, f = p - 2;
94
93
  c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);