@qwen-code/web-shell 0.27.1 → 0.27.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 (158) hide show
  1. package/NOTICES.txt +10721 -958
  2. package/dist/{PierreFilePreview-BT_JRIvF.js → PierreFilePreview-CVi_Wsf-.js} +1 -1
  3. package/dist/SpreadsheetPreview-CTyYrLmD.js +379 -0
  4. package/dist/{WorkspaceFileBrowser-G1yA2eBf.js → WorkspaceFileBrowser-DkQgnDFv.js} +2 -2
  5. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  6. package/dist/abnfDiagram-VCTEODGH-CQWhk3bg.js +87 -0
  7. package/dist/abnfDiagram-VCTEODGH-DXK3iWaN.js +87 -0
  8. package/dist/{agents-route-bkxyBAkN.js → agents-route-ZD8W2lTb.js} +2 -2
  9. package/dist/arc-BcP3aO-G.js +83 -0
  10. package/dist/arc-DkZAOzaU.js +83 -0
  11. package/dist/architectureDiagram-5GKGNRK7-DhcVEkLQ.js +4775 -0
  12. package/dist/architectureDiagram-5GKGNRK7-DusU8ybk.js +4776 -0
  13. package/dist/blockDiagram-NRAW4CY4-BMOuo5wl.js +1414 -0
  14. package/dist/blockDiagram-NRAW4CY4-YciA8-8I.js +1414 -0
  15. package/dist/c4Diagram-UCG6FXSJ-BJxpHO4v.js +1508 -0
  16. package/dist/c4Diagram-UCG6FXSJ-DNpq-cdF.js +1508 -0
  17. package/dist/channel-CfhQTpjX.js +5 -0
  18. package/dist/channel-QZAYPfF8.js +5 -0
  19. package/dist/chunk-2Q5K7J3B-EGbMOnEe.js +15 -0
  20. package/dist/chunk-2Q5K7J3B-mtpkChaF.js +15 -0
  21. package/dist/chunk-5VM5RSS4-CP4Q2W8n.js +19 -0
  22. package/dist/chunk-5VM5RSS4-CucJ3wyB.js +19 -0
  23. package/dist/chunk-F27PBJKO-CS9kzvAx.js +68 -0
  24. package/dist/chunk-F27PBJKO-Cfw_29T-.js +68 -0
  25. package/dist/chunk-G27WJ6UU-BZzmQ8FW.js +1408 -0
  26. package/dist/chunk-G27WJ6UU-DdeEiwmL.js +1408 -0
  27. package/dist/chunk-JWPE2WC7-BL_hjRLf.js +8 -0
  28. package/dist/chunk-JWPE2WC7-C03UDQBx.js +8 -0
  29. package/dist/chunk-LCL6LL3I-CNn3XyuL.js +1533 -0
  30. package/dist/chunk-LCL6LL3I-CR-IGGIM.js +1533 -0
  31. package/dist/chunk-POPQ4Y6H-BVQbxVHz.js +19 -0
  32. package/dist/chunk-POPQ4Y6H-UJK1fYGP.js +19 -0
  33. package/dist/chunk-SVP7TREG-B-E-xFG8.js +664 -0
  34. package/dist/chunk-SVP7TREG-BUmyTmov.js +664 -0
  35. package/dist/chunk-XXDRQBXY-BDcf4DQz.js +8 -0
  36. package/dist/chunk-XXDRQBXY-BHAq0mtL.js +8 -0
  37. package/dist/classDiagram-DTDB5LWJ-CVA3J-EH.js +16 -0
  38. package/dist/classDiagram-DTDB5LWJ-Dh121Rlt.js +16 -0
  39. package/dist/classDiagram-v2-JRS7N3AN-CVA3J-EH.js +16 -0
  40. package/dist/classDiagram-v2-JRS7N3AN-Dh121Rlt.js +16 -0
  41. package/dist/cose-bilkent-JH36ORCC-CLe0kcHa.js +2605 -0
  42. package/dist/cose-bilkent-JH36ORCC-DpMM48hA.js +2606 -0
  43. package/dist/cynefin-OW5HDTMX-CyO3b088.js +23750 -0
  44. package/dist/cynefinDiagram-5FMLGOSQ-C5xaWeuA.js +299 -0
  45. package/dist/cynefinDiagram-5FMLGOSQ-mLaK-3R3.js +299 -0
  46. package/dist/cytoscape.esm-DCrf4dL8.js +18782 -0
  47. package/dist/daemon-react-sdk.js +1 -1
  48. package/dist/dagre-3AP2YEHR-CmNFrtW9.js +456 -0
  49. package/dist/dagre-3AP2YEHR-zDm3fBQq.js +456 -0
  50. package/dist/defaultLocale-BgPVtth8.js +171 -0
  51. package/dist/diagram-S7CK7UJ4-BQtgRcGU.js +346 -0
  52. package/dist/diagram-S7CK7UJ4-Clojnf04.js +346 -0
  53. package/dist/diagram-UQ7AKVKN-B3Ll3rB4.js +219 -0
  54. package/dist/diagram-UQ7AKVKN-CTn4O0fd.js +219 -0
  55. package/dist/diagram-VSXAHHWV-BeYXDVEh.js +463 -0
  56. package/dist/diagram-VSXAHHWV-mdxkNEZP.js +463 -0
  57. package/dist/diagram-VX7I27RA-C3bzQYLd.js +529 -0
  58. package/dist/diagram-VX7I27RA-DaPLIQOr.js +529 -0
  59. package/dist/diagram-Z3DM3KII-BImvaL3c.js +142 -0
  60. package/dist/diagram-Z3DM3KII-CkkdGhWO.js +142 -0
  61. package/dist/{docx-preview-BucJeYCm.js → docx-preview-BfV4m8Qp.js} +503 -506
  62. package/dist/ebnfDiagram-PWID7BFC-C8RUggbp.js +109 -0
  63. package/dist/ebnfDiagram-PWID7BFC-gJHJx-lt.js +109 -0
  64. package/dist/erDiagram-SSCWMZ5O-CKFzjLCd.js +1059 -0
  65. package/dist/erDiagram-SSCWMZ5O-DLJjXFG9.js +1059 -0
  66. package/dist/flowDiagram-A5DVABFB-BHAeEzG1.js +1689 -0
  67. package/dist/flowDiagram-A5DVABFB-BOdsfJ-4.js +1689 -0
  68. package/dist/ganttDiagram-EL5Y4UJY-CtL6LAbW.js +2703 -0
  69. package/dist/ganttDiagram-EL5Y4UJY-D0hNphpF.js +2704 -0
  70. package/dist/gitGraphDiagram-WWUBYQGX-8XcPnT4w.js +815 -0
  71. package/dist/gitGraphDiagram-WWUBYQGX-DxHtQ0ba.js +815 -0
  72. package/dist/{index-B6wNHUaX.js → index-BGsppGgG.js} +69284 -64504
  73. package/dist/index.js +3 -3
  74. package/dist/infoDiagram-RXCK75RN-B-Ds06LN.js +24 -0
  75. package/dist/infoDiagram-RXCK75RN-Dhirg4if.js +24 -0
  76. package/dist/init-DjUOC4st.js +16 -0
  77. package/dist/ishikawaDiagram-5VMMS53U-BJPKneVd.js +621 -0
  78. package/dist/ishikawaDiagram-5VMMS53U-CsttzTkq.js +621 -0
  79. package/dist/journeyDiagram-EYS64GPL-BBAEhOQ9.js +836 -0
  80. package/dist/journeyDiagram-EYS64GPL-DfXS6tI_.js +836 -0
  81. package/dist/kanban-definition-3QL26DDD-Bh1Jz01C.js +723 -0
  82. package/dist/kanban-definition-3QL26DDD-C8yOTG02.js +723 -0
  83. package/dist/layout-Dxab-q-T.js +1704 -0
  84. package/dist/layout-sTbo9v3C.js +1704 -0
  85. package/dist/linear-BhTDfwHZ.js +259 -0
  86. package/dist/linear-CjDL9r_e.js +259 -0
  87. package/dist/mermaid.core-CFV16zMl.js +19742 -0
  88. package/dist/mermaid.core-DBp8atac.js +19747 -0
  89. package/dist/mindmap-definition-FBJOCRG2-KPo1Z4it.js +826 -0
  90. package/dist/mindmap-definition-FBJOCRG2-vau9OLMK.js +826 -0
  91. package/dist/ordinal-DfAQgscy.js +61 -0
  92. package/dist/pegDiagram-XKGWAZYB-CFjH6RoO.js +95 -0
  93. package/dist/pegDiagram-XKGWAZYB-EeXt14MX.js +95 -0
  94. package/dist/pieDiagram-E7YTZNPT-CJa9GbCV.js +208 -0
  95. package/dist/pieDiagram-E7YTZNPT-JyO_8fWF.js +208 -0
  96. package/dist/quadrantDiagram-AXDQQJYC-B7tyPD89.js +1023 -0
  97. package/dist/quadrantDiagram-AXDQQJYC-G9wAekw0.js +1023 -0
  98. package/dist/railroadDiagram-O6MQD6OU-3-cuTnqH.js +77 -0
  99. package/dist/railroadDiagram-O6MQD6OU-SyM4QCMp.js +77 -0
  100. package/dist/requirementDiagram-EFPCY7ZU-BJal3W63.js +882 -0
  101. package/dist/requirementDiagram-EFPCY7ZU-bMW72Av_.js +882 -0
  102. package/dist/sankeyDiagram-P5KCCOFB-BKP8fccK.js +847 -0
  103. package/dist/sankeyDiagram-P5KCCOFB-C4KDi8Ty.js +847 -0
  104. package/dist/sequenceDiagram-WJ2MYXX4-DFvbPjPG.js +2888 -0
  105. package/dist/sequenceDiagram-WJ2MYXX4-DvgRoXFL.js +2888 -0
  106. package/dist/sizeCapture-X5ZJPWSS-DPkvpCxM.js +46 -0
  107. package/dist/sizeCapture-X5ZJPWSS-DU4nf5aV.js +46 -0
  108. package/dist/stateDiagram-HBIQ2CUA-CWp0mOcF.js +262 -0
  109. package/dist/stateDiagram-HBIQ2CUA-DkN3hNFV.js +262 -0
  110. package/dist/stateDiagram-v2-4QOOHH4V-Bh7H2ZBJ.js +16 -0
  111. package/dist/stateDiagram-v2-4QOOHH4V-DX-OvV9U.js +16 -0
  112. package/dist/sw.js +1 -1
  113. package/dist/swimlanes-XN3QIQJK-2s4fbN8J.js +5219 -0
  114. package/dist/swimlanes-XN3QIQJK-CI3ENZQA.js +5219 -0
  115. package/dist/swimlanesDiagram-VK2B7HYN-BEjeqDmx.js +13 -0
  116. package/dist/swimlanesDiagram-VK2B7HYN-DWJY6BGD.js +13 -0
  117. package/dist/timeline-definition-24CTP7MA-C_tZHri9.js +1057 -0
  118. package/dist/timeline-definition-24CTP7MA-DYXEracn.js +1057 -0
  119. package/dist/transcript.js +14564 -11549
  120. package/dist/types/App.d.ts +10 -1
  121. package/dist/types/components/ComposerUsageStats.d.ts +34 -0
  122. package/dist/types/components/WelcomeHeader.d.ts +8 -0
  123. package/dist/types/components/artifacts/tokenUsageTotals.d.ts +36 -0
  124. package/dist/types/components/channels/ChannelEditorDialog.d.ts +10 -1
  125. package/dist/types/components/channels/ChannelQrLogin.d.ts +13 -0
  126. package/dist/types/components/channels/WeixinLoginPanel.d.ts +17 -0
  127. package/dist/types/components/channels/channel-editor-state.d.ts +8 -1
  128. package/dist/types/components/channels/channel-platform.d.ts +2 -1
  129. package/dist/types/components/channels/weixin-auth-api.d.ts +32 -0
  130. package/dist/types/components/managed/ManagedRuntimeSkillsImporter.d.ts +10 -0
  131. package/dist/types/components/managed/ManagedSideQueryPanel.d.ts +5 -0
  132. package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +26 -1
  133. package/dist/types/components/managed/generated/managed-agent-api.d.ts +605 -0
  134. package/dist/types/components/managed/java-managed-agent-client.d.ts +122 -1
  135. package/dist/types/components/managed/managed-agent-provider.d.ts +14 -1
  136. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +14 -1
  137. package/dist/types/components/managed/managed-extension-install.d.ts +5 -2
  138. package/dist/types/components/managed/managed-extension-messages.d.ts +7 -0
  139. package/dist/types/components/managed/managed-extension-types.d.ts +4 -0
  140. package/dist/types/components/managed/managed-session-storage.d.ts +35 -0
  141. package/dist/types/components/managed/managed-side-query-command.d.ts +5 -0
  142. package/dist/types/components/managed/managed-side-query-types.d.ts +21 -0
  143. package/dist/types/components/managed/managed-side-query.test-fixtures.d.ts +3 -0
  144. package/dist/types/components/managed/use-managed-side-queries.d.ts +26 -0
  145. package/dist/types/customization.d.ts +31 -0
  146. package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +2 -1
  147. package/dist/types/daemon/workspace/types.d.ts +8 -1
  148. package/dist/types/index.d.ts +1 -0
  149. package/dist/{useDaemonMidTurnInjected-tBzI77Ar.js → useDaemonMidTurnInjected-B7dPEdqk.js} +2040 -1825
  150. package/dist/vennDiagram-4TSXK5OY-Bi3e_aHN.js +1578 -0
  151. package/dist/vennDiagram-4TSXK5OY-DZCe1Ffi.js +1578 -0
  152. package/dist/wardleyDiagram-VM6X3IG4-BNV5jzew.js +675 -0
  153. package/dist/wardleyDiagram-VM6X3IG4-DqFJHRmt.js +675 -0
  154. package/dist/xychartDiagram-S5SC5T6Z-BVIJ86ch.js +1492 -0
  155. package/dist/xychartDiagram-S5SC5T6Z-J8xP-hcH.js +1492 -0
  156. package/package.json +19 -9
  157. package/dist/SpreadsheetPreview-d5XL70Ho.js +0 -379
  158. package/dist/types/components/artifacts/excel-preview-parser.d.ts +0 -5
@@ -0,0 +1,529 @@
1
+ import { p as ge } from "./chunk-JWPE2WC7-BL_hjRLf.js";
2
+ import { _ as w, X as ye, A as ae, D as ee, G as Se, d as ve, l as te, bd as B, j as U, b as xe, a as be, p as we, q as Ce, g as Te, s as Le, E as $e, be as Ae, r as Fe } from "./mermaid.core-CFV16zMl.js";
3
+ import { s as Ne } from "./chunk-POPQ4Y6H-BVQbxVHz.js";
4
+ import { p as Me } from "./cynefin-OW5HDTMX-CyO3b088.js";
5
+ import { b as O } from "./defaultLocale-BgPVtth8.js";
6
+ import { o as Q } from "./ordinal-DfAQgscy.js";
7
+ function _e(t) {
8
+ var a = 0, l = t.children, n = l && l.length;
9
+ if (!n) a = 1;
10
+ else for (; --n >= 0; ) a += l[n].value;
11
+ t.value = a;
12
+ }
13
+ function ke() {
14
+ return this.eachAfter(_e);
15
+ }
16
+ function ze(t, a) {
17
+ let l = -1;
18
+ for (const n of this)
19
+ t.call(a, n, ++l, this);
20
+ return this;
21
+ }
22
+ function Ve(t, a) {
23
+ for (var l = this, n = [l], r, i, h = -1; l = n.pop(); )
24
+ if (t.call(a, l, ++h, this), r = l.children)
25
+ for (i = r.length - 1; i >= 0; --i)
26
+ n.push(r[i]);
27
+ return this;
28
+ }
29
+ function De(t, a) {
30
+ for (var l = this, n = [l], r = [], i, h, d, g = -1; l = n.pop(); )
31
+ if (r.push(l), i = l.children)
32
+ for (h = 0, d = i.length; h < d; ++h)
33
+ n.push(i[h]);
34
+ for (; l = r.pop(); )
35
+ t.call(a, l, ++g, this);
36
+ return this;
37
+ }
38
+ function Pe(t, a) {
39
+ let l = -1;
40
+ for (const n of this)
41
+ if (t.call(a, n, ++l, this))
42
+ return n;
43
+ }
44
+ function Be(t) {
45
+ return this.eachAfter(function(a) {
46
+ for (var l = +t(a.data) || 0, n = a.children, r = n && n.length; --r >= 0; ) l += n[r].value;
47
+ a.value = l;
48
+ });
49
+ }
50
+ function Ee(t) {
51
+ return this.eachBefore(function(a) {
52
+ a.children && a.children.sort(t);
53
+ });
54
+ }
55
+ function Re(t) {
56
+ for (var a = this, l = We(a, t), n = [a]; a !== l; )
57
+ a = a.parent, n.push(a);
58
+ for (var r = n.length; t !== l; )
59
+ n.splice(r, 0, t), t = t.parent;
60
+ return n;
61
+ }
62
+ function We(t, a) {
63
+ if (t === a) return t;
64
+ var l = t.ancestors(), n = a.ancestors(), r = null;
65
+ for (t = l.pop(), a = n.pop(); t === a; )
66
+ r = t, t = l.pop(), a = n.pop();
67
+ return r;
68
+ }
69
+ function He() {
70
+ for (var t = this, a = [t]; t = t.parent; )
71
+ a.push(t);
72
+ return a;
73
+ }
74
+ function Ie() {
75
+ return Array.from(this);
76
+ }
77
+ function Oe() {
78
+ var t = [];
79
+ return this.eachBefore(function(a) {
80
+ a.children || t.push(a);
81
+ }), t;
82
+ }
83
+ function Ge() {
84
+ var t = this, a = [];
85
+ return t.each(function(l) {
86
+ l !== t && a.push({ source: l.parent, target: l });
87
+ }), a;
88
+ }
89
+ function* qe() {
90
+ var t = this, a, l = [t], n, r, i;
91
+ do
92
+ for (a = l.reverse(), l = []; t = a.pop(); )
93
+ if (yield t, n = t.children)
94
+ for (r = 0, i = n.length; r < i; ++r)
95
+ l.push(n[r]);
96
+ while (l.length);
97
+ }
98
+ function ne(t, a) {
99
+ t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ye)) : a === void 0 && (a = je);
100
+ for (var l = new Z(t), n, r = [l], i, h, d, g; n = r.pop(); )
101
+ if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
102
+ for (n.children = h, d = g - 1; d >= 0; --d)
103
+ r.push(i = h[d] = new Z(h[d])), i.parent = n, i.depth = n.depth + 1;
104
+ return l.eachBefore(Ze);
105
+ }
106
+ function Xe() {
107
+ return ne(this).eachBefore(Ue);
108
+ }
109
+ function je(t) {
110
+ return t.children;
111
+ }
112
+ function Ye(t) {
113
+ return Array.isArray(t) ? t[1] : null;
114
+ }
115
+ function Ue(t) {
116
+ t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
117
+ }
118
+ function Ze(t) {
119
+ var a = 0;
120
+ do
121
+ t.height = a;
122
+ while ((t = t.parent) && t.height < ++a);
123
+ }
124
+ function Z(t) {
125
+ this.data = t, this.depth = this.height = 0, this.parent = null;
126
+ }
127
+ Z.prototype = ne.prototype = {
128
+ constructor: Z,
129
+ count: ke,
130
+ each: ze,
131
+ eachAfter: De,
132
+ eachBefore: Ve,
133
+ find: Pe,
134
+ sum: Be,
135
+ sort: Ee,
136
+ path: Re,
137
+ ancestors: He,
138
+ descendants: Ie,
139
+ leaves: Oe,
140
+ links: Ge,
141
+ copy: Xe,
142
+ [Symbol.iterator]: qe
143
+ };
144
+ function Je(t) {
145
+ if (typeof t != "function") throw new Error();
146
+ return t;
147
+ }
148
+ function G() {
149
+ return 0;
150
+ }
151
+ function q(t) {
152
+ return function() {
153
+ return t;
154
+ };
155
+ }
156
+ function Ke(t) {
157
+ t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
158
+ }
159
+ function Qe(t, a, l, n, r) {
160
+ for (var i = t.children, h, d = -1, g = i.length, c = t.value && (n - a) / t.value; ++d < g; )
161
+ h = i[d], h.y0 = l, h.y1 = r, h.x0 = a, h.x1 = a += h.value * c;
162
+ }
163
+ function et(t, a, l, n, r) {
164
+ for (var i = t.children, h, d = -1, g = i.length, c = t.value && (r - l) / t.value; ++d < g; )
165
+ h = i[d], h.x0 = a, h.x1 = n, h.y0 = l, h.y1 = l += h.value * c;
166
+ }
167
+ var tt = (1 + Math.sqrt(5)) / 2;
168
+ function at(t, a, l, n, r, i) {
169
+ for (var h = [], d = a.children, g, c, u = 0, b = 0, s = d.length, x, S, v = a.value, p, y, M, A, V, W, _; u < s; ) {
170
+ x = r - l, S = i - n;
171
+ do
172
+ p = d[b++].value;
173
+ while (!p && b < s);
174
+ for (y = M = p, W = Math.max(S / x, x / S) / (v * t), _ = p * p * W, V = Math.max(M / _, _ / y); b < s; ++b) {
175
+ if (p += c = d[b].value, c < y && (y = c), c > M && (M = c), _ = p * p * W, A = Math.max(M / _, _ / y), A > V) {
176
+ p -= c;
177
+ break;
178
+ }
179
+ V = A;
180
+ }
181
+ h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Qe(g, l, n, r, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : r, i), v -= p, u = b;
182
+ }
183
+ return h;
184
+ }
185
+ const nt = function t(a) {
186
+ function l(n, r, i, h, d) {
187
+ at(a, n, r, i, h, d);
188
+ }
189
+ return l.ratio = function(n) {
190
+ return t((n = +n) > 1 ? n : 1);
191
+ }, l;
192
+ }(tt);
193
+ function lt() {
194
+ var t = nt, a = !1, l = 1, n = 1, r = [0], i = G, h = G, d = G, g = G, c = G;
195
+ function u(s) {
196
+ return s.x0 = s.y0 = 0, s.x1 = l, s.y1 = n, s.eachBefore(b), r = [0], a && s.eachBefore(Ke), s;
197
+ }
198
+ function b(s) {
199
+ var x = r[s.depth], S = s.x0 + x, v = s.y0 + x, p = s.x1 - x, y = s.y1 - x;
200
+ p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), s.x0 = S, s.y0 = v, s.x1 = p, s.y1 = y, s.children && (x = r[s.depth + 1] = i(s) / 2, S += c(s) - x, v += h(s) - x, p -= d(s) - x, y -= g(s) - x, p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), t(s, S, v, p, y));
201
+ }
202
+ return u.round = function(s) {
203
+ return arguments.length ? (a = !!s, u) : a;
204
+ }, u.size = function(s) {
205
+ return arguments.length ? (l = +s[0], n = +s[1], u) : [l, n];
206
+ }, u.tile = function(s) {
207
+ return arguments.length ? (t = Je(s), u) : t;
208
+ }, u.padding = function(s) {
209
+ return arguments.length ? u.paddingInner(s).paddingOuter(s) : u.paddingInner();
210
+ }, u.paddingInner = function(s) {
211
+ return arguments.length ? (i = typeof s == "function" ? s : q(+s), u) : i;
212
+ }, u.paddingOuter = function(s) {
213
+ return arguments.length ? u.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s) : u.paddingTop();
214
+ }, u.paddingTop = function(s) {
215
+ return arguments.length ? (h = typeof s == "function" ? s : q(+s), u) : h;
216
+ }, u.paddingRight = function(s) {
217
+ return arguments.length ? (d = typeof s == "function" ? s : q(+s), u) : d;
218
+ }, u.paddingBottom = function(s) {
219
+ return arguments.length ? (g = typeof s == "function" ? s : q(+s), u) : g;
220
+ }, u.paddingLeft = function(s) {
221
+ return arguments.length ? (c = typeof s == "function" ? s : q(+s), u) : c;
222
+ }, u;
223
+ }
224
+ var R, oe = (R = class {
225
+ constructor() {
226
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = xe, this.getAccTitle = be, this.setDiagramTitle = we, this.getDiagramTitle = Ce, this.getAccDescription = Te, this.setAccDescription = Le;
227
+ }
228
+ getNodes() {
229
+ return this.nodes;
230
+ }
231
+ getConfig() {
232
+ const a = $e, l = ae();
233
+ return ee({
234
+ ...a.treemap,
235
+ ...l.treemap ?? {}
236
+ });
237
+ }
238
+ addNode(a, l) {
239
+ this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ??= a);
240
+ }
241
+ getRoot() {
242
+ return { name: "", children: this.outerNodes };
243
+ }
244
+ addClass(a, l) {
245
+ const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, r = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
246
+ r && r.forEach((i) => {
247
+ Ae(i) && (n?.textStyles ? n.textStyles.push(i) : n.textStyles = [i]), n?.styles ? n.styles.push(i) : n.styles = [i];
248
+ }), this.classes.set(a, n);
249
+ }
250
+ getClasses() {
251
+ return this.classes;
252
+ }
253
+ getStylesForClass(a) {
254
+ return this.classes.get(a)?.styles ?? [];
255
+ }
256
+ clear() {
257
+ Fe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
258
+ }
259
+ }, w(R, "TreeMapDB"), R);
260
+ function ce(t) {
261
+ if (!t.length)
262
+ return [];
263
+ const a = [], l = [];
264
+ return t.forEach((n) => {
265
+ const r = {
266
+ name: n.name,
267
+ children: n.type === "Leaf" ? void 0 : []
268
+ };
269
+ for (r.classSelector = n?.classSelector, n?.cssCompiledStyles && (r.cssCompiledStyles = n.cssCompiledStyles), n.type === "Leaf" && n.value !== void 0 && (r.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
270
+ l.pop();
271
+ if (l.length === 0)
272
+ a.push(r);
273
+ else {
274
+ const i = l[l.length - 1].node;
275
+ i.children ? i.children.push(r) : i.children = [r];
276
+ }
277
+ n.type !== "Leaf" && l.push({ node: r, level: n.level });
278
+ }), a;
279
+ }
280
+ w(ce, "buildHierarchy");
281
+ var rt = /* @__PURE__ */ w((t, a) => {
282
+ ge(t, a);
283
+ const l = [];
284
+ for (const i of t.TreemapRows ?? [])
285
+ i.$type === "ClassDefStatement" && a.addClass(i.className ?? "", i.styleText ?? "");
286
+ for (const i of t.TreemapRows ?? []) {
287
+ const h = i.item;
288
+ if (!h)
289
+ continue;
290
+ const d = i.indent ? parseInt(i.indent) : 0, g = st(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], u = c.length > 0 ? c : void 0, b = {
291
+ level: d,
292
+ name: g,
293
+ type: h.$type,
294
+ value: h.value,
295
+ classSelector: h.classSelector,
296
+ cssCompiledStyles: u
297
+ };
298
+ l.push(b);
299
+ }
300
+ const n = ce(l), r = /* @__PURE__ */ w((i, h) => {
301
+ for (const d of i)
302
+ a.addNode(d, h), d.children && d.children.length > 0 && r(d.children, h + 1);
303
+ }, "addNodesRecursively");
304
+ r(n, 0);
305
+ }, "populate"), st = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), he = {
306
+ // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
307
+ parser: { yy: void 0 },
308
+ parse: /* @__PURE__ */ w(async (t) => {
309
+ try {
310
+ const l = await Me("treemap", t);
311
+ te.debug("Treemap AST:", l);
312
+ const n = he.parser?.yy;
313
+ if (!(n instanceof oe))
314
+ throw new Error(
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."
316
+ );
317
+ rt(l, n);
318
+ } catch (a) {
319
+ throw te.error("Error parsing treemap:", a), a;
320
+ }
321
+ }, "parse")
322
+ }, it = 10, E = 10, X = 25, ot = /* @__PURE__ */ w((t, a, l, n) => {
323
+ const r = n.db, i = r.getConfig(), h = i.padding ?? it, d = r.getDiagramTitle(), g = r.getRoot(), { themeVariables: c } = ae();
324
+ if (!g)
325
+ return;
326
+ const u = d ? 30 : 0, b = Se(a), s = i.nodeWidth ? i.nodeWidth * E : 960, x = i.nodeHeight ? i.nodeHeight * E : 500, S = s, v = x + u;
327
+ b.attr("viewBox", `0 0 ${S} ${v}`), ve(b, v, S, i.useMaxWidth);
328
+ let p;
329
+ try {
330
+ const e = i.valueFormat || ",";
331
+ if (e === "$0,0")
332
+ p = /* @__PURE__ */ w((o) => "$" + O(",")(o), "valueFormat");
333
+ else if (e.startsWith("$") && e.includes(",")) {
334
+ const o = /\.\d+/.exec(e), f = o ? o[0] : "";
335
+ p = /* @__PURE__ */ w((C) => "$" + O("," + f)(C), "valueFormat");
336
+ } else if (e.startsWith("$")) {
337
+ const o = e.substring(1);
338
+ p = /* @__PURE__ */ w((f) => "$" + O(o || "")(f), "valueFormat");
339
+ } else
340
+ p = O(e);
341
+ } catch (e) {
342
+ te.error("Error creating format function:", e), p = O(",");
343
+ }
344
+ const y = Q().range([
345
+ "transparent",
346
+ c.cScale0,
347
+ c.cScale1,
348
+ c.cScale2,
349
+ c.cScale3,
350
+ c.cScale4,
351
+ c.cScale5,
352
+ c.cScale6,
353
+ c.cScale7,
354
+ c.cScale8,
355
+ c.cScale9,
356
+ c.cScale10,
357
+ c.cScale11
358
+ ]), M = Q().range([
359
+ "transparent",
360
+ c.cScalePeer0,
361
+ c.cScalePeer1,
362
+ c.cScalePeer2,
363
+ c.cScalePeer3,
364
+ c.cScalePeer4,
365
+ c.cScalePeer5,
366
+ c.cScalePeer6,
367
+ c.cScalePeer7,
368
+ c.cScalePeer8,
369
+ c.cScalePeer9,
370
+ c.cScalePeer10,
371
+ c.cScalePeer11
372
+ ]), A = Q().range([
373
+ c.cScaleLabel0,
374
+ c.cScaleLabel1,
375
+ c.cScaleLabel2,
376
+ c.cScaleLabel3,
377
+ c.cScaleLabel4,
378
+ c.cScaleLabel5,
379
+ c.cScaleLabel6,
380
+ c.cScaleLabel7,
381
+ c.cScaleLabel8,
382
+ c.cScaleLabel9,
383
+ c.cScaleLabel10,
384
+ c.cScaleLabel11
385
+ ]);
386
+ d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
387
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([s, x]).paddingTop(
388
+ (e) => e.children && e.children.length > 0 ? X + E : 0
389
+ ).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? E : 0).paddingRight((e) => e.children && e.children.length > 0 ? E : 0).paddingBottom((e) => e.children && e.children.length > 0 ? E : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = V.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
390
+ H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => M(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
391
+ if (e.depth === 0)
392
+ return "display: none;";
393
+ const o = B({ cssCompiledStyles: e.data.cssCompiledStyles });
394
+ return o.nodeStyles + ";" + o.borderStyles.join(";");
395
+ }), H.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", X / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("clip-path", (e, o) => `url(#clip-section-${a}-${o})`).attr("style", (e) => {
396
+ if (e.depth === 0)
397
+ return "display: none;";
398
+ const o = "dominant-baseline: middle; font-size: 12px; fill:" + A(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
399
+ return o + f.labelStyles.replace("color:", "fill:");
400
+ }).each(function(e) {
401
+ if (e.depth === 0)
402
+ return;
403
+ const o = U(this), f = e.data.name;
404
+ o.text(f);
405
+ const C = e.x1 - e.x0, L = 6;
406
+ let T;
407
+ i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
408
+ const m = Math.max(15, T), k = o.node();
409
+ if (k.getComputedTextLength() > m) {
410
+ const $ = "...";
411
+ let z = f;
412
+ for (; z.length > 0; ) {
413
+ if (z = f.substring(0, z.length - 1), z.length === 0) {
414
+ o.text($), k.getComputedTextLength() > m && o.text("");
415
+ break;
416
+ }
417
+ if (o.text(z + $), k.getComputedTextLength() <= m)
418
+ break;
419
+ }
420
+ }
421
+ }), i.showValues !== !1 && H.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", X / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? p(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
422
+ if (e.depth === 0)
423
+ return "display: none;";
424
+ const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + A(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
425
+ return o + f.labelStyles.replace("color:", "fill:");
426
+ });
427
+ const re = le.leaves(), F = re.length > 20, ue = F ? 16 : 38, j = F ? 14 : 28, D = F ? 4 : 8, I = F ? 4 : 6, J = F ? 2 : 4, se = F ? 8 : 10, K = F ? 1 : 2, Y = V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
428
+ Y.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), Y.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), Y.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
429
+ const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + A(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
430
+ return o + f.labelStyles.replace("color:", "fill:");
431
+ }).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
432
+ const o = U(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * J, P = C - 2 * J;
433
+ if (T < se || P < se) {
434
+ o.style("display", "none");
435
+ return;
436
+ }
437
+ let m = parseInt(o.style("font-size"), 10);
438
+ const k = 0.6;
439
+ for (; L.getComputedTextLength() > T && m > D; )
440
+ m--, o.style("font-size", `${m}px`);
441
+ let N = Math.max(
442
+ I,
443
+ Math.min(j, Math.round(m * k))
444
+ ), $ = m + K + N;
445
+ for (; $ > P && m > D && (m--, N = Math.max(
446
+ I,
447
+ Math.min(j, Math.round(m * k))
448
+ ), !(N < I && m === D)); )
449
+ o.style("font-size", `${m}px`), $ = m + K + N;
450
+ o.style("font-size", `${m}px`), F ? (m < D || P < D) && o.style("display", "none") : (L.getComputedTextLength() > T || m < D || P < m) && o.style("display", "none");
451
+ }), i.showValues !== !1 && Y.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
452
+ return (o.y1 - o.y0) / 2;
453
+ }).attr("style", (o) => {
454
+ const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:` + A(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
455
+ return f + C.labelStyles.replace("color:", "fill:");
456
+ }).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
457
+ const f = U(this), C = this.parentNode;
458
+ if (!C) {
459
+ f.style("display", "none");
460
+ return;
461
+ }
462
+ const L = U(C).select(".treemapLabel");
463
+ if (L.empty() || L.style("display") === "none") {
464
+ f.style("display", "none");
465
+ return;
466
+ }
467
+ const T = parseFloat(L.style("font-size")), m = Math.max(
468
+ I,
469
+ Math.min(j, Math.round(T * 0.6))
470
+ );
471
+ f.style("font-size", `${m}px`);
472
+ const N = (o.y1 - o.y0) / 2 + T / 2 + K;
473
+ f.attr("y", N);
474
+ const $ = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = $ - 2 * J;
475
+ f.node().getComputedTextLength() > me || N + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
476
+ });
477
+ const pe = i.diagramPadding ?? 8;
478
+ Ne(b, pe, "flowchart", i?.useMaxWidth || !1);
479
+ }, "draw"), ct = /* @__PURE__ */ w(function(t, a) {
480
+ return a.db.getClasses();
481
+ }, "getClasses"), ht = { draw: ot, getClasses: ct }, dt = {
482
+ sectionStrokeColor: "black",
483
+ sectionStrokeWidth: "1",
484
+ sectionFillColor: "#efefef",
485
+ leafStrokeColor: "black",
486
+ leafStrokeWidth: "1",
487
+ leafFillColor: "#efefef",
488
+ labelFontSize: "12px",
489
+ valueFontSize: "10px",
490
+ titleFontSize: "14px"
491
+ }, ut = /* @__PURE__ */ w(({
492
+ treemap: t
493
+ } = {}) => {
494
+ const a = ye(), l = ae(), n = ee(a, l.themeVariables), r = ee(dt, t), i = r.titleColor ?? n.titleColor, h = r.labelColor ?? n.textColor, d = r.valueColor ?? n.textColor;
495
+ return `
496
+ .treemapNode.section {
497
+ stroke: ${r.sectionStrokeColor};
498
+ stroke-width: ${r.sectionStrokeWidth};
499
+ fill: ${r.sectionFillColor};
500
+ }
501
+ .treemapNode.leaf {
502
+ stroke: ${r.leafStrokeColor};
503
+ stroke-width: ${r.leafStrokeWidth};
504
+ fill: ${r.leafFillColor};
505
+ }
506
+ .treemapLabel {
507
+ fill: ${h};
508
+ font-size: ${r.labelFontSize};
509
+ }
510
+ .treemapValue {
511
+ fill: ${d};
512
+ font-size: ${r.valueFontSize};
513
+ }
514
+ .treemapTitle {
515
+ fill: ${i};
516
+ font-size: ${r.titleFontSize};
517
+ }
518
+ `;
519
+ }, "getStyles"), pt = ut, bt = {
520
+ parser: he,
521
+ get db() {
522
+ return new oe();
523
+ },
524
+ renderer: ht,
525
+ styles: pt
526
+ };
527
+ export {
528
+ bt as diagram
529
+ };
@@ -0,0 +1,142 @@
1
+ import { p as $ } from "./chunk-JWPE2WC7-C03UDQBx.js";
2
+ import { _ as b, A as m, D as C, d as S, l as w, b as D, a as T, n as P, o as z, g as A, s as E, y as F, B as W, p as _ } from "./mermaid.core-DBp8atac.js";
3
+ import { p as N } from "./cynefin-OW5HDTMX-CyO3b088.js";
4
+ var L = W.packet, u, v = (u = class {
5
+ constructor() {
6
+ this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = P, this.getDiagramTitle = z, this.getAccDescription = A, this.setAccDescription = E;
7
+ }
8
+ getConfig() {
9
+ const t = m({
10
+ ...L,
11
+ ...F().packet
12
+ });
13
+ return t.showBits && (t.paddingY += 10), t;
14
+ }
15
+ getPacket() {
16
+ return this.packet;
17
+ }
18
+ pushWord(t) {
19
+ t.length > 0 && this.packet.push(t);
20
+ }
21
+ clear() {
22
+ _(), this.packet = [];
23
+ }
24
+ }, b(u, "PacketDB"), u), M = 1e4, Y = /* @__PURE__ */ b((e, t) => {
25
+ $(e, t);
26
+ let r = -1, s = [], n = 1;
27
+ const { bitsPerRow: l } = t.getConfig();
28
+ for (let { start: a, end: i, bits: d, label: c } of e.blocks) {
29
+ if (a !== void 0 && i !== void 0 && i < a)
30
+ throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
31
+ if (a ??= r + 1, a !== r + 1)
32
+ throw new Error(
33
+ `Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${r + 1}.`
34
+ );
35
+ if (d === 0)
36
+ throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
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 < M; ) {
38
+ const [p, o] = I({ start: a, end: i, bits: d, label: c }, n, l);
39
+ if (s.push(p), p.end + 1 === n * l && (t.pushWord(s), s = [], n++), !o)
40
+ break;
41
+ ({ start: a, end: i, bits: d, label: c } = o);
42
+ }
43
+ }
44
+ t.pushWord(s);
45
+ }, "populate"), I = /* @__PURE__ */ b((e, t, r) => {
46
+ if (e.start === void 0)
47
+ throw new Error("start should have been set during first phase");
48
+ if (e.end === void 0)
49
+ throw new Error("end should have been set during first phase");
50
+ if (e.start > e.end)
51
+ throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);
52
+ if (e.end + 1 <= t * r)
53
+ return [e, void 0];
54
+ const s = t * r - 1, n = t * r;
55
+ return [
56
+ {
57
+ start: e.start,
58
+ end: s,
59
+ label: e.label,
60
+ bits: s - e.start
61
+ },
62
+ {
63
+ start: n,
64
+ end: e.end,
65
+ label: e.label,
66
+ bits: e.end - n
67
+ }
68
+ ];
69
+ }, "getNextFittingBlock"), x = {
70
+ // @ts-expect-error - PacketDB is not assignable to DiagramDB
71
+ parser: { yy: void 0 },
72
+ parse: /* @__PURE__ */ b(async (e) => {
73
+ const t = await N("packet", e), r = x.parser?.yy;
74
+ if (!(r instanceof v))
75
+ throw new Error(
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."
77
+ );
78
+ w.debug(t), Y(t, r);
79
+ }, "parse")
80
+ }, O = /* @__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 = C(t);
82
+ f.attr("viewBox", `0 0 ${k} ${g}`), S(f, g, k, l.useMaxWidth);
83
+ for (const [y, B] of p.entries())
84
+ j(f, B, y, l);
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");
86
+ }, "draw"), j = /* @__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;
88
+ for (const o of t) {
89
+ const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
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)
91
+ continue;
92
+ const k = o.end === o.start, f = p - 2;
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);
94
+ }
95
+ }, "drawWord"), G = { draw: O }, H = {
96
+ byteFontSize: "10px",
97
+ startByteColor: "black",
98
+ endByteColor: "black",
99
+ labelColor: "black",
100
+ labelFontSize: "12px",
101
+ titleColor: "black",
102
+ titleFontSize: "14px",
103
+ blockStrokeColor: "black",
104
+ blockStrokeWidth: "1",
105
+ blockFillColor: "#efefef"
106
+ }, K = /* @__PURE__ */ b(({ packet: e } = {}) => {
107
+ const t = m(H, e);
108
+ return `
109
+ .packetByte {
110
+ font-size: ${t.byteFontSize};
111
+ }
112
+ .packetByte.start {
113
+ fill: ${t.startByteColor};
114
+ }
115
+ .packetByte.end {
116
+ fill: ${t.endByteColor};
117
+ }
118
+ .packetLabel {
119
+ fill: ${t.labelColor};
120
+ font-size: ${t.labelFontSize};
121
+ }
122
+ .packetTitle {
123
+ fill: ${t.titleColor};
124
+ font-size: ${t.titleFontSize};
125
+ }
126
+ .packetBlock {
127
+ stroke: ${t.blockStrokeColor};
128
+ stroke-width: ${t.blockStrokeWidth};
129
+ fill: ${t.blockFillColor};
130
+ }
131
+ `;
132
+ }, "styles"), q = {
133
+ parser: x,
134
+ get db() {
135
+ return new v();
136
+ },
137
+ renderer: G,
138
+ styles: K
139
+ };
140
+ export {
141
+ q as diagram
142
+ };