@webskill/sdk 0.21.0 → 0.22.0

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 (132) hide show
  1. package/dist/abnfDiagram-O67JEVCF-DtYFjfqO.js +109 -0
  2. package/dist/agent.d.ts +3 -3
  3. package/dist/agent.js +1012 -130
  4. package/dist/{approval-DwN2o2QG.js → approval-DWQlDPbY.js} +102 -16
  5. package/dist/arc-8U_6NQWm.js +130 -0
  6. package/dist/architecture-7GRP2DOG-RTw1wpAq.js +4 -0
  7. package/dist/architectureDiagram-NJMV4G6O-XmmXrJAK.js +7473 -0
  8. package/dist/array-DQfpQNY8.js +8 -0
  9. package/dist/blockDiagram-BEXU5L5S-D4yjnCD1.js +2582 -0
  10. package/dist/browser.d.ts +444 -48
  11. package/dist/browser.js +1771 -91
  12. package/dist/c4Diagram-YGBWAQC7-BLmA_JSd.js +3668 -0
  13. package/dist/channel-CZxxLrG7.js +9 -0
  14. package/dist/chunk-2Q5K7J3B-Ck03gkFR.js +21 -0
  15. package/dist/chunk-3FUC2YCW-tr6jmbQf.js +530 -0
  16. package/dist/chunk-5DYCD2WN-Bt97YGTd.js +58 -0
  17. package/dist/chunk-5VM5RSS4-BBxa48HL.js +21 -0
  18. package/dist/chunk-6AEJRKK7-JXK89I-O.js +14 -0
  19. package/dist/chunk-742MDFTN-CPmgCGwC.js +466 -0
  20. package/dist/chunk-7INBJB4K-C9jq9o66.js +6552 -0
  21. package/dist/chunk-7M6MHVWA-BrKCWcR1.js +4894 -0
  22. package/dist/chunk-7PRAP22T-BHED6GVs.js +95 -0
  23. package/dist/chunk-DUW6YSOI-DoZj78PO.js +19 -0
  24. package/dist/chunk-FOHPRMQF-Dkbp819z.js +27189 -0
  25. package/dist/chunk-GNY47TPC-Bpvq1T49.js +87 -0
  26. package/dist/chunk-GTNCS2PH-CLmh4I2c.js +686 -0
  27. package/dist/chunk-GWA4HPMP-B6vN3fkL.js +95 -0
  28. package/dist/chunk-J5ZVWO5B-Bi_Pcobw.js +26 -0
  29. package/dist/chunk-JWPE2WC7-D1rC79GS.js +12 -0
  30. package/dist/chunk-LNGE3PJU-D5OIoe3Z.js +2582 -0
  31. package/dist/chunk-MBY4JIJT-C34L7a4f.js +2276 -0
  32. package/dist/chunk-NETBCI7D-Cg84k8N8.js +321 -0
  33. package/dist/chunk-O7XYJQB3-B6K0KOSL.js +8846 -0
  34. package/dist/chunk-UA2S7LBM-DxHM29_K.js +612 -0
  35. package/dist/chunk-WEXAMYUT-Ba6jFWhB.js +33 -0
  36. package/dist/chunk-XXDRQBXY-DPbSy4kg.js +12 -0
  37. package/dist/chunk-Y2CYZVJY-U3QOMqrW.js +15 -0
  38. package/dist/chunk-Z7XXMR3K-oLg1h8F3.js +1038 -0
  39. package/dist/chunk-ZIGJFQKS-DqEFBuHR.js +2215 -0
  40. package/dist/classDiagram-v2-NBCMYWYE-BqnOWIUt.js +3845 -0
  41. package/dist/cose-bilkent-JH36ORCC-C0dTAHVK.js +4270 -0
  42. package/dist/cynefin-OW5HDTMX-B2QvgEQj.js +4 -0
  43. package/dist/cynefinDiagram-VND7K2PF-yAWc6Z3W.js +479 -0
  44. package/dist/cytoscape.esm-C64mRh9B.js +28325 -0
  45. package/dist/dagre-6A5THRUB-D0w2W27v.js +4816 -0
  46. package/dist/defaultLocale-B_EoOkSF.js +249 -0
  47. package/dist/diagram-22UHCM2B-DvgzhUzP.js +6115 -0
  48. package/dist/diagram-3UASUU5V-DWgUB-ef.js +795 -0
  49. package/dist/diagram-ATOU4E4O-P1olqwIs.js +553 -0
  50. package/dist/diagram-CDSNMT55-BUlZuLUe.js +402 -0
  51. package/dist/diagram-MLGK6HIB-6w5qmkGt.js +186 -0
  52. package/dist/diagram-MPIPVDR6-DEFiSo8o.js +289 -0
  53. package/dist/dist-UajCDt3n.js +92 -0
  54. package/dist/ebnfDiagram-ZINNZB2B-CI8liCfR.js +123 -0
  55. package/dist/elk-276RUBZZ-3SvW6OAK.js +90034 -0
  56. package/dist/erDiagram-OPXOYQCR-CPTbKhwP.js +2301 -0
  57. package/dist/eventmodeling-NTZA5JFV-BlyuqGp0.js +4 -0
  58. package/dist/flowDiagram-KWPJA3E3-CcUJ6HbV.js +18 -0
  59. package/dist/ganttDiagram-FUAMR5RP-31UjY0KK.js +3939 -0
  60. package/dist/{toolSource-C9oNuKmr.js → geometry-wx5ZTYzi.js} +162 -12
  61. package/dist/gitGraph-4MIJSDKK-ChdVlrk7.js +4 -0
  62. package/dist/gitGraphDiagram-X574FWY7-DKuxJymB.js +1153 -0
  63. package/dist/governance.d.ts +3 -3
  64. package/dist/graphlib-tk9gQYuN.js +4194 -0
  65. package/dist/{index-B8Tgmpwh.d.ts → index-BiO9_XRk.d.ts} +2 -2
  66. package/dist/{index-CYLt5u4L.d.ts → index-CjwdZQOS.d.ts} +700 -12
  67. package/dist/{index-DHopiH_m.d.ts → index-YPd8ZSEa.d.ts} +156 -9
  68. package/dist/index.d.ts +4 -4
  69. package/dist/index.js +6 -6
  70. package/dist/info-A6RAGUB7-CxRAt9S9.js +4 -0
  71. package/dist/infoDiagram-VRGFBTTK-pRspGfjZ.js +25 -0
  72. package/dist/init-CMOIWdg-.js +16 -0
  73. package/dist/ishikawaDiagram-OU5B5YK6-DKerAPAg.js +975 -0
  74. package/dist/journeyDiagram-ZHPQQLJL-C4MK-YO5.js +1227 -0
  75. package/dist/kanban-definition-PNTS6WVX-BqsZpMXx.js +1244 -0
  76. package/dist/katex-BcRRvyh_.js +26465 -0
  77. package/dist/{kind-DaKqLX2F.js → kind-Dc8x0HWz.js} +54 -7
  78. package/dist/line-LgV8iVMV.js +48 -0
  79. package/dist/linear-BWKR0Tqd.js +393 -0
  80. package/dist/linkedDocument-CIuh_Yp0.js +416 -0
  81. package/dist/mcp.d.ts +2 -2
  82. package/dist/{memoryArtifactStore-D6dLeY55.js → memoryArtifactStore-Bs7glPqm.js} +14 -0
  83. package/dist/mermaid-parser.core-pYR5siSx.js +754 -0
  84. package/dist/mermaid.core-DMtwGCHy.js +1756 -0
  85. package/dist/mindmap-definition-NLK3R4M7-CXbD-myG.js +1312 -0
  86. package/dist/node.d.ts +3 -3
  87. package/dist/node.js +2 -2
  88. package/dist/{openUiLibrary-b0i7F_oZ.js → openUiLibrary-B7j3rLrm.js} +1 -1
  89. package/dist/{openUiSpecLang-CLXJEeRU.js → openUiSpecLang-BSYYnjay.js} +1 -1
  90. package/dist/ordinal-CxA6GHQS.js +84 -0
  91. package/dist/packet-AYTQ26CC-BOm08cxl.js +4 -0
  92. package/dist/path-C27Z2Bjv.js +106 -0
  93. package/dist/pegDiagram-GJSIUBJH-BLGJOewQ.js +115 -0
  94. package/dist/pie-WAS4IAKB-Dvg7glpk.js +4 -0
  95. package/dist/pieDiagram-5QR66LMP-laoaV_PB.js +298 -0
  96. package/dist/quadrantDiagram-O4NWA36T-Db_wFBkT.js +2236 -0
  97. package/dist/radar-RG4KPBEZ-BZDaTu06.js +4 -0
  98. package/dist/railroad-74A4TZTK-C-UhjkOy.js +4 -0
  99. package/dist/railroad-abnf-HS5TGJTU-dUKVA4OS.js +4 -0
  100. package/dist/railroad-ebnf-LZEXJU2U-DzQumk18.js +4 -0
  101. package/dist/railroad-peg-WCYAUIDC-B3vvTWed.js +4 -0
  102. package/dist/railroadDiagram-XR7U4H2S-BY0sTM4X.js +89 -0
  103. package/dist/requirementDiagram-PLB6GJNP-3rkQfEhs.js +2474 -0
  104. package/dist/rough.cjs-AmDd_NQk.js +1395 -0
  105. package/dist/sankeyDiagram-IPEJSGJF-CGAJhyG2.js +3578 -0
  106. package/dist/sequenceDiagram-PO4LG4MO-9FJjFX06.js +5522 -0
  107. package/dist/sizeCapture-INFHLROL-D8PWxdOn.js +56 -0
  108. package/dist/{skillVersionStore-B24Jjjry-BkOk9wI_.d.ts → skillVersionStore-B24Jjjry-BY1H7Krp.d.ts} +1 -1
  109. package/dist/src-NkhI3UMl.js +2653 -0
  110. package/dist/stateDiagram-v2-GCMORJYK-B0O3wc1-.js +2715 -0
  111. package/dist/swimlanes-2SLR337P-D4EOnrpu.js +6637 -0
  112. package/dist/swimlanesDiagram-TC7HE7FX-BUx29EJ9.js +30 -0
  113. package/dist/testing.d.ts +2 -1
  114. package/dist/testing.js +1 -1
  115. package/dist/timeline-definition-EJHVYXUP-CrgiiB4C.js +1513 -0
  116. package/dist/treeView-Q6P3EWNA-C1by-Gzc.js +4 -0
  117. package/dist/treemap-WGGIJYW6-mC2NZ6ad.js +4 -0
  118. package/dist/{types-BvTV_05--BW8zDuEk.d.ts → types-CpDRZ0rA-BM5FI9oN.d.ts} +59 -8
  119. package/dist/ui-react.d.ts +3 -3
  120. package/dist/ui-react.js +3718 -77
  121. package/dist/ui-vue.d.ts +1 -1
  122. package/dist/ui.d.ts +3 -3
  123. package/dist/ui.js +2 -2
  124. package/dist/usecaseDiagram-POWQR4AR-BUt_TQOY.js +14397 -0
  125. package/dist/vennDiagram-UO4OBE2U-CwXr0wjA.js +2808 -0
  126. package/dist/wardley-WFR3VGLG-CVSYjq_S.js +4 -0
  127. package/dist/wardleyDiagram-VNRHLVJA-Cpfd47dQ.js +874 -0
  128. package/dist/{webSkillApi-Cib6G-94.js → webSkillApi-Dy-Zjv0y.js} +1 -1
  129. package/dist/{webskillLitCatalog-W06npwej.js → webskillLitCatalog-D5BCiMCU.js} +1 -1
  130. package/dist/xychartDiagram-PMCCYNJV-e1TeVoc6.js +2704 -0
  131. package/package.json +1 -1
  132. package/dist/linkedDocument-C0gj1sMq.js +0 -245
@@ -0,0 +1,2215 @@
1
+ import { n as __name } from "./chunk-Y2CYZVJY-U3QOMqrW.js";
2
+ import { m as log, p as select_default } from "./src-NkhI3UMl.js";
3
+ import { R as sanitizeDirective, h as directiveRegex, p as detectType, r as assignWithDepth_default, s as common_default } from "./chunk-O7XYJQB3-B6K0KOSL.js";
4
+ import { s as epsilon, t as require_dist } from "./dist-UajCDt3n.js";
5
+
6
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js
7
+ function Linear(context) {
8
+ this._context = context;
9
+ }
10
+ Linear.prototype = {
11
+ areaStart: function() {
12
+ this._line = 0;
13
+ },
14
+ areaEnd: function() {
15
+ this._line = NaN;
16
+ },
17
+ lineStart: function() {
18
+ this._point = 0;
19
+ },
20
+ lineEnd: function() {
21
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
22
+ this._line = 1 - this._line;
23
+ },
24
+ point: function(x, y) {
25
+ x = +x, y = +y;
26
+ switch (this._point) {
27
+ case 0:
28
+ this._point = 1;
29
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
30
+ break;
31
+ case 1: this._point = 2;
32
+ default:
33
+ this._context.lineTo(x, y);
34
+ break;
35
+ }
36
+ }
37
+ };
38
+ function linear_default(context) {
39
+ return new Linear(context);
40
+ }
41
+
42
+ //#endregion
43
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bump.js
44
+ var Bump = class {
45
+ constructor(context, x) {
46
+ this._context = context;
47
+ this._x = x;
48
+ }
49
+ areaStart() {
50
+ this._line = 0;
51
+ }
52
+ areaEnd() {
53
+ this._line = NaN;
54
+ }
55
+ lineStart() {
56
+ this._point = 0;
57
+ }
58
+ lineEnd() {
59
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
60
+ this._line = 1 - this._line;
61
+ }
62
+ point(x, y) {
63
+ x = +x, y = +y;
64
+ switch (this._point) {
65
+ case 0:
66
+ this._point = 1;
67
+ if (this._line) this._context.lineTo(x, y);
68
+ else this._context.moveTo(x, y);
69
+ break;
70
+ case 1: this._point = 2;
71
+ default:
72
+ if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);
73
+ else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);
74
+ break;
75
+ }
76
+ this._x0 = x, this._y0 = y;
77
+ }
78
+ };
79
+ function bumpX(context) {
80
+ return new Bump(context, true);
81
+ }
82
+ function bumpY(context) {
83
+ return new Bump(context, false);
84
+ }
85
+
86
+ //#endregion
87
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/noop.js
88
+ function noop_default() {}
89
+
90
+ //#endregion
91
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basis.js
92
+ function point$3(that, x, y) {
93
+ that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);
94
+ }
95
+ function Basis(context) {
96
+ this._context = context;
97
+ }
98
+ Basis.prototype = {
99
+ areaStart: function() {
100
+ this._line = 0;
101
+ },
102
+ areaEnd: function() {
103
+ this._line = NaN;
104
+ },
105
+ lineStart: function() {
106
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN;
107
+ this._point = 0;
108
+ },
109
+ lineEnd: function() {
110
+ switch (this._point) {
111
+ case 3: point$3(this, this._x1, this._y1);
112
+ case 2:
113
+ this._context.lineTo(this._x1, this._y1);
114
+ break;
115
+ }
116
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
117
+ this._line = 1 - this._line;
118
+ },
119
+ point: function(x, y) {
120
+ x = +x, y = +y;
121
+ switch (this._point) {
122
+ case 0:
123
+ this._point = 1;
124
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
125
+ break;
126
+ case 1:
127
+ this._point = 2;
128
+ break;
129
+ case 2:
130
+ this._point = 3;
131
+ this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
132
+ default:
133
+ point$3(this, x, y);
134
+ break;
135
+ }
136
+ this._x0 = this._x1, this._x1 = x;
137
+ this._y0 = this._y1, this._y1 = y;
138
+ }
139
+ };
140
+ function basis_default(context) {
141
+ return new Basis(context);
142
+ }
143
+
144
+ //#endregion
145
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisClosed.js
146
+ function BasisClosed(context) {
147
+ this._context = context;
148
+ }
149
+ BasisClosed.prototype = {
150
+ areaStart: noop_default,
151
+ areaEnd: noop_default,
152
+ lineStart: function() {
153
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
154
+ this._point = 0;
155
+ },
156
+ lineEnd: function() {
157
+ switch (this._point) {
158
+ case 1:
159
+ this._context.moveTo(this._x2, this._y2);
160
+ this._context.closePath();
161
+ break;
162
+ case 2:
163
+ this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
164
+ this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
165
+ this._context.closePath();
166
+ break;
167
+ case 3:
168
+ this.point(this._x2, this._y2);
169
+ this.point(this._x3, this._y3);
170
+ this.point(this._x4, this._y4);
171
+ break;
172
+ }
173
+ },
174
+ point: function(x, y) {
175
+ x = +x, y = +y;
176
+ switch (this._point) {
177
+ case 0:
178
+ this._point = 1;
179
+ this._x2 = x, this._y2 = y;
180
+ break;
181
+ case 1:
182
+ this._point = 2;
183
+ this._x3 = x, this._y3 = y;
184
+ break;
185
+ case 2:
186
+ this._point = 3;
187
+ this._x4 = x, this._y4 = y;
188
+ this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);
189
+ break;
190
+ default:
191
+ point$3(this, x, y);
192
+ break;
193
+ }
194
+ this._x0 = this._x1, this._x1 = x;
195
+ this._y0 = this._y1, this._y1 = y;
196
+ }
197
+ };
198
+ function basisClosed_default(context) {
199
+ return new BasisClosed(context);
200
+ }
201
+
202
+ //#endregion
203
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisOpen.js
204
+ function BasisOpen(context) {
205
+ this._context = context;
206
+ }
207
+ BasisOpen.prototype = {
208
+ areaStart: function() {
209
+ this._line = 0;
210
+ },
211
+ areaEnd: function() {
212
+ this._line = NaN;
213
+ },
214
+ lineStart: function() {
215
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN;
216
+ this._point = 0;
217
+ },
218
+ lineEnd: function() {
219
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
220
+ this._line = 1 - this._line;
221
+ },
222
+ point: function(x, y) {
223
+ x = +x, y = +y;
224
+ switch (this._point) {
225
+ case 0:
226
+ this._point = 1;
227
+ break;
228
+ case 1:
229
+ this._point = 2;
230
+ break;
231
+ case 2:
232
+ this._point = 3;
233
+ var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6;
234
+ this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);
235
+ break;
236
+ case 3: this._point = 4;
237
+ default:
238
+ point$3(this, x, y);
239
+ break;
240
+ }
241
+ this._x0 = this._x1, this._x1 = x;
242
+ this._y0 = this._y1, this._y1 = y;
243
+ }
244
+ };
245
+ function basisOpen_default(context) {
246
+ return new BasisOpen(context);
247
+ }
248
+
249
+ //#endregion
250
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bundle.js
251
+ function Bundle(context, beta) {
252
+ this._basis = new Basis(context);
253
+ this._beta = beta;
254
+ }
255
+ Bundle.prototype = {
256
+ lineStart: function() {
257
+ this._x = [];
258
+ this._y = [];
259
+ this._basis.lineStart();
260
+ },
261
+ lineEnd: function() {
262
+ var x = this._x, y = this._y, j = x.length - 1;
263
+ if (j > 0) {
264
+ var x0 = x[0], y0 = y[0], dx = x[j] - x0, dy = y[j] - y0, i = -1, t;
265
+ while (++i <= j) {
266
+ t = i / j;
267
+ this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy));
268
+ }
269
+ }
270
+ this._x = this._y = null;
271
+ this._basis.lineEnd();
272
+ },
273
+ point: function(x, y) {
274
+ this._x.push(+x);
275
+ this._y.push(+y);
276
+ }
277
+ };
278
+ var bundle_default = (function custom(beta) {
279
+ function bundle(context) {
280
+ return beta === 1 ? new Basis(context) : new Bundle(context, beta);
281
+ }
282
+ bundle.beta = function(beta) {
283
+ return custom(+beta);
284
+ };
285
+ return bundle;
286
+ })(.85);
287
+
288
+ //#endregion
289
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinal.js
290
+ function point$2(that, x, y) {
291
+ that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);
292
+ }
293
+ function Cardinal(context, tension) {
294
+ this._context = context;
295
+ this._k = (1 - tension) / 6;
296
+ }
297
+ Cardinal.prototype = {
298
+ areaStart: function() {
299
+ this._line = 0;
300
+ },
301
+ areaEnd: function() {
302
+ this._line = NaN;
303
+ },
304
+ lineStart: function() {
305
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
306
+ this._point = 0;
307
+ },
308
+ lineEnd: function() {
309
+ switch (this._point) {
310
+ case 2:
311
+ this._context.lineTo(this._x2, this._y2);
312
+ break;
313
+ case 3:
314
+ point$2(this, this._x1, this._y1);
315
+ break;
316
+ }
317
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
318
+ this._line = 1 - this._line;
319
+ },
320
+ point: function(x, y) {
321
+ x = +x, y = +y;
322
+ switch (this._point) {
323
+ case 0:
324
+ this._point = 1;
325
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
326
+ break;
327
+ case 1:
328
+ this._point = 2;
329
+ this._x1 = x, this._y1 = y;
330
+ break;
331
+ case 2: this._point = 3;
332
+ default:
333
+ point$2(this, x, y);
334
+ break;
335
+ }
336
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
337
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
338
+ }
339
+ };
340
+ var cardinal_default = (function custom(tension) {
341
+ function cardinal(context) {
342
+ return new Cardinal(context, tension);
343
+ }
344
+ cardinal.tension = function(tension) {
345
+ return custom(+tension);
346
+ };
347
+ return cardinal;
348
+ })(0);
349
+
350
+ //#endregion
351
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalClosed.js
352
+ function CardinalClosed(context, tension) {
353
+ this._context = context;
354
+ this._k = (1 - tension) / 6;
355
+ }
356
+ CardinalClosed.prototype = {
357
+ areaStart: noop_default,
358
+ areaEnd: noop_default,
359
+ lineStart: function() {
360
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
361
+ this._point = 0;
362
+ },
363
+ lineEnd: function() {
364
+ switch (this._point) {
365
+ case 1:
366
+ this._context.moveTo(this._x3, this._y3);
367
+ this._context.closePath();
368
+ break;
369
+ case 2:
370
+ this._context.lineTo(this._x3, this._y3);
371
+ this._context.closePath();
372
+ break;
373
+ case 3:
374
+ this.point(this._x3, this._y3);
375
+ this.point(this._x4, this._y4);
376
+ this.point(this._x5, this._y5);
377
+ break;
378
+ }
379
+ },
380
+ point: function(x, y) {
381
+ x = +x, y = +y;
382
+ switch (this._point) {
383
+ case 0:
384
+ this._point = 1;
385
+ this._x3 = x, this._y3 = y;
386
+ break;
387
+ case 1:
388
+ this._point = 2;
389
+ this._context.moveTo(this._x4 = x, this._y4 = y);
390
+ break;
391
+ case 2:
392
+ this._point = 3;
393
+ this._x5 = x, this._y5 = y;
394
+ break;
395
+ default:
396
+ point$2(this, x, y);
397
+ break;
398
+ }
399
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
400
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
401
+ }
402
+ };
403
+ var cardinalClosed_default = (function custom(tension) {
404
+ function cardinal(context) {
405
+ return new CardinalClosed(context, tension);
406
+ }
407
+ cardinal.tension = function(tension) {
408
+ return custom(+tension);
409
+ };
410
+ return cardinal;
411
+ })(0);
412
+
413
+ //#endregion
414
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalOpen.js
415
+ function CardinalOpen(context, tension) {
416
+ this._context = context;
417
+ this._k = (1 - tension) / 6;
418
+ }
419
+ CardinalOpen.prototype = {
420
+ areaStart: function() {
421
+ this._line = 0;
422
+ },
423
+ areaEnd: function() {
424
+ this._line = NaN;
425
+ },
426
+ lineStart: function() {
427
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
428
+ this._point = 0;
429
+ },
430
+ lineEnd: function() {
431
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
432
+ this._line = 1 - this._line;
433
+ },
434
+ point: function(x, y) {
435
+ x = +x, y = +y;
436
+ switch (this._point) {
437
+ case 0:
438
+ this._point = 1;
439
+ break;
440
+ case 1:
441
+ this._point = 2;
442
+ break;
443
+ case 2:
444
+ this._point = 3;
445
+ this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
446
+ break;
447
+ case 3: this._point = 4;
448
+ default:
449
+ point$2(this, x, y);
450
+ break;
451
+ }
452
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
453
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
454
+ }
455
+ };
456
+ var cardinalOpen_default = (function custom(tension) {
457
+ function cardinal(context) {
458
+ return new CardinalOpen(context, tension);
459
+ }
460
+ cardinal.tension = function(tension) {
461
+ return custom(+tension);
462
+ };
463
+ return cardinal;
464
+ })(0);
465
+
466
+ //#endregion
467
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRom.js
468
+ function point$1(that, x, y) {
469
+ var x1 = that._x1, y1 = that._y1, x2 = that._x2, y2 = that._y2;
470
+ if (that._l01_a > 1e-12) {
471
+ var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a);
472
+ x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
473
+ y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
474
+ }
475
+ if (that._l23_a > 1e-12) {
476
+ var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a);
477
+ x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
478
+ y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
479
+ }
480
+ that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
481
+ }
482
+ function CatmullRom(context, alpha) {
483
+ this._context = context;
484
+ this._alpha = alpha;
485
+ }
486
+ CatmullRom.prototype = {
487
+ areaStart: function() {
488
+ this._line = 0;
489
+ },
490
+ areaEnd: function() {
491
+ this._line = NaN;
492
+ },
493
+ lineStart: function() {
494
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
495
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
496
+ },
497
+ lineEnd: function() {
498
+ switch (this._point) {
499
+ case 2:
500
+ this._context.lineTo(this._x2, this._y2);
501
+ break;
502
+ case 3:
503
+ this.point(this._x2, this._y2);
504
+ break;
505
+ }
506
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
507
+ this._line = 1 - this._line;
508
+ },
509
+ point: function(x, y) {
510
+ x = +x, y = +y;
511
+ if (this._point) {
512
+ var x23 = this._x2 - x, y23 = this._y2 - y;
513
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
514
+ }
515
+ switch (this._point) {
516
+ case 0:
517
+ this._point = 1;
518
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
519
+ break;
520
+ case 1:
521
+ this._point = 2;
522
+ break;
523
+ case 2: this._point = 3;
524
+ default:
525
+ point$1(this, x, y);
526
+ break;
527
+ }
528
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
529
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
530
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
531
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
532
+ }
533
+ };
534
+ var catmullRom_default = (function custom(alpha) {
535
+ function catmullRom(context) {
536
+ return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
537
+ }
538
+ catmullRom.alpha = function(alpha) {
539
+ return custom(+alpha);
540
+ };
541
+ return catmullRom;
542
+ })(.5);
543
+
544
+ //#endregion
545
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomClosed.js
546
+ function CatmullRomClosed(context, alpha) {
547
+ this._context = context;
548
+ this._alpha = alpha;
549
+ }
550
+ CatmullRomClosed.prototype = {
551
+ areaStart: noop_default,
552
+ areaEnd: noop_default,
553
+ lineStart: function() {
554
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
555
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
556
+ },
557
+ lineEnd: function() {
558
+ switch (this._point) {
559
+ case 1:
560
+ this._context.moveTo(this._x3, this._y3);
561
+ this._context.closePath();
562
+ break;
563
+ case 2:
564
+ this._context.lineTo(this._x3, this._y3);
565
+ this._context.closePath();
566
+ break;
567
+ case 3:
568
+ this.point(this._x3, this._y3);
569
+ this.point(this._x4, this._y4);
570
+ this.point(this._x5, this._y5);
571
+ break;
572
+ }
573
+ },
574
+ point: function(x, y) {
575
+ x = +x, y = +y;
576
+ if (this._point) {
577
+ var x23 = this._x2 - x, y23 = this._y2 - y;
578
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
579
+ }
580
+ switch (this._point) {
581
+ case 0:
582
+ this._point = 1;
583
+ this._x3 = x, this._y3 = y;
584
+ break;
585
+ case 1:
586
+ this._point = 2;
587
+ this._context.moveTo(this._x4 = x, this._y4 = y);
588
+ break;
589
+ case 2:
590
+ this._point = 3;
591
+ this._x5 = x, this._y5 = y;
592
+ break;
593
+ default:
594
+ point$1(this, x, y);
595
+ break;
596
+ }
597
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
598
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
599
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
600
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
601
+ }
602
+ };
603
+ var catmullRomClosed_default = (function custom(alpha) {
604
+ function catmullRom(context) {
605
+ return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
606
+ }
607
+ catmullRom.alpha = function(alpha) {
608
+ return custom(+alpha);
609
+ };
610
+ return catmullRom;
611
+ })(.5);
612
+
613
+ //#endregion
614
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomOpen.js
615
+ function CatmullRomOpen(context, alpha) {
616
+ this._context = context;
617
+ this._alpha = alpha;
618
+ }
619
+ CatmullRomOpen.prototype = {
620
+ areaStart: function() {
621
+ this._line = 0;
622
+ },
623
+ areaEnd: function() {
624
+ this._line = NaN;
625
+ },
626
+ lineStart: function() {
627
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
628
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
629
+ },
630
+ lineEnd: function() {
631
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
632
+ this._line = 1 - this._line;
633
+ },
634
+ point: function(x, y) {
635
+ x = +x, y = +y;
636
+ if (this._point) {
637
+ var x23 = this._x2 - x, y23 = this._y2 - y;
638
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
639
+ }
640
+ switch (this._point) {
641
+ case 0:
642
+ this._point = 1;
643
+ break;
644
+ case 1:
645
+ this._point = 2;
646
+ break;
647
+ case 2:
648
+ this._point = 3;
649
+ this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
650
+ break;
651
+ case 3: this._point = 4;
652
+ default:
653
+ point$1(this, x, y);
654
+ break;
655
+ }
656
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
657
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
658
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
659
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
660
+ }
661
+ };
662
+ var catmullRomOpen_default = (function custom(alpha) {
663
+ function catmullRom(context) {
664
+ return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
665
+ }
666
+ catmullRom.alpha = function(alpha) {
667
+ return custom(+alpha);
668
+ };
669
+ return catmullRom;
670
+ })(.5);
671
+
672
+ //#endregion
673
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linearClosed.js
674
+ function LinearClosed(context) {
675
+ this._context = context;
676
+ }
677
+ LinearClosed.prototype = {
678
+ areaStart: noop_default,
679
+ areaEnd: noop_default,
680
+ lineStart: function() {
681
+ this._point = 0;
682
+ },
683
+ lineEnd: function() {
684
+ if (this._point) this._context.closePath();
685
+ },
686
+ point: function(x, y) {
687
+ x = +x, y = +y;
688
+ if (this._point) this._context.lineTo(x, y);
689
+ else this._point = 1, this._context.moveTo(x, y);
690
+ }
691
+ };
692
+ function linearClosed_default(context) {
693
+ return new LinearClosed(context);
694
+ }
695
+
696
+ //#endregion
697
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js
698
+ function sign(x) {
699
+ return x < 0 ? -1 : 1;
700
+ }
701
+ function slope3(that, x2, y2) {
702
+ var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1);
703
+ return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), .5 * Math.abs(p)) || 0;
704
+ }
705
+ function slope2(that, t) {
706
+ var h = that._x1 - that._x0;
707
+ return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
708
+ }
709
+ function point(that, t0, t1) {
710
+ var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3;
711
+ that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
712
+ }
713
+ function MonotoneX(context) {
714
+ this._context = context;
715
+ }
716
+ MonotoneX.prototype = {
717
+ areaStart: function() {
718
+ this._line = 0;
719
+ },
720
+ areaEnd: function() {
721
+ this._line = NaN;
722
+ },
723
+ lineStart: function() {
724
+ this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
725
+ this._point = 0;
726
+ },
727
+ lineEnd: function() {
728
+ switch (this._point) {
729
+ case 2:
730
+ this._context.lineTo(this._x1, this._y1);
731
+ break;
732
+ case 3:
733
+ point(this, this._t0, slope2(this, this._t0));
734
+ break;
735
+ }
736
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
737
+ this._line = 1 - this._line;
738
+ },
739
+ point: function(x, y) {
740
+ var t1 = NaN;
741
+ x = +x, y = +y;
742
+ if (x === this._x1 && y === this._y1) return;
743
+ switch (this._point) {
744
+ case 0:
745
+ this._point = 1;
746
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
747
+ break;
748
+ case 1:
749
+ this._point = 2;
750
+ break;
751
+ case 2:
752
+ this._point = 3;
753
+ point(this, slope2(this, t1 = slope3(this, x, y)), t1);
754
+ break;
755
+ default:
756
+ point(this, this._t0, t1 = slope3(this, x, y));
757
+ break;
758
+ }
759
+ this._x0 = this._x1, this._x1 = x;
760
+ this._y0 = this._y1, this._y1 = y;
761
+ this._t0 = t1;
762
+ }
763
+ };
764
+ function MonotoneY(context) {
765
+ this._context = new ReflectContext(context);
766
+ }
767
+ (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
768
+ MonotoneX.prototype.point.call(this, y, x);
769
+ };
770
+ function ReflectContext(context) {
771
+ this._context = context;
772
+ }
773
+ ReflectContext.prototype = {
774
+ moveTo: function(x, y) {
775
+ this._context.moveTo(y, x);
776
+ },
777
+ closePath: function() {
778
+ this._context.closePath();
779
+ },
780
+ lineTo: function(x, y) {
781
+ this._context.lineTo(y, x);
782
+ },
783
+ bezierCurveTo: function(x1, y1, x2, y2, x, y) {
784
+ this._context.bezierCurveTo(y1, x1, y2, x2, y, x);
785
+ }
786
+ };
787
+ function monotoneX(context) {
788
+ return new MonotoneX(context);
789
+ }
790
+ function monotoneY(context) {
791
+ return new MonotoneY(context);
792
+ }
793
+
794
+ //#endregion
795
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/natural.js
796
+ function Natural(context) {
797
+ this._context = context;
798
+ }
799
+ Natural.prototype = {
800
+ areaStart: function() {
801
+ this._line = 0;
802
+ },
803
+ areaEnd: function() {
804
+ this._line = NaN;
805
+ },
806
+ lineStart: function() {
807
+ this._x = [];
808
+ this._y = [];
809
+ },
810
+ lineEnd: function() {
811
+ var x = this._x, y = this._y, n = x.length;
812
+ if (n) {
813
+ this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
814
+ if (n === 2) this._context.lineTo(x[1], y[1]);
815
+ else {
816
+ var px = controlPoints(x), py = controlPoints(y);
817
+ for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
818
+ }
819
+ }
820
+ if (this._line || this._line !== 0 && n === 1) this._context.closePath();
821
+ this._line = 1 - this._line;
822
+ this._x = this._y = null;
823
+ },
824
+ point: function(x, y) {
825
+ this._x.push(+x);
826
+ this._y.push(+y);
827
+ }
828
+ };
829
+ function controlPoints(x) {
830
+ var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n);
831
+ a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
832
+ for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
833
+ a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
834
+ for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
835
+ a[n - 1] = r[n - 1] / b[n - 1];
836
+ for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
837
+ b[n - 1] = (x[n] + a[n - 1]) / 2;
838
+ for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
839
+ return [a, b];
840
+ }
841
+ function natural_default(context) {
842
+ return new Natural(context);
843
+ }
844
+
845
+ //#endregion
846
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/step.js
847
+ function Step(context, t) {
848
+ this._context = context;
849
+ this._t = t;
850
+ }
851
+ Step.prototype = {
852
+ areaStart: function() {
853
+ this._line = 0;
854
+ },
855
+ areaEnd: function() {
856
+ this._line = NaN;
857
+ },
858
+ lineStart: function() {
859
+ this._x = this._y = NaN;
860
+ this._point = 0;
861
+ },
862
+ lineEnd: function() {
863
+ if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
864
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
865
+ if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
866
+ },
867
+ point: function(x, y) {
868
+ x = +x, y = +y;
869
+ switch (this._point) {
870
+ case 0:
871
+ this._point = 1;
872
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
873
+ break;
874
+ case 1: this._point = 2;
875
+ default:
876
+ if (this._t <= 0) {
877
+ this._context.lineTo(this._x, y);
878
+ this._context.lineTo(x, y);
879
+ } else {
880
+ var x1 = this._x * (1 - this._t) + x * this._t;
881
+ this._context.lineTo(x1, this._y);
882
+ this._context.lineTo(x1, y);
883
+ }
884
+ break;
885
+ }
886
+ this._x = x, this._y = y;
887
+ }
888
+ };
889
+ function step_default(context) {
890
+ return new Step(context, .5);
891
+ }
892
+ function stepBefore(context) {
893
+ return new Step(context, 0);
894
+ }
895
+ function stepAfter(context) {
896
+ return new Step(context, 1);
897
+ }
898
+
899
+ //#endregion
900
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
901
+ /**
902
+ * Checks if a given value is a plain object.
903
+ *
904
+ * A plain object is an object created by the `{}` literal, `new Object()`, or
905
+ * `Object.create(null)`.
906
+ *
907
+ * This function also handles objects with custom
908
+ * `Symbol.toStringTag` properties.
909
+ *
910
+ * `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the
911
+ * default string description of objects.
912
+ *
913
+ * @param [object] - The value to check.
914
+ * @returns True if the value is a plain object, otherwise false.
915
+ *
916
+ * @example
917
+ * console.log(isPlainObject({})); // true
918
+ * console.log(isPlainObject([])); // false
919
+ * console.log(isPlainObject(null)); // false
920
+ * console.log(isPlainObject(Object.create(null))); // true
921
+ * console.log(isPlainObject(new Map())); // false
922
+ */
923
+ function isPlainObject(object) {
924
+ if (typeof object !== "object") return false;
925
+ if (object == null) return false;
926
+ if (Object.getPrototypeOf(object) === null) return true;
927
+ if (Object.prototype.toString.call(object) !== "[object Object]") {
928
+ const tag = object[Symbol.toStringTag];
929
+ if (tag == null) return false;
930
+ if (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;
931
+ return object.toString() === `[object ${tag}]`;
932
+ }
933
+ let proto = object;
934
+ while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
935
+ return Object.getPrototypeOf(object) === proto;
936
+ }
937
+
938
+ //#endregion
939
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/function/noop.mjs
940
+ /**
941
+ * A no-operation function that does nothing.
942
+ * This can be used as a placeholder or default function.
943
+ *
944
+ * @example
945
+ * noop(); // Does nothing
946
+ *
947
+ * @returns This function does not return anything.
948
+ */
949
+ function noop() {}
950
+
951
+ //#endregion
952
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
953
+ function getSymbols(object) {
954
+ return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
955
+ }
956
+
957
+ //#endregion
958
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
959
+ /**
960
+ * Gets the `toStringTag` of `value`.
961
+ *
962
+ * @private
963
+ * @param {T} value The value to query.
964
+ * @returns {string} Returns the `Object.prototype.toString.call` result.
965
+ */
966
+ function getTag(value) {
967
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
968
+ return Object.prototype.toString.call(value);
969
+ }
970
+
971
+ //#endregion
972
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
973
+ const regexpTag = "[object RegExp]";
974
+ const stringTag = "[object String]";
975
+ const numberTag = "[object Number]";
976
+ const booleanTag = "[object Boolean]";
977
+ const argumentsTag = "[object Arguments]";
978
+ const symbolTag = "[object Symbol]";
979
+ const dateTag = "[object Date]";
980
+ const mapTag = "[object Map]";
981
+ const setTag = "[object Set]";
982
+ const arrayTag = "[object Array]";
983
+ const arrayBufferTag = "[object ArrayBuffer]";
984
+ const objectTag = "[object Object]";
985
+ const dataViewTag = "[object DataView]";
986
+ const uint8ArrayTag = "[object Uint8Array]";
987
+ const uint8ClampedArrayTag = "[object Uint8ClampedArray]";
988
+ const uint16ArrayTag = "[object Uint16Array]";
989
+ const uint32ArrayTag = "[object Uint32Array]";
990
+ const int8ArrayTag = "[object Int8Array]";
991
+ const int16ArrayTag = "[object Int16Array]";
992
+ const int32ArrayTag = "[object Int32Array]";
993
+ const float32ArrayTag = "[object Float32Array]";
994
+ const float64ArrayTag = "[object Float64Array]";
995
+
996
+ //#endregion
997
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/_internal/globalThis.mjs
998
+ const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
999
+ return this;
1000
+ })();
1001
+
1002
+ //#endregion
1003
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
1004
+ /**
1005
+ * Checks if the given value is a Buffer instance.
1006
+ *
1007
+ * This function tests whether the provided value is an instance of Buffer.
1008
+ * It returns `true` if the value is a Buffer, and `false` otherwise.
1009
+ *
1010
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.
1011
+ *
1012
+ * @param x - The value to check if it is a Buffer.
1013
+ * @returns Returns `true` if `x` is a Buffer, else `false`.
1014
+ *
1015
+ * @example
1016
+ * const buffer = Buffer.from("test");
1017
+ * console.log(isBuffer(buffer)); // true
1018
+ *
1019
+ * const notBuffer = "not a buffer";
1020
+ * console.log(isBuffer(notBuffer)); // false
1021
+ */
1022
+ function isBuffer(x) {
1023
+ return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x);
1024
+ }
1025
+
1026
+ //#endregion
1027
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
1028
+ /**
1029
+ * Checks if a given value is a valid length.
1030
+ *
1031
+ * A valid length is of type `number`, is a non-negative integer, and is less than or equal to
1032
+ * JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).
1033
+ * It returns `true` if the value is a valid length, and `false` otherwise.
1034
+ *
1035
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the
1036
+ * argument to a valid length (`number`).
1037
+ *
1038
+ * @param value The value to check.
1039
+ * @returns Returns `true` if `value` is a valid length, else `false`.
1040
+ *
1041
+ * @example
1042
+ * isLength(0); // true
1043
+ * isLength(42); // true
1044
+ * isLength(-1); // false
1045
+ * isLength(1.5); // false
1046
+ * isLength(Number.MAX_SAFE_INTEGER); // true
1047
+ * isLength(Number.MAX_SAFE_INTEGER + 1); // false
1048
+ */
1049
+ function isLength(value) {
1050
+ return Number.isSafeInteger(value) && value >= 0;
1051
+ }
1052
+
1053
+ //#endregion
1054
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
1055
+ /**
1056
+ * Checks if `value` is array-like.
1057
+ *
1058
+ * @param value The value to check.
1059
+ * @returns Returns `true` if `value` is array-like, else `false`.
1060
+ *
1061
+ * @example
1062
+ * isArrayLike([1, 2, 3]); // true
1063
+ * isArrayLike('abc'); // true
1064
+ * isArrayLike({ 0: 'a', length: 1 }); // true
1065
+ * isArrayLike({}); // false
1066
+ * isArrayLike(null); // false
1067
+ * isArrayLike(undefined); // false
1068
+ */
1069
+ function isArrayLike(value) {
1070
+ return value != null && typeof value !== "function" && isLength(value.length);
1071
+ }
1072
+
1073
+ //#endregion
1074
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
1075
+ /**
1076
+ * Checks if a property key is unsafe to modify directly.
1077
+ *
1078
+ * This function is used in functions like `merge` to prevent prototype pollution attacks
1079
+ * by identifying property keys that could modify the object's prototype chain or constructor.
1080
+ *
1081
+ * @param key - The property key to check
1082
+ * @returns `true` if the property is unsafe to modify directly, `false` otherwise
1083
+ * @internal
1084
+ */
1085
+ function isUnsafeProperty(key) {
1086
+ return key === "__proto__";
1087
+ }
1088
+
1089
+ //#endregion
1090
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
1091
+ /**
1092
+ * Checks whether a value is a JavaScript primitive.
1093
+ * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
1094
+ *
1095
+ * @param value The value to check.
1096
+ * @returns Returns true if `value` is a primitive, false otherwise.
1097
+ *
1098
+ * @example
1099
+ * isPrimitive(null); // true
1100
+ * isPrimitive(undefined); // true
1101
+ * isPrimitive('123'); // true
1102
+ * isPrimitive(false); // true
1103
+ * isPrimitive(true); // true
1104
+ * isPrimitive(Symbol('a')); // true
1105
+ * isPrimitive(123n); // true
1106
+ * isPrimitive({}); // false
1107
+ * isPrimitive(new Date()); // false
1108
+ * isPrimitive(new Map()); // false
1109
+ * isPrimitive(new Set()); // false
1110
+ * isPrimitive([1, 2, 3]); // false
1111
+ */
1112
+ function isPrimitive(value) {
1113
+ return value == null || typeof value !== "object" && typeof value !== "function";
1114
+ }
1115
+
1116
+ //#endregion
1117
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
1118
+ /**
1119
+ * Checks if a value is a TypedArray.
1120
+ * @param x The value to check.
1121
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
1122
+ *
1123
+ * @example
1124
+ * const arr = new Uint8Array([1, 2, 3]);
1125
+ * isTypedArray(arr); // true
1126
+ *
1127
+ * const regularArray = [1, 2, 3];
1128
+ * isTypedArray(regularArray); // false
1129
+ *
1130
+ * const buffer = new ArrayBuffer(16);
1131
+ * isTypedArray(buffer); // false
1132
+ */
1133
+ function isTypedArray$1(x) {
1134
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
1135
+ }
1136
+
1137
+ //#endregion
1138
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
1139
+ /**
1140
+ * Deeply clones the given object.
1141
+ *
1142
+ * You can customize the deep cloning process using the `cloneValue` function.
1143
+ * The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.
1144
+ * If the function returns a value, that value is used;
1145
+ * if it returns `undefined`, the default cloning method is used.
1146
+ *
1147
+ * @template T - The type of the object.
1148
+ * @param obj - The object to clone.
1149
+ * @param [cloneValue] - A function to customize the cloning process.
1150
+ * @returns A deep clone of the given object.
1151
+ *
1152
+ * @example
1153
+ * // Clone a primitive value
1154
+ * const num = 29;
1155
+ * const clonedNum = cloneDeepWith(num);
1156
+ * console.log(clonedNum); // 29
1157
+ * console.log(clonedNum === num); // true
1158
+ *
1159
+ * @example
1160
+ * // Clone an object with a customizer
1161
+ * const obj = { a: 1, b: 2 };
1162
+ * const clonedObj = cloneDeepWith(obj, (value) => {
1163
+ * if (typeof value === 'number') {
1164
+ * return value * 2; // Double the number
1165
+ * }
1166
+ * });
1167
+ * console.log(clonedObj); // { a: 2, b: 4 }
1168
+ * console.log(clonedObj === obj); // false
1169
+ *
1170
+ * @example
1171
+ * // Clone an array with a customizer
1172
+ * const arr = [1, 2, 3];
1173
+ * const clonedArr = cloneDeepWith(arr, (value) => {
1174
+ * return value + 1; // Increment each value
1175
+ * });
1176
+ * console.log(clonedArr); // [2, 3, 4]
1177
+ * console.log(clonedArr === arr); // false
1178
+ */
1179
+ function cloneDeepWith$1(obj, cloneValue) {
1180
+ return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
1181
+ }
1182
+ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
1183
+ const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
1184
+ if (cloned !== void 0) return cloned;
1185
+ if (isPrimitive(valueToClone)) return valueToClone;
1186
+ if (stack.has(valueToClone)) return stack.get(valueToClone);
1187
+ if (Array.isArray(valueToClone)) {
1188
+ const result = new Array(valueToClone.length);
1189
+ stack.set(valueToClone, result);
1190
+ for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
1191
+ if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
1192
+ if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
1193
+ return result;
1194
+ }
1195
+ if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
1196
+ if (valueToClone instanceof RegExp) {
1197
+ const result = new RegExp(valueToClone.source, valueToClone.flags);
1198
+ result.lastIndex = valueToClone.lastIndex;
1199
+ return result;
1200
+ }
1201
+ if (valueToClone instanceof Map) {
1202
+ const result = /* @__PURE__ */ new Map();
1203
+ stack.set(valueToClone, result);
1204
+ for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
1205
+ return result;
1206
+ }
1207
+ if (valueToClone instanceof Set) {
1208
+ const result = /* @__PURE__ */ new Set();
1209
+ stack.set(valueToClone, result);
1210
+ for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
1211
+ return result;
1212
+ }
1213
+ if (isBuffer(valueToClone)) return valueToClone.subarray();
1214
+ if (isTypedArray$1(valueToClone)) {
1215
+ const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
1216
+ stack.set(valueToClone, result);
1217
+ for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
1218
+ return result;
1219
+ }
1220
+ if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
1221
+ if (valueToClone instanceof DataView) {
1222
+ const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
1223
+ stack.set(valueToClone, result);
1224
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1225
+ return result;
1226
+ }
1227
+ if (typeof File !== "undefined" && valueToClone instanceof File) {
1228
+ const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
1229
+ stack.set(valueToClone, result);
1230
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1231
+ return result;
1232
+ }
1233
+ if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
1234
+ const result = new Blob([valueToClone], { type: valueToClone.type });
1235
+ stack.set(valueToClone, result);
1236
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1237
+ return result;
1238
+ }
1239
+ if (valueToClone instanceof Error) {
1240
+ const result = structuredClone(valueToClone);
1241
+ stack.set(valueToClone, result);
1242
+ result.message = valueToClone.message;
1243
+ result.name = valueToClone.name;
1244
+ result.stack = valueToClone.stack;
1245
+ result.cause = valueToClone.cause;
1246
+ result.constructor = valueToClone.constructor;
1247
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1248
+ return result;
1249
+ }
1250
+ if (valueToClone instanceof Boolean) {
1251
+ const result = new Boolean(valueToClone.valueOf());
1252
+ stack.set(valueToClone, result);
1253
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1254
+ return result;
1255
+ }
1256
+ if (valueToClone instanceof Number) {
1257
+ const result = new Number(valueToClone.valueOf());
1258
+ stack.set(valueToClone, result);
1259
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1260
+ return result;
1261
+ }
1262
+ if (valueToClone instanceof String) {
1263
+ const result = new String(valueToClone.valueOf());
1264
+ stack.set(valueToClone, result);
1265
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1266
+ return result;
1267
+ }
1268
+ if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
1269
+ const result = Object.create(Object.getPrototypeOf(valueToClone));
1270
+ stack.set(valueToClone, result);
1271
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1272
+ return result;
1273
+ }
1274
+ return valueToClone;
1275
+ }
1276
+ function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
1277
+ const keys = [...Object.keys(source), ...getSymbols(source)];
1278
+ for (let i = 0; i < keys.length; i++) {
1279
+ const key = keys[i];
1280
+ const descriptor = Object.getOwnPropertyDescriptor(target, key);
1281
+ if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
1282
+ }
1283
+ }
1284
+ function isCloneableObject(object) {
1285
+ switch (getTag(object)) {
1286
+ case argumentsTag:
1287
+ case arrayTag:
1288
+ case arrayBufferTag:
1289
+ case dataViewTag:
1290
+ case booleanTag:
1291
+ case dateTag:
1292
+ case float32ArrayTag:
1293
+ case float64ArrayTag:
1294
+ case int8ArrayTag:
1295
+ case int16ArrayTag:
1296
+ case int32ArrayTag:
1297
+ case mapTag:
1298
+ case numberTag:
1299
+ case objectTag:
1300
+ case regexpTag:
1301
+ case setTag:
1302
+ case stringTag:
1303
+ case symbolTag:
1304
+ case uint8ArrayTag:
1305
+ case uint8ClampedArrayTag:
1306
+ case uint16ArrayTag:
1307
+ case uint32ArrayTag: return true;
1308
+ default: return false;
1309
+ }
1310
+ }
1311
+
1312
+ //#endregion
1313
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
1314
+ /**
1315
+ * Creates a deep clone of the given object using a customizer function.
1316
+ *
1317
+ * @template T - The type of the object.
1318
+ * @param obj - The object to clone.
1319
+ * @param [cloneValue] - A function to customize the cloning process.
1320
+ * @returns A deep clone of the given object.
1321
+ *
1322
+ * @example
1323
+ * // Clone a primitive value
1324
+ * const num = 29;
1325
+ * const clonedNum = cloneDeepWith(num);
1326
+ * console.log(clonedNum); // 29
1327
+ * console.log(clonedNum === num); // true
1328
+ *
1329
+ * @example
1330
+ * // Clone an object with a customizer
1331
+ * const obj = { a: 1, b: 2 };
1332
+ * const clonedObj = cloneDeepWith(obj, (value) => {
1333
+ * if (typeof value === 'number') {
1334
+ * return value * 2; // Double the number
1335
+ * }
1336
+ * });
1337
+ * console.log(clonedObj); // { a: 2, b: 4 }
1338
+ * console.log(clonedObj === obj); // false
1339
+ *
1340
+ * @example
1341
+ * // Clone an array with a customizer
1342
+ * const arr = [1, 2, 3];
1343
+ * const clonedArr = cloneDeepWith(arr, (value) => {
1344
+ * return value + 1; // Increment each value
1345
+ * });
1346
+ * console.log(clonedArr); // [2, 3, 4]
1347
+ * console.log(clonedArr === arr); // false
1348
+ */
1349
+ function cloneDeepWith(obj, customizer) {
1350
+ return cloneDeepWith$1(obj, (value, key, object, stack) => {
1351
+ const cloned = customizer?.(value, key, object, stack);
1352
+ if (cloned !== void 0) return cloned;
1353
+ if (typeof obj !== "object") return;
1354
+ if (getTag(obj) === "[object Object]" && typeof obj.constructor !== "function") {
1355
+ const result = {};
1356
+ stack.set(obj, result);
1357
+ copyProperties(result, obj, object, stack);
1358
+ return result;
1359
+ }
1360
+ switch (Object.prototype.toString.call(obj)) {
1361
+ case numberTag:
1362
+ case stringTag:
1363
+ case booleanTag: {
1364
+ const result = new obj.constructor(obj?.valueOf());
1365
+ copyProperties(result, obj);
1366
+ return result;
1367
+ }
1368
+ case argumentsTag: {
1369
+ const result = {};
1370
+ copyProperties(result, obj);
1371
+ result.length = obj.length;
1372
+ result[Symbol.iterator] = obj[Symbol.iterator];
1373
+ return result;
1374
+ }
1375
+ default: return;
1376
+ }
1377
+ });
1378
+ }
1379
+
1380
+ //#endregion
1381
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
1382
+ /**
1383
+ * Creates a deep clone of the given object.
1384
+ *
1385
+ * @template T - The type of the object.
1386
+ * @param obj - The object to clone.
1387
+ * @returns A deep clone of the given object.
1388
+ *
1389
+ * @example
1390
+ * // Clone a primitive value
1391
+ * const num = 29;
1392
+ * const clonedNum = clone(num);
1393
+ * console.log(clonedNum); // 29
1394
+ * console.log(clonedNum === num); // true
1395
+ *
1396
+ * @example
1397
+ * // Clone an array
1398
+ * const arr = [1, 2, 3];
1399
+ * const clonedArr = clone(arr);
1400
+ * console.log(clonedArr); // [1, 2, 3]
1401
+ * console.log(clonedArr === arr); // false
1402
+ *
1403
+ * @example
1404
+ * // Clone an array with nested objects
1405
+ * const arr = [1, { a: 1 }, [1, 2, 3]];
1406
+ * const clonedArr = clone(arr);
1407
+ * arr[1].a = 2;
1408
+ * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]
1409
+ * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
1410
+ * console.log(clonedArr === arr); // false
1411
+ *
1412
+ * @example
1413
+ * // Clone an object
1414
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
1415
+ * const clonedObj = clone(obj);
1416
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
1417
+ * console.log(clonedObj === obj); // false
1418
+ *
1419
+ * @example
1420
+ * // Clone an object with nested objects
1421
+ * const obj = { a: 1, b: { c: 1 } };
1422
+ * const clonedObj = clone(obj);
1423
+ * obj.b.c = 2;
1424
+ * console.log(obj); // { a: 1, b: { c: 2 } }
1425
+ * console.log(clonedObj); // { a: 1, b: { c: 1 } }
1426
+ * console.log(clonedObj === obj); // false
1427
+ */
1428
+ function cloneDeep(obj) {
1429
+ return cloneDeepWith(obj);
1430
+ }
1431
+
1432
+ //#endregion
1433
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
1434
+ /**
1435
+ * Checks if the given value is an arguments object.
1436
+ *
1437
+ * This function tests whether the provided value is an arguments object or not.
1438
+ * It returns `true` if the value is an arguments object, and `false` otherwise.
1439
+ *
1440
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
1441
+ *
1442
+ * @param value - The value to test if it is an arguments object.
1443
+ * @returns `true` if the value is an arguments, `false` otherwise.
1444
+ *
1445
+ * @example
1446
+ * const args = (function() { return arguments; })();
1447
+ * const strictArgs = (function() { 'use strict'; return arguments; })();
1448
+ * const value = [1, 2, 3];
1449
+ *
1450
+ * console.log(isArguments(args)); // true
1451
+ * console.log(isArguments(strictArgs)); // true
1452
+ * console.log(isArguments(value)); // false
1453
+ */
1454
+ function isArguments(value) {
1455
+ return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
1456
+ }
1457
+
1458
+ //#endregion
1459
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
1460
+ /**
1461
+ * Checks if the given value is object-like.
1462
+ *
1463
+ * A value is object-like if its type is object and it is not null.
1464
+ *
1465
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object-like value.
1466
+ *
1467
+ * @param value - The value to test if it is an object-like.
1468
+ * @returns `true` if the value is an object-like, `false` otherwise.
1469
+ *
1470
+ * @example
1471
+ * const value1 = { a: 1 };
1472
+ * const value2 = [1, 2, 3];
1473
+ * const value3 = 'abc';
1474
+ * const value4 = () => {};
1475
+ * const value5 = null;
1476
+ *
1477
+ * console.log(isObjectLike(value1)); // true
1478
+ * console.log(isObjectLike(value2)); // true
1479
+ * console.log(isObjectLike(value3)); // false
1480
+ * console.log(isObjectLike(value4)); // false
1481
+ * console.log(isObjectLike(value5)); // false
1482
+ */
1483
+ function isObjectLike(value) {
1484
+ return typeof value === "object" && value !== null;
1485
+ }
1486
+
1487
+ //#endregion
1488
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
1489
+ /**
1490
+ * Checks if the given value is a non-primitive, array-like object.
1491
+ *
1492
+ * @param value The value to check.
1493
+ * @returns `true` if the value is a non-primitive, array-like object, `false` otherwise.
1494
+ *
1495
+ * @example
1496
+ * isArrayLikeObject([1, 2, 3]); // true
1497
+ * isArrayLikeObject({ 0: 'a', length: 1 }); // true
1498
+ * isArrayLikeObject('abc'); // false
1499
+ * isArrayLikeObject(()=>{}); // false
1500
+ */
1501
+ function isArrayLikeObject(value) {
1502
+ return isObjectLike(value) && isArrayLike(value);
1503
+ }
1504
+
1505
+ //#endregion
1506
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
1507
+ /**
1508
+ * Checks if a value is a TypedArray.
1509
+ * @param x The value to check.
1510
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
1511
+ *
1512
+ * @example
1513
+ * const arr = new Uint8Array([1, 2, 3]);
1514
+ * isTypedArray(arr); // true
1515
+ *
1516
+ * const regularArray = [1, 2, 3];
1517
+ * isTypedArray(regularArray); // false
1518
+ *
1519
+ * const buffer = new ArrayBuffer(16);
1520
+ * isTypedArray(buffer); // false
1521
+ */
1522
+ function isTypedArray(x) {
1523
+ return isTypedArray$1(x);
1524
+ }
1525
+
1526
+ //#endregion
1527
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/function/memoize.mjs
1528
+ /**
1529
+ * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for
1530
+ * storing the result based on the arguments provided to the memoized function. By default, the first argument
1531
+ * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with
1532
+ * the this binding of the memoized function.
1533
+ *
1534
+ * @template T - The type of the original function being memoized
1535
+ * @param func The function to have its output memoized.
1536
+ * @param [resolver] The function to resolve the cache key.
1537
+ * @return {MemoizedFunction<T>} Returns the new memoizing function.
1538
+ */
1539
+ function memoize(func, resolver) {
1540
+ if (typeof func !== "function" || resolver != null && typeof resolver !== "function") throw new TypeError("Expected a function");
1541
+ const memoized = function(...args) {
1542
+ const key = resolver ? resolver.apply(this, args) : args[0];
1543
+ const cache = memoized.cache;
1544
+ if (cache.has(key)) return cache.get(key);
1545
+ const result = func.apply(this, args);
1546
+ memoized.cache = cache.set(key, result) || cache;
1547
+ return result;
1548
+ };
1549
+ memoized.cache = new (memoize.Cache || Map)();
1550
+ return memoized;
1551
+ }
1552
+ memoize.Cache = Map;
1553
+
1554
+ //#endregion
1555
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/clone.mjs
1556
+ /**
1557
+ * Creates a shallow clone of the given object.
1558
+ *
1559
+ * @template T - The type of the object.
1560
+ * @param obj - The object to clone.
1561
+ * @returns A shallow clone of the given object.
1562
+ *
1563
+ * @example
1564
+ * // Clone a primitive value
1565
+ * const num = 29;
1566
+ * const clonedNum = clone(num);
1567
+ * console.log(clonedNum); // 29
1568
+ * console.log(clonedNum === num); // true
1569
+ *
1570
+ * @example
1571
+ * // Clone an array
1572
+ * const arr = [1, 2, 3];
1573
+ * const clonedArr = clone(arr);
1574
+ * console.log(clonedArr); // [1, 2, 3]
1575
+ * console.log(clonedArr === arr); // false
1576
+ *
1577
+ * @example
1578
+ * // Clone an object
1579
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
1580
+ * const clonedObj = clone(obj);
1581
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
1582
+ * console.log(clonedObj === obj); // false
1583
+ */
1584
+ function clone(obj) {
1585
+ if (isPrimitive(obj)) return obj;
1586
+ if (Array.isArray(obj) || isTypedArray$1(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
1587
+ const prototype = Object.getPrototypeOf(obj);
1588
+ if (prototype == null) return Object.assign(Object.create(prototype), obj);
1589
+ const Constructor = prototype.constructor;
1590
+ if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
1591
+ if (obj instanceof RegExp) {
1592
+ const newRegExp = new Constructor(obj);
1593
+ newRegExp.lastIndex = obj.lastIndex;
1594
+ return newRegExp;
1595
+ }
1596
+ if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
1597
+ if (obj instanceof Error) {
1598
+ let newError;
1599
+ if (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
1600
+ else newError = new Constructor(obj.message, { cause: obj.cause });
1601
+ newError.stack = obj.stack;
1602
+ Object.assign(newError, obj);
1603
+ return newError;
1604
+ }
1605
+ if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
1606
+ type: obj.type,
1607
+ lastModified: obj.lastModified
1608
+ });
1609
+ if (typeof obj === "object") return Object.assign(Object.create(prototype), obj);
1610
+ return obj;
1611
+ }
1612
+
1613
+ //#endregion
1614
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
1615
+ /**
1616
+ * Merges the properties of one or more source objects into the target object using a customizer function.
1617
+ *
1618
+ * This function performs a deep merge, recursively merging nested objects and arrays.
1619
+ * If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
1620
+ * If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.
1621
+ *
1622
+ * You can provide a custom `merge` function to control how properties are merged. The `merge` function is called for each property that is being merged and receives the following arguments:
1623
+ *
1624
+ * - `targetValue`: The current value of the property in the target object.
1625
+ * - `sourceValue`: The value of the property in the source object.
1626
+ * - `key`: The key of the property being merged.
1627
+ * - `target`: The target object.
1628
+ * - `source`: The source object.
1629
+ * - `stack`: A `Map` used to keep track of objects that have already been processed to handle circular references.
1630
+ *
1631
+ * The `merge` function should return the value to be set in the target object. If it returns `undefined`, a default deep merge will be applied for arrays and objects.
1632
+ *
1633
+ * The function can handle multiple source objects and will merge them all into the target object.
1634
+ *
1635
+ * @param object - The target object into which the source object properties will be merged. This object is modified in place.
1636
+ * @param otherArgs - Additional source objects to merge into the target object, including the custom `merge` function.
1637
+ * @returns The updated target object with properties from the source object(s) merged in.
1638
+ *
1639
+ * @example
1640
+ * const target = { a: 1, b: 2 };
1641
+ * const source = { b: 3, c: 4 };
1642
+ *
1643
+ * mergeWith(target, source, (targetValue, sourceValue) => {
1644
+ * if (typeof targetValue === 'number' && typeof sourceValue === 'number') {
1645
+ * return targetValue + sourceValue;
1646
+ * }
1647
+ * });
1648
+ * // Returns { a: 1, b: 5, c: 4 }
1649
+ * @example
1650
+ * const target = { a: [1], b: [2] };
1651
+ * const source = { a: [3], b: [4] };
1652
+ *
1653
+ * const result = mergeWith(target, source, (objValue, srcValue) => {
1654
+ * if (Array.isArray(objValue)) {
1655
+ * return objValue.concat(srcValue);
1656
+ * }
1657
+ * });
1658
+ *
1659
+ * expect(result).toEqual({ a: [1, 3], b: [2, 4] });
1660
+ */
1661
+ function mergeWith(object, ...otherArgs) {
1662
+ const sources = otherArgs.slice(0, -1);
1663
+ const merge = otherArgs[otherArgs.length - 1];
1664
+ let result = object;
1665
+ for (let i = 0; i < sources.length; i++) {
1666
+ const source = sources[i];
1667
+ result = mergeWithDeep(result, source, merge, /* @__PURE__ */ new Map());
1668
+ }
1669
+ return result;
1670
+ }
1671
+ function mergeWithDeep(target, source, merge, stack) {
1672
+ if (isPrimitive(target)) target = Object(target);
1673
+ if (source == null || typeof source !== "object") return target;
1674
+ if (stack.has(source)) return clone(stack.get(source));
1675
+ stack.set(source, target);
1676
+ if (Array.isArray(source)) {
1677
+ source = source.slice();
1678
+ for (let i = 0; i < source.length; i++) source[i] = source[i] ?? void 0;
1679
+ }
1680
+ const sourceKeys = [...Object.keys(source), ...getSymbols(source)];
1681
+ for (let i = 0; i < sourceKeys.length; i++) {
1682
+ const key = sourceKeys[i];
1683
+ if (isUnsafeProperty(key)) continue;
1684
+ let sourceValue = source[key];
1685
+ let targetValue = target[key];
1686
+ if (isArguments(sourceValue)) sourceValue = { ...sourceValue };
1687
+ if (isArguments(targetValue)) targetValue = { ...targetValue };
1688
+ if (isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);
1689
+ if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) {
1690
+ const cloned = [];
1691
+ const targetKeys = Reflect.ownKeys(targetValue);
1692
+ for (let i = 0; i < targetKeys.length; i++) {
1693
+ const targetKey = targetKeys[i];
1694
+ cloned[targetKey] = targetValue[targetKey];
1695
+ }
1696
+ targetValue = cloned;
1697
+ } else if (isArrayLikeObject(targetValue)) {
1698
+ const cloned = [];
1699
+ for (let i = 0; i < targetValue.length; i++) cloned[i] = targetValue[i];
1700
+ targetValue = cloned;
1701
+ } else targetValue = [];
1702
+ const merged = merge(targetValue, sourceValue, key, target, source, stack);
1703
+ if (merged !== void 0) target[key] = merged;
1704
+ else if (Array.isArray(sourceValue)) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);
1705
+ else if (isObjectLike(targetValue) && isObjectLike(sourceValue) && (isPlainObject(targetValue) || isPlainObject(sourceValue) || isTypedArray(targetValue) || isTypedArray(sourceValue))) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);
1706
+ else if (targetValue == null && isPlainObject(sourceValue)) target[key] = mergeWithDeep({}, sourceValue, merge, stack);
1707
+ else if (targetValue == null && isTypedArray(sourceValue)) target[key] = cloneDeep(sourceValue);
1708
+ else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
1709
+ }
1710
+ return target;
1711
+ }
1712
+
1713
+ //#endregion
1714
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/merge.mjs
1715
+ /**
1716
+ * Merges the properties of one or more source objects into the target object.
1717
+ *
1718
+ * This function performs a deep merge, recursively merging nested objects and arrays.
1719
+ * If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
1720
+ * If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.
1721
+ *
1722
+ * The function can handle multiple source objects and will merge them all into the target object.
1723
+ *
1724
+ * @param object - The target object into which the source object properties will be merged. This object is modified in place.
1725
+ * @param sources - The source objects whose properties will be merged into the target object.
1726
+ * @returns The updated target object with properties from the source object(s) merged in.
1727
+ *
1728
+ * @example
1729
+ * const target = { a: 1, b: { x: 1, y: 2 } };
1730
+ * const source = { b: { y: 3, z: 4 }, c: 5 };
1731
+ *
1732
+ * const result = merge(target, source);
1733
+ * console.log(result);
1734
+ * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }
1735
+ *
1736
+ * @example
1737
+ * const target = { a: [1, 2], b: { x: 1 } };
1738
+ * const source = { a: [3], b: { y: 2 } };
1739
+ *
1740
+ * const result = merge(target, source);
1741
+ * console.log(result);
1742
+ * // Output: { a: [3], b: { x: 1, y: 2 } }
1743
+ *
1744
+ * @example
1745
+ * const target = { a: null };
1746
+ * const source = { a: [1, 2, 3] };
1747
+ *
1748
+ * const result = merge(target, source);
1749
+ * console.log(result);
1750
+ * // Output: { a: [1, 2, 3] }
1751
+ */
1752
+ function merge(object, ...sources) {
1753
+ return mergeWith(object, ...sources, noop);
1754
+ }
1755
+
1756
+ //#endregion
1757
+ //#region ../../node_modules/.pnpm/mermaid@12.0.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZIGJFQKS.mjs
1758
+ var import_dist = require_dist();
1759
+ var ZERO_WIDTH_SPACE = "​";
1760
+ var d3CurveTypes = {
1761
+ curveBasis: basis_default,
1762
+ curveBasisClosed: basisClosed_default,
1763
+ curveBasisOpen: basisOpen_default,
1764
+ curveBumpX: bumpX,
1765
+ curveBumpY: bumpY,
1766
+ curveBundle: bundle_default,
1767
+ curveCardinalClosed: cardinalClosed_default,
1768
+ curveCardinalOpen: cardinalOpen_default,
1769
+ curveCardinal: cardinal_default,
1770
+ curveCatmullRomClosed: catmullRomClosed_default,
1771
+ curveCatmullRomOpen: catmullRomOpen_default,
1772
+ curveCatmullRom: catmullRom_default,
1773
+ curveLinear: linear_default,
1774
+ curveLinearClosed: linearClosed_default,
1775
+ curveMonotoneX: monotoneX,
1776
+ curveMonotoneY: monotoneY,
1777
+ curveNatural: natural_default,
1778
+ curveStep: step_default,
1779
+ curveStepAfter: stepAfter,
1780
+ curveStepBefore: stepBefore
1781
+ };
1782
+ var directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
1783
+ var detectInit = /* @__PURE__ */ __name(function(text, config) {
1784
+ const inits = detectDirective(text, /(?:init\b)|(?:initialize\b)/);
1785
+ let results = {};
1786
+ if (Array.isArray(inits)) {
1787
+ const args = inits.map((init) => init.args);
1788
+ sanitizeDirective(args);
1789
+ results = assignWithDepth_default(results, [...args]);
1790
+ } else results = inits.args;
1791
+ if (!results) return;
1792
+ let type = detectType(text, config);
1793
+ const prop = "config";
1794
+ if (results[prop] !== void 0) {
1795
+ if (type === "flowchart-v2") type = "flowchart";
1796
+ results[type] = results[prop];
1797
+ delete results[prop];
1798
+ }
1799
+ return results;
1800
+ }, "detectInit");
1801
+ var detectDirective = /* @__PURE__ */ __name(function(text, type = null) {
1802
+ try {
1803
+ const commentWithoutDirectives = new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
1804
+ `, "ig");
1805
+ text = text.trim().replace(commentWithoutDirectives, "").replace(/'/gm, "\"");
1806
+ log.debug(`Detecting diagram directive${type !== null ? " type:" + type : ""} based on the text:${text}`);
1807
+ let match;
1808
+ const result = [];
1809
+ while ((match = directiveRegex.exec(text)) !== null) {
1810
+ if (match.index === directiveRegex.lastIndex) directiveRegex.lastIndex++;
1811
+ if (match && !type || type && match[1]?.match(type) || type && match[2]?.match(type)) {
1812
+ const type2 = match[1] ? match[1] : match[2];
1813
+ const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;
1814
+ result.push({
1815
+ type: type2,
1816
+ args
1817
+ });
1818
+ }
1819
+ }
1820
+ if (result.length === 0) return {
1821
+ type: text,
1822
+ args: null
1823
+ };
1824
+ return result.length === 1 ? result[0] : result;
1825
+ } catch (error) {
1826
+ log.error(`ERROR: ${error.message} - Unable to parse directive type: '${type}' based on the text: '${text}'`);
1827
+ return {
1828
+ type: void 0,
1829
+ args: null
1830
+ };
1831
+ }
1832
+ }, "detectDirective");
1833
+ var removeDirectives = /* @__PURE__ */ __name(function(text) {
1834
+ return text.replace(directiveRegex, "");
1835
+ }, "removeDirectives");
1836
+ var isSubstringInArray = /* @__PURE__ */ __name(function(str, arr) {
1837
+ for (const [i, element] of arr.entries()) if (element.match(str)) return i;
1838
+ return -1;
1839
+ }, "isSubstringInArray");
1840
+ function interpolateToCurve(interpolate, defaultCurve) {
1841
+ if (!interpolate) return defaultCurve;
1842
+ return d3CurveTypes[`curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`] ?? defaultCurve;
1843
+ }
1844
+ __name(interpolateToCurve, "interpolateToCurve");
1845
+ function formatUrl(linkStr, config) {
1846
+ const url = linkStr.trim();
1847
+ if (!url) return;
1848
+ if (config.securityLevel !== "loose") return (0, import_dist.sanitizeUrl)(url);
1849
+ return url;
1850
+ }
1851
+ __name(formatUrl, "formatUrl");
1852
+ var runFunc = /* @__PURE__ */ __name((functionName, ...params) => {
1853
+ const arrPaths = functionName.split(".");
1854
+ const len = arrPaths.length - 1;
1855
+ const fnName = arrPaths[len];
1856
+ let obj = window;
1857
+ for (let i = 0; i < len; i++) {
1858
+ obj = obj[arrPaths[i]];
1859
+ if (!obj) {
1860
+ log.error(`Function name: ${functionName} not found in window`);
1861
+ return;
1862
+ }
1863
+ }
1864
+ obj[fnName](...params);
1865
+ }, "runFunc");
1866
+ function distance(p1, p2) {
1867
+ if (!p1 || !p2) return 0;
1868
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
1869
+ }
1870
+ __name(distance, "distance");
1871
+ function traverseEdge(points) {
1872
+ let prevPoint;
1873
+ let totalDistance = 0;
1874
+ points.forEach((point) => {
1875
+ totalDistance += distance(point, prevPoint);
1876
+ prevPoint = point;
1877
+ });
1878
+ return calculatePoint(points, totalDistance / 2);
1879
+ }
1880
+ __name(traverseEdge, "traverseEdge");
1881
+ function calcLabelPosition(points) {
1882
+ if (points.length === 1) return points[0];
1883
+ return traverseEdge(points);
1884
+ }
1885
+ __name(calcLabelPosition, "calcLabelPosition");
1886
+ var roundNumber = /* @__PURE__ */ __name((num, precision = 2) => {
1887
+ const factor = Math.pow(10, precision);
1888
+ return Math.round(num * factor) / factor;
1889
+ }, "roundNumber");
1890
+ var calculatePoint = /* @__PURE__ */ __name((points, distanceToTraverse) => {
1891
+ let prevPoint = void 0;
1892
+ let remainingDistance = distanceToTraverse;
1893
+ for (const point of points) {
1894
+ if (prevPoint) {
1895
+ const vectorDistance = distance(point, prevPoint);
1896
+ if (vectorDistance === 0) return prevPoint;
1897
+ if (vectorDistance < remainingDistance) remainingDistance -= vectorDistance;
1898
+ else {
1899
+ const distanceRatio = remainingDistance / vectorDistance;
1900
+ if (distanceRatio <= 0) return prevPoint;
1901
+ if (distanceRatio >= 1) return {
1902
+ x: point.x,
1903
+ y: point.y
1904
+ };
1905
+ if (distanceRatio > 0 && distanceRatio < 1) return {
1906
+ x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, 5),
1907
+ y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point.y, 5)
1908
+ };
1909
+ }
1910
+ }
1911
+ prevPoint = point;
1912
+ }
1913
+ throw new Error("Could not find a suitable point for the given distance");
1914
+ }, "calculatePoint");
1915
+ var calcCardinalityPosition = /* @__PURE__ */ __name((isRelationTypePresent, points, initialPosition) => {
1916
+ log.info(`our points ${JSON.stringify(points)}`);
1917
+ if (points[0] !== initialPosition) points = points.reverse();
1918
+ const center = calculatePoint(points, 25);
1919
+ const d = isRelationTypePresent ? 10 : 5;
1920
+ const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);
1921
+ const cardinalityPosition = {
1922
+ x: 0,
1923
+ y: 0
1924
+ };
1925
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;
1926
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;
1927
+ return cardinalityPosition;
1928
+ }, "calcCardinalityPosition");
1929
+ function calcTerminalLabelPosition(terminalMarkerSize, position, _points) {
1930
+ const points = structuredClone(_points);
1931
+ log.info("our points", points);
1932
+ if (position !== "start_left" && position !== "start_right") points.reverse();
1933
+ const center = calculatePoint(points, 25 + terminalMarkerSize);
1934
+ const d = 10 + terminalMarkerSize * .5;
1935
+ const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);
1936
+ const cardinalityPosition = {
1937
+ x: 0,
1938
+ y: 0
1939
+ };
1940
+ if (position === "start_left") {
1941
+ cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;
1942
+ cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;
1943
+ } else if (position === "end_right") {
1944
+ cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;
1945
+ cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;
1946
+ } else if (position === "end_left") {
1947
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;
1948
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;
1949
+ } else {
1950
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;
1951
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;
1952
+ }
1953
+ return cardinalityPosition;
1954
+ }
1955
+ __name(calcTerminalLabelPosition, "calcTerminalLabelPosition");
1956
+ function getStylesFromArray(arr) {
1957
+ let style = "";
1958
+ let labelStyle = "";
1959
+ for (const element of arr) if (element !== void 0) if (element.startsWith("color:") || element.startsWith("text-align:")) labelStyle = labelStyle + element + ";";
1960
+ else style = style + element + ";";
1961
+ return {
1962
+ style,
1963
+ labelStyle
1964
+ };
1965
+ }
1966
+ __name(getStylesFromArray, "getStylesFromArray");
1967
+ var cnt = 0;
1968
+ var generateId = /* @__PURE__ */ __name(() => {
1969
+ cnt++;
1970
+ return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt;
1971
+ }, "generateId");
1972
+ function makeRandomHex(length) {
1973
+ let result = "";
1974
+ const characters = "0123456789abcdef";
1975
+ const charactersLength = 16;
1976
+ for (let i = 0; i < length; i++) result += characters.charAt(Math.floor(Math.random() * charactersLength));
1977
+ return result;
1978
+ }
1979
+ __name(makeRandomHex, "makeRandomHex");
1980
+ var random = /* @__PURE__ */ __name((options) => {
1981
+ return makeRandomHex(options.length);
1982
+ }, "random");
1983
+ var getTextObj = /* @__PURE__ */ __name(function() {
1984
+ return {
1985
+ x: 0,
1986
+ y: 0,
1987
+ fill: void 0,
1988
+ anchor: "start",
1989
+ style: "#666",
1990
+ width: 100,
1991
+ height: 100,
1992
+ textMargin: 0,
1993
+ rx: 0,
1994
+ ry: 0,
1995
+ valign: void 0,
1996
+ text: ""
1997
+ };
1998
+ }, "getTextObj");
1999
+ var drawSimpleText = /* @__PURE__ */ __name(function(elem, textData) {
2000
+ const nText = textData.text.replace(common_default.lineBreakRegex, " ");
2001
+ const [, _fontSizePx] = parseFontSize(textData.fontSize);
2002
+ const textElem = elem.append("text");
2003
+ textElem.attr("x", textData.x);
2004
+ textElem.attr("y", textData.y);
2005
+ textElem.style("text-anchor", textData.anchor);
2006
+ textElem.style("font-family", textData.fontFamily);
2007
+ textElem.style("font-size", _fontSizePx);
2008
+ textElem.style("font-weight", textData.fontWeight);
2009
+ textElem.attr("fill", textData.fill);
2010
+ if (textData.class !== void 0) textElem.attr("class", textData.class);
2011
+ const span = textElem.append("tspan");
2012
+ span.attr("x", textData.x + textData.textMargin * 2);
2013
+ span.attr("fill", textData.fill);
2014
+ span.text(nText);
2015
+ return textElem;
2016
+ }, "drawSimpleText");
2017
+ var wrapLabel = memoize((label, maxWidth, config) => {
2018
+ if (!label) return label;
2019
+ config = Object.assign({
2020
+ fontSize: 12,
2021
+ fontWeight: 400,
2022
+ fontFamily: "Arial",
2023
+ joinWith: "<br/>"
2024
+ }, config);
2025
+ if (common_default.hasBreaks(label)) return label;
2026
+ const words = label.split(" ").filter(Boolean);
2027
+ const completedLines = [];
2028
+ let nextLine = "";
2029
+ words.forEach((word, index) => {
2030
+ const wordLength = calculateTextWidth(`${word} `, config);
2031
+ const nextLineLength = calculateTextWidth(nextLine, config);
2032
+ if (wordLength > maxWidth) {
2033
+ const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config);
2034
+ completedLines.push(nextLine, ...hyphenatedStrings);
2035
+ nextLine = remainingWord;
2036
+ } else if (nextLineLength + wordLength >= maxWidth) {
2037
+ completedLines.push(nextLine);
2038
+ nextLine = word;
2039
+ } else nextLine = [nextLine, word].filter(Boolean).join(" ");
2040
+ if (index + 1 === words.length) completedLines.push(nextLine);
2041
+ });
2042
+ return completedLines.filter((line) => line !== "").join(config.joinWith);
2043
+ }, (label, maxWidth, config) => `${label}${maxWidth}${config.fontSize}${config.fontWeight}${config.fontFamily}${config.joinWith}`);
2044
+ var breakString = memoize((word, maxWidth, hyphenCharacter = "-", config) => {
2045
+ config = Object.assign({
2046
+ fontSize: 12,
2047
+ fontWeight: 400,
2048
+ fontFamily: "Arial",
2049
+ margin: 0
2050
+ }, config);
2051
+ const characters = [...word];
2052
+ const lines = [];
2053
+ let currentLine = "";
2054
+ characters.forEach((character, index) => {
2055
+ const nextLine = `${currentLine}${character}`;
2056
+ if (calculateTextWidth(nextLine, config) >= maxWidth) {
2057
+ const currentCharacter = index + 1;
2058
+ const isLastLine = characters.length === currentCharacter;
2059
+ const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;
2060
+ lines.push(isLastLine ? nextLine : hyphenatedNextLine);
2061
+ currentLine = "";
2062
+ } else currentLine = nextLine;
2063
+ });
2064
+ return {
2065
+ hyphenatedStrings: lines,
2066
+ remainingWord: currentLine
2067
+ };
2068
+ }, (word, maxWidth, hyphenCharacter = "-", config) => `${word}${maxWidth}${hyphenCharacter}${config.fontSize}${config.fontWeight}${config.fontFamily}`);
2069
+ function calculateTextHeight(text, config) {
2070
+ return calculateTextDimensions(text, config).height;
2071
+ }
2072
+ __name(calculateTextHeight, "calculateTextHeight");
2073
+ function calculateTextWidth(text, config) {
2074
+ return calculateTextDimensions(text, config).width;
2075
+ }
2076
+ __name(calculateTextWidth, "calculateTextWidth");
2077
+ var calculateTextDimensions = memoize((text, config) => {
2078
+ const { fontSize = 12, fontFamily = "Arial", fontWeight = 400 } = config;
2079
+ if (!text) return {
2080
+ width: 0,
2081
+ height: 0
2082
+ };
2083
+ const [, _fontSizePx] = parseFontSize(fontSize);
2084
+ const fontFamilies = ["sans-serif", fontFamily];
2085
+ const lines = text.split(common_default.lineBreakRegex);
2086
+ const dims = [];
2087
+ const body = select_default("body");
2088
+ if (!body.remove) return {
2089
+ width: 0,
2090
+ height: 0,
2091
+ lineHeight: 0
2092
+ };
2093
+ const g = body.append("svg");
2094
+ for (const fontFamily2 of fontFamilies) {
2095
+ let cHeight = 0;
2096
+ const dim = {
2097
+ width: 0,
2098
+ height: 0,
2099
+ lineHeight: 0
2100
+ };
2101
+ for (const line of lines) {
2102
+ const textObj = getTextObj();
2103
+ textObj.text = line || "​";
2104
+ const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2);
2105
+ const bBox = (textElem._groups || textElem)[0][0].getBBox();
2106
+ if (bBox.width === 0 && bBox.height === 0) throw new Error("svg element not in render tree");
2107
+ dim.width = Math.round(Math.max(dim.width, bBox.width));
2108
+ cHeight = Math.round(bBox.height);
2109
+ dim.height += cHeight;
2110
+ dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight));
2111
+ }
2112
+ dims.push(dim);
2113
+ }
2114
+ g.remove();
2115
+ return dims[isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1];
2116
+ }, (text, config) => `${text}${config.fontSize}${config.fontWeight}${config.fontFamily}`);
2117
+ var InitIDGenerator = class {
2118
+ constructor(deterministic = false, seed) {
2119
+ this.count = 0;
2120
+ this.count = seed ? seed.length : 0;
2121
+ this.next = deterministic ? () => this.count++ : () => Date.now();
2122
+ }
2123
+ static {
2124
+ __name(this, "InitIDGenerator");
2125
+ }
2126
+ };
2127
+ var decoder;
2128
+ var entityDecode = /* @__PURE__ */ __name(function(html) {
2129
+ decoder = decoder || document.createElement("div");
2130
+ html = escape(html).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";");
2131
+ decoder.innerHTML = html;
2132
+ return unescape(decoder.textContent);
2133
+ }, "entityDecode");
2134
+ function isDetailedError(error) {
2135
+ return "str" in error;
2136
+ }
2137
+ __name(isDetailedError, "isDetailedError");
2138
+ var insertTitle = /* @__PURE__ */ __name((parent, cssClass, titleTopMargin, title) => {
2139
+ if (!title) return;
2140
+ const bounds = parent.node()?.getBBox();
2141
+ if (!bounds) return;
2142
+ parent.append("text").text(title).attr("text-anchor", "middle").attr("x", bounds.x + bounds.width / 2).attr("y", -titleTopMargin).attr("class", cssClass);
2143
+ }, "insertTitle");
2144
+ var parseFontSize = /* @__PURE__ */ __name((fontSize) => {
2145
+ if (typeof fontSize === "number") return [fontSize, fontSize + "px"];
2146
+ const fontSizeNumber = parseInt(fontSize ?? "", 10);
2147
+ if (Number.isNaN(fontSizeNumber)) return [void 0, void 0];
2148
+ else if (fontSize === String(fontSizeNumber)) return [fontSizeNumber, fontSize + "px"];
2149
+ else return [fontSizeNumber, fontSize];
2150
+ }, "parseFontSize");
2151
+ function cleanAndMerge(defaultData, data) {
2152
+ return merge({}, defaultData, data);
2153
+ }
2154
+ __name(cleanAndMerge, "cleanAndMerge");
2155
+ var utils_default = {
2156
+ assignWithDepth: assignWithDepth_default,
2157
+ wrapLabel,
2158
+ calculateTextHeight,
2159
+ calculateTextWidth,
2160
+ calculateTextDimensions,
2161
+ cleanAndMerge,
2162
+ detectInit,
2163
+ detectDirective,
2164
+ isSubstringInArray,
2165
+ interpolateToCurve,
2166
+ calcLabelPosition,
2167
+ calcCardinalityPosition,
2168
+ calcTerminalLabelPosition,
2169
+ formatUrl,
2170
+ getStylesFromArray,
2171
+ generateId,
2172
+ random,
2173
+ runFunc,
2174
+ entityDecode,
2175
+ insertTitle,
2176
+ isLabelCoordinateInPath,
2177
+ parseFontSize,
2178
+ InitIDGenerator
2179
+ };
2180
+ var encodeEntities = /* @__PURE__ */ __name(function(text) {
2181
+ let txt = text;
2182
+ txt = txt.replace(/style.*:\S*#.*;/g, function(s) {
2183
+ return s.substring(0, s.length - 1);
2184
+ });
2185
+ txt = txt.replace(/classDef.*:\S*#.*;/g, function(s) {
2186
+ return s.substring(0, s.length - 1);
2187
+ });
2188
+ txt = txt.replace(/#\w+;/g, function(s) {
2189
+ const innerTxt = s.substring(1, s.length - 1);
2190
+ if (/^\+?\d+$/.test(innerTxt)) return "fl°°" + innerTxt + "¶ß";
2191
+ else return "fl°" + innerTxt + "¶ß";
2192
+ });
2193
+ return txt;
2194
+ }, "encodeEntities");
2195
+ var decodeEntities = /* @__PURE__ */ __name(function(text) {
2196
+ return text.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";");
2197
+ }, "decodeEntities");
2198
+ var getEdgeId = /* @__PURE__ */ __name((from, to, { counter = 0, prefix, suffix }, id) => {
2199
+ if (id) return id;
2200
+ return `${prefix ? `${prefix}_` : ""}${from}_${to}_${counter}${suffix ? `_${suffix}` : ""}`;
2201
+ }, "getEdgeId");
2202
+ function handleUndefinedAttr(attrValue) {
2203
+ return attrValue ?? null;
2204
+ }
2205
+ __name(handleUndefinedAttr, "handleUndefinedAttr");
2206
+ function isLabelCoordinateInPath(point, dAttr) {
2207
+ const roundedX = Math.round(point.x);
2208
+ const roundedY = Math.round(point.y);
2209
+ const sanitizedD = dAttr.replace(/(\d+\.\d+)/g, (match) => Math.round(parseFloat(match)).toString());
2210
+ return sanitizedD.includes(roundedX.toString()) || sanitizedD.includes(roundedY.toString());
2211
+ }
2212
+ __name(isLabelCoordinateInPath, "isLabelCoordinateInPath");
2213
+
2214
+ //#endregion
2215
+ export { cardinal_default as $, float64ArrayTag as A, symbolTag as B, argumentsTag as C, dataViewTag as D, booleanTag as E, numberTag as F, getTag as G, uint32ArrayTag as H, objectTag as I, step_default as J, stepAfter as K, regexpTag as L, int32ArrayTag as M, int8ArrayTag as N, dateTag as O, mapTag as P, catmullRom_default as Q, setTag as R, isBuffer as S, arrayTag as T, uint8ArrayTag as U, uint16ArrayTag as V, uint8ClampedArrayTag as W, monotoneX as X, natural_default as Y, monotoneY as Z, wrapLabel as _, decodeEntities as a, isPrimitive as b, getEdgeId as c, interpolateToCurve as d, basis_default as et, isDetailedError as f, utils_default as g, removeDirectives as h, cleanAndMerge as i, int16ArrayTag as j, float32ArrayTag as k, getStylesFromArray as l, random as m, calculateTextHeight as n, bumpY as nt, encodeEntities as o, parseFontSize as p, stepBefore as q, calculateTextWidth as r, linear_default as rt, generateId as s, calculateTextDimensions as t, bumpX as tt, handleUndefinedAttr as u, isTypedArray as v, arrayBufferTag as w, isArrayLike as x, isArguments as y, stringTag as z };