integration-modules 0.1.18 → 0.1.19
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.
- package/README.md +16 -16
- package/dist/chunks/emojiNodeTypes-BEJUMlcU.js +2 -0
- package/dist/chunks/emojiNodeTypes-BEJUMlcU.js.map +1 -0
- package/dist/chunks/emojiNodeTypes-ChzS-8r3.js +129 -0
- package/dist/chunks/emojiNodeTypes-ChzS-8r3.js.map +1 -0
- package/dist/chunks/stickers-CgxhVTwt.js +7 -0
- package/dist/chunks/stickers-CgxhVTwt.js.map +1 -0
- package/dist/chunks/stickers-MBhZw3wd.js +299 -0
- package/dist/chunks/stickers-MBhZw3wd.js.map +1 -0
- package/dist/emoji/index.cjs +1 -1
- package/dist/emoji/index.js +6 -4
- package/dist/index.cjs +1 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -17753
- package/dist/index.mjs.map +1 -1
- package/dist/integration-modules.css +1 -1
- package/dist/shape/index.cjs +32 -1
- package/dist/shape/index.cjs.map +1 -1
- package/dist/shape/index.js +19285 -3
- package/dist/shape/index.js.map +1 -1
- package/package.json +78 -78
- package/dist/chunks/EmojiBoardWidget-BT3AAibK.js +0 -270
- package/dist/chunks/EmojiBoardWidget-BT3AAibK.js.map +0 -1
- package/dist/chunks/EmojiBoardWidget-CzGz4-vT.js +0 -2
- package/dist/chunks/EmojiBoardWidget-CzGz4-vT.js.map +0 -1
- package/dist/chunks/ShapeBoardWidget-BmgYD5zN.js +0 -1321
- package/dist/chunks/ShapeBoardWidget-BmgYD5zN.js.map +0 -1
- package/dist/chunks/ShapeBoardWidget-quPjhnR6.js +0 -2
- package/dist/chunks/ShapeBoardWidget-quPjhnR6.js.map +0 -1
- package/dist/chunks/useStickersStore-BUOBakV7.js +0 -613
- package/dist/chunks/useStickersStore-BUOBakV7.js.map +0 -1
- package/dist/chunks/useStickersStore-CZRuiluy.js +0 -23
- package/dist/chunks/useStickersStore-CZRuiluy.js.map +0 -1
|
@@ -1,1321 +0,0 @@
|
|
|
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
|
-
{ id: "line", name: "Линия", defaultSize: { width: 80, height: 20 } },
|
|
6
|
-
{ id: "arrow", name: "Стрелка", defaultSize: { width: 180, height: 60 } },
|
|
7
|
-
{ id: "dblarrow", name: "Двойная стрелка", defaultSize: { width: 200, height: 60 } },
|
|
8
|
-
{ id: "square", name: "Квадрат", defaultSize: { width: 140, height: 140 } },
|
|
9
|
-
{ id: "circle", name: "Круг", defaultSize: { width: 140, height: 140 } },
|
|
10
|
-
{ id: "triangle", name: "Треугольник", defaultSize: { width: 160, height: 150 } },
|
|
11
|
-
{ id: "star", name: "Звезда", defaultSize: { width: 160, height: 160 } },
|
|
12
|
-
{ id: "parallelogram", name: "Параллелограмм", defaultSize: { width: 200, height: 120 } },
|
|
13
|
-
{ id: "stick", name: "Палка", defaultSize: { width: 20, height: 160 } },
|
|
14
|
-
{ id: "roundedRect", name: "Скруглённый прямоугольник", defaultSize: { width: 160, height: 100 } },
|
|
15
|
-
{ id: "capsule", name: "Капсула", defaultSize: { width: 160, height: 60 } },
|
|
16
|
-
{ id: "pentagon", name: "Пятиугольник", defaultSize: { width: 140, height: 140 } },
|
|
17
|
-
{ id: "chevron", name: "Галка", defaultSize: { width: 160, height: 80 } },
|
|
18
|
-
{ id: "table3x3", name: "Таблица 3×3", defaultSize: { width: 180, height: 180 } },
|
|
19
|
-
{ id: "pyramid", name: "Пирамида", defaultSize: { width: 160, height: 160 } },
|
|
20
|
-
{ id: "circleArrow", name: "Круг со стрелкой", defaultSize: { width: 140, height: 140 } },
|
|
21
|
-
{ id: "table3x3LeftMerge", name: "Таблица 3×3", defaultSize: { width: 180, height: 180 } }
|
|
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) {
|
|
114
|
-
return await t.text() || `HTTP ${t.status}`;
|
|
115
|
-
}
|
|
116
|
-
const J = {
|
|
117
|
-
async getAll() {
|
|
118
|
-
const t = await fetch("/api/v1/shapes/get-all");
|
|
119
|
-
if (!t.ok)
|
|
120
|
-
throw new Error(await C(t));
|
|
121
|
-
const e = await t.json();
|
|
122
|
-
return Array.isArray(e) ? e : [];
|
|
123
|
-
},
|
|
124
|
-
async getById(t) {
|
|
125
|
-
const e = await fetch(`/api/v1/shapes/${t}`);
|
|
126
|
-
if (!e.ok)
|
|
127
|
-
throw new Error(await C(e));
|
|
128
|
-
return await e.json();
|
|
129
|
-
},
|
|
130
|
-
async addToBoard(t, e, n, r) {
|
|
131
|
-
const i = await fetch("/api/v1/shapes/board", {
|
|
132
|
-
method: "POST",
|
|
133
|
-
headers: { "Content-Type": "application/json" },
|
|
134
|
-
body: JSON.stringify({ shapeId: t, width: e, height: n, rotation: r })
|
|
135
|
-
});
|
|
136
|
-
if (!i.ok)
|
|
137
|
-
throw new Error(await C(i));
|
|
138
|
-
return await i.json();
|
|
139
|
-
},
|
|
140
|
-
async getBoard() {
|
|
141
|
-
const t = await fetch("/api/v1/shapes/board");
|
|
142
|
-
if (!t.ok)
|
|
143
|
-
throw new Error(await C(t));
|
|
144
|
-
const e = await t.json();
|
|
145
|
-
return Array.isArray(e) ? e : [];
|
|
146
|
-
},
|
|
147
|
-
async getBoardById(t) {
|
|
148
|
-
const e = await fetch(`/api/v1/shapes/board/${t}`);
|
|
149
|
-
if (!e.ok)
|
|
150
|
-
throw new Error(await C(e));
|
|
151
|
-
return await e.json();
|
|
152
|
-
},
|
|
153
|
-
async updateBoardTransform(t, e, n, r) {
|
|
154
|
-
const i = await fetch(`/api/v1/shapes/board/${t}/transform`, {
|
|
155
|
-
method: "PATCH",
|
|
156
|
-
headers: { "Content-Type": "application/json" },
|
|
157
|
-
body: JSON.stringify({ width: e, height: n, rotation: r })
|
|
158
|
-
});
|
|
159
|
-
if (!i.ok)
|
|
160
|
-
throw new Error(await C(i));
|
|
161
|
-
return await i.json();
|
|
162
|
-
},
|
|
163
|
-
async delete(t) {
|
|
164
|
-
const e = await fetch(`/api/v1/shapes/${t}`, { method: "DELETE" });
|
|
165
|
-
if (!e.ok) throw new Error(await C(e));
|
|
166
|
-
return !0;
|
|
167
|
-
}
|
|
168
|
-
}, it = {
|
|
169
|
-
line: ({ stroke: t, sw: e = 2 }) => /* @__PURE__ */ s.jsx("line", { x1: "0", y1: "50%", x2: "100%", y2: "50%", stroke: t || "#000", strokeWidth: e, vectorEffect: "non-scaling-stroke" }),
|
|
170
|
-
arrow: ({ stroke: t, sw: e = 2 }) => /* @__PURE__ */ s.jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 100 100", children: [
|
|
171
|
-
/* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx(
|
|
172
|
-
"marker",
|
|
173
|
-
{
|
|
174
|
-
id: "arrowhead-end",
|
|
175
|
-
markerWidth: "10",
|
|
176
|
-
markerHeight: "10",
|
|
177
|
-
refX: "10",
|
|
178
|
-
refY: "5",
|
|
179
|
-
orient: "auto",
|
|
180
|
-
markerUnits: "strokeWidth",
|
|
181
|
-
children: /* @__PURE__ */ s.jsx("polygon", { points: "0 0, 10 5, 0 10", fill: t || "#000" })
|
|
182
|
-
}
|
|
183
|
-
) }),
|
|
184
|
-
/* @__PURE__ */ s.jsx(
|
|
185
|
-
"line",
|
|
186
|
-
{
|
|
187
|
-
x1: "0",
|
|
188
|
-
y1: "50",
|
|
189
|
-
x2: "100",
|
|
190
|
-
y2: "50",
|
|
191
|
-
stroke: t || "#000",
|
|
192
|
-
strokeWidth: e,
|
|
193
|
-
markerEnd: "url(#arrowhead-end)",
|
|
194
|
-
vectorEffect: "non-scaling-stroke"
|
|
195
|
-
}
|
|
196
|
-
)
|
|
197
|
-
] }),
|
|
198
|
-
dblarrow: ({ stroke: t, sw: e = 2 }) => /* @__PURE__ */ s.jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 100 100", children: [
|
|
199
|
-
/* @__PURE__ */ s.jsxs("defs", { children: [
|
|
200
|
-
/* @__PURE__ */ s.jsx(
|
|
201
|
-
"marker",
|
|
202
|
-
{
|
|
203
|
-
id: "arrowhead-end",
|
|
204
|
-
markerWidth: "10",
|
|
205
|
-
markerHeight: "10",
|
|
206
|
-
refX: "10",
|
|
207
|
-
refY: "5",
|
|
208
|
-
orient: "auto",
|
|
209
|
-
markerUnits: "strokeWidth",
|
|
210
|
-
children: /* @__PURE__ */ s.jsx("polygon", { points: "0 0, 10 5, 0 10", fill: t || "#000" })
|
|
211
|
-
}
|
|
212
|
-
),
|
|
213
|
-
/* @__PURE__ */ s.jsx(
|
|
214
|
-
"marker",
|
|
215
|
-
{
|
|
216
|
-
id: "arrowhead-start",
|
|
217
|
-
markerWidth: "10",
|
|
218
|
-
markerHeight: "10",
|
|
219
|
-
refX: "0",
|
|
220
|
-
refY: "5",
|
|
221
|
-
orient: "auto",
|
|
222
|
-
markerUnits: "strokeWidth",
|
|
223
|
-
children: /* @__PURE__ */ s.jsx("polygon", { points: "10 0, 0 5, 10 10", fill: t || "#000" })
|
|
224
|
-
}
|
|
225
|
-
)
|
|
226
|
-
] }),
|
|
227
|
-
/* @__PURE__ */ s.jsx(
|
|
228
|
-
"line",
|
|
229
|
-
{
|
|
230
|
-
x1: "0",
|
|
231
|
-
y1: "50",
|
|
232
|
-
x2: "100",
|
|
233
|
-
y2: "50",
|
|
234
|
-
stroke: t || "#000",
|
|
235
|
-
strokeWidth: e,
|
|
236
|
-
markerStart: "url(#arrowhead-start)",
|
|
237
|
-
markerEnd: "url(#arrowhead-end)",
|
|
238
|
-
vectorEffect: "non-scaling-stroke"
|
|
239
|
-
}
|
|
240
|
-
)
|
|
241
|
-
] }),
|
|
242
|
-
square: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
243
|
-
circle: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("ellipse", { cx: "50%", cy: "50%", rx: "50%", ry: "50%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
244
|
-
triangle: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("polygon", { points: "50,0 100,100 0,100", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
245
|
-
star: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("polygon", { points: "50,0 61,35 98,35 68,57 79,91 50,70 21,91 32,57 2,35 39,35", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
246
|
-
parallelogram: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("polygon", { points: "20,0 100,0 80,100 0,100", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
247
|
-
roundedRect: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", rx: "20", ry: "20", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
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" }),
|
|
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" }),
|
|
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" }) }),
|
|
251
|
-
table3x3: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
252
|
-
/* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, 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" })
|
|
257
|
-
] }),
|
|
258
|
-
table3x3LeftMerge: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
259
|
-
/* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, 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" })
|
|
264
|
-
] }),
|
|
265
|
-
pyramid: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
266
|
-
/* @__PURE__ */ s.jsx("polygon", { points: "50,0 100,100 0,100", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
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))
|
|
268
|
-
] }),
|
|
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: [
|
|
270
|
-
/* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx(
|
|
271
|
-
"marker",
|
|
272
|
-
{
|
|
273
|
-
id: "arrowhead-circle",
|
|
274
|
-
markerWidth: "8",
|
|
275
|
-
markerHeight: "8",
|
|
276
|
-
refX: "4",
|
|
277
|
-
refY: "4",
|
|
278
|
-
orient: "auto",
|
|
279
|
-
markerUnits: "strokeWidth",
|
|
280
|
-
children: /* @__PURE__ */ s.jsx("polygon", { points: "0 0, 8 4, 0 8", fill: e || "#000" })
|
|
281
|
-
}
|
|
282
|
-
) }),
|
|
283
|
-
/* @__PURE__ */ s.jsx(
|
|
284
|
-
"circle",
|
|
285
|
-
{
|
|
286
|
-
cx: "50",
|
|
287
|
-
cy: "50",
|
|
288
|
-
r: "48",
|
|
289
|
-
fill: t || "transparent",
|
|
290
|
-
stroke: e || "#000",
|
|
291
|
-
strokeWidth: n,
|
|
292
|
-
vectorEffect: "non-scaling-stroke"
|
|
293
|
-
}
|
|
294
|
-
),
|
|
295
|
-
/* @__PURE__ */ s.jsx(
|
|
296
|
-
"line",
|
|
297
|
-
{
|
|
298
|
-
x1: "50",
|
|
299
|
-
y1: "2",
|
|
300
|
-
x2: "50",
|
|
301
|
-
y2: "-20",
|
|
302
|
-
stroke: e || "#000",
|
|
303
|
-
strokeWidth: n,
|
|
304
|
-
markerEnd: "url(#arrowhead-circle)",
|
|
305
|
-
vectorEffect: "non-scaling-stroke"
|
|
306
|
-
}
|
|
307
|
-
)
|
|
308
|
-
] })
|
|
309
|
-
};
|
|
310
|
-
var Z = "http://www.w3.org/1999/xhtml";
|
|
311
|
-
const st = {
|
|
312
|
-
svg: "http://www.w3.org/2000/svg",
|
|
313
|
-
xhtml: Z,
|
|
314
|
-
xlink: "http://www.w3.org/1999/xlink",
|
|
315
|
-
xml: "http://www.w3.org/XML/1998/namespace",
|
|
316
|
-
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
317
|
-
};
|
|
318
|
-
function lt(t) {
|
|
319
|
-
var e = t += "", n = e.indexOf(":");
|
|
320
|
-
return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), st.hasOwnProperty(e) ? { space: st[e], local: t } : t;
|
|
321
|
-
}
|
|
322
|
-
function Nt(t) {
|
|
323
|
-
return function() {
|
|
324
|
-
var e = this.ownerDocument, n = this.namespaceURI;
|
|
325
|
-
return n === Z && e.documentElement.namespaceURI === Z ? e.createElement(t) : e.createElementNS(n, t);
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
function Bt(t) {
|
|
329
|
-
return function() {
|
|
330
|
-
return this.ownerDocument.createElementNS(t.space, t.local);
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
function ct(t) {
|
|
334
|
-
var e = lt(t);
|
|
335
|
-
return (e.local ? Bt : Nt)(e);
|
|
336
|
-
}
|
|
337
|
-
function Rt() {
|
|
338
|
-
}
|
|
339
|
-
function ht(t) {
|
|
340
|
-
return t == null ? Rt : function() {
|
|
341
|
-
return this.querySelector(t);
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
function zt(t) {
|
|
345
|
-
typeof t != "function" && (t = ht(t));
|
|
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)
|
|
348
|
-
(h = o[d]) && (u = t.call(h, h.__data__, d, o)) && ("__data__" in h && (u.__data__ = h.__data__), l[d] = u);
|
|
349
|
-
return new E(r, this._parents);
|
|
350
|
-
}
|
|
351
|
-
function Tt(t) {
|
|
352
|
-
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
|
|
353
|
-
}
|
|
354
|
-
function Mt() {
|
|
355
|
-
return [];
|
|
356
|
-
}
|
|
357
|
-
function Pt(t) {
|
|
358
|
-
return t == null ? Mt : function() {
|
|
359
|
-
return this.querySelectorAll(t);
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
function It(t) {
|
|
363
|
-
return function() {
|
|
364
|
-
return Tt(t.apply(this, arguments));
|
|
365
|
-
};
|
|
366
|
-
}
|
|
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)
|
|
370
|
-
for (var a = e[o], l = a.length, h, u = 0; u < l; ++u)
|
|
371
|
-
(h = a[u]) && (r.push(t.call(h, h.__data__, u, a)), i.push(h));
|
|
372
|
-
return new E(r, i);
|
|
373
|
-
}
|
|
374
|
-
function Ht(t) {
|
|
375
|
-
return function() {
|
|
376
|
-
return this.matches(t);
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
function ut(t) {
|
|
380
|
-
return function(e) {
|
|
381
|
-
return e.matches(t);
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
var Lt = Array.prototype.find;
|
|
385
|
-
function Dt(t) {
|
|
386
|
-
return function() {
|
|
387
|
-
return Lt.call(this.children, t);
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
function Vt() {
|
|
391
|
-
return this.firstElementChild;
|
|
392
|
-
}
|
|
393
|
-
function Ot(t) {
|
|
394
|
-
return this.select(t == null ? Vt : Dt(typeof t == "function" ? t : ut(t)));
|
|
395
|
-
}
|
|
396
|
-
var qt = Array.prototype.filter;
|
|
397
|
-
function Xt() {
|
|
398
|
-
return Array.from(this.children);
|
|
399
|
-
}
|
|
400
|
-
function $t(t) {
|
|
401
|
-
return function() {
|
|
402
|
-
return qt.call(this.children, t);
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
function Ut(t) {
|
|
406
|
-
return this.selectAll(t == null ? Xt : $t(typeof t == "function" ? t : ut(t)));
|
|
407
|
-
}
|
|
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)
|
|
412
|
-
(h = o[u]) && t.call(h, h.__data__, u, o) && l.push(h);
|
|
413
|
-
return new E(r, this._parents);
|
|
414
|
-
}
|
|
415
|
-
function ft(t) {
|
|
416
|
-
return new Array(t.length);
|
|
417
|
-
}
|
|
418
|
-
function Kt() {
|
|
419
|
-
return new E(this._enter || this._groups.map(ft), this._parents);
|
|
420
|
-
}
|
|
421
|
-
function U(t, e) {
|
|
422
|
-
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
|
|
423
|
-
}
|
|
424
|
-
U.prototype = {
|
|
425
|
-
constructor: U,
|
|
426
|
-
appendChild: function(t) {
|
|
427
|
-
return this._parent.insertBefore(t, this._next);
|
|
428
|
-
},
|
|
429
|
-
insertBefore: function(t, e) {
|
|
430
|
-
return this._parent.insertBefore(t, e);
|
|
431
|
-
},
|
|
432
|
-
querySelector: function(t) {
|
|
433
|
-
return this._parent.querySelector(t);
|
|
434
|
-
},
|
|
435
|
-
querySelectorAll: function(t) {
|
|
436
|
-
return this._parent.querySelectorAll(t);
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
function Jt(t) {
|
|
440
|
-
return function() {
|
|
441
|
-
return t;
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
function Zt(t, e, n, r, i, o) {
|
|
445
|
-
for (var a = 0, l, h = e.length, u = o.length; a < u; ++a)
|
|
446
|
-
(l = e[a]) ? (l.__data__ = o[a], r[a] = l) : n[a] = new U(t, o[a]);
|
|
447
|
-
for (; a < h; ++a)
|
|
448
|
-
(l = e[a]) && (i[a] = l);
|
|
449
|
-
}
|
|
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;
|
|
452
|
-
for (l = 0; l < d; ++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]);
|
|
456
|
-
for (l = 0; l < d; ++l)
|
|
457
|
-
(h = e[l]) && u.get(g[l]) === h && (i[l] = h);
|
|
458
|
-
}
|
|
459
|
-
function Qt(t) {
|
|
460
|
-
return t.__data__;
|
|
461
|
-
}
|
|
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;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
return a = new E(a, r), a._enter = l, a._exit = h, a;
|
|
476
|
-
}
|
|
477
|
-
function ee(t) {
|
|
478
|
-
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
479
|
-
}
|
|
480
|
-
function ne() {
|
|
481
|
-
return new E(this._exit || this._groups.map(ft), this._parents);
|
|
482
|
-
}
|
|
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;
|
|
486
|
-
}
|
|
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)
|
|
492
|
-
l[h] = n[h];
|
|
493
|
-
return new E(l, this._parents);
|
|
494
|
-
}
|
|
495
|
-
function se() {
|
|
496
|
-
for (var t = this._groups, e = -1, n = t.length; ++e < n; )
|
|
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);
|
|
499
|
-
return this;
|
|
500
|
-
}
|
|
501
|
-
function oe(t) {
|
|
502
|
-
t || (t = ae);
|
|
503
|
-
function e(x, g) {
|
|
504
|
-
return x && g ? t(x.__data__, g.__data__) : !x - !g;
|
|
505
|
-
}
|
|
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)
|
|
508
|
-
(u = a[d]) && (h[d] = u);
|
|
509
|
-
h.sort(e);
|
|
510
|
-
}
|
|
511
|
-
return new E(i, this._parents).order();
|
|
512
|
-
}
|
|
513
|
-
function ae(t, e) {
|
|
514
|
-
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
515
|
-
}
|
|
516
|
-
function le() {
|
|
517
|
-
var t = arguments[0];
|
|
518
|
-
return arguments[0] = this, t.apply(null, arguments), this;
|
|
519
|
-
}
|
|
520
|
-
function ce() {
|
|
521
|
-
return Array.from(this);
|
|
522
|
-
}
|
|
523
|
-
function he() {
|
|
524
|
-
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
525
|
-
for (var r = t[e], i = 0, o = r.length; i < o; ++i) {
|
|
526
|
-
var a = r[i];
|
|
527
|
-
if (a) return a;
|
|
528
|
-
}
|
|
529
|
-
return null;
|
|
530
|
-
}
|
|
531
|
-
function ue() {
|
|
532
|
-
let t = 0;
|
|
533
|
-
for (const e of this) ++t;
|
|
534
|
-
return t;
|
|
535
|
-
}
|
|
536
|
-
function fe() {
|
|
537
|
-
return !this.node();
|
|
538
|
-
}
|
|
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);
|
|
543
|
-
return this;
|
|
544
|
-
}
|
|
545
|
-
function ge(t) {
|
|
546
|
-
return function() {
|
|
547
|
-
this.removeAttribute(t);
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
function pe(t) {
|
|
551
|
-
return function() {
|
|
552
|
-
this.removeAttributeNS(t.space, t.local);
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
function ye(t, e) {
|
|
556
|
-
return function() {
|
|
557
|
-
this.setAttribute(t, e);
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
function we(t, e) {
|
|
561
|
-
return function() {
|
|
562
|
-
this.setAttributeNS(t.space, t.local, e);
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
function xe(t, e) {
|
|
566
|
-
return function() {
|
|
567
|
-
var n = e.apply(this, arguments);
|
|
568
|
-
n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
function me(t, e) {
|
|
572
|
-
return function() {
|
|
573
|
-
var n = e.apply(this, arguments);
|
|
574
|
-
n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
function ve(t, e) {
|
|
578
|
-
var n = lt(t);
|
|
579
|
-
if (arguments.length < 2) {
|
|
580
|
-
var r = this.node();
|
|
581
|
-
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
582
|
-
}
|
|
583
|
-
return this.each((e == null ? n.local ? pe : ge : typeof e == "function" ? n.local ? me : xe : n.local ? we : ye)(n, e));
|
|
584
|
-
}
|
|
585
|
-
function dt(t) {
|
|
586
|
-
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
|
|
587
|
-
}
|
|
588
|
-
function ke(t) {
|
|
589
|
-
return function() {
|
|
590
|
-
this.style.removeProperty(t);
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
function _e(t, e, n) {
|
|
594
|
-
return function() {
|
|
595
|
-
this.style.setProperty(t, e, n);
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
function be(t, e, n) {
|
|
599
|
-
return function() {
|
|
600
|
-
var r = e.apply(this, arguments);
|
|
601
|
-
r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
|
|
602
|
-
};
|
|
603
|
-
}
|
|
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);
|
|
606
|
-
}
|
|
607
|
-
function Ee(t, e) {
|
|
608
|
-
return t.style.getPropertyValue(e) || dt(t).getComputedStyle(t, null).getPropertyValue(e);
|
|
609
|
-
}
|
|
610
|
-
function Se(t) {
|
|
611
|
-
return function() {
|
|
612
|
-
delete this[t];
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
function We(t, e) {
|
|
616
|
-
return function() {
|
|
617
|
-
this[t] = e;
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
function Ae(t, e) {
|
|
621
|
-
return function() {
|
|
622
|
-
var n = e.apply(this, arguments);
|
|
623
|
-
n == null ? delete this[t] : this[t] = n;
|
|
624
|
-
};
|
|
625
|
-
}
|
|
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];
|
|
628
|
-
}
|
|
629
|
-
function gt(t) {
|
|
630
|
-
return t.trim().split(/^|\s+/);
|
|
631
|
-
}
|
|
632
|
-
function Q(t) {
|
|
633
|
-
return t.classList || new pt(t);
|
|
634
|
-
}
|
|
635
|
-
function pt(t) {
|
|
636
|
-
this._node = t, this._names = gt(t.getAttribute("class") || "");
|
|
637
|
-
}
|
|
638
|
-
pt.prototype = {
|
|
639
|
-
add: function(t) {
|
|
640
|
-
var e = this._names.indexOf(t);
|
|
641
|
-
e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
|
|
642
|
-
},
|
|
643
|
-
remove: function(t) {
|
|
644
|
-
var e = this._names.indexOf(t);
|
|
645
|
-
e >= 0 && (this._names.splice(e, 1), this._node.setAttribute("class", this._names.join(" ")));
|
|
646
|
-
},
|
|
647
|
-
contains: function(t) {
|
|
648
|
-
return this._names.indexOf(t) >= 0;
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
function yt(t, e) {
|
|
652
|
-
for (var n = Q(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
|
|
653
|
-
}
|
|
654
|
-
function wt(t, e) {
|
|
655
|
-
for (var n = Q(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
|
|
656
|
-
}
|
|
657
|
-
function Ne(t) {
|
|
658
|
-
return function() {
|
|
659
|
-
yt(this, t);
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
function Be(t) {
|
|
663
|
-
return function() {
|
|
664
|
-
wt(this, t);
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
function Re(t, e) {
|
|
668
|
-
return function() {
|
|
669
|
-
(e.apply(this, arguments) ? yt : wt)(this, t);
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
function ze(t, e) {
|
|
673
|
-
var n = gt(t + "");
|
|
674
|
-
if (arguments.length < 2) {
|
|
675
|
-
for (var r = Q(this.node()), i = -1, o = n.length; ++i < o; ) if (!r.contains(n[i])) return !1;
|
|
676
|
-
return !0;
|
|
677
|
-
}
|
|
678
|
-
return this.each((typeof e == "function" ? Re : e ? Ne : Be)(n, e));
|
|
679
|
-
}
|
|
680
|
-
function Te() {
|
|
681
|
-
this.textContent = "";
|
|
682
|
-
}
|
|
683
|
-
function Me(t) {
|
|
684
|
-
return function() {
|
|
685
|
-
this.textContent = t;
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
function Pe(t) {
|
|
689
|
-
return function() {
|
|
690
|
-
var e = t.apply(this, arguments);
|
|
691
|
-
this.textContent = e ?? "";
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
function Ie(t) {
|
|
695
|
-
return arguments.length ? this.each(t == null ? Te : (typeof t == "function" ? Pe : Me)(t)) : this.node().textContent;
|
|
696
|
-
}
|
|
697
|
-
function Fe() {
|
|
698
|
-
this.innerHTML = "";
|
|
699
|
-
}
|
|
700
|
-
function He(t) {
|
|
701
|
-
return function() {
|
|
702
|
-
this.innerHTML = t;
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
function Le(t) {
|
|
706
|
-
return function() {
|
|
707
|
-
var e = t.apply(this, arguments);
|
|
708
|
-
this.innerHTML = e ?? "";
|
|
709
|
-
};
|
|
710
|
-
}
|
|
711
|
-
function De(t) {
|
|
712
|
-
return arguments.length ? this.each(t == null ? Fe : (typeof t == "function" ? Le : He)(t)) : this.node().innerHTML;
|
|
713
|
-
}
|
|
714
|
-
function Ve() {
|
|
715
|
-
this.nextSibling && this.parentNode.appendChild(this);
|
|
716
|
-
}
|
|
717
|
-
function Oe() {
|
|
718
|
-
return this.each(Ve);
|
|
719
|
-
}
|
|
720
|
-
function qe() {
|
|
721
|
-
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
722
|
-
}
|
|
723
|
-
function Xe() {
|
|
724
|
-
return this.each(qe);
|
|
725
|
-
}
|
|
726
|
-
function $e(t) {
|
|
727
|
-
var e = typeof t == "function" ? t : ct(t);
|
|
728
|
-
return this.select(function() {
|
|
729
|
-
return this.appendChild(e.apply(this, arguments));
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
function Ue() {
|
|
733
|
-
return null;
|
|
734
|
-
}
|
|
735
|
-
function Ye(t, e) {
|
|
736
|
-
var n = typeof t == "function" ? t : ct(t), r = e == null ? Ue : typeof e == "function" ? e : ht(e);
|
|
737
|
-
return this.select(function() {
|
|
738
|
-
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
function Ke() {
|
|
742
|
-
var t = this.parentNode;
|
|
743
|
-
t && t.removeChild(this);
|
|
744
|
-
}
|
|
745
|
-
function Je() {
|
|
746
|
-
return this.each(Ke);
|
|
747
|
-
}
|
|
748
|
-
function Ze() {
|
|
749
|
-
var t = this.cloneNode(!1), e = this.parentNode;
|
|
750
|
-
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
751
|
-
}
|
|
752
|
-
function Ge() {
|
|
753
|
-
var t = this.cloneNode(!0), e = this.parentNode;
|
|
754
|
-
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
755
|
-
}
|
|
756
|
-
function Qe(t) {
|
|
757
|
-
return this.select(t ? Ge : Ze);
|
|
758
|
-
}
|
|
759
|
-
function tn(t) {
|
|
760
|
-
return arguments.length ? this.property("__data__", t) : this.node().__data__;
|
|
761
|
-
}
|
|
762
|
-
function en(t) {
|
|
763
|
-
return function(e) {
|
|
764
|
-
t.call(this, e, this.__data__);
|
|
765
|
-
};
|
|
766
|
-
}
|
|
767
|
-
function nn(t) {
|
|
768
|
-
return t.trim().split(/^|\s+/).map(function(e) {
|
|
769
|
-
var n = "", r = e.indexOf(".");
|
|
770
|
-
return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
function rn(t) {
|
|
774
|
-
return function() {
|
|
775
|
-
var e = this.__on;
|
|
776
|
-
if (e) {
|
|
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;
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
function sn(t, e, n) {
|
|
784
|
-
return function() {
|
|
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;
|
|
790
|
-
return;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
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];
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
function on(t, e, n) {
|
|
797
|
-
var r = nn(t + ""), i, o = r.length, a;
|
|
798
|
-
if (arguments.length < 2) {
|
|
799
|
-
var l = this.node().__on;
|
|
800
|
-
if (l) {
|
|
801
|
-
for (var h = 0, u = l.length, d; h < u; ++h)
|
|
802
|
-
for (i = 0, d = l[h]; i < o; ++i)
|
|
803
|
-
if ((a = r[i]).type === d.type && a.name === d.name)
|
|
804
|
-
return d.value;
|
|
805
|
-
}
|
|
806
|
-
return;
|
|
807
|
-
}
|
|
808
|
-
for (l = e ? sn : rn, i = 0; i < o; ++i) this.each(l(r[i], e, n));
|
|
809
|
-
return this;
|
|
810
|
-
}
|
|
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);
|
|
814
|
-
}
|
|
815
|
-
function an(t, e) {
|
|
816
|
-
return function() {
|
|
817
|
-
return xt(this, t, e);
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
|
-
function ln(t, e) {
|
|
821
|
-
return function() {
|
|
822
|
-
return xt(this, t, e.apply(this, arguments));
|
|
823
|
-
};
|
|
824
|
-
}
|
|
825
|
-
function cn(t, e) {
|
|
826
|
-
return this.each((typeof e == "function" ? ln : an)(t, e));
|
|
827
|
-
}
|
|
828
|
-
function* hn() {
|
|
829
|
-
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
830
|
-
for (var r = t[e], i = 0, o = r.length, a; i < o; ++i)
|
|
831
|
-
(a = r[i]) && (yield a);
|
|
832
|
-
}
|
|
833
|
-
var un = [null];
|
|
834
|
-
function E(t, e) {
|
|
835
|
-
this._groups = t, this._parents = e;
|
|
836
|
-
}
|
|
837
|
-
function fn() {
|
|
838
|
-
return this;
|
|
839
|
-
}
|
|
840
|
-
E.prototype = {
|
|
841
|
-
constructor: E,
|
|
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
|
|
877
|
-
};
|
|
878
|
-
function H(t) {
|
|
879
|
-
return typeof t == "string" ? new E([[document.querySelector(t)]], [document.documentElement]) : new E([[t]], un);
|
|
880
|
-
}
|
|
881
|
-
function dn(t) {
|
|
882
|
-
let e;
|
|
883
|
-
for (; e = t.sourceEvent; ) t = e;
|
|
884
|
-
return t;
|
|
885
|
-
}
|
|
886
|
-
function ot(t, e) {
|
|
887
|
-
if (t = dn(t), e === void 0 && (e = t.currentTarget), e) {
|
|
888
|
-
var n = e.ownerSVGElement || e;
|
|
889
|
-
if (n.createSVGPoint) {
|
|
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];
|
|
892
|
-
}
|
|
893
|
-
if (e.getBoundingClientRect) {
|
|
894
|
-
var i = e.getBoundingClientRect();
|
|
895
|
-
return [t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop];
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
return [t.pageX, t.pageY];
|
|
899
|
-
}
|
|
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: () => {
|
|
902
|
-
} };
|
|
903
|
-
function mt() {
|
|
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] = [];
|
|
907
|
-
}
|
|
908
|
-
return new $(n);
|
|
909
|
-
}
|
|
910
|
-
function $(t) {
|
|
911
|
-
this._ = t;
|
|
912
|
-
}
|
|
913
|
-
function yn(t, e) {
|
|
914
|
-
return t.trim().split(/^|\s+/).map(function(n) {
|
|
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 };
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
$.prototype = mt.prototype = {
|
|
921
|
-
constructor: $,
|
|
922
|
-
on: function(t, e) {
|
|
923
|
-
var n = this._, r = yn(t + "", n), i, o = -1, a = r.length;
|
|
924
|
-
if (arguments.length < 2) {
|
|
925
|
-
for (; ++o < a; ) if ((i = (t = r[o]).type) && (i = wn(n[i], t.name))) return i;
|
|
926
|
-
return;
|
|
927
|
-
}
|
|
928
|
-
if (e != null && typeof e != "function") throw new Error("invalid callback: " + e);
|
|
929
|
-
for (; ++o < a; )
|
|
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);
|
|
932
|
-
return this;
|
|
933
|
-
},
|
|
934
|
-
copy: function() {
|
|
935
|
-
var t = {}, e = this._;
|
|
936
|
-
for (var n in e) t[n] = e[n].slice();
|
|
937
|
-
return new $(t);
|
|
938
|
-
},
|
|
939
|
-
call: function(t, e) {
|
|
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];
|
|
941
|
-
if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
942
|
-
for (o = this._[t], r = 0, i = o.length; r < i; ++r) o[r].value.apply(e, n);
|
|
943
|
-
},
|
|
944
|
-
apply: function(t, e, n) {
|
|
945
|
-
if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
946
|
-
for (var r = this._[t], i = 0, o = r.length; i < o; ++i) r[i].value.apply(e, n);
|
|
947
|
-
}
|
|
948
|
-
};
|
|
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;
|
|
953
|
-
}
|
|
954
|
-
function at(t, e, n) {
|
|
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));
|
|
958
|
-
break;
|
|
959
|
-
}
|
|
960
|
-
return n != null && t.push({ name: e, value: n }), t;
|
|
961
|
-
}
|
|
962
|
-
const xn = { passive: !1 }, L = { capture: !0, passive: !1 };
|
|
963
|
-
function K(t) {
|
|
964
|
-
t.stopImmediatePropagation();
|
|
965
|
-
}
|
|
966
|
-
function M(t) {
|
|
967
|
-
t.preventDefault(), t.stopImmediatePropagation();
|
|
968
|
-
}
|
|
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");
|
|
972
|
-
}
|
|
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);
|
|
978
|
-
}
|
|
979
|
-
const q = (t) => () => t;
|
|
980
|
-
function G(t, {
|
|
981
|
-
sourceEvent: e,
|
|
982
|
-
subject: n,
|
|
983
|
-
target: r,
|
|
984
|
-
identifier: i,
|
|
985
|
-
active: o,
|
|
986
|
-
x: a,
|
|
987
|
-
y: l,
|
|
988
|
-
dx: h,
|
|
989
|
-
dy: u,
|
|
990
|
-
dispatch: d
|
|
991
|
-
}) {
|
|
992
|
-
Object.defineProperties(this, {
|
|
993
|
-
type: { value: t, enumerable: !0, configurable: !0 },
|
|
994
|
-
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
|
|
995
|
-
subject: { value: n, enumerable: !0, configurable: !0 },
|
|
996
|
-
target: { value: r, enumerable: !0, configurable: !0 },
|
|
997
|
-
identifier: { value: i, enumerable: !0, configurable: !0 },
|
|
998
|
-
active: { value: o, enumerable: !0, configurable: !0 },
|
|
999
|
-
x: { value: a, enumerable: !0, configurable: !0 },
|
|
1000
|
-
y: { value: l, enumerable: !0, configurable: !0 },
|
|
1001
|
-
dx: { value: h, enumerable: !0, configurable: !0 },
|
|
1002
|
-
dy: { value: u, enumerable: !0, configurable: !0 },
|
|
1003
|
-
_: { value: d }
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
G.prototype.on = function() {
|
|
1007
|
-
var t = this._.on.apply(this._, arguments);
|
|
1008
|
-
return t === this._ ? this : t;
|
|
1009
|
-
};
|
|
1010
|
-
function kn(t) {
|
|
1011
|
-
return !t.ctrlKey && !t.button;
|
|
1012
|
-
}
|
|
1013
|
-
function _n() {
|
|
1014
|
-
return this.parentNode;
|
|
1015
|
-
}
|
|
1016
|
-
function bn(t, e) {
|
|
1017
|
-
return e ?? { x: t.x, y: t.y };
|
|
1018
|
-
}
|
|
1019
|
-
function jn() {
|
|
1020
|
-
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1021
|
-
}
|
|
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)");
|
|
1026
|
-
}
|
|
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));
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
function v(c) {
|
|
1034
|
-
if (M(c), !u) {
|
|
1035
|
-
var f = c.clientX - l, p = c.clientY - h;
|
|
1036
|
-
u = f * f + p * p > x;
|
|
1037
|
-
}
|
|
1038
|
-
i.mouse("drag", c);
|
|
1039
|
-
}
|
|
1040
|
-
function S(c) {
|
|
1041
|
-
H(c.view).on("mousemove.drag mouseup.drag", null), vn(c.view, u), M(c), i.mouse("end", c);
|
|
1042
|
-
}
|
|
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]));
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
function N(c) {
|
|
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]));
|
|
1054
|
-
}
|
|
1055
|
-
function j(c) {
|
|
1056
|
-
var f = c.changedTouches, p = f.length, y, w;
|
|
1057
|
-
for (d && clearTimeout(d), d = setTimeout(function() {
|
|
1058
|
-
d = null;
|
|
1059
|
-
}, 500), y = 0; y < p; ++y)
|
|
1060
|
-
(w = i[f[y].identifier]) && (K(c), w("end", c, f[y]));
|
|
1061
|
-
}
|
|
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,
|
|
1068
|
-
active: a,
|
|
1069
|
-
x: b[0],
|
|
1070
|
-
y: b[1],
|
|
1071
|
-
dx: 0,
|
|
1072
|
-
dy: 0,
|
|
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) {
|
|
1078
|
-
case "start":
|
|
1079
|
-
i[w] = tt, Y = a++;
|
|
1080
|
-
break;
|
|
1081
|
-
case "end":
|
|
1082
|
-
delete i[w], --a;
|
|
1083
|
-
case "drag":
|
|
1084
|
-
b = ot(O || P, f), Y = a;
|
|
1085
|
-
break;
|
|
1086
|
-
}
|
|
1087
|
-
_.call(
|
|
1088
|
-
R,
|
|
1089
|
-
c,
|
|
1090
|
-
new G(R, {
|
|
1091
|
-
sourceEvent: P,
|
|
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: _
|
|
1101
|
-
}),
|
|
1102
|
-
y
|
|
1103
|
-
);
|
|
1104
|
-
};
|
|
1105
|
-
}
|
|
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() {
|
|
1115
|
-
var c = o.on.apply(o, arguments);
|
|
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;
|
|
1120
|
-
}
|
|
1121
|
-
const Sn = ({ id: t, data: e, style: n }) => {
|
|
1122
|
-
const r = z(
|
|
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);
|
|
1125
|
-
T(() => {
|
|
1126
|
-
if (!r) return;
|
|
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);
|
|
1129
|
-
}, [r]), T(() => {
|
|
1130
|
-
d.current = g;
|
|
1131
|
-
}, [g]), T(() => {
|
|
1132
|
-
if (!r || !j) return;
|
|
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);
|
|
1138
|
-
}).on("drag", (w) => {
|
|
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);
|
|
1144
|
-
}).on("end", () => {
|
|
1145
|
-
N(!1);
|
|
1146
|
-
const w = Number(d.current) || 0;
|
|
1147
|
-
i(r.id, { rotation: w });
|
|
1148
|
-
});
|
|
1149
|
-
return p.call(y), () => p.on(".drag", null);
|
|
1150
|
-
}, [j, r, i]);
|
|
1151
|
-
const A = _t(() => {
|
|
1152
|
-
if (!r) return null;
|
|
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));
|
|
1157
|
-
};
|
|
1158
|
-
return r ? /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(
|
|
1159
|
-
"div",
|
|
1160
|
-
{
|
|
1161
|
-
onClick: c,
|
|
1162
|
-
className: "dragHandle__custom",
|
|
1163
|
-
style: {
|
|
1164
|
-
...n,
|
|
1165
|
-
position: "relative",
|
|
1166
|
-
zIndex: r.zIndex,
|
|
1167
|
-
cursor: W ? "grabbing" : "grab",
|
|
1168
|
-
width: v.width,
|
|
1169
|
-
height: v.height,
|
|
1170
|
-
transform: `rotate(${g}deg)`,
|
|
1171
|
-
transformOrigin: "50% 50%",
|
|
1172
|
-
pointerEvents: "auto"
|
|
1173
|
-
},
|
|
1174
|
-
"data-drag-disabled": W,
|
|
1175
|
-
children: [
|
|
1176
|
-
/* @__PURE__ */ s.jsx(
|
|
1177
|
-
jt,
|
|
1178
|
-
{
|
|
1179
|
-
isVisible: j,
|
|
1180
|
-
minWidth: 30,
|
|
1181
|
-
minHeight: 30,
|
|
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 };
|
|
1195
|
-
},
|
|
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 });
|
|
1201
|
-
try {
|
|
1202
|
-
await J.updateBoardTransform(t, y, w, k);
|
|
1203
|
-
} catch (_) {
|
|
1204
|
-
console.warn("Не удалось сохранить размеры фигуры", _);
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
),
|
|
1209
|
-
/* @__PURE__ */ s.jsx(
|
|
1210
|
-
"svg",
|
|
1211
|
-
{
|
|
1212
|
-
width: v.width,
|
|
1213
|
-
height: v.height,
|
|
1214
|
-
viewBox: "0 0 100 100",
|
|
1215
|
-
preserveAspectRatio: "none",
|
|
1216
|
-
children: A
|
|
1217
|
-
}
|
|
1218
|
-
),
|
|
1219
|
-
j && /* @__PURE__ */ s.jsx(
|
|
1220
|
-
"div",
|
|
1221
|
-
{
|
|
1222
|
-
ref: u,
|
|
1223
|
-
className: "nodrag nopan",
|
|
1224
|
-
style: {
|
|
1225
|
-
position: "absolute",
|
|
1226
|
-
width: 15,
|
|
1227
|
-
height: 15,
|
|
1228
|
-
top: -24,
|
|
1229
|
-
right: -8,
|
|
1230
|
-
cursor: "grab",
|
|
1231
|
-
zIndex: 1e3,
|
|
1232
|
-
pointerEvents: "auto",
|
|
1233
|
-
transform: `translateX(-50%) rotate(${g}deg)`,
|
|
1234
|
-
transition: W ? "none" : "transform 0.15s ease-out"
|
|
1235
|
-
},
|
|
1236
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1237
|
-
"img",
|
|
1238
|
-
{
|
|
1239
|
-
src: gn,
|
|
1240
|
-
alt: "Rotate",
|
|
1241
|
-
draggable: !1,
|
|
1242
|
-
style: {
|
|
1243
|
-
width: "100%",
|
|
1244
|
-
height: "100%",
|
|
1245
|
-
objectFit: "contain"
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
)
|
|
1249
|
-
}
|
|
1250
|
-
),
|
|
1251
|
-
/* @__PURE__ */ s.jsx(nt, { type: "target", position: rt.Left, className: "z-100000" }),
|
|
1252
|
-
/* @__PURE__ */ s.jsx(nt, { type: "source", position: rt.Right, className: "z-100000" })
|
|
1253
|
-
]
|
|
1254
|
-
}
|
|
1255
|
-
) }) : null;
|
|
1256
|
-
}, Wn = {
|
|
1257
|
-
shape: Sn
|
|
1258
|
-
}, X = ({ children: t }) => /* @__PURE__ */ s.jsx("div", { children: t }), Bn = ({ nodeTypes: t }) => {
|
|
1259
|
-
const e = z((o) => o.setStickers);
|
|
1260
|
-
F(null);
|
|
1261
|
-
const [n, r] = I(() => X);
|
|
1262
|
-
({
|
|
1263
|
-
...Wn,
|
|
1264
|
-
...t || {}
|
|
1265
|
-
}, T(() => {
|
|
1266
|
-
(async () => {
|
|
1267
|
-
try {
|
|
1268
|
-
const [a, l] = await Promise.all([
|
|
1269
|
-
J.getAll(),
|
|
1270
|
-
J.getBoard()
|
|
1271
|
-
]), h = new Map(a.map((g) => [String(g.id), g.shapeId]));
|
|
1272
|
-
let u = 30, d = 30;
|
|
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,
|
|
1279
|
-
type: "shape",
|
|
1280
|
-
shapeId: W,
|
|
1281
|
-
shapeDbId: g.shapeId,
|
|
1282
|
-
x: u,
|
|
1283
|
-
y: d,
|
|
1284
|
-
width: m,
|
|
1285
|
-
height: v,
|
|
1286
|
-
rotation: S,
|
|
1287
|
-
zIndex: 1,
|
|
1288
|
-
fill: "transparent",
|
|
1289
|
-
stroke: "#000"
|
|
1290
|
-
}), u += 24, d += 24;
|
|
1291
|
-
}
|
|
1292
|
-
e(x);
|
|
1293
|
-
} catch (a) {
|
|
1294
|
-
console.warn("Не удалось загрузить доску для фигур:", a);
|
|
1295
|
-
}
|
|
1296
|
-
})();
|
|
1297
|
-
}, [e])), T(() => {
|
|
1298
|
-
let o = !0;
|
|
1299
|
-
return import("@xyflow/react").then((a) => {
|
|
1300
|
-
if (!o)
|
|
1301
|
-
return;
|
|
1302
|
-
const l = (a && (a.Widget || a.default || (a == null ? void 0 : a.widget) || (a == null ? void 0 : a.XyflowWidget))) ?? null;
|
|
1303
|
-
typeof l == "function" || kt.isValidElement(l) ? r(() => l) : r(() => X);
|
|
1304
|
-
}).catch(() => {
|
|
1305
|
-
o && r(() => X);
|
|
1306
|
-
}), () => {
|
|
1307
|
-
o = !1;
|
|
1308
|
-
};
|
|
1309
|
-
}, []);
|
|
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, {}) }) });
|
|
1312
|
-
};
|
|
1313
|
-
export {
|
|
1314
|
-
Bn as S,
|
|
1315
|
-
Et as a,
|
|
1316
|
-
J as b,
|
|
1317
|
-
Sn as c,
|
|
1318
|
-
Ct as d,
|
|
1319
|
-
Wn as s
|
|
1320
|
-
};
|
|
1321
|
-
//# sourceMappingURL=ShapeBoardWidget-BmgYD5zN.js.map
|