integration-modules 0.1.15 → 0.1.17

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 (28) hide show
  1. package/dist/chunks/{EmojiBoardWidget-qFIIWsdw.js → EmojiBoardWidget-BT3AAibK.js} +188 -192
  2. package/dist/chunks/{EmojiBoardWidget-qFIIWsdw.js.map → EmojiBoardWidget-BT3AAibK.js.map} +1 -1
  3. package/dist/chunks/EmojiBoardWidget-CzGz4-vT.js +2 -0
  4. package/dist/chunks/{EmojiBoardWidget-uWxNQwpF.js.map → EmojiBoardWidget-CzGz4-vT.js.map} +1 -1
  5. package/dist/chunks/{ShapeBoardWidget-ChVcXBBP.js → ShapeBoardWidget-BmgYD5zN.js} +570 -561
  6. package/dist/chunks/ShapeBoardWidget-BmgYD5zN.js.map +1 -0
  7. package/dist/chunks/ShapeBoardWidget-quPjhnR6.js +2 -0
  8. package/dist/chunks/ShapeBoardWidget-quPjhnR6.js.map +1 -0
  9. package/dist/chunks/{constants-pVjh1MjZ.js → useStickersStore-BUOBakV7.js} +14 -13
  10. package/dist/chunks/useStickersStore-BUOBakV7.js.map +1 -0
  11. package/dist/chunks/useStickersStore-CZRuiluy.js +23 -0
  12. package/dist/chunks/useStickersStore-CZRuiluy.js.map +1 -0
  13. package/dist/emoji/index.cjs +1 -1
  14. package/dist/emoji/index.js +2 -2
  15. package/dist/index.cjs +7 -7
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.mjs +26 -24
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/shape/index.cjs +1 -1
  20. package/dist/shape/index.js +1 -1
  21. package/package.json +1 -1
  22. package/dist/chunks/EmojiBoardWidget-uWxNQwpF.js +0 -2
  23. package/dist/chunks/ShapeBoardWidget-CYvTmNUV.js +0 -2
  24. package/dist/chunks/ShapeBoardWidget-CYvTmNUV.js.map +0 -1
  25. package/dist/chunks/ShapeBoardWidget-ChVcXBBP.js.map +0 -1
  26. package/dist/chunks/constants-D-rHISmr.js +0 -23
  27. package/dist/chunks/constants-D-rHISmr.js.map +0 -1
  28. package/dist/chunks/constants-pVjh1MjZ.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { j as s, u as z, D as kt } from "./constants-pVjh1MjZ.js";
2
- import _t, { useRef as F, useState as L, useEffect as T, useMemo as bt } from "react";
3
- import { useReactFlow as jt, NodeResizer as Et, Handle as nt, Position as rt } from "@xyflow/react";
4
- const St = [
1
+ import { j as s, b as vt, u as z } from "./useStickersStore-BUOBakV7.js";
2
+ import kt, { useState as I, useRef as F, useEffect as T, useMemo as _t } from "react";
3
+ import { useReactFlow as bt, NodeResizer as jt, Handle as nt, Position as rt } from "@xyflow/react";
4
+ const Et = [
5
5
  { id: "line", name: "Линия", defaultSize: { width: 80, height: 20 } },
6
6
  { id: "arrow", name: "Стрелка", defaultSize: { width: 180, height: 60 } },
7
7
  { id: "dblarrow", name: "Двойная стрелка", defaultSize: { width: 200, height: 60 } },
@@ -19,60 +19,150 @@ const St = [
19
19
  { id: "pyramid", name: "Пирамида", defaultSize: { width: 160, height: 160 } },
20
20
  { id: "circleArrow", name: "Круг со стрелкой", defaultSize: { width: 140, height: 140 } },
21
21
  { id: "table3x3LeftMerge", name: "Таблица 3×3", defaultSize: { width: 180, height: 180 } }
22
- ];
23
- async function B(t) {
22
+ ], St = {
23
+ square: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
24
+ circle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }) }),
25
+ triangle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,34 6,34", stroke: "black", fill: "none", strokeWidth: "2" }) }),
26
+ star: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx(
27
+ "polygon",
28
+ {
29
+ points: "20,4 25,16 38,16 27,24 32,36 20,28 8,36 13,24 2,16 15,16",
30
+ stroke: "black",
31
+ fill: "none",
32
+ strokeWidth: "2"
33
+ }
34
+ ) }),
35
+ stick: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "16", y: "4", width: "8", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
36
+ line: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "36", y2: "20", stroke: "black", strokeWidth: "2" }) }),
37
+ arrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
38
+ /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "30", y2: "20", stroke: "black", strokeWidth: "2" }),
39
+ /* @__PURE__ */ s.jsx("polygon", { points: "30,14 38,20 30,26", fill: "black" })
40
+ ] }),
41
+ dblarrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
42
+ /* @__PURE__ */ s.jsx("polygon", { points: "4,20 12,14 12,26", fill: "black" }),
43
+ /* @__PURE__ */ s.jsx("line", { x1: "12", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
44
+ /* @__PURE__ */ s.jsx("polygon", { points: "28,14 36,20 28,26", fill: "black" })
45
+ ] }),
46
+ parallelogram: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "8,8 34,8 26,32 0,32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
47
+ roundedRect: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "10", width: "28", height: "20", rx: "4", ry: "4", stroke: "black", fill: "none", strokeWidth: "2" }) }),
48
+ capsule: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "14", width: "28", height: "12", rx: "6", ry: "6", stroke: "black", fill: "none", strokeWidth: "2" }) }),
49
+ pentagon: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,15 28,32 12,32 6,15", stroke: "black", fill: "none", strokeWidth: "2" }) }),
50
+ chevron: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 100 100", children: /* @__PURE__ */ s.jsx(
51
+ "polyline",
52
+ {
53
+ points: "0,0 50,100 100,0",
54
+ fill: "none",
55
+ stroke: "black",
56
+ strokeWidth: "5"
57
+ }
58
+ ) }),
59
+ table3x3: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
60
+ /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
61
+ /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
62
+ /* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
63
+ /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "14", x2: "36", y2: "14", stroke: "black", strokeWidth: "2" }),
64
+ /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "26", x2: "36", y2: "26", stroke: "black", strokeWidth: "2" })
65
+ ] }),
66
+ pyramid: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
67
+ /* @__PURE__ */ s.jsx("polygon", { points: "20,4 36,36 4,36", stroke: "black", fill: "none", strokeWidth: "2" }),
68
+ /* @__PURE__ */ s.jsx("line", { x1: "15", y1: "12", x2: "25", y2: "12", stroke: "black", strokeWidth: "2" }),
69
+ /* @__PURE__ */ s.jsx("line", { x1: "11", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
70
+ /* @__PURE__ */ s.jsx("line", { x1: "7", y1: "28", x2: "32", y2: "28", stroke: "black", strokeWidth: "2" })
71
+ ] }),
72
+ circleArrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
73
+ /* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }),
74
+ /* @__PURE__ */ s.jsx("line", { x1: "20", y1: "6", x2: "20", y2: "0", stroke: "black", strokeWidth: "2" }),
75
+ /* @__PURE__ */ s.jsx("polygon", { points: "18,2 22,2 20,0", fill: "black" })
76
+ ] }),
77
+ table3x3LeftMerge: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
78
+ /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
79
+ /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
80
+ /* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
81
+ /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "16", x2: "36", y2: "16", stroke: "black", strokeWidth: "2" }),
82
+ /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "28", x2: "36", y2: "28", stroke: "black", strokeWidth: "2" })
83
+ ] })
84
+ }, Wt = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", At = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", Ct = () => {
85
+ const [t, e] = I(!1), n = F(null), r = (o) => {
86
+ o.stopPropagation(), e((a) => !a);
87
+ };
88
+ T(() => {
89
+ if (!t) return;
90
+ const o = (a) => {
91
+ n.current && !n.current.contains(a.target) && e(!1);
92
+ };
93
+ return window.addEventListener("pointerdown", o), () => window.removeEventListener("pointerdown", o);
94
+ }, [t]);
95
+ const i = (o) => (a) => {
96
+ a.stopPropagation(), a.dataTransfer.setData(vt, JSON.stringify({ shapeId: o.id })), a.dataTransfer.effectAllowed = "copy";
97
+ };
98
+ return /* @__PURE__ */ s.jsxs("div", { className: "left-toolbar-container dragHandle__custom", ref: n, onClick: (o) => o.stopPropagation(), children: [
99
+ /* @__PURE__ */ s.jsx("div", { className: `toolbar-card ${t ? "toolbar-card--open" : ""}`, children: /* @__PURE__ */ s.jsx("button", { onClick: r, className: `toolbar-btn toolbar-btn--icon toolbar-btn--shape ${t ? "toolbar-btn--active" : ""}`, children: /* @__PURE__ */ s.jsx("div", { className: `toolbar-shape-plate ${t ? "toolbar-shape-plate--active" : ""}`, children: /* @__PURE__ */ s.jsx("img", { src: t ? At : Wt, alt: "Фигуры", draggable: !1 }) }) }) }),
100
+ t && /* @__PURE__ */ s.jsx("div", { className: "palette-wrapper", onClick: (o) => o.stopPropagation(), children: /* @__PURE__ */ s.jsx("div", { className: "shape-panel", children: /* @__PURE__ */ s.jsx("div", { className: "shape-grid", children: Et.map((o) => /* @__PURE__ */ s.jsx(
101
+ "button",
102
+ {
103
+ className: "shape-item",
104
+ draggable: !0,
105
+ onDragStart: i(o),
106
+ title: o.name,
107
+ children: St[o.id]
108
+ },
109
+ o.id
110
+ )) }) }) })
111
+ ] });
112
+ };
113
+ async function C(t) {
24
114
  return await t.text() || `HTTP ${t.status}`;
25
115
  }
26
- const G = {
116
+ const J = {
27
117
  async getAll() {
28
118
  const t = await fetch("/api/v1/shapes/get-all");
29
119
  if (!t.ok)
30
- throw new Error(await B(t));
120
+ throw new Error(await C(t));
31
121
  const e = await t.json();
32
122
  return Array.isArray(e) ? e : [];
33
123
  },
34
124
  async getById(t) {
35
125
  const e = await fetch(`/api/v1/shapes/${t}`);
36
126
  if (!e.ok)
37
- throw new Error(await B(e));
127
+ throw new Error(await C(e));
38
128
  return await e.json();
39
129
  },
40
- async addToBoard(t, e, n, i) {
41
- const r = await fetch("/api/v1/shapes/board", {
130
+ async addToBoard(t, e, n, r) {
131
+ const i = await fetch("/api/v1/shapes/board", {
42
132
  method: "POST",
43
133
  headers: { "Content-Type": "application/json" },
44
- body: JSON.stringify({ shapeId: t, width: e, height: n, rotation: i })
134
+ body: JSON.stringify({ shapeId: t, width: e, height: n, rotation: r })
45
135
  });
46
- if (!r.ok)
47
- throw new Error(await B(r));
48
- return await r.json();
136
+ if (!i.ok)
137
+ throw new Error(await C(i));
138
+ return await i.json();
49
139
  },
50
140
  async getBoard() {
51
141
  const t = await fetch("/api/v1/shapes/board");
52
142
  if (!t.ok)
53
- throw new Error(await B(t));
143
+ throw new Error(await C(t));
54
144
  const e = await t.json();
55
145
  return Array.isArray(e) ? e : [];
56
146
  },
57
147
  async getBoardById(t) {
58
148
  const e = await fetch(`/api/v1/shapes/board/${t}`);
59
149
  if (!e.ok)
60
- throw new Error(await B(e));
150
+ throw new Error(await C(e));
61
151
  return await e.json();
62
152
  },
63
- async updateBoardTransform(t, e, n, i) {
64
- const r = await fetch(`/api/v1/shapes/board/${t}/transform`, {
153
+ async updateBoardTransform(t, e, n, r) {
154
+ const i = await fetch(`/api/v1/shapes/board/${t}/transform`, {
65
155
  method: "PATCH",
66
156
  headers: { "Content-Type": "application/json" },
67
- body: JSON.stringify({ width: e, height: n, rotation: i })
157
+ body: JSON.stringify({ width: e, height: n, rotation: r })
68
158
  });
69
- if (!r.ok)
70
- throw new Error(await B(r));
71
- return await r.json();
159
+ if (!i.ok)
160
+ throw new Error(await C(i));
161
+ return await i.json();
72
162
  },
73
163
  async delete(t) {
74
164
  const e = await fetch(`/api/v1/shapes/${t}`, { method: "DELETE" });
75
- if (!e.ok) throw new Error(await B(e));
165
+ if (!e.ok) throw new Error(await C(e));
76
166
  return !0;
77
167
  }
78
168
  }, it = {
@@ -158,23 +248,23 @@ const G = {
158
248
  capsule: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", rx: "50", ry: "50", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
159
249
  pentagon: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("polygon", { points: "50,0 100,38 82,100 18,100 0,38", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
160
250
  chevron: ({ stroke: t, sw: e = 2 }) => /* @__PURE__ */ s.jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 100 100", children: /* @__PURE__ */ s.jsx("polyline", { points: "0,0 50,100 100,0", fill: "none", stroke: t || "#000", strokeWidth: e, vectorEffect: "non-scaling-stroke" }) }),
161
- table3x3: ({ fill: t, stroke: e, sw: n = 2, innerSw: i = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
251
+ table3x3: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
162
252
  /* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
163
- /* @__PURE__ */ s.jsx("line", { x1: "0", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }),
164
- /* @__PURE__ */ s.jsx("line", { x1: "0", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }),
165
- /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }),
166
- /* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" })
253
+ /* @__PURE__ */ s.jsx("line", { x1: "0", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
254
+ /* @__PURE__ */ s.jsx("line", { x1: "0", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
255
+ /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
256
+ /* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" })
167
257
  ] }),
168
- table3x3LeftMerge: ({ fill: t, stroke: e, sw: n = 2, innerSw: i = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
258
+ table3x3LeftMerge: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
169
259
  /* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
170
- /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }),
171
- /* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }),
172
- /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }),
173
- /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" })
260
+ /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
261
+ /* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
262
+ /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
263
+ /* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" })
174
264
  ] }),
175
- pyramid: ({ fill: t, stroke: e, sw: n = 2, innerSw: i = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
265
+ pyramid: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
176
266
  /* @__PURE__ */ s.jsx("polygon", { points: "50,0 100,100 0,100", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
177
- [0.2, 0.4, 0.6, 0.8].map((r, o) => /* @__PURE__ */ s.jsx("line", { x1: 50 - 50 * r, y1: r * 100, x2: 50 + 50 * r, y2: r * 100, stroke: e || "#000", strokeWidth: i, vectorEffect: "non-scaling-stroke" }, o))
267
+ [0.2, 0.4, 0.6, 0.8].map((i, o) => /* @__PURE__ */ s.jsx("line", { x1: 50 - 50 * i, y1: i * 100, x2: 50 + 50 * i, y2: i * 100, stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }, o))
178
268
  ] }),
179
269
  circleArrow: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsxs("svg", { width: "100%", height: "100%", viewBox: "0 -30 100 130", preserveAspectRatio: "xMidYMid meet", children: [
180
270
  /* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx(
@@ -217,10 +307,10 @@ const G = {
217
307
  )
218
308
  ] })
219
309
  };
220
- var Q = "http://www.w3.org/1999/xhtml";
310
+ var Z = "http://www.w3.org/1999/xhtml";
221
311
  const st = {
222
312
  svg: "http://www.w3.org/2000/svg",
223
- xhtml: Q,
313
+ xhtml: Z,
224
314
  xlink: "http://www.w3.org/1999/xlink",
225
315
  xml: "http://www.w3.org/XML/1998/namespace",
226
316
  xmlns: "http://www.w3.org/2000/xmlns/"
@@ -229,59 +319,59 @@ function lt(t) {
229
319
  var e = t += "", n = e.indexOf(":");
230
320
  return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), st.hasOwnProperty(e) ? { space: st[e], local: t } : t;
231
321
  }
232
- function Wt(t) {
322
+ function Nt(t) {
233
323
  return function() {
234
324
  var e = this.ownerDocument, n = this.namespaceURI;
235
- return n === Q && e.documentElement.namespaceURI === Q ? e.createElement(t) : e.createElementNS(n, t);
325
+ return n === Z && e.documentElement.namespaceURI === Z ? e.createElement(t) : e.createElementNS(n, t);
236
326
  };
237
327
  }
238
- function At(t) {
328
+ function Bt(t) {
239
329
  return function() {
240
330
  return this.ownerDocument.createElementNS(t.space, t.local);
241
331
  };
242
332
  }
243
333
  function ct(t) {
244
334
  var e = lt(t);
245
- return (e.local ? At : Wt)(e);
335
+ return (e.local ? Bt : Nt)(e);
246
336
  }
247
- function Ct() {
337
+ function Rt() {
248
338
  }
249
339
  function ht(t) {
250
- return t == null ? Ct : function() {
340
+ return t == null ? Rt : function() {
251
341
  return this.querySelector(t);
252
342
  };
253
343
  }
254
- function Nt(t) {
344
+ function zt(t) {
255
345
  typeof t != "function" && (t = ht(t));
256
- for (var e = this._groups, n = e.length, i = new Array(n), r = 0; r < n; ++r)
257
- for (var o = e[r], a = o.length, l = i[r] = new Array(a), h, u, d = 0; d < a; ++d)
346
+ for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
347
+ for (var o = e[i], a = o.length, l = r[i] = new Array(a), h, u, d = 0; d < a; ++d)
258
348
  (h = o[d]) && (u = t.call(h, h.__data__, d, o)) && ("__data__" in h && (u.__data__ = h.__data__), l[d] = u);
259
- return new E(i, this._parents);
349
+ return new E(r, this._parents);
260
350
  }
261
- function Bt(t) {
351
+ function Tt(t) {
262
352
  return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
263
353
  }
264
- function Rt() {
354
+ function Mt() {
265
355
  return [];
266
356
  }
267
- function zt(t) {
268
- return t == null ? Rt : function() {
357
+ function Pt(t) {
358
+ return t == null ? Mt : function() {
269
359
  return this.querySelectorAll(t);
270
360
  };
271
361
  }
272
- function Tt(t) {
362
+ function It(t) {
273
363
  return function() {
274
- return Bt(t.apply(this, arguments));
364
+ return Tt(t.apply(this, arguments));
275
365
  };
276
366
  }
277
- function Mt(t) {
278
- typeof t == "function" ? t = Tt(t) : t = zt(t);
279
- for (var e = this._groups, n = e.length, i = [], r = [], o = 0; o < n; ++o)
367
+ function Ft(t) {
368
+ typeof t == "function" ? t = It(t) : t = Pt(t);
369
+ for (var e = this._groups, n = e.length, r = [], i = [], o = 0; o < n; ++o)
280
370
  for (var a = e[o], l = a.length, h, u = 0; u < l; ++u)
281
- (h = a[u]) && (i.push(t.call(h, h.__data__, u, a)), r.push(h));
282
- return new E(i, r);
371
+ (h = a[u]) && (r.push(t.call(h, h.__data__, u, a)), i.push(h));
372
+ return new E(r, i);
283
373
  }
284
- function Pt(t) {
374
+ function Ht(t) {
285
375
  return function() {
286
376
  return this.matches(t);
287
377
  };
@@ -291,48 +381,48 @@ function ut(t) {
291
381
  return e.matches(t);
292
382
  };
293
383
  }
294
- var It = Array.prototype.find;
295
- function Ft(t) {
384
+ var Lt = Array.prototype.find;
385
+ function Dt(t) {
296
386
  return function() {
297
- return It.call(this.children, t);
387
+ return Lt.call(this.children, t);
298
388
  };
299
389
  }
300
- function Lt() {
390
+ function Vt() {
301
391
  return this.firstElementChild;
302
392
  }
303
- function Ht(t) {
304
- return this.select(t == null ? Lt : Ft(typeof t == "function" ? t : ut(t)));
393
+ function Ot(t) {
394
+ return this.select(t == null ? Vt : Dt(typeof t == "function" ? t : ut(t)));
305
395
  }
306
- var Dt = Array.prototype.filter;
307
- function Ot() {
396
+ var qt = Array.prototype.filter;
397
+ function Xt() {
308
398
  return Array.from(this.children);
309
399
  }
310
- function Vt(t) {
400
+ function $t(t) {
311
401
  return function() {
312
- return Dt.call(this.children, t);
402
+ return qt.call(this.children, t);
313
403
  };
314
404
  }
315
- function qt(t) {
316
- return this.selectAll(t == null ? Ot : Vt(typeof t == "function" ? t : ut(t)));
405
+ function Ut(t) {
406
+ return this.selectAll(t == null ? Xt : $t(typeof t == "function" ? t : ut(t)));
317
407
  }
318
- function Xt(t) {
319
- typeof t != "function" && (t = Pt(t));
320
- for (var e = this._groups, n = e.length, i = new Array(n), r = 0; r < n; ++r)
321
- for (var o = e[r], a = o.length, l = i[r] = [], h, u = 0; u < a; ++u)
408
+ function Yt(t) {
409
+ typeof t != "function" && (t = Ht(t));
410
+ for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
411
+ for (var o = e[i], a = o.length, l = r[i] = [], h, u = 0; u < a; ++u)
322
412
  (h = o[u]) && t.call(h, h.__data__, u, o) && l.push(h);
323
- return new E(i, this._parents);
413
+ return new E(r, this._parents);
324
414
  }
325
415
  function ft(t) {
326
416
  return new Array(t.length);
327
417
  }
328
- function $t() {
418
+ function Kt() {
329
419
  return new E(this._enter || this._groups.map(ft), this._parents);
330
420
  }
331
- function Y(t, e) {
421
+ function U(t, e) {
332
422
  this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
333
423
  }
334
- Y.prototype = {
335
- constructor: Y,
424
+ U.prototype = {
425
+ constructor: U,
336
426
  appendChild: function(t) {
337
427
  return this._parent.insertBefore(t, this._next);
338
428
  },
@@ -346,200 +436,200 @@ Y.prototype = {
346
436
  return this._parent.querySelectorAll(t);
347
437
  }
348
438
  };
349
- function Ut(t) {
439
+ function Jt(t) {
350
440
  return function() {
351
441
  return t;
352
442
  };
353
443
  }
354
- function Yt(t, e, n, i, r, o) {
444
+ function Zt(t, e, n, r, i, o) {
355
445
  for (var a = 0, l, h = e.length, u = o.length; a < u; ++a)
356
- (l = e[a]) ? (l.__data__ = o[a], i[a] = l) : n[a] = new Y(t, o[a]);
446
+ (l = e[a]) ? (l.__data__ = o[a], r[a] = l) : n[a] = new U(t, o[a]);
357
447
  for (; a < h; ++a)
358
- (l = e[a]) && (r[a] = l);
448
+ (l = e[a]) && (i[a] = l);
359
449
  }
360
- function Kt(t, e, n, i, r, o, a) {
361
- var l, h, u = /* @__PURE__ */ new Map(), d = e.length, m = o.length, f = new Array(d), k;
450
+ function Gt(t, e, n, r, i, o, a) {
451
+ var l, h, u = /* @__PURE__ */ new Map(), d = e.length, x = o.length, g = new Array(d), m;
362
452
  for (l = 0; l < d; ++l)
363
- (h = e[l]) && (f[l] = k = a.call(h, h.__data__, l, e) + "", u.has(k) ? r[l] = h : u.set(k, h));
364
- for (l = 0; l < m; ++l)
365
- k = a.call(t, o[l], l, o) + "", (h = u.get(k)) ? (i[l] = h, h.__data__ = o[l], u.delete(k)) : n[l] = new Y(t, o[l]);
453
+ (h = e[l]) && (g[l] = m = a.call(h, h.__data__, l, e) + "", u.has(m) ? i[l] = h : u.set(m, h));
454
+ for (l = 0; l < x; ++l)
455
+ m = a.call(t, o[l], l, o) + "", (h = u.get(m)) ? (r[l] = h, h.__data__ = o[l], u.delete(m)) : n[l] = new U(t, o[l]);
366
456
  for (l = 0; l < d; ++l)
367
- (h = e[l]) && u.get(f[l]) === h && (r[l] = h);
457
+ (h = e[l]) && u.get(g[l]) === h && (i[l] = h);
368
458
  }
369
- function Jt(t) {
459
+ function Qt(t) {
370
460
  return t.__data__;
371
461
  }
372
- function Zt(t, e) {
373
- if (!arguments.length) return Array.from(this, Jt);
374
- var n = e ? Kt : Yt, i = this._parents, r = this._groups;
375
- typeof t != "function" && (t = Ut(t));
376
- for (var o = r.length, a = new Array(o), l = new Array(o), h = new Array(o), u = 0; u < o; ++u) {
377
- var d = i[u], m = r[u], f = m.length, k = Gt(t.call(d, d && d.__data__, u, i)), _ = k.length, S = l[u] = new Array(_), W = a[u] = new Array(_), N = h[u] = new Array(f);
378
- n(d, m, S, W, N, k, e);
379
- for (var A = 0, j = 0, c, y; A < _; ++A)
380
- if (c = S[A]) {
381
- for (A >= j && (j = A + 1); !(y = W[j]) && ++j < _; ) ;
382
- c._next = y || null;
462
+ function te(t, e) {
463
+ if (!arguments.length) return Array.from(this, Qt);
464
+ var n = e ? Gt : Zt, r = this._parents, i = this._groups;
465
+ typeof t != "function" && (t = Jt(t));
466
+ for (var o = i.length, a = new Array(o), l = new Array(o), h = new Array(o), u = 0; u < o; ++u) {
467
+ var d = r[u], x = i[u], g = x.length, m = ee(t.call(d, d && d.__data__, u, r)), v = m.length, S = l[u] = new Array(v), W = a[u] = new Array(v), N = h[u] = new Array(g);
468
+ n(d, x, S, W, N, m, e);
469
+ for (var j = 0, A = 0, c, f; j < v; ++j)
470
+ if (c = S[j]) {
471
+ for (j >= A && (A = j + 1); !(f = W[A]) && ++A < v; ) ;
472
+ c._next = f || null;
383
473
  }
384
474
  }
385
- return a = new E(a, i), a._enter = l, a._exit = h, a;
475
+ return a = new E(a, r), a._enter = l, a._exit = h, a;
386
476
  }
387
- function Gt(t) {
477
+ function ee(t) {
388
478
  return typeof t == "object" && "length" in t ? t : Array.from(t);
389
479
  }
390
- function Qt() {
480
+ function ne() {
391
481
  return new E(this._exit || this._groups.map(ft), this._parents);
392
482
  }
393
- function te(t, e, n) {
394
- var i = this.enter(), r = this, o = this.exit();
395
- return typeof t == "function" ? (i = t(i), i && (i = i.selection())) : i = i.append(t + ""), e != null && (r = e(r), r && (r = r.selection())), n == null ? o.remove() : n(o), i && r ? i.merge(r).order() : r;
483
+ function re(t, e, n) {
484
+ var r = this.enter(), i = this, o = this.exit();
485
+ return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ? o.remove() : n(o), r && i ? r.merge(i).order() : i;
396
486
  }
397
- function ee(t) {
398
- for (var e = t.selection ? t.selection() : t, n = this._groups, i = e._groups, r = n.length, o = i.length, a = Math.min(r, o), l = new Array(r), h = 0; h < a; ++h)
399
- for (var u = n[h], d = i[h], m = u.length, f = l[h] = new Array(m), k, _ = 0; _ < m; ++_)
400
- (k = u[_] || d[_]) && (f[_] = k);
401
- for (; h < r; ++h)
487
+ function ie(t) {
488
+ for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, o = r.length, a = Math.min(i, o), l = new Array(i), h = 0; h < a; ++h)
489
+ for (var u = n[h], d = r[h], x = u.length, g = l[h] = new Array(x), m, v = 0; v < x; ++v)
490
+ (m = u[v] || d[v]) && (g[v] = m);
491
+ for (; h < i; ++h)
402
492
  l[h] = n[h];
403
493
  return new E(l, this._parents);
404
494
  }
405
- function ne() {
495
+ function se() {
406
496
  for (var t = this._groups, e = -1, n = t.length; ++e < n; )
407
- for (var i = t[e], r = i.length - 1, o = i[r], a; --r >= 0; )
408
- (a = i[r]) && (o && a.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(a, o), o = a);
497
+ for (var r = t[e], i = r.length - 1, o = r[i], a; --i >= 0; )
498
+ (a = r[i]) && (o && a.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(a, o), o = a);
409
499
  return this;
410
500
  }
411
- function re(t) {
412
- t || (t = ie);
413
- function e(m, f) {
414
- return m && f ? t(m.__data__, f.__data__) : !m - !f;
501
+ function oe(t) {
502
+ t || (t = ae);
503
+ function e(x, g) {
504
+ return x && g ? t(x.__data__, g.__data__) : !x - !g;
415
505
  }
416
- for (var n = this._groups, i = n.length, r = new Array(i), o = 0; o < i; ++o) {
417
- for (var a = n[o], l = a.length, h = r[o] = new Array(l), u, d = 0; d < l; ++d)
506
+ for (var n = this._groups, r = n.length, i = new Array(r), o = 0; o < r; ++o) {
507
+ for (var a = n[o], l = a.length, h = i[o] = new Array(l), u, d = 0; d < l; ++d)
418
508
  (u = a[d]) && (h[d] = u);
419
509
  h.sort(e);
420
510
  }
421
- return new E(r, this._parents).order();
511
+ return new E(i, this._parents).order();
422
512
  }
423
- function ie(t, e) {
513
+ function ae(t, e) {
424
514
  return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
425
515
  }
426
- function se() {
516
+ function le() {
427
517
  var t = arguments[0];
428
518
  return arguments[0] = this, t.apply(null, arguments), this;
429
519
  }
430
- function oe() {
520
+ function ce() {
431
521
  return Array.from(this);
432
522
  }
433
- function ae() {
523
+ function he() {
434
524
  for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
435
- for (var i = t[e], r = 0, o = i.length; r < o; ++r) {
436
- var a = i[r];
525
+ for (var r = t[e], i = 0, o = r.length; i < o; ++i) {
526
+ var a = r[i];
437
527
  if (a) return a;
438
528
  }
439
529
  return null;
440
530
  }
441
- function le() {
531
+ function ue() {
442
532
  let t = 0;
443
533
  for (const e of this) ++t;
444
534
  return t;
445
535
  }
446
- function ce() {
536
+ function fe() {
447
537
  return !this.node();
448
538
  }
449
- function he(t) {
450
- for (var e = this._groups, n = 0, i = e.length; n < i; ++n)
451
- for (var r = e[n], o = 0, a = r.length, l; o < a; ++o)
452
- (l = r[o]) && t.call(l, l.__data__, o, r);
539
+ function de(t) {
540
+ for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
541
+ for (var i = e[n], o = 0, a = i.length, l; o < a; ++o)
542
+ (l = i[o]) && t.call(l, l.__data__, o, i);
453
543
  return this;
454
544
  }
455
- function ue(t) {
545
+ function ge(t) {
456
546
  return function() {
457
547
  this.removeAttribute(t);
458
548
  };
459
549
  }
460
- function fe(t) {
550
+ function pe(t) {
461
551
  return function() {
462
552
  this.removeAttributeNS(t.space, t.local);
463
553
  };
464
554
  }
465
- function de(t, e) {
555
+ function ye(t, e) {
466
556
  return function() {
467
557
  this.setAttribute(t, e);
468
558
  };
469
559
  }
470
- function ge(t, e) {
560
+ function we(t, e) {
471
561
  return function() {
472
562
  this.setAttributeNS(t.space, t.local, e);
473
563
  };
474
564
  }
475
- function pe(t, e) {
565
+ function xe(t, e) {
476
566
  return function() {
477
567
  var n = e.apply(this, arguments);
478
568
  n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
479
569
  };
480
570
  }
481
- function ye(t, e) {
571
+ function me(t, e) {
482
572
  return function() {
483
573
  var n = e.apply(this, arguments);
484
574
  n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
485
575
  };
486
576
  }
487
- function xe(t, e) {
577
+ function ve(t, e) {
488
578
  var n = lt(t);
489
579
  if (arguments.length < 2) {
490
- var i = this.node();
491
- return n.local ? i.getAttributeNS(n.space, n.local) : i.getAttribute(n);
580
+ var r = this.node();
581
+ return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
492
582
  }
493
- return this.each((e == null ? n.local ? fe : ue : typeof e == "function" ? n.local ? ye : pe : n.local ? ge : de)(n, e));
583
+ return this.each((e == null ? n.local ? pe : ge : typeof e == "function" ? n.local ? me : xe : n.local ? we : ye)(n, e));
494
584
  }
495
585
  function dt(t) {
496
586
  return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
497
587
  }
498
- function we(t) {
588
+ function ke(t) {
499
589
  return function() {
500
590
  this.style.removeProperty(t);
501
591
  };
502
592
  }
503
- function me(t, e, n) {
593
+ function _e(t, e, n) {
504
594
  return function() {
505
595
  this.style.setProperty(t, e, n);
506
596
  };
507
597
  }
508
- function ve(t, e, n) {
598
+ function be(t, e, n) {
509
599
  return function() {
510
- var i = e.apply(this, arguments);
511
- i == null ? this.style.removeProperty(t) : this.style.setProperty(t, i, n);
600
+ var r = e.apply(this, arguments);
601
+ r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
512
602
  };
513
603
  }
514
- function ke(t, e, n) {
515
- return arguments.length > 1 ? this.each((e == null ? we : typeof e == "function" ? ve : me)(t, e, n ?? "")) : _e(this.node(), t);
604
+ function je(t, e, n) {
605
+ return arguments.length > 1 ? this.each((e == null ? ke : typeof e == "function" ? be : _e)(t, e, n ?? "")) : Ee(this.node(), t);
516
606
  }
517
- function _e(t, e) {
607
+ function Ee(t, e) {
518
608
  return t.style.getPropertyValue(e) || dt(t).getComputedStyle(t, null).getPropertyValue(e);
519
609
  }
520
- function be(t) {
610
+ function Se(t) {
521
611
  return function() {
522
612
  delete this[t];
523
613
  };
524
614
  }
525
- function je(t, e) {
615
+ function We(t, e) {
526
616
  return function() {
527
617
  this[t] = e;
528
618
  };
529
619
  }
530
- function Ee(t, e) {
620
+ function Ae(t, e) {
531
621
  return function() {
532
622
  var n = e.apply(this, arguments);
533
623
  n == null ? delete this[t] : this[t] = n;
534
624
  };
535
625
  }
536
- function Se(t, e) {
537
- return arguments.length > 1 ? this.each((e == null ? be : typeof e == "function" ? Ee : je)(t, e)) : this.node()[t];
626
+ function Ce(t, e) {
627
+ return arguments.length > 1 ? this.each((e == null ? Se : typeof e == "function" ? Ae : We)(t, e)) : this.node()[t];
538
628
  }
539
629
  function gt(t) {
540
630
  return t.trim().split(/^|\s+/);
541
631
  }
542
- function et(t) {
632
+ function Q(t) {
543
633
  return t.classList || new pt(t);
544
634
  }
545
635
  function pt(t) {
@@ -559,339 +649,339 @@ pt.prototype = {
559
649
  }
560
650
  };
561
651
  function yt(t, e) {
562
- for (var n = et(t), i = -1, r = e.length; ++i < r; ) n.add(e[i]);
652
+ for (var n = Q(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
563
653
  }
564
- function xt(t, e) {
565
- for (var n = et(t), i = -1, r = e.length; ++i < r; ) n.remove(e[i]);
654
+ function wt(t, e) {
655
+ for (var n = Q(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
566
656
  }
567
- function We(t) {
657
+ function Ne(t) {
568
658
  return function() {
569
659
  yt(this, t);
570
660
  };
571
661
  }
572
- function Ae(t) {
662
+ function Be(t) {
573
663
  return function() {
574
- xt(this, t);
664
+ wt(this, t);
575
665
  };
576
666
  }
577
- function Ce(t, e) {
667
+ function Re(t, e) {
578
668
  return function() {
579
- (e.apply(this, arguments) ? yt : xt)(this, t);
669
+ (e.apply(this, arguments) ? yt : wt)(this, t);
580
670
  };
581
671
  }
582
- function Ne(t, e) {
672
+ function ze(t, e) {
583
673
  var n = gt(t + "");
584
674
  if (arguments.length < 2) {
585
- for (var i = et(this.node()), r = -1, o = n.length; ++r < o; ) if (!i.contains(n[r])) return !1;
675
+ for (var r = Q(this.node()), i = -1, o = n.length; ++i < o; ) if (!r.contains(n[i])) return !1;
586
676
  return !0;
587
677
  }
588
- return this.each((typeof e == "function" ? Ce : e ? We : Ae)(n, e));
678
+ return this.each((typeof e == "function" ? Re : e ? Ne : Be)(n, e));
589
679
  }
590
- function Be() {
680
+ function Te() {
591
681
  this.textContent = "";
592
682
  }
593
- function Re(t) {
683
+ function Me(t) {
594
684
  return function() {
595
685
  this.textContent = t;
596
686
  };
597
687
  }
598
- function ze(t) {
688
+ function Pe(t) {
599
689
  return function() {
600
690
  var e = t.apply(this, arguments);
601
691
  this.textContent = e ?? "";
602
692
  };
603
693
  }
604
- function Te(t) {
605
- return arguments.length ? this.each(t == null ? Be : (typeof t == "function" ? ze : Re)(t)) : this.node().textContent;
694
+ function Ie(t) {
695
+ return arguments.length ? this.each(t == null ? Te : (typeof t == "function" ? Pe : Me)(t)) : this.node().textContent;
606
696
  }
607
- function Me() {
697
+ function Fe() {
608
698
  this.innerHTML = "";
609
699
  }
610
- function Pe(t) {
700
+ function He(t) {
611
701
  return function() {
612
702
  this.innerHTML = t;
613
703
  };
614
704
  }
615
- function Ie(t) {
705
+ function Le(t) {
616
706
  return function() {
617
707
  var e = t.apply(this, arguments);
618
708
  this.innerHTML = e ?? "";
619
709
  };
620
710
  }
621
- function Fe(t) {
622
- return arguments.length ? this.each(t == null ? Me : (typeof t == "function" ? Ie : Pe)(t)) : this.node().innerHTML;
711
+ function De(t) {
712
+ return arguments.length ? this.each(t == null ? Fe : (typeof t == "function" ? Le : He)(t)) : this.node().innerHTML;
623
713
  }
624
- function Le() {
714
+ function Ve() {
625
715
  this.nextSibling && this.parentNode.appendChild(this);
626
716
  }
627
- function He() {
628
- return this.each(Le);
717
+ function Oe() {
718
+ return this.each(Ve);
629
719
  }
630
- function De() {
720
+ function qe() {
631
721
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
632
722
  }
633
- function Oe() {
634
- return this.each(De);
723
+ function Xe() {
724
+ return this.each(qe);
635
725
  }
636
- function Ve(t) {
726
+ function $e(t) {
637
727
  var e = typeof t == "function" ? t : ct(t);
638
728
  return this.select(function() {
639
729
  return this.appendChild(e.apply(this, arguments));
640
730
  });
641
731
  }
642
- function qe() {
732
+ function Ue() {
643
733
  return null;
644
734
  }
645
- function Xe(t, e) {
646
- var n = typeof t == "function" ? t : ct(t), i = e == null ? qe : typeof e == "function" ? e : ht(e);
735
+ function Ye(t, e) {
736
+ var n = typeof t == "function" ? t : ct(t), r = e == null ? Ue : typeof e == "function" ? e : ht(e);
647
737
  return this.select(function() {
648
- return this.insertBefore(n.apply(this, arguments), i.apply(this, arguments) || null);
738
+ return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
649
739
  });
650
740
  }
651
- function $e() {
741
+ function Ke() {
652
742
  var t = this.parentNode;
653
743
  t && t.removeChild(this);
654
744
  }
655
- function Ue() {
656
- return this.each($e);
745
+ function Je() {
746
+ return this.each(Ke);
657
747
  }
658
- function Ye() {
748
+ function Ze() {
659
749
  var t = this.cloneNode(!1), e = this.parentNode;
660
750
  return e ? e.insertBefore(t, this.nextSibling) : t;
661
751
  }
662
- function Ke() {
752
+ function Ge() {
663
753
  var t = this.cloneNode(!0), e = this.parentNode;
664
754
  return e ? e.insertBefore(t, this.nextSibling) : t;
665
755
  }
666
- function Je(t) {
667
- return this.select(t ? Ke : Ye);
756
+ function Qe(t) {
757
+ return this.select(t ? Ge : Ze);
668
758
  }
669
- function Ze(t) {
759
+ function tn(t) {
670
760
  return arguments.length ? this.property("__data__", t) : this.node().__data__;
671
761
  }
672
- function Ge(t) {
762
+ function en(t) {
673
763
  return function(e) {
674
764
  t.call(this, e, this.__data__);
675
765
  };
676
766
  }
677
- function Qe(t) {
767
+ function nn(t) {
678
768
  return t.trim().split(/^|\s+/).map(function(e) {
679
- var n = "", i = e.indexOf(".");
680
- return i >= 0 && (n = e.slice(i + 1), e = e.slice(0, i)), { type: e, name: n };
769
+ var n = "", r = e.indexOf(".");
770
+ return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
681
771
  });
682
772
  }
683
- function tn(t) {
773
+ function rn(t) {
684
774
  return function() {
685
775
  var e = this.__on;
686
776
  if (e) {
687
- for (var n = 0, i = -1, r = e.length, o; n < r; ++n)
688
- o = e[n], (!t.type || o.type === t.type) && o.name === t.name ? this.removeEventListener(o.type, o.listener, o.options) : e[++i] = o;
689
- ++i ? e.length = i : delete this.__on;
777
+ for (var n = 0, r = -1, i = e.length, o; n < i; ++n)
778
+ o = e[n], (!t.type || o.type === t.type) && o.name === t.name ? this.removeEventListener(o.type, o.listener, o.options) : e[++r] = o;
779
+ ++r ? e.length = r : delete this.__on;
690
780
  }
691
781
  };
692
782
  }
693
- function en(t, e, n) {
783
+ function sn(t, e, n) {
694
784
  return function() {
695
- var i = this.__on, r, o = Ge(e);
696
- if (i) {
697
- for (var a = 0, l = i.length; a < l; ++a)
698
- if ((r = i[a]).type === t.type && r.name === t.name) {
699
- this.removeEventListener(r.type, r.listener, r.options), this.addEventListener(r.type, r.listener = o, r.options = n), r.value = e;
785
+ var r = this.__on, i, o = en(e);
786
+ if (r) {
787
+ for (var a = 0, l = r.length; a < l; ++a)
788
+ if ((i = r[a]).type === t.type && i.name === t.name) {
789
+ this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = o, i.options = n), i.value = e;
700
790
  return;
701
791
  }
702
792
  }
703
- this.addEventListener(t.type, o, n), r = { type: t.type, name: t.name, value: e, listener: o, options: n }, i ? i.push(r) : this.__on = [r];
793
+ this.addEventListener(t.type, o, n), i = { type: t.type, name: t.name, value: e, listener: o, options: n }, r ? r.push(i) : this.__on = [i];
704
794
  };
705
795
  }
706
- function nn(t, e, n) {
707
- var i = Qe(t + ""), r, o = i.length, a;
796
+ function on(t, e, n) {
797
+ var r = nn(t + ""), i, o = r.length, a;
708
798
  if (arguments.length < 2) {
709
799
  var l = this.node().__on;
710
800
  if (l) {
711
801
  for (var h = 0, u = l.length, d; h < u; ++h)
712
- for (r = 0, d = l[h]; r < o; ++r)
713
- if ((a = i[r]).type === d.type && a.name === d.name)
802
+ for (i = 0, d = l[h]; i < o; ++i)
803
+ if ((a = r[i]).type === d.type && a.name === d.name)
714
804
  return d.value;
715
805
  }
716
806
  return;
717
807
  }
718
- for (l = e ? en : tn, r = 0; r < o; ++r) this.each(l(i[r], e, n));
808
+ for (l = e ? sn : rn, i = 0; i < o; ++i) this.each(l(r[i], e, n));
719
809
  return this;
720
810
  }
721
- function wt(t, e, n) {
722
- var i = dt(t), r = i.CustomEvent;
723
- typeof r == "function" ? r = new r(e, n) : (r = i.document.createEvent("Event"), n ? (r.initEvent(e, n.bubbles, n.cancelable), r.detail = n.detail) : r.initEvent(e, !1, !1)), t.dispatchEvent(r);
811
+ function xt(t, e, n) {
812
+ var r = dt(t), i = r.CustomEvent;
813
+ typeof i == "function" ? i = new i(e, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(e, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
724
814
  }
725
- function rn(t, e) {
815
+ function an(t, e) {
726
816
  return function() {
727
- return wt(this, t, e);
817
+ return xt(this, t, e);
728
818
  };
729
819
  }
730
- function sn(t, e) {
820
+ function ln(t, e) {
731
821
  return function() {
732
- return wt(this, t, e.apply(this, arguments));
822
+ return xt(this, t, e.apply(this, arguments));
733
823
  };
734
824
  }
735
- function on(t, e) {
736
- return this.each((typeof e == "function" ? sn : rn)(t, e));
825
+ function cn(t, e) {
826
+ return this.each((typeof e == "function" ? ln : an)(t, e));
737
827
  }
738
- function* an() {
828
+ function* hn() {
739
829
  for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
740
- for (var i = t[e], r = 0, o = i.length, a; r < o; ++r)
741
- (a = i[r]) && (yield a);
830
+ for (var r = t[e], i = 0, o = r.length, a; i < o; ++i)
831
+ (a = r[i]) && (yield a);
742
832
  }
743
- var ln = [null];
833
+ var un = [null];
744
834
  function E(t, e) {
745
835
  this._groups = t, this._parents = e;
746
836
  }
747
- function cn() {
837
+ function fn() {
748
838
  return this;
749
839
  }
750
840
  E.prototype = {
751
841
  constructor: E,
752
- select: Nt,
753
- selectAll: Mt,
754
- selectChild: Ht,
755
- selectChildren: qt,
756
- filter: Xt,
757
- data: Zt,
758
- enter: $t,
759
- exit: Qt,
760
- join: te,
761
- merge: ee,
762
- selection: cn,
763
- order: ne,
764
- sort: re,
765
- call: se,
766
- nodes: oe,
767
- node: ae,
768
- size: le,
769
- empty: ce,
770
- each: he,
771
- attr: xe,
772
- style: ke,
773
- property: Se,
774
- classed: Ne,
775
- text: Te,
776
- html: Fe,
777
- raise: He,
778
- lower: Oe,
779
- append: Ve,
780
- insert: Xe,
781
- remove: Ue,
782
- clone: Je,
783
- datum: Ze,
784
- on: nn,
785
- dispatch: on,
786
- [Symbol.iterator]: an
842
+ select: zt,
843
+ selectAll: Ft,
844
+ selectChild: Ot,
845
+ selectChildren: Ut,
846
+ filter: Yt,
847
+ data: te,
848
+ enter: Kt,
849
+ exit: ne,
850
+ join: re,
851
+ merge: ie,
852
+ selection: fn,
853
+ order: se,
854
+ sort: oe,
855
+ call: le,
856
+ nodes: ce,
857
+ node: he,
858
+ size: ue,
859
+ empty: fe,
860
+ each: de,
861
+ attr: ve,
862
+ style: je,
863
+ property: Ce,
864
+ classed: ze,
865
+ text: Ie,
866
+ html: De,
867
+ raise: Oe,
868
+ lower: Xe,
869
+ append: $e,
870
+ insert: Ye,
871
+ remove: Je,
872
+ clone: Qe,
873
+ datum: tn,
874
+ on,
875
+ dispatch: cn,
876
+ [Symbol.iterator]: hn
787
877
  };
788
878
  function H(t) {
789
- return typeof t == "string" ? new E([[document.querySelector(t)]], [document.documentElement]) : new E([[t]], ln);
879
+ return typeof t == "string" ? new E([[document.querySelector(t)]], [document.documentElement]) : new E([[t]], un);
790
880
  }
791
- function hn(t) {
881
+ function dn(t) {
792
882
  let e;
793
883
  for (; e = t.sourceEvent; ) t = e;
794
884
  return t;
795
885
  }
796
886
  function ot(t, e) {
797
- if (t = hn(t), e === void 0 && (e = t.currentTarget), e) {
887
+ if (t = dn(t), e === void 0 && (e = t.currentTarget), e) {
798
888
  var n = e.ownerSVGElement || e;
799
889
  if (n.createSVGPoint) {
800
- var i = n.createSVGPoint();
801
- return i.x = t.clientX, i.y = t.clientY, i = i.matrixTransform(e.getScreenCTM().inverse()), [i.x, i.y];
890
+ var r = n.createSVGPoint();
891
+ return r.x = t.clientX, r.y = t.clientY, r = r.matrixTransform(e.getScreenCTM().inverse()), [r.x, r.y];
802
892
  }
803
893
  if (e.getBoundingClientRect) {
804
- var r = e.getBoundingClientRect();
805
- return [t.clientX - r.left - e.clientLeft, t.clientY - r.top - e.clientTop];
894
+ var i = e.getBoundingClientRect();
895
+ return [t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop];
806
896
  }
807
897
  }
808
898
  return [t.pageX, t.pageY];
809
899
  }
810
- const un = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%200.75V6.75M0.75%206.75H6.75M0.75%206.75C3.07744%204.66141%205.23287%202.29676%208.49532%201.83779C10.4277%201.56593%2012.3961%201.92941%2014.1039%202.87343C15.8117%203.81746%2017.1664%205.29091%2017.9639%207.07177M18.75%2018.75V12.75M18.75%2012.75H12.75M18.75%2012.75C16.4225%2014.8386%2014.2671%2017.2032%2011.0047%2017.6622C9.07229%2017.9341%207.10391%2017.5706%205.3961%2016.6266C3.68829%2015.6825%202.33356%2014.2091%201.53604%2012.4282'%20stroke='%233367d9'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
811
- var fn = { value: () => {
900
+ const gn = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%200.75V6.75M0.75%206.75H6.75M0.75%206.75C3.07744%204.66141%205.23287%202.29676%208.49532%201.83779C10.4277%201.56593%2012.3961%201.92941%2014.1039%202.87343C15.8117%203.81746%2017.1664%205.29091%2017.9639%207.07177M18.75%2018.75V12.75M18.75%2012.75H12.75M18.75%2012.75C16.4225%2014.8386%2014.2671%2017.2032%2011.0047%2017.6622C9.07229%2017.9341%207.10391%2017.5706%205.3961%2016.6266C3.68829%2015.6825%202.33356%2014.2091%201.53604%2012.4282'%20stroke='%233367d9'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
901
+ var pn = { value: () => {
812
902
  } };
813
903
  function mt() {
814
- for (var t = 0, e = arguments.length, n = {}, i; t < e; ++t) {
815
- if (!(i = arguments[t] + "") || i in n || /[\s.]/.test(i)) throw new Error("illegal type: " + i);
816
- n[i] = [];
904
+ for (var t = 0, e = arguments.length, n = {}, r; t < e; ++t) {
905
+ if (!(r = arguments[t] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
906
+ n[r] = [];
817
907
  }
818
- return new U(n);
908
+ return new $(n);
819
909
  }
820
- function U(t) {
910
+ function $(t) {
821
911
  this._ = t;
822
912
  }
823
- function dn(t, e) {
913
+ function yn(t, e) {
824
914
  return t.trim().split(/^|\s+/).map(function(n) {
825
- var i = "", r = n.indexOf(".");
826
- if (r >= 0 && (i = n.slice(r + 1), n = n.slice(0, r)), n && !e.hasOwnProperty(n)) throw new Error("unknown type: " + n);
827
- return { type: n, name: i };
915
+ var r = "", i = n.indexOf(".");
916
+ if (i >= 0 && (r = n.slice(i + 1), n = n.slice(0, i)), n && !e.hasOwnProperty(n)) throw new Error("unknown type: " + n);
917
+ return { type: n, name: r };
828
918
  });
829
919
  }
830
- U.prototype = mt.prototype = {
831
- constructor: U,
920
+ $.prototype = mt.prototype = {
921
+ constructor: $,
832
922
  on: function(t, e) {
833
- var n = this._, i = dn(t + "", n), r, o = -1, a = i.length;
923
+ var n = this._, r = yn(t + "", n), i, o = -1, a = r.length;
834
924
  if (arguments.length < 2) {
835
- for (; ++o < a; ) if ((r = (t = i[o]).type) && (r = gn(n[r], t.name))) return r;
925
+ for (; ++o < a; ) if ((i = (t = r[o]).type) && (i = wn(n[i], t.name))) return i;
836
926
  return;
837
927
  }
838
928
  if (e != null && typeof e != "function") throw new Error("invalid callback: " + e);
839
929
  for (; ++o < a; )
840
- if (r = (t = i[o]).type) n[r] = at(n[r], t.name, e);
841
- else if (e == null) for (r in n) n[r] = at(n[r], t.name, null);
930
+ if (i = (t = r[o]).type) n[i] = at(n[i], t.name, e);
931
+ else if (e == null) for (i in n) n[i] = at(n[i], t.name, null);
842
932
  return this;
843
933
  },
844
934
  copy: function() {
845
935
  var t = {}, e = this._;
846
936
  for (var n in e) t[n] = e[n].slice();
847
- return new U(t);
937
+ return new $(t);
848
938
  },
849
939
  call: function(t, e) {
850
- if ((r = arguments.length - 2) > 0) for (var n = new Array(r), i = 0, r, o; i < r; ++i) n[i] = arguments[i + 2];
940
+ if ((i = arguments.length - 2) > 0) for (var n = new Array(i), r = 0, i, o; r < i; ++r) n[r] = arguments[r + 2];
851
941
  if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
852
- for (o = this._[t], i = 0, r = o.length; i < r; ++i) o[i].value.apply(e, n);
942
+ for (o = this._[t], r = 0, i = o.length; r < i; ++r) o[r].value.apply(e, n);
853
943
  },
854
944
  apply: function(t, e, n) {
855
945
  if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
856
- for (var i = this._[t], r = 0, o = i.length; r < o; ++r) i[r].value.apply(e, n);
946
+ for (var r = this._[t], i = 0, o = r.length; i < o; ++i) r[i].value.apply(e, n);
857
947
  }
858
948
  };
859
- function gn(t, e) {
860
- for (var n = 0, i = t.length, r; n < i; ++n)
861
- if ((r = t[n]).name === e)
862
- return r.value;
949
+ function wn(t, e) {
950
+ for (var n = 0, r = t.length, i; n < r; ++n)
951
+ if ((i = t[n]).name === e)
952
+ return i.value;
863
953
  }
864
954
  function at(t, e, n) {
865
- for (var i = 0, r = t.length; i < r; ++i)
866
- if (t[i].name === e) {
867
- t[i] = fn, t = t.slice(0, i).concat(t.slice(i + 1));
955
+ for (var r = 0, i = t.length; r < i; ++r)
956
+ if (t[r].name === e) {
957
+ t[r] = pn, t = t.slice(0, r).concat(t.slice(r + 1));
868
958
  break;
869
959
  }
870
960
  return n != null && t.push({ name: e, value: n }), t;
871
961
  }
872
- const pn = { passive: !1 }, D = { capture: !0, passive: !1 };
873
- function Z(t) {
962
+ const xn = { passive: !1 }, L = { capture: !0, passive: !1 };
963
+ function K(t) {
874
964
  t.stopImmediatePropagation();
875
965
  }
876
966
  function M(t) {
877
967
  t.preventDefault(), t.stopImmediatePropagation();
878
968
  }
879
- function yn(t) {
880
- var e = t.document.documentElement, n = H(t).on("dragstart.drag", M, D);
881
- "onselectstart" in e ? n.on("selectstart.drag", M, D) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
969
+ function mn(t) {
970
+ var e = t.document.documentElement, n = H(t).on("dragstart.drag", M, L);
971
+ "onselectstart" in e ? n.on("selectstart.drag", M, L) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
882
972
  }
883
- function xn(t, e) {
884
- var n = t.document.documentElement, i = H(t).on("dragstart.drag", null);
885
- e && (i.on("click.drag", M, D), setTimeout(function() {
886
- i.on("click.drag", null);
887
- }, 0)), "onselectstart" in n ? i.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
973
+ function vn(t, e) {
974
+ var n = t.document.documentElement, r = H(t).on("dragstart.drag", null);
975
+ e && (r.on("click.drag", M, L), setTimeout(function() {
976
+ r.on("click.drag", null);
977
+ }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
888
978
  }
889
- const X = (t) => () => t;
890
- function tt(t, {
979
+ const q = (t) => () => t;
980
+ function G(t, {
891
981
  sourceEvent: e,
892
982
  subject: n,
893
- target: i,
894
- identifier: r,
983
+ target: r,
984
+ identifier: i,
895
985
  active: o,
896
986
  x: a,
897
987
  y: l,
@@ -903,8 +993,8 @@ function tt(t, {
903
993
  type: { value: t, enumerable: !0, configurable: !0 },
904
994
  sourceEvent: { value: e, enumerable: !0, configurable: !0 },
905
995
  subject: { value: n, enumerable: !0, configurable: !0 },
906
- target: { value: i, enumerable: !0, configurable: !0 },
907
- identifier: { value: r, enumerable: !0, configurable: !0 },
996
+ target: { value: r, enumerable: !0, configurable: !0 },
997
+ identifier: { value: i, enumerable: !0, configurable: !0 },
908
998
  active: { value: o, enumerable: !0, configurable: !0 },
909
999
  x: { value: a, enumerable: !0, configurable: !0 },
910
1000
  y: { value: l, enumerable: !0, configurable: !0 },
@@ -913,195 +1003,205 @@ function tt(t, {
913
1003
  _: { value: d }
914
1004
  });
915
1005
  }
916
- tt.prototype.on = function() {
1006
+ G.prototype.on = function() {
917
1007
  var t = this._.on.apply(this._, arguments);
918
1008
  return t === this._ ? this : t;
919
1009
  };
920
- function wn(t) {
1010
+ function kn(t) {
921
1011
  return !t.ctrlKey && !t.button;
922
1012
  }
923
- function mn() {
1013
+ function _n() {
924
1014
  return this.parentNode;
925
1015
  }
926
- function vn(t, e) {
1016
+ function bn(t, e) {
927
1017
  return e ?? { x: t.x, y: t.y };
928
1018
  }
929
- function kn() {
1019
+ function jn() {
930
1020
  return navigator.maxTouchPoints || "ontouchstart" in this;
931
1021
  }
932
- function _n() {
933
- var t = wn, e = mn, n = vn, i = kn, r = {}, o = mt("start", "drag", "end"), a = 0, l, h, u, d, m = 0;
934
- function f(c) {
935
- c.on("mousedown.drag", k).filter(i).on("touchstart.drag", W).on("touchmove.drag", N, pn).on("touchend.drag touchcancel.drag", A).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
1022
+ function En() {
1023
+ var t = kn, e = _n, n = bn, r = jn, i = {}, o = mt("start", "drag", "end"), a = 0, l, h, u, d, x = 0;
1024
+ function g(c) {
1025
+ c.on("mousedown.drag", m).filter(r).on("touchstart.drag", W).on("touchmove.drag", N, xn).on("touchend.drag touchcancel.drag", j).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
936
1026
  }
937
- function k(c, y) {
938
- if (!(d || !t.call(this, c, y))) {
939
- var g = j(this, e.call(this, c, y), c, y, "mouse");
940
- g && (H(c.view).on("mousemove.drag", _, D).on("mouseup.drag", S, D), yn(c.view), Z(c), u = !1, l = c.clientX, h = c.clientY, g("start", c));
1027
+ function m(c, f) {
1028
+ if (!(d || !t.call(this, c, f))) {
1029
+ var p = A(this, e.call(this, c, f), c, f, "mouse");
1030
+ p && (H(c.view).on("mousemove.drag", v, L).on("mouseup.drag", S, L), mn(c.view), K(c), u = !1, l = c.clientX, h = c.clientY, p("start", c));
941
1031
  }
942
1032
  }
943
- function _(c) {
1033
+ function v(c) {
944
1034
  if (M(c), !u) {
945
- var y = c.clientX - l, g = c.clientY - h;
946
- u = y * y + g * g > m;
1035
+ var f = c.clientX - l, p = c.clientY - h;
1036
+ u = f * f + p * p > x;
947
1037
  }
948
- r.mouse("drag", c);
1038
+ i.mouse("drag", c);
949
1039
  }
950
1040
  function S(c) {
951
- H(c.view).on("mousemove.drag mouseup.drag", null), xn(c.view, u), M(c), r.mouse("end", c);
1041
+ H(c.view).on("mousemove.drag mouseup.drag", null), vn(c.view, u), M(c), i.mouse("end", c);
952
1042
  }
953
- function W(c, y) {
954
- if (t.call(this, c, y)) {
955
- var g = c.changedTouches, p = e.call(this, c, y), x = g.length, w, b;
956
- for (w = 0; w < x; ++w)
957
- (b = j(this, p, c, y, g[w].identifier, g[w])) && (Z(c), b("start", c, g[w]));
1043
+ function W(c, f) {
1044
+ if (t.call(this, c, f)) {
1045
+ var p = c.changedTouches, y = e.call(this, c, f), w = p.length, k, _;
1046
+ for (k = 0; k < w; ++k)
1047
+ (_ = A(this, y, c, f, p[k].identifier, p[k])) && (K(c), _("start", c, p[k]));
958
1048
  }
959
1049
  }
960
1050
  function N(c) {
961
- var y = c.changedTouches, g = y.length, p, x;
962
- for (p = 0; p < g; ++p)
963
- (x = r[y[p].identifier]) && (M(c), x("drag", c, y[p]));
1051
+ var f = c.changedTouches, p = f.length, y, w;
1052
+ for (y = 0; y < p; ++y)
1053
+ (w = i[f[y].identifier]) && (M(c), w("drag", c, f[y]));
964
1054
  }
965
- function A(c) {
966
- var y = c.changedTouches, g = y.length, p, x;
1055
+ function j(c) {
1056
+ var f = c.changedTouches, p = f.length, y, w;
967
1057
  for (d && clearTimeout(d), d = setTimeout(function() {
968
1058
  d = null;
969
- }, 500), p = 0; p < g; ++p)
970
- (x = r[y[p].identifier]) && (Z(c), x("end", c, y[p]));
1059
+ }, 500), y = 0; y < p; ++y)
1060
+ (w = i[f[y].identifier]) && (K(c), w("end", c, f[y]));
971
1061
  }
972
- function j(c, y, g, p, x, w) {
973
- var b = o.copy(), v = ot(w || g, y), C, O, R;
974
- if ((R = n.call(c, new tt("beforestart", {
975
- sourceEvent: g,
976
- target: f,
977
- identifier: x,
1062
+ function A(c, f, p, y, w, k) {
1063
+ var _ = o.copy(), b = ot(k || p, f), D, V, B;
1064
+ if ((B = n.call(c, new G("beforestart", {
1065
+ sourceEvent: p,
1066
+ target: g,
1067
+ identifier: w,
978
1068
  active: a,
979
- x: v[0],
980
- y: v[1],
1069
+ x: b[0],
1070
+ y: b[1],
981
1071
  dx: 0,
982
1072
  dy: 0,
983
- dispatch: b
984
- }), p)) != null)
985
- return C = R.x - v[0] || 0, O = R.y - v[1] || 0, function K(V, P, q) {
986
- var I = v, J;
987
- switch (V) {
1073
+ dispatch: _
1074
+ }), y)) != null)
1075
+ return D = B.x - b[0] || 0, V = B.y - b[1] || 0, function tt(R, P, O) {
1076
+ var et = b, Y;
1077
+ switch (R) {
988
1078
  case "start":
989
- r[x] = K, J = a++;
1079
+ i[w] = tt, Y = a++;
990
1080
  break;
991
1081
  case "end":
992
- delete r[x], --a;
1082
+ delete i[w], --a;
993
1083
  case "drag":
994
- v = ot(q || P, y), J = a;
1084
+ b = ot(O || P, f), Y = a;
995
1085
  break;
996
1086
  }
997
- b.call(
998
- V,
1087
+ _.call(
1088
+ R,
999
1089
  c,
1000
- new tt(V, {
1090
+ new G(R, {
1001
1091
  sourceEvent: P,
1002
- subject: R,
1003
- target: f,
1004
- identifier: x,
1005
- active: J,
1006
- x: v[0] + C,
1007
- y: v[1] + O,
1008
- dx: v[0] - I[0],
1009
- dy: v[1] - I[1],
1010
- dispatch: b
1092
+ subject: B,
1093
+ target: g,
1094
+ identifier: w,
1095
+ active: Y,
1096
+ x: b[0] + D,
1097
+ y: b[1] + V,
1098
+ dx: b[0] - et[0],
1099
+ dy: b[1] - et[1],
1100
+ dispatch: _
1011
1101
  }),
1012
- p
1102
+ y
1013
1103
  );
1014
1104
  };
1015
1105
  }
1016
- return f.filter = function(c) {
1017
- return arguments.length ? (t = typeof c == "function" ? c : X(!!c), f) : t;
1018
- }, f.container = function(c) {
1019
- return arguments.length ? (e = typeof c == "function" ? c : X(c), f) : e;
1020
- }, f.subject = function(c) {
1021
- return arguments.length ? (n = typeof c == "function" ? c : X(c), f) : n;
1022
- }, f.touchable = function(c) {
1023
- return arguments.length ? (i = typeof c == "function" ? c : X(!!c), f) : i;
1024
- }, f.on = function() {
1106
+ return g.filter = function(c) {
1107
+ return arguments.length ? (t = typeof c == "function" ? c : q(!!c), g) : t;
1108
+ }, g.container = function(c) {
1109
+ return arguments.length ? (e = typeof c == "function" ? c : q(c), g) : e;
1110
+ }, g.subject = function(c) {
1111
+ return arguments.length ? (n = typeof c == "function" ? c : q(c), g) : n;
1112
+ }, g.touchable = function(c) {
1113
+ return arguments.length ? (r = typeof c == "function" ? c : q(!!c), g) : r;
1114
+ }, g.on = function() {
1025
1115
  var c = o.on.apply(o, arguments);
1026
- return c === o ? f : c;
1027
- }, f.clickDistance = function(c) {
1028
- return arguments.length ? (m = (c = +c) * c, f) : Math.sqrt(m);
1029
- }, f;
1116
+ return c === o ? g : c;
1117
+ }, g.clickDistance = function(c) {
1118
+ return arguments.length ? (x = (c = +c) * c, g) : Math.sqrt(x);
1119
+ }, g;
1030
1120
  }
1031
- const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
1121
+ const Sn = ({ id: t, data: e, style: n }) => {
1032
1122
  const r = z(
1033
- (g) => g.stickers.find((p) => p.id === e.stickerId)
1034
- ), o = z((g) => g.updateSticker), a = z((g) => g.bringToFront), l = z((g) => g.selectSticker), h = z((g) => g.selectedId), { setNodes: u } = jt(), d = F(null), m = F(0), f = F({ width: 0, height: 0 }), [k, _] = L(0), [S, W] = L({ width: 140, height: 140 }), [N, A] = L(!1), j = h === (r == null ? void 0 : r.id);
1123
+ (f) => f.stickers.find((p) => p.id === e.stickerId)
1124
+ ), i = z((f) => f.updateSticker), o = z((f) => f.bringToFront), a = z((f) => f.selectSticker), l = z((f) => f.selectedId), { setNodes: h } = bt(), u = F(null), d = F(0), x = F({ width: 0, height: 0 }), [g, m] = I(0), [v, S] = I({ width: 140, height: 140 }), [W, N] = I(!1), j = l === (r == null ? void 0 : r.id);
1035
1125
  T(() => {
1036
1126
  if (!r) return;
1037
- const g = Number(r.width) || 140, p = Number(r.height) || 140, x = Number(r.rotation) || 0;
1038
- W({ width: g, height: p }), f.current = { width: g, height: p }, m.current = x, _(x);
1127
+ const f = Number(r.width) || 140, p = Number(r.height) || 140, y = Number(r.rotation) || 0;
1128
+ S({ width: f, height: p }), x.current = { width: f, height: p }, d.current = y, m(y);
1039
1129
  }, [r]), T(() => {
1040
- m.current = k;
1041
- }, [k]), T(() => {
1130
+ d.current = g;
1131
+ }, [g]), T(() => {
1042
1132
  if (!r || !j) return;
1043
- const g = d.current;
1044
- if (!g) return;
1045
- const p = H(g), x = _n().on("start", (w) => {
1046
- var b, v;
1047
- (v = (b = w.sourceEvent) == null ? void 0 : b.stopPropagation) == null || v.call(b), A(!0);
1133
+ const f = u.current;
1134
+ if (!f) return;
1135
+ const p = H(f), y = En().on("start", (w) => {
1136
+ var k, _;
1137
+ (_ = (k = w.sourceEvent) == null ? void 0 : k.stopPropagation) == null || _.call(k), N(!0);
1048
1138
  }).on("drag", (w) => {
1049
- var q, I;
1050
- const b = (I = (q = w.sourceEvent) == null ? void 0 : q.target) == null ? void 0 : I.parentElement;
1051
- if (!b) return;
1052
- const v = b.getBoundingClientRect(), C = v.left + v.width / 2, O = v.top + v.height / 2, R = w.sourceEvent.clientX - C, K = w.sourceEvent.clientY - O, P = Math.atan2(K, R) * (180 / Math.PI) + 90;
1053
- m.current = P, _(P);
1139
+ var P, O;
1140
+ const k = (O = (P = w.sourceEvent) == null ? void 0 : P.target) == null ? void 0 : O.parentElement;
1141
+ if (!k) return;
1142
+ const _ = k.getBoundingClientRect(), b = _.left + _.width / 2, D = _.top + _.height / 2, V = w.sourceEvent.clientX - b, B = w.sourceEvent.clientY - D, R = Math.atan2(B, V) * (180 / Math.PI) + 90;
1143
+ d.current = R, m(R);
1054
1144
  }).on("end", () => {
1055
- A(!1);
1056
- const w = Number(m.current) || 0;
1057
- o(r.id, { rotation: w });
1145
+ N(!1);
1146
+ const w = Number(d.current) || 0;
1147
+ i(r.id, { rotation: w });
1058
1148
  });
1059
- return p.call(x), () => p.on(".drag", null);
1060
- }, [j, r, o]);
1061
- const c = bt(() => {
1149
+ return p.call(y), () => p.on(".drag", null);
1150
+ }, [j, r, i]);
1151
+ const A = _t(() => {
1062
1152
  if (!r) return null;
1063
- const g = it[r.shapeId];
1064
- return g ? g(r) : it.square(r);
1065
- }, [r]), y = (g) => {
1066
- g.stopPropagation(), r && (a(r.id), l(r.id));
1153
+ const f = it[r.shapeId];
1154
+ return f ? f(r) : it.square(r);
1155
+ }, [r]), c = (f) => {
1156
+ f.stopPropagation(), r && (o(r.id), a(r.id));
1067
1157
  };
1068
1158
  return r ? /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(
1069
1159
  "div",
1070
1160
  {
1071
- onClick: y,
1161
+ onClick: c,
1162
+ className: "dragHandle__custom",
1072
1163
  style: {
1073
1164
  ...n,
1074
1165
  position: "relative",
1075
1166
  zIndex: r.zIndex,
1076
- cursor: N ? "grabbing" : "grab",
1077
- width: S.width,
1078
- height: S.height,
1079
- transform: `rotate(${k}deg)`,
1167
+ cursor: W ? "grabbing" : "grab",
1168
+ width: v.width,
1169
+ height: v.height,
1170
+ transform: `rotate(${g}deg)`,
1080
1171
  transformOrigin: "50% 50%",
1081
1172
  pointerEvents: "auto"
1082
1173
  },
1083
- "data-drag-disabled": N,
1174
+ "data-drag-disabled": W,
1084
1175
  children: [
1085
1176
  /* @__PURE__ */ s.jsx(
1086
- Et,
1177
+ jt,
1087
1178
  {
1088
1179
  isVisible: j,
1089
1180
  minWidth: 30,
1090
1181
  minHeight: 30,
1091
- resizeHandles: ["top", "right", "bottom", "left", "topRight", "topLeft", "bottomRight", "bottomLeft"],
1092
- onResize: (g, p) => {
1093
- const x = Number(p.width) || 1, w = Number(p.height) || 1;
1094
- W({ width: x, height: w }), f.current = { width: x, height: w };
1182
+ resizeHandles: [
1183
+ "top",
1184
+ "right",
1185
+ "bottom",
1186
+ "left",
1187
+ "topRight",
1188
+ "topLeft",
1189
+ "bottomRight",
1190
+ "bottomLeft"
1191
+ ],
1192
+ onResize: (f, p) => {
1193
+ const y = Number(p.width) || 1, w = Number(p.height) || 1;
1194
+ S({ width: y, height: w }), x.current = { width: y, height: w };
1095
1195
  },
1096
- onResizeEnd: async (g, p) => {
1097
- const x = Math.max(1, Math.round(p.width)), w = Math.max(1, Math.round(p.height)), b = Number(m.current) || 0;
1098
- W({ width: x, height: w }), f.current = { width: x, height: w }, u(
1099
- (v) => v.map((C) => C.id === t ? { ...C, style: { ...C.style, width: x, height: w } } : C)
1100
- ), o(r.id, { width: x, height: w });
1196
+ onResizeEnd: async (f, p) => {
1197
+ const y = Math.max(1, Math.round(p.width)), w = Math.max(1, Math.round(p.height)), k = Number(d.current) || 0;
1198
+ S({ width: y, height: w }), x.current = { width: y, height: w }, h(
1199
+ (_) => _.map((b) => b.id === t ? { ...b, style: { ...b.style, width: y, height: w } } : b)
1200
+ ), i(r.id, { width: y, height: w });
1101
1201
  try {
1102
- await G.updateBoardTransform(t, x, w, b);
1103
- } catch (v) {
1104
- console.warn("Не удалось сохранить размеры фигуры", v);
1202
+ await J.updateBoardTransform(t, y, w, k);
1203
+ } catch (_) {
1204
+ console.warn("Не удалось сохранить размеры фигуры", _);
1105
1205
  }
1106
1206
  }
1107
1207
  }
@@ -1109,17 +1209,17 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
1109
1209
  /* @__PURE__ */ s.jsx(
1110
1210
  "svg",
1111
1211
  {
1112
- width: S.width,
1113
- height: S.height,
1212
+ width: v.width,
1213
+ height: v.height,
1114
1214
  viewBox: "0 0 100 100",
1115
1215
  preserveAspectRatio: "none",
1116
- children: c
1216
+ children: A
1117
1217
  }
1118
1218
  ),
1119
1219
  j && /* @__PURE__ */ s.jsx(
1120
1220
  "div",
1121
1221
  {
1122
- ref: d,
1222
+ ref: u,
1123
1223
  className: "nodrag nopan",
1124
1224
  style: {
1125
1225
  position: "absolute",
@@ -1130,13 +1230,13 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
1130
1230
  cursor: "grab",
1131
1231
  zIndex: 1e3,
1132
1232
  pointerEvents: "auto",
1133
- transform: `translateX(-50%) rotate(${k}deg)`,
1134
- transition: N ? "none" : "transform 0.15s ease-out"
1233
+ transform: `translateX(-50%) rotate(${g}deg)`,
1234
+ transition: W ? "none" : "transform 0.15s ease-out"
1135
1235
  },
1136
1236
  children: /* @__PURE__ */ s.jsx(
1137
1237
  "img",
1138
1238
  {
1139
- src: un,
1239
+ src: gn,
1140
1240
  alt: "Rotate",
1141
1241
  draggable: !1,
1142
1242
  style: {
@@ -1153,103 +1253,12 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
1153
1253
  ]
1154
1254
  }
1155
1255
  ) }) : null;
1156
- }, bn = {
1157
- square: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1158
- circle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1159
- triangle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,34 6,34", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1160
- star: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx(
1161
- "polygon",
1162
- {
1163
- points: "20,4 25,16 38,16 27,24 32,36 20,28 8,36 13,24 2,16 15,16",
1164
- stroke: "black",
1165
- fill: "none",
1166
- strokeWidth: "2"
1167
- }
1168
- ) }),
1169
- stick: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "16", y: "4", width: "8", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1170
- line: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "36", y2: "20", stroke: "black", strokeWidth: "2" }) }),
1171
- arrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
1172
- /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "30", y2: "20", stroke: "black", strokeWidth: "2" }),
1173
- /* @__PURE__ */ s.jsx("polygon", { points: "30,14 38,20 30,26", fill: "black" })
1174
- ] }),
1175
- dblarrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
1176
- /* @__PURE__ */ s.jsx("polygon", { points: "4,20 12,14 12,26", fill: "black" }),
1177
- /* @__PURE__ */ s.jsx("line", { x1: "12", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
1178
- /* @__PURE__ */ s.jsx("polygon", { points: "28,14 36,20 28,26", fill: "black" })
1179
- ] }),
1180
- parallelogram: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "8,8 34,8 26,32 0,32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1181
- roundedRect: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "10", width: "28", height: "20", rx: "4", ry: "4", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1182
- capsule: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "14", width: "28", height: "12", rx: "6", ry: "6", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1183
- pentagon: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,15 28,32 12,32 6,15", stroke: "black", fill: "none", strokeWidth: "2" }) }),
1184
- chevron: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 100 100", children: /* @__PURE__ */ s.jsx(
1185
- "polyline",
1186
- {
1187
- points: "0,0 50,100 100,0",
1188
- fill: "none",
1189
- stroke: "black",
1190
- strokeWidth: "5"
1191
- }
1192
- ) }),
1193
- table3x3: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
1194
- /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
1195
- /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
1196
- /* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
1197
- /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "14", x2: "36", y2: "14", stroke: "black", strokeWidth: "2" }),
1198
- /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "26", x2: "36", y2: "26", stroke: "black", strokeWidth: "2" })
1199
- ] }),
1200
- pyramid: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
1201
- /* @__PURE__ */ s.jsx("polygon", { points: "20,4 36,36 4,36", stroke: "black", fill: "none", strokeWidth: "2" }),
1202
- /* @__PURE__ */ s.jsx("line", { x1: "15", y1: "12", x2: "25", y2: "12", stroke: "black", strokeWidth: "2" }),
1203
- /* @__PURE__ */ s.jsx("line", { x1: "11", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
1204
- /* @__PURE__ */ s.jsx("line", { x1: "7", y1: "28", x2: "32", y2: "28", stroke: "black", strokeWidth: "2" })
1205
- ] }),
1206
- circleArrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
1207
- /* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }),
1208
- /* @__PURE__ */ s.jsx("line", { x1: "20", y1: "6", x2: "20", y2: "0", stroke: "black", strokeWidth: "2" }),
1209
- /* @__PURE__ */ s.jsx("polygon", { points: "18,2 22,2 20,0", fill: "black" })
1210
- ] }),
1211
- table3x3LeftMerge: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
1212
- /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
1213
- /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
1214
- /* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
1215
- /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "16", x2: "36", y2: "16", stroke: "black", strokeWidth: "2" }),
1216
- /* @__PURE__ */ s.jsx("line", { x1: "14", y1: "28", x2: "36", y2: "28", stroke: "black", strokeWidth: "2" })
1217
- ] })
1218
- }, jn = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", En = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", Sn = () => {
1219
- const [t, e] = L(!1), n = F(null), i = (o) => {
1220
- o.stopPropagation(), e((a) => !a);
1221
- };
1222
- T(() => {
1223
- if (!t) return;
1224
- const o = (a) => {
1225
- n.current && !n.current.contains(a.target) && e(!1);
1226
- };
1227
- return window.addEventListener("pointerdown", o), () => window.removeEventListener("pointerdown", o);
1228
- }, [t]);
1229
- const r = (o) => (a) => {
1230
- a.stopPropagation(), a.dataTransfer.setData(kt, JSON.stringify({ shapeId: o.id })), a.dataTransfer.effectAllowed = "copy";
1231
- };
1232
- return /* @__PURE__ */ s.jsxs("div", { className: "left-toolbar-container", ref: n, onClick: (o) => o.stopPropagation(), children: [
1233
- /* @__PURE__ */ s.jsx("div", { className: `toolbar-card ${t ? "toolbar-card--open" : ""}`, children: /* @__PURE__ */ s.jsx("button", { onClick: i, className: `toolbar-btn toolbar-btn--icon toolbar-btn--shape ${t ? "toolbar-btn--active" : ""}`, children: /* @__PURE__ */ s.jsx("div", { className: `toolbar-shape-plate ${t ? "toolbar-shape-plate--active" : ""}`, children: /* @__PURE__ */ s.jsx("img", { src: t ? En : jn, alt: "Фигуры", draggable: !1 }) }) }) }),
1234
- t && /* @__PURE__ */ s.jsx("div", { className: "palette-wrapper", onClick: (o) => o.stopPropagation(), children: /* @__PURE__ */ s.jsx("div", { className: "shape-panel", children: /* @__PURE__ */ s.jsx("div", { className: "shape-grid", children: St.map((o) => /* @__PURE__ */ s.jsx(
1235
- "button",
1236
- {
1237
- className: "shape-item",
1238
- draggable: !0,
1239
- onDragStart: r(o),
1240
- title: o.name,
1241
- children: bn[o.id]
1242
- },
1243
- o.id
1244
- )) }) }) }),
1245
- /* @__PURE__ */ s.jsx(vt, { shapeOpen: t })
1246
- ] });
1247
1256
  }, Wn = {
1248
- shape: vt
1249
- }, $ = ({ children: t }) => /* @__PURE__ */ s.jsx("div", { children: t }), Bn = ({ nodeTypes: t }) => {
1257
+ shape: Sn
1258
+ }, X = ({ children: t }) => /* @__PURE__ */ s.jsx("div", { children: t }), Bn = ({ nodeTypes: t }) => {
1250
1259
  const e = z((o) => o.setStickers);
1251
1260
  F(null);
1252
- const [n, i] = L(() => $);
1261
+ const [n, r] = I(() => X);
1253
1262
  ({
1254
1263
  ...Wn,
1255
1264
  ...t || {}
@@ -1257,30 +1266,30 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
1257
1266
  (async () => {
1258
1267
  try {
1259
1268
  const [a, l] = await Promise.all([
1260
- G.getAll(),
1261
- G.getBoard()
1262
- ]), h = new Map(a.map((f) => [String(f.id), f.shapeId]));
1269
+ J.getAll(),
1270
+ J.getBoard()
1271
+ ]), h = new Map(a.map((g) => [String(g.id), g.shapeId]));
1263
1272
  let u = 30, d = 30;
1264
- const m = [];
1265
- for (const f of l) {
1266
- const k = f.width ?? 140, _ = f.height ?? 140, S = f.rotation ?? 0, W = h.get(String(f.shapeId)) ?? "square";
1267
- m.push({
1268
- id: f.id,
1269
- stickerId: f.id,
1273
+ const x = [];
1274
+ for (const g of l) {
1275
+ const m = g.width ?? 140, v = g.height ?? 140, S = g.rotation ?? 0, W = h.get(String(g.shapeId)) ?? "square";
1276
+ x.push({
1277
+ id: g.id,
1278
+ stickerId: g.id,
1270
1279
  type: "shape",
1271
1280
  shapeId: W,
1272
- shapeDbId: f.shapeId,
1281
+ shapeDbId: g.shapeId,
1273
1282
  x: u,
1274
1283
  y: d,
1275
- width: k,
1276
- height: _,
1284
+ width: m,
1285
+ height: v,
1277
1286
  rotation: S,
1278
1287
  zIndex: 1,
1279
1288
  fill: "transparent",
1280
1289
  stroke: "#000"
1281
1290
  }), u += 24, d += 24;
1282
1291
  }
1283
- e(m);
1292
+ e(x);
1284
1293
  } catch (a) {
1285
1294
  console.warn("Не удалось загрузить доску для фигур:", a);
1286
1295
  }
@@ -1291,22 +1300,22 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
1291
1300
  if (!o)
1292
1301
  return;
1293
1302
  const l = (a && (a.Widget || a.default || (a == null ? void 0 : a.widget) || (a == null ? void 0 : a.XyflowWidget))) ?? null;
1294
- typeof l == "function" || _t.isValidElement(l) ? i(() => l) : i(() => $);
1303
+ typeof l == "function" || kt.isValidElement(l) ? r(() => l) : r(() => X);
1295
1304
  }).catch(() => {
1296
- o && i(() => $);
1305
+ o && r(() => X);
1297
1306
  }), () => {
1298
1307
  o = !1;
1299
1308
  };
1300
1309
  }, []);
1301
- const r = n || $;
1302
- return /* @__PURE__ */ s.jsx(r, { children: /* @__PURE__ */ s.jsx("div", { className: "relative flex h-screen w-screen bg-gray-100", children: /* @__PURE__ */ s.jsx(Sn, {}) }) });
1310
+ const i = n || X;
1311
+ return /* @__PURE__ */ s.jsx(i, { children: /* @__PURE__ */ s.jsx("div", { className: "relative flex h-screen w-screen bg-gray-100", children: /* @__PURE__ */ s.jsx(Ct, {}) }) });
1303
1312
  };
1304
1313
  export {
1305
1314
  Bn as S,
1306
- St as a,
1307
- G as b,
1308
- vt as c,
1309
- Sn as d,
1315
+ Et as a,
1316
+ J as b,
1317
+ Sn as c,
1318
+ Ct as d,
1310
1319
  Wn as s
1311
1320
  };
1312
- //# sourceMappingURL=ShapeBoardWidget-ChVcXBBP.js.map
1321
+ //# sourceMappingURL=ShapeBoardWidget-BmgYD5zN.js.map