@webskill/sdk 0.20.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 (139) hide show
  1. package/dist/abnfDiagram-O67JEVCF-DtYFjfqO.js +109 -0
  2. package/dist/agent.d.ts +3 -3
  3. package/dist/agent.js +1171 -73
  4. package/dist/{approval-Bbh_Apwg.js → approval-DWQlDPbY.js} +527 -29
  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 +1129 -48
  11. package/dist/browser.js +3562 -278
  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/{eventTypes-CwciaqCU.js → eventTypes-DcTQXSV1.js} +7 -1
  58. package/dist/eventmodeling-NTZA5JFV-BlyuqGp0.js +4 -0
  59. package/dist/flowDiagram-KWPJA3E3-CcUJ6HbV.js +18 -0
  60. package/dist/ganttDiagram-FUAMR5RP-31UjY0KK.js +3939 -0
  61. package/dist/geometry-wx5ZTYzi.js +715 -0
  62. package/dist/gitGraph-4MIJSDKK-ChdVlrk7.js +4 -0
  63. package/dist/gitGraphDiagram-X574FWY7-DKuxJymB.js +1153 -0
  64. package/dist/governance.d.ts +9 -3
  65. package/dist/governance.js +1 -1
  66. package/dist/graphlib-tk9gQYuN.js +4194 -0
  67. package/dist/{index-ad11wflI.d.ts → index-BiO9_XRk.d.ts} +2 -2
  68. package/dist/{index-DQ3-6GFu.d.ts → index-CjwdZQOS.d.ts} +945 -8
  69. package/dist/{index-BDyXe-a5.d.ts → index-YPd8ZSEa.d.ts} +413 -7
  70. package/dist/index.d.ts +4 -4
  71. package/dist/index.js +47 -41
  72. package/dist/info-A6RAGUB7-CxRAt9S9.js +4 -0
  73. package/dist/infoDiagram-VRGFBTTK-pRspGfjZ.js +25 -0
  74. package/dist/init-CMOIWdg-.js +16 -0
  75. package/dist/ishikawaDiagram-OU5B5YK6-DKerAPAg.js +975 -0
  76. package/dist/journeyDiagram-ZHPQQLJL-C4MK-YO5.js +1227 -0
  77. package/dist/kanban-definition-PNTS6WVX-BqsZpMXx.js +1244 -0
  78. package/dist/katex-BcRRvyh_.js +26465 -0
  79. package/dist/kind-Dc8x0HWz.js +110 -0
  80. package/dist/line-LgV8iVMV.js +48 -0
  81. package/dist/linear-BWKR0Tqd.js +393 -0
  82. package/dist/linkedDocument-CIuh_Yp0.js +416 -0
  83. package/dist/mcp.d.ts +2 -2
  84. package/dist/{memoryArtifactStore-D6dLeY55.js → memoryArtifactStore-Bs7glPqm.js} +14 -0
  85. package/dist/mermaid-parser.core-pYR5siSx.js +754 -0
  86. package/dist/mermaid.core-DMtwGCHy.js +1756 -0
  87. package/dist/mindmap-definition-NLK3R4M7-CXbD-myG.js +1312 -0
  88. package/dist/node.d.ts +8 -3
  89. package/dist/node.js +79 -4
  90. package/dist/{openUiLibrary-b0i7F_oZ.js → openUiLibrary-B7j3rLrm.js} +1 -1
  91. package/dist/{openUiSpecLang-CLXJEeRU.js → openUiSpecLang-BSYYnjay.js} +1 -1
  92. package/dist/ordinal-CxA6GHQS.js +84 -0
  93. package/dist/packet-AYTQ26CC-BOm08cxl.js +4 -0
  94. package/dist/path-C27Z2Bjv.js +106 -0
  95. package/dist/pegDiagram-GJSIUBJH-BLGJOewQ.js +115 -0
  96. package/dist/pie-WAS4IAKB-Dvg7glpk.js +4 -0
  97. package/dist/pieDiagram-5QR66LMP-laoaV_PB.js +298 -0
  98. package/dist/processSandboxEntry.js +5 -0
  99. package/dist/quadrantDiagram-O4NWA36T-Db_wFBkT.js +2236 -0
  100. package/dist/radar-RG4KPBEZ-BZDaTu06.js +4 -0
  101. package/dist/railroad-74A4TZTK-C-UhjkOy.js +4 -0
  102. package/dist/railroad-abnf-HS5TGJTU-dUKVA4OS.js +4 -0
  103. package/dist/railroad-ebnf-LZEXJU2U-DzQumk18.js +4 -0
  104. package/dist/railroad-peg-WCYAUIDC-B3vvTWed.js +4 -0
  105. package/dist/railroadDiagram-XR7U4H2S-BY0sTM4X.js +89 -0
  106. package/dist/requirementDiagram-PLB6GJNP-3rkQfEhs.js +2474 -0
  107. package/dist/rough.cjs-AmDd_NQk.js +1395 -0
  108. package/dist/sandboxWorkerEntry.js +5 -0
  109. package/dist/sankeyDiagram-IPEJSGJF-CGAJhyG2.js +3578 -0
  110. package/dist/sequenceDiagram-PO4LG4MO-9FJjFX06.js +5522 -0
  111. package/dist/sizeCapture-INFHLROL-D8PWxdOn.js +56 -0
  112. package/dist/{skillVersionStore-B24Jjjry-v2CCU0Xo.d.ts → skillVersionStore-B24Jjjry-BY1H7Krp.d.ts} +1 -1
  113. package/dist/src-NkhI3UMl.js +2653 -0
  114. package/dist/stateDiagram-v2-GCMORJYK-B0O3wc1-.js +2715 -0
  115. package/dist/swimlanes-2SLR337P-D4EOnrpu.js +6637 -0
  116. package/dist/swimlanesDiagram-TC7HE7FX-BUx29EJ9.js +30 -0
  117. package/dist/testing.d.ts +2 -1
  118. package/dist/testing.js +1 -1
  119. package/dist/timeline-definition-EJHVYXUP-CrgiiB4C.js +1513 -0
  120. package/dist/treeView-Q6P3EWNA-C1by-Gzc.js +4 -0
  121. package/dist/treemap-WGGIJYW6-mC2NZ6ad.js +4 -0
  122. package/dist/{types-Btpdd1y--BcxQ10Fa.d.ts → types-CpDRZ0rA-BM5FI9oN.d.ts} +111 -9
  123. package/dist/ui-react.d.ts +3 -3
  124. package/dist/ui-react.js +3718 -77
  125. package/dist/ui-vue.d.ts +1 -1
  126. package/dist/ui.d.ts +3 -3
  127. package/dist/ui.js +2 -2
  128. package/dist/untrustedText-BIaRvPZK.js +16 -0
  129. package/dist/usecaseDiagram-POWQR4AR-BUt_TQOY.js +14397 -0
  130. package/dist/vennDiagram-UO4OBE2U-CwXr0wjA.js +2808 -0
  131. package/dist/wardley-WFR3VGLG-CVSYjq_S.js +4 -0
  132. package/dist/wardleyDiagram-VNRHLVJA-Cpfd47dQ.js +874 -0
  133. package/dist/{webSkillApi-CsvA69qk.js → webSkillApi-Dy-Zjv0y.js} +1 -1
  134. package/dist/{webskillLitCatalog-W06npwej.js → webskillLitCatalog-D5BCiMCU.js} +1 -1
  135. package/dist/xychartDiagram-PMCCYNJV-e1TeVoc6.js +2704 -0
  136. package/package.json +6 -5
  137. package/dist/kind-DxgS8LM-.js +0 -77
  138. package/dist/linkedDocument-xNXF-z8n.js +0 -94
  139. package/dist/types-DOJI5YC3.js +0 -90
@@ -0,0 +1,1395 @@
1
+ import { t as __commonJSMin } from "./rolldown-runtime-BHkdefai.js";
2
+
3
+ //#region ../../node_modules/.pnpm/roughjs@4.6.6/node_modules/roughjs/bundled/rough.cjs.js
4
+ var require_rough_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
+ var t = function(e, n) {
6
+ return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, e) {
7
+ t.__proto__ = e;
8
+ } || function(t, e) {
9
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
10
+ }, t(e, n);
11
+ };
12
+ function e(e, n) {
13
+ if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
14
+ function r() {
15
+ this.constructor = e;
16
+ }
17
+ t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r());
18
+ }
19
+ var n = function() {
20
+ return n = Object.assign || function(t) {
21
+ for (var e, n = 1, r = arguments.length; n < r; n++) for (var a in e = arguments[n]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]);
22
+ return t;
23
+ }, n.apply(this, arguments);
24
+ };
25
+ function r(t, e, n) {
26
+ if (n || 2 === arguments.length) for (var r, a = 0, s = e.length; a < s; a++) !r && a in e || (r || (r = Array.prototype.slice.call(e, 0, a)), r[a] = e[a]);
27
+ return t.concat(r || Array.prototype.slice.call(e));
28
+ }
29
+ function a(t, e, n) {
30
+ if (t && t.length) {
31
+ const [r, a] = e, s = Math.PI / 180 * n, o = Math.cos(s), i = Math.sin(s);
32
+ for (const e of t) {
33
+ const [t, n] = e;
34
+ e[0] = (t - r) * o - (n - a) * i + r, e[1] = (t - r) * i + (n - a) * o + a;
35
+ }
36
+ }
37
+ }
38
+ function s(t, e) {
39
+ return t[0] === e[0] && t[1] === e[1];
40
+ }
41
+ function o(t, e, n, r = 1) {
42
+ const o = n, i = Math.max(e, .1), h = t[0] && t[0][0] && "number" == typeof t[0][0] ? [t] : t, u = [0, 0];
43
+ if (o) for (const t of h) a(t, u, o);
44
+ const p = function(t, e, n) {
45
+ const r = [];
46
+ for (const e of t) {
47
+ const t = [...e];
48
+ s(t[0], t[t.length - 1]) || t.push([t[0][0], t[0][1]]), t.length > 2 && r.push(t);
49
+ }
50
+ const a = [];
51
+ e = Math.max(e, .1);
52
+ const o = [];
53
+ for (const t of r) for (let e = 0; e < t.length - 1; e++) {
54
+ const n = t[e], r = t[e + 1];
55
+ if (n[1] !== r[1]) {
56
+ const t = Math.min(n[1], r[1]);
57
+ o.push({
58
+ ymin: t,
59
+ ymax: Math.max(n[1], r[1]),
60
+ x: t === n[1] ? n[0] : r[0],
61
+ islope: (r[0] - n[0]) / (r[1] - n[1])
62
+ });
63
+ }
64
+ }
65
+ if (o.sort(((t, e) => t.ymin < e.ymin ? -1 : t.ymin > e.ymin ? 1 : t.x < e.x ? -1 : t.x > e.x ? 1 : t.ymax === e.ymax ? 0 : (t.ymax - e.ymax) / Math.abs(t.ymax - e.ymax))), !o.length) return a;
66
+ let i = [], h = o[0].ymin, u = 0;
67
+ for (; i.length || o.length;) {
68
+ if (o.length) {
69
+ let t = -1;
70
+ for (let e = 0; e < o.length && !(o[e].ymin > h); e++) t = e;
71
+ o.splice(0, t + 1).forEach(((t) => {
72
+ i.push({
73
+ s: h,
74
+ edge: t
75
+ });
76
+ }));
77
+ }
78
+ if (i = i.filter(((t) => !(t.edge.ymax <= h))), i.sort(((t, e) => t.edge.x === e.edge.x ? 0 : (t.edge.x - e.edge.x) / Math.abs(t.edge.x - e.edge.x))), (1 !== n || u % e == 0) && i.length > 1) for (let t = 0; t < i.length; t += 2) {
79
+ const e = t + 1;
80
+ if (e >= i.length) break;
81
+ const n = i[t].edge, r = i[e].edge;
82
+ a.push([[Math.round(n.x), h], [Math.round(r.x), h]]);
83
+ }
84
+ h += n, i.forEach(((t) => {
85
+ t.edge.x = t.edge.x + n * t.edge.islope;
86
+ })), u++;
87
+ }
88
+ return a;
89
+ }(h, i, r);
90
+ if (o) {
91
+ for (const t of h) a(t, u, -o);
92
+ (function(t, e, n) {
93
+ const r = [];
94
+ t.forEach(((t) => r.push(...t))), a(r, e, n);
95
+ })(p, u, -o);
96
+ }
97
+ return p;
98
+ }
99
+ function i(t, e) {
100
+ var n, r = e.hachureAngle + 90, a = e.hachureGap;
101
+ a < 0 && (a = 4 * e.strokeWidth), a = Math.round(Math.max(a, .1));
102
+ var s = 1;
103
+ return e.roughness >= 1 && ((null === (n = e.randomizer) || void 0 === n ? void 0 : n.next()) || Math.random()) > .7 && (s = a), o(t, a, r, s || 1);
104
+ }
105
+ var h = function() {
106
+ function t(t) {
107
+ this.helper = t;
108
+ }
109
+ return t.prototype.fillPolygons = function(t, e) {
110
+ return this._fillPolygons(t, e);
111
+ }, t.prototype._fillPolygons = function(t, e) {
112
+ var n = i(t, e);
113
+ return {
114
+ type: "fillSketch",
115
+ ops: this.renderLines(n, e)
116
+ };
117
+ }, t.prototype.renderLines = function(t, e) {
118
+ for (var n = [], r = 0, a = t; r < a.length; r++) {
119
+ var s = a[r];
120
+ n.push.apply(n, this.helper.doubleLineOps(s[0][0], s[0][1], s[1][0], s[1][1], e));
121
+ }
122
+ return n;
123
+ }, t;
124
+ }();
125
+ function u(t) {
126
+ var e = t[0], n = t[1];
127
+ return Math.sqrt(Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2));
128
+ }
129
+ var p = function(t) {
130
+ function n() {
131
+ return null !== t && t.apply(this, arguments) || this;
132
+ }
133
+ return e(n, t), n.prototype.fillPolygons = function(t, e) {
134
+ var n = e.hachureGap;
135
+ n < 0 && (n = 4 * e.strokeWidth), n = Math.max(n, .1);
136
+ for (var a = i(t, Object.assign({}, e, { hachureGap: n })), s = Math.PI / 180 * e.hachureAngle, o = [], h = .5 * n * Math.cos(s), p = .5 * n * Math.sin(s), l = 0, c = a; l < c.length; l++) {
137
+ var f = c[l], d = f[0], g = f[1];
138
+ u([d, g]) && o.push([[d[0] - h, d[1] + p], r([], g, !0)], [[d[0] + h, d[1] - p], r([], g, !0)]);
139
+ }
140
+ return {
141
+ type: "fillSketch",
142
+ ops: this.renderLines(o, e)
143
+ };
144
+ }, n;
145
+ }(h);
146
+ var l = function(t) {
147
+ function n() {
148
+ return null !== t && t.apply(this, arguments) || this;
149
+ }
150
+ return e(n, t), n.prototype.fillPolygons = function(t, e) {
151
+ var n = this._fillPolygons(t, e), r = Object.assign({}, e, { hachureAngle: e.hachureAngle + 90 }), a = this._fillPolygons(t, r);
152
+ return n.ops = n.ops.concat(a.ops), n;
153
+ }, n;
154
+ }(h);
155
+ var c = function() {
156
+ function t(t) {
157
+ this.helper = t;
158
+ }
159
+ return t.prototype.fillPolygons = function(t, e) {
160
+ var n = i(t, e = Object.assign({}, e, { hachureAngle: 0 }));
161
+ return this.dotsOnLines(n, e);
162
+ }, t.prototype.dotsOnLines = function(t, e) {
163
+ var n = [], r = e.hachureGap;
164
+ r < 0 && (r = 4 * e.strokeWidth), r = Math.max(r, .1);
165
+ var a = e.fillWeight;
166
+ a < 0 && (a = e.strokeWidth / 2);
167
+ for (var s = r / 4, o = 0, i = t; o < i.length; o++) for (var h = i[o], p = u(h), l = p / r, c = Math.ceil(l) - 1, f = p - c * r, d = (h[0][0] + h[1][0]) / 2 - r / 4, g = Math.min(h[0][1], h[1][1]), y = 0; y < c; y++) {
168
+ var v = g + f + y * r, M = d - s + 2 * Math.random() * s, k = v - s + 2 * Math.random() * s, b = this.helper.ellipse(M, k, a, a, e);
169
+ n.push.apply(n, b.ops);
170
+ }
171
+ return {
172
+ type: "fillSketch",
173
+ ops: n
174
+ };
175
+ }, t;
176
+ }();
177
+ var f = function() {
178
+ function t(t) {
179
+ this.helper = t;
180
+ }
181
+ return t.prototype.fillPolygons = function(t, e) {
182
+ var n = i(t, e);
183
+ return {
184
+ type: "fillSketch",
185
+ ops: this.dashedLine(n, e)
186
+ };
187
+ }, t.prototype.dashedLine = function(t, e) {
188
+ var n = this, r = e.dashOffset < 0 ? e.hachureGap < 0 ? 4 * e.strokeWidth : e.hachureGap : e.dashOffset, a = e.dashGap < 0 ? e.hachureGap < 0 ? 4 * e.strokeWidth : e.hachureGap : e.dashGap, s = [];
189
+ return t.forEach((function(t) {
190
+ var o = u(t), i = Math.floor(o / (r + a)), h = (o + a - i * (r + a)) / 2, p = t[0], l = t[1];
191
+ p[0] > l[0] && (p = t[1], l = t[0]);
192
+ for (var c = Math.atan((l[1] - p[1]) / (l[0] - p[0])), f = 0; f < i; f++) {
193
+ var d = f * (r + a), g = d + r, y = [p[0] + d * Math.cos(c) + h * Math.cos(c), p[1] + d * Math.sin(c) + h * Math.sin(c)], v = [p[0] + g * Math.cos(c) + h * Math.cos(c), p[1] + g * Math.sin(c) + h * Math.sin(c)];
194
+ s.push.apply(s, n.helper.doubleLineOps(y[0], y[1], v[0], v[1], e));
195
+ }
196
+ })), s;
197
+ }, t;
198
+ }();
199
+ var d = function() {
200
+ function t(t) {
201
+ this.helper = t;
202
+ }
203
+ return t.prototype.fillPolygons = function(t, e) {
204
+ var n = e.hachureGap < 0 ? 4 * e.strokeWidth : e.hachureGap, r = e.zigzagOffset < 0 ? n : e.zigzagOffset, a = i(t, e = Object.assign({}, e, { hachureGap: n + r }));
205
+ return {
206
+ type: "fillSketch",
207
+ ops: this.zigzagLines(a, r, e)
208
+ };
209
+ }, t.prototype.zigzagLines = function(t, e, n) {
210
+ var a = this, s = [];
211
+ return t.forEach((function(t) {
212
+ var o = u(t), i = Math.round(o / (2 * e)), h = t[0], p = t[1];
213
+ h[0] > p[0] && (h = t[1], p = t[0]);
214
+ for (var l = Math.atan((p[1] - h[1]) / (p[0] - h[0])), c = 0; c < i; c++) {
215
+ var f = 2 * c * e, d = 2 * (c + 1) * e, g = Math.sqrt(2 * Math.pow(e, 2)), y = [h[0] + f * Math.cos(l), h[1] + f * Math.sin(l)], v = [h[0] + d * Math.cos(l), h[1] + d * Math.sin(l)], M = [y[0] + g * Math.cos(l + Math.PI / 4), y[1] + g * Math.sin(l + Math.PI / 4)];
216
+ s.push.apply(s, r(r([], a.helper.doubleLineOps(y[0], y[1], M[0], M[1], n), !1), a.helper.doubleLineOps(M[0], M[1], v[0], v[1], n), !1));
217
+ }
218
+ })), s;
219
+ }, t;
220
+ }();
221
+ var g = {};
222
+ var y = function() {
223
+ function t(t) {
224
+ this.seed = t;
225
+ }
226
+ return t.prototype.next = function() {
227
+ return this.seed ? (Math.pow(2, 31) - 1 & (this.seed = Math.imul(48271, this.seed))) / Math.pow(2, 31) : Math.random();
228
+ }, t;
229
+ }();
230
+ const v = 0;
231
+ const M = 1;
232
+ const k = 2;
233
+ const b = {
234
+ A: 7,
235
+ a: 7,
236
+ C: 6,
237
+ c: 6,
238
+ H: 1,
239
+ h: 1,
240
+ L: 2,
241
+ l: 2,
242
+ M: 2,
243
+ m: 2,
244
+ Q: 4,
245
+ q: 4,
246
+ S: 4,
247
+ s: 4,
248
+ T: 2,
249
+ t: 2,
250
+ V: 1,
251
+ v: 1,
252
+ Z: 0,
253
+ z: 0
254
+ };
255
+ function m(t, e) {
256
+ return t.type === e;
257
+ }
258
+ function w(t) {
259
+ const e = [], n = function(t) {
260
+ const e = new Array();
261
+ for (; "" !== t;) if (t.match(/^([ \t\r\n,]+)/)) t = t.substr(RegExp.$1.length);
262
+ else if (t.match(/^([aAcChHlLmMqQsStTvVzZ])/)) e[e.length] = {
263
+ type: v,
264
+ text: RegExp.$1
265
+ }, t = t.substr(RegExp.$1.length);
266
+ else {
267
+ if (!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)) return [];
268
+ e[e.length] = {
269
+ type: M,
270
+ text: `${parseFloat(RegExp.$1)}`
271
+ }, t = t.substr(RegExp.$1.length);
272
+ }
273
+ return e[e.length] = {
274
+ type: k,
275
+ text: ""
276
+ }, e;
277
+ }(t);
278
+ let r = "BOD", a = 0, s = n[a];
279
+ for (; !m(s, k);) {
280
+ let o = 0;
281
+ const i = [];
282
+ if ("BOD" === r) {
283
+ if ("M" !== s.text && "m" !== s.text) return w("M0,0" + t);
284
+ a++, o = b[s.text], r = s.text;
285
+ } else m(s, M) ? o = b[r] : (a++, o = b[s.text], r = s.text);
286
+ if (!(a + o < n.length)) throw new Error("Path data ended short");
287
+ for (let t = a; t < a + o; t++) {
288
+ const e = n[t];
289
+ if (!m(e, M)) throw new Error("Param not a number: " + r + "," + e.text);
290
+ i[i.length] = +e.text;
291
+ }
292
+ if ("number" != typeof b[r]) throw new Error("Bad segment: " + r);
293
+ {
294
+ const t = {
295
+ key: r,
296
+ data: i
297
+ };
298
+ e.push(t), a += o, s = n[a], "M" === r && (r = "L"), "m" === r && (r = "l");
299
+ }
300
+ }
301
+ return e;
302
+ }
303
+ function P(t) {
304
+ let e = 0, n = 0, r = 0, a = 0;
305
+ const s = [];
306
+ for (const { key: o, data: i } of t) switch (o) {
307
+ case "M":
308
+ s.push({
309
+ key: "M",
310
+ data: [...i]
311
+ }), [e, n] = i, [r, a] = i;
312
+ break;
313
+ case "m":
314
+ e += i[0], n += i[1], s.push({
315
+ key: "M",
316
+ data: [e, n]
317
+ }), r = e, a = n;
318
+ break;
319
+ case "L":
320
+ s.push({
321
+ key: "L",
322
+ data: [...i]
323
+ }), [e, n] = i;
324
+ break;
325
+ case "l":
326
+ e += i[0], n += i[1], s.push({
327
+ key: "L",
328
+ data: [e, n]
329
+ });
330
+ break;
331
+ case "C":
332
+ s.push({
333
+ key: "C",
334
+ data: [...i]
335
+ }), e = i[4], n = i[5];
336
+ break;
337
+ case "c": {
338
+ const t = i.map(((t, r) => r % 2 ? t + n : t + e));
339
+ s.push({
340
+ key: "C",
341
+ data: t
342
+ }), e = t[4], n = t[5];
343
+ break;
344
+ }
345
+ case "Q":
346
+ s.push({
347
+ key: "Q",
348
+ data: [...i]
349
+ }), e = i[2], n = i[3];
350
+ break;
351
+ case "q": {
352
+ const t = i.map(((t, r) => r % 2 ? t + n : t + e));
353
+ s.push({
354
+ key: "Q",
355
+ data: t
356
+ }), e = t[2], n = t[3];
357
+ break;
358
+ }
359
+ case "A":
360
+ s.push({
361
+ key: "A",
362
+ data: [...i]
363
+ }), e = i[5], n = i[6];
364
+ break;
365
+ case "a":
366
+ e += i[5], n += i[6], s.push({
367
+ key: "A",
368
+ data: [
369
+ i[0],
370
+ i[1],
371
+ i[2],
372
+ i[3],
373
+ i[4],
374
+ e,
375
+ n
376
+ ]
377
+ });
378
+ break;
379
+ case "H":
380
+ s.push({
381
+ key: "H",
382
+ data: [...i]
383
+ }), e = i[0];
384
+ break;
385
+ case "h":
386
+ e += i[0], s.push({
387
+ key: "H",
388
+ data: [e]
389
+ });
390
+ break;
391
+ case "V":
392
+ s.push({
393
+ key: "V",
394
+ data: [...i]
395
+ }), n = i[0];
396
+ break;
397
+ case "v":
398
+ n += i[0], s.push({
399
+ key: "V",
400
+ data: [n]
401
+ });
402
+ break;
403
+ case "S":
404
+ s.push({
405
+ key: "S",
406
+ data: [...i]
407
+ }), e = i[2], n = i[3];
408
+ break;
409
+ case "s": {
410
+ const t = i.map(((t, r) => r % 2 ? t + n : t + e));
411
+ s.push({
412
+ key: "S",
413
+ data: t
414
+ }), e = t[2], n = t[3];
415
+ break;
416
+ }
417
+ case "T":
418
+ s.push({
419
+ key: "T",
420
+ data: [...i]
421
+ }), e = i[0], n = i[1];
422
+ break;
423
+ case "t":
424
+ e += i[0], n += i[1], s.push({
425
+ key: "T",
426
+ data: [e, n]
427
+ });
428
+ break;
429
+ case "Z":
430
+ case "z": s.push({
431
+ key: "Z",
432
+ data: []
433
+ }), e = r, n = a;
434
+ }
435
+ return s;
436
+ }
437
+ function x(t) {
438
+ const e = [];
439
+ let n = "", r = 0, a = 0, s = 0, o = 0, i = 0, h = 0;
440
+ for (const { key: u, data: p } of t) {
441
+ switch (u) {
442
+ case "M":
443
+ e.push({
444
+ key: "M",
445
+ data: [...p]
446
+ }), [r, a] = p, [s, o] = p;
447
+ break;
448
+ case "C":
449
+ e.push({
450
+ key: "C",
451
+ data: [...p]
452
+ }), r = p[4], a = p[5], i = p[2], h = p[3];
453
+ break;
454
+ case "L":
455
+ e.push({
456
+ key: "L",
457
+ data: [...p]
458
+ }), [r, a] = p;
459
+ break;
460
+ case "H":
461
+ r = p[0], e.push({
462
+ key: "L",
463
+ data: [r, a]
464
+ });
465
+ break;
466
+ case "V":
467
+ a = p[0], e.push({
468
+ key: "L",
469
+ data: [r, a]
470
+ });
471
+ break;
472
+ case "S": {
473
+ let t = 0, s = 0;
474
+ "C" === n || "S" === n ? (t = r + (r - i), s = a + (a - h)) : (t = r, s = a), e.push({
475
+ key: "C",
476
+ data: [
477
+ t,
478
+ s,
479
+ ...p
480
+ ]
481
+ }), i = p[0], h = p[1], r = p[2], a = p[3];
482
+ break;
483
+ }
484
+ case "T": {
485
+ const [t, s] = p;
486
+ let o = 0, u = 0;
487
+ "Q" === n || "T" === n ? (o = r + (r - i), u = a + (a - h)) : (o = r, u = a);
488
+ const l = r + 2 * (o - r) / 3, c = a + 2 * (u - a) / 3, f = t + 2 * (o - t) / 3, d = s + 2 * (u - s) / 3;
489
+ e.push({
490
+ key: "C",
491
+ data: [
492
+ l,
493
+ c,
494
+ f,
495
+ d,
496
+ t,
497
+ s
498
+ ]
499
+ }), i = o, h = u, r = t, a = s;
500
+ break;
501
+ }
502
+ case "Q": {
503
+ const [t, n, s, o] = p, u = r + 2 * (t - r) / 3, l = a + 2 * (n - a) / 3, c = s + 2 * (t - s) / 3, f = o + 2 * (n - o) / 3;
504
+ e.push({
505
+ key: "C",
506
+ data: [
507
+ u,
508
+ l,
509
+ c,
510
+ f,
511
+ s,
512
+ o
513
+ ]
514
+ }), i = t, h = n, r = s, a = o;
515
+ break;
516
+ }
517
+ case "A": {
518
+ const t = Math.abs(p[0]), n = Math.abs(p[1]), s = p[2], o = p[3], i = p[4], h = p[5], u = p[6];
519
+ if (0 === t || 0 === n) e.push({
520
+ key: "C",
521
+ data: [
522
+ r,
523
+ a,
524
+ h,
525
+ u,
526
+ h,
527
+ u
528
+ ]
529
+ }), r = h, a = u;
530
+ else if (r !== h || a !== u) O(r, a, h, u, t, n, s, o, i).forEach((function(t) {
531
+ e.push({
532
+ key: "C",
533
+ data: t
534
+ });
535
+ })), r = h, a = u;
536
+ break;
537
+ }
538
+ case "Z": e.push({
539
+ key: "Z",
540
+ data: []
541
+ }), r = s, a = o;
542
+ }
543
+ n = u;
544
+ }
545
+ return e;
546
+ }
547
+ function S(t, e, n) {
548
+ return [t * Math.cos(n) - e * Math.sin(n), t * Math.sin(n) + e * Math.cos(n)];
549
+ }
550
+ function O(t, e, n, r, a, s, o, i, h, u) {
551
+ const p = (l = o, Math.PI * l / 180);
552
+ var l;
553
+ let c = [], f = 0, d = 0, g = 0, y = 0;
554
+ if (u) [f, d, g, y] = u;
555
+ else {
556
+ [t, e] = S(t, e, -p), [n, r] = S(n, r, -p);
557
+ const o = (t - n) / 2, u = (e - r) / 2;
558
+ let l = o * o / (a * a) + u * u / (s * s);
559
+ l > 1 && (l = Math.sqrt(l), a *= l, s *= l);
560
+ const c = a * a, v = s * s, M = c * v - c * u * u - v * o * o, k = c * u * u + v * o * o, b = (i === h ? -1 : 1) * Math.sqrt(Math.abs(M / k));
561
+ g = b * a * u / s + (t + n) / 2, y = b * -s * o / a + (e + r) / 2, f = Math.asin(parseFloat(((e - y) / s).toFixed(9))), d = Math.asin(parseFloat(((r - y) / s).toFixed(9))), t < g && (f = Math.PI - f), n < g && (d = Math.PI - d), f < 0 && (f = 2 * Math.PI + f), d < 0 && (d = 2 * Math.PI + d), h && f > d && (f -= 2 * Math.PI), !h && d > f && (d -= 2 * Math.PI);
562
+ }
563
+ let v = d - f;
564
+ if (Math.abs(v) > 120 * Math.PI / 180) {
565
+ const t = d, e = n, i = r;
566
+ d = h && d > f ? f + 120 * Math.PI / 180 * 1 : f + 120 * Math.PI / 180 * -1, c = O(n = g + a * Math.cos(d), r = y + s * Math.sin(d), e, i, a, s, o, 0, h, [
567
+ d,
568
+ t,
569
+ g,
570
+ y
571
+ ]);
572
+ }
573
+ v = d - f;
574
+ const M = Math.cos(f), k = Math.sin(f), b = Math.cos(d), m = Math.sin(d), w = Math.tan(v / 4), P = 4 / 3 * a * w, x = 4 / 3 * s * w, L = [t, e], T = [t + P * k, e - x * M], _ = [n + P * m, r - x * b], D = [n, r];
575
+ if (T[0] = 2 * L[0] - T[0], T[1] = 2 * L[1] - T[1], u) return [
576
+ T,
577
+ _,
578
+ D
579
+ ].concat(c);
580
+ {
581
+ c = [
582
+ T,
583
+ _,
584
+ D
585
+ ].concat(c);
586
+ const t = [];
587
+ for (let e = 0; e < c.length; e += 3) {
588
+ const n = S(c[e][0], c[e][1], p), r = S(c[e + 1][0], c[e + 1][1], p), a = S(c[e + 2][0], c[e + 2][1], p);
589
+ t.push([
590
+ n[0],
591
+ n[1],
592
+ r[0],
593
+ r[1],
594
+ a[0],
595
+ a[1]
596
+ ]);
597
+ }
598
+ return t;
599
+ }
600
+ }
601
+ var L = {
602
+ randOffset: function(t, e) {
603
+ return F(t, e);
604
+ },
605
+ randOffsetWithRange: function(t, e, n) {
606
+ return q(t, e, n);
607
+ },
608
+ ellipse: function(t, e, n, r, a) {
609
+ return C(t, e, a, I(n, r, a)).opset;
610
+ },
611
+ doubleLineOps: function(t, e, n, r, a) {
612
+ return V(t, e, n, r, a, !0);
613
+ }
614
+ };
615
+ function T(t, e, n, r, a) {
616
+ return {
617
+ type: "path",
618
+ ops: V(t, e, n, r, a)
619
+ };
620
+ }
621
+ function _(t, e, n) {
622
+ var r = (t || []).length;
623
+ if (r > 2) {
624
+ for (var a = [], s = 0; s < r - 1; s++) a.push.apply(a, V(t[s][0], t[s][1], t[s + 1][0], t[s + 1][1], n));
625
+ return e && a.push.apply(a, V(t[r - 1][0], t[r - 1][1], t[0][0], t[0][1], n)), {
626
+ type: "path",
627
+ ops: a
628
+ };
629
+ }
630
+ return 2 === r ? T(t[0][0], t[0][1], t[1][0], t[1][1], n) : {
631
+ type: "path",
632
+ ops: []
633
+ };
634
+ }
635
+ function D(t, e, n, r, a) {
636
+ return function(t, e) {
637
+ return _(t, !0, e);
638
+ }([
639
+ [t, e],
640
+ [t + n, e],
641
+ [t + n, e + r],
642
+ [t, e + r]
643
+ ], a);
644
+ }
645
+ function A(t, e) {
646
+ if (t.length) {
647
+ for (var n = "number" == typeof t[0][0] ? [t] : t, r = Q(n[0], 1 * (1 + .2 * e.roughness), e), a = e.disableMultiStroke ? [] : Q(n[0], 1.5 * (1 + .22 * e.roughness), R(e)), s = 1; s < n.length; s++) {
648
+ var o = n[s];
649
+ if (o.length) {
650
+ for (var i = Q(o, 1 * (1 + .2 * e.roughness), e), h = e.disableMultiStroke ? [] : Q(o, 1.5 * (1 + .22 * e.roughness), R(e)), u = 0, p = i; u < p.length; u++) "move" !== (f = p[u]).op && r.push(f);
651
+ for (var l = 0, c = h; l < c.length; l++) {
652
+ var f;
653
+ "move" !== (f = c[l]).op && a.push(f);
654
+ }
655
+ }
656
+ }
657
+ return {
658
+ type: "path",
659
+ ops: r.concat(a)
660
+ };
661
+ }
662
+ return {
663
+ type: "path",
664
+ ops: []
665
+ };
666
+ }
667
+ function I(t, e, n) {
668
+ var r = Math.sqrt(2 * Math.PI * Math.sqrt((Math.pow(t / 2, 2) + Math.pow(e / 2, 2)) / 2)), a = Math.ceil(Math.max(n.curveStepCount, n.curveStepCount / Math.sqrt(200) * r)), s = 2 * Math.PI / a, o = Math.abs(t / 2), i = Math.abs(e / 2), h = 1 - n.curveFitting;
669
+ return {
670
+ increment: s,
671
+ rx: o += F(o * h, n),
672
+ ry: i += F(i * h, n)
673
+ };
674
+ }
675
+ function C(t, e, n, r) {
676
+ var a = $(r.increment, t, e, r.rx, r.ry, 1, r.increment * q(.1, q(.4, 1, n), n), n), s = a[0], o = a[1], i = H(s, null, n);
677
+ if (!n.disableMultiStroke && 0 !== n.roughness) {
678
+ var h = H($(r.increment, t, e, r.rx, r.ry, 1.5, 0, n)[0], null, n);
679
+ i = i.concat(h);
680
+ }
681
+ return {
682
+ estimatedPoints: o,
683
+ opset: {
684
+ type: "path",
685
+ ops: i
686
+ }
687
+ };
688
+ }
689
+ function z(t, e, n, a, s, o, i, h, u) {
690
+ var p = t, l = e, c = Math.abs(n / 2), f = Math.abs(a / 2);
691
+ c += F(.01 * c, u), f += F(.01 * f, u);
692
+ for (var d = s, g = o; d < 0;) d += 2 * Math.PI, g += 2 * Math.PI;
693
+ g - d > 2 * Math.PI && (d = 0, g = 2 * Math.PI);
694
+ var y = 2 * Math.PI / u.curveStepCount, v = Math.min(y / 2, (g - d) / 2), M = N(v, p, l, c, f, d, g, 1, u);
695
+ if (!u.disableMultiStroke) {
696
+ var k = N(v, p, l, c, f, d, g, 1.5, u);
697
+ M.push.apply(M, k);
698
+ }
699
+ return i && (h ? M.push.apply(M, r(r([], V(p, l, p + c * Math.cos(d), l + f * Math.sin(d), u), !1), V(p, l, p + c * Math.cos(g), l + f * Math.sin(g), u), !1)) : M.push({
700
+ op: "lineTo",
701
+ data: [p, l]
702
+ }, {
703
+ op: "lineTo",
704
+ data: [p + c * Math.cos(d), l + f * Math.sin(d)]
705
+ })), {
706
+ type: "path",
707
+ ops: M
708
+ };
709
+ }
710
+ function W(t, e) {
711
+ for (var n = [], r = [0, 0], a = [0, 0], s = 0, o = x(P(w(t))); s < o.length; s++) {
712
+ var i = o[s], h = i.key, u = i.data;
713
+ switch (h) {
714
+ case "M":
715
+ a = [u[0], u[1]], r = [u[0], u[1]];
716
+ break;
717
+ case "L":
718
+ n.push.apply(n, V(a[0], a[1], u[0], u[1], e)), a = [u[0], u[1]];
719
+ break;
720
+ case "C":
721
+ var p = u[0], l = u[1], c = u[2], f = u[3], d = u[4], g = u[5];
722
+ n.push.apply(n, B(p, l, c, f, d, g, a, e)), a = [d, g];
723
+ break;
724
+ case "Z": n.push.apply(n, V(a[0], a[1], r[0], r[1], e)), a = [r[0], r[1]];
725
+ }
726
+ }
727
+ return {
728
+ type: "path",
729
+ ops: n
730
+ };
731
+ }
732
+ function E(t, e) {
733
+ for (var n = [], r = 0, a = t; r < a.length; r++) {
734
+ var s = a[r];
735
+ if (s.length) {
736
+ var o = e.maxRandomnessOffset || 0, i = s.length;
737
+ if (i > 2) {
738
+ n.push({
739
+ op: "move",
740
+ data: [s[0][0] + F(o, e), s[0][1] + F(o, e)]
741
+ });
742
+ for (var h = 1; h < i; h++) n.push({
743
+ op: "lineTo",
744
+ data: [s[h][0] + F(o, e), s[h][1] + F(o, e)]
745
+ });
746
+ }
747
+ }
748
+ }
749
+ return {
750
+ type: "fillPath",
751
+ ops: n
752
+ };
753
+ }
754
+ function G(t, e) {
755
+ return function(t, e) {
756
+ var n = t.fillStyle || "hachure";
757
+ if (!g[n]) switch (n) {
758
+ case "zigzag":
759
+ g[n] || (g[n] = new p(e));
760
+ break;
761
+ case "cross-hatch":
762
+ g[n] || (g[n] = new l(e));
763
+ break;
764
+ case "dots":
765
+ g[n] || (g[n] = new c(e));
766
+ break;
767
+ case "dashed":
768
+ g[n] || (g[n] = new f(e));
769
+ break;
770
+ case "zigzag-line":
771
+ g[n] || (g[n] = new d(e));
772
+ break;
773
+ default: g[n = "hachure"] || (g[n] = new h(e));
774
+ }
775
+ return g[n];
776
+ }(e, L).fillPolygons(t, e);
777
+ }
778
+ function R(t) {
779
+ var e = n({}, t);
780
+ return e.randomizer = void 0, t.seed && (e.seed = t.seed + 1), e;
781
+ }
782
+ function j(t) {
783
+ return t.randomizer || (t.randomizer = new y(t.seed || 0)), t.randomizer.next();
784
+ }
785
+ function q(t, e, n, r) {
786
+ return void 0 === r && (r = 1), n.roughness * r * (j(n) * (e - t) + t);
787
+ }
788
+ function F(t, e, n) {
789
+ return void 0 === n && (n = 1), q(-t, t, e, n);
790
+ }
791
+ function V(t, e, n, r, a, s) {
792
+ void 0 === s && (s = !1);
793
+ var o = s ? a.disableMultiStrokeFill : a.disableMultiStroke, i = Z(t, e, n, r, a, !0, !1);
794
+ if (o) return i;
795
+ var h = Z(t, e, n, r, a, !0, !0);
796
+ return i.concat(h);
797
+ }
798
+ function Z(t, e, n, r, a, s, o) {
799
+ var i = Math.pow(t - n, 2) + Math.pow(e - r, 2), h = Math.sqrt(i), u = 1;
800
+ u = h < 200 ? 1 : h > 500 ? .4 : -.0016668 * h + 1.233334;
801
+ var p = a.maxRandomnessOffset || 0;
802
+ p * p * 100 > i && (p = h / 10);
803
+ var l = p / 2, c = .2 + .2 * j(a), f = a.bowing * a.maxRandomnessOffset * (r - e) / 200, d = a.bowing * a.maxRandomnessOffset * (t - n) / 200;
804
+ f = F(f, a, u), d = F(d, a, u);
805
+ var g = [], y = function() {
806
+ return F(l, a, u);
807
+ }, v = function() {
808
+ return F(p, a, u);
809
+ }, M = a.preserveVertices;
810
+ return s && (o ? g.push({
811
+ op: "move",
812
+ data: [t + (M ? 0 : y()), e + (M ? 0 : y())]
813
+ }) : g.push({
814
+ op: "move",
815
+ data: [t + (M ? 0 : F(p, a, u)), e + (M ? 0 : F(p, a, u))]
816
+ })), o ? g.push({
817
+ op: "bcurveTo",
818
+ data: [
819
+ f + t + (n - t) * c + y(),
820
+ d + e + (r - e) * c + y(),
821
+ f + t + 2 * (n - t) * c + y(),
822
+ d + e + 2 * (r - e) * c + y(),
823
+ n + (M ? 0 : y()),
824
+ r + (M ? 0 : y())
825
+ ]
826
+ }) : g.push({
827
+ op: "bcurveTo",
828
+ data: [
829
+ f + t + (n - t) * c + v(),
830
+ d + e + (r - e) * c + v(),
831
+ f + t + 2 * (n - t) * c + v(),
832
+ d + e + 2 * (r - e) * c + v(),
833
+ n + (M ? 0 : v()),
834
+ r + (M ? 0 : v())
835
+ ]
836
+ }), g;
837
+ }
838
+ function Q(t, e, n) {
839
+ if (!t.length) return [];
840
+ var r = [];
841
+ r.push([t[0][0] + F(e, n), t[0][1] + F(e, n)]), r.push([t[0][0] + F(e, n), t[0][1] + F(e, n)]);
842
+ for (var a = 1; a < t.length; a++) r.push([t[a][0] + F(e, n), t[a][1] + F(e, n)]), a === t.length - 1 && r.push([t[a][0] + F(e, n), t[a][1] + F(e, n)]);
843
+ return H(r, null, n);
844
+ }
845
+ function H(t, e, n) {
846
+ var r = t.length, a = [];
847
+ if (r > 3) {
848
+ var s = [], o = 1 - n.curveTightness;
849
+ a.push({
850
+ op: "move",
851
+ data: [t[1][0], t[1][1]]
852
+ });
853
+ for (var i = 1; i + 2 < r; i++) {
854
+ var h = t[i];
855
+ s[0] = [h[0], h[1]], s[1] = [h[0] + (o * t[i + 1][0] - o * t[i - 1][0]) / 6, h[1] + (o * t[i + 1][1] - o * t[i - 1][1]) / 6], s[2] = [t[i + 1][0] + (o * t[i][0] - o * t[i + 2][0]) / 6, t[i + 1][1] + (o * t[i][1] - o * t[i + 2][1]) / 6], s[3] = [t[i + 1][0], t[i + 1][1]], a.push({
856
+ op: "bcurveTo",
857
+ data: [
858
+ s[1][0],
859
+ s[1][1],
860
+ s[2][0],
861
+ s[2][1],
862
+ s[3][0],
863
+ s[3][1]
864
+ ]
865
+ });
866
+ }
867
+ if (e && 2 === e.length) {
868
+ var u = n.maxRandomnessOffset;
869
+ a.push({
870
+ op: "lineTo",
871
+ data: [e[0] + F(u, n), e[1] + F(u, n)]
872
+ });
873
+ }
874
+ } else 3 === r ? (a.push({
875
+ op: "move",
876
+ data: [t[1][0], t[1][1]]
877
+ }), a.push({
878
+ op: "bcurveTo",
879
+ data: [
880
+ t[1][0],
881
+ t[1][1],
882
+ t[2][0],
883
+ t[2][1],
884
+ t[2][0],
885
+ t[2][1]
886
+ ]
887
+ })) : 2 === r && a.push.apply(a, Z(t[0][0], t[0][1], t[1][0], t[1][1], n, !0, !0));
888
+ return a;
889
+ }
890
+ function $(t, e, n, r, a, s, o, i) {
891
+ var h = [], u = [];
892
+ if (0 === i.roughness) {
893
+ t /= 4, u.push([e + r * Math.cos(-t), n + a * Math.sin(-t)]);
894
+ for (var p = 0; p <= 2 * Math.PI; p += t) {
895
+ var l = [e + r * Math.cos(p), n + a * Math.sin(p)];
896
+ h.push(l), u.push(l);
897
+ }
898
+ u.push([e + r * Math.cos(0), n + a * Math.sin(0)]), u.push([e + r * Math.cos(t), n + a * Math.sin(t)]);
899
+ } else {
900
+ var c = F(.5, i) - Math.PI / 2;
901
+ u.push([F(s, i) + e + .9 * r * Math.cos(c - t), F(s, i) + n + .9 * a * Math.sin(c - t)]);
902
+ var f = 2 * Math.PI + c - .01;
903
+ for (p = c; p < f; p += t) {
904
+ l = [F(s, i) + e + r * Math.cos(p), F(s, i) + n + a * Math.sin(p)];
905
+ h.push(l), u.push(l);
906
+ }
907
+ u.push([F(s, i) + e + r * Math.cos(c + 2 * Math.PI + .5 * o), F(s, i) + n + a * Math.sin(c + 2 * Math.PI + .5 * o)]), u.push([F(s, i) + e + .98 * r * Math.cos(c + o), F(s, i) + n + .98 * a * Math.sin(c + o)]), u.push([F(s, i) + e + .9 * r * Math.cos(c + .5 * o), F(s, i) + n + .9 * a * Math.sin(c + .5 * o)]);
908
+ }
909
+ return [u, h];
910
+ }
911
+ function N(t, e, n, r, a, s, o, i, h) {
912
+ var u = s + F(.1, h), p = [];
913
+ p.push([F(i, h) + e + .9 * r * Math.cos(u - t), F(i, h) + n + .9 * a * Math.sin(u - t)]);
914
+ for (var l = u; l <= o; l += t) p.push([F(i, h) + e + r * Math.cos(l), F(i, h) + n + a * Math.sin(l)]);
915
+ return p.push([e + r * Math.cos(o), n + a * Math.sin(o)]), p.push([e + r * Math.cos(o), n + a * Math.sin(o)]), H(p, null, h);
916
+ }
917
+ function B(t, e, n, r, a, s, o, i) {
918
+ for (var h = [], u = [i.maxRandomnessOffset || 1, (i.maxRandomnessOffset || 1) + .3], p = [0, 0], l = i.disableMultiStroke ? 1 : 2, c = i.preserveVertices, f = 0; f < l; f++) 0 === f ? h.push({
919
+ op: "move",
920
+ data: [o[0], o[1]]
921
+ }) : h.push({
922
+ op: "move",
923
+ data: [o[0] + (c ? 0 : F(u[0], i)), o[1] + (c ? 0 : F(u[0], i))]
924
+ }), p = c ? [a, s] : [a + F(u[f], i), s + F(u[f], i)], h.push({
925
+ op: "bcurveTo",
926
+ data: [
927
+ t + F(u[f], i),
928
+ e + F(u[f], i),
929
+ n + F(u[f], i),
930
+ r + F(u[f], i),
931
+ p[0],
932
+ p[1]
933
+ ]
934
+ });
935
+ return h;
936
+ }
937
+ function J(t) {
938
+ return [...t];
939
+ }
940
+ function K(t, e = 0) {
941
+ const n = t.length;
942
+ if (n < 3) throw new Error("A curve must have at least three points.");
943
+ const r = [];
944
+ if (3 === n) r.push(J(t[0]), J(t[1]), J(t[2]), J(t[2]));
945
+ else {
946
+ const n = [];
947
+ n.push(t[0], t[0]);
948
+ for (let e = 1; e < t.length; e++) n.push(t[e]), e === t.length - 1 && n.push(t[e]);
949
+ const a = [], s = 1 - e;
950
+ r.push(J(n[0]));
951
+ for (let t = 1; t + 2 < n.length; t++) {
952
+ const e = n[t];
953
+ a[0] = [e[0], e[1]], a[1] = [e[0] + (s * n[t + 1][0] - s * n[t - 1][0]) / 6, e[1] + (s * n[t + 1][1] - s * n[t - 1][1]) / 6], a[2] = [n[t + 1][0] + (s * n[t][0] - s * n[t + 2][0]) / 6, n[t + 1][1] + (s * n[t][1] - s * n[t + 2][1]) / 6], a[3] = [n[t + 1][0], n[t + 1][1]], r.push(a[1], a[2], a[3]);
954
+ }
955
+ }
956
+ return r;
957
+ }
958
+ function U(t, e) {
959
+ return Math.pow(t[0] - e[0], 2) + Math.pow(t[1] - e[1], 2);
960
+ }
961
+ function X(t, e, n) {
962
+ const r = U(e, n);
963
+ if (0 === r) return U(t, e);
964
+ let a = ((t[0] - e[0]) * (n[0] - e[0]) + (t[1] - e[1]) * (n[1] - e[1])) / r;
965
+ return a = Math.max(0, Math.min(1, a)), U(t, Y(e, n, a));
966
+ }
967
+ function Y(t, e, n) {
968
+ return [t[0] + (e[0] - t[0]) * n, t[1] + (e[1] - t[1]) * n];
969
+ }
970
+ function tt(t, e, n, r) {
971
+ const a = r || [];
972
+ if (function(t, e) {
973
+ const n = t[e + 0], r = t[e + 1], a = t[e + 2], s = t[e + 3];
974
+ let o = 3 * r[0] - 2 * n[0] - s[0];
975
+ o *= o;
976
+ let i = 3 * r[1] - 2 * n[1] - s[1];
977
+ i *= i;
978
+ let h = 3 * a[0] - 2 * s[0] - n[0];
979
+ h *= h;
980
+ let u = 3 * a[1] - 2 * s[1] - n[1];
981
+ return u *= u, o < h && (o = h), i < u && (i = u), o + i;
982
+ }(t, e) < n) {
983
+ const n = t[e + 0];
984
+ if (a.length) (s = a[a.length - 1], o = n, Math.sqrt(U(s, o))) > 1 && a.push(n);
985
+ else a.push(n);
986
+ a.push(t[e + 3]);
987
+ } else {
988
+ const r = .5, s = t[e + 0], o = t[e + 1], i = t[e + 2], h = t[e + 3], u = Y(s, o, r), p = Y(o, i, r), l = Y(i, h, r), c = Y(u, p, r), f = Y(p, l, r), d = Y(c, f, r);
989
+ tt([
990
+ s,
991
+ u,
992
+ c,
993
+ d
994
+ ], 0, n, a), tt([
995
+ d,
996
+ f,
997
+ l,
998
+ h
999
+ ], 0, n, a);
1000
+ }
1001
+ var s, o;
1002
+ return a;
1003
+ }
1004
+ function et(t, e) {
1005
+ return nt(t, 0, t.length, e);
1006
+ }
1007
+ function nt(t, e, n, r, a) {
1008
+ const s = a || [], o = t[e], i = t[n - 1];
1009
+ let h = 0, u = 1;
1010
+ for (let r = e + 1; r < n - 1; ++r) {
1011
+ const e = X(t[r], o, i);
1012
+ e > h && (h = e, u = r);
1013
+ }
1014
+ return Math.sqrt(h) > r ? (nt(t, e, u + 1, r, s), nt(t, u, n, r, s)) : (s.length || s.push(o), s.push(i)), s;
1015
+ }
1016
+ function rt(t, e = .15, n) {
1017
+ const r = [], a = (t.length - 1) / 3;
1018
+ for (let n = 0; n < a; n++) tt(t, 3 * n, e, r);
1019
+ return n && n > 0 ? nt(r, 0, r.length, n) : r;
1020
+ }
1021
+ var at = "none";
1022
+ var st = function() {
1023
+ function t(t) {
1024
+ this.defaultOptions = {
1025
+ maxRandomnessOffset: 2,
1026
+ roughness: 1,
1027
+ bowing: 1,
1028
+ stroke: "#000",
1029
+ strokeWidth: 1,
1030
+ curveTightness: 0,
1031
+ curveFitting: .95,
1032
+ curveStepCount: 9,
1033
+ fillStyle: "hachure",
1034
+ fillWeight: -1,
1035
+ hachureAngle: -41,
1036
+ hachureGap: -1,
1037
+ dashOffset: -1,
1038
+ dashGap: -1,
1039
+ zigzagOffset: -1,
1040
+ seed: 0,
1041
+ disableMultiStroke: !1,
1042
+ disableMultiStrokeFill: !1,
1043
+ preserveVertices: !1,
1044
+ fillShapeRoughnessGain: .8
1045
+ }, this.config = t || {}, this.config.options && (this.defaultOptions = this._o(this.config.options));
1046
+ }
1047
+ return t.newSeed = function() {
1048
+ return Math.floor(Math.random() * Math.pow(2, 31));
1049
+ }, t.prototype._o = function(t) {
1050
+ return t ? Object.assign({}, this.defaultOptions, t) : this.defaultOptions;
1051
+ }, t.prototype._d = function(t, e, n) {
1052
+ return {
1053
+ shape: t,
1054
+ sets: e || [],
1055
+ options: n || this.defaultOptions
1056
+ };
1057
+ }, t.prototype.line = function(t, e, n, r, a) {
1058
+ var s = this._o(a);
1059
+ return this._d("line", [T(t, e, n, r, s)], s);
1060
+ }, t.prototype.rectangle = function(t, e, n, r, a) {
1061
+ var s = this._o(a), o = [], i = D(t, e, n, r, s);
1062
+ if (s.fill) {
1063
+ var h = [
1064
+ [t, e],
1065
+ [t + n, e],
1066
+ [t + n, e + r],
1067
+ [t, e + r]
1068
+ ];
1069
+ "solid" === s.fillStyle ? o.push(E([h], s)) : o.push(G([h], s));
1070
+ }
1071
+ return s.stroke !== at && o.push(i), this._d("rectangle", o, s);
1072
+ }, t.prototype.ellipse = function(t, e, n, r, a) {
1073
+ var s = this._o(a), o = [], i = I(n, r, s), h = C(t, e, s, i);
1074
+ if (s.fill) if ("solid" === s.fillStyle) {
1075
+ var u = C(t, e, s, i).opset;
1076
+ u.type = "fillPath", o.push(u);
1077
+ } else o.push(G([h.estimatedPoints], s));
1078
+ return s.stroke !== at && o.push(h.opset), this._d("ellipse", o, s);
1079
+ }, t.prototype.circle = function(t, e, n, r) {
1080
+ var a = this.ellipse(t, e, n, n, r);
1081
+ return a.shape = "circle", a;
1082
+ }, t.prototype.linearPath = function(t, e) {
1083
+ var n = this._o(e);
1084
+ return this._d("linearPath", [_(t, !1, n)], n);
1085
+ }, t.prototype.arc = function(t, e, r, a, s, o, i, h) {
1086
+ void 0 === i && (i = !1);
1087
+ var u = this._o(h), p = [], l = z(t, e, r, a, s, o, i, !0, u);
1088
+ if (i && u.fill) if ("solid" === u.fillStyle) {
1089
+ var c = n({}, u);
1090
+ c.disableMultiStroke = !0;
1091
+ var f = z(t, e, r, a, s, o, !0, !1, c);
1092
+ f.type = "fillPath", p.push(f);
1093
+ } else p.push(function(t, e, n, r, a, s, o) {
1094
+ var i = t, h = e, u = Math.abs(n / 2), p = Math.abs(r / 2);
1095
+ u += F(.01 * u, o), p += F(.01 * p, o);
1096
+ for (var l = a, c = s; l < 0;) l += 2 * Math.PI, c += 2 * Math.PI;
1097
+ c - l > 2 * Math.PI && (l = 0, c = 2 * Math.PI);
1098
+ for (var f = (c - l) / o.curveStepCount, d = [], g = l; g <= c; g += f) d.push([i + u * Math.cos(g), h + p * Math.sin(g)]);
1099
+ return d.push([i + u * Math.cos(c), h + p * Math.sin(c)]), d.push([i, h]), G([d], o);
1100
+ }(t, e, r, a, s, o, u));
1101
+ return u.stroke !== at && p.push(l), this._d("arc", p, u);
1102
+ }, t.prototype.curve = function(t, e) {
1103
+ var r = this._o(e), a = [], s = A(t, r);
1104
+ if (r.fill && r.fill !== at) if ("solid" === r.fillStyle) {
1105
+ var o = A(t, n(n({}, r), {
1106
+ disableMultiStroke: !0,
1107
+ roughness: r.roughness ? r.roughness + r.fillShapeRoughnessGain : 0
1108
+ }));
1109
+ a.push({
1110
+ type: "fillPath",
1111
+ ops: this._mergedShape(o.ops)
1112
+ });
1113
+ } else {
1114
+ var i = [], h = t;
1115
+ if (h.length) for (var u = 0, p = "number" == typeof h[0][0] ? [h] : h; u < p.length; u++) {
1116
+ var l = p[u];
1117
+ l.length < 3 ? i.push.apply(i, l) : 3 === l.length ? i.push.apply(i, rt(K([
1118
+ l[0],
1119
+ l[0],
1120
+ l[1],
1121
+ l[2]
1122
+ ]), 10, (1 + r.roughness) / 2)) : i.push.apply(i, rt(K(l), 10, (1 + r.roughness) / 2));
1123
+ }
1124
+ i.length && a.push(G([i], r));
1125
+ }
1126
+ return r.stroke !== at && a.push(s), this._d("curve", a, r);
1127
+ }, t.prototype.polygon = function(t, e) {
1128
+ var n = this._o(e), r = [], a = _(t, !0, n);
1129
+ return n.fill && ("solid" === n.fillStyle ? r.push(E([t], n)) : r.push(G([t], n))), n.stroke !== at && r.push(a), this._d("polygon", r, n);
1130
+ }, t.prototype.path = function(t, e) {
1131
+ var r = this._o(e), a = [];
1132
+ if (!t) return this._d("path", a, r);
1133
+ t = (t || "").replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(ss)/g", " ");
1134
+ var s = r.fill && "transparent" !== r.fill && r.fill !== at, o = r.stroke !== at, i = !!(r.simplification && r.simplification < 1), h = function(t, e, n) {
1135
+ const r = x(P(w(t))), a = [];
1136
+ let s = [], o = [0, 0], i = [];
1137
+ const h = () => {
1138
+ i.length >= 4 && s.push(...rt(i, e)), i = [];
1139
+ }, u = () => {
1140
+ h(), s.length && (a.push(s), s = []);
1141
+ };
1142
+ for (const { key: t, data: e } of r) switch (t) {
1143
+ case "M":
1144
+ u(), o = [e[0], e[1]], s.push(o);
1145
+ break;
1146
+ case "L":
1147
+ h(), s.push([e[0], e[1]]);
1148
+ break;
1149
+ case "C":
1150
+ if (!i.length) {
1151
+ const t = s.length ? s[s.length - 1] : o;
1152
+ i.push([t[0], t[1]]);
1153
+ }
1154
+ i.push([e[0], e[1]]), i.push([e[2], e[3]]), i.push([e[4], e[5]]);
1155
+ break;
1156
+ case "Z": h(), s.push([o[0], o[1]]);
1157
+ }
1158
+ if (u(), !n) return a;
1159
+ const p = [];
1160
+ for (const t of a) {
1161
+ const e = et(t, n);
1162
+ e.length && p.push(e);
1163
+ }
1164
+ return p;
1165
+ }(t, 1, i ? 4 - 4 * (r.simplification || 1) : (1 + r.roughness) / 2), u = W(t, r);
1166
+ if (s) if ("solid" === r.fillStyle) if (1 === h.length) {
1167
+ var p = W(t, n(n({}, r), {
1168
+ disableMultiStroke: !0,
1169
+ roughness: r.roughness ? r.roughness + r.fillShapeRoughnessGain : 0
1170
+ }));
1171
+ a.push({
1172
+ type: "fillPath",
1173
+ ops: this._mergedShape(p.ops)
1174
+ });
1175
+ } else a.push(E(h, r));
1176
+ else a.push(G(h, r));
1177
+ return o && (i ? h.forEach((function(t) {
1178
+ a.push(_(t, !1, r));
1179
+ })) : a.push(u)), this._d("path", a, r);
1180
+ }, t.prototype.opsToPath = function(t, e) {
1181
+ for (var n = "", r = 0, a = t.ops; r < a.length; r++) {
1182
+ var s = a[r], o = "number" == typeof e && e >= 0 ? s.data.map((function(t) {
1183
+ return +t.toFixed(e);
1184
+ })) : s.data;
1185
+ switch (s.op) {
1186
+ case "move":
1187
+ n += "M".concat(o[0], " ").concat(o[1], " ");
1188
+ break;
1189
+ case "bcurveTo":
1190
+ n += "C".concat(o[0], " ").concat(o[1], ", ").concat(o[2], " ").concat(o[3], ", ").concat(o[4], " ").concat(o[5], " ");
1191
+ break;
1192
+ case "lineTo": n += "L".concat(o[0], " ").concat(o[1], " ");
1193
+ }
1194
+ }
1195
+ return n.trim();
1196
+ }, t.prototype.toPaths = function(t) {
1197
+ for (var e = t.sets || [], n = t.options || this.defaultOptions, r = [], a = 0, s = e; a < s.length; a++) {
1198
+ var o = s[a], i = null;
1199
+ switch (o.type) {
1200
+ case "path":
1201
+ i = {
1202
+ d: this.opsToPath(o),
1203
+ stroke: n.stroke,
1204
+ strokeWidth: n.strokeWidth,
1205
+ fill: at
1206
+ };
1207
+ break;
1208
+ case "fillPath":
1209
+ i = {
1210
+ d: this.opsToPath(o),
1211
+ stroke: at,
1212
+ strokeWidth: 0,
1213
+ fill: n.fill || at
1214
+ };
1215
+ break;
1216
+ case "fillSketch": i = this.fillSketch(o, n);
1217
+ }
1218
+ i && r.push(i);
1219
+ }
1220
+ return r;
1221
+ }, t.prototype.fillSketch = function(t, e) {
1222
+ var n = e.fillWeight;
1223
+ return n < 0 && (n = e.strokeWidth / 2), {
1224
+ d: this.opsToPath(t),
1225
+ stroke: e.fill || at,
1226
+ strokeWidth: n,
1227
+ fill: at
1228
+ };
1229
+ }, t.prototype._mergedShape = function(t) {
1230
+ return t.filter((function(t, e) {
1231
+ return 0 === e || "move" !== t.op;
1232
+ }));
1233
+ }, t;
1234
+ }();
1235
+ var ot = function() {
1236
+ function t(t, e) {
1237
+ this.canvas = t, this.ctx = this.canvas.getContext("2d"), this.gen = new st(e);
1238
+ }
1239
+ return t.prototype.draw = function(t) {
1240
+ for (var e = t.sets || [], n = t.options || this.getDefaultOptions(), r = this.ctx, a = t.options.fixedDecimalPlaceDigits, s = 0, o = e; s < o.length; s++) {
1241
+ var i = o[s];
1242
+ switch (i.type) {
1243
+ case "path":
1244
+ r.save(), r.strokeStyle = "none" === n.stroke ? "transparent" : n.stroke, r.lineWidth = n.strokeWidth, n.strokeLineDash && r.setLineDash(n.strokeLineDash), n.strokeLineDashOffset && (r.lineDashOffset = n.strokeLineDashOffset), this._drawToContext(r, i, a), r.restore();
1245
+ break;
1246
+ case "fillPath":
1247
+ r.save(), r.fillStyle = n.fill || "";
1248
+ var h = "curve" === t.shape || "polygon" === t.shape || "path" === t.shape ? "evenodd" : "nonzero";
1249
+ this._drawToContext(r, i, a, h), r.restore();
1250
+ break;
1251
+ case "fillSketch": this.fillSketch(r, i, n);
1252
+ }
1253
+ }
1254
+ }, t.prototype.fillSketch = function(t, e, n) {
1255
+ var r = n.fillWeight;
1256
+ r < 0 && (r = n.strokeWidth / 2), t.save(), n.fillLineDash && t.setLineDash(n.fillLineDash), n.fillLineDashOffset && (t.lineDashOffset = n.fillLineDashOffset), t.strokeStyle = n.fill || "", t.lineWidth = r, this._drawToContext(t, e, n.fixedDecimalPlaceDigits), t.restore();
1257
+ }, t.prototype._drawToContext = function(t, e, n, r) {
1258
+ void 0 === r && (r = "nonzero"), t.beginPath();
1259
+ for (var a = 0, s = e.ops; a < s.length; a++) {
1260
+ var o = s[a], i = "number" == typeof n && n >= 0 ? o.data.map((function(t) {
1261
+ return +t.toFixed(n);
1262
+ })) : o.data;
1263
+ switch (o.op) {
1264
+ case "move":
1265
+ t.moveTo(i[0], i[1]);
1266
+ break;
1267
+ case "bcurveTo":
1268
+ t.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]);
1269
+ break;
1270
+ case "lineTo": t.lineTo(i[0], i[1]);
1271
+ }
1272
+ }
1273
+ "fillPath" === e.type ? t.fill(r) : t.stroke();
1274
+ }, Object.defineProperty(t.prototype, "generator", {
1275
+ get: function() {
1276
+ return this.gen;
1277
+ },
1278
+ enumerable: !1,
1279
+ configurable: !0
1280
+ }), t.prototype.getDefaultOptions = function() {
1281
+ return this.gen.defaultOptions;
1282
+ }, t.prototype.line = function(t, e, n, r, a) {
1283
+ var s = this.gen.line(t, e, n, r, a);
1284
+ return this.draw(s), s;
1285
+ }, t.prototype.rectangle = function(t, e, n, r, a) {
1286
+ var s = this.gen.rectangle(t, e, n, r, a);
1287
+ return this.draw(s), s;
1288
+ }, t.prototype.ellipse = function(t, e, n, r, a) {
1289
+ var s = this.gen.ellipse(t, e, n, r, a);
1290
+ return this.draw(s), s;
1291
+ }, t.prototype.circle = function(t, e, n, r) {
1292
+ var a = this.gen.circle(t, e, n, r);
1293
+ return this.draw(a), a;
1294
+ }, t.prototype.linearPath = function(t, e) {
1295
+ var n = this.gen.linearPath(t, e);
1296
+ return this.draw(n), n;
1297
+ }, t.prototype.polygon = function(t, e) {
1298
+ var n = this.gen.polygon(t, e);
1299
+ return this.draw(n), n;
1300
+ }, t.prototype.arc = function(t, e, n, r, a, s, o, i) {
1301
+ void 0 === o && (o = !1);
1302
+ var h = this.gen.arc(t, e, n, r, a, s, o, i);
1303
+ return this.draw(h), h;
1304
+ }, t.prototype.curve = function(t, e) {
1305
+ var n = this.gen.curve(t, e);
1306
+ return this.draw(n), n;
1307
+ }, t.prototype.path = function(t, e) {
1308
+ var n = this.gen.path(t, e);
1309
+ return this.draw(n), n;
1310
+ }, t;
1311
+ }();
1312
+ var it = "http://www.w3.org/2000/svg";
1313
+ var ht = function() {
1314
+ function t(t, e) {
1315
+ this.svg = t, this.gen = new st(e);
1316
+ }
1317
+ return t.prototype.draw = function(t) {
1318
+ for (var e = t.sets || [], n = t.options || this.getDefaultOptions(), r = this.svg.ownerDocument || window.document, a = r.createElementNS(it, "g"), s = t.options.fixedDecimalPlaceDigits, o = 0, i = e; o < i.length; o++) {
1319
+ var h = i[o], u = null;
1320
+ switch (h.type) {
1321
+ case "path":
1322
+ (u = r.createElementNS(it, "path")).setAttribute("d", this.opsToPath(h, s)), u.setAttribute("stroke", n.stroke), u.setAttribute("stroke-width", n.strokeWidth + ""), u.setAttribute("fill", "none"), n.strokeLineDash && u.setAttribute("stroke-dasharray", n.strokeLineDash.join(" ").trim()), n.strokeLineDashOffset && u.setAttribute("stroke-dashoffset", "".concat(n.strokeLineDashOffset));
1323
+ break;
1324
+ case "fillPath":
1325
+ (u = r.createElementNS(it, "path")).setAttribute("d", this.opsToPath(h, s)), u.setAttribute("stroke", "none"), u.setAttribute("stroke-width", "0"), u.setAttribute("fill", n.fill || ""), "curve" !== t.shape && "polygon" !== t.shape || u.setAttribute("fill-rule", "evenodd");
1326
+ break;
1327
+ case "fillSketch": u = this.fillSketch(r, h, n);
1328
+ }
1329
+ u && a.appendChild(u);
1330
+ }
1331
+ return a;
1332
+ }, t.prototype.fillSketch = function(t, e, n) {
1333
+ var r = n.fillWeight;
1334
+ r < 0 && (r = n.strokeWidth / 2);
1335
+ var a = t.createElementNS(it, "path");
1336
+ return a.setAttribute("d", this.opsToPath(e, n.fixedDecimalPlaceDigits)), a.setAttribute("stroke", n.fill || ""), a.setAttribute("stroke-width", r + ""), a.setAttribute("fill", "none"), n.fillLineDash && a.setAttribute("stroke-dasharray", n.fillLineDash.join(" ").trim()), n.fillLineDashOffset && a.setAttribute("stroke-dashoffset", "".concat(n.fillLineDashOffset)), a;
1337
+ }, Object.defineProperty(t.prototype, "generator", {
1338
+ get: function() {
1339
+ return this.gen;
1340
+ },
1341
+ enumerable: !1,
1342
+ configurable: !0
1343
+ }), t.prototype.getDefaultOptions = function() {
1344
+ return this.gen.defaultOptions;
1345
+ }, t.prototype.opsToPath = function(t, e) {
1346
+ return this.gen.opsToPath(t, e);
1347
+ }, t.prototype.line = function(t, e, n, r, a) {
1348
+ var s = this.gen.line(t, e, n, r, a);
1349
+ return this.draw(s);
1350
+ }, t.prototype.rectangle = function(t, e, n, r, a) {
1351
+ var s = this.gen.rectangle(t, e, n, r, a);
1352
+ return this.draw(s);
1353
+ }, t.prototype.ellipse = function(t, e, n, r, a) {
1354
+ var s = this.gen.ellipse(t, e, n, r, a);
1355
+ return this.draw(s);
1356
+ }, t.prototype.circle = function(t, e, n, r) {
1357
+ var a = this.gen.circle(t, e, n, r);
1358
+ return this.draw(a);
1359
+ }, t.prototype.linearPath = function(t, e) {
1360
+ var n = this.gen.linearPath(t, e);
1361
+ return this.draw(n);
1362
+ }, t.prototype.polygon = function(t, e) {
1363
+ var n = this.gen.polygon(t, e);
1364
+ return this.draw(n);
1365
+ }, t.prototype.arc = function(t, e, n, r, a, s, o, i) {
1366
+ void 0 === o && (o = !1);
1367
+ var h = this.gen.arc(t, e, n, r, a, s, o, i);
1368
+ return this.draw(h);
1369
+ }, t.prototype.curve = function(t, e) {
1370
+ var n = this.gen.curve(t, e);
1371
+ return this.draw(n);
1372
+ }, t.prototype.path = function(t, e) {
1373
+ var n = this.gen.path(t, e);
1374
+ return this.draw(n);
1375
+ }, t;
1376
+ }();
1377
+ var ut = {
1378
+ canvas: function(t, e) {
1379
+ return new ot(t, e);
1380
+ },
1381
+ svg: function(t, e) {
1382
+ return new ht(t, e);
1383
+ },
1384
+ generator: function(t) {
1385
+ return new st(t);
1386
+ },
1387
+ newSeed: function() {
1388
+ return st.newSeed();
1389
+ }
1390
+ };
1391
+ module.exports = ut;
1392
+ }));
1393
+
1394
+ //#endregion
1395
+ export { require_rough_cjs as t };