@weasel-js/labkit 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/_dts/{DrawCommand-uKHt4Vul.d.ts → DrawCommand-BkZztJsW.d.ts} +3 -1
- package/dist/_dts/{index-CFlDPeZh.d.ts → index-iAP6XbH3.d.ts} +17 -7
- package/dist/_dts/{useExperimentState-vrttakTt.d.ts → useTrialState-DYe2vUwN.d.ts} +62 -34
- package/dist/canvas/index.d.ts +1 -1
- package/dist/chunk-3TYUJR7Z.js +488 -0
- package/dist/chunk-3TYUJR7Z.js.map +1 -0
- package/dist/{chunk-N5KTQKQA.js → chunk-C6GJKPUI.js} +835 -770
- package/dist/chunk-C6GJKPUI.js.map +1 -0
- package/dist/{chunk-3WPOGKUP.js → chunk-DJLDIRFN.js} +543 -226
- package/dist/chunk-DJLDIRFN.js.map +1 -0
- package/dist/{chunk-73PXCRCR.js → chunk-NRKWVTVT.js} +6 -6
- package/dist/chunk-NRKWVTVT.js.map +1 -0
- package/dist/dragdrop/index.d.ts +1 -1
- package/dist/index.d.ts +197 -148
- package/dist/index.js +275 -161
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +2 -2
- package/dist/passthrough/weasel-canvas.d.ts +1 -1
- package/dist/passthrough/weasel-canvas.js +1 -1
- package/dist/passthrough/weasel-ui.d.ts +10 -3
- package/dist/passthrough/weasel-ui.js +2 -2
- package/dist/state/index.d.ts +14 -14
- package/dist/state/index.js +5 -5
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +179 -14
- package/dist/ui/layers/index.js +3 -3
- package/dist/undo/index.d.ts +1 -1
- package/package.json +2 -1
- package/src/canvas/AGENTS.md +6 -2
- package/src/dragdrop/dragDrop.test.tsx +4 -7
- package/src/index.test.ts +52 -0
- package/src/index.ts +11 -7
- package/src/instrument/SineWave.smoke.test.tsx +1 -1
- package/src/instrument/capabilityDetector.ts +1 -1
- package/src/instrument/types.ts +18 -6
- package/src/lab/Lab.less +16 -0
- package/src/lab/Lab.stories.tsx +5 -5
- package/src/lab/Lab.test.tsx +25 -25
- package/src/lab/Lab.tsx +56 -44
- package/src/lab/LabContext.ts +12 -11
- package/src/lab/LabShell.tsx +1 -1
- package/src/lab/Workspace.less +40 -0
- package/src/lab/{WorkspaceGrid.stories.tsx → Workspace.stories.tsx} +27 -11
- package/src/lab/Workspace.test.tsx +114 -0
- package/src/lab/Workspace.tsx +196 -0
- package/src/lab/index.ts +2 -4
- package/src/layers/AGENTS.md +3 -3
- package/src/primitives/Toolbar.stories.tsx +2 -2
- package/src/state/SingletonExperiment.test.tsx +8 -8
- package/src/state/SingletonExperiment.tsx +9 -9
- package/src/state/context.tsx +12 -12
- package/src/state/document.test.ts +369 -0
- package/src/state/document.ts +194 -0
- package/src/state/helpers.test.ts +74 -46
- package/src/state/helpers.ts +23 -31
- package/src/state/index.ts +16 -8
- package/src/state/store.test.ts +440 -40
- package/src/state/store.ts +166 -90
- package/src/state/types.ts +30 -10
- package/src/state/{useExperimentState.test.tsx → useTrialState.test.tsx} +18 -18
- package/src/state/useTrialState.ts +29 -0
- package/src/styles.less +2 -2
- package/src/test-setup.ts +19 -0
- package/src/theme/base.less +1 -1
- package/src/{workspace → trial}/DefaultSidebar.tsx +3 -3
- package/src/{workspace → trial}/DefaultStatusBar.tsx +5 -4
- package/src/{workspace → trial}/DefaultToolbar.tsx +9 -8
- package/src/trial/Trial.canvas.test.tsx +80 -0
- package/src/{workspace/Workspace.less → trial/Trial.less} +1 -1
- package/src/{workspace/Workspace.stories.tsx → trial/Trial.stories.tsx} +13 -17
- package/src/{workspace/Workspace.test.tsx → trial/Trial.test.tsx} +26 -25
- package/src/{workspace/Workspace.tsx → trial/Trial.tsx} +48 -43
- package/src/{workspace/WorkspaceChrome.tsx → trial/TrialChrome.tsx} +42 -42
- package/src/{workspace → trial}/index.ts +13 -12
- package/src/{workspace → trial}/slotTypes.ts +16 -16
- package/src/{workspace/workspaceOps.test.ts → trial/trialOps.test.ts} +60 -33
- package/src/trial/trialOps.ts +99 -0
- package/src/ui/format.test.ts +33 -0
- package/src/ui/format.ts +11 -0
- package/src/ui/properties/CurveField.tsx +6 -6
- package/src/ui/properties/SpeechBalloonPanels.stories.tsx +3 -3
- package/dist/chunk-3WPOGKUP.js.map +0 -1
- package/dist/chunk-73PXCRCR.js.map +0 -1
- package/dist/chunk-N5KTQKQA.js.map +0 -1
- package/dist/chunk-T7OKNJTY.js +0 -351
- package/dist/chunk-T7OKNJTY.js.map +0 -1
- package/src/lab/WorkspaceGrid.less +0 -8
- package/src/lab/WorkspaceGrid.test.tsx +0 -40
- package/src/lab/WorkspaceGrid.tsx +0 -22
- package/src/lab/gridDims.test.ts +0 -35
- package/src/lab/gridDims.ts +0 -13
- package/src/state/useExperimentState.ts +0 -31
- package/src/workspace/workspaceOps.ts +0 -86
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useActionsRegistry, useOptionalDepRegistry, evaluateEnabled, eligibleContribution, oklchToOklab, oklabToSrgbU8, rgbaToHex, UnknownIcon } from './chunk-
|
|
1
|
+
import { useActionsRegistry, useOptionalDepRegistry, evaluateEnabled, eligibleContribution, oklchToOklab, oklabToSrgbU8, rgbaToHex, UnknownIcon } from './chunk-DJLDIRFN.js';
|
|
2
2
|
import { forwardRef, useRef, useMemo, useCallback, useEffect, useImperativeHandle, useSyncExternalStore, useState, useLayoutEffect, useId, Fragment as Fragment$1 } from 'react';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { Checkbox, TextField, Label, Input, Text, FieldError, NumberField, Group, Button, Switch, Focusable, RadioGroup, Radio, Slider, SliderOutput, SliderTrack, SliderThumb, Select, SelectValue, Popover, ListBox, ListBoxItem, ModalOverlay, Modal, Dialog, Heading, Tabs, TabList, Tab, TabPanel, ComboBox, TooltipTrigger, Tooltip, OverlayArrow } from 'react-aria-components';
|
|
@@ -57,15 +57,15 @@ var g = {
|
|
|
57
57
|
axis: "_axis_1djm7_34"
|
|
58
58
|
};
|
|
59
59
|
var _ = forwardRef(function(e19, c16) {
|
|
60
|
-
let { width: l17, height:
|
|
60
|
+
let { width: l17, height: u15, xRange: d12 = [0, 1], yRange: f12 = [0, 1], grid: _7, axes: v4, tabIndex: y4, className: b3, style: x3, onPointerDown: S3, onKeyDown: C3, children: w3 } = e19, T3 = useRef(null), E3 = useMemo(() => ({
|
|
61
61
|
xMin: d12[0],
|
|
62
62
|
xMax: d12[1],
|
|
63
63
|
yMin: f12[0],
|
|
64
64
|
yMax: f12[1]
|
|
65
65
|
}), [d12, f12]), D3 = useMemo(() => ({
|
|
66
66
|
width: l17,
|
|
67
|
-
height:
|
|
68
|
-
}), [l17,
|
|
67
|
+
height: u15
|
|
68
|
+
}), [l17, u15]), O3 = useCallback((e20) => {
|
|
69
69
|
let t25 = T3.current?.getBoundingClientRect(), n30 = t25?.left ?? 0, r28 = t25?.top ?? 0;
|
|
70
70
|
return {
|
|
71
71
|
x: e20.clientX - n30,
|
|
@@ -74,7 +74,7 @@ var _ = forwardRef(function(e19, c16) {
|
|
|
74
74
|
}, []);
|
|
75
75
|
useEffect(() => (p("plot2d", "mount", {
|
|
76
76
|
width: l17,
|
|
77
|
-
height:
|
|
77
|
+
height: u15
|
|
78
78
|
}), () => p("plot2d", "unmount")), []), useImperativeHandle(c16, () => ({
|
|
79
79
|
get svg() {
|
|
80
80
|
return T3.current;
|
|
@@ -112,15 +112,15 @@ var _ = forwardRef(function(e19, c16) {
|
|
|
112
112
|
className: [g.root, b3].filter(Boolean).join(" "),
|
|
113
113
|
style: x3,
|
|
114
114
|
width: l17,
|
|
115
|
-
height:
|
|
116
|
-
viewBox: `0 0 ${l17} ${
|
|
115
|
+
height: u15,
|
|
116
|
+
viewBox: `0 0 ${l17} ${u15}`,
|
|
117
117
|
role: "img",
|
|
118
118
|
tabIndex: y4,
|
|
119
119
|
onPointerDown: S3 ? k3 : void 0,
|
|
120
120
|
onKeyDown: C3,
|
|
121
121
|
children: [
|
|
122
|
-
|
|
123
|
-
let e20 =
|
|
122
|
+
_7 && (() => {
|
|
123
|
+
let e20 = _7.divisions ?? 3, t25 = _7.color, n30 = [];
|
|
124
124
|
for (let t26 = 1; t26 <= e20; t26++) n30.push(t26 / (e20 + 1));
|
|
125
125
|
return /* @__PURE__ */ jsxs("g", { children: [n30.map((e21) => /* @__PURE__ */ jsx("line", {
|
|
126
126
|
"data-plot-element": "grid",
|
|
@@ -129,27 +129,27 @@ var _ = forwardRef(function(e19, c16) {
|
|
|
129
129
|
x1: e21 * l17,
|
|
130
130
|
x2: e21 * l17,
|
|
131
131
|
y1: 0,
|
|
132
|
-
y2:
|
|
132
|
+
y2: u15
|
|
133
133
|
}, `gx-${e21}`)), n30.map((e21) => /* @__PURE__ */ jsx("line", {
|
|
134
134
|
"data-plot-element": "grid",
|
|
135
135
|
className: g.grid,
|
|
136
136
|
stroke: t25,
|
|
137
137
|
x1: 0,
|
|
138
138
|
x2: l17,
|
|
139
|
-
y1: e21 *
|
|
140
|
-
y2: e21 *
|
|
139
|
+
y1: e21 * u15,
|
|
140
|
+
y2: e21 * u15
|
|
141
141
|
}, `gy-${e21}`))] });
|
|
142
142
|
})(),
|
|
143
|
-
|
|
144
|
-
let e20 =
|
|
143
|
+
v4 !== false && v4 !== null && (() => {
|
|
144
|
+
let e20 = v4?.color;
|
|
145
145
|
return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
|
|
146
146
|
"data-plot-element": "axis",
|
|
147
147
|
className: g.axis,
|
|
148
148
|
stroke: e20,
|
|
149
149
|
x1: 0,
|
|
150
150
|
x2: l17,
|
|
151
|
-
y1:
|
|
152
|
-
y2:
|
|
151
|
+
y1: u15,
|
|
152
|
+
y2: u15
|
|
153
153
|
}), /* @__PURE__ */ jsx("line", {
|
|
154
154
|
"data-plot-element": "axis",
|
|
155
155
|
className: g.axis,
|
|
@@ -157,7 +157,7 @@ var _ = forwardRef(function(e19, c16) {
|
|
|
157
157
|
x1: 0,
|
|
158
158
|
x2: 0,
|
|
159
159
|
y1: 0,
|
|
160
|
-
y2:
|
|
160
|
+
y2: u15
|
|
161
161
|
})] });
|
|
162
162
|
})(),
|
|
163
163
|
w3
|
|
@@ -177,12 +177,13 @@ function o2(e19) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
function s2(n30) {
|
|
180
|
-
let { children: o20, className: s18, placement: c16 = "top", offset: l17 = 8, ...
|
|
180
|
+
let { children: o20, className: s18, placement: c16 = "top", offset: l17 = 8, ...u15 } = n30;
|
|
181
181
|
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
182
|
-
...
|
|
182
|
+
...u15,
|
|
183
183
|
placement: c16,
|
|
184
184
|
offset: l17,
|
|
185
185
|
className: [a2.tooltip, s18].filter(Boolean).join(" "),
|
|
186
|
+
"data-weasel-overlay": "",
|
|
186
187
|
children: [/* @__PURE__ */ jsx(OverlayArrow, {
|
|
187
188
|
className: a2.arrow,
|
|
188
189
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -211,8 +212,8 @@ function f2(e19, t25) {
|
|
|
211
212
|
function p2(e19, t25) {
|
|
212
213
|
return t25 ? `${e19} (${t25})` : e19;
|
|
213
214
|
}
|
|
214
|
-
function m2(
|
|
215
|
-
let { group:
|
|
215
|
+
function m2(m9) {
|
|
216
|
+
let { group: h7, orientation: g6 = "horizontal", icons: _7, labels: v4, className: y4 } = m9, b3 = useActionsRegistry(), x3 = useOptionalDepRegistry(), S3 = useSyncExternalStore(b3 ? b3.subscribe : d2, b3 ? b3.list : () => u2, b3 ? b3.list : () => u2).filter((e19) => e19.group === h7), C3 = x3 ? {
|
|
216
217
|
selection: x3.get("selection"),
|
|
217
218
|
scene: x3.get("scene"),
|
|
218
219
|
history: x3.get("history"),
|
|
@@ -224,13 +225,13 @@ function m2(m8) {
|
|
|
224
225
|
return /* @__PURE__ */ jsx("div", {
|
|
225
226
|
className: [
|
|
226
227
|
l2.bar,
|
|
227
|
-
|
|
228
|
+
g6 === "vertical" && l2.vertical,
|
|
228
229
|
y4
|
|
229
230
|
].filter(Boolean).join(" "),
|
|
230
231
|
role: "toolbar",
|
|
231
|
-
"aria-label": `${
|
|
232
|
+
"aria-label": `${h7} actions`,
|
|
232
233
|
children: S3.map((n30) => {
|
|
233
|
-
let a22 =
|
|
234
|
+
let a22 = v4?.[n30.id] ?? n30.label, o20 = f2(n30, _7?.[n30.id]), { enabled: u15 } = evaluateEnabled(n30, C3), d12 = !u15, m10 = p2(a22, n30.shortcut);
|
|
234
235
|
return /* @__PURE__ */ jsxs(o2, {
|
|
235
236
|
isDisabled: d12,
|
|
236
237
|
children: [/* @__PURE__ */ jsx(Focusable, {
|
|
@@ -247,7 +248,7 @@ function m2(m8) {
|
|
|
247
248
|
},
|
|
248
249
|
children: o20
|
|
249
250
|
})
|
|
250
|
-
}), /* @__PURE__ */ jsx(s2, { children:
|
|
251
|
+
}), /* @__PURE__ */ jsx(s2, { children: m10 })]
|
|
251
252
|
}, n30.id);
|
|
252
253
|
})
|
|
253
254
|
});
|
|
@@ -356,7 +357,7 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
356
357
|
let l17 = {
|
|
357
358
|
...g2,
|
|
358
359
|
...c16
|
|
359
|
-
},
|
|
360
|
+
}, u15 = useId(), d12 = useRef(null), [f12, p11] = useState({
|
|
360
361
|
w: 100,
|
|
361
362
|
h: 100
|
|
362
363
|
});
|
|
@@ -365,7 +366,7 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
365
366
|
if (!e20) return;
|
|
366
367
|
let t25 = () => {
|
|
367
368
|
let t26 = e20.getBoundingClientRect();
|
|
368
|
-
t26.width > 0 && t26.height > 0 &&
|
|
369
|
+
t26.width > 0 && t26.height > 0 && p11({
|
|
369
370
|
w: t26.width,
|
|
370
371
|
h: t26.height
|
|
371
372
|
});
|
|
@@ -374,9 +375,9 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
374
375
|
let n30 = new ResizeObserver(t25);
|
|
375
376
|
return n30.observe(e20), () => n30.disconnect();
|
|
376
377
|
}, []);
|
|
377
|
-
let
|
|
378
|
-
for (let e20 = 0; e20 <
|
|
379
|
-
let t25 = (e20 + 0.5) /
|
|
378
|
+
let m9 = l17.holeRadius / f12.w * 100, h7 = l17.holeRadius / f12.h * 100, _7 = Math.max(2, Math.round(f12.w / l17.holePitch)), v4 = Math.max(2, Math.round(f12.h / l17.holePitch)), y4 = [];
|
|
379
|
+
for (let e20 = 0; e20 < _7; e20++) {
|
|
380
|
+
let t25 = (e20 + 0.5) / _7;
|
|
380
381
|
y4.push({
|
|
381
382
|
cx: t25 * 100,
|
|
382
383
|
cy: 0
|
|
@@ -385,8 +386,8 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
385
386
|
cy: 100
|
|
386
387
|
});
|
|
387
388
|
}
|
|
388
|
-
for (let e20 = 0; e20 <
|
|
389
|
-
let t25 = (e20 + 0.5) /
|
|
389
|
+
for (let e20 = 0; e20 < v4; e20++) {
|
|
390
|
+
let t25 = (e20 + 0.5) / v4;
|
|
390
391
|
y4.push({
|
|
391
392
|
cx: 0,
|
|
392
393
|
cy: t25 * 100
|
|
@@ -399,7 +400,7 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
399
400
|
ref: d12,
|
|
400
401
|
children: [
|
|
401
402
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("mask", {
|
|
402
|
-
id:
|
|
403
|
+
id: u15,
|
|
403
404
|
maskUnits: "userSpaceOnUse",
|
|
404
405
|
x: "-5",
|
|
405
406
|
y: "-5",
|
|
@@ -414,8 +415,8 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
414
415
|
}), y4.map((e20, t25) => /* @__PURE__ */ jsx("ellipse", {
|
|
415
416
|
cx: e20.cx,
|
|
416
417
|
cy: e20.cy,
|
|
417
|
-
rx:
|
|
418
|
-
ry:
|
|
418
|
+
rx: m9,
|
|
419
|
+
ry: h7,
|
|
419
420
|
fill: "black"
|
|
420
421
|
}, t25))]
|
|
421
422
|
}) }),
|
|
@@ -425,7 +426,7 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
425
426
|
y: "0",
|
|
426
427
|
width: "100",
|
|
427
428
|
height: "100",
|
|
428
|
-
mask: `url(#${
|
|
429
|
+
mask: `url(#${u15})`
|
|
429
430
|
}),
|
|
430
431
|
(e19 === "outline" || e19 === "solid") && /* @__PURE__ */ jsx("rect", {
|
|
431
432
|
className: "badge-stroke",
|
|
@@ -433,7 +434,7 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
433
434
|
y: "0",
|
|
434
435
|
width: "100",
|
|
435
436
|
height: "100",
|
|
436
|
-
mask: `url(#${
|
|
437
|
+
mask: `url(#${u15})`
|
|
437
438
|
}),
|
|
438
439
|
a22 && /* @__PURE__ */ jsx("rect", {
|
|
439
440
|
className: "badge-focus",
|
|
@@ -441,7 +442,7 @@ function _2({ variant: e19, focused: a22, params: c16 }) {
|
|
|
441
442
|
y: "-4",
|
|
442
443
|
width: "108",
|
|
443
444
|
height: "108",
|
|
444
|
-
mask: `url(#${
|
|
445
|
+
mask: `url(#${u15})`
|
|
445
446
|
})
|
|
446
447
|
]
|
|
447
448
|
});
|
|
@@ -521,12 +522,12 @@ function C(e19, t25, n30, r28, i24) {
|
|
|
521
522
|
for (let t26 = 0; t26 < l17.length; t26++) e20 += (t26 === 0 ? "M " : " L ") + l17[t26][0].toFixed(2) + " " + l17[t26][1].toFixed(2);
|
|
522
523
|
return e20 + " Z";
|
|
523
524
|
}
|
|
524
|
-
let
|
|
525
|
+
let u15 = "";
|
|
525
526
|
for (let e20 = 0; e20 < l17.length; e20++) {
|
|
526
527
|
let t26 = l17[(e20 + l17.length - 1) % l17.length], n31 = l17[e20], r29 = l17[(e20 + 1) % l17.length], i25 = c16 * 0.45, a23 = n31[0] + (t26[0] - n31[0]) * i25, o21 = n31[1] + (t26[1] - n31[1]) * i25, s19 = n31[0] + (r29[0] - n31[0]) * i25, d12 = n31[1] + (r29[1] - n31[1]) * i25;
|
|
527
|
-
e20 === 0 ?
|
|
528
|
+
e20 === 0 ? u15 += `M ${a23.toFixed(2)} ${o21.toFixed(2)}` : u15 += ` L ${a23.toFixed(2)} ${o21.toFixed(2)}`, u15 += ` Q ${n31[0].toFixed(2)} ${n31[1].toFixed(2)} ${s19.toFixed(2)} ${d12.toFixed(2)}`;
|
|
528
529
|
}
|
|
529
|
-
return
|
|
530
|
+
return u15 + " Z";
|
|
530
531
|
}
|
|
531
532
|
var w = {
|
|
532
533
|
Component: ({ variant: e19, focused: t25, params: n30 }) => {
|
|
@@ -601,7 +602,7 @@ function O({ variant: e19, focused: t25, params: a22 }) {
|
|
|
601
602
|
let c16 = {
|
|
602
603
|
...D,
|
|
603
604
|
...a22
|
|
604
|
-
}, l17 = useRef(null), [
|
|
605
|
+
}, l17 = useRef(null), [u15, d12] = useState({
|
|
605
606
|
w: 100,
|
|
606
607
|
h: 100
|
|
607
608
|
});
|
|
@@ -619,15 +620,15 @@ function O({ variant: e19, focused: t25, params: a22 }) {
|
|
|
619
620
|
let n30 = new ResizeObserver(t26);
|
|
620
621
|
return n30.observe(e20), () => n30.disconnect();
|
|
621
622
|
}, []);
|
|
622
|
-
let f12 = Math.max(60, Math.min(c16.pointDepth, 110)),
|
|
623
|
-
`M ${
|
|
624
|
-
`L ${(100 -
|
|
625
|
-
`A ${
|
|
626
|
-
`L 100 ${
|
|
627
|
-
`Q 100 ${
|
|
628
|
-
`Q 0 ${
|
|
629
|
-
`L 0 ${
|
|
630
|
-
`A ${
|
|
623
|
+
let f12 = Math.max(60, Math.min(c16.pointDepth, 110)), p11 = Math.max(20, Math.min(c16.shoulderY, f12 - 5)), m9 = p11 + (f12 - p11) * Math.max(0.1, Math.min(c16.curveTightness, 1)), h7 = Math.max(0, Math.min(c16.erosion, 1)) * 12, g6 = h7 / u15.w * 100, _7 = h7 / u15.h * 100, v4 = [
|
|
624
|
+
`M ${g6.toFixed(3)} 0`,
|
|
625
|
+
`L ${(100 - g6).toFixed(3)} 0`,
|
|
626
|
+
`A ${g6.toFixed(3)} ${_7.toFixed(3)} 0 0 1 100 ${_7.toFixed(3)}`,
|
|
627
|
+
`L 100 ${p11}`,
|
|
628
|
+
`Q 100 ${m9} 50 ${f12}`,
|
|
629
|
+
`Q 0 ${m9} 0 ${p11}`,
|
|
630
|
+
`L 0 ${_7.toFixed(3)}`,
|
|
631
|
+
`A ${g6.toFixed(3)} ${_7.toFixed(3)} 0 0 1 ${g6.toFixed(3)} 0`,
|
|
631
632
|
"Z"
|
|
632
633
|
].join(" ");
|
|
633
634
|
return /* @__PURE__ */ jsxs("g", {
|
|
@@ -635,15 +636,15 @@ function O({ variant: e19, focused: t25, params: a22 }) {
|
|
|
635
636
|
children: [
|
|
636
637
|
(e19 === "solid" || e19 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
637
638
|
className: "badge-fill",
|
|
638
|
-
d:
|
|
639
|
+
d: v4
|
|
639
640
|
}),
|
|
640
641
|
(e19 === "outline" || e19 === "solid") && /* @__PURE__ */ jsx("path", {
|
|
641
642
|
className: "badge-stroke",
|
|
642
|
-
d:
|
|
643
|
+
d: v4
|
|
643
644
|
}),
|
|
644
645
|
t25 && /* @__PURE__ */ jsx("path", {
|
|
645
646
|
className: "badge-focus",
|
|
646
|
-
d:
|
|
647
|
+
d: v4,
|
|
647
648
|
transform: "translate(50 50) scale(1.06) translate(-50 -50)"
|
|
648
649
|
})
|
|
649
650
|
]
|
|
@@ -740,15 +741,15 @@ var ee = {
|
|
|
740
741
|
let { points: r28, outerR: i24, innerR: c16, rotation: l17 } = {
|
|
741
742
|
...P,
|
|
742
743
|
...n30
|
|
743
|
-
},
|
|
744
|
+
}, u15 = F(r28, i24, c16, l17), d12 = F(r28, i24 + 4, c16 + 3, l17);
|
|
744
745
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
745
746
|
(e19 === "solid" || e19 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
746
747
|
className: "badge-fill",
|
|
747
|
-
d:
|
|
748
|
+
d: u15
|
|
748
749
|
}),
|
|
749
750
|
(e19 === "outline" || e19 === "solid") && /* @__PURE__ */ jsx("path", {
|
|
750
751
|
className: "badge-stroke",
|
|
751
|
-
d:
|
|
752
|
+
d: u15
|
|
752
753
|
}),
|
|
753
754
|
t25 && /* @__PURE__ */ jsx("path", {
|
|
754
755
|
className: "badge-focus",
|
|
@@ -1225,25 +1226,25 @@ var me = {
|
|
|
1225
1226
|
[o20, 100],
|
|
1226
1227
|
[0, 100 - s18],
|
|
1227
1228
|
[0, s18]
|
|
1228
|
-
], l17 = [],
|
|
1229
|
+
], l17 = [], u15 = [0];
|
|
1229
1230
|
for (let e20 = 0; e20 < c16.length; e20++) {
|
|
1230
1231
|
let t26 = c16[e20], n31 = c16[(e20 + 1) % c16.length], r29 = (n31[0] - t26[0]) / i24, o21 = (n31[1] - t26[1]) / a22, s19 = Math.hypot(r29, o21);
|
|
1231
|
-
l17.push(s19),
|
|
1232
|
+
l17.push(s19), u15.push(u15[u15.length - 1] + s19);
|
|
1232
1233
|
}
|
|
1233
|
-
let d12 =
|
|
1234
|
+
let d12 = u15[u15.length - 1];
|
|
1234
1235
|
return {
|
|
1235
1236
|
bodyPath: `M ${c16[0][0]} ${c16[0][1]} ` + c16.slice(1).map(([e20, t26]) => `L ${e20} ${t26}`).join(" ") + " Z",
|
|
1236
1237
|
perimeterAt: (e20) => {
|
|
1237
1238
|
let t26 = (e20 % d12 + d12) % d12;
|
|
1238
1239
|
for (let e21 = 0; e21 < l17.length; e21++) {
|
|
1239
|
-
let n31 =
|
|
1240
|
-
if (t26 <=
|
|
1241
|
-
let r29 = l17[e21] > 0 ? (t26 - n31) / l17[e21] : 0, o21 = c16[e21], s19 = c16[(e21 + 1) % c16.length],
|
|
1240
|
+
let n31 = u15[e21];
|
|
1241
|
+
if (t26 <= u15[e21 + 1] + 1e-9) {
|
|
1242
|
+
let r29 = l17[e21] > 0 ? (t26 - n31) / l17[e21] : 0, o21 = c16[e21], s19 = c16[(e21 + 1) % c16.length], u16 = o21[0] + (s19[0] - o21[0]) * r29, d13 = o21[1] + (s19[1] - o21[1]) * r29, f12 = (s19[0] - o21[0]) / i24, p11 = (s19[1] - o21[1]) / a22, m9 = Math.hypot(f12, p11) || 1;
|
|
1242
1243
|
return {
|
|
1243
|
-
x:
|
|
1244
|
+
x: u16,
|
|
1244
1245
|
y: d13,
|
|
1245
|
-
nx:
|
|
1246
|
-
ny: -f12 /
|
|
1246
|
+
nx: p11 / m9,
|
|
1247
|
+
ny: -f12 / m9
|
|
1247
1248
|
};
|
|
1248
1249
|
}
|
|
1249
1250
|
}
|
|
@@ -1275,45 +1276,45 @@ var ge = {
|
|
|
1275
1276
|
let r28 = {
|
|
1276
1277
|
...he,
|
|
1277
1278
|
...e19
|
|
1278
|
-
}, i24 = 100 / t25, a22 = 100 / n30, o20 = Math.max(0, Math.min(r28.erosion, 1)), s18 = Math.max(0.1, Math.min(r28.eccentricity, 10)), c16 = Math.min(t25, n30) / 2 * o20, l17 = c16 * i24 * s18,
|
|
1279
|
+
}, i24 = 100 / t25, a22 = 100 / n30, o20 = Math.max(0, Math.min(r28.erosion, 1)), s18 = Math.max(0.1, Math.min(r28.eccentricity, 10)), c16 = Math.min(t25, n30) / 2 * o20, l17 = c16 * i24 * s18, u15 = c16 * a22 / s18, d12 = Math.max(0, Math.min(l17, 50)), f12 = Math.max(0, Math.min(u15, 50)), p11 = (100 - 2 * d12) / i24, m9 = (100 - 2 * f12) / a22, h7 = c16 + c16 || 1, g6 = Math.PI * h7 * 1 / 4, _7 = [
|
|
1279
1280
|
{
|
|
1280
1281
|
kind: "h-edge",
|
|
1281
|
-
cssLen:
|
|
1282
|
+
cssLen: p11
|
|
1282
1283
|
},
|
|
1283
1284
|
{
|
|
1284
1285
|
kind: "tr-arc",
|
|
1285
|
-
cssLen:
|
|
1286
|
+
cssLen: g6
|
|
1286
1287
|
},
|
|
1287
1288
|
{
|
|
1288
1289
|
kind: "v-edge",
|
|
1289
|
-
cssLen:
|
|
1290
|
+
cssLen: m9
|
|
1290
1291
|
},
|
|
1291
1292
|
{
|
|
1292
1293
|
kind: "br-arc",
|
|
1293
|
-
cssLen:
|
|
1294
|
+
cssLen: g6
|
|
1294
1295
|
},
|
|
1295
1296
|
{
|
|
1296
1297
|
kind: "h-edge-b",
|
|
1297
|
-
cssLen:
|
|
1298
|
+
cssLen: p11
|
|
1298
1299
|
},
|
|
1299
1300
|
{
|
|
1300
1301
|
kind: "bl-arc",
|
|
1301
|
-
cssLen:
|
|
1302
|
+
cssLen: g6
|
|
1302
1303
|
},
|
|
1303
1304
|
{
|
|
1304
1305
|
kind: "v-edge-l",
|
|
1305
|
-
cssLen:
|
|
1306
|
+
cssLen: m9
|
|
1306
1307
|
},
|
|
1307
1308
|
{
|
|
1308
1309
|
kind: "tl-arc",
|
|
1309
|
-
cssLen:
|
|
1310
|
+
cssLen: g6
|
|
1310
1311
|
}
|
|
1311
|
-
],
|
|
1312
|
-
for (let e20 of
|
|
1313
|
-
let y4 =
|
|
1312
|
+
], v4 = [0];
|
|
1313
|
+
for (let e20 of _7) v4.push(v4[v4.length - 1] + e20.cssLen);
|
|
1314
|
+
let y4 = v4[v4.length - 1], b3 = (e20) => {
|
|
1314
1315
|
let t26 = (e20 % y4 + y4) % y4, n31 = 0;
|
|
1315
|
-
for (; n31 <
|
|
1316
|
-
let r29 = t26 -
|
|
1316
|
+
for (; n31 < _7.length - 1 && t26 > v4[n31 + 1]; ) n31++;
|
|
1317
|
+
let r29 = t26 - v4[n31], i25 = _7[n31], a23 = i25.cssLen > 0 ? r29 / i25.cssLen : 0;
|
|
1317
1318
|
switch (i25.kind) {
|
|
1318
1319
|
case "h-edge":
|
|
1319
1320
|
return {
|
|
@@ -1413,12 +1414,12 @@ var ge = {
|
|
|
1413
1414
|
});
|
|
1414
1415
|
}
|
|
1415
1416
|
C3 = e20.reduce((e21, t26, n31) => e21 + (n31 === 0 ? `M ${t26.x.toFixed(3)} ${t26.y.toFixed(3)}` : ` L ${t26.x.toFixed(3)} ${t26.y.toFixed(3)}`), "") + " Z", w3 = (e21) => {
|
|
1416
|
-
let t26 = (e21 % y4 + y4) % y4, n31 = b3(t26), r29 = n31.x, o21 = S3(n31.x, n31.y), s19 = y4 / 480, c17 = b3(t26 - s19), l18 = b3(t26 + s19),
|
|
1417
|
+
let t26 = (e21 % y4 + y4) % y4, n31 = b3(t26), r29 = n31.x, o21 = S3(n31.x, n31.y), s19 = y4 / 480, c17 = b3(t26 - s19), l18 = b3(t26 + s19), u16 = c17.x, d13 = S3(c17.x, c17.y), f13 = l18.x, p12 = S3(l18.x, l18.y), m10 = (f13 - u16) / i24, h8 = (p12 - d13) / a22, g7 = Math.hypot(m10, h8) || 1;
|
|
1417
1418
|
return {
|
|
1418
1419
|
x: r29,
|
|
1419
1420
|
y: o21,
|
|
1420
|
-
nx:
|
|
1421
|
-
ny: -
|
|
1421
|
+
nx: h8 / g7,
|
|
1422
|
+
ny: -m10 / g7
|
|
1422
1423
|
};
|
|
1423
1424
|
};
|
|
1424
1425
|
}
|
|
@@ -1439,8 +1440,8 @@ var ge = {
|
|
|
1439
1440
|
function q(e19, t25, n30) {
|
|
1440
1441
|
let r28 = 100 / t25, i24 = 100 / n30, a22 = [], o20 = [0];
|
|
1441
1442
|
for (let t26 = 0; t26 < e19.length; t26++) {
|
|
1442
|
-
let n31 = e19[t26], s19 = e19[(t26 + 1) % e19.length], c16 = (s19[0] - n31[0]) / r28, l17 = (s19[1] - n31[1]) / i24,
|
|
1443
|
-
a22.push(
|
|
1443
|
+
let n31 = e19[t26], s19 = e19[(t26 + 1) % e19.length], c16 = (s19[0] - n31[0]) / r28, l17 = (s19[1] - n31[1]) / i24, u15 = Math.hypot(c16, l17);
|
|
1444
|
+
a22.push(u15), o20.push(o20[o20.length - 1] + u15);
|
|
1444
1445
|
}
|
|
1445
1446
|
let s18 = o20[o20.length - 1];
|
|
1446
1447
|
return {
|
|
@@ -1450,12 +1451,12 @@ function q(e19, t25, n30) {
|
|
|
1450
1451
|
for (let t27 = 0; t27 < a22.length; t27++) {
|
|
1451
1452
|
let s19 = o20[t27];
|
|
1452
1453
|
if (n31 <= o20[t27 + 1] + 1e-9) {
|
|
1453
|
-
let o21 = a22[t27] > 0 ? (n31 - s19) / a22[t27] : 0, c16 = e19[t27], l17 = e19[(t27 + 1) % e19.length],
|
|
1454
|
+
let o21 = a22[t27] > 0 ? (n31 - s19) / a22[t27] : 0, c16 = e19[t27], l17 = e19[(t27 + 1) % e19.length], u15 = c16[0] + (l17[0] - c16[0]) * o21, d12 = c16[1] + (l17[1] - c16[1]) * o21, f12 = (l17[0] - c16[0]) / r28, p11 = (l17[1] - c16[1]) / i24, m9 = Math.hypot(f12, p11) || 1;
|
|
1454
1455
|
return {
|
|
1455
|
-
x:
|
|
1456
|
+
x: u15,
|
|
1456
1457
|
y: d12,
|
|
1457
|
-
nx:
|
|
1458
|
-
ny: -f12 /
|
|
1458
|
+
nx: p11 / m9,
|
|
1459
|
+
ny: -f12 / m9
|
|
1459
1460
|
};
|
|
1460
1461
|
}
|
|
1461
1462
|
}
|
|
@@ -1496,11 +1497,11 @@ var ye = {
|
|
|
1496
1497
|
var J = 0.62;
|
|
1497
1498
|
function be(e19, t25, n30, r28, i24, a22, o20) {
|
|
1498
1499
|
if (i24 === "flat") return [t25];
|
|
1499
|
-
let s18 = i24 === "out" ? 1 : -1, c16 = t25[0] - e19[0], l17 = t25[1] - e19[1],
|
|
1500
|
-
k3.push(
|
|
1500
|
+
let s18 = i24 === "out" ? 1 : -1, c16 = t25[0] - e19[0], l17 = t25[1] - e19[1], u15 = Math.hypot(c16, l17) || 1, d12 = c16 / u15, f12 = l17 / u15, p11 = (e19[0] + t25[0]) / 2, m9 = (e19[1] + t25[1]) / 2, h7 = p11 + n30 * s18 * a22 * J, g6 = m9 + r28 * s18 * a22 * J, _7 = a22 * Math.sqrt(Math.max(0, 1 - J * J)), v4 = [p11 - d12 * _7, m9 - f12 * _7], y4 = [p11 + d12 * _7, m9 + f12 * _7], b3 = [p11 + n30 * s18 * (a22 + a22 * (1 - J)), m9 + r28 * s18 * (a22 + a22 * (1 - J))], x3 = Math.hypot(v4[0] - h7, v4[1] - g6), S3 = Math.atan2(v4[1] - g6, v4[0] - h7), C3 = Math.atan2(y4[1] - g6, y4[0] - h7), w3 = Math.atan2(b3[1] - g6, b3[0] - h7), T3 = Math.PI * 2, E3 = ((w3 - S3) % T3 + T3) % T3, D3 = ((C3 - S3) % T3 + T3) % T3, O3 = E3 < D3 ? D3 : D3 - T3, k3 = [];
|
|
1501
|
+
k3.push(v4);
|
|
1501
1502
|
for (let e20 = 1; e20 <= o20; e20++) {
|
|
1502
1503
|
let t26 = S3 + e20 / o20 * O3;
|
|
1503
|
-
k3.push([
|
|
1504
|
+
k3.push([h7 + x3 * Math.cos(t26), g6 + x3 * Math.sin(t26)]);
|
|
1504
1505
|
}
|
|
1505
1506
|
return k3.push(t25), k3;
|
|
1506
1507
|
}
|
|
@@ -1509,8 +1510,8 @@ var xe = {
|
|
|
1509
1510
|
let r28 = {
|
|
1510
1511
|
...ye,
|
|
1511
1512
|
...e19
|
|
1512
|
-
}, i24 = Math.max(2, Math.min(r28.tabSize, 40)), a22 = Math.max(6, Math.floor(r28.arcSamples)), o20 = [0, 0], s18 = [100, 0], c16 = [100, 100], l17 = [0, 100],
|
|
1513
|
-
return
|
|
1513
|
+
}, i24 = Math.max(2, Math.min(r28.tabSize, 40)), a22 = Math.max(6, Math.floor(r28.arcSamples)), o20 = [0, 0], s18 = [100, 0], c16 = [100, 100], l17 = [0, 100], u15 = [o20];
|
|
1514
|
+
return u15.push(...be(o20, s18, 0, -1, r28.top, i24, a22)), u15.push(...be(s18, c16, 1, 0, r28.right, i24, a22)), u15.push(...be(c16, l17, 0, 1, r28.bottom, i24, a22)), u15.push(...be(l17, o20, -1, 0, r28.left, i24, a22)), u15.length > 1 && u15[u15.length - 1][0] === o20[0] && u15[u15.length - 1][1] === o20[1] && u15.pop(), q(u15, t25, n30);
|
|
1514
1515
|
},
|
|
1515
1516
|
defaults: ye,
|
|
1516
1517
|
insets: {
|
|
@@ -1549,12 +1550,12 @@ function Te(e19 = {}) {
|
|
|
1549
1550
|
let t25 = {
|
|
1550
1551
|
...Se,
|
|
1551
1552
|
...e19
|
|
1552
|
-
}, n30 = Math.max(5, Math.min(t25.spikeR, 50)), r28 = Math.max(5, Math.min(t25.lobeR, 50 * Math.SQRT2)), i24 = Math.max(0, Math.min(t25.valleyR, Math.min(n30, r28))), a22 = Math.max(0.05, Math.min(t25.valleyAt, 0.95)), o20 = Math.max(0.2, t25.spikeCurvature), s18 = Math.max(-0.95, Math.min(t25.spikeBend, 0.95)), c16 = Math.max(0, Math.min(t25.spikeTipErosion, 1)), l17 = Math.max(0.2, t25.lobeCurvature),
|
|
1553
|
-
for (let e20 = 0; e20 <
|
|
1554
|
-
let t26 = e20 /
|
|
1555
|
-
|
|
1553
|
+
}, n30 = Math.max(5, Math.min(t25.spikeR, 50)), r28 = Math.max(5, Math.min(t25.lobeR, 50 * Math.SQRT2)), i24 = Math.max(0, Math.min(t25.valleyR, Math.min(n30, r28))), a22 = Math.max(0.05, Math.min(t25.valleyAt, 0.95)), o20 = Math.max(0.2, t25.spikeCurvature), s18 = Math.max(-0.95, Math.min(t25.spikeBend, 0.95)), c16 = Math.max(0, Math.min(t25.spikeTipErosion, 1)), l17 = Math.max(0.2, t25.lobeCurvature), u15 = Math.max(-0.95, Math.min(t25.lobeBend, 0.95)), d12 = Math.max(0, Math.min(t25.lobeTipErosion, 1)), f12 = Math.max(0, t25.valleySmooth), p11 = t25.rotation * Math.PI / 180, m9 = Math.max(24, Math.floor(t25.samples)), h7 = [];
|
|
1554
|
+
for (let e20 = 0; e20 < m9; e20++) {
|
|
1555
|
+
let t26 = e20 / m9 * 2 * Math.PI, g6 = Math.abs(Math.sin(2 * (t26 - p11))), _7 = (a22 - g6) / a22, v4 = (g6 - a22) / (1 - a22), y4 = Ce(i24 + (n30 - i24) * we(Math.max(0, _7), o20, s18, c16), i24 + (r28 - i24) * we(Math.max(0, v4), l17, u15, d12), f12);
|
|
1556
|
+
h7.push([50 + y4 * Math.cos(t26), 50 + y4 * Math.sin(t26)]);
|
|
1556
1557
|
}
|
|
1557
|
-
return
|
|
1558
|
+
return h7;
|
|
1558
1559
|
}
|
|
1559
1560
|
var Ee = {
|
|
1560
1561
|
build: (e19, t25, n30) => q(Te(e19), t25, n30),
|
|
@@ -1690,8 +1691,8 @@ function je(e19, t25) {
|
|
|
1690
1691
|
for (; a22 < i24 - 1 && n30[a22 + 1].s <= e19; ) a22++;
|
|
1691
1692
|
let o20 = n30[a22], s18 = n30[a22 + 1], c16 = s18.s - o20.s;
|
|
1692
1693
|
if (c16 <= 0) return o20.r;
|
|
1693
|
-
let l17 = (s18.s - e19) / c16,
|
|
1694
|
-
return l17 * o20.r +
|
|
1694
|
+
let l17 = (s18.s - e19) / c16, u15 = (e19 - o20.s) / c16, d12 = (l17 * l17 * l17 - l17) * c16 * c16 / 6, f12 = (u15 * u15 * u15 - u15) * c16 * c16 / 6;
|
|
1695
|
+
return l17 * o20.r + u15 * s18.r + (d12 * r28[a22] * o20.w + f12 * r28[a22 + 1] * s18.w);
|
|
1695
1696
|
}
|
|
1696
1697
|
var Me = {
|
|
1697
1698
|
build: (e19, t25, n30) => {
|
|
@@ -1702,8 +1703,8 @@ var Me = {
|
|
|
1702
1703
|
for (let e20 = 0; e20 < o20; e20++) {
|
|
1703
1704
|
let t26 = e20 / o20 * 2 * Math.PI, n31 = t26 - a22, l17;
|
|
1704
1705
|
l17 = r28.mode === "quadrant" ? (n31 % c16 + c16) % c16 / c16 : Math.abs(Math.sin(2 * n31));
|
|
1705
|
-
let
|
|
1706
|
-
s18.push([50 +
|
|
1706
|
+
let u15 = je(l17, i24);
|
|
1707
|
+
s18.push([50 + u15 * Math.cos(t26), 50 + u15 * Math.sin(t26)]);
|
|
1707
1708
|
}
|
|
1708
1709
|
return q(s18, t25, n30);
|
|
1709
1710
|
},
|
|
@@ -1872,14 +1873,14 @@ function ze(e19) {
|
|
|
1872
1873
|
};
|
|
1873
1874
|
}
|
|
1874
1875
|
function Be(e19, t25) {
|
|
1875
|
-
let { extended: n30, knots: r28, degree: i24 } = t25, a22 = n30.length, o20 = Math.max(0, Math.min(1, e19)), s18 = Le(o20, r28, i24, a22), c16 = Re(s18, o20, r28, i24), l17 = 0,
|
|
1876
|
+
let { extended: n30, knots: r28, degree: i24 } = t25, a22 = n30.length, o20 = Math.max(0, Math.min(1, e19)), s18 = Le(o20, r28, i24, a22), c16 = Re(s18, o20, r28, i24), l17 = 0, u15 = 0, d12 = 0;
|
|
1876
1877
|
for (let e20 = 0; e20 <= i24; e20++) {
|
|
1877
1878
|
let t26 = n30[s18 - i24 + e20], r29 = t26.w * c16[e20];
|
|
1878
|
-
l17 += r29 * t26.s,
|
|
1879
|
+
l17 += r29 * t26.s, u15 += r29 * t26.r, d12 += r29;
|
|
1879
1880
|
}
|
|
1880
1881
|
return d12 > 0 ? {
|
|
1881
1882
|
s: l17 / d12,
|
|
1882
|
-
r:
|
|
1883
|
+
r: u15 / d12
|
|
1883
1884
|
} : {
|
|
1884
1885
|
s: 0,
|
|
1885
1886
|
r: 0
|
|
@@ -1904,8 +1905,8 @@ var He = {
|
|
|
1904
1905
|
for (let e20 = 0; e20 < o20; e20++) {
|
|
1905
1906
|
let t26 = e20 / o20 * 2 * Math.PI, n31 = t26 - a22, l17;
|
|
1906
1907
|
l17 = r28.mode === "quadrant" ? (n31 % c16 + c16) % c16 / c16 : Math.abs(Math.sin(2 * n31));
|
|
1907
|
-
let
|
|
1908
|
-
s18.push([50 +
|
|
1908
|
+
let u15 = Ve(l17, i24);
|
|
1909
|
+
s18.push([50 + u15 * Math.cos(t26), 50 + u15 * Math.sin(t26)]);
|
|
1909
1910
|
}
|
|
1910
1911
|
return q(s18, t25, n30);
|
|
1911
1912
|
},
|
|
@@ -2050,18 +2051,18 @@ var Ye = {
|
|
|
2050
2051
|
ny: 0
|
|
2051
2052
|
});
|
|
2052
2053
|
}
|
|
2053
|
-
let
|
|
2054
|
+
let u15 = [0];
|
|
2054
2055
|
for (let e20 = 1; e20 < l17.length; e20++) {
|
|
2055
2056
|
let t26 = l17[e20 - 1], n31 = l17[e20], r29 = (n31.x - t26.x) / s18, i25 = (n31.y - t26.y) / c16;
|
|
2056
|
-
|
|
2057
|
+
u15.push(u15[e20 - 1] + Math.hypot(r29, i25));
|
|
2057
2058
|
}
|
|
2058
|
-
let d12 = l17[l17.length - 1], f12 = l17[0],
|
|
2059
|
+
let d12 = l17[l17.length - 1], f12 = l17[0], p11 = Math.hypot((f12.x - d12.x) / s18, (f12.y - d12.y) / c16), m9 = u15[u15.length - 1] + p11;
|
|
2059
2060
|
return {
|
|
2060
2061
|
bodyPath: l17.reduce((e20, t26, n31) => e20 + (n31 === 0 ? `M ${t26.x.toFixed(3)} ${t26.y.toFixed(3)}` : ` L ${t26.x.toFixed(3)} ${t26.y.toFixed(3)}`), "") + " Z",
|
|
2061
2062
|
perimeterAt: (e20) => {
|
|
2062
|
-
let t26 = (e20 %
|
|
2063
|
-
for (let e21 = 1; e21 < l17.length; e21++) if (t26 <=
|
|
2064
|
-
let n32 =
|
|
2063
|
+
let t26 = (e20 % m9 + m9) % m9;
|
|
2064
|
+
for (let e21 = 1; e21 < l17.length; e21++) if (t26 <= u15[e21]) {
|
|
2065
|
+
let n32 = u15[e21] - u15[e21 - 1], r30 = n32 > 0 ? (t26 - u15[e21 - 1]) / n32 : 0, i26 = l17[e21 - 1], a23 = l17[e21];
|
|
2065
2066
|
return {
|
|
2066
2067
|
x: i26.x + (a23.x - i26.x) * r30,
|
|
2067
2068
|
y: i26.y + (a23.y - i26.y) * r30,
|
|
@@ -2069,7 +2070,7 @@ var Ye = {
|
|
|
2069
2070
|
ny: a23.ny
|
|
2070
2071
|
};
|
|
2071
2072
|
}
|
|
2072
|
-
let n31 = l17.length - 1, r29 =
|
|
2073
|
+
let n31 = l17.length - 1, r29 = p11, i25 = r29 > 0 ? (t26 - u15[n31]) / r29 : 0;
|
|
2073
2074
|
return {
|
|
2074
2075
|
x: l17[n31].x + (f12.x - l17[n31].x) * i25,
|
|
2075
2076
|
y: l17[n31].y + (f12.y - l17[n31].y) * i25,
|
|
@@ -2077,20 +2078,20 @@ var Ye = {
|
|
|
2077
2078
|
ny: 1
|
|
2078
2079
|
};
|
|
2079
2080
|
},
|
|
2080
|
-
totalCss:
|
|
2081
|
+
totalCss: m9
|
|
2081
2082
|
};
|
|
2082
2083
|
},
|
|
2083
2084
|
defaults: Y,
|
|
2084
2085
|
insets: (e19) => {
|
|
2085
2086
|
let t25 = e19?.depth ?? Y.depth, n30 = e19?.leftEdge ?? Y.leftEdge, r28 = e19?.rightEdge ?? Y.rightEdge, i24 = Je(n30), a22 = Je(r28), o20 = 0, s18 = 0, c16 = 0, l17 = 0;
|
|
2086
2087
|
for (let e20 = 0; e20 <= 32; e20++) {
|
|
2087
|
-
let n31 = e20 / 32, r29 = i24(n31, t25),
|
|
2088
|
-
o20 += d13 * r29 / 32, s18 += d13 *
|
|
2088
|
+
let n31 = e20 / 32, r29 = i24(n31, t25), u16 = a22(n31, t25), d13 = e20 === 0 || e20 === 32 ? 0.5 : 1;
|
|
2089
|
+
o20 += d13 * r29 / 32, s18 += d13 * u16 / 32, r29 > c16 && (c16 = r29), -u16 > l17 && (l17 = -u16);
|
|
2089
2090
|
}
|
|
2090
|
-
let
|
|
2091
|
+
let u15 = (o20 + s18) / 2, d12 = Math.max(c16, t25 + u15);
|
|
2091
2092
|
return {
|
|
2092
2093
|
top: 0,
|
|
2093
|
-
right: Math.max(l17, t25 -
|
|
2094
|
+
right: Math.max(l17, t25 - u15),
|
|
2094
2095
|
bottom: 0,
|
|
2095
2096
|
left: d12
|
|
2096
2097
|
};
|
|
@@ -2124,21 +2125,21 @@ var Ze = {
|
|
|
2124
2125
|
dx: 0,
|
|
2125
2126
|
dy: 0
|
|
2126
2127
|
};
|
|
2127
|
-
let s18 = r28 / Math.max(3, Math.floor(a22.count)), c16 = Math.max(0.1, Math.min(s18 / 2 - 0.05, a22.baseWidth / 2)), l17 = n30 * s18,
|
|
2128
|
-
if (
|
|
2128
|
+
let s18 = r28 / Math.max(3, Math.floor(a22.count)), c16 = Math.max(0.1, Math.min(s18 / 2 - 0.05, a22.baseWidth / 2)), l17 = n30 * s18, u15 = (e19 % r28 + r28) % r28, d12 = Math.round((u15 - l17) / s18), f12 = ((d12 * s18 + l17) % r28 + r28) % r28, p11 = u15 - f12;
|
|
2129
|
+
if (p11 > r28 / 2 && (p11 -= r28), p11 < -r28 / 2 && (p11 += r28), Math.abs(p11) > c16) return {
|
|
2129
2130
|
dx: 0,
|
|
2130
2131
|
dy: 0
|
|
2131
2132
|
};
|
|
2132
|
-
let
|
|
2133
|
+
let m9 = 1 - Math.abs(p11) / c16, h7 = i24(f12), g6 = h7.nx, _7 = h7.ny, v4 = Math.abs(h7.nx), y4 = Math.abs(h7.ny), b3 = Math.min(1, 2 * v4 * y4), x3 = (y4 > v4 ? a22.vertScale : a22.horzScale) * (1 - b3) + a22.diagonalScale * b3, S3 = 1 + a22.irregularity * 0.5 * Math.sin(d12 * 1.73 + 0.7), C3 = Math.max(s18 * 0.5, c16), w3 = 0;
|
|
2133
2134
|
for (let e20 = 0; e20 < 5; e20++) {
|
|
2134
2135
|
let t26 = (e20 + 0.5) / 5, n31 = f12 - C3 + t26 * 2 * C3 - C3 / 5, r29 = f12 - C3 + t26 * 2 * C3 + C3 / 5, a23 = i24(n31), o21 = i24(r29);
|
|
2135
2136
|
w3 += Math.hypot(o21.nx - a23.nx, o21.ny - a23.ny) / (r29 - n31);
|
|
2136
2137
|
}
|
|
2137
2138
|
w3 /= 5;
|
|
2138
|
-
let T3 = a22.length * x3 * S3 *
|
|
2139
|
+
let T3 = a22.length * x3 * S3 * m9, E3 = Math.max(0, Math.min(a22.cornerCompensation, 1)), D3 = Math.max(0, T3 / (1 + E3 * w3 * T3)) * o20;
|
|
2139
2140
|
return {
|
|
2140
|
-
dx:
|
|
2141
|
-
dy:
|
|
2141
|
+
dx: g6 * D3,
|
|
2142
|
+
dy: _7 * D3
|
|
2142
2143
|
};
|
|
2143
2144
|
},
|
|
2144
2145
|
defaults: Xe
|
|
@@ -2158,12 +2159,12 @@ var $e = {
|
|
|
2158
2159
|
dx: 0,
|
|
2159
2160
|
dy: 0
|
|
2160
2161
|
};
|
|
2161
|
-
let s18 = r28 / Math.max(2, Math.round(r28 / Math.max(6, a22.bumpWidth))), c16 = n30 * s18, l17 = (e19 % r28 + r28) % r28,
|
|
2162
|
+
let s18 = r28 / Math.max(2, Math.round(r28 / Math.max(6, a22.bumpWidth))), c16 = n30 * s18, l17 = (e19 % r28 + r28) % r28, u15 = Math.floor((l17 - c16) / s18), d12 = (l17 - (u15 * s18 + c16)) / s18;
|
|
2162
2163
|
d12 < 0 && (d12 += 1), d12 > 1 && --d12;
|
|
2163
|
-
let f12 = Math.max(0, Math.min(a22.irregularity, 1)),
|
|
2164
|
+
let f12 = Math.max(0, Math.min(a22.irregularity, 1)), p11 = Math.max(0.5, a22.puffiness) * (1 + f12 * 0.55 * Math.sin(u15 * 1.73 + 0.7)) * Math.sin(Math.PI * d12) * o20, m9 = i24(e19);
|
|
2164
2165
|
return {
|
|
2165
|
-
dx:
|
|
2166
|
-
dy:
|
|
2166
|
+
dx: m9.nx * p11,
|
|
2167
|
+
dy: m9.ny * p11
|
|
2167
2168
|
};
|
|
2168
2169
|
},
|
|
2169
2170
|
defaults: Qe
|
|
@@ -2183,17 +2184,17 @@ var tt = {
|
|
|
2183
2184
|
dx: 0,
|
|
2184
2185
|
dy: 0
|
|
2185
2186
|
};
|
|
2186
|
-
let s18 = Math.max(0.5, a22.biteRadius), c16 = Math.max(2 * s18 + 0.5, a22.biteSpacing), l17 = r28 / Math.max(2, Math.floor(r28 / c16)),
|
|
2187
|
-
|
|
2188
|
-
let
|
|
2189
|
-
if (Math.abs(
|
|
2187
|
+
let s18 = Math.max(0.5, a22.biteRadius), c16 = Math.max(2 * s18 + 0.5, a22.biteSpacing), l17 = r28 / Math.max(2, Math.floor(r28 / c16)), u15 = n30 * l17, d12 = (e19 % r28 + r28) % r28, f12 = Math.round((d12 - u15) / l17), p11 = d12 - ((f12 * l17 + u15) % r28 + r28) % r28;
|
|
2188
|
+
p11 > r28 / 2 && (p11 -= r28), p11 < -r28 / 2 && (p11 += r28);
|
|
2189
|
+
let m9 = s18 * (1 + Math.max(0, Math.min(a22.irregularity, 1)) * 0.55 * Math.sin(f12 * 1.73 + 0.7));
|
|
2190
|
+
if (Math.abs(p11) > m9) return {
|
|
2190
2191
|
dx: 0,
|
|
2191
2192
|
dy: 0
|
|
2192
2193
|
};
|
|
2193
|
-
let
|
|
2194
|
+
let h7 = 1 - Math.abs(p11) / m9, g6 = -m9 * h7, _7 = i24(e19);
|
|
2194
2195
|
return {
|
|
2195
|
-
dx:
|
|
2196
|
-
dy:
|
|
2196
|
+
dx: _7.nx * g6 * o20,
|
|
2197
|
+
dy: _7.ny * g6 * o20
|
|
2197
2198
|
};
|
|
2198
2199
|
},
|
|
2199
2200
|
defaults: et
|
|
@@ -2213,17 +2214,17 @@ var rt = {
|
|
|
2213
2214
|
dx: 0,
|
|
2214
2215
|
dy: 0
|
|
2215
2216
|
};
|
|
2216
|
-
let s18 = Math.max(0.5, a22.scallopRadius), c16 = Math.max(2 * s18 + 0.5, a22.scallopSpacing), l17 = r28 / Math.max(2, Math.floor(r28 / c16)),
|
|
2217
|
-
|
|
2218
|
-
let
|
|
2219
|
-
if (Math.abs(
|
|
2217
|
+
let s18 = Math.max(0.5, a22.scallopRadius), c16 = Math.max(2 * s18 + 0.5, a22.scallopSpacing), l17 = r28 / Math.max(2, Math.floor(r28 / c16)), u15 = n30 * l17, d12 = (e19 % r28 + r28) % r28, f12 = Math.round((d12 - u15) / l17), p11 = d12 - ((f12 * l17 + u15) % r28 + r28) % r28;
|
|
2218
|
+
p11 > r28 / 2 && (p11 -= r28), p11 < -r28 / 2 && (p11 += r28);
|
|
2219
|
+
let m9 = s18 * (1 + Math.max(0, Math.min(a22.irregularity, 1)) * 0.55 * Math.sin(f12 * 1.73 + 0.7));
|
|
2220
|
+
if (Math.abs(p11) > m9) return {
|
|
2220
2221
|
dx: 0,
|
|
2221
2222
|
dy: 0
|
|
2222
2223
|
};
|
|
2223
|
-
let
|
|
2224
|
+
let h7 = (p11 + m9) / (2 * m9), g6 = m9 * Math.sin(Math.PI * h7) * o20, _7 = i24(e19);
|
|
2224
2225
|
return {
|
|
2225
|
-
dx:
|
|
2226
|
-
dy:
|
|
2226
|
+
dx: _7.nx * g6,
|
|
2227
|
+
dy: _7.ny * g6
|
|
2227
2228
|
};
|
|
2228
2229
|
},
|
|
2229
2230
|
defaults: nt
|
|
@@ -2251,41 +2252,41 @@ var ct = {
|
|
|
2251
2252
|
let l17 = {
|
|
2252
2253
|
...it,
|
|
2253
2254
|
...c16
|
|
2254
|
-
},
|
|
2255
|
+
}, u15 = useId(), d12 = 100 / n30, f12 = 100 / r28, p11 = ot(l17.lightFrom), m9 = e19.totalCss, h7 = [], g6 = [];
|
|
2255
2256
|
for (let t25 = 0; t25 < st; t25++) {
|
|
2256
|
-
let n31 = e19.perimeterAt(t25 / st *
|
|
2257
|
-
|
|
2257
|
+
let n31 = e19.perimeterAt(t25 / st * m9);
|
|
2258
|
+
h7.push({
|
|
2258
2259
|
x: n31.x,
|
|
2259
2260
|
y: n31.y,
|
|
2260
2261
|
side: at(n31.nx, n31.ny)
|
|
2261
|
-
}),
|
|
2262
|
+
}), g6.push({
|
|
2262
2263
|
x: n31.x - n31.nx * l17.bevelWidth * d12,
|
|
2263
2264
|
y: n31.y - n31.ny * l17.bevelWidth * f12
|
|
2264
2265
|
});
|
|
2265
2266
|
}
|
|
2266
|
-
let
|
|
2267
|
+
let _7 = [], v4 = null;
|
|
2267
2268
|
for (let e20 = 0; e20 < st; e20++) {
|
|
2268
|
-
let t25 =
|
|
2269
|
-
!
|
|
2269
|
+
let t25 = h7[e20].side;
|
|
2270
|
+
!v4 || v4.side !== t25 ? (v4 = {
|
|
2270
2271
|
side: t25,
|
|
2271
2272
|
idxs: [e20]
|
|
2272
|
-
},
|
|
2273
|
+
}, _7.push(v4)) : v4.idxs.push(e20);
|
|
2273
2274
|
}
|
|
2274
|
-
|
|
2275
|
+
_7.length > 1 && _7[0].side === _7[_7.length - 1].side && (_7[_7.length - 1].idxs = _7[_7.length - 1].idxs.concat(_7[0].idxs), _7.shift());
|
|
2275
2276
|
let y4 = (e20) => {
|
|
2276
|
-
let t25 = e20.idxs.map((e21) =>
|
|
2277
|
+
let t25 = e20.idxs.map((e21) => h7[e21]), n31 = e20.idxs.map((e21) => g6[e21]).reverse(), r29 = [...t25, ...n31];
|
|
2277
2278
|
if (r29.length === 0) return "";
|
|
2278
2279
|
let i25 = `M ${r29[0].x.toFixed(3)} ${r29[0].y.toFixed(3)}`;
|
|
2279
2280
|
for (let e21 = 1; e21 < r29.length; e21++) i25 += ` L ${r29[e21].x.toFixed(3)} ${r29[e21].y.toFixed(3)}`;
|
|
2280
2281
|
return i25 + " Z";
|
|
2281
2282
|
};
|
|
2282
2283
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", {
|
|
2283
|
-
id:
|
|
2284
|
+
id: u15,
|
|
2284
2285
|
children: /* @__PURE__ */ jsx("path", { d: e19.bodyPath })
|
|
2285
2286
|
}) }), /* @__PURE__ */ jsx("g", {
|
|
2286
|
-
clipPath: `url(#${
|
|
2287
|
-
children:
|
|
2288
|
-
className:
|
|
2287
|
+
clipPath: `url(#${u15})`,
|
|
2288
|
+
children: _7.map((e20, t25) => /* @__PURE__ */ jsx("path", {
|
|
2289
|
+
className: p11[e20.side],
|
|
2289
2290
|
d: y4(e20)
|
|
2290
2291
|
}, t25))
|
|
2291
2292
|
})] });
|
|
@@ -2329,7 +2330,7 @@ var dt = {
|
|
|
2329
2330
|
let i24 = {
|
|
2330
2331
|
...lt,
|
|
2331
2332
|
...r28
|
|
2332
|
-
}, c16 = useId(), l17 = useId(),
|
|
2333
|
+
}, c16 = useId(), l17 = useId(), u15 = Math.max(0, Math.min(i24.intensity, 1));
|
|
2333
2334
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("defs", { children: [/* @__PURE__ */ jsx("clipPath", {
|
|
2334
2335
|
id: l17,
|
|
2335
2336
|
children: /* @__PURE__ */ jsx("path", { d: e19.bodyPath })
|
|
@@ -2340,7 +2341,7 @@ var dt = {
|
|
|
2340
2341
|
/* @__PURE__ */ jsx("stop", {
|
|
2341
2342
|
offset: "0%",
|
|
2342
2343
|
stopColor: "black",
|
|
2343
|
-
stopOpacity:
|
|
2344
|
+
stopOpacity: u15
|
|
2344
2345
|
}),
|
|
2345
2346
|
/* @__PURE__ */ jsx("stop", {
|
|
2346
2347
|
offset: "45%",
|
|
@@ -2355,7 +2356,7 @@ var dt = {
|
|
|
2355
2356
|
/* @__PURE__ */ jsx("stop", {
|
|
2356
2357
|
offset: "100%",
|
|
2357
2358
|
stopColor: "white",
|
|
2358
|
-
stopOpacity:
|
|
2359
|
+
stopOpacity: u15
|
|
2359
2360
|
})
|
|
2360
2361
|
]
|
|
2361
2362
|
})] }), /* @__PURE__ */ jsx("rect", {
|
|
@@ -2382,32 +2383,32 @@ var pt = {
|
|
|
2382
2383
|
let i24 = {
|
|
2383
2384
|
...ft,
|
|
2384
2385
|
...r28
|
|
2385
|
-
}, c16 = 100 / e19, l17 = 100 / t25,
|
|
2386
|
+
}, c16 = 100 / e19, l17 = 100 / t25, u15 = i24.radius * c16, d12 = i24.radius * l17, f12 = i24.inset * c16, p11 = i24.inset * l17, m9 = i24.lightFrom[1] === "l" ? -i24.radius * 0.32 : i24.radius * 0.32, h7 = i24.lightFrom[0] === "t" ? -i24.radius * 0.32 : i24.radius * 0.32;
|
|
2386
2387
|
return /* @__PURE__ */ jsx(Fragment, { children: [
|
|
2387
|
-
[f12,
|
|
2388
|
-
[100 - f12,
|
|
2389
|
-
[f12, 100 -
|
|
2390
|
-
[100 - f12, 100 -
|
|
2388
|
+
[f12, p11],
|
|
2389
|
+
[100 - f12, p11],
|
|
2390
|
+
[f12, 100 - p11],
|
|
2391
|
+
[100 - f12, 100 - p11]
|
|
2391
2392
|
].map(([e20, t26], n31) => /* @__PURE__ */ jsxs("g", { children: [
|
|
2392
2393
|
/* @__PURE__ */ jsx("ellipse", {
|
|
2393
2394
|
className: "badge-bevel-dark",
|
|
2394
2395
|
cx: e20,
|
|
2395
2396
|
cy: t26,
|
|
2396
|
-
rx:
|
|
2397
|
+
rx: u15,
|
|
2397
2398
|
ry: d12
|
|
2398
2399
|
}),
|
|
2399
2400
|
/* @__PURE__ */ jsx("ellipse", {
|
|
2400
2401
|
className: "badge-bevel-medium-dark",
|
|
2401
|
-
cx: e20 -
|
|
2402
|
-
cy: t26 -
|
|
2403
|
-
rx:
|
|
2402
|
+
cx: e20 - m9 * 0.6 * c16,
|
|
2403
|
+
cy: t26 - h7 * 0.6 * l17,
|
|
2404
|
+
rx: u15 * 0.75,
|
|
2404
2405
|
ry: d12 * 0.75
|
|
2405
2406
|
}),
|
|
2406
2407
|
/* @__PURE__ */ jsx("ellipse", {
|
|
2407
2408
|
className: "badge-bevel-light",
|
|
2408
|
-
cx: e20 +
|
|
2409
|
-
cy: t26 +
|
|
2410
|
-
rx:
|
|
2409
|
+
cx: e20 + m9 * c16,
|
|
2410
|
+
cy: t26 + h7 * l17,
|
|
2411
|
+
rx: u15 * 0.45,
|
|
2411
2412
|
ry: d12 * 0.45
|
|
2412
2413
|
})
|
|
2413
2414
|
] }, n31)) });
|
|
@@ -2456,10 +2457,10 @@ var vt = {
|
|
|
2456
2457
|
let t25 = (e20 + 1) / (i24.lines + 1) * 100, n31 = _t(e20 * 2 + 1) * 4, r29 = _t(e20 * 2 + 2) * 4;
|
|
2457
2458
|
l17.push(`M -5 ${t25.toFixed(2)} Q 35 ${(t25 + n31).toFixed(2)} 60 ${t25.toFixed(2)} T 105 ${(t25 + r29).toFixed(2)}`);
|
|
2458
2459
|
}
|
|
2459
|
-
let
|
|
2460
|
+
let u15 = [];
|
|
2460
2461
|
for (let e20 = 0; e20 < i24.knots; e20++) {
|
|
2461
2462
|
let t25 = 30 + _t(e20 * 3 + 0.7) * 30 + 20, n31 = 50 + _t(e20 * 3 + 1.3) * 30;
|
|
2462
|
-
|
|
2463
|
+
u15.push([t25, n31]);
|
|
2463
2464
|
}
|
|
2464
2465
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", {
|
|
2465
2466
|
id: c16,
|
|
@@ -2472,7 +2473,7 @@ var vt = {
|
|
|
2472
2473
|
className: "badge-stroke",
|
|
2473
2474
|
d: e20,
|
|
2474
2475
|
fill: "none"
|
|
2475
|
-
}, `l${t25}`)),
|
|
2476
|
+
}, `l${t25}`)), u15.map(([e20, t25], n31) => /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("ellipse", {
|
|
2476
2477
|
className: "badge-stroke",
|
|
2477
2478
|
cx: e20,
|
|
2478
2479
|
cy: t25,
|
|
@@ -2501,8 +2502,8 @@ var bt = {
|
|
|
2501
2502
|
let i24 = {
|
|
2502
2503
|
...yt,
|
|
2503
2504
|
...r28
|
|
2504
|
-
}, s18 = 100 / t25, c16 = 100 / n30, l17 = e19.totalCss,
|
|
2505
|
-
for (let t26 = 0; t26 <
|
|
2505
|
+
}, s18 = 100 / t25, c16 = 100 / n30, l17 = e19.totalCss, u15 = Math.max(2, Math.round(l17 / Math.max(2 * i24.holeRadius, i24.holeSpacing))), d12 = l17 / u15, f12 = [];
|
|
2506
|
+
for (let t26 = 0; t26 < u15; t26++) {
|
|
2506
2507
|
let n31 = (t26 + 0.5) * d12;
|
|
2507
2508
|
if (Z(n31, l17, r28?.range) === 0) continue;
|
|
2508
2509
|
let i25 = e19.perimeterAt(n31);
|
|
@@ -2511,12 +2512,12 @@ var bt = {
|
|
|
2511
2512
|
cy: i25.y
|
|
2512
2513
|
});
|
|
2513
2514
|
}
|
|
2514
|
-
let
|
|
2515
|
+
let p11 = i24.holeRadius * s18, m9 = i24.holeRadius * c16;
|
|
2515
2516
|
return /* @__PURE__ */ jsx(Fragment, { children: f12.map((e20, t26) => /* @__PURE__ */ jsx("ellipse", {
|
|
2516
2517
|
cx: e20.cx,
|
|
2517
2518
|
cy: e20.cy,
|
|
2518
|
-
rx:
|
|
2519
|
-
ry:
|
|
2519
|
+
rx: p11,
|
|
2520
|
+
ry: m9,
|
|
2520
2521
|
fill: "black"
|
|
2521
2522
|
}, t26)) });
|
|
2522
2523
|
},
|
|
@@ -2549,42 +2550,42 @@ var wt = {
|
|
|
2549
2550
|
let l17 = {
|
|
2550
2551
|
...xt,
|
|
2551
2552
|
...c16
|
|
2552
|
-
},
|
|
2553
|
+
}, u15 = useId(), d12 = 100 / n30, f12 = 100 / r28, p11 = e19.totalCss, { lx: m9, ly: h7 } = Ct(l17.lightFrom), g6 = [], _7 = [];
|
|
2553
2554
|
for (let t25 = 0; t25 < Q; t25++) {
|
|
2554
|
-
let n31 = e19.perimeterAt(t25 / Q *
|
|
2555
|
-
|
|
2555
|
+
let n31 = e19.perimeterAt(t25 / Q * p11), r29 = -(n31.nx * m9 + n31.ny * h7), i25 = Math.max(0, Math.min((r29 + 1) / 2, 0.9999)), a22 = Math.floor(i25 * St.length);
|
|
2556
|
+
g6.push({
|
|
2556
2557
|
x: n31.x,
|
|
2557
2558
|
y: n31.y,
|
|
2558
2559
|
bucket: a22
|
|
2559
|
-
}),
|
|
2560
|
+
}), _7.push({
|
|
2560
2561
|
x: n31.x - n31.nx * l17.bevelWidth * d12,
|
|
2561
2562
|
y: n31.y - n31.ny * l17.bevelWidth * f12
|
|
2562
2563
|
});
|
|
2563
2564
|
}
|
|
2564
|
-
let
|
|
2565
|
+
let v4 = [], y4 = null;
|
|
2565
2566
|
for (let e20 = 0; e20 < Q; e20++) {
|
|
2566
|
-
let t25 =
|
|
2567
|
+
let t25 = g6[e20].bucket;
|
|
2567
2568
|
!y4 || y4.bucket !== t25 ? (y4 = {
|
|
2568
2569
|
bucket: t25,
|
|
2569
2570
|
idxs: [e20]
|
|
2570
|
-
},
|
|
2571
|
+
}, v4.push(y4)) : y4.idxs.push(e20);
|
|
2571
2572
|
}
|
|
2572
|
-
|
|
2573
|
+
v4.length > 1 && v4[0].bucket === v4[v4.length - 1].bucket && (v4[v4.length - 1].idxs = v4[v4.length - 1].idxs.concat(v4[0].idxs), v4.shift());
|
|
2573
2574
|
let b3 = (e20) => {
|
|
2574
2575
|
let t25 = e20.idxs[0], n31 = e20.idxs[e20.idxs.length - 1], r29 = (t25 - 1 + Q) % Q, i25 = (n31 + 1) % Q, a22 = [
|
|
2575
2576
|
r29,
|
|
2576
2577
|
...e20.idxs,
|
|
2577
2578
|
i25
|
|
2578
|
-
], o20 = a22.map((e21) =>
|
|
2579
|
+
], o20 = a22.map((e21) => g6[e21]), s18 = a22.map((e21) => _7[e21]).reverse(), c17 = [...o20, ...s18], l18 = `M ${c17[0].x.toFixed(3)} ${c17[0].y.toFixed(3)}`;
|
|
2579
2580
|
for (let e21 = 1; e21 < c17.length; e21++) l18 += ` L ${c17[e21].x.toFixed(3)} ${c17[e21].y.toFixed(3)}`;
|
|
2580
2581
|
return l18 + " Z";
|
|
2581
2582
|
};
|
|
2582
2583
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", {
|
|
2583
|
-
id:
|
|
2584
|
+
id: u15,
|
|
2584
2585
|
children: /* @__PURE__ */ jsx("path", { d: e19.bodyPath })
|
|
2585
2586
|
}) }), /* @__PURE__ */ jsx("g", {
|
|
2586
|
-
clipPath: `url(#${
|
|
2587
|
-
children:
|
|
2587
|
+
clipPath: `url(#${u15})`,
|
|
2588
|
+
children: v4.map((e20, t25) => /* @__PURE__ */ jsx("path", {
|
|
2588
2589
|
className: St[e20.bucket],
|
|
2589
2590
|
d: b3(e20)
|
|
2590
2591
|
}, t25))
|
|
@@ -2638,9 +2639,9 @@ var Ot = {
|
|
|
2638
2639
|
let c16 = {
|
|
2639
2640
|
...Dt,
|
|
2640
2641
|
...i24
|
|
2641
|
-
}, l17 = useId(),
|
|
2642
|
+
}, l17 = useId(), u15 = useId(), d12 = useId(), f12 = 100 / n30, p11 = 100 / r28, m9 = Math.max(0, Math.min(c16.irregularity, 1)), h7 = (e20) => 1 + m9 * 0.45 * Math.sin(e20 * 1.73 + 0.7), g6 = (e20) => 1 + m9 * 0.5 * Math.sin(e20 * 2.31 + 1.3), _7 = (e20) => m9 * 8 * Math.sin(e20 * 3.07 + 0.4), v4 = c16.width * f12, y4 = c16.gap * f12, b3 = c16.offset * f12, x3 = 50 - (c16.count * v4 + (c16.count - 1) * y4) / 2 + b3, S3 = [];
|
|
2642
2643
|
for (let e20 = 0; e20 < c16.count; e20++) {
|
|
2643
|
-
let t25 =
|
|
2644
|
+
let t25 = v4 * h7(e20), n31 = x3, r29 = x3 + t25, i25 = Math.tan((c16.angle + _7(e20)) * Math.PI / 180) * (f12 / p11) * 200 / 2, a22 = [
|
|
2644
2645
|
[n31 + i25, -50],
|
|
2645
2646
|
[r29 + i25, -50],
|
|
2646
2647
|
[r29 - i25, 150],
|
|
@@ -2648,8 +2649,8 @@ var Ot = {
|
|
|
2648
2649
|
];
|
|
2649
2650
|
S3.push({
|
|
2650
2651
|
points: a22.map(([e21, t26]) => `${e21.toFixed(3)},${t26.toFixed(3)}`).join(" "),
|
|
2651
|
-
opacity: Math.max(0, Math.min(c16.opacity *
|
|
2652
|
-
}), x3 +=
|
|
2652
|
+
opacity: Math.max(0, Math.min(c16.opacity * g6(e20), 1))
|
|
2653
|
+
}), x3 += v4 + y4;
|
|
2653
2654
|
}
|
|
2654
2655
|
let C3 = c16.gradientAngle * Math.PI / 180, w3 = Math.cos(C3), T3 = Math.sin(C3), E3 = 50 - w3 * 100 / 2, D3 = 50 - T3 * 100 / 2, O3 = 50 + w3 * 100 / 2, k3 = 50 + T3 * 100 / 2, A3 = Math.max(0, Math.min(c16.gradientStart, 1)), j3 = Math.max(0, Math.min(c16.gradientEnd, 1)), M3 = A3 <= j3 ? [
|
|
2655
2656
|
{
|
|
@@ -2704,7 +2705,7 @@ var Ot = {
|
|
|
2704
2705
|
}, t25))
|
|
2705
2706
|
}),
|
|
2706
2707
|
/* @__PURE__ */ jsx("mask", {
|
|
2707
|
-
id:
|
|
2708
|
+
id: u15,
|
|
2708
2709
|
maskUnits: "userSpaceOnUse",
|
|
2709
2710
|
x: "0",
|
|
2710
2711
|
y: "0",
|
|
@@ -2720,7 +2721,7 @@ var Ot = {
|
|
|
2720
2721
|
})
|
|
2721
2722
|
] }), /* @__PURE__ */ jsx("g", {
|
|
2722
2723
|
clipPath: `url(#${l17})`,
|
|
2723
|
-
mask: `url(#${
|
|
2724
|
+
mask: `url(#${u15})`,
|
|
2724
2725
|
children: S3.map((e20, t25) => /* @__PURE__ */ jsx("polygon", {
|
|
2725
2726
|
points: e20.points,
|
|
2726
2727
|
fill: c16.color,
|
|
@@ -2754,33 +2755,33 @@ var jt = {
|
|
|
2754
2755
|
let l17 = {
|
|
2755
2756
|
...kt,
|
|
2756
2757
|
...c16
|
|
2757
|
-
},
|
|
2758
|
+
}, u15 = useId(), d12 = useId(), f12 = useId(), p11 = e19.totalCss, m9 = [], h7 = null;
|
|
2758
2759
|
for (let t25 = 0; t25 < At; t25++) {
|
|
2759
|
-
let n31 = t25 / At *
|
|
2760
|
-
r29.ny < 0 ? (
|
|
2760
|
+
let n31 = t25 / At * p11, r29 = e19.perimeterAt(n31);
|
|
2761
|
+
r29.ny < 0 ? (h7 || (h7 = [], m9.push(h7)), h7.push({
|
|
2761
2762
|
x: r29.x,
|
|
2762
2763
|
y: r29.y
|
|
2763
|
-
})) :
|
|
2764
|
+
})) : h7 = null;
|
|
2764
2765
|
}
|
|
2765
|
-
if (
|
|
2766
|
-
let t25 = e19.perimeterAt(0), n31 = e19.perimeterAt((At - 1) / At *
|
|
2766
|
+
if (m9.length > 1) {
|
|
2767
|
+
let t25 = e19.perimeterAt(0), n31 = e19.perimeterAt((At - 1) / At * p11);
|
|
2767
2768
|
if (t25.ny < 0 && n31.ny < 0) {
|
|
2768
|
-
let e20 =
|
|
2769
|
-
|
|
2769
|
+
let e20 = m9.shift();
|
|
2770
|
+
m9[m9.length - 1].push(...e20);
|
|
2770
2771
|
}
|
|
2771
2772
|
}
|
|
2772
|
-
let
|
|
2773
|
-
for (let e20 of
|
|
2773
|
+
let g6 = [];
|
|
2774
|
+
for (let e20 of m9) {
|
|
2774
2775
|
if (e20.length < 2) continue;
|
|
2775
2776
|
let t25 = `M ${e20[0].x.toFixed(3)} ${e20[0].y.toFixed(3)}`;
|
|
2776
2777
|
for (let n31 = 1; n31 < e20.length; n31++) t25 += ` L ${e20[n31].x.toFixed(3)} ${e20[n31].y.toFixed(3)}`;
|
|
2777
|
-
|
|
2778
|
+
g6.push(t25);
|
|
2778
2779
|
}
|
|
2779
|
-
let
|
|
2780
|
+
let _7 = 100 / n30, v4 = 100 / r28, y4 = Math.max(_7, v4), b3 = l17.bezelWidth * y4, x3 = l17.rimWidth * y4, S3 = Math.max(0, l17.equator - l17.equatorSpread), C3 = Math.min(100, l17.equator + l17.equatorSpread * 1.6), w3 = `color-mix(in srgb, ${l17.accent} ${l17.equatorTint}%, white)`, T3 = `color-mix(in srgb, ${l17.accent} ${l17.baseTint}%, black)`;
|
|
2780
2781
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2781
2782
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
2782
2783
|
/* @__PURE__ */ jsxs("linearGradient", {
|
|
2783
|
-
id:
|
|
2784
|
+
id: u15,
|
|
2784
2785
|
x1: "0%",
|
|
2785
2786
|
y1: "0%",
|
|
2786
2787
|
x2: "0%",
|
|
@@ -2860,7 +2861,7 @@ var jt = {
|
|
|
2860
2861
|
] }),
|
|
2861
2862
|
/* @__PURE__ */ jsx("path", {
|
|
2862
2863
|
d: e19.bodyPath,
|
|
2863
|
-
fill: `url(#${
|
|
2864
|
+
fill: `url(#${u15})`,
|
|
2864
2865
|
style: { pointerEvents: "none" }
|
|
2865
2866
|
}),
|
|
2866
2867
|
/* @__PURE__ */ jsx("rect", {
|
|
@@ -2872,7 +2873,7 @@ var jt = {
|
|
|
2872
2873
|
clipPath: `url(#${f12})`,
|
|
2873
2874
|
style: { pointerEvents: "none" }
|
|
2874
2875
|
}),
|
|
2875
|
-
|
|
2876
|
+
g6.map((e20, t25) => /* @__PURE__ */ jsx("path", {
|
|
2876
2877
|
d: e20,
|
|
2877
2878
|
fill: "none",
|
|
2878
2879
|
stroke: "white",
|
|
@@ -2932,29 +2933,29 @@ var $ = {
|
|
|
2932
2933
|
let l17 = {
|
|
2933
2934
|
...Mt,
|
|
2934
2935
|
...c16
|
|
2935
|
-
},
|
|
2936
|
+
}, u15 = Math.max(0, Math.min(l17.specularity, 1)), d12 = useId(), f12 = useId(), p11 = useId(), m9 = e19.totalCss, h7 = [], g6 = null;
|
|
2936
2937
|
for (let t25 = 0; t25 < Nt; t25++) {
|
|
2937
|
-
let n31 = t25 / Nt *
|
|
2938
|
-
r29.ny < 0 ? (
|
|
2938
|
+
let n31 = t25 / Nt * m9, r29 = e19.perimeterAt(n31);
|
|
2939
|
+
r29.ny < 0 ? (g6 || (g6 = [], h7.push(g6)), g6.push({
|
|
2939
2940
|
x: r29.x,
|
|
2940
2941
|
y: r29.y
|
|
2941
|
-
})) :
|
|
2942
|
+
})) : g6 = null;
|
|
2942
2943
|
}
|
|
2943
|
-
if (
|
|
2944
|
-
let t25 = e19.perimeterAt(0), n31 = e19.perimeterAt((Nt - 1) / Nt *
|
|
2944
|
+
if (h7.length > 1) {
|
|
2945
|
+
let t25 = e19.perimeterAt(0), n31 = e19.perimeterAt((Nt - 1) / Nt * m9);
|
|
2945
2946
|
if (t25.ny < 0 && n31.ny < 0) {
|
|
2946
|
-
let e20 =
|
|
2947
|
-
|
|
2947
|
+
let e20 = h7.shift();
|
|
2948
|
+
h7[h7.length - 1].push(...e20);
|
|
2948
2949
|
}
|
|
2949
2950
|
}
|
|
2950
|
-
let
|
|
2951
|
-
for (let e20 of
|
|
2951
|
+
let _7 = [];
|
|
2952
|
+
for (let e20 of h7) {
|
|
2952
2953
|
if (e20.length < 2) continue;
|
|
2953
2954
|
let t25 = `M ${e20[0].x.toFixed(3)} ${e20[0].y.toFixed(3)}`;
|
|
2954
2955
|
for (let n31 = 1; n31 < e20.length; n31++) t25 += ` L ${e20[n31].x.toFixed(3)} ${e20[n31].y.toFixed(3)}`;
|
|
2955
|
-
|
|
2956
|
+
_7.push(t25);
|
|
2956
2957
|
}
|
|
2957
|
-
let
|
|
2958
|
+
let v4 = 100 / n30, y4 = 100 / r28, b3 = Math.max(v4, y4), x3 = l17.bezelWidth * b3, S3 = l17.rimWidth * b3, C3 = Math.max(0, l17.equator - l17.equatorSpread), w3 = Math.min(100, l17.equator + l17.equatorSpread), T3 = 100 - Math.round(u15 * 85), E3 = `color-mix(in srgb, ${l17.accent} ${T3}%, white)`, D3 = `color-mix(in srgb, ${l17.accent} ${l17.topDarkness}%, black)`, O3 = `color-mix(in srgb, ${l17.accent} ${l17.baseDarkness}%, black)`, k3 = 100 - Math.round(u15 * 50), A3 = 100 - Math.round(u15 * 30), j3 = `color-mix(in srgb, ${l17.accent} ${k3}%, white)`, M3 = `color-mix(in srgb, ${l17.accent} ${A3}%, white)`, N3 = l17.glossAlphaTop * u15, P3 = l17.bezelAlpha * (0.4 + 0.6 * u15), F3 = l17.rimAlpha * (0.6 + 0.4 * u15);
|
|
2958
2959
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2959
2960
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
2960
2961
|
/* @__PURE__ */ jsxs("linearGradient", {
|
|
@@ -3007,7 +3008,7 @@ var $ = {
|
|
|
3007
3008
|
})]
|
|
3008
3009
|
}),
|
|
3009
3010
|
/* @__PURE__ */ jsx("clipPath", {
|
|
3010
|
-
id:
|
|
3011
|
+
id: p11,
|
|
3011
3012
|
children: /* @__PURE__ */ jsx("path", { d: e19.bodyPath })
|
|
3012
3013
|
})
|
|
3013
3014
|
] }),
|
|
@@ -3022,10 +3023,10 @@ var $ = {
|
|
|
3022
3023
|
width: "100",
|
|
3023
3024
|
height: l17.glossExtent,
|
|
3024
3025
|
fill: `url(#${f12})`,
|
|
3025
|
-
clipPath: `url(#${
|
|
3026
|
+
clipPath: `url(#${p11})`,
|
|
3026
3027
|
style: { pointerEvents: "none" }
|
|
3027
3028
|
}),
|
|
3028
|
-
|
|
3029
|
+
_7.map((e20, t25) => /* @__PURE__ */ jsx("path", {
|
|
3029
3030
|
d: e20,
|
|
3030
3031
|
fill: "none",
|
|
3031
3032
|
stroke: "white",
|
|
@@ -3054,7 +3055,7 @@ function Pt(e19) {
|
|
|
3054
3055
|
return e19.as ? e19.as : e19.href ? "a" : e19.onClick ? "button" : "span";
|
|
3055
3056
|
}
|
|
3056
3057
|
function Ft(l17) {
|
|
3057
|
-
let { shape:
|
|
3058
|
+
let { shape: u15 = "pill", tone: d12 = "neutral", variant: f12 = "outline", size: p11 = "sm", onClick: m9, onRemove: h7, removeLabel: g6, href: _7, children: v4, className: y4, shapeParams: b3, bloat: x3, padding: S3, style: C3, breakStyle: w3, crawl: T3, base: E3, baseParams: D3, effects: O3 } = l17, k3 = l17["aria-label"], A3 = Pt(l17), [j3, M3] = useState(false), [N3, P3] = useState(0), F3 = pe[u15] ?? pe.pill, ee2 = pe[u15] ? u15 : "pill", I3 = F3.Component, te2 = {
|
|
3058
3059
|
...F3.defaults ?? {},
|
|
3059
3060
|
...b3 ?? {}
|
|
3060
3061
|
};
|
|
@@ -3113,7 +3114,7 @@ function Ft(l17) {
|
|
|
3113
3114
|
"data-shape": L2 ? "compose" : ee2,
|
|
3114
3115
|
"data-tone": d12,
|
|
3115
3116
|
"data-variant": f12,
|
|
3116
|
-
"data-size":
|
|
3117
|
+
"data-size": p11,
|
|
3117
3118
|
"data-focused": j3 ? "true" : void 0,
|
|
3118
3119
|
onFocus: () => M3(true),
|
|
3119
3120
|
onBlur: () => M3(false),
|
|
@@ -3156,12 +3157,12 @@ function Ft(l17) {
|
|
|
3156
3157
|
return o20 += " Z", {
|
|
3157
3158
|
bodyPath: o20,
|
|
3158
3159
|
perimeterAt: (e20) => {
|
|
3159
|
-
let t26 = (e20 % i24 + i24) % i24, o21 = a22(t26), s18 = i24 / (600 * 2), c16 = a22(t26 - s18), l18 = a22(t26 + s18),
|
|
3160
|
+
let t26 = (e20 % i24 + i24) % i24, o21 = a22(t26), s18 = i24 / (600 * 2), c16 = a22(t26 - s18), l18 = a22(t26 + s18), u16 = (l18.x - c16.x) / n30, d13 = (l18.y - c16.y) / r28, f13 = Math.hypot(u16, d13) || 1, p12 = d13 / f13, m10 = -u16 / f13;
|
|
3160
3161
|
return {
|
|
3161
3162
|
x: o21.x,
|
|
3162
3163
|
y: o21.y,
|
|
3163
|
-
nx:
|
|
3164
|
-
ny:
|
|
3164
|
+
nx: p12,
|
|
3165
|
+
ny: m10
|
|
3165
3166
|
};
|
|
3166
3167
|
},
|
|
3167
3168
|
totalCss: i24
|
|
@@ -3229,12 +3230,12 @@ function Ft(l17) {
|
|
|
3229
3230
|
})
|
|
3230
3231
|
}) : null, /* @__PURE__ */ jsxs("span", {
|
|
3231
3232
|
className: c3.content,
|
|
3232
|
-
children: [/* @__PURE__ */ jsx("span", { children:
|
|
3233
|
+
children: [/* @__PURE__ */ jsx("span", { children: v4 }), h7 && /* @__PURE__ */ jsx("button", {
|
|
3233
3234
|
type: "button",
|
|
3234
3235
|
className: c3.remove,
|
|
3235
|
-
"aria-label":
|
|
3236
|
+
"aria-label": g6 ?? "Remove",
|
|
3236
3237
|
onClick: (e19) => {
|
|
3237
|
-
e19.stopPropagation(),
|
|
3238
|
+
e19.stopPropagation(), h7();
|
|
3238
3239
|
},
|
|
3239
3240
|
children: /* @__PURE__ */ jsx("svg", {
|
|
3240
3241
|
viewBox: "0 0 10 10",
|
|
@@ -3255,12 +3256,12 @@ function Ft(l17) {
|
|
|
3255
3256
|
return A3 === "button" ? /* @__PURE__ */ jsx("button", {
|
|
3256
3257
|
type: "button",
|
|
3257
3258
|
...le2,
|
|
3258
|
-
onClick:
|
|
3259
|
+
onClick: m9,
|
|
3259
3260
|
children: K2
|
|
3260
3261
|
}) : A3 === "a" ? /* @__PURE__ */ jsx("a", {
|
|
3261
|
-
href:
|
|
3262
|
+
href: _7,
|
|
3262
3263
|
...le2,
|
|
3263
|
-
onClick:
|
|
3264
|
+
onClick: m9,
|
|
3264
3265
|
children: K2
|
|
3265
3266
|
}) : /* @__PURE__ */ jsx("span", {
|
|
3266
3267
|
...le2,
|
|
@@ -3309,220 +3310,244 @@ function i4() {
|
|
|
3309
3310
|
});
|
|
3310
3311
|
}
|
|
3311
3312
|
var a4 = forwardRef(function(e19, a22) {
|
|
3312
|
-
let { variant: o20 = "secondary", size: s18 = "md", disabled: c16, loading: l17, leadingIcon:
|
|
3313
|
+
let { variant: o20 = "secondary", size: s18 = "md", disabled: c16, loading: l17, leadingIcon: u15, trailingIcon: d12, fullWidth: f12, iconOnly: p11, ariaLabel: m9, type: h7 = "button", className: g6, style: _7, children: v4, onClick: y4 } = e19;
|
|
3313
3314
|
return /* @__PURE__ */ jsxs("button", {
|
|
3314
3315
|
ref: a22,
|
|
3315
|
-
type:
|
|
3316
|
+
type: h7,
|
|
3316
3317
|
className: [
|
|
3317
3318
|
r5.button,
|
|
3318
3319
|
r5[`variant_${o20}`],
|
|
3319
3320
|
r5[`size_${s18}`],
|
|
3320
3321
|
f12 && r5.fullWidth,
|
|
3321
|
-
|
|
3322
|
+
p11 && r5.iconOnly,
|
|
3322
3323
|
l17 && r5.loading,
|
|
3323
|
-
|
|
3324
|
+
g6
|
|
3324
3325
|
].filter(Boolean).join(" "),
|
|
3325
|
-
style:
|
|
3326
|
+
style: _7,
|
|
3326
3327
|
disabled: c16,
|
|
3327
3328
|
"aria-busy": l17 ? true : void 0,
|
|
3328
|
-
"aria-label":
|
|
3329
|
+
"aria-label": m9,
|
|
3329
3330
|
onClick: y4,
|
|
3330
3331
|
children: [
|
|
3331
|
-
!
|
|
3332
|
+
!p11 && (l17 || u15) && /* @__PURE__ */ jsx("span", {
|
|
3332
3333
|
className: r5.iconSlot,
|
|
3333
|
-
children: l17 ? /* @__PURE__ */ jsx(i4, {}) :
|
|
3334
|
+
children: l17 ? /* @__PURE__ */ jsx(i4, {}) : u15
|
|
3334
3335
|
}),
|
|
3335
|
-
|
|
3336
|
+
p11 ? l17 ? /* @__PURE__ */ jsx(i4, {}) : /* @__PURE__ */ jsx("span", {
|
|
3336
3337
|
className: r5.iconSlot,
|
|
3337
|
-
children:
|
|
3338
|
-
}) :
|
|
3338
|
+
children: v4
|
|
3339
|
+
}) : v4 !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
3339
3340
|
className: r5.label,
|
|
3340
|
-
children:
|
|
3341
|
+
children: v4
|
|
3341
3342
|
}),
|
|
3342
|
-
!
|
|
3343
|
+
!p11 && d12 && /* @__PURE__ */ jsx("span", {
|
|
3343
3344
|
className: r5.iconSlot,
|
|
3344
3345
|
children: d12
|
|
3345
3346
|
})
|
|
3346
3347
|
]
|
|
3347
3348
|
});
|
|
3348
3349
|
});
|
|
3349
|
-
function s5(e19) {
|
|
3350
|
-
let
|
|
3351
|
-
|
|
3352
|
-
|
|
3350
|
+
function s5(e19, t25) {
|
|
3351
|
+
let n30 = 0;
|
|
3352
|
+
for (let r29 = t25 - 1; r29 >= 0; r29--) if (e19[r29]?.locked) {
|
|
3353
|
+
n30 = r29 + 1;
|
|
3354
|
+
break;
|
|
3355
|
+
}
|
|
3356
|
+
let r28 = e19.length;
|
|
3357
|
+
for (let n31 = t25 + 1; n31 < e19.length; n31++) if (e19[n31]?.locked) {
|
|
3358
|
+
r28 = n31;
|
|
3359
|
+
break;
|
|
3360
|
+
}
|
|
3361
|
+
return [n30, r28];
|
|
3362
|
+
}
|
|
3363
|
+
function c4(t25) {
|
|
3364
|
+
let { threshold: i24 = 4 } = t25, a22 = useRef(t25);
|
|
3365
|
+
a22.current = t25;
|
|
3366
|
+
let o20 = useRef(null), c16 = useRef(null), l17 = useRef(null), [u15, d12] = useState({
|
|
3353
3367
|
draggedIds: null,
|
|
3354
3368
|
targetIndex: null
|
|
3355
|
-
}),
|
|
3356
|
-
let
|
|
3357
|
-
if (!
|
|
3358
|
-
let
|
|
3359
|
-
for (let
|
|
3360
|
-
let
|
|
3361
|
-
if (
|
|
3362
|
-
|
|
3369
|
+
}), f12 = useCallback((e19, t26) => {
|
|
3370
|
+
let [n30, r28] = s5(a22.current.items, t26), i25 = o20.current;
|
|
3371
|
+
if (!i25) return n30;
|
|
3372
|
+
let c17 = Array.from(i25.children), l18 = c17.length;
|
|
3373
|
+
for (let t27 = 0; t27 < c17.length; t27++) {
|
|
3374
|
+
let n31 = c17[t27];
|
|
3375
|
+
if (n31 && e19 < n31.getBoundingClientRect().bottom) {
|
|
3376
|
+
l18 = t27;
|
|
3363
3377
|
break;
|
|
3364
3378
|
}
|
|
3365
3379
|
}
|
|
3366
|
-
return Math.min(
|
|
3367
|
-
}, []),
|
|
3368
|
-
o20.current =
|
|
3369
|
-
}, []),
|
|
3370
|
-
if (!a22.current.items[
|
|
3380
|
+
return Math.max(n30, Math.min(l18, r28));
|
|
3381
|
+
}, []), p11 = useCallback((e19) => {
|
|
3382
|
+
o20.current = e19;
|
|
3383
|
+
}, []), m9 = useCallback((e19, t26, n30) => {
|
|
3384
|
+
if (!a22.current.items[t26]?.locked) {
|
|
3371
3385
|
try {
|
|
3372
|
-
|
|
3386
|
+
n30.currentTarget.setPointerCapture?.(n30.pointerId);
|
|
3373
3387
|
} catch {
|
|
3374
3388
|
}
|
|
3375
|
-
|
|
3376
|
-
id:
|
|
3377
|
-
sourceIndex:
|
|
3378
|
-
startX:
|
|
3379
|
-
startY:
|
|
3380
|
-
pointerId:
|
|
3389
|
+
c16.current = {
|
|
3390
|
+
id: e19,
|
|
3391
|
+
sourceIndex: t26,
|
|
3392
|
+
startX: n30.clientX,
|
|
3393
|
+
startY: n30.clientY,
|
|
3394
|
+
pointerId: n30.pointerId
|
|
3381
3395
|
};
|
|
3382
3396
|
}
|
|
3383
|
-
}, []),
|
|
3384
|
-
|
|
3397
|
+
}, []), h7 = useCallback(() => {
|
|
3398
|
+
c16.current = null, l17.current = null, d12({
|
|
3385
3399
|
draggedIds: null,
|
|
3386
3400
|
targetIndex: null
|
|
3387
3401
|
});
|
|
3388
3402
|
}, []);
|
|
3389
3403
|
return {
|
|
3390
|
-
rowProps: (
|
|
3404
|
+
rowProps: (e19, t26) => ({ onPointerDown: (n30) => m9(e19, t26, n30) }),
|
|
3391
3405
|
containerProps: {
|
|
3392
|
-
ref:
|
|
3393
|
-
onPointerMove: useCallback((
|
|
3394
|
-
let
|
|
3395
|
-
if (
|
|
3396
|
-
let n31 =
|
|
3397
|
-
n31 !==
|
|
3398
|
-
draggedIds:
|
|
3406
|
+
ref: p11,
|
|
3407
|
+
onPointerMove: useCallback((e19) => {
|
|
3408
|
+
let t26 = l17.current;
|
|
3409
|
+
if (t26) {
|
|
3410
|
+
let n31 = f12(e19.clientY, t26.sourceIndex);
|
|
3411
|
+
n31 !== t26.targetIndex && (t26.targetIndex = n31, d12({
|
|
3412
|
+
draggedIds: t26.draggedIds,
|
|
3399
3413
|
targetIndex: n31
|
|
3400
3414
|
}));
|
|
3401
3415
|
return;
|
|
3402
3416
|
}
|
|
3403
|
-
let
|
|
3404
|
-
if (!
|
|
3405
|
-
let
|
|
3406
|
-
if (Math.hypot(
|
|
3407
|
-
let
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
draggedIds:
|
|
3414
|
-
targetIndex:
|
|
3417
|
+
let n30 = c16.current;
|
|
3418
|
+
if (!n30) return;
|
|
3419
|
+
let r28 = e19.clientX - n30.startX, o21 = e19.clientY - n30.startY;
|
|
3420
|
+
if (Math.hypot(r28, o21) < i24) return;
|
|
3421
|
+
let u16 = a22.current.selectedIds, p12 = u16.includes(n30.id), [m10, h8] = s5(a22.current.items, n30.sourceIndex), g6 = (p12 ? [...u16] : [n30.id]).filter((e20) => {
|
|
3422
|
+
let t27 = a22.current.items.findIndex((t28) => t28.id === e20);
|
|
3423
|
+
return t27 >= m10 && t27 < h8;
|
|
3424
|
+
}), _7 = f12(e19.clientY, n30.sourceIndex);
|
|
3425
|
+
l17.current = {
|
|
3426
|
+
...n30,
|
|
3427
|
+
draggedIds: g6,
|
|
3428
|
+
targetIndex: _7
|
|
3429
|
+
}, d12({
|
|
3430
|
+
draggedIds: g6,
|
|
3431
|
+
targetIndex: _7
|
|
3415
3432
|
});
|
|
3416
|
-
}, [
|
|
3417
|
-
onPointerUp: useCallback((
|
|
3418
|
-
let
|
|
3419
|
-
if (!
|
|
3420
|
-
|
|
3433
|
+
}, [f12, i24]),
|
|
3434
|
+
onPointerUp: useCallback((e19) => {
|
|
3435
|
+
let t26 = l17.current;
|
|
3436
|
+
if (!t26) {
|
|
3437
|
+
h7();
|
|
3421
3438
|
return;
|
|
3422
3439
|
}
|
|
3423
|
-
let
|
|
3424
|
-
if (
|
|
3425
|
-
let
|
|
3426
|
-
return
|
|
3427
|
-
}),
|
|
3428
|
-
o21 &&
|
|
3429
|
-
}, [
|
|
3440
|
+
let n30 = f12(e19.clientY, t26.sourceIndex), r28 = a22.current.items, i25 = t26.draggedIds.map((e20) => r28.findIndex((t27) => t27.id === e20)).filter((e20) => e20 >= 0).sort((e20, t27) => e20 - t27), o21 = i25.length > 0 && i25.every((e20, t27) => {
|
|
3441
|
+
if (t27 === 0) return true;
|
|
3442
|
+
let n31 = i25[t27 - 1];
|
|
3443
|
+
return n31 !== void 0 && e20 === n31 + 1;
|
|
3444
|
+
}), s18 = i25[0], c17 = i25[i25.length - 1];
|
|
3445
|
+
o21 && s18 !== void 0 && c17 !== void 0 && n30 >= s18 && n30 <= c17 + 1 || a22.current.onReorder(t26.draggedIds, n30), h7();
|
|
3446
|
+
}, [f12, h7]),
|
|
3430
3447
|
onPointerCancel: useCallback(() => {
|
|
3431
|
-
|
|
3432
|
-
}, [
|
|
3448
|
+
h7();
|
|
3449
|
+
}, [h7])
|
|
3433
3450
|
},
|
|
3434
|
-
state:
|
|
3451
|
+
state: u15
|
|
3435
3452
|
};
|
|
3436
3453
|
}
|
|
3437
|
-
var
|
|
3438
|
-
grid: "
|
|
3439
|
-
table: "
|
|
3440
|
-
|
|
3441
|
-
sortActive: "
|
|
3442
|
-
empty: "
|
|
3443
|
-
handleCol: "
|
|
3444
|
-
handleCell: "
|
|
3445
|
-
dragging: "
|
|
3446
|
-
|
|
3454
|
+
var l4 = {
|
|
3455
|
+
grid: "_grid_1uuch_1",
|
|
3456
|
+
table: "_table_1uuch_6",
|
|
3457
|
+
sortButton: "_sortButton_1uuch_34",
|
|
3458
|
+
sortActive: "_sortActive_1uuch_46",
|
|
3459
|
+
empty: "_empty_1uuch_48",
|
|
3460
|
+
handleCol: "_handleCol_1uuch_56",
|
|
3461
|
+
handleCell: "_handleCell_1uuch_57",
|
|
3462
|
+
dragging: "_dragging_1uuch_66",
|
|
3463
|
+
dropBefore: "_dropBefore_1uuch_68",
|
|
3464
|
+
dropAfter: "_dropAfter_1uuch_69"
|
|
3447
3465
|
};
|
|
3448
|
-
function
|
|
3449
|
-
let { rows:
|
|
3450
|
-
if (!
|
|
3451
|
-
let
|
|
3452
|
-
if (!
|
|
3453
|
-
let
|
|
3454
|
-
return [...
|
|
3455
|
-
let i24 =
|
|
3456
|
-
return i24 == null && a22 == null ? 0 : i24 == null ? 1 : a22 == null ? -1 : i24 < a22 ? -1 *
|
|
3466
|
+
function u4(e19) {
|
|
3467
|
+
let { rows: n30, columns: s18, defaultSort: u15, onReorder: d12, empty: f12 = "\u2014", className: p11 } = e19, [m9, h7] = useState(u15 ?? null), g6 = useMemo(() => {
|
|
3468
|
+
if (!m9) return [...n30];
|
|
3469
|
+
let e20 = s18.find((e21) => e21.id === m9.columnId);
|
|
3470
|
+
if (!e20) return [...n30];
|
|
3471
|
+
let t25 = e20.accessor ?? ((t26) => t26[e20.id]), r28 = m9.direction === "asc" ? 1 : -1;
|
|
3472
|
+
return [...n30].sort((e21, n31) => {
|
|
3473
|
+
let i24 = t25(e21), a22 = t25(n31);
|
|
3474
|
+
return i24 == null && a22 == null ? 0 : i24 == null ? 1 : a22 == null ? -1 : i24 < a22 ? -1 * r28 : i24 > a22 ? 1 * r28 : 0;
|
|
3457
3475
|
});
|
|
3458
3476
|
}, [
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
]),
|
|
3463
|
-
|
|
3464
|
-
columnId:
|
|
3477
|
+
n30,
|
|
3478
|
+
s18,
|
|
3479
|
+
m9
|
|
3480
|
+
]), _7 = (e20) => {
|
|
3481
|
+
h7((t25) => !t25 || t25.columnId !== e20 ? {
|
|
3482
|
+
columnId: e20,
|
|
3465
3483
|
direction: "asc"
|
|
3466
|
-
} :
|
|
3467
|
-
columnId:
|
|
3484
|
+
} : t25.direction === "asc" ? {
|
|
3485
|
+
columnId: e20,
|
|
3468
3486
|
direction: "desc"
|
|
3469
3487
|
} : null);
|
|
3470
|
-
},
|
|
3471
|
-
items:
|
|
3472
|
-
id:
|
|
3488
|
+
}, v4 = c4({
|
|
3489
|
+
items: g6.map((e20) => ({
|
|
3490
|
+
id: e20.id,
|
|
3473
3491
|
label: ""
|
|
3474
3492
|
})),
|
|
3475
3493
|
selectedIds: [],
|
|
3476
3494
|
onReorder: d12 ?? (() => {
|
|
3477
3495
|
})
|
|
3478
3496
|
}), y4 = !!d12;
|
|
3479
|
-
return /* @__PURE__ */
|
|
3480
|
-
className: [
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
className: c4.table,
|
|
3497
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3498
|
+
className: [l4.grid, p11].filter(Boolean).join(" "),
|
|
3499
|
+
onPointerMove: y4 ? v4.containerProps.onPointerMove : void 0,
|
|
3500
|
+
onPointerUp: y4 ? v4.containerProps.onPointerUp : void 0,
|
|
3501
|
+
onPointerCancel: y4 ? v4.containerProps.onPointerCancel : void 0,
|
|
3502
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
3503
|
+
className: l4.table,
|
|
3487
3504
|
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [y4 && /* @__PURE__ */ jsx("th", {
|
|
3488
|
-
className:
|
|
3505
|
+
className: l4.handleCol,
|
|
3489
3506
|
"aria-label": "drag"
|
|
3490
|
-
}),
|
|
3491
|
-
let
|
|
3492
|
-
return /* @__PURE__ */
|
|
3493
|
-
className: [
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
children:
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3507
|
+
}), s18.map((e20) => {
|
|
3508
|
+
let t25 = e20.sortable !== false, n31 = m9?.columnId === e20.id, r28 = n31 ? m9.direction === "asc" ? " \u2191" : " \u2193" : "";
|
|
3509
|
+
return /* @__PURE__ */ jsx("th", {
|
|
3510
|
+
className: [e20.className, n31 ? l4.sortActive : ""].filter(Boolean).join(" "),
|
|
3511
|
+
"aria-sort": t25 ? n31 ? m9.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
3512
|
+
children: t25 ? /* @__PURE__ */ jsxs("button", {
|
|
3513
|
+
type: "button",
|
|
3514
|
+
className: l4.sortButton,
|
|
3515
|
+
onClick: () => _7(e20.id),
|
|
3516
|
+
children: [e20.header, r28]
|
|
3517
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [e20.header, r28] })
|
|
3518
|
+
}, e20.id);
|
|
3519
|
+
})] }) }), /* @__PURE__ */ jsxs("tbody", {
|
|
3520
|
+
ref: y4 ? v4.containerProps.ref : void 0,
|
|
3521
|
+
children: [g6.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
|
|
3522
|
+
colSpan: s18.length + +!!y4,
|
|
3523
|
+
className: l4.empty,
|
|
3524
|
+
children: f12
|
|
3525
|
+
}) }), g6.map((e20, t25) => {
|
|
3526
|
+
let n31 = v4.state.draggedIds?.includes(e20.id) ?? false, r28 = v4.state.targetIndex;
|
|
3527
|
+
return /* @__PURE__ */ jsxs("tr", {
|
|
3528
|
+
className: [
|
|
3529
|
+
n31 && l4.dragging,
|
|
3530
|
+
r28 === t25 && l4.dropBefore,
|
|
3531
|
+
r28 === g6.length && t25 === g6.length - 1 && l4.dropAfter
|
|
3532
|
+
].filter(Boolean).join(" ") || void 0,
|
|
3533
|
+
children: [y4 && /* @__PURE__ */ jsx("td", {
|
|
3534
|
+
className: l4.handleCell,
|
|
3535
|
+
onPointerDown: (n32) => v4.rowProps(e20.id, t25).onPointerDown(n32),
|
|
3536
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3537
|
+
"aria-hidden": "true",
|
|
3538
|
+
children: "\u22EE\u22EE"
|
|
3539
|
+
})
|
|
3540
|
+
}), s18.map((t26) => {
|
|
3541
|
+
let n32 = t26.accessor ?? ((e21) => e21[t26.id]), r29 = t26.render ? t26.render(e20) : String(n32(e20) ?? "");
|
|
3542
|
+
return /* @__PURE__ */ jsx("td", {
|
|
3543
|
+
className: t26.className,
|
|
3544
|
+
children: r29
|
|
3545
|
+
}, t26.id);
|
|
3546
|
+
})]
|
|
3547
|
+
}, e20.id);
|
|
3520
3548
|
})]
|
|
3521
|
-
})
|
|
3522
|
-
})
|
|
3523
|
-
className: c4.dropIndicator,
|
|
3524
|
-
style: { top: `${v3.state.targetIndex * 28}px` }
|
|
3525
|
-
})]
|
|
3549
|
+
})]
|
|
3550
|
+
})
|
|
3526
3551
|
});
|
|
3527
3552
|
}
|
|
3528
3553
|
var r7 = {
|
|
@@ -3560,18 +3585,18 @@ function s6({ label: e19, inverted: n30 = false, variant: i24 = "default", class
|
|
|
3560
3585
|
children: e19
|
|
3561
3586
|
});
|
|
3562
3587
|
}
|
|
3563
|
-
function c5({ keys: i24, separator: a22 = "+", variant: c16 = "default", font: l17, className:
|
|
3588
|
+
function c5({ keys: i24, separator: a22 = "+", variant: c16 = "default", font: l17, className: u15 }) {
|
|
3564
3589
|
if (!i24 || i24.length === 0) return /* @__PURE__ */ jsx("span", {
|
|
3565
|
-
className: [r7.keysEmpty,
|
|
3590
|
+
className: [r7.keysEmpty, u15].filter(Boolean).join(" "),
|
|
3566
3591
|
children: "\u2014"
|
|
3567
3592
|
});
|
|
3568
3593
|
let d12 = i24.map((e19, t25) => ({
|
|
3569
3594
|
k: e19,
|
|
3570
3595
|
i: t25
|
|
3571
|
-
})).sort((e19, t25) => (o5(e19.k.label) === "modifier" ? 0 : 1) - (o5(t25.k.label) === "modifier" ? 0 : 1) || e19.i - t25.i).map(({ k: e19 }) => e19), f12 = d12.findIndex((e19) => o5(e19.label) !== "modifier"),
|
|
3596
|
+
})).sort((e19, t25) => (o5(e19.k.label) === "modifier" ? 0 : 1) - (o5(t25.k.label) === "modifier" ? 0 : 1) || e19.i - t25.i).map(({ k: e19 }) => e19), f12 = d12.findIndex((e19) => o5(e19.label) !== "modifier"), p11 = !!a22 && f12 > 0 && f12 < d12.length;
|
|
3572
3597
|
return /* @__PURE__ */ jsx("span", {
|
|
3573
|
-
className: [r7.keys,
|
|
3574
|
-
children: d12.map((i25, o20) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3598
|
+
className: [r7.keys, u15].filter(Boolean).join(" "),
|
|
3599
|
+
children: d12.map((i25, o20) => /* @__PURE__ */ jsxs(Fragment$1, { children: [p11 && o20 === f12 ? /* @__PURE__ */ jsx("span", {
|
|
3575
3600
|
className: r7.sep,
|
|
3576
3601
|
children: a22
|
|
3577
3602
|
}) : null, /* @__PURE__ */ jsx(s6, {
|
|
@@ -3669,13 +3694,13 @@ var l5 = {
|
|
|
3669
3694
|
}
|
|
3670
3695
|
}
|
|
3671
3696
|
};
|
|
3672
|
-
function
|
|
3697
|
+
function u5() {
|
|
3673
3698
|
if (typeof navigator > "u") return "macos";
|
|
3674
3699
|
let e19 = (navigator.userAgentData?.platform ?? navigator.userAgent ?? "").toLowerCase();
|
|
3675
3700
|
return e19.includes("mac") || e19.includes("darwin") || e19.includes("iphone") || e19.includes("ipad") ? "macos" : e19.includes("win") ? "windows" : e19.includes("linux") || e19.includes("x11") ? "linux" : "macos";
|
|
3676
3701
|
}
|
|
3677
3702
|
function d4(e19, t25 = {}) {
|
|
3678
|
-
let n30 = t25.platform ??
|
|
3703
|
+
let n30 = t25.platform ?? u5(), r28 = t25.legend ?? "auto";
|
|
3679
3704
|
return e19.map((e20) => {
|
|
3680
3705
|
let t26 = l5[e20.name][n30][r28];
|
|
3681
3706
|
return e20.optional ? {
|
|
@@ -3908,7 +3933,7 @@ var f4 = {
|
|
|
3908
3933
|
}
|
|
3909
3934
|
};
|
|
3910
3935
|
function p4(e19, t25 = {}) {
|
|
3911
|
-
let n30 = t25.platform ??
|
|
3936
|
+
let n30 = t25.platform ?? u5(), r28 = t25.legend ?? "auto", i24 = f4[e19], a22 = i24 ? i24[n30][r28] : e19.length === 1 ? e19.toUpperCase() : e19;
|
|
3912
3937
|
return t25.optional ? {
|
|
3913
3938
|
label: a22,
|
|
3914
3939
|
optional: true
|
|
@@ -3944,7 +3969,7 @@ function e7(e19) {
|
|
|
3944
3969
|
return e19.toUpperCase();
|
|
3945
3970
|
}
|
|
3946
3971
|
}
|
|
3947
|
-
var
|
|
3972
|
+
var a7 = {
|
|
3948
3973
|
root: "_root_q2asl_1",
|
|
3949
3974
|
row: "_row_q2asl_8",
|
|
3950
3975
|
track: "_track_q2asl_14",
|
|
@@ -3955,205 +3980,243 @@ var i7 = {
|
|
|
3955
3980
|
readoutInline: "_readoutInline_q2asl_93",
|
|
3956
3981
|
notched: "_notched_q2asl_101"
|
|
3957
3982
|
};
|
|
3958
|
-
var
|
|
3959
|
-
function
|
|
3983
|
+
var o6 = "\u2212";
|
|
3984
|
+
function s7(e19, t25) {
|
|
3960
3985
|
return (Number.isFinite(e19) ? e19.toLocaleString(void 0, t25) : String(e19)).replace(/^-/, "\u2212");
|
|
3961
3986
|
}
|
|
3962
|
-
function
|
|
3987
|
+
function c6(e19, t25, n30) {
|
|
3963
3988
|
return t25 === void 0 || t25 <= 0 ? e19 : Math.round((e19 - n30) / t25) * t25 + n30;
|
|
3964
3989
|
}
|
|
3965
|
-
function
|
|
3990
|
+
function l6(e19, t25, n30) {
|
|
3966
3991
|
return Math.max(t25, Math.min(n30, e19));
|
|
3967
3992
|
}
|
|
3968
|
-
|
|
3993
|
+
var u6 = 8;
|
|
3994
|
+
function d5(e19, t25, n30) {
|
|
3995
|
+
return !e19 || e19.length === 0 ? [] : [...new Set(e19.filter((e20) => e20 >= t25 && e20 <= n30))].sort((e20, t26) => e20 - t26);
|
|
3996
|
+
}
|
|
3997
|
+
function f5(e19, t25, n30) {
|
|
3998
|
+
let r28 = e19, i24 = n30;
|
|
3999
|
+
for (let n31 of t25) {
|
|
4000
|
+
let t26 = Math.abs(n31 - e19);
|
|
4001
|
+
t26 <= i24 && (r28 = n31, i24 = t26);
|
|
4002
|
+
}
|
|
4003
|
+
return r28;
|
|
4004
|
+
}
|
|
4005
|
+
function p5(e19, t25, n30, r28) {
|
|
4006
|
+
if (n30 > 0) {
|
|
4007
|
+
let n31 = e19.findIndex((e20) => e20 > t25);
|
|
4008
|
+
return n31 === -1 ? e19[e19.length - 1] : e19[Math.min(e19.length - 1, n31 + r28 - 1)];
|
|
4009
|
+
}
|
|
4010
|
+
let i24 = -1;
|
|
4011
|
+
for (let n31 = e19.length - 1; n31 >= 0; n31--) if (e19[n31] < t25) {
|
|
4012
|
+
i24 = n31;
|
|
4013
|
+
break;
|
|
4014
|
+
}
|
|
4015
|
+
return i24 === -1 ? e19[0] : e19[Math.max(0, i24 - (r28 - 1))];
|
|
4016
|
+
}
|
|
4017
|
+
function m4(e19, t25, n30) {
|
|
3969
4018
|
return e19 !== void 0 && e19 > 0 ? e19 : (n30 - t25) / 100;
|
|
3970
4019
|
}
|
|
3971
|
-
function
|
|
4020
|
+
function h3(e19, t25, n30, r28, i24, a22) {
|
|
4021
|
+
let o20 = a22 !== void 0 && a22 > 0 ? a22 : (i24 - r28) / 1e3;
|
|
4022
|
+
return l6(e19, n30 > 0 ? t25[n30 - 1].value + o20 : r28, n30 < t25.length - 1 ? t25[n30 + 1].value - o20 : i24);
|
|
4023
|
+
}
|
|
4024
|
+
function g3(e19, t25, n30, r28) {
|
|
3972
4025
|
if (!e19.bounds) return [n30, r28];
|
|
3973
4026
|
let i24 = typeof e19.bounds == "function" ? e19.bounds(t25) : e19.bounds;
|
|
3974
4027
|
return [i24[0], i24[1]];
|
|
3975
4028
|
}
|
|
3976
|
-
function
|
|
3977
|
-
return
|
|
4029
|
+
function _3(e19) {
|
|
4030
|
+
return s7(e19.value, {
|
|
3978
4031
|
minimumFractionDigits: 3,
|
|
3979
4032
|
maximumFractionDigits: 3
|
|
3980
4033
|
});
|
|
3981
4034
|
}
|
|
3982
|
-
function
|
|
3983
|
-
let { thumbs:
|
|
3984
|
-
|
|
4035
|
+
function v2(o20) {
|
|
4036
|
+
let { thumbs: s18, onInput: v4, onChange: y4, min: b3, max: x3, step: S3, constraint: C3, trackHeight: w3, ariaLabel: T3, className: E3 } = o20, D3 = d5(o20.stops, b3, x3), O3 = useRef(null), k3 = useRef(null), A3 = useRef(null);
|
|
4037
|
+
useEffect(() => () => {
|
|
4038
|
+
A3.current?.();
|
|
4039
|
+
}, []);
|
|
4040
|
+
let j3 = useCallback((e19) => x3 === b3 ? 0 : l6((e19 - b3) / (x3 - b3), 0, 1), [b3, x3]), M3 = useCallback((e19) => b3 + l6(e19, 0, 1) * (x3 - b3), [b3, x3]), N3 = useCallback((e19) => {
|
|
4041
|
+
k3.current = s18.map((e20) => ({ ...e20 }));
|
|
3985
4042
|
let t25 = false, n30 = (n31) => {
|
|
3986
|
-
let r29 =
|
|
3987
|
-
if (!r29 || !
|
|
3988
|
-
let
|
|
3989
|
-
|
|
3990
|
-
let [d12, p11] =
|
|
3991
|
-
thumbs:
|
|
4043
|
+
let r29 = O3.current, i25 = k3.current;
|
|
4044
|
+
if (!r29 || !i25) return;
|
|
4045
|
+
let a23 = r29.getBoundingClientRect(), s19 = M3(l6((n31.clientX - a23.left) / a23.width, 0, 1));
|
|
4046
|
+
s19 = c6(s19, S3, b3), s19 = l6(s19, b3, x3), D3.length > 0 && (s19 = f5(s19, D3, u6 / a23.width * (x3 - b3)));
|
|
4047
|
+
let [d12, p11] = g3(i25[e19], {
|
|
4048
|
+
thumbs: i25,
|
|
3992
4049
|
index: e19
|
|
3993
|
-
},
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
...i24[e19],
|
|
4001
|
-
value: l17
|
|
4002
|
-
}, f12(i24.map((e20) => ({ ...e20 })));
|
|
4050
|
+
}, b3, x3);
|
|
4051
|
+
s19 = l6(s19, d12, p11), C3 === "ordered" && (s19 = h3(s19, i25, e19, b3, x3, S3));
|
|
4052
|
+
let m9 = a23.height;
|
|
4053
|
+
o20.onRemoveThumb && (t25 = n31.clientY < a23.top - m9 || n31.clientY > a23.bottom + m9), i25[e19] = {
|
|
4054
|
+
...i25[e19],
|
|
4055
|
+
value: s19
|
|
4056
|
+
}, v4(i25.map((e20) => ({ ...e20 })));
|
|
4003
4057
|
}, r28 = () => {
|
|
4004
|
-
document.removeEventListener("pointermove", n30), document.removeEventListener("pointerup",
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4058
|
+
document.removeEventListener("pointermove", n30), document.removeEventListener("pointerup", a22), document.removeEventListener("pointercancel", i24), A3.current = null;
|
|
4059
|
+
}, i24 = () => {
|
|
4060
|
+
r28(), k3.current = null;
|
|
4061
|
+
}, a22 = () => {
|
|
4062
|
+
r28();
|
|
4063
|
+
let n31 = k3.current;
|
|
4064
|
+
if (k3.current = null, n31) {
|
|
4065
|
+
if (t25 && o20.onRemoveThumb && o20.onRemoveThumb(e19)) {
|
|
4066
|
+
let t26 = n31.filter((t27, n32) => n32 !== e19).map((e20) => ({ ...e20 }));
|
|
4067
|
+
v4(t26), y4?.(t26);
|
|
4010
4068
|
return;
|
|
4011
4069
|
}
|
|
4012
|
-
|
|
4070
|
+
y4?.(n31.map((e20) => ({ ...e20 })));
|
|
4013
4071
|
}
|
|
4014
4072
|
};
|
|
4015
|
-
document.addEventListener("pointermove", n30), document.addEventListener("pointerup",
|
|
4073
|
+
document.addEventListener("pointermove", n30), document.addEventListener("pointerup", a22), document.addEventListener("pointercancel", i24), A3.current = i24;
|
|
4016
4074
|
}, [
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4075
|
+
s18,
|
|
4076
|
+
v4,
|
|
4077
|
+
y4,
|
|
4078
|
+
M3,
|
|
4079
|
+
b3,
|
|
4080
|
+
x3,
|
|
4081
|
+
S3,
|
|
4082
|
+
D3,
|
|
4083
|
+
C3,
|
|
4084
|
+
o20
|
|
4085
|
+
]), P3 = useCallback((e19) => {
|
|
4086
|
+
let t25 = s18.map((e20) => ({ ...e20 })), n30 = t25.map((e20) => e20.value);
|
|
4087
|
+
k3.current = t25;
|
|
4029
4088
|
let r28 = (t26) => {
|
|
4030
|
-
let r29 =
|
|
4089
|
+
let r29 = O3.current, i25 = k3.current;
|
|
4031
4090
|
if (!r29 || !i25) return;
|
|
4032
|
-
let a23 = r29.getBoundingClientRect(),
|
|
4033
|
-
|
|
4034
|
-
let
|
|
4035
|
-
for (let e20 = 0; e20 < n30.length; e20++)
|
|
4036
|
-
|
|
4091
|
+
let a23 = r29.getBoundingClientRect(), o22 = (t26.clientX - e19) / a23.width * (x3 - b3);
|
|
4092
|
+
o22 = c6(o22, S3, 0);
|
|
4093
|
+
let s19 = -Infinity, u15 = Infinity;
|
|
4094
|
+
for (let e20 = 0; e20 < n30.length; e20++) s19 = Math.max(s19, b3 - n30[e20]), u15 = Math.min(u15, x3 - n30[e20]);
|
|
4095
|
+
o22 = l6(o22, s19, u15);
|
|
4037
4096
|
for (let e20 = 0; e20 < i25.length; e20++) i25[e20] = {
|
|
4038
4097
|
...i25[e20],
|
|
4039
|
-
value:
|
|
4098
|
+
value: l6(n30[e20] + o22, b3, x3)
|
|
4040
4099
|
};
|
|
4041
|
-
|
|
4100
|
+
v4(i25.map((e20) => ({ ...e20 })));
|
|
4042
4101
|
}, i24 = () => {
|
|
4043
|
-
document.removeEventListener("pointermove", r28), document.removeEventListener("pointerup",
|
|
4044
|
-
|
|
4045
|
-
|
|
4102
|
+
document.removeEventListener("pointermove", r28), document.removeEventListener("pointerup", o21), document.removeEventListener("pointercancel", a22), A3.current = null;
|
|
4103
|
+
}, a22 = () => {
|
|
4104
|
+
i24(), k3.current = null;
|
|
4105
|
+
}, o21 = () => {
|
|
4106
|
+
i24();
|
|
4107
|
+
let e20 = k3.current;
|
|
4108
|
+
k3.current = null, e20 && y4?.(e20.map((e21) => ({ ...e21 })));
|
|
4046
4109
|
};
|
|
4047
|
-
document.addEventListener("pointermove", r28), document.addEventListener("pointerup",
|
|
4110
|
+
document.addEventListener("pointermove", r28), document.addEventListener("pointerup", o21), document.addEventListener("pointercancel", a22), A3.current = a22;
|
|
4048
4111
|
}, [
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
]),
|
|
4056
|
-
typeof t25.button == "number" && t25.button > 0 || (t25.preventDefault(), t25.stopPropagation(), t25.shiftKey &&
|
|
4057
|
-
},
|
|
4058
|
-
if (!
|
|
4059
|
-
let n30 =
|
|
4060
|
-
|
|
4061
|
-
},
|
|
4062
|
-
if (typeof e19.button == "number" && e19.button > 0 || !
|
|
4112
|
+
s18,
|
|
4113
|
+
v4,
|
|
4114
|
+
y4,
|
|
4115
|
+
b3,
|
|
4116
|
+
x3,
|
|
4117
|
+
S3
|
|
4118
|
+
]), F3 = (e19) => (t25) => {
|
|
4119
|
+
typeof t25.button == "number" && t25.button > 0 || (t25.currentTarget.focus?.(), t25.preventDefault(), t25.stopPropagation(), t25.shiftKey && o20.allowShiftAll ? P3(t25.clientX) : N3(e19));
|
|
4120
|
+
}, I3 = (e19) => (t25) => {
|
|
4121
|
+
if (!o20.onRemoveThumb || (t25.preventDefault(), !o20.onRemoveThumb(e19))) return;
|
|
4122
|
+
let n30 = s18.filter((t26, n31) => n31 !== e19).map((e20) => ({ ...e20 }));
|
|
4123
|
+
v4(n30), y4?.(n30);
|
|
4124
|
+
}, L2 = (e19) => {
|
|
4125
|
+
if (typeof e19.button == "number" && e19.button > 0 || !o20.onAddThumb || e19.target.closest(`.${a7.thumb}`)) return;
|
|
4063
4126
|
e19.preventDefault();
|
|
4064
|
-
let t25 =
|
|
4127
|
+
let t25 = O3.current;
|
|
4065
4128
|
if (!t25) return;
|
|
4066
|
-
let n30 = t25.getBoundingClientRect(), r28 =
|
|
4067
|
-
r28 =
|
|
4068
|
-
let
|
|
4069
|
-
if (!
|
|
4070
|
-
let
|
|
4071
|
-
|
|
4072
|
-
},
|
|
4073
|
-
let n30 =
|
|
4129
|
+
let n30 = t25.getBoundingClientRect(), r28 = M3(l6((e19.clientX - n30.left) / n30.width, 0, 1));
|
|
4130
|
+
r28 = c6(r28, S3, b3), r28 = l6(r28, b3, x3), D3.length > 0 && (r28 = f5(r28, D3, u6 / n30.width * (x3 - b3)));
|
|
4131
|
+
let i24 = o20.onAddThumb(r28);
|
|
4132
|
+
if (!i24) return;
|
|
4133
|
+
let d12 = [...s18.map((e20) => ({ ...e20 })), i24];
|
|
4134
|
+
v4(d12), y4?.(d12);
|
|
4135
|
+
}, R2 = (e19) => (t25) => {
|
|
4136
|
+
let n30 = m4(S3, b3, x3), r28 = 0, i24 = 0, a22 = null;
|
|
4074
4137
|
switch (t25.key) {
|
|
4075
4138
|
case "ArrowRight":
|
|
4076
4139
|
case "ArrowUp":
|
|
4077
|
-
r28 = t25.shiftKey ? n30 * 10 : n30;
|
|
4140
|
+
r28 = t25.shiftKey ? n30 * 10 : n30, i24 = t25.shiftKey ? 10 : 1;
|
|
4078
4141
|
break;
|
|
4079
4142
|
case "ArrowLeft":
|
|
4080
4143
|
case "ArrowDown":
|
|
4081
|
-
r28 = t25.shiftKey ? -n30 * 10 : -n30;
|
|
4144
|
+
r28 = t25.shiftKey ? -n30 * 10 : -n30, i24 = t25.shiftKey ? -10 : -1;
|
|
4082
4145
|
break;
|
|
4083
4146
|
case "PageUp":
|
|
4084
|
-
r28 = n30 * 10;
|
|
4147
|
+
r28 = n30 * 10, i24 = 10;
|
|
4085
4148
|
break;
|
|
4086
4149
|
case "PageDown":
|
|
4087
|
-
r28 = -n30 * 10;
|
|
4150
|
+
r28 = -n30 * 10, i24 = -10;
|
|
4088
4151
|
break;
|
|
4089
4152
|
case "Home":
|
|
4090
|
-
|
|
4153
|
+
a22 = "home";
|
|
4091
4154
|
break;
|
|
4092
4155
|
case "End":
|
|
4093
|
-
|
|
4156
|
+
a22 = "end";
|
|
4094
4157
|
break;
|
|
4095
4158
|
default:
|
|
4096
4159
|
return;
|
|
4097
4160
|
}
|
|
4098
4161
|
t25.preventDefault();
|
|
4099
|
-
let
|
|
4100
|
-
thumbs:
|
|
4162
|
+
let o21 = s18.map((e20) => ({ ...e20 })), [u15, d12] = g3(o21[e19], {
|
|
4163
|
+
thumbs: o21,
|
|
4101
4164
|
index: e19
|
|
4102
|
-
},
|
|
4103
|
-
|
|
4104
|
-
...
|
|
4105
|
-
value:
|
|
4106
|
-
},
|
|
4107
|
-
},
|
|
4165
|
+
}, b3, x3), f12 = Math.max(b3, u15), _7 = Math.min(x3, d12), w4;
|
|
4166
|
+
w4 = a22 === "home" ? f12 : a22 === "end" ? _7 : D3.length > 0 ? p5(D3, o21[e19].value, i24 > 0 ? 1 : -1, Math.abs(i24)) : c6(o21[e19].value + r28, S3, b3), w4 = l6(w4, f12, _7), C3 === "ordered" && (w4 = h3(w4, o21, e19, f12, _7, S3)), o21[e19] = {
|
|
4167
|
+
...o21[e19],
|
|
4168
|
+
value: w4
|
|
4169
|
+
}, v4(o21), y4?.(o21);
|
|
4170
|
+
}, z2 = o20.readoutPlacement ?? "none", B2 = o20.renderReadout;
|
|
4108
4171
|
return /* @__PURE__ */ jsxs("div", {
|
|
4109
|
-
className:
|
|
4110
|
-
style:
|
|
4172
|
+
className: E3 ? `${a7.root} ${E3}` : a7.root,
|
|
4173
|
+
style: w3 === void 0 ? void 0 : { "--rp-track-height": `${w3}px` },
|
|
4111
4174
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
4112
|
-
className:
|
|
4175
|
+
className: a7.row,
|
|
4113
4176
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
4114
|
-
className:
|
|
4115
|
-
ref:
|
|
4116
|
-
onPointerDown:
|
|
4117
|
-
children: [
|
|
4118
|
-
className:
|
|
4119
|
-
children:
|
|
4120
|
-
trackWidth:
|
|
4121
|
-
valueToFraction:
|
|
4177
|
+
className: a7.track,
|
|
4178
|
+
ref: O3,
|
|
4179
|
+
onPointerDown: L2,
|
|
4180
|
+
children: [o20.renderTrack && /* @__PURE__ */ jsx("div", {
|
|
4181
|
+
className: a7.trackInner,
|
|
4182
|
+
children: o20.renderTrack({
|
|
4183
|
+
trackWidth: O3.current?.getBoundingClientRect().width ?? 0,
|
|
4184
|
+
valueToFraction: j3
|
|
4122
4185
|
})
|
|
4123
|
-
}),
|
|
4124
|
-
let
|
|
4186
|
+
}), s18.map((e19, t25) => {
|
|
4187
|
+
let n30 = e19.shape === "notched", i24 = typeof e19.shape == "object" && e19.shape !== null ? e19.shape.render : null, o21 = `${a7.thumb}${n30 ? ` ${a7.notched}` : ""}`;
|
|
4125
4188
|
return /* @__PURE__ */ jsx("div", {
|
|
4126
4189
|
role: "slider",
|
|
4127
4190
|
tabIndex: 0,
|
|
4128
4191
|
"aria-orientation": "horizontal",
|
|
4129
|
-
"aria-valuemin":
|
|
4130
|
-
"aria-valuemax":
|
|
4192
|
+
"aria-valuemin": b3,
|
|
4193
|
+
"aria-valuemax": x3,
|
|
4131
4194
|
"aria-valuenow": e19.value,
|
|
4132
|
-
"aria-label": [
|
|
4195
|
+
"aria-label": [T3, e19.label].filter(Boolean).join(" ") || void 0,
|
|
4133
4196
|
className: o21,
|
|
4134
|
-
style: { left: `${
|
|
4135
|
-
onPointerDown:
|
|
4136
|
-
onKeyDown:
|
|
4137
|
-
onContextMenu:
|
|
4138
|
-
children:
|
|
4197
|
+
style: { left: `${j3(e19.value) * 100}%` },
|
|
4198
|
+
onPointerDown: F3(t25),
|
|
4199
|
+
onKeyDown: R2(t25),
|
|
4200
|
+
onContextMenu: I3(t25),
|
|
4201
|
+
children: i24 ? i24({
|
|
4139
4202
|
width: 14,
|
|
4140
4203
|
height: 24,
|
|
4141
4204
|
isActive: false
|
|
4142
4205
|
}) : e19.label ?? ""
|
|
4143
4206
|
}, t25);
|
|
4144
4207
|
})]
|
|
4145
|
-
}),
|
|
4208
|
+
}), z2 === "inline-after" && /* @__PURE__ */ jsx("span", {
|
|
4146
4209
|
"data-readout": "inline",
|
|
4147
|
-
className:
|
|
4148
|
-
children:
|
|
4210
|
+
className: a7.readoutInline,
|
|
4211
|
+
children: s18.map((e19, t25) => /* @__PURE__ */ jsxs("span", { children: [t25 > 0 ? " / " : "", B2 ? B2(e19, t25) : _3(e19)] }, t25))
|
|
4149
4212
|
})]
|
|
4150
|
-
}),
|
|
4151
|
-
className:
|
|
4152
|
-
children:
|
|
4213
|
+
}), z2 === "below-thumb" && /* @__PURE__ */ jsx("div", {
|
|
4214
|
+
className: a7.readoutsBelow,
|
|
4215
|
+
children: s18.map((e19, t25) => /* @__PURE__ */ jsx("span", {
|
|
4153
4216
|
"data-readout": "below",
|
|
4154
|
-
className:
|
|
4155
|
-
style: { left: `${
|
|
4156
|
-
children:
|
|
4217
|
+
className: a7.readoutBelow,
|
|
4218
|
+
style: { left: `${j3(e19.value) * 100}%` },
|
|
4219
|
+
children: B2 ? B2(e19, t25) : _3(e19)
|
|
4157
4220
|
}, t25))
|
|
4158
4221
|
})]
|
|
4159
4222
|
});
|
|
@@ -4183,12 +4246,12 @@ function i8(e19, t25) {
|
|
|
4183
4246
|
return t25;
|
|
4184
4247
|
}
|
|
4185
4248
|
function a8(a22) {
|
|
4186
|
-
let { items: o20, itemClassName: s18, onNavigate: c16, onActivate: l17 } = a22,
|
|
4187
|
-
let t25 =
|
|
4249
|
+
let { items: o20, itemClassName: s18, onNavigate: c16, onActivate: l17 } = a22, u15 = useRef(null), d12 = a22.tabStopIndex ?? t8(o20), f12 = (e19) => {
|
|
4250
|
+
let t25 = u15.current;
|
|
4188
4251
|
t25 && t25.querySelectorAll(`.${s18}`)[e19]?.focus();
|
|
4189
4252
|
};
|
|
4190
4253
|
return {
|
|
4191
|
-
rootRef:
|
|
4254
|
+
rootRef: u15,
|
|
4192
4255
|
tabIndexFor: (e19) => e19 === d12 ? 0 : -1,
|
|
4193
4256
|
onKeyDown: (e19) => (a23) => {
|
|
4194
4257
|
let s19 = -1;
|
|
@@ -4227,13 +4290,13 @@ var n10 = {
|
|
|
4227
4290
|
size_sm: "_size_sm_1pyfg_153"
|
|
4228
4291
|
};
|
|
4229
4292
|
function r10(r28) {
|
|
4230
|
-
let { items: i24, ariaLabel: a22, className: o20, height: s18, size: c16, variant: l17 } = r28,
|
|
4231
|
-
if (
|
|
4293
|
+
let { items: i24, ariaLabel: a22, className: o20, height: s18, size: c16, variant: l17 } = r28, u15 = r28.mode ?? "single", d12 = (e19) => u15 === "multiple" ? r28.value.includes(e19) : r28.value === e19, f12 = (e19) => {
|
|
4294
|
+
if (u15 !== "multiple") return false;
|
|
4232
4295
|
let t25 = r28.mixedValues;
|
|
4233
4296
|
return t25 !== void 0 && t25.includes(e19) && !d12(e19);
|
|
4234
|
-
},
|
|
4297
|
+
}, p11 = (e19) => () => {
|
|
4235
4298
|
let t25 = i24[e19];
|
|
4236
|
-
if (!t25.disabled) if (
|
|
4299
|
+
if (!t25.disabled) if (u15 === "multiple") {
|
|
4237
4300
|
let e20 = r28.value, n30 = e20.includes(t25.value) ? e20.filter((e21) => e21 !== t25.value) : [...e20, t25.value];
|
|
4238
4301
|
r28.onChange(n30);
|
|
4239
4302
|
} else {
|
|
@@ -4243,24 +4306,24 @@ function r10(r28) {
|
|
|
4243
4306
|
}
|
|
4244
4307
|
r28.onChange(t25.value);
|
|
4245
4308
|
}
|
|
4246
|
-
},
|
|
4309
|
+
}, m9 = u15 === "single" ? i24.findIndex((e19) => e19.value === r28.value) : -1, h7 = a8({
|
|
4247
4310
|
items: i24,
|
|
4248
4311
|
itemClassName: n10.segment,
|
|
4249
|
-
tabStopIndex:
|
|
4250
|
-
onNavigate:
|
|
4251
|
-
onActivate:
|
|
4252
|
-
}),
|
|
4312
|
+
tabStopIndex: m9 >= 0 && !i24[m9].disabled ? m9 : void 0,
|
|
4313
|
+
onNavigate: u15 === "single" ? (e19) => r28.onChange(i24[e19].value) : void 0,
|
|
4314
|
+
onActivate: u15 === "multiple" ? (e19) => p11(e19)() : void 0
|
|
4315
|
+
}), g6 = s18 === void 0 ? void 0 : { "--wzl-tb-height": `${s18}px` }, _7 = [
|
|
4253
4316
|
n10.root,
|
|
4254
4317
|
c16 && n10[`size_${c16}`],
|
|
4255
4318
|
l17 && n10[`variant_${l17}`],
|
|
4256
4319
|
o20
|
|
4257
4320
|
].filter(Boolean).join(" ");
|
|
4258
4321
|
return /* @__PURE__ */ jsx("div", {
|
|
4259
|
-
ref:
|
|
4260
|
-
className:
|
|
4261
|
-
role:
|
|
4322
|
+
ref: h7.rootRef,
|
|
4323
|
+
className: _7,
|
|
4324
|
+
role: u15 === "multiple" ? "group" : "radiogroup",
|
|
4262
4325
|
"aria-label": a22,
|
|
4263
|
-
style:
|
|
4326
|
+
style: g6,
|
|
4264
4327
|
children: i24.map((e19, r29) => {
|
|
4265
4328
|
let i25 = d12(e19.value), a23 = f12(e19.value), o21 = [
|
|
4266
4329
|
n10.segment,
|
|
@@ -4269,15 +4332,15 @@ function r10(r28) {
|
|
|
4269
4332
|
].filter(Boolean).join(" ");
|
|
4270
4333
|
return /* @__PURE__ */ jsx("button", {
|
|
4271
4334
|
type: "button",
|
|
4272
|
-
role:
|
|
4273
|
-
"aria-checked":
|
|
4274
|
-
"aria-pressed":
|
|
4335
|
+
role: u15 === "multiple" ? void 0 : "radio",
|
|
4336
|
+
"aria-checked": u15 === "multiple" ? void 0 : i25,
|
|
4337
|
+
"aria-pressed": u15 === "multiple" ? a23 ? "mixed" : i25 : void 0,
|
|
4275
4338
|
"aria-label": e19.ariaLabel,
|
|
4276
4339
|
disabled: e19.disabled,
|
|
4277
|
-
tabIndex:
|
|
4340
|
+
tabIndex: h7.tabIndexFor(r29),
|
|
4278
4341
|
className: o21,
|
|
4279
|
-
onClick:
|
|
4280
|
-
onKeyDown:
|
|
4342
|
+
onClick: p11(r29),
|
|
4343
|
+
onKeyDown: h7.onKeyDown(r29),
|
|
4281
4344
|
children: e19.label
|
|
4282
4345
|
}, e19.value);
|
|
4283
4346
|
})
|
|
@@ -4293,14 +4356,14 @@ var e10 = {
|
|
|
4293
4356
|
variant_minimal: "_variant_minimal_1hmjs_150"
|
|
4294
4357
|
};
|
|
4295
4358
|
function r11(r28) {
|
|
4296
|
-
let { items: i24, ariaLabel: a22, className: o20, height: s18, size: c16, variant: l17 } = r28,
|
|
4359
|
+
let { items: i24, ariaLabel: a22, className: o20, height: s18, size: c16, variant: l17 } = r28, u15 = (e19) => {
|
|
4297
4360
|
let t25 = i24[e19];
|
|
4298
4361
|
t25.disabled || t25.onChange(!t25.selected);
|
|
4299
4362
|
}, d12 = a8({
|
|
4300
4363
|
items: i24,
|
|
4301
4364
|
itemClassName: e10.segment,
|
|
4302
|
-
onActivate:
|
|
4303
|
-
}), f12 = s18 === void 0 ? void 0 : { "--wzl-tb-height": `${s18}px` },
|
|
4365
|
+
onActivate: u15
|
|
4366
|
+
}), f12 = s18 === void 0 ? void 0 : { "--wzl-tb-height": `${s18}px` }, p11 = [
|
|
4304
4367
|
e10.root,
|
|
4305
4368
|
c16 && e10[`size_${c16}`],
|
|
4306
4369
|
l17 && e10[`variant_${l17}`],
|
|
@@ -4308,7 +4371,7 @@ function r11(r28) {
|
|
|
4308
4371
|
].filter(Boolean).join(" ");
|
|
4309
4372
|
return /* @__PURE__ */ jsx("div", {
|
|
4310
4373
|
ref: d12.rootRef,
|
|
4311
|
-
className:
|
|
4374
|
+
className: p11,
|
|
4312
4375
|
role: "group",
|
|
4313
4376
|
"aria-label": a22,
|
|
4314
4377
|
style: f12,
|
|
@@ -4321,7 +4384,7 @@ function r11(r28) {
|
|
|
4321
4384
|
disabled: e19.disabled,
|
|
4322
4385
|
tabIndex: d12.tabIndexFor(r29),
|
|
4323
4386
|
className: i25,
|
|
4324
|
-
onClick: () =>
|
|
4387
|
+
onClick: () => u15(r29),
|
|
4325
4388
|
onKeyDown: d12.onKeyDown(r29),
|
|
4326
4389
|
children: e19.label
|
|
4327
4390
|
}, e19.value);
|
|
@@ -4329,14 +4392,14 @@ function r11(r28) {
|
|
|
4329
4392
|
});
|
|
4330
4393
|
}
|
|
4331
4394
|
function r12(r28) {
|
|
4332
|
-
let { items: i24, ariaLabel: a22, className: o20, height: s18, size: c16, variant: l17 } = r28,
|
|
4395
|
+
let { items: i24, ariaLabel: a22, className: o20, height: s18, size: c16, variant: l17 } = r28, u15 = (e19) => {
|
|
4333
4396
|
let t25 = i24[e19];
|
|
4334
4397
|
t25.disabled || t25.onAction();
|
|
4335
4398
|
}, d12 = a8({
|
|
4336
4399
|
items: i24,
|
|
4337
4400
|
itemClassName: e10.segment,
|
|
4338
|
-
onActivate:
|
|
4339
|
-
}), f12 = s18 === void 0 ? void 0 : { "--wzl-tb-height": `${s18}px` },
|
|
4401
|
+
onActivate: u15
|
|
4402
|
+
}), f12 = s18 === void 0 ? void 0 : { "--wzl-tb-height": `${s18}px` }, p11 = [
|
|
4340
4403
|
e10.root,
|
|
4341
4404
|
c16 && e10[`size_${c16}`],
|
|
4342
4405
|
l17 && e10[`variant_${l17}`],
|
|
@@ -4344,7 +4407,7 @@ function r12(r28) {
|
|
|
4344
4407
|
].filter(Boolean).join(" ");
|
|
4345
4408
|
return /* @__PURE__ */ jsx("div", {
|
|
4346
4409
|
ref: d12.rootRef,
|
|
4347
|
-
className:
|
|
4410
|
+
className: p11,
|
|
4348
4411
|
role: "toolbar",
|
|
4349
4412
|
"aria-label": a22,
|
|
4350
4413
|
style: f12,
|
|
@@ -4354,7 +4417,7 @@ function r12(r28) {
|
|
|
4354
4417
|
disabled: e19.disabled,
|
|
4355
4418
|
tabIndex: d12.tabIndexFor(r29),
|
|
4356
4419
|
className: e10.segment,
|
|
4357
|
-
onClick: () =>
|
|
4420
|
+
onClick: () => u15(r29),
|
|
4358
4421
|
onKeyDown: d12.onKeyDown(r29),
|
|
4359
4422
|
children: e19.label
|
|
4360
4423
|
}, e19.value))
|
|
@@ -4364,11 +4427,11 @@ var n13 = {
|
|
|
4364
4427
|
row: "_row_q3wun_1",
|
|
4365
4428
|
segment: "_segment_q3wun_15"
|
|
4366
4429
|
};
|
|
4367
|
-
function r13({ segments: r28, startCap: i24 = "flat", size: a22, variant: o20, depth: s18, gap: c16, className: l17, ...
|
|
4430
|
+
function r13({ segments: r28, startCap: i24 = "flat", size: a22, variant: o20, depth: s18, gap: c16, className: l17, ...u15 }) {
|
|
4368
4431
|
return /* @__PURE__ */ jsx("span", {
|
|
4369
4432
|
className: [n13.row, l17].filter(Boolean).join(" "),
|
|
4370
4433
|
style: c16 === void 0 ? void 0 : { "--powerline-gap": typeof c16 == "number" ? `${c16}px` : c16 },
|
|
4371
|
-
"aria-label":
|
|
4434
|
+
"aria-label": u15["aria-label"],
|
|
4372
4435
|
children: r28.map((c17, l18) => /* @__PURE__ */ jsx(Ft, {
|
|
4373
4436
|
base: "powerline",
|
|
4374
4437
|
baseParams: {
|
|
@@ -4457,14 +4520,14 @@ var l7 = {
|
|
|
4457
4520
|
frame: "_frame_cahom_9",
|
|
4458
4521
|
adornment: "_adornment_cahom_54"
|
|
4459
4522
|
};
|
|
4460
|
-
var
|
|
4461
|
-
let { label: d12, description: f12, errorMessage:
|
|
4523
|
+
var u7 = forwardRef(function(t25, u15) {
|
|
4524
|
+
let { label: d12, description: f12, errorMessage: p11, placeholder: m9, leadingAdornment: h7, trailingAdornment: g6, className: _7, ...v4 } = t25;
|
|
4462
4525
|
return /* @__PURE__ */ jsxs(TextField, {
|
|
4463
|
-
...
|
|
4526
|
+
...v4,
|
|
4464
4527
|
className: [
|
|
4465
4528
|
l7.field,
|
|
4466
4529
|
r15.root,
|
|
4467
|
-
|
|
4530
|
+
_7
|
|
4468
4531
|
].filter(Boolean).join(" "),
|
|
4469
4532
|
children: [
|
|
4470
4533
|
d12 !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
@@ -4474,17 +4537,17 @@ var u6 = forwardRef(function(t25, u14) {
|
|
|
4474
4537
|
/* @__PURE__ */ jsxs("div", {
|
|
4475
4538
|
className: l7.frame,
|
|
4476
4539
|
children: [
|
|
4477
|
-
|
|
4540
|
+
h7 !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
4478
4541
|
className: l7.adornment,
|
|
4479
|
-
children:
|
|
4542
|
+
children: h7
|
|
4480
4543
|
}),
|
|
4481
4544
|
/* @__PURE__ */ jsx(Input, {
|
|
4482
|
-
ref:
|
|
4483
|
-
placeholder:
|
|
4545
|
+
ref: u15,
|
|
4546
|
+
placeholder: m9
|
|
4484
4547
|
}),
|
|
4485
|
-
|
|
4548
|
+
g6 !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
4486
4549
|
className: l7.adornment,
|
|
4487
|
-
children:
|
|
4550
|
+
children: g6
|
|
4488
4551
|
})
|
|
4489
4552
|
]
|
|
4490
4553
|
}),
|
|
@@ -4495,7 +4558,7 @@ var u6 = forwardRef(function(t25, u14) {
|
|
|
4495
4558
|
}),
|
|
4496
4559
|
/* @__PURE__ */ jsx(FieldError, {
|
|
4497
4560
|
className: r15.error,
|
|
4498
|
-
children:
|
|
4561
|
+
children: p11
|
|
4499
4562
|
})
|
|
4500
4563
|
]
|
|
4501
4564
|
});
|
|
@@ -4507,25 +4570,25 @@ var d6 = {
|
|
|
4507
4570
|
stepper: "_stepper_e75yx_57"
|
|
4508
4571
|
};
|
|
4509
4572
|
var f6 = forwardRef(function(t25, f12) {
|
|
4510
|
-
let { label:
|
|
4573
|
+
let { label: p11, description: m9, errorMessage: h7, hideSteppers: g6, placeholder: _7, className: v4, ...y4 } = t25;
|
|
4511
4574
|
return /* @__PURE__ */ jsxs(NumberField, {
|
|
4512
4575
|
...y4,
|
|
4513
4576
|
className: [
|
|
4514
4577
|
d6.field,
|
|
4515
4578
|
r15.root,
|
|
4516
|
-
|
|
4579
|
+
v4
|
|
4517
4580
|
].filter(Boolean).join(" "),
|
|
4518
4581
|
children: [
|
|
4519
|
-
|
|
4582
|
+
p11 !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
4520
4583
|
className: r15.label,
|
|
4521
|
-
children:
|
|
4584
|
+
children: p11
|
|
4522
4585
|
}),
|
|
4523
4586
|
/* @__PURE__ */ jsxs(Group, {
|
|
4524
4587
|
className: d6.frame,
|
|
4525
4588
|
children: [/* @__PURE__ */ jsx(Input, {
|
|
4526
4589
|
ref: f12,
|
|
4527
|
-
placeholder:
|
|
4528
|
-
}), !
|
|
4590
|
+
placeholder: _7
|
|
4591
|
+
}), !g6 && /* @__PURE__ */ jsxs("div", {
|
|
4529
4592
|
className: d6.steppers,
|
|
4530
4593
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
4531
4594
|
slot: "increment",
|
|
@@ -4540,14 +4603,14 @@ var f6 = forwardRef(function(t25, f12) {
|
|
|
4540
4603
|
})]
|
|
4541
4604
|
})]
|
|
4542
4605
|
}),
|
|
4543
|
-
|
|
4606
|
+
m9 !== void 0 && /* @__PURE__ */ jsx(Text, {
|
|
4544
4607
|
slot: "description",
|
|
4545
4608
|
className: r15.hint,
|
|
4546
|
-
children:
|
|
4609
|
+
children: m9
|
|
4547
4610
|
}),
|
|
4548
4611
|
/* @__PURE__ */ jsx(FieldError, {
|
|
4549
4612
|
className: r15.error,
|
|
4550
|
-
children:
|
|
4613
|
+
children: h7
|
|
4551
4614
|
})
|
|
4552
4615
|
]
|
|
4553
4616
|
});
|
|
@@ -4559,13 +4622,13 @@ var c9 = {
|
|
|
4559
4622
|
dot: "_dot_kaubu_36"
|
|
4560
4623
|
};
|
|
4561
4624
|
function l9(r28) {
|
|
4562
|
-
let { label: l17, description:
|
|
4625
|
+
let { label: l17, description: u15, errorMessage: d12, children: f12, className: p11, ...m9 } = r28;
|
|
4563
4626
|
return /* @__PURE__ */ jsxs(RadioGroup, {
|
|
4564
|
-
...
|
|
4627
|
+
...m9,
|
|
4565
4628
|
className: [
|
|
4566
4629
|
c9.group,
|
|
4567
4630
|
r15.root,
|
|
4568
|
-
|
|
4631
|
+
p11
|
|
4569
4632
|
].filter(Boolean).join(" "),
|
|
4570
4633
|
children: [
|
|
4571
4634
|
l17 !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
@@ -4573,10 +4636,10 @@ function l9(r28) {
|
|
|
4573
4636
|
children: l17
|
|
4574
4637
|
}),
|
|
4575
4638
|
f12,
|
|
4576
|
-
|
|
4639
|
+
u15 !== void 0 && /* @__PURE__ */ jsx(Text, {
|
|
4577
4640
|
slot: "description",
|
|
4578
4641
|
className: r15.hint,
|
|
4579
|
-
children:
|
|
4642
|
+
children: u15
|
|
4580
4643
|
}),
|
|
4581
4644
|
/* @__PURE__ */ jsx(FieldError, {
|
|
4582
4645
|
className: r15.error,
|
|
@@ -4585,7 +4648,7 @@ function l9(r28) {
|
|
|
4585
4648
|
]
|
|
4586
4649
|
});
|
|
4587
4650
|
}
|
|
4588
|
-
function
|
|
4651
|
+
function u9({ children: e19, className: t25, ...n30 }) {
|
|
4589
4652
|
return /* @__PURE__ */ jsxs(Radio, {
|
|
4590
4653
|
...n30,
|
|
4591
4654
|
className: [c9.radio, t25].filter(Boolean).join(" "),
|
|
@@ -4602,16 +4665,16 @@ var c10 = {
|
|
|
4602
4665
|
thumb: "_thumb_1644w_59"
|
|
4603
4666
|
};
|
|
4604
4667
|
function l10(l17) {
|
|
4605
|
-
let { label:
|
|
4668
|
+
let { label: u15, showOutput: d12, formatOutput: f12, className: p11, ...m9 } = l17, h7 = d12 ?? u15 !== void 0;
|
|
4606
4669
|
return /* @__PURE__ */ jsxs(Slider, {
|
|
4607
|
-
...
|
|
4608
|
-
className: [c10.slider,
|
|
4609
|
-
children: [(
|
|
4670
|
+
...m9,
|
|
4671
|
+
className: [c10.slider, p11].filter(Boolean).join(" "),
|
|
4672
|
+
children: [(u15 !== void 0 || h7) && /* @__PURE__ */ jsxs("div", {
|
|
4610
4673
|
className: c10.head,
|
|
4611
|
-
children: [
|
|
4674
|
+
children: [u15 !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
4612
4675
|
className: c10.label,
|
|
4613
|
-
children:
|
|
4614
|
-
}),
|
|
4676
|
+
children: u15
|
|
4677
|
+
}), h7 && /* @__PURE__ */ jsx(SliderOutput, {
|
|
4615
4678
|
className: c10.output,
|
|
4616
4679
|
children: ({ state: e19 }) => {
|
|
4617
4680
|
let t25 = e19.values.length === 1 ? e19.values[0] : e19.values;
|
|
@@ -4646,11 +4709,11 @@ var f7 = {
|
|
|
4646
4709
|
option: "_option_nq1le_80",
|
|
4647
4710
|
check: "_check_nq1le_105"
|
|
4648
4711
|
};
|
|
4649
|
-
function
|
|
4650
|
-
let { label:
|
|
4712
|
+
function p6(a22) {
|
|
4713
|
+
let { label: p11, description: m9, errorMessage: g6, placeholder: _7, options: v4, children: y4, selectedKey: b3, defaultSelectedKey: x3, onSelectionChange: S3, className: C3, ...w3 } = a22;
|
|
4651
4714
|
return /* @__PURE__ */ jsxs(Select, {
|
|
4652
4715
|
...w3,
|
|
4653
|
-
selectedKey: b3
|
|
4716
|
+
selectedKey: b3,
|
|
4654
4717
|
defaultSelectedKey: x3,
|
|
4655
4718
|
onSelectionChange: S3 ? (e19) => S3(e19) : void 0,
|
|
4656
4719
|
className: [
|
|
@@ -4659,15 +4722,15 @@ function p5(a22) {
|
|
|
4659
4722
|
C3
|
|
4660
4723
|
].filter(Boolean).join(" "),
|
|
4661
4724
|
children: [
|
|
4662
|
-
|
|
4725
|
+
p11 !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
4663
4726
|
className: r15.label,
|
|
4664
|
-
children:
|
|
4727
|
+
children: p11
|
|
4665
4728
|
}),
|
|
4666
4729
|
/* @__PURE__ */ jsxs(Button, {
|
|
4667
4730
|
className: f7.trigger,
|
|
4668
4731
|
children: [/* @__PURE__ */ jsx(SelectValue, {
|
|
4669
4732
|
className: f7.value,
|
|
4670
|
-
children: ({ defaultChildren: e19, isPlaceholder: t25 }) => t25 ?
|
|
4733
|
+
children: ({ defaultChildren: e19, isPlaceholder: t25 }) => t25 ? _7 ?? e19 : e19
|
|
4671
4734
|
}), /* @__PURE__ */ jsx("svg", {
|
|
4672
4735
|
className: f7.chevron,
|
|
4673
4736
|
viewBox: "0 0 10 10",
|
|
@@ -4682,21 +4745,21 @@ function p5(a22) {
|
|
|
4682
4745
|
})
|
|
4683
4746
|
})]
|
|
4684
4747
|
}),
|
|
4685
|
-
|
|
4748
|
+
m9 !== void 0 && /* @__PURE__ */ jsx(Text, {
|
|
4686
4749
|
slot: "description",
|
|
4687
4750
|
className: r15.hint,
|
|
4688
|
-
children:
|
|
4751
|
+
children: m9
|
|
4689
4752
|
}),
|
|
4690
4753
|
/* @__PURE__ */ jsx(FieldError, {
|
|
4691
4754
|
className: r15.error,
|
|
4692
|
-
children:
|
|
4755
|
+
children: g6
|
|
4693
4756
|
}),
|
|
4694
4757
|
/* @__PURE__ */ jsx(Popover, {
|
|
4695
4758
|
className: f7.popover,
|
|
4696
4759
|
"data-weasel-overlay": "",
|
|
4697
4760
|
children: /* @__PURE__ */ jsx(ListBox, {
|
|
4698
4761
|
className: f7.listbox,
|
|
4699
|
-
children:
|
|
4762
|
+
children: v4 === void 0 ? y4 : v4.map((e19) => /* @__PURE__ */ jsx(h4, {
|
|
4700
4763
|
id: e19.value,
|
|
4701
4764
|
isDisabled: e19.isDisabled,
|
|
4702
4765
|
textValue: e19.textValue,
|
|
@@ -4707,13 +4770,13 @@ function p5(a22) {
|
|
|
4707
4770
|
]
|
|
4708
4771
|
});
|
|
4709
4772
|
}
|
|
4710
|
-
function
|
|
4773
|
+
function m5(e19, t25) {
|
|
4711
4774
|
return t25 === void 0 ? typeof e19 == "string" || typeof e19 == "number" ? String(e19) : void 0 : t25;
|
|
4712
4775
|
}
|
|
4713
|
-
function
|
|
4776
|
+
function h4({ children: e19, className: t25, textValue: n30, ...r28 }) {
|
|
4714
4777
|
return /* @__PURE__ */ jsxs(ListBoxItem, {
|
|
4715
4778
|
...r28,
|
|
4716
|
-
textValue:
|
|
4779
|
+
textValue: m5(e19, n30),
|
|
4717
4780
|
className: [f7.option, t25].filter(Boolean).join(" "),
|
|
4718
4781
|
children: [/* @__PURE__ */ jsx("svg", {
|
|
4719
4782
|
className: f7.check,
|
|
@@ -4762,25 +4825,26 @@ var s13 = {
|
|
|
4762
4825
|
footer: "_footer_13xy9_97"
|
|
4763
4826
|
};
|
|
4764
4827
|
function c12(c16) {
|
|
4765
|
-
let { title: l17, showCloseButton:
|
|
4828
|
+
let { title: l17, showCloseButton: u15, children: d12, footer: f12, role: p11 = "dialog", className: m9, isOpen: h7, onOpenChange: g6, ..._7 } = c16, v4 = u15 ?? !!g6;
|
|
4766
4829
|
return /* @__PURE__ */ jsx(ModalOverlay, {
|
|
4767
|
-
...
|
|
4768
|
-
isOpen:
|
|
4769
|
-
onOpenChange:
|
|
4830
|
+
..._7,
|
|
4831
|
+
isOpen: h7,
|
|
4832
|
+
onOpenChange: g6,
|
|
4770
4833
|
className: s13.overlay,
|
|
4834
|
+
"data-weasel-overlay": "",
|
|
4771
4835
|
children: /* @__PURE__ */ jsx(Modal, {
|
|
4772
|
-
className: [s13.modal,
|
|
4836
|
+
className: [s13.modal, m9].filter(Boolean).join(" "),
|
|
4773
4837
|
children: /* @__PURE__ */ jsx(Dialog, {
|
|
4774
|
-
role:
|
|
4838
|
+
role: p11,
|
|
4775
4839
|
className: s13.dialog,
|
|
4776
4840
|
children: ({ close: e19 }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4777
|
-
(l17 !== void 0 ||
|
|
4841
|
+
(l17 !== void 0 || v4) && /* @__PURE__ */ jsxs("header", {
|
|
4778
4842
|
className: s13.header,
|
|
4779
4843
|
children: [l17 !== void 0 && /* @__PURE__ */ jsx(Heading, {
|
|
4780
4844
|
slot: "title",
|
|
4781
4845
|
className: s13.title,
|
|
4782
4846
|
children: l17
|
|
4783
|
-
}),
|
|
4847
|
+
}), v4 && /* @__PURE__ */ jsx("button", {
|
|
4784
4848
|
type: "button",
|
|
4785
4849
|
className: s13.close,
|
|
4786
4850
|
onClick: e19,
|
|
@@ -4832,16 +4896,16 @@ var a17 = {
|
|
|
4832
4896
|
body: "_body_1u064_68"
|
|
4833
4897
|
};
|
|
4834
4898
|
function o14(o20) {
|
|
4835
|
-
let { title: s18, collapsed: c16, onToggleCollapse: l17, onHide:
|
|
4899
|
+
let { title: s18, collapsed: c16, onToggleCollapse: l17, onHide: u15, children: d12, className: f12 } = o20, p11 = [
|
|
4836
4900
|
a17.panel,
|
|
4837
4901
|
c16 && a17.collapsed,
|
|
4838
4902
|
f12
|
|
4839
|
-
].filter(Boolean).join(" "),
|
|
4903
|
+
].filter(Boolean).join(" "), m9 = l17 !== void 0;
|
|
4840
4904
|
return /* @__PURE__ */ jsxs("div", {
|
|
4841
|
-
className:
|
|
4905
|
+
className: p11,
|
|
4842
4906
|
children: [s18 !== void 0 && /* @__PURE__ */ jsxs("div", {
|
|
4843
4907
|
className: a17.titleRow,
|
|
4844
|
-
children: [
|
|
4908
|
+
children: [m9 ? /* @__PURE__ */ jsxs("button", {
|
|
4845
4909
|
type: "button",
|
|
4846
4910
|
className: a17.titleButton,
|
|
4847
4911
|
onClick: l17,
|
|
@@ -4857,10 +4921,10 @@ function o14(o20) {
|
|
|
4857
4921
|
}) : /* @__PURE__ */ jsx("span", {
|
|
4858
4922
|
className: a17.title,
|
|
4859
4923
|
children: s18
|
|
4860
|
-
}),
|
|
4924
|
+
}), u15 !== void 0 && /* @__PURE__ */ jsxs(o2, { children: [/* @__PURE__ */ jsx(Focusable, { children: /* @__PURE__ */ jsx("button", {
|
|
4861
4925
|
type: "button",
|
|
4862
4926
|
className: a17.hideButton,
|
|
4863
|
-
onClick:
|
|
4927
|
+
onClick: u15,
|
|
4864
4928
|
"aria-label": "Hide panel",
|
|
4865
4929
|
children: "\xD7"
|
|
4866
4930
|
}) }), /* @__PURE__ */ jsx(s2, { children: "Hide panel" })] })]
|
|
@@ -4878,10 +4942,10 @@ var a18 = {
|
|
|
4878
4942
|
shortcut: "_shortcut_1jvxe_38"
|
|
4879
4943
|
};
|
|
4880
4944
|
function o15(o20) {
|
|
4881
|
-
let { icon: s18, label: c16, shortcut: l17, active:
|
|
4945
|
+
let { icon: s18, label: c16, shortcut: l17, active: u15, disabled: d12, ariaDisabled: f12, tabbable: p11, onClick: m9, onKeyDown: h7, title: g6, className: _7 } = o20, v4 = g6 ?? (l17 ? `${c16} (${l17})` : c16), y4 = [
|
|
4882
4946
|
a18.button,
|
|
4883
|
-
|
|
4884
|
-
|
|
4947
|
+
u15 && a18.active,
|
|
4948
|
+
_7
|
|
4885
4949
|
].filter(Boolean).join(" ");
|
|
4886
4950
|
return /* @__PURE__ */ jsxs(o2, {
|
|
4887
4951
|
isDisabled: d12,
|
|
@@ -4889,13 +4953,13 @@ function o15(o20) {
|
|
|
4889
4953
|
isDisabled: d12,
|
|
4890
4954
|
children: /* @__PURE__ */ jsxs("button", {
|
|
4891
4955
|
type: "button",
|
|
4892
|
-
tabIndex:
|
|
4956
|
+
tabIndex: p11 ? 0 : -1,
|
|
4893
4957
|
className: y4,
|
|
4894
|
-
"aria-current":
|
|
4958
|
+
"aria-current": u15 ? "true" : void 0,
|
|
4895
4959
|
"aria-disabled": f12 ? "true" : void 0,
|
|
4896
4960
|
disabled: d12,
|
|
4897
|
-
onClick:
|
|
4898
|
-
onKeyDown:
|
|
4961
|
+
onClick: m9,
|
|
4962
|
+
onKeyDown: h7,
|
|
4899
4963
|
children: [
|
|
4900
4964
|
/* @__PURE__ */ jsx("span", {
|
|
4901
4965
|
className: a18.icon,
|
|
@@ -4912,7 +4976,7 @@ function o15(o20) {
|
|
|
4912
4976
|
})
|
|
4913
4977
|
]
|
|
4914
4978
|
})
|
|
4915
|
-
}), /* @__PURE__ */ jsx(s2, { children:
|
|
4979
|
+
}), /* @__PURE__ */ jsx(s2, { children: v4 })]
|
|
4916
4980
|
});
|
|
4917
4981
|
}
|
|
4918
4982
|
var t21 = {
|
|
@@ -4940,13 +5004,13 @@ var l12 = {
|
|
|
4940
5004
|
ineligibleBtn: "_ineligibleBtn_1mz1c_20",
|
|
4941
5005
|
separator: "_separator_1mz1c_25"
|
|
4942
5006
|
};
|
|
4943
|
-
function
|
|
5007
|
+
function u11(t25) {
|
|
4944
5008
|
if (!t25) return;
|
|
4945
5009
|
let n30 = Array.isArray(t25.key) ? t25.key[0] : t25.key, r28 = [];
|
|
4946
5010
|
return t25.mod && r28.push("\u2318"), t25.shift === true && r28.push("\u21E7"), t25.alt && r28.push("\u2325"), r28.push(e7(n30)), r28;
|
|
4947
5011
|
}
|
|
4948
5012
|
function d8(e19) {
|
|
4949
|
-
let t25 =
|
|
5013
|
+
let t25 = u11(e19);
|
|
4950
5014
|
return t25 ? t25.join("") : void 0;
|
|
4951
5015
|
}
|
|
4952
5016
|
var f8 = [
|
|
@@ -4956,31 +5020,31 @@ var f8 = [
|
|
|
4956
5020
|
"type",
|
|
4957
5021
|
"view"
|
|
4958
5022
|
];
|
|
4959
|
-
var
|
|
4960
|
-
function
|
|
5023
|
+
var p7 = "misc";
|
|
5024
|
+
function m6(e19) {
|
|
4961
5025
|
let t25 = /* @__PURE__ */ new Map();
|
|
4962
5026
|
for (let n30 of e19) {
|
|
4963
|
-
let e20 = n30.presentation?.group ??
|
|
5027
|
+
let e20 = n30.presentation?.group ?? p7, r28 = t25.get(e20) ?? [];
|
|
4964
5028
|
r28.push(n30), t25.set(e20, r28);
|
|
4965
5029
|
}
|
|
4966
5030
|
return t25;
|
|
4967
5031
|
}
|
|
4968
|
-
function
|
|
5032
|
+
function h5(e19, t25) {
|
|
4969
5033
|
let n30 = new Set(e19.keys()), r28 = [];
|
|
4970
5034
|
for (let e20 of t25) n30.has(e20) && (r28.push(e20), n30.delete(e20));
|
|
4971
|
-
for (let t26 of e19.keys()) n30.has(t26) && t26 !==
|
|
4972
|
-
return n30.has(
|
|
5035
|
+
for (let t26 of e19.keys()) n30.has(t26) && t26 !== p7 && (r28.push(t26), n30.delete(t26));
|
|
5036
|
+
return n30.has(p7) && r28.push(p7), r28;
|
|
4973
5037
|
}
|
|
4974
|
-
function
|
|
5038
|
+
function g4(e19) {
|
|
4975
5039
|
let t25 = e19.presentation?.icon;
|
|
4976
5040
|
return t25 == null ? /* @__PURE__ */ jsx(UnknownIcon, {}) : typeof t25 == "function" ? t25(void 0) : t25;
|
|
4977
5041
|
}
|
|
4978
|
-
function
|
|
4979
|
-
let { tools: a22, orientation:
|
|
5042
|
+
function _4(e19) {
|
|
5043
|
+
let { tools: a22, orientation: u15 = "vertical", className: p11, lookupShortcut: _7, modeRegistry: v4, groupOrder: y4 = f8 } = e19, b3 = m6(Object.values(a22.registry)), x3 = h5(b3, y4), S3 = [
|
|
4980
5044
|
l12.palette,
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
].filter(Boolean).join(" "), C3 = x3.flatMap((e20) => b3.get(e20)), w3 = C3.map((e20) =>
|
|
5045
|
+
u15 === "horizontal" && l12.horizontal,
|
|
5046
|
+
p11
|
|
5047
|
+
].filter(Boolean).join(" "), C3 = x3.flatMap((e20) => b3.get(e20)), w3 = C3.map((e20) => v4 ? eligibleContribution(v4, e20) : true), T3 = C3.findIndex((e20) => e20.id === a22.active), E3 = a8({
|
|
4984
5048
|
items: w3.map((e20) => ({ disabled: !e20 })),
|
|
4985
5049
|
itemClassName: l12.paletteBtn,
|
|
4986
5050
|
...T3 >= 0 && w3[T3] ? { tabStopIndex: T3 } : {}
|
|
@@ -4993,21 +5057,21 @@ function _3(e19) {
|
|
|
4993
5057
|
children: x3.map((e20, t25) => /* @__PURE__ */ jsxs(Fragment$1, { children: [t25 > 0 && /* @__PURE__ */ jsx("div", {
|
|
4994
5058
|
className: l12.separator,
|
|
4995
5059
|
role: "separator",
|
|
4996
|
-
"aria-orientation":
|
|
5060
|
+
"aria-orientation": u15 === "horizontal" ? "vertical" : "horizontal"
|
|
4997
5061
|
}), /* @__PURE__ */ jsx(n26, {
|
|
4998
|
-
orientation:
|
|
5062
|
+
orientation: u15,
|
|
4999
5063
|
groupKey: e20,
|
|
5000
5064
|
children: b3.get(e20).map((e21) => {
|
|
5001
|
-
let t26 = ++D3, r28 = e21.presentation?.label ?? e21.id, i24 = e21.presentation?.shortcut ?? d8(
|
|
5065
|
+
let t26 = ++D3, r28 = e21.presentation?.label ?? e21.id, i24 = e21.presentation?.shortcut ?? d8(_7 ? _7(e21.id) : e21.keybinding), s18 = w3[t26], c16 = v4 ? v4.current().id : void 0, u16 = !s18 && c16 ? `${r28}${i24 ? ` (${i24})` : ""} \u2014 disabled in ${c16} mode` : void 0;
|
|
5002
5066
|
return /* @__PURE__ */ jsx(o15, {
|
|
5003
|
-
icon:
|
|
5067
|
+
icon: g4(e21),
|
|
5004
5068
|
label: r28,
|
|
5005
5069
|
shortcut: i24,
|
|
5006
5070
|
active: a22.active === e21.id,
|
|
5007
5071
|
tabbable: E3.tabIndexFor(t26) === 0,
|
|
5008
5072
|
ariaDisabled: !s18,
|
|
5009
5073
|
className: [l12.paletteBtn, !s18 && l12.ineligibleBtn].filter(Boolean).join(" "),
|
|
5010
|
-
title:
|
|
5074
|
+
title: u16,
|
|
5011
5075
|
onClick: s18 ? () => a22.setActive(e21.id) : () => {
|
|
5012
5076
|
},
|
|
5013
5077
|
onKeyDown: E3.onKeyDown(t26)
|
|
@@ -5058,11 +5122,11 @@ var f9 = {
|
|
|
5058
5122
|
option: "_option_7wlzm_93",
|
|
5059
5123
|
empty: "_empty_7wlzm_116"
|
|
5060
5124
|
};
|
|
5061
|
-
function
|
|
5062
|
-
let { label:
|
|
5125
|
+
function p8(s18) {
|
|
5126
|
+
let { label: p11, description: h7, errorMessage: g6, placeholder: _7, options: v4, children: y4, selectedKey: b3, defaultSelectedKey: x3, onSelectionChange: S3, emptyLabel: C3 = "No matches", className: w3, ...T3 } = s18;
|
|
5063
5127
|
return /* @__PURE__ */ jsxs(ComboBox, {
|
|
5064
5128
|
...T3,
|
|
5065
|
-
selectedKey: b3
|
|
5129
|
+
selectedKey: b3,
|
|
5066
5130
|
defaultSelectedKey: x3,
|
|
5067
5131
|
onSelectionChange: S3 ? (e19) => S3(e19) : void 0,
|
|
5068
5132
|
className: [
|
|
@@ -5071,13 +5135,13 @@ function p7(s18) {
|
|
|
5071
5135
|
w3
|
|
5072
5136
|
].filter(Boolean).join(" "),
|
|
5073
5137
|
children: [
|
|
5074
|
-
|
|
5138
|
+
p11 !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
5075
5139
|
className: r15.label,
|
|
5076
|
-
children:
|
|
5140
|
+
children: p11
|
|
5077
5141
|
}),
|
|
5078
5142
|
/* @__PURE__ */ jsxs("div", {
|
|
5079
5143
|
className: f9.frame,
|
|
5080
|
-
children: [/* @__PURE__ */ jsx(Input, { placeholder:
|
|
5144
|
+
children: [/* @__PURE__ */ jsx(Input, { placeholder: _7 }), /* @__PURE__ */ jsx(Button, {
|
|
5081
5145
|
className: f9.openButton,
|
|
5082
5146
|
"aria-label": "Show options",
|
|
5083
5147
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -5094,24 +5158,25 @@ function p7(s18) {
|
|
|
5094
5158
|
})
|
|
5095
5159
|
})]
|
|
5096
5160
|
}),
|
|
5097
|
-
|
|
5161
|
+
h7 !== void 0 && /* @__PURE__ */ jsx(Text, {
|
|
5098
5162
|
slot: "description",
|
|
5099
5163
|
className: r15.hint,
|
|
5100
|
-
children:
|
|
5164
|
+
children: h7
|
|
5101
5165
|
}),
|
|
5102
5166
|
/* @__PURE__ */ jsx(FieldError, {
|
|
5103
5167
|
className: r15.error,
|
|
5104
|
-
children:
|
|
5168
|
+
children: g6
|
|
5105
5169
|
}),
|
|
5106
5170
|
/* @__PURE__ */ jsx(Popover, {
|
|
5107
5171
|
className: f9.popover,
|
|
5172
|
+
"data-weasel-overlay": "",
|
|
5108
5173
|
children: /* @__PURE__ */ jsx(ListBox, {
|
|
5109
5174
|
className: f9.listbox,
|
|
5110
5175
|
renderEmptyState: () => /* @__PURE__ */ jsx("div", {
|
|
5111
5176
|
className: f9.empty,
|
|
5112
5177
|
children: C3
|
|
5113
5178
|
}),
|
|
5114
|
-
children:
|
|
5179
|
+
children: v4 === void 0 ? y4 : v4.map((e19) => /* @__PURE__ */ jsx(m7, {
|
|
5115
5180
|
id: e19.value,
|
|
5116
5181
|
textValue: e19.textValue,
|
|
5117
5182
|
isDisabled: e19.isDisabled,
|
|
@@ -5122,7 +5187,7 @@ function p7(s18) {
|
|
|
5122
5187
|
]
|
|
5123
5188
|
});
|
|
5124
5189
|
}
|
|
5125
|
-
function
|
|
5190
|
+
function m7({ className: e19, ...t25 }) {
|
|
5126
5191
|
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
5127
5192
|
...t25,
|
|
5128
5193
|
className: [f9.option, e19].filter(Boolean).join(" ")
|
|
@@ -5132,19 +5197,19 @@ function f10(e19, t25, n30) {
|
|
|
5132
5197
|
let r28 = t25.x - e19.x, i24 = t25.y - e19.y;
|
|
5133
5198
|
return Math.sqrt(r28 * r28 + i24 * i24) ** +n30;
|
|
5134
5199
|
}
|
|
5135
|
-
function
|
|
5200
|
+
function p9(e19, t25, n30, r28, i24, a22 = 0.5) {
|
|
5136
5201
|
let o20 = 0 + f10(e19, t25, a22), s18 = o20 + f10(t25, n30, a22), c16 = s18 + f10(n30, r28, a22);
|
|
5137
5202
|
if (s18 - o20 === 0) return {
|
|
5138
5203
|
x: t25.x + (n30.x - t25.x) * i24,
|
|
5139
5204
|
y: t25.y + (n30.y - t25.y) * i24
|
|
5140
5205
|
};
|
|
5141
|
-
let l17 = o20 + i24 * (s18 - o20),
|
|
5206
|
+
let l17 = o20 + i24 * (s18 - o20), u15 = ((o20 - l17) * e19.x + (l17 - 0) * t25.x) / (o20 - 0), d12 = ((o20 - l17) * e19.y + (l17 - 0) * t25.y) / (o20 - 0), p11 = ((s18 - l17) * t25.x + (l17 - o20) * n30.x) / (s18 - o20), m9 = ((s18 - l17) * t25.y + (l17 - o20) * n30.y) / (s18 - o20), h7 = ((c16 - l17) * n30.x + (l17 - s18) * r28.x) / (c16 - s18), g6 = ((c16 - l17) * n30.y + (l17 - s18) * r28.y) / (c16 - s18), _7 = ((s18 - l17) * u15 + (l17 - 0) * p11) / (s18 - 0), v4 = ((s18 - l17) * d12 + (l17 - 0) * m9) / (s18 - 0), y4 = ((c16 - l17) * p11 + (l17 - o20) * h7) / (c16 - o20), b3 = ((c16 - l17) * m9 + (l17 - o20) * g6) / (c16 - o20);
|
|
5142
5207
|
return {
|
|
5143
|
-
x: ((s18 - l17) *
|
|
5144
|
-
y: ((s18 - l17) *
|
|
5208
|
+
x: ((s18 - l17) * _7 + (l17 - o20) * y4) / (s18 - o20),
|
|
5209
|
+
y: ((s18 - l17) * v4 + (l17 - o20) * b3) / (s18 - o20)
|
|
5145
5210
|
};
|
|
5146
5211
|
}
|
|
5147
|
-
function
|
|
5212
|
+
function m8(e19, t25, n30 = 0.5) {
|
|
5148
5213
|
if (e19.length < 2) return [];
|
|
5149
5214
|
let r28 = e19.length, i24 = [], a22 = {
|
|
5150
5215
|
x: 2 * e19[0].x - e19[1].x,
|
|
@@ -5154,23 +5219,23 @@ function m7(e19, t25, n30 = 0.5) {
|
|
|
5154
5219
|
y: 2 * e19[r28 - 1].y - e19[r28 - 2].y
|
|
5155
5220
|
};
|
|
5156
5221
|
for (let s18 = 0; s18 < r28 - 1; s18++) {
|
|
5157
|
-
let c16 = s18 === 0 ? a22 : e19[s18 - 1], l17 = e19[s18],
|
|
5222
|
+
let c16 = s18 === 0 ? a22 : e19[s18 - 1], l17 = e19[s18], u15 = e19[s18 + 1], d12 = s18 + 2 < r28 ? e19[s18 + 2] : o20, f12 = s18 === 0 ? 0 : 1;
|
|
5158
5223
|
for (let e20 = f12; e20 <= t25; e20++) {
|
|
5159
5224
|
if (e20 === 0) {
|
|
5160
5225
|
i24.push(l17);
|
|
5161
5226
|
continue;
|
|
5162
5227
|
}
|
|
5163
5228
|
if (e20 === t25) {
|
|
5164
|
-
i24.push(
|
|
5229
|
+
i24.push(u15);
|
|
5165
5230
|
continue;
|
|
5166
5231
|
}
|
|
5167
5232
|
let r29 = e20 / t25;
|
|
5168
|
-
i24.push(
|
|
5233
|
+
i24.push(p9(c16, l17, u15, d12, r29, n30));
|
|
5169
5234
|
}
|
|
5170
5235
|
}
|
|
5171
5236
|
return i24;
|
|
5172
5237
|
}
|
|
5173
|
-
function
|
|
5238
|
+
function h6(e19) {
|
|
5174
5239
|
let t25 = e19.length;
|
|
5175
5240
|
if (t25 === 0) return [];
|
|
5176
5241
|
if (t25 === 1) return [0];
|
|
@@ -5185,13 +5250,13 @@ function h5(e19) {
|
|
|
5185
5250
|
}
|
|
5186
5251
|
return r28;
|
|
5187
5252
|
}
|
|
5188
|
-
function
|
|
5253
|
+
function g5(e19, t25, n30, r28, i24) {
|
|
5189
5254
|
let a22 = i24 * i24, o20 = a22 * i24;
|
|
5190
5255
|
return (2 * o20 - 3 * a22 + 1) * e19 + (o20 - 2 * a22 + i24) * n30 + (-2 * o20 + 3 * a22) * t25 + (o20 - a22) * r28;
|
|
5191
5256
|
}
|
|
5192
|
-
function
|
|
5257
|
+
function _5(e19, t25) {
|
|
5193
5258
|
if (e19.length < 2) return [];
|
|
5194
|
-
let n30 = e19.length, r28 = e19.map((e20) => e20.x), i24 = e19.map((e20) => e20.y), a22 =
|
|
5259
|
+
let n30 = e19.length, r28 = e19.map((e20) => e20.x), i24 = e19.map((e20) => e20.y), a22 = h6(r28), o20 = h6(i24), s18 = [];
|
|
5195
5260
|
for (let c16 = 0; c16 < n30 - 1; c16++) {
|
|
5196
5261
|
let n31 = c16 === 0 ? 0 : 1;
|
|
5197
5262
|
for (let l17 = n31; l17 <= t25; l17++) {
|
|
@@ -5205,14 +5270,14 @@ function _4(e19, t25) {
|
|
|
5205
5270
|
}
|
|
5206
5271
|
let n32 = l17 / t25;
|
|
5207
5272
|
s18.push({
|
|
5208
|
-
x:
|
|
5209
|
-
y:
|
|
5273
|
+
x: g5(r28[c16], r28[c16 + 1], a22[c16], a22[c16 + 1], n32),
|
|
5274
|
+
y: g5(i24[c16], i24[c16 + 1], o20[c16], o20[c16 + 1], n32)
|
|
5210
5275
|
});
|
|
5211
5276
|
}
|
|
5212
5277
|
}
|
|
5213
5278
|
return s18;
|
|
5214
5279
|
}
|
|
5215
|
-
function
|
|
5280
|
+
function v3(e19, t25) {
|
|
5216
5281
|
if (e19.length < 2) return [];
|
|
5217
5282
|
let n30 = [];
|
|
5218
5283
|
for (let r28 = 0; r28 < e19.length - 1; r28++) {
|
|
@@ -5238,15 +5303,15 @@ function v2(e19, t25) {
|
|
|
5238
5303
|
function y2(e19, t25, n30) {
|
|
5239
5304
|
switch (n30) {
|
|
5240
5305
|
case "linear":
|
|
5241
|
-
return
|
|
5306
|
+
return v3(e19, t25);
|
|
5242
5307
|
case "catmull-rom-uniform":
|
|
5243
|
-
return
|
|
5308
|
+
return m8(e19, t25, 0);
|
|
5244
5309
|
case "catmull-rom-chordal":
|
|
5245
|
-
return
|
|
5310
|
+
return m8(e19, t25, 1);
|
|
5246
5311
|
case "monotone":
|
|
5247
|
-
return
|
|
5312
|
+
return _5(e19, t25);
|
|
5248
5313
|
default:
|
|
5249
|
-
return
|
|
5314
|
+
return m8(e19, t25, 0.5);
|
|
5250
5315
|
}
|
|
5251
5316
|
}
|
|
5252
5317
|
function b2(e19, t25, n30) {
|
|
@@ -5267,11 +5332,11 @@ function x2(e19, t25, n30) {
|
|
|
5267
5332
|
if (a22.length < 2) continue;
|
|
5268
5333
|
let o20 = a22.length - 1;
|
|
5269
5334
|
for (let e20 = 0; e20 < o20; e20++) {
|
|
5270
|
-
let s18 = a22[e20], c16 = a22[e20 + 1], l17 = c16.x - s18.x,
|
|
5271
|
-
|
|
5272
|
-
let
|
|
5335
|
+
let s18 = a22[e20], c16 = a22[e20 + 1], l17 = c16.x - s18.x, u15 = c16.y - s18.y, d12 = t25.x - s18.x, f12 = t25.y - s18.y, p11 = l17 * l17 + u15 * u15, m9 = p11 > 0 ? (d12 * l17 + f12 * u15) / p11 : 0;
|
|
5336
|
+
m9 < 0 ? m9 = 0 : m9 > 1 && (m9 = 1);
|
|
5337
|
+
let h7 = s18.x + m9 * l17, g6 = s18.y + m9 * u15, _7 = h7 - t25.x, v4 = g6 - t25.y, y4 = _7 * _7 + v4 * v4;
|
|
5273
5338
|
if (y4 > r28) continue;
|
|
5274
|
-
let b3 = (e20 +
|
|
5339
|
+
let b3 = (e20 + m9) / o20;
|
|
5275
5340
|
(i24 === null || y4 < i24.d2) && (i24 = {
|
|
5276
5341
|
segIdx: n31,
|
|
5277
5342
|
t: b3,
|
|
@@ -5323,26 +5388,26 @@ function A2(e19) {
|
|
|
5323
5388
|
}
|
|
5324
5389
|
function j2(t25 = {}) {
|
|
5325
5390
|
let n30 = t25.id ?? "function", r28 = t25.domain ?? "2d", i24 = t25.endpoints ?? "free", a22 = t25.constrain ?? "none", o20 = t25.addPointMode ?? "click-curve", s18 = A2(t25), c16 = t25.interactive !== false, f12 = t25.curve !== false && t25.curve !== null;
|
|
5326
|
-
function
|
|
5327
|
-
let { points: r29, activeIndex: a23 } = e19, o21 = O2(r29, n31),
|
|
5391
|
+
function p11(e19, n31) {
|
|
5392
|
+
let { points: r29, activeIndex: a23 } = e19, o21 = O2(r29, n31), p12 = "", m10 = null;
|
|
5328
5393
|
if (r29.length >= 2) {
|
|
5329
5394
|
let e20 = y2(r29, C2, s18).map((e21) => n31.toPlot(e21)), i25 = [`M${e20[0].x.toFixed(2)},${e20[0].y.toFixed(2)}`];
|
|
5330
5395
|
for (let t26 = 1; t26 < e20.length; t26++) i25.push(`L${e20[t26].x.toFixed(2)},${e20[t26].y.toFixed(2)}`);
|
|
5331
|
-
if (
|
|
5396
|
+
if (p12 = i25.join(""), t25.fill) {
|
|
5332
5397
|
let r30 = t25.fill.side === "below" ? n31.plotSize.height : 0, a24 = e20[0], o22 = e20[e20.length - 1], s19 = [...i25];
|
|
5333
|
-
s19.push(`L${o22.x.toFixed(2)},${r30.toFixed(2)}`), s19.push(`L${a24.x.toFixed(2)},${r30.toFixed(2)}`), s19.push("Z"),
|
|
5398
|
+
s19.push(`L${o22.x.toFixed(2)},${r30.toFixed(2)}`), s19.push(`L${a24.x.toFixed(2)},${r30.toFixed(2)}`), s19.push("Z"), m10 = s19.join("");
|
|
5334
5399
|
}
|
|
5335
5400
|
}
|
|
5336
5401
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5337
|
-
|
|
5402
|
+
m10 && /* @__PURE__ */ jsx("path", {
|
|
5338
5403
|
"data-curve-element": "fill",
|
|
5339
5404
|
className: S2.fill,
|
|
5340
|
-
d:
|
|
5405
|
+
d: m10,
|
|
5341
5406
|
fill: t25.fill ? t25.fill.color : void 0
|
|
5342
5407
|
}),
|
|
5343
|
-
|
|
5408
|
+
p12 && f12 && /* @__PURE__ */ jsx("path", {
|
|
5344
5409
|
className: S2.curve,
|
|
5345
|
-
d:
|
|
5410
|
+
d: p12,
|
|
5346
5411
|
fill: "none"
|
|
5347
5412
|
}),
|
|
5348
5413
|
c16 && o21.map((e20, n32) => {
|
|
@@ -5394,7 +5459,7 @@ function j2(t25 = {}) {
|
|
|
5394
5459
|
})
|
|
5395
5460
|
] });
|
|
5396
5461
|
}
|
|
5397
|
-
function
|
|
5462
|
+
function m9(e19, t26, n31) {
|
|
5398
5463
|
if (!c16) return null;
|
|
5399
5464
|
let r29 = b2(O2(e19.points, n31), t26, w2);
|
|
5400
5465
|
if (r29) return {
|
|
@@ -5413,30 +5478,30 @@ function j2(t25 = {}) {
|
|
|
5413
5478
|
}
|
|
5414
5479
|
return null;
|
|
5415
5480
|
}
|
|
5416
|
-
function
|
|
5481
|
+
function h7(e19) {
|
|
5417
5482
|
return {
|
|
5418
5483
|
onMove(n31, o21, s19, c17) {
|
|
5419
5484
|
let l17 = n31.points;
|
|
5420
5485
|
if (e19 < 0 || e19 >= l17.length) return n31;
|
|
5421
|
-
let
|
|
5422
|
-
if (i24 === "pinned-both" &&
|
|
5423
|
-
else if (i24 === "pinned-x" &&
|
|
5486
|
+
let u15 = c17.modelRange, d12 = t25.xClamp ? t25.xClamp[0] : u15.xMin, f13 = t25.xClamp ? t25.xClamp[1] : u15.xMax, p12 = o21.x, m10 = o21.y, h8 = e19 === 0 || e19 === l17.length - 1;
|
|
5487
|
+
if (i24 === "pinned-both" && h8) p12 = l17[e19].x, m10 = l17[e19].y;
|
|
5488
|
+
else if (i24 === "pinned-x" && h8) p12 = e19 === 0 ? d12 : f13;
|
|
5424
5489
|
else if (a22 === "function" || r28 === "1d") {
|
|
5425
5490
|
let t26 = a22 === "function" ? (f13 - d12) / 1e3 : 0, n32 = e19 > 0 ? l17[e19 - 1].x + t26 : d12, r29 = e19 < l17.length - 1 ? l17[e19 + 1].x - t26 : f13;
|
|
5426
|
-
|
|
5491
|
+
p12 = Math.max(n32, Math.min(r29, p12));
|
|
5427
5492
|
}
|
|
5428
|
-
|
|
5429
|
-
let
|
|
5430
|
-
x:
|
|
5431
|
-
y:
|
|
5432
|
-
}, c17),
|
|
5433
|
-
return
|
|
5493
|
+
p12 = Math.max(Math.min(d12, f13), Math.min(Math.max(d12, f13), p12));
|
|
5494
|
+
let g7 = E2({
|
|
5495
|
+
x: p12,
|
|
5496
|
+
y: m10
|
|
5497
|
+
}, c17), _8 = l17.slice();
|
|
5498
|
+
return _8[e19] = {
|
|
5434
5499
|
...l17[e19],
|
|
5435
|
-
x:
|
|
5436
|
-
y:
|
|
5500
|
+
x: g7.x,
|
|
5501
|
+
y: g7.y
|
|
5437
5502
|
}, {
|
|
5438
5503
|
...n31,
|
|
5439
|
-
points:
|
|
5504
|
+
points: _8,
|
|
5440
5505
|
activeIndex: e19
|
|
5441
5506
|
};
|
|
5442
5507
|
},
|
|
@@ -5454,7 +5519,7 @@ function j2(t25 = {}) {
|
|
|
5454
5519
|
}
|
|
5455
5520
|
};
|
|
5456
5521
|
}
|
|
5457
|
-
function
|
|
5522
|
+
function g6(o21, s19, c17, l17, u15) {
|
|
5458
5523
|
if (s19.kind === "anchor") {
|
|
5459
5524
|
let { index: r29 } = s19.payload;
|
|
5460
5525
|
if (p("function-layer", "anchor-down", {
|
|
@@ -5465,58 +5530,58 @@ function j2(t25 = {}) {
|
|
|
5465
5530
|
}), o21.points[r29]?.locked) return;
|
|
5466
5531
|
if (l17.modifiers.shift) {
|
|
5467
5532
|
if (D2(r29, o21.points.length, i24) || t25.minPoints !== void 0 && o21.points.length <= t25.minPoints) return;
|
|
5468
|
-
|
|
5533
|
+
u15.commit({
|
|
5469
5534
|
...o21,
|
|
5470
5535
|
points: o21.points.filter((e19, t26) => t26 !== r29),
|
|
5471
5536
|
activeIndex: null
|
|
5472
5537
|
});
|
|
5473
5538
|
return;
|
|
5474
5539
|
}
|
|
5475
|
-
return c17.button === 2 ? void 0 : (
|
|
5540
|
+
return c17.button === 2 ? void 0 : (u15.commit({
|
|
5476
5541
|
...o21,
|
|
5477
5542
|
activeIndex: r29
|
|
5478
|
-
}),
|
|
5543
|
+
}), h7(r29));
|
|
5479
5544
|
}
|
|
5480
5545
|
if (s19.kind === "curve") {
|
|
5481
5546
|
let { segIdx: e19 } = s19.payload;
|
|
5482
5547
|
if (t25.maxPoints !== void 0 && o21.points.length >= t25.maxPoints) return;
|
|
5483
|
-
let n31 = e19 + 1, i25 = E2(
|
|
5548
|
+
let n31 = e19 + 1, i25 = E2(u15.model, l17);
|
|
5484
5549
|
if (a22 === "function" || r28 === "1d") {
|
|
5485
5550
|
let e20 = a22 === "function" ? (l17.modelRange.xMax - l17.modelRange.xMin) / 1e3 : 0, t26 = n31 > 0 ? o21.points[n31 - 1] : null, r29 = n31 < o21.points.length ? o21.points[n31] : null;
|
|
5486
|
-
if (t26 && Math.abs(i25.x - t26.x) < e20 * 2) return
|
|
5551
|
+
if (t26 && Math.abs(i25.x - t26.x) < e20 * 2) return u15.commit({
|
|
5487
5552
|
...o21,
|
|
5488
5553
|
activeIndex: n31 - 1
|
|
5489
|
-
}),
|
|
5490
|
-
if (r29 && Math.abs(i25.x - r29.x) < e20 * 2) return
|
|
5554
|
+
}), h7(n31 - 1);
|
|
5555
|
+
if (r29 && Math.abs(i25.x - r29.x) < e20 * 2) return u15.commit({
|
|
5491
5556
|
...o21,
|
|
5492
5557
|
activeIndex: n31
|
|
5493
|
-
}),
|
|
5558
|
+
}), h7(n31);
|
|
5494
5559
|
}
|
|
5495
5560
|
let c18 = [
|
|
5496
5561
|
...o21.points.slice(0, n31),
|
|
5497
5562
|
i25,
|
|
5498
5563
|
...o21.points.slice(n31)
|
|
5499
5564
|
];
|
|
5500
|
-
return
|
|
5565
|
+
return u15.commit({
|
|
5501
5566
|
...o21,
|
|
5502
5567
|
points: c18,
|
|
5503
5568
|
activeIndex: n31
|
|
5504
|
-
}),
|
|
5569
|
+
}), h7(n31);
|
|
5505
5570
|
}
|
|
5506
5571
|
}
|
|
5507
|
-
function
|
|
5572
|
+
function _7(e19, n31, i25, a23, s19) {
|
|
5508
5573
|
if (!c16 || o20 !== "click-empty" || t25.maxPoints !== void 0 && e19.points.length >= t25.maxPoints) return;
|
|
5509
|
-
let l17 = E2(n31, a23),
|
|
5574
|
+
let l17 = E2(n31, a23), u15 = e19.points.length;
|
|
5510
5575
|
if (r28 === "1d") {
|
|
5511
5576
|
for (let t26 = 0; t26 < e19.points.length; t26++) if (e19.points[t26].x > l17.x) {
|
|
5512
|
-
|
|
5577
|
+
u15 = t26;
|
|
5513
5578
|
break;
|
|
5514
5579
|
}
|
|
5515
5580
|
}
|
|
5516
5581
|
let d12 = [
|
|
5517
|
-
...e19.points.slice(0,
|
|
5582
|
+
...e19.points.slice(0, u15),
|
|
5518
5583
|
l17,
|
|
5519
|
-
...e19.points.slice(
|
|
5584
|
+
...e19.points.slice(u15)
|
|
5520
5585
|
];
|
|
5521
5586
|
s19.commit({
|
|
5522
5587
|
...e19,
|
|
@@ -5526,10 +5591,10 @@ function j2(t25 = {}) {
|
|
|
5526
5591
|
}
|
|
5527
5592
|
return {
|
|
5528
5593
|
id: n30,
|
|
5529
|
-
render:
|
|
5530
|
-
hitTest:
|
|
5531
|
-
onPointerDown:
|
|
5532
|
-
onEmptyPointerDown:
|
|
5594
|
+
render: p11,
|
|
5595
|
+
hitTest: m9,
|
|
5596
|
+
onPointerDown: g6,
|
|
5597
|
+
onEmptyPointerDown: _7
|
|
5533
5598
|
};
|
|
5534
5599
|
}
|
|
5535
5600
|
function N2(e19) {
|
|
@@ -5541,15 +5606,15 @@ function N2(e19) {
|
|
|
5541
5606
|
};
|
|
5542
5607
|
}
|
|
5543
5608
|
function P2(l17) {
|
|
5544
|
-
let { layers: f12, onLayerChange:
|
|
5545
|
-
xMin:
|
|
5546
|
-
xMax:
|
|
5547
|
-
yMin:
|
|
5548
|
-
yMax:
|
|
5549
|
-
}), [
|
|
5550
|
-
width:
|
|
5551
|
-
height:
|
|
5552
|
-
}), [
|
|
5609
|
+
let { layers: f12, onLayerChange: p11, onLayerCommit: m9, width: h7, height: g6, xRange: _7 = [0, 1], yRange: v4 = [0, 1], grid: y4, axes: b3, className: x3, style: C3, children: w3 } = l17, T3 = l17.history !== false, E3 = useMemo(() => ({
|
|
5610
|
+
xMin: _7[0],
|
|
5611
|
+
xMax: _7[1],
|
|
5612
|
+
yMin: v4[0],
|
|
5613
|
+
yMax: v4[1]
|
|
5614
|
+
}), [_7, v4]), D3 = useMemo(() => ({
|
|
5615
|
+
width: h7,
|
|
5616
|
+
height: g6
|
|
5617
|
+
}), [h7, g6]), O3 = useRef(f12);
|
|
5553
5618
|
O3.current = f12;
|
|
5554
5619
|
let k3 = useRef(E3);
|
|
5555
5620
|
k3.current = E3;
|
|
@@ -5572,9 +5637,9 @@ function P2(l17) {
|
|
|
5572
5637
|
let t25 = O3.current;
|
|
5573
5638
|
for (let n30 of t25) {
|
|
5574
5639
|
let t26 = e19.get(n30.layer.id);
|
|
5575
|
-
t26 !== void 0 && t26 !== n30.state &&
|
|
5640
|
+
t26 !== void 0 && t26 !== n30.state && p11(n30.layer.id, t26);
|
|
5576
5641
|
}
|
|
5577
|
-
}, [
|
|
5642
|
+
}, [p11]), V2 = useCallback(() => {
|
|
5578
5643
|
if (!T3) return;
|
|
5579
5644
|
let e19 = L2.current;
|
|
5580
5645
|
if (e19.length === 0) return;
|
|
@@ -5614,7 +5679,7 @@ function P2(l17) {
|
|
|
5614
5679
|
let r28 = n30.clientToModel(e19), i24 = X2(t25.layerId);
|
|
5615
5680
|
if (i24 === void 0) return;
|
|
5616
5681
|
let a22 = M3(N2(e19)), o20 = t25.gesture.onMove(i24, r28, e19, a22);
|
|
5617
|
-
o20 !== i24 &&
|
|
5682
|
+
o20 !== i24 && p11(t25.layerId, o20);
|
|
5618
5683
|
}, W2.current = (e19) => {
|
|
5619
5684
|
let t25 = P3.current;
|
|
5620
5685
|
if (!t25 || t25.pointerId !== e19.pointerId) return;
|
|
@@ -5624,7 +5689,7 @@ function P2(l17) {
|
|
|
5624
5689
|
return;
|
|
5625
5690
|
}
|
|
5626
5691
|
let r28 = M3(N2(e19)), i24 = t25.gesture.onCommit ? t25.gesture.onCommit(n30, r28) : n30;
|
|
5627
|
-
i24 !== n30 &&
|
|
5692
|
+
i24 !== n30 && p11(t25.layerId, i24), T3 && (L2.current.push(t25.startStates), R2.current = []), m9 && m9(t25.layerId, i24, t25.startSelfState), Y2();
|
|
5628
5693
|
}, G2.current = (e19) => {
|
|
5629
5694
|
let t25 = P3.current;
|
|
5630
5695
|
if (!t25 || t25.pointerId !== e19.pointerId) return;
|
|
@@ -5634,7 +5699,7 @@ function P2(l17) {
|
|
|
5634
5699
|
return;
|
|
5635
5700
|
}
|
|
5636
5701
|
let r28 = M3(N2(e19)), i24 = t25.gesture.onCancel ? t25.gesture.onCancel(n30, r28) : t25.startSelfState;
|
|
5637
|
-
i24 !== n30 &&
|
|
5702
|
+
i24 !== n30 && p11(t25.layerId, i24), Y2();
|
|
5638
5703
|
};
|
|
5639
5704
|
let Z2 = useCallback((e19, t25, n30) => {
|
|
5640
5705
|
let r28 = z2();
|
|
@@ -5662,50 +5727,50 @@ function P2(l17) {
|
|
|
5662
5727
|
for (let e19 = i24.length - 1; e19 >= 0; e19--) {
|
|
5663
5728
|
let s19 = i24[e19], c16 = s19.layer.hitTest?.(s19.state, n30.plot, r28);
|
|
5664
5729
|
if (!c16) continue;
|
|
5665
|
-
let l18 = s19.state,
|
|
5730
|
+
let l18 = s19.state, u15, d12 = s19.layer.onPointerDown?.(l18, c16, a22, r28, {
|
|
5666
5731
|
plot: n30.plot,
|
|
5667
5732
|
model: n30.model,
|
|
5668
5733
|
commit(e20) {
|
|
5669
|
-
|
|
5734
|
+
u15 = e20, p11(s19.layer.id, e20);
|
|
5670
5735
|
}
|
|
5671
5736
|
});
|
|
5672
5737
|
if (t25.stopPropagation(), d12) {
|
|
5673
5738
|
Z2(s19.layer.id, t25.pointerId, d12);
|
|
5674
5739
|
return;
|
|
5675
5740
|
}
|
|
5676
|
-
|
|
5741
|
+
u15 !== void 0 && (T3 && (L2.current.push(o20), R2.current = []), m9?.(s19.layer.id, u15, l18));
|
|
5677
5742
|
return;
|
|
5678
5743
|
}
|
|
5679
5744
|
let s18 = null;
|
|
5680
5745
|
for (let e19 = i24.length - 1; e19 >= 0; e19--) {
|
|
5681
5746
|
let c16 = i24[e19];
|
|
5682
5747
|
if (!c16.layer.onEmptyPointerDown) continue;
|
|
5683
|
-
let l18 = c16.state,
|
|
5748
|
+
let l18 = c16.state, u15, d12 = c16.layer.onEmptyPointerDown(l18, n30.model, a22, r28, {
|
|
5684
5749
|
plot: n30.plot,
|
|
5685
5750
|
model: n30.model,
|
|
5686
5751
|
commit(e20) {
|
|
5687
|
-
|
|
5752
|
+
u15 = e20, p11(c16.layer.id, e20);
|
|
5688
5753
|
}
|
|
5689
5754
|
});
|
|
5690
5755
|
if (d12) {
|
|
5691
|
-
Z2(c16.layer.id, t25.pointerId, d12),
|
|
5756
|
+
Z2(c16.layer.id, t25.pointerId, d12), u15 !== void 0 && P3.current !== null && (P3.current.startStates = o20, P3.current.startSelfState = o20.get(c16.layer.id));
|
|
5692
5757
|
return;
|
|
5693
5758
|
}
|
|
5694
|
-
if (
|
|
5759
|
+
if (u15 !== void 0) {
|
|
5695
5760
|
s18 = {
|
|
5696
5761
|
id: c16.layer.id,
|
|
5697
|
-
next:
|
|
5762
|
+
next: u15,
|
|
5698
5763
|
prev: l18
|
|
5699
5764
|
};
|
|
5700
5765
|
break;
|
|
5701
5766
|
}
|
|
5702
5767
|
}
|
|
5703
|
-
s18 && (T3 && (L2.current.push(o20), R2.current = []),
|
|
5768
|
+
s18 && (T3 && (L2.current.push(o20), R2.current = []), m9?.(s18.id, s18.next, s18.prev));
|
|
5704
5769
|
}, [
|
|
5705
5770
|
M3,
|
|
5706
5771
|
Z2,
|
|
5707
|
-
|
|
5708
|
-
|
|
5772
|
+
p11,
|
|
5773
|
+
m9,
|
|
5709
5774
|
T3,
|
|
5710
5775
|
z2
|
|
5711
5776
|
]), $2 = useCallback((e19) => {
|
|
@@ -5748,10 +5813,10 @@ function P2(l17) {
|
|
|
5748
5813
|
ref: j3,
|
|
5749
5814
|
className: [S2.root, x3].filter(Boolean).join(" "),
|
|
5750
5815
|
style: C3,
|
|
5751
|
-
width:
|
|
5752
|
-
height:
|
|
5753
|
-
xRange:
|
|
5754
|
-
yRange:
|
|
5816
|
+
width: h7,
|
|
5817
|
+
height: g6,
|
|
5818
|
+
xRange: _7,
|
|
5819
|
+
yRange: v4,
|
|
5755
5820
|
grid: y4,
|
|
5756
5821
|
axes: b3,
|
|
5757
5822
|
tabIndex: T3 ? 0 : void 0,
|
|
@@ -5776,29 +5841,29 @@ function P2(l17) {
|
|
|
5776
5841
|
});
|
|
5777
5842
|
}
|
|
5778
5843
|
function F2(e19) {
|
|
5779
|
-
let { value: t25, onInput: n30, onChange: r28, domain: l17, endpoints: d12, interpolation: f12, constrain:
|
|
5844
|
+
let { value: t25, onInput: n30, onChange: r28, domain: l17, endpoints: d12, interpolation: f12, constrain: p11, addPointMode: m9, minPoints: h7, maxPoints: g6, curve: _7, fill: v4, hideNonInteractive: y4, renderAnchor: b3, width: x3, height: S3, xRange: C3, yRange: w3, grid: T3, axes: E3, history: D3, className: O3, style: k3, decorations: A3 } = e19, M3 = useMemo(() => j2({
|
|
5780
5845
|
id: "function",
|
|
5781
5846
|
domain: l17,
|
|
5782
5847
|
endpoints: d12,
|
|
5783
5848
|
interpolation: f12,
|
|
5784
|
-
constrain:
|
|
5785
|
-
addPointMode:
|
|
5786
|
-
minPoints:
|
|
5787
|
-
maxPoints:
|
|
5788
|
-
curve:
|
|
5789
|
-
fill:
|
|
5849
|
+
constrain: p11,
|
|
5850
|
+
addPointMode: m9,
|
|
5851
|
+
minPoints: h7,
|
|
5852
|
+
maxPoints: g6,
|
|
5853
|
+
curve: _7,
|
|
5854
|
+
fill: v4,
|
|
5790
5855
|
hideNonInteractive: y4,
|
|
5791
5856
|
renderAnchor: b3
|
|
5792
5857
|
}), [
|
|
5793
5858
|
l17,
|
|
5794
5859
|
d12,
|
|
5795
5860
|
f12,
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5861
|
+
p11,
|
|
5862
|
+
m9,
|
|
5863
|
+
h7,
|
|
5864
|
+
g6,
|
|
5865
|
+
_7,
|
|
5866
|
+
v4,
|
|
5802
5867
|
y4,
|
|
5803
5868
|
b3
|
|
5804
5869
|
]), [N3, F3] = useState(() => ({
|
|
@@ -5827,7 +5892,7 @@ function F2(e19) {
|
|
|
5827
5892
|
let i24 = t26.getAttribute("data-anchor-index");
|
|
5828
5893
|
if (i24 === null) return;
|
|
5829
5894
|
let a22 = Number(i24), o20 = I3.current.points;
|
|
5830
|
-
if (!Number.isInteger(a22) || a22 < 0 || a22 >= o20.length || o20[a22]?.locked || d12 !== void 0 && d12 !== "free" && (a22 === 0 || a22 === o20.length - 1) ||
|
|
5895
|
+
if (!Number.isInteger(a22) || a22 < 0 || a22 >= o20.length || o20[a22]?.locked || d12 !== void 0 && d12 !== "free" && (a22 === 0 || a22 === o20.length - 1) || h7 !== void 0 && o20.length <= h7) return;
|
|
5831
5896
|
let s18 = o20.filter((e21, t27) => t27 !== a22);
|
|
5832
5897
|
F3({
|
|
5833
5898
|
points: s18,
|
|
@@ -5835,7 +5900,7 @@ function F2(e19) {
|
|
|
5835
5900
|
}), n30(s18), r28?.(s18, o20);
|
|
5836
5901
|
}, [
|
|
5837
5902
|
d12,
|
|
5838
|
-
|
|
5903
|
+
h7,
|
|
5839
5904
|
n30,
|
|
5840
5905
|
r28
|
|
5841
5906
|
]),
|
|
@@ -5875,7 +5940,7 @@ var f11 = {
|
|
|
5875
5940
|
gap: 4,
|
|
5876
5941
|
dim: 75
|
|
5877
5942
|
};
|
|
5878
|
-
function
|
|
5943
|
+
function p10(e19) {
|
|
5879
5944
|
let { gradient: t25, samples: n30 = 16, activeRange: r28, hatch: i24 } = e19;
|
|
5880
5945
|
return (e20) => {
|
|
5881
5946
|
let a22 = [];
|
|
@@ -5916,6 +5981,6 @@ function He2(e19, t25) {
|
|
|
5916
5981
|
return e19 <= n30 ? t25.cBot : e19 >= r28 ? t25.cTop : e19 <= t25.midL ? t25.cBot + (t25.cPeak - t25.cBot) * ((e19 - n30) / (t25.midL - n30)) : t25.cPeak + (t25.cTop - t25.cPeak) * ((e19 - t25.midL) / (r28 - t25.midL));
|
|
5917
5982
|
}
|
|
5918
5983
|
|
|
5919
|
-
export { F2 as F, Ft, He2 as He, Ve2 as Ve, _,
|
|
5920
|
-
//# sourceMappingURL=chunk-
|
|
5921
|
-
//# sourceMappingURL=chunk-
|
|
5984
|
+
export { F2 as F, Ft, He2 as He, Ve2 as Ve, _, _4 as _2, a4 as a, a8 as a2, a15 as a3, c4 as c, c5 as c2, c12 as c3, c13 as c4, d4 as d, d8 as d2, e7 as e, f, f6 as f2, h4 as h, l9 as l, l10 as l2, l13 as l3, m2 as m, m7 as m2, n15 as n, n23 as n2, n26 as n3, n29 as n4, o5 as o, o6 as o2, o7 as o3, o14 as o4, o15 as o5, o17 as o6, p, p4 as p2, p6 as p3, p8 as p4, p10 as p5, qe, r10 as r, r11 as r2, r12 as r3, r13 as r4, r15 as r5, s6 as s, s7 as s2, s15 as s3, u4 as u, u5 as u2, u7 as u3, u9 as u4, u11 as u5, v2 as v };
|
|
5985
|
+
//# sourceMappingURL=chunk-C6GJKPUI.js.map
|
|
5986
|
+
//# sourceMappingURL=chunk-C6GJKPUI.js.map
|