tippa 0.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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/channel/bin.d.mts +1 -0
- package/dist/channel/bin.mjs +353 -0
- package/dist/client/index.d.ts +21 -0
- package/dist/client/index.js +8239 -0
- package/dist/execute-context-menu-action-Bbh74u99-DE1LGcxh.js +3474 -0
- package/dist/http-BcWR4_RM.mjs +159 -0
- package/dist/index.d.mts +94 -0
- package/dist/index.mjs +457 -0
- package/dist/renderer-Ym7FGQIR--GlE3v8a.js +2876 -0
- package/package.json +64 -0
|
@@ -0,0 +1,3474 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/react-grab@0.2.0_react@19.3.0/node_modules/react-grab/dist/freeze-updates-dBIOHHh-.js
|
|
2
|
+
/**
|
|
3
|
+
* @license MIT
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2025 Aiden Bai
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
let e = null;
|
|
11
|
+
const t = () => {
|
|
12
|
+
if (e !== null) return e;
|
|
13
|
+
try {
|
|
14
|
+
e = window.matchMedia(`(color-gamut: p3)`).matches;
|
|
15
|
+
} catch {
|
|
16
|
+
e = !1;
|
|
17
|
+
}
|
|
18
|
+
return e;
|
|
19
|
+
};
|
|
20
|
+
const n = t();
|
|
21
|
+
const r = (e) => n ? `color(display-p3 0.84 0.19 0.78 / ${e})` : `rgba(210, 57, 192, ${e})`;
|
|
22
|
+
const i = `0.2.0`;
|
|
23
|
+
const a = `var(--rg-panel-bg)`;
|
|
24
|
+
const o = `var(--rg-shadow)`;
|
|
25
|
+
const s = -1e3;
|
|
26
|
+
const c$1 = .95;
|
|
27
|
+
const l$1 = 1500;
|
|
28
|
+
const u$1 = [
|
|
29
|
+
`/components/ui/`,
|
|
30
|
+
`/packages/ui/`,
|
|
31
|
+
`/design-system/`,
|
|
32
|
+
`/design-systems/`,
|
|
33
|
+
`/primitives/`
|
|
34
|
+
];
|
|
35
|
+
const d$1 = 5e3;
|
|
36
|
+
const f$1 = 8e3;
|
|
37
|
+
const p$1 = 1e4;
|
|
38
|
+
const ee$1 = .5;
|
|
39
|
+
const m$1 = 2147483647;
|
|
40
|
+
const te$1 = 2147483645;
|
|
41
|
+
const ne$1 = .7;
|
|
42
|
+
const re$1 = 1e3 / 60;
|
|
43
|
+
const ae$1 = .01;
|
|
44
|
+
const oe$1 = r(.4);
|
|
45
|
+
const se$1 = r(.05);
|
|
46
|
+
const ce$1 = r(.5);
|
|
47
|
+
const le$1 = r(.08);
|
|
48
|
+
const ue$1 = r(.15);
|
|
49
|
+
const de$1 = .2;
|
|
50
|
+
const fe$1 = [
|
|
51
|
+
`id`,
|
|
52
|
+
`class`,
|
|
53
|
+
`aria-label`,
|
|
54
|
+
`data-testid`,
|
|
55
|
+
`role`,
|
|
56
|
+
`name`,
|
|
57
|
+
`title`
|
|
58
|
+
];
|
|
59
|
+
const pe$1 = /* @__PURE__ */ new Set([
|
|
60
|
+
`id`,
|
|
61
|
+
`data-testid`,
|
|
62
|
+
`aria-label`,
|
|
63
|
+
`href`,
|
|
64
|
+
`src`,
|
|
65
|
+
`alt`,
|
|
66
|
+
`type`,
|
|
67
|
+
`name`,
|
|
68
|
+
`placeholder`,
|
|
69
|
+
`role`,
|
|
70
|
+
`for`,
|
|
71
|
+
`action`,
|
|
72
|
+
`method`,
|
|
73
|
+
`title`,
|
|
74
|
+
`disabled`,
|
|
75
|
+
`checked`,
|
|
76
|
+
`readonly`,
|
|
77
|
+
`required`,
|
|
78
|
+
`selected`,
|
|
79
|
+
`open`
|
|
80
|
+
]);
|
|
81
|
+
const me$1 = /* @__PURE__ */ new Set([
|
|
82
|
+
`a`,
|
|
83
|
+
`button`,
|
|
84
|
+
`code`,
|
|
85
|
+
`label`,
|
|
86
|
+
`option`,
|
|
87
|
+
`pre`,
|
|
88
|
+
`summary`,
|
|
89
|
+
`text`
|
|
90
|
+
]);
|
|
91
|
+
const he$1 = /* @__PURE__ */ new Set([
|
|
92
|
+
`script`,
|
|
93
|
+
`style`,
|
|
94
|
+
`template`,
|
|
95
|
+
`noscript`
|
|
96
|
+
]);
|
|
97
|
+
const ge$1 = [
|
|
98
|
+
`Meta`,
|
|
99
|
+
`Control`,
|
|
100
|
+
`Shift`,
|
|
101
|
+
`Alt`
|
|
102
|
+
];
|
|
103
|
+
const _e$1 = /* @__PURE__ */ new Set([
|
|
104
|
+
`ArrowUp`,
|
|
105
|
+
`ArrowDown`,
|
|
106
|
+
`ArrowLeft`,
|
|
107
|
+
`ArrowRight`
|
|
108
|
+
]);
|
|
109
|
+
const ve$1 = `data-react-grab-frozen`;
|
|
110
|
+
const ye$1 = `data-react-grab-same-origin-frame`;
|
|
111
|
+
const Se$1 = .5;
|
|
112
|
+
const Ce$1 = `data-react-grab-input`;
|
|
113
|
+
const we$1 = .9;
|
|
114
|
+
const Te$1 = .5;
|
|
115
|
+
const Ee$1 = `copy`;
|
|
116
|
+
const De$1 = `comment`;
|
|
117
|
+
const ke$1 = `superellipse(1.25)`;
|
|
118
|
+
const je$1 = .01;
|
|
119
|
+
const Me$1 = 1e3;
|
|
120
|
+
const Ne$1 = {
|
|
121
|
+
left: -9999,
|
|
122
|
+
top: -9999
|
|
123
|
+
};
|
|
124
|
+
const Pe$1 = {
|
|
125
|
+
left: `left center`,
|
|
126
|
+
right: `right center`,
|
|
127
|
+
top: `center top`,
|
|
128
|
+
bottom: `center bottom`
|
|
129
|
+
};
|
|
130
|
+
const Fe$1 = 1e3;
|
|
131
|
+
const Ie$1 = -9999;
|
|
132
|
+
new Set(`display.position.top.right.bottom.left.z-index.overflow.overflow-x.overflow-y.width.height.min-width.min-height.max-width.max-height.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.flex-direction.flex-wrap.justify-content.align-items.align-self.align-content.flex-grow.flex-shrink.flex-basis.order.gap.row-gap.column-gap.grid-template-columns.grid-template-rows.grid-template-areas.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-align.text-decoration-line.text-decoration-style.text-transform.text-overflow.text-shadow.white-space.word-break.overflow-wrap.vertical-align.color.background-color.background-image.background-position.background-size.background-repeat.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.box-shadow.opacity.transform.filter.backdrop-filter.object-fit.object-position`.split(`.`));
|
|
133
|
+
const Re$1 = (e) => typeof e == `object` && !!e && `nodeType` in e && e.nodeType === Node.ELEMENT_NODE;
|
|
134
|
+
const h$1 = (e) => Re$1(e) && e.namespaceURI === `http://www.w3.org/1999/xhtml`;
|
|
135
|
+
const g$1 = (e) => h$1(e) && e.tagName === `IFRAME`;
|
|
136
|
+
const ze$1 = /* @__PURE__ */ new WeakMap();
|
|
137
|
+
const _$1 = (e) => {
|
|
138
|
+
let t = Number.parseFloat(e);
|
|
139
|
+
return Number.isFinite(t) ? t : 0;
|
|
140
|
+
};
|
|
141
|
+
const Be$1 = (e) => {
|
|
142
|
+
let t = performance.now(), n = ze$1.get(e);
|
|
143
|
+
if (n && t - n.timestamp < 16) return n.metrics;
|
|
144
|
+
let r = e.ownerDocument.defaultView?.getComputedStyle(e), i;
|
|
145
|
+
if (!r) i = {
|
|
146
|
+
contentOffsetX: e.clientLeft,
|
|
147
|
+
contentOffsetY: e.clientTop,
|
|
148
|
+
height: e.offsetHeight,
|
|
149
|
+
width: e.offsetWidth
|
|
150
|
+
};
|
|
151
|
+
else {
|
|
152
|
+
let t = _$1(r.borderLeftWidth), n = _$1(r.borderRightWidth), a = _$1(r.borderTopWidth), o = _$1(r.borderBottomWidth), s = _$1(r.paddingLeft), c = _$1(r.paddingRight), l = _$1(r.paddingTop), u = _$1(r.paddingBottom), d = _$1(r.width), f = _$1(r.height), p = t + n + s + c, ee = a + o + l + u, m = r.boxSizing === `border-box` ? d : d + p, te = r.boxSizing === `border-box` ? f : f + ee;
|
|
153
|
+
i = {
|
|
154
|
+
contentOffsetX: t + s,
|
|
155
|
+
contentOffsetY: a + l,
|
|
156
|
+
height: te > 0 ? te : e.offsetHeight,
|
|
157
|
+
width: m > 0 ? m : e.offsetWidth
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return ze$1.set(e, {
|
|
161
|
+
metrics: i,
|
|
162
|
+
timestamp: t
|
|
163
|
+
}), i;
|
|
164
|
+
};
|
|
165
|
+
const Ve$1 = (e, t) => t > 0 ? e / t : 1;
|
|
166
|
+
const He$1 = (e) => {
|
|
167
|
+
if (!e) return null;
|
|
168
|
+
try {
|
|
169
|
+
return e.frameElement;
|
|
170
|
+
} catch {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const Ue$1 = (e, t, n) => {
|
|
175
|
+
let r = t, i = n, a = 1, o = 1, s = e;
|
|
176
|
+
for (; s && s !== window;) {
|
|
177
|
+
let e = He$1(s);
|
|
178
|
+
if (!e || !g$1(e)) break;
|
|
179
|
+
let t = e.getBoundingClientRect(), n = Be$1(e), c = Ve$1(t.width, n.width), l = Ve$1(t.height, n.height);
|
|
180
|
+
r = t.left + (n.contentOffsetX + r) * c, i = t.top + (n.contentOffsetY + i) * l, a *= c, o *= l, s = e.ownerDocument.defaultView;
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
x: r,
|
|
184
|
+
y: i,
|
|
185
|
+
scaleX: a,
|
|
186
|
+
scaleY: o
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
const We$1 = (e) => {
|
|
190
|
+
let t = e.ownerDocument.defaultView;
|
|
191
|
+
return t ? t.getComputedStyle(e) : window.getComputedStyle(e);
|
|
192
|
+
};
|
|
193
|
+
const Ge$1 = (e, t) => e.replace(/([\d.]+)px/g, (e, n) => {
|
|
194
|
+
let r = Number(n) * Math.abs(t);
|
|
195
|
+
return `${Number(r.toFixed(3))}px`;
|
|
196
|
+
});
|
|
197
|
+
const Ke$1 = (e, t, n) => {
|
|
198
|
+
let [r, i] = e.split(`/`).map((e) => e.trim()), a = Ge$1(r, t), o = Ge$1(i ?? r, n);
|
|
199
|
+
return i === void 0 && a === o ? a : `${a} / ${o}`;
|
|
200
|
+
};
|
|
201
|
+
const qe$1 = (e) => Object.assign(e, { [Symbol.dispose]: e });
|
|
202
|
+
const Je$1 = `bippy-0.6.1`;
|
|
203
|
+
const Ye$1 = Object.defineProperty;
|
|
204
|
+
const Xe$1 = Object.prototype.hasOwnProperty;
|
|
205
|
+
const Ze$1 = () => {};
|
|
206
|
+
const Qe$1 = (e) => {
|
|
207
|
+
try {
|
|
208
|
+
Function.prototype.toString.call(e).indexOf(`^_^`) > -1 && setTimeout(() => {
|
|
209
|
+
throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`);
|
|
210
|
+
});
|
|
211
|
+
} catch {}
|
|
212
|
+
};
|
|
213
|
+
const $e$1 = (e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) => !!(e && `getFiberRoots` in e);
|
|
214
|
+
let et$1 = !1;
|
|
215
|
+
let tt$1;
|
|
216
|
+
const nt$1 = (e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) => et$1 ? !0 : (e && typeof e.inject == `function` && (tt$1 = e.inject.toString()), !!tt$1?.includes(`(injected)`));
|
|
217
|
+
const v$1 = /* @__PURE__ */ new Set();
|
|
218
|
+
const rt$1 = /* @__PURE__ */ new Set();
|
|
219
|
+
const it$1 = (e) => {
|
|
220
|
+
e && v$1.add(e);
|
|
221
|
+
let t = /* @__PURE__ */ new Map(), n = 0, r = {
|
|
222
|
+
_instrumentationIsActive: !1,
|
|
223
|
+
_instrumentationSource: Je$1,
|
|
224
|
+
checkDCE: Qe$1,
|
|
225
|
+
hasUnsupportedRendererAttached: !1,
|
|
226
|
+
inject(e) {
|
|
227
|
+
let i = ++n;
|
|
228
|
+
return t.set(i, e), rt$1.add(e), r._instrumentationIsActive || (r._instrumentationIsActive = !0, v$1.forEach((e) => e())), i;
|
|
229
|
+
},
|
|
230
|
+
on: Ze$1,
|
|
231
|
+
onCommitFiberRoot: Ze$1,
|
|
232
|
+
onCommitFiberUnmount: Ze$1,
|
|
233
|
+
onPostCommitFiberRoot: Ze$1,
|
|
234
|
+
renderers: t,
|
|
235
|
+
supportsFiber: !0,
|
|
236
|
+
supportsFlight: !0
|
|
237
|
+
};
|
|
238
|
+
try {
|
|
239
|
+
Ye$1(globalThis, `__REACT_DEVTOOLS_GLOBAL_HOOK__`, {
|
|
240
|
+
configurable: !0,
|
|
241
|
+
enumerable: !0,
|
|
242
|
+
get() {
|
|
243
|
+
return r;
|
|
244
|
+
},
|
|
245
|
+
set(t) {
|
|
246
|
+
if (t && typeof t == `object`) {
|
|
247
|
+
let n = r.renderers;
|
|
248
|
+
r = t, n.size > 0 && (n.forEach((e, n) => {
|
|
249
|
+
rt$1.add(e), t.renderers.set(n, e);
|
|
250
|
+
}), at$1(e));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
let t = window.hasOwnProperty, n = !1;
|
|
255
|
+
Ye$1(window, `hasOwnProperty`, {
|
|
256
|
+
configurable: !0,
|
|
257
|
+
value: function(...e) {
|
|
258
|
+
try {
|
|
259
|
+
if (!n && e[0] === `__REACT_DEVTOOLS_GLOBAL_HOOK__`) return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__ = void 0, n = !0, -0;
|
|
260
|
+
} catch {}
|
|
261
|
+
return t.apply(this, e);
|
|
262
|
+
},
|
|
263
|
+
writable: !0
|
|
264
|
+
});
|
|
265
|
+
} catch {
|
|
266
|
+
at$1(e);
|
|
267
|
+
}
|
|
268
|
+
return r;
|
|
269
|
+
};
|
|
270
|
+
const at$1 = (e) => {
|
|
271
|
+
e && v$1.add(e);
|
|
272
|
+
try {
|
|
273
|
+
let t = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
274
|
+
if (!t) return;
|
|
275
|
+
if (!t._instrumentationSource) {
|
|
276
|
+
t.checkDCE = Qe$1, t.supportsFiber = !0, t.supportsFlight = !0, t.hasUnsupportedRendererAttached = !1, t._instrumentationSource = Je$1, t._instrumentationIsActive = !1;
|
|
277
|
+
let e = $e$1(t);
|
|
278
|
+
if (e || (t.on = Ze$1), t.renderers.size) {
|
|
279
|
+
t._instrumentationIsActive = !0, v$1.forEach((e) => e());
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
let n = t.inject, r = nt$1(t);
|
|
283
|
+
r && !e && (et$1 = !0, t.inject({ scheduleRefresh() {} }) && (t._instrumentationIsActive = !0)), t.inject = (e) => {
|
|
284
|
+
let i = n(e);
|
|
285
|
+
return rt$1.add(e), r && t.renderers.set(i, e), t._instrumentationIsActive = !0, v$1.forEach((e) => e()), i;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
(t.renderers.size || t._instrumentationIsActive || nt$1()) && e?.();
|
|
289
|
+
} catch {}
|
|
290
|
+
};
|
|
291
|
+
const ot$1 = () => Xe$1.call(globalThis, `__REACT_DEVTOOLS_GLOBAL_HOOK__`);
|
|
292
|
+
const y$1 = (e) => ot$1() ? (at$1(e), globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) : it$1(e);
|
|
293
|
+
const st$1 = () => !!(typeof window < `u` && (window.document?.createElement || window.navigator?.product === `ReactNative`));
|
|
294
|
+
/**
|
|
295
|
+
* @license bippy
|
|
296
|
+
*
|
|
297
|
+
* Copyright (c) Aiden Bai
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the MIT license found in the
|
|
300
|
+
* LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/
|
|
302
|
+
(() => {
|
|
303
|
+
try {
|
|
304
|
+
st$1() && y$1();
|
|
305
|
+
} catch {}
|
|
306
|
+
})();
|
|
307
|
+
/**
|
|
308
|
+
* @license bippy
|
|
309
|
+
*
|
|
310
|
+
* Copyright (c) Aiden Bai
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the MIT license found in the
|
|
313
|
+
* LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/
|
|
315
|
+
const ct$1 = (e) => {
|
|
316
|
+
switch (e.tag) {
|
|
317
|
+
case 5:
|
|
318
|
+
case 26:
|
|
319
|
+
case 27: return !0;
|
|
320
|
+
default: return typeof e.type == `string`;
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
const lt$1 = (e) => {
|
|
324
|
+
switch (e.tag) {
|
|
325
|
+
case 1:
|
|
326
|
+
case 11:
|
|
327
|
+
case 0:
|
|
328
|
+
case 14:
|
|
329
|
+
case 15: return !0;
|
|
330
|
+
default: return !1;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
const ut$1 = (e) => !e || typeof e != `object` ? !1 : `pendingProps` in e && !(`containerInfo` in e);
|
|
334
|
+
const pt$1 = (e) => {
|
|
335
|
+
let t = [], n = [];
|
|
336
|
+
for (ct$1(e) ? t.push(e) : e.child && n.push(e.child); n.length;) {
|
|
337
|
+
let e = n.pop();
|
|
338
|
+
if (!e) break;
|
|
339
|
+
ct$1(e) ? t.push(e) : e.child && n.push(e.child), e.sibling && n.push(e.sibling);
|
|
340
|
+
}
|
|
341
|
+
return t;
|
|
342
|
+
};
|
|
343
|
+
function mt$1(e, t, n = !1) {
|
|
344
|
+
if (!e) return null;
|
|
345
|
+
let r = t(e);
|
|
346
|
+
if (r instanceof Promise) return (async () => {
|
|
347
|
+
if (await r === !0) return e;
|
|
348
|
+
let i = n ? e.return : e.child;
|
|
349
|
+
for (; i;) {
|
|
350
|
+
let e = await gt$1(i, t, n);
|
|
351
|
+
if (e) return e;
|
|
352
|
+
i = n ? null : i.sibling;
|
|
353
|
+
}
|
|
354
|
+
return null;
|
|
355
|
+
})();
|
|
356
|
+
if (r === !0) return e;
|
|
357
|
+
let i = n ? e.return : e.child;
|
|
358
|
+
for (; i;) {
|
|
359
|
+
let e = ht$1(i, t, n);
|
|
360
|
+
if (e) return e;
|
|
361
|
+
i = n ? null : i.sibling;
|
|
362
|
+
}
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
const ht$1 = (e, t, n = !1) => {
|
|
366
|
+
if (!e) return null;
|
|
367
|
+
if (t(e) === !0) return e;
|
|
368
|
+
let r = n ? e.return : e.child;
|
|
369
|
+
for (; r;) {
|
|
370
|
+
let e = ht$1(r, t, n);
|
|
371
|
+
if (e) return e;
|
|
372
|
+
r = n ? null : r.sibling;
|
|
373
|
+
}
|
|
374
|
+
return null;
|
|
375
|
+
};
|
|
376
|
+
const gt$1 = async (e, t, n = !1) => {
|
|
377
|
+
if (!e) return null;
|
|
378
|
+
if (await t(e) === !0) return e;
|
|
379
|
+
let r = n ? e.return : e.child;
|
|
380
|
+
for (; r;) {
|
|
381
|
+
let e = await gt$1(r, t, n);
|
|
382
|
+
if (e) return e;
|
|
383
|
+
r = n ? null : r.sibling;
|
|
384
|
+
}
|
|
385
|
+
return null;
|
|
386
|
+
};
|
|
387
|
+
const _t$1 = (e) => {
|
|
388
|
+
let t = e;
|
|
389
|
+
return typeof t == `function` ? t : typeof t == `object` && t ? _t$1(t.type || t.render) : null;
|
|
390
|
+
};
|
|
391
|
+
const vt$1 = (e) => {
|
|
392
|
+
let t = e;
|
|
393
|
+
if (typeof t == `string`) return t;
|
|
394
|
+
if (typeof t != `function` && !(typeof t == `object` && t)) return null;
|
|
395
|
+
let n = t.displayName || t.name || null;
|
|
396
|
+
if (n) return n;
|
|
397
|
+
let r = _t$1(t);
|
|
398
|
+
return r && (r.displayName || r.name) || null;
|
|
399
|
+
};
|
|
400
|
+
const yt$1 = () => {
|
|
401
|
+
let e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
402
|
+
return !!e?._instrumentationIsActive || $e$1(e) || nt$1(e);
|
|
403
|
+
};
|
|
404
|
+
const bt$1 = /* @__PURE__ */ new Set();
|
|
405
|
+
const xt$1 = (e) => {
|
|
406
|
+
let t = e.alternate;
|
|
407
|
+
if (!t) return e;
|
|
408
|
+
if (t.actualStartTime && e.actualStartTime) return t.actualStartTime > e.actualStartTime ? t : e;
|
|
409
|
+
for (let t of bt$1) {
|
|
410
|
+
let n = mt$1(t.current, (t) => {
|
|
411
|
+
if (t === e) return !0;
|
|
412
|
+
});
|
|
413
|
+
if (n) return n;
|
|
414
|
+
}
|
|
415
|
+
return e;
|
|
416
|
+
};
|
|
417
|
+
const Ot = (e) => {
|
|
418
|
+
if (!ot$1()) return null;
|
|
419
|
+
let t = e;
|
|
420
|
+
for (; t.return;) t = t.return;
|
|
421
|
+
let n = Ft.get(t.stateNode);
|
|
422
|
+
return n === void 0 ? null : y$1().renderers?.get(n) ?? null;
|
|
423
|
+
};
|
|
424
|
+
const jt = /* @__PURE__ */ new Set();
|
|
425
|
+
const Mt = /* @__PURE__ */ new Set();
|
|
426
|
+
const Nt = /* @__PURE__ */ new Set();
|
|
427
|
+
const Pt = /* @__PURE__ */ new Set();
|
|
428
|
+
const S$1 = /* @__PURE__ */ new WeakMap();
|
|
429
|
+
const Ft = /* @__PURE__ */ new WeakMap();
|
|
430
|
+
const It = (e) => {
|
|
431
|
+
let t = S$1.get(e) ?? {};
|
|
432
|
+
if (S$1.set(e, t), !t.onCommitFiberRoot || e.onCommitFiberRoot !== t.onCommitFiberRoot) {
|
|
433
|
+
let n = e.onCommitFiberRoot, r = (t, i, a) => {
|
|
434
|
+
if (n?.(t, i, a), S$1.get(e)?.onCommitFiberRoot === r) {
|
|
435
|
+
bt$1.add(i), Ft.set(i, t);
|
|
436
|
+
for (let e of jt) e(t, i, a);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
t.onCommitFiberRoot = r, e.onCommitFiberRoot = r;
|
|
440
|
+
}
|
|
441
|
+
if (!t.onCommitFiberUnmount || e.onCommitFiberUnmount !== t.onCommitFiberUnmount) {
|
|
442
|
+
let n = e.onCommitFiberUnmount, r = (t, i) => {
|
|
443
|
+
if (n?.(t, i), S$1.get(e)?.onCommitFiberUnmount === r) for (let e of Mt) e(t, i);
|
|
444
|
+
};
|
|
445
|
+
t.onCommitFiberUnmount = r, e.onCommitFiberUnmount = r;
|
|
446
|
+
}
|
|
447
|
+
if (!t.onPostCommitFiberRoot || e.onPostCommitFiberRoot !== t.onPostCommitFiberRoot) {
|
|
448
|
+
let n = e.onPostCommitFiberRoot, r = (t, i) => {
|
|
449
|
+
if (n?.(t, i), S$1.get(e)?.onPostCommitFiberRoot === r) for (let e of Nt) e(t, i);
|
|
450
|
+
};
|
|
451
|
+
t.onPostCommitFiberRoot = r, e.onPostCommitFiberRoot = r;
|
|
452
|
+
}
|
|
453
|
+
if (!t.onScheduleFiberRoot || e.onScheduleFiberRoot !== t.onScheduleFiberRoot) {
|
|
454
|
+
let n = e.onScheduleFiberRoot, r = (t, i, a) => {
|
|
455
|
+
if (n?.(t, i, a), S$1.get(e)?.onScheduleFiberRoot === r) for (let e of Pt) e(t, i, a);
|
|
456
|
+
};
|
|
457
|
+
t.onScheduleFiberRoot = r, e.onScheduleFiberRoot = r;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
const Lt = (e) => {
|
|
461
|
+
let t = y$1(e.onActive);
|
|
462
|
+
t._instrumentationSource = e.name ?? Je$1, It(t);
|
|
463
|
+
let { onActive: n, onCommitFiberRoot: r, onCommitFiberUnmount: i, onPostCommitFiberRoot: a, onScheduleFiberRoot: o } = e;
|
|
464
|
+
return r && jt.add(r), i && Mt.add(i), a && Nt.add(a), o && Pt.add(o), qe$1(() => {
|
|
465
|
+
n && v$1.delete(n), r && jt.delete(r), i && Mt.delete(i), a && Nt.delete(a), o && Pt.delete(o);
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
const Rt = /* @__PURE__ */ new Set();
|
|
469
|
+
const zt = (e) => e.startsWith(`__reactContainer$`) || e.startsWith(`__reactInternalInstance$`) || e.startsWith(`__reactFiber`);
|
|
470
|
+
const Bt = (e) => {
|
|
471
|
+
let t = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
472
|
+
if (t?.renderers) for (let n of t.renderers.values()) try {
|
|
473
|
+
let t = n.findFiberByHostInstance?.(e);
|
|
474
|
+
if (t) return t;
|
|
475
|
+
} catch {}
|
|
476
|
+
if (typeof e == `object` && e) {
|
|
477
|
+
if (`_reactRootContainer` in e) return e._reactRootContainer?._internalRoot?.current?.child;
|
|
478
|
+
let t = e.__internalInstanceHandle ?? e._internalInstanceHandle;
|
|
479
|
+
if (ut$1(t)) return t;
|
|
480
|
+
let n = e;
|
|
481
|
+
for (let e of Rt) {
|
|
482
|
+
let t = n[e];
|
|
483
|
+
if (t) return t;
|
|
484
|
+
}
|
|
485
|
+
for (let e of Object.keys(n)) if (zt(e)) return Rt.add(e), n[e] || null;
|
|
486
|
+
for (let t of bt$1) {
|
|
487
|
+
if (Ot(t.current)?.findFiberByHostInstance) continue;
|
|
488
|
+
let n = mt$1(t.current, (t) => t.stateNode === e);
|
|
489
|
+
if (n) return n;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return null;
|
|
493
|
+
};
|
|
494
|
+
const Vt = /* @__PURE__ */ new WeakMap();
|
|
495
|
+
const Ht = (e, t) => {
|
|
496
|
+
Vt.set(e, t);
|
|
497
|
+
};
|
|
498
|
+
const C$1 = (e) => Vt.get(e) ?? null;
|
|
499
|
+
const Ut = (e) => C$1(e)?.getFiber() ?? Bt(e);
|
|
500
|
+
let Wt = /* @__PURE__ */ new WeakMap();
|
|
501
|
+
let Gt = /* @__PURE__ */ new WeakMap();
|
|
502
|
+
const Kt = () => {
|
|
503
|
+
Wt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap();
|
|
504
|
+
};
|
|
505
|
+
const qt = (e, t, n) => {
|
|
506
|
+
let r = Gt.get(e);
|
|
507
|
+
if (r && n - r.timestamp < 200) return r.borderRadius;
|
|
508
|
+
let i = (t ?? We$1(e)).borderRadius || `0px`;
|
|
509
|
+
return Gt.set(e, {
|
|
510
|
+
borderRadius: i,
|
|
511
|
+
timestamp: n
|
|
512
|
+
}), i;
|
|
513
|
+
};
|
|
514
|
+
const Jt = (e) => {
|
|
515
|
+
let t = performance.now(), n = Wt.get(e);
|
|
516
|
+
if (n && t - n.timestamp < 16) return n.bounds;
|
|
517
|
+
let r = C$1(e);
|
|
518
|
+
if (r) {
|
|
519
|
+
let n = r.getBounds();
|
|
520
|
+
return Wt.set(e, {
|
|
521
|
+
bounds: n,
|
|
522
|
+
timestamp: t
|
|
523
|
+
}), n;
|
|
524
|
+
}
|
|
525
|
+
let i = e.getBoundingClientRect(), a = Ue$1(e.ownerDocument.defaultView, i.left, i.top), o = {
|
|
526
|
+
borderRadius: Ke$1(qt(e, null, t), a.scaleX, a.scaleY),
|
|
527
|
+
height: i.height * a.scaleY,
|
|
528
|
+
width: i.width * a.scaleX,
|
|
529
|
+
x: a.x,
|
|
530
|
+
y: a.y
|
|
531
|
+
};
|
|
532
|
+
return Wt.set(e, {
|
|
533
|
+
bounds: o,
|
|
534
|
+
timestamp: t
|
|
535
|
+
}), o;
|
|
536
|
+
};
|
|
537
|
+
const Yt = (e) => {
|
|
538
|
+
let t = e.ownerDocument?.defaultView;
|
|
539
|
+
return !!(t && e instanceof t.ShadowRoot);
|
|
540
|
+
};
|
|
541
|
+
var w$1 = class extends Error {
|
|
542
|
+
constructor(e, t) {
|
|
543
|
+
super(e, t), this.name = `ReactGrabError`;
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
var T$1 = class extends w$1 {
|
|
547
|
+
constructor(e, t) {
|
|
548
|
+
super(e, { cause: t }), this.name = `RecoverableError`;
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
var Zt = class extends T$1 {
|
|
552
|
+
constructor(e, t, n) {
|
|
553
|
+
super(`Failed to open source file "${e}"`, n), this.name = `OpenFileError`, this.filePath = e, this.lineNumber = t;
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
var Qt = class extends T$1 {
|
|
557
|
+
constructor(e, t, n) {
|
|
558
|
+
super(`Plugin hook "${t}" failed for "${e}"`, n), this.name = `PluginHookError`, this.pluginName = e, this.hookName = t;
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
var $t = class extends T$1 {
|
|
562
|
+
constructor(e, t) {
|
|
563
|
+
super(`Plugin cleanup failed for "${e}"`, t), this.name = `PluginCleanupError`, this.pluginName = e;
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
var en = class extends T$1 {
|
|
567
|
+
constructor(e, t) {
|
|
568
|
+
super(`Plugin setup failed for "${e}"`, t), this.name = `PluginSetupError`, this.pluginName = e;
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
var tn = class extends T$1 {
|
|
572
|
+
constructor(e, t) {
|
|
573
|
+
super(`Action "${e}" failed`, t), this.name = `ContextMenuActionError`, this.actionId = e;
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
var nn = class extends T$1 {
|
|
577
|
+
constructor(e, t) {
|
|
578
|
+
super(`Action "${e}" enabled check failed`, t), this.name = `ContextMenuActionEnabledError`, this.actionId = e;
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
var rn = class extends w$1 {
|
|
582
|
+
constructor() {
|
|
583
|
+
super(`Can't generate CSS selector for non-element node type.`), this.name = `NonElementNodeError`;
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
var an = class extends w$1 {
|
|
587
|
+
constructor(e) {
|
|
588
|
+
super(`Timeout: Can't find a unique selector after ${e}ms`), this.name = `SelectorTimeoutError`, this.timeoutMs = e;
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
var on = class extends w$1 {
|
|
592
|
+
constructor() {
|
|
593
|
+
super(`Selector was not found.`), this.name = `SelectorNotFoundError`;
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
var sn = class extends w$1 {
|
|
597
|
+
constructor() {
|
|
598
|
+
super(`Failed to copy`), this.name = `CopyFailedError`;
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
const cn = (e) => C$1(e)?.getTagName() ?? (e.tagName || ``).toLowerCase();
|
|
602
|
+
const ln = /* @__PURE__ */ new WeakMap();
|
|
603
|
+
const un = (e = document) => {
|
|
604
|
+
let t = ln.get(e);
|
|
605
|
+
if (t !== void 0) return t;
|
|
606
|
+
let n = e.querySelector(`script[nonce], style[nonce]`), r = n?.nonce || n?.getAttribute(`nonce`) || null;
|
|
607
|
+
return r && ln.set(e, r), r;
|
|
608
|
+
};
|
|
609
|
+
const dn = [
|
|
610
|
+
[`data-rr-block`, ``],
|
|
611
|
+
[`data-rr-ignore`, ``],
|
|
612
|
+
[`data-rr-mask`, ``],
|
|
613
|
+
[`data-sentry-block`, ``],
|
|
614
|
+
[`data-sentry-ignore`, ``],
|
|
615
|
+
[`data-sentry-mask`, ``],
|
|
616
|
+
[`data-dd-privacy`, `hidden`],
|
|
617
|
+
[`data-fs-exclude`, ``],
|
|
618
|
+
[`data-lr-exclude`, ``],
|
|
619
|
+
[`data-hj-suppress`, ``],
|
|
620
|
+
[`data-recording-disable`, ``],
|
|
621
|
+
[`data-clarity-mask`, `true`],
|
|
622
|
+
[`data-heap-redact-text`, ``]
|
|
623
|
+
];
|
|
624
|
+
const fn = (e) => {
|
|
625
|
+
for (let [t, n] of dn) e.setAttribute(t, n);
|
|
626
|
+
e.setAttribute(`data-testid`, `react-grab-overlay`), e.classList.add(`ph-no-capture`);
|
|
627
|
+
};
|
|
628
|
+
const pn = (e) => typeof e == `object` && !!e && `nodeType` in e && e.nodeType === 9;
|
|
629
|
+
const E$1 = (e) => {
|
|
630
|
+
if (e.assignedSlot) return e.assignedSlot;
|
|
631
|
+
if (e.parentElement) return e.parentElement;
|
|
632
|
+
let t = e.getRootNode();
|
|
633
|
+
return Yt(t) ? t.host : pn(t) ? He$1(t.defaultView) : null;
|
|
634
|
+
};
|
|
635
|
+
const mn = (e, t) => {
|
|
636
|
+
let n = C$1(e)?.hostElement ?? e;
|
|
637
|
+
for (; n;) {
|
|
638
|
+
if (n === t) return !0;
|
|
639
|
+
n = E$1(n);
|
|
640
|
+
}
|
|
641
|
+
return !1;
|
|
642
|
+
};
|
|
643
|
+
let hn = null;
|
|
644
|
+
const gn = (e) => {
|
|
645
|
+
hn = e;
|
|
646
|
+
};
|
|
647
|
+
const _n = () => hn;
|
|
648
|
+
const D$1 = (e) => hn ? e ? mn(e, hn) : !1 : !0;
|
|
649
|
+
const vn = (e) => e;
|
|
650
|
+
const yn = typeof window < `u`;
|
|
651
|
+
const bn = (e) => 0;
|
|
652
|
+
const xn = (e) => {};
|
|
653
|
+
const Sn = yn ? (Object.getOwnPropertyDescriptor(Window.prototype, `requestAnimationFrame`)?.value ?? window.requestAnimationFrame).bind(window) : bn;
|
|
654
|
+
const Cn = yn ? (Object.getOwnPropertyDescriptor(Window.prototype, `cancelAnimationFrame`)?.value ?? window.cancelAnimationFrame).bind(window) : xn;
|
|
655
|
+
const wn = () => yn ? new Promise((e) => Sn(() => e())) : Promise.resolve();
|
|
656
|
+
const O$1 = (e) => {
|
|
657
|
+
try {
|
|
658
|
+
return e.contentDocument;
|
|
659
|
+
} catch {
|
|
660
|
+
return null;
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
const Tn = (e, t, n) => {
|
|
664
|
+
let r = e.getBoundingClientRect(), i = Be$1(e), a = Ve$1(r.width, i.width), o = Ve$1(r.height, i.height);
|
|
665
|
+
return {
|
|
666
|
+
x: (t - r.left) / a - i.contentOffsetX,
|
|
667
|
+
y: (n - r.top) / o - i.contentOffsetY
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
const En = (e, t, n) => {
|
|
671
|
+
let r = e.elementFromPoint(t, n);
|
|
672
|
+
for (; r;) {
|
|
673
|
+
let e = r.shadowRoot?.elementFromPoint(t, n);
|
|
674
|
+
if (e && e !== r) {
|
|
675
|
+
r = e;
|
|
676
|
+
continue;
|
|
677
|
+
}
|
|
678
|
+
if (g$1(r)) {
|
|
679
|
+
let e = O$1(r);
|
|
680
|
+
if (!e) return r;
|
|
681
|
+
let i = Tn(r, t, n);
|
|
682
|
+
return En(e, i.x, i.y) ?? r;
|
|
683
|
+
}
|
|
684
|
+
return r;
|
|
685
|
+
}
|
|
686
|
+
return null;
|
|
687
|
+
};
|
|
688
|
+
const Dn = (e, t) => En(document, e, t);
|
|
689
|
+
const On = (e) => {
|
|
690
|
+
let t = e;
|
|
691
|
+
for (; t;) {
|
|
692
|
+
if (t.hasAttribute(`data-react-grab-ignore`)) return !0;
|
|
693
|
+
t = E$1(t);
|
|
694
|
+
}
|
|
695
|
+
return !1;
|
|
696
|
+
};
|
|
697
|
+
const kn = typeof Element < `u` && typeof Element.prototype.checkVisibility == `function`;
|
|
698
|
+
const An = {
|
|
699
|
+
checkOpacity: !0,
|
|
700
|
+
checkVisibilityCSS: !0,
|
|
701
|
+
opacityProperty: !0,
|
|
702
|
+
visibilityProperty: !0
|
|
703
|
+
};
|
|
704
|
+
const jn = {
|
|
705
|
+
checkVisibilityCSS: !0,
|
|
706
|
+
visibilityProperty: !0
|
|
707
|
+
};
|
|
708
|
+
const Mn = (e, t) => {
|
|
709
|
+
if (kn && !t) return e.checkVisibility(An) ? !0 : e.checkVisibility(jn) ? We$1(e).opacity !== `0` : !1;
|
|
710
|
+
let n = t ?? We$1(e);
|
|
711
|
+
return n.display !== `none` && n.visibility !== `hidden` && n.opacity !== `0`;
|
|
712
|
+
};
|
|
713
|
+
const Nn = (e) => {
|
|
714
|
+
let t = cn(e);
|
|
715
|
+
return t === `html` || t === `body`;
|
|
716
|
+
};
|
|
717
|
+
const Pn = [`data-react-grab`, `data-react-grab-demo`];
|
|
718
|
+
const Fn = (e) => Pn.some((t) => e.hasAttribute(t));
|
|
719
|
+
const In = (e) => {
|
|
720
|
+
if (Fn(e)) return !0;
|
|
721
|
+
let t = e.getRootNode();
|
|
722
|
+
return Yt(t) && Fn(t.host);
|
|
723
|
+
};
|
|
724
|
+
const Ln = (e) => {
|
|
725
|
+
let t = parseInt(e.zIndex, 10);
|
|
726
|
+
return e.pointerEvents === `none` && e.position === `fixed` && !isNaN(t) && t >= 2147483600;
|
|
727
|
+
};
|
|
728
|
+
const Rn = (e) => {
|
|
729
|
+
let t = e.backgroundColor;
|
|
730
|
+
return t === `transparent` || t === `rgba(0, 0, 0, 0)`;
|
|
731
|
+
};
|
|
732
|
+
const zn = (e) => {
|
|
733
|
+
let t = e.position;
|
|
734
|
+
if (t !== `fixed` && t !== `absolute`) return !1;
|
|
735
|
+
if (Rn(e) || parseFloat(e.opacity) < .1) return !0;
|
|
736
|
+
let n = parseInt(e.zIndex, 10);
|
|
737
|
+
return !isNaN(n) && n > 1e3;
|
|
738
|
+
};
|
|
739
|
+
let Bn = /* @__PURE__ */ new WeakMap();
|
|
740
|
+
const Vn = () => {
|
|
741
|
+
Bn = /* @__PURE__ */ new WeakMap();
|
|
742
|
+
};
|
|
743
|
+
const Hn = (e) => {
|
|
744
|
+
let t = C$1(e);
|
|
745
|
+
if (t) return t.isConnected();
|
|
746
|
+
if (Nn(e) || In(e) || On(e)) return !1;
|
|
747
|
+
let n = performance.now(), r = Bn.get(e);
|
|
748
|
+
if (r && n - r.timestamp < 50) return r.isVisible;
|
|
749
|
+
if (!Mn(e)) return Bn.set(e, {
|
|
750
|
+
isVisible: !1,
|
|
751
|
+
timestamp: n
|
|
752
|
+
}), !1;
|
|
753
|
+
if (e.clientWidth / (e.ownerDocument.defaultView?.innerWidth ?? window.innerWidth) >= .9 && e.clientHeight / (e.ownerDocument.defaultView?.innerHeight ?? window.innerHeight) >= .9) {
|
|
754
|
+
let t = We$1(e);
|
|
755
|
+
if (Ln(t) || zn(t)) return !1;
|
|
756
|
+
}
|
|
757
|
+
return Bn.set(e, {
|
|
758
|
+
isVisible: !0,
|
|
759
|
+
timestamp: n
|
|
760
|
+
}), !0;
|
|
761
|
+
};
|
|
762
|
+
const Un = (e) => {
|
|
763
|
+
if (e === `transparent`) return !0;
|
|
764
|
+
let t = e.lastIndexOf(`/`);
|
|
765
|
+
if (t >= 0) return Number.parseFloat(e.slice(t + 1)) === 0;
|
|
766
|
+
if (!e.startsWith(`rgba(`)) return !1;
|
|
767
|
+
let n = e.lastIndexOf(`,`);
|
|
768
|
+
return n >= 0 && Number.parseFloat(e.slice(n + 1)) === 0;
|
|
769
|
+
};
|
|
770
|
+
const Wn = (e) => {
|
|
771
|
+
let t = e.ownerDocument.defaultView?.getComputedStyle?.(e);
|
|
772
|
+
if (!t) return !1;
|
|
773
|
+
let n = t.backgroundClip !== `text` && (t.backgroundImage !== `none` || !Un(t.backgroundColor)), r = t.borderTopStyle !== `none` && t.borderTopWidth !== `0px` || t.borderRightStyle !== `none` && t.borderRightWidth !== `0px` || t.borderBottomStyle !== `none` && t.borderBottomWidth !== `0px` || t.borderLeftStyle !== `none` && t.borderLeftWidth !== `0px`;
|
|
774
|
+
return n || r || t.boxShadow !== `none` || t.outlineStyle !== `none`;
|
|
775
|
+
};
|
|
776
|
+
const Gn = /* @__PURE__ */ new Set([
|
|
777
|
+
`A`,
|
|
778
|
+
`AUDIO`,
|
|
779
|
+
`BUTTON`,
|
|
780
|
+
`CANVAS`,
|
|
781
|
+
`DETAILS`,
|
|
782
|
+
`EMBED`,
|
|
783
|
+
`IFRAME`,
|
|
784
|
+
`IMG`,
|
|
785
|
+
`INPUT`,
|
|
786
|
+
`METER`,
|
|
787
|
+
`OBJECT`,
|
|
788
|
+
`OPTION`,
|
|
789
|
+
`PROGRESS`,
|
|
790
|
+
`SELECT`,
|
|
791
|
+
`SUMMARY`,
|
|
792
|
+
`SVG`,
|
|
793
|
+
`TEXTAREA`,
|
|
794
|
+
`VIDEO`
|
|
795
|
+
]);
|
|
796
|
+
const Kn = /* @__PURE__ */ new Set([
|
|
797
|
+
`button`,
|
|
798
|
+
`checkbox`,
|
|
799
|
+
`combobox`,
|
|
800
|
+
`gridcell`,
|
|
801
|
+
`link`,
|
|
802
|
+
`listbox`,
|
|
803
|
+
`menuitem`,
|
|
804
|
+
`menuitemcheckbox`,
|
|
805
|
+
`menuitemradio`,
|
|
806
|
+
`option`,
|
|
807
|
+
`radio`,
|
|
808
|
+
`scrollbar`,
|
|
809
|
+
`searchbox`,
|
|
810
|
+
`slider`,
|
|
811
|
+
`spinbutton`,
|
|
812
|
+
`switch`,
|
|
813
|
+
`tab`,
|
|
814
|
+
`textbox`,
|
|
815
|
+
`treeitem`
|
|
816
|
+
]);
|
|
817
|
+
const qn = new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DEL.DFN.EM.I.INS.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`));
|
|
818
|
+
let Jn = /* @__PURE__ */ new WeakMap();
|
|
819
|
+
let Yn = /* @__PURE__ */ new WeakMap();
|
|
820
|
+
const Xn = () => {
|
|
821
|
+
Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap();
|
|
822
|
+
};
|
|
823
|
+
const k$1 = (e, t, n) => (Jn.set(e, t), Yn.set(e, n), t);
|
|
824
|
+
const Zn = (e) => Gn.has(e.tagName) || Kn.has(e.getAttribute(`role`) ?? ``) || h$1(e) && e.isContentEditable;
|
|
825
|
+
const Qn = (e) => {
|
|
826
|
+
let t = performance.now(), n = Yn.get(e);
|
|
827
|
+
if (n !== void 0 && t - n < 16) return Jn.get(e) ?? null;
|
|
828
|
+
if (Zn(e) || e.childNodes.length > 64) return k$1(e, null, t);
|
|
829
|
+
let r = [], i = [], a = 0;
|
|
830
|
+
for (let t = e.childNodes.length - 1; t >= 0; --t) i.push(e.childNodes[t]);
|
|
831
|
+
for (; i.length > 0;) {
|
|
832
|
+
if (a += 1, a > 64) return k$1(e, null, t);
|
|
833
|
+
let n = i.pop();
|
|
834
|
+
if (n) {
|
|
835
|
+
if (n.nodeType === Node.TEXT_NODE) {
|
|
836
|
+
if (n.textContent?.trim() && (r.push(n), r.length > 32)) return k$1(e, null, t);
|
|
837
|
+
continue;
|
|
838
|
+
}
|
|
839
|
+
if (!Re$1(n) || !qn.has(n.tagName) || a + i.length + n.childNodes.length > 64) return k$1(e, null, t);
|
|
840
|
+
for (let e = n.childNodes.length - 1; e >= 0; --e) i.push(n.childNodes[e]);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
if (r.length === 0 || Wn(e)) return k$1(e, null, t);
|
|
844
|
+
try {
|
|
845
|
+
let n = e.ownerDocument.createRange(), i = Ue$1(e.ownerDocument.defaultView, 0, 0), a = [];
|
|
846
|
+
for (let o of r) {
|
|
847
|
+
n.selectNodeContents(o);
|
|
848
|
+
let r = n.getClientRects();
|
|
849
|
+
if (a.length + r.length > 64) return k$1(e, null, t);
|
|
850
|
+
for (let e = 0; e < r.length; e += 1) {
|
|
851
|
+
let t = r[e], n = t.width * i.scaleX, o = t.height * i.scaleY;
|
|
852
|
+
!Number.isFinite(t.left) || !Number.isFinite(t.top) || !Number.isFinite(n) || !Number.isFinite(o) || n <= 0 || o <= 0 || a.push({
|
|
853
|
+
borderRadius: `0px`,
|
|
854
|
+
height: o,
|
|
855
|
+
width: n,
|
|
856
|
+
x: i.x + t.left * i.scaleX,
|
|
857
|
+
y: i.y + t.top * i.scaleY
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
return k$1(e, a.length > 0 ? a : null, t);
|
|
862
|
+
} catch {
|
|
863
|
+
return k$1(e, null, t);
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
const $n = (e, t, n) => {
|
|
867
|
+
let r = Qn(e);
|
|
868
|
+
if (!r) return !0;
|
|
869
|
+
for (let e of r) if (t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height) return !0;
|
|
870
|
+
return !1;
|
|
871
|
+
};
|
|
872
|
+
const er = (e, t, n, r, i) => {
|
|
873
|
+
let a = !0;
|
|
874
|
+
for (let o of e.elementsFromPoint(t, n)) {
|
|
875
|
+
if (On(o) && (a = !1), !D$1(o)) continue;
|
|
876
|
+
let s = o.shadowRoot;
|
|
877
|
+
if (a && s && s !== e) {
|
|
878
|
+
let e = er(s, t, n, r, i);
|
|
879
|
+
if (e) return e;
|
|
880
|
+
}
|
|
881
|
+
if (a && g$1(o)) {
|
|
882
|
+
let e = O$1(o);
|
|
883
|
+
if (e) {
|
|
884
|
+
let a = Tn(o, t, n), s = er(e, a.x, a.y, r, i);
|
|
885
|
+
if (s) return s;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
if (Hn(o) && $n(o, r, i)) return o;
|
|
889
|
+
}
|
|
890
|
+
return null;
|
|
891
|
+
};
|
|
892
|
+
const tr = (e, t) => er(document, e, t, e, t);
|
|
893
|
+
const nr = (e, t, n, r) => {
|
|
894
|
+
let i = e.elementsFromPoint(t, n), a = !0;
|
|
895
|
+
for (let o of i) {
|
|
896
|
+
if (On(o) && (a = !1), a && o.shadowRoot && o.shadowRoot !== e && nr(o.shadowRoot, t, n, r), a && g$1(o)) {
|
|
897
|
+
let e = O$1(o);
|
|
898
|
+
if (e) {
|
|
899
|
+
let i = Tn(o, t, n);
|
|
900
|
+
nr(e, i.x, i.y, r);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
r.add(o);
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
const rr = (e, t) => {
|
|
907
|
+
let n = /* @__PURE__ */ new Set();
|
|
908
|
+
return nr(document, e, t, n), [...n];
|
|
909
|
+
};
|
|
910
|
+
const ir = (e, t, n) => {
|
|
911
|
+
let r = [], i = e;
|
|
912
|
+
for (; i && i !== window;) {
|
|
913
|
+
let e = He$1(i);
|
|
914
|
+
if (!e || !g$1(e)) break;
|
|
915
|
+
r.push(e), i = e.ownerDocument.defaultView;
|
|
916
|
+
}
|
|
917
|
+
let a = t, o = n;
|
|
918
|
+
for (let e = r.length - 1; e >= 0; --e) {
|
|
919
|
+
let t = Tn(r[e], a, o);
|
|
920
|
+
a = t.x, o = t.y;
|
|
921
|
+
}
|
|
922
|
+
return {
|
|
923
|
+
x: a,
|
|
924
|
+
y: o
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
const ar = `http://www.w3.org/2000/svg`;
|
|
928
|
+
const or = (e) => {
|
|
929
|
+
if (e.localName === `svg`) return e;
|
|
930
|
+
let t = e, n = e.parentElement;
|
|
931
|
+
for (; n?.namespaceURI === ar && (t = n, n.localName !== `svg`);) n = n.parentElement;
|
|
932
|
+
return t;
|
|
933
|
+
};
|
|
934
|
+
const sr = (e, t, n, r) => {
|
|
935
|
+
if (typeof e.caretPositionFromPoint == `function`) {
|
|
936
|
+
let i = e.caretPositionFromPoint(t, n, { shadowRoots: r ? [r] : [] });
|
|
937
|
+
if (i) return i.offsetNode;
|
|
938
|
+
}
|
|
939
|
+
return typeof e.caretRangeFromPoint == `function` ? e.caretRangeFromPoint(t, n)?.startContainer ?? null : null;
|
|
940
|
+
};
|
|
941
|
+
const cr = (e, t, n) => {
|
|
942
|
+
if (Nn(e)) return null;
|
|
943
|
+
let r = e.ownerDocument, i = r.defaultView;
|
|
944
|
+
if (!i) return null;
|
|
945
|
+
let a = ir(i, t, n), o = e.getRootNode(), s = sr(r, a.x, a.y, Yt(o) ? o : null);
|
|
946
|
+
if (!s) return null;
|
|
947
|
+
let c = Re$1(s) ? s : s.parentElement;
|
|
948
|
+
if (!c || c === e) return null;
|
|
949
|
+
let l = e.namespaceURI === ar;
|
|
950
|
+
return !(l ? or(e) : e).contains(c) || !l && We$1(c).pointerEvents !== `none` ? null : c;
|
|
951
|
+
};
|
|
952
|
+
const lr = (e, t, n) => e >= n.left && e <= n.right && t >= n.top && t <= n.bottom;
|
|
953
|
+
const ur = (e, t, n = document) => {
|
|
954
|
+
let r = n.createElement(`style`);
|
|
955
|
+
r.setAttribute(e, ``);
|
|
956
|
+
let i = un(n);
|
|
957
|
+
return i && (r.nonce = i), fn(r), r.textContent = t, n.head.appendChild(r), r;
|
|
958
|
+
};
|
|
959
|
+
const dr = `html { pointer-events: none !important; }
|
|
960
|
+
iframe[${ye$1}] { pointer-events: auto !important; }`;
|
|
961
|
+
const fr = /* @__PURE__ */ new Set();
|
|
962
|
+
const A$1 = /* @__PURE__ */ new Map();
|
|
963
|
+
let j$1 = !1;
|
|
964
|
+
const pr = (e) => {
|
|
965
|
+
if (A$1.has(e)) return;
|
|
966
|
+
let t = ur(`data-react-grab-frozen-pseudo`, dr, e), n = ur(`data-react-grab-hittest-override`, `html, body { pointer-events: auto !important; }`, e);
|
|
967
|
+
n.disabled = !0, A$1.set(e, {
|
|
968
|
+
pointerEventsStyle: t,
|
|
969
|
+
hitTestOverrideStyle: n
|
|
970
|
+
});
|
|
971
|
+
};
|
|
972
|
+
const mr = (e) => {
|
|
973
|
+
let t = A$1.get(e);
|
|
974
|
+
t && (t.pointerEventsStyle.remove(), t.hitTestOverrideStyle.remove(), A$1.delete(e));
|
|
975
|
+
};
|
|
976
|
+
const hr = () => j$1;
|
|
977
|
+
const gr = (e) => (fr.add(e), j$1 && pr(e), () => {
|
|
978
|
+
fr.delete(e), mr(e);
|
|
979
|
+
});
|
|
980
|
+
const _r = () => {
|
|
981
|
+
if (!j$1) {
|
|
982
|
+
j$1 = !0, fr.add(document);
|
|
983
|
+
for (let e of fr) pr(e);
|
|
984
|
+
}
|
|
985
|
+
};
|
|
986
|
+
const vr = () => {
|
|
987
|
+
if (j$1) {
|
|
988
|
+
j$1 = !1;
|
|
989
|
+
for (let e of [...A$1.keys()]) mr(e);
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
const yr = () => {
|
|
993
|
+
if (j$1) for (let e of A$1.values()) e.pointerEventsStyle.disabled || (e.pointerEventsStyle.disabled = !0), e.hitTestOverrideStyle.disabled && (e.hitTestOverrideStyle.disabled = !1);
|
|
994
|
+
};
|
|
995
|
+
const br = () => {
|
|
996
|
+
if (j$1) for (let e of A$1.values()) e.pointerEventsStyle.disabled && (e.pointerEventsStyle.disabled = !1), e.hitTestOverrideStyle.disabled || (e.hitTestOverrideStyle.disabled = !0);
|
|
997
|
+
};
|
|
998
|
+
const M$1 = (e, t) => {
|
|
999
|
+
if (e.length !== 0) throw e.length === 1 ? e[0] : AggregateError(e, t);
|
|
1000
|
+
};
|
|
1001
|
+
const xr = /* @__PURE__ */ new Set();
|
|
1002
|
+
const N$1 = /* @__PURE__ */ new Set();
|
|
1003
|
+
let P$1 = !1;
|
|
1004
|
+
const Sr = (e, t) => {
|
|
1005
|
+
if (N$1.has(e)) try {
|
|
1006
|
+
e.unfreeze();
|
|
1007
|
+
} catch (e) {
|
|
1008
|
+
t.push(e);
|
|
1009
|
+
} finally {
|
|
1010
|
+
N$1.delete(e);
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
const Cr = (e) => {
|
|
1014
|
+
xr.add(e);
|
|
1015
|
+
try {
|
|
1016
|
+
P$1 && e.isConnected() && (e.freeze(), N$1.add(e));
|
|
1017
|
+
} catch (t) {
|
|
1018
|
+
throw xr.delete(e), t;
|
|
1019
|
+
}
|
|
1020
|
+
return () => {
|
|
1021
|
+
let t = [];
|
|
1022
|
+
Sr(e, t), xr.delete(e), M$1(t, `Unregistering renderer freeze failed`);
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
const wr = () => {
|
|
1026
|
+
if (!P$1) {
|
|
1027
|
+
P$1 = !0;
|
|
1028
|
+
try {
|
|
1029
|
+
for (let e of xr) e.isConnected() && (e.freeze(), N$1.add(e));
|
|
1030
|
+
} catch (e) {
|
|
1031
|
+
P$1 = !1;
|
|
1032
|
+
let t = [];
|
|
1033
|
+
for (let e of [...N$1].reverse()) Sr(e, t);
|
|
1034
|
+
throw t.length === 0 ? e : AggregateError([e, ...t], `Rolling back renderer freeze failed`);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
};
|
|
1038
|
+
const Tr = () => {
|
|
1039
|
+
if (!P$1) return;
|
|
1040
|
+
P$1 = !1;
|
|
1041
|
+
let e = [];
|
|
1042
|
+
for (let t of [...N$1].reverse()) Sr(t, e);
|
|
1043
|
+
M$1(e, `Unfreezing renderers failed`);
|
|
1044
|
+
};
|
|
1045
|
+
const Er = /* @__PURE__ */ new WeakMap();
|
|
1046
|
+
const Dr = /* @__PURE__ */ new WeakMap();
|
|
1047
|
+
const F$1 = /* @__PURE__ */ new WeakMap();
|
|
1048
|
+
const Or = /* @__PURE__ */ new WeakMap();
|
|
1049
|
+
const kr = /* @__PURE__ */ new WeakMap();
|
|
1050
|
+
const Ar = [
|
|
1051
|
+
`name`,
|
|
1052
|
+
`position`,
|
|
1053
|
+
`rotation`,
|
|
1054
|
+
`scale`,
|
|
1055
|
+
`color`,
|
|
1056
|
+
`visible`,
|
|
1057
|
+
`args`
|
|
1058
|
+
];
|
|
1059
|
+
const I$1 = (e) => typeof e == `object` && !!e;
|
|
1060
|
+
const jr = (e) => typeof e == `object` && !!e || typeof e == `function`;
|
|
1061
|
+
const L$1 = (e, t) => typeof e[t] == `function`;
|
|
1062
|
+
const R$1 = (e) => I$1(e) && typeof e.x == `number` && typeof e.y == `number` && typeof e.z == `number` && L$1(e, `set`) && L$1(e, `clone`) && L$1(e, `applyMatrix4`) && L$1(e, `project`);
|
|
1063
|
+
const Mr = (e) => I$1(e) && L$1(e, `clone`) && L$1(e, `premultiply`);
|
|
1064
|
+
const Nr = (e) => I$1(e) && `boundingBox` in e && L$1(e, `computeBoundingBox`);
|
|
1065
|
+
const Pr = (e) => I$1(e) && typeof e.type == `string` && I$1(e.props) && Fr(e.object);
|
|
1066
|
+
const Fr = (e) => I$1(e) && e.isObject3D === !0 && typeof e.uuid == `string` && typeof e.name == `string` && typeof e.type == `string` && typeof e.visible == `boolean` && Mr(e.matrixWorld) && L$1(e, `updateWorldMatrix`);
|
|
1067
|
+
const Ir = (e) => I$1(e) && e.isCamera === !0;
|
|
1068
|
+
const Lr = (e) => Fr(e) && e.isScene === !0 && Array.isArray(e.children);
|
|
1069
|
+
const Rr = (e) => I$1(e) && typeof e.tagName == `string` && e.tagName.toLowerCase() === `canvas` && L$1(e, `getContext`);
|
|
1070
|
+
const zr = (e) => I$1(e) && Rr(e.domElement);
|
|
1071
|
+
const Br = (e) => I$1(e) && L$1(e, `set`);
|
|
1072
|
+
const Vr = (e) => I$1(e) && L$1(e, `setFromCamera`) && L$1(e, `intersectObjects`);
|
|
1073
|
+
const Hr = (e) => I$1(e) && zr(e.gl) && Lr(e.scene) && Ir(e.camera) && Vr(e.raycaster) && Br(e.pointer);
|
|
1074
|
+
const Ur = (e) => e === `always` || e === `demand` || e === `never`;
|
|
1075
|
+
const Wr = (e) => I$1(e) && typeof e.elapsedTime == `number`;
|
|
1076
|
+
const Gr = (e, t) => {
|
|
1077
|
+
let n = e.getState();
|
|
1078
|
+
if (typeof n.setFrameloop != `function`) return;
|
|
1079
|
+
let r = Wr(n.clock) ? n.clock.elapsedTime : null;
|
|
1080
|
+
n.setFrameloop(t);
|
|
1081
|
+
let i = e.getState().clock;
|
|
1082
|
+
r !== null && Wr(i) && (i.elapsedTime = r);
|
|
1083
|
+
};
|
|
1084
|
+
const Kr = (e) => {
|
|
1085
|
+
if (Or.has(e)) return;
|
|
1086
|
+
let t = null, n = Cr({
|
|
1087
|
+
freeze: () => {
|
|
1088
|
+
let n = F$1.get(e);
|
|
1089
|
+
if (!n) return;
|
|
1090
|
+
let r = n.getState();
|
|
1091
|
+
if (Ur(r.frameloop) && typeof r.setFrameloop == `function`) {
|
|
1092
|
+
let e = r.frameloop;
|
|
1093
|
+
Gr(n, `never`), t = () => Gr(n, e);
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
isConnected: () => e.isConnected,
|
|
1097
|
+
unfreeze: () => {
|
|
1098
|
+
t?.(), t = null;
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
Or.set(e, n);
|
|
1102
|
+
};
|
|
1103
|
+
const qr = (e) => {
|
|
1104
|
+
let t = Or.get(e);
|
|
1105
|
+
t && (Or.delete(e), t());
|
|
1106
|
+
};
|
|
1107
|
+
const Jr = (e) => Pr(e.__r3f) ? e.__r3f : null;
|
|
1108
|
+
const Yr = (e) => {
|
|
1109
|
+
let t = e.current.stateNode;
|
|
1110
|
+
if (!I$1(t) || !jr(t.containerInfo)) return null;
|
|
1111
|
+
let n = t.containerInfo, r = Reflect.get(n, `getState`);
|
|
1112
|
+
if (typeof r != `function`) return null;
|
|
1113
|
+
let i = Reflect.apply(r, n, []);
|
|
1114
|
+
return Hr(i) ? () => {
|
|
1115
|
+
let e = Reflect.apply(r, n, []);
|
|
1116
|
+
return Hr(e) ? e : i;
|
|
1117
|
+
} : null;
|
|
1118
|
+
};
|
|
1119
|
+
const Xr = (e) => {
|
|
1120
|
+
let t = kr.get(e);
|
|
1121
|
+
t && (kr.delete(e), F$1.get(t.canvas) === t.root && (F$1.delete(t.canvas), qr(t.canvas)));
|
|
1122
|
+
};
|
|
1123
|
+
const Zr = (e) => {
|
|
1124
|
+
let t = Yr(e);
|
|
1125
|
+
if (!t) {
|
|
1126
|
+
Xr(e);
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
let n = t().gl.domElement;
|
|
1130
|
+
if (!n.isConnected || !e.current.child) {
|
|
1131
|
+
Xr(e);
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
let r = kr.get(e);
|
|
1135
|
+
r && r.canvas !== n && (Xr(e), r = void 0), r ? (r.root.getState = t, r.root.selectableObjects = null) : (r = {
|
|
1136
|
+
canvas: n,
|
|
1137
|
+
root: {
|
|
1138
|
+
getState: t,
|
|
1139
|
+
selectableObjects: null
|
|
1140
|
+
}
|
|
1141
|
+
}, kr.set(e, r)), F$1.set(n, r.root), Kr(n);
|
|
1142
|
+
};
|
|
1143
|
+
Lt({
|
|
1144
|
+
name: `react-grab-three-selection`,
|
|
1145
|
+
onCommitFiberRoot: (e, t) => Zr(t)
|
|
1146
|
+
});
|
|
1147
|
+
const Qr = (e) => {
|
|
1148
|
+
let t = e;
|
|
1149
|
+
for (; t;) {
|
|
1150
|
+
if (Jr(t)) return t;
|
|
1151
|
+
t = t.parent;
|
|
1152
|
+
}
|
|
1153
|
+
return null;
|
|
1154
|
+
};
|
|
1155
|
+
const $r = (e) => {
|
|
1156
|
+
let t = e;
|
|
1157
|
+
for (; t;) {
|
|
1158
|
+
let e = Jr(t);
|
|
1159
|
+
if (e && typeof e.eventCount == `number` && e.eventCount > 0) return !0;
|
|
1160
|
+
t = t.parent;
|
|
1161
|
+
}
|
|
1162
|
+
return !1;
|
|
1163
|
+
};
|
|
1164
|
+
const ei = (e, t) => {
|
|
1165
|
+
let n = e;
|
|
1166
|
+
for (; n;) {
|
|
1167
|
+
if (n === t) return !0;
|
|
1168
|
+
n = n.parent;
|
|
1169
|
+
}
|
|
1170
|
+
return !1;
|
|
1171
|
+
};
|
|
1172
|
+
const ti = (e) => {
|
|
1173
|
+
let t = e;
|
|
1174
|
+
for (; t;) {
|
|
1175
|
+
if (!t.visible) return !1;
|
|
1176
|
+
t = t.parent;
|
|
1177
|
+
}
|
|
1178
|
+
return !0;
|
|
1179
|
+
};
|
|
1180
|
+
const ni = (e) => !!Jr(e) && (Nr(e.geometry) || e.type.toLowerCase() === `sprite`);
|
|
1181
|
+
const ri = (e) => e.isInstancedMesh !== !0 || typeof e.count != `number` || !Number.isInteger(e.count) || e.count <= 0 || !e.getMatrixAt ? 0 : e.count;
|
|
1182
|
+
const ii = (e, t, n, r) => {
|
|
1183
|
+
try {
|
|
1184
|
+
let i = { object: n };
|
|
1185
|
+
r !== void 0 && (i.instanceId = r);
|
|
1186
|
+
let a = ai(t, n, i);
|
|
1187
|
+
a && e.push(a);
|
|
1188
|
+
} catch {}
|
|
1189
|
+
};
|
|
1190
|
+
const ai = (e, t, n) => {
|
|
1191
|
+
let r = typeof n.instanceId == `number` && Number.isInteger(n.instanceId) ? n.instanceId : null, i = Er.get(t);
|
|
1192
|
+
i || (i = /* @__PURE__ */ new Map(), Er.set(t, i));
|
|
1193
|
+
let a = i.get(r);
|
|
1194
|
+
if (a) return a.canvas = e.gl.domElement, a.intersectionPoint = R$1(n.point) ? n.point : null, a.object = t, a.rootState = e, a.element;
|
|
1195
|
+
let o = Jr(t), s = o ? Bt(o) : null;
|
|
1196
|
+
if (o && !s) return null;
|
|
1197
|
+
let c = (o?.type || t.type || `object-3d`).toLowerCase(), l = e.gl.domElement.ownerDocument.createElement(c), u = {
|
|
1198
|
+
canvas: e.gl.domElement,
|
|
1199
|
+
element: l,
|
|
1200
|
+
fiber: s,
|
|
1201
|
+
instance: o,
|
|
1202
|
+
instanceId: r,
|
|
1203
|
+
intersectionPoint: R$1(n.point) ? n.point : null,
|
|
1204
|
+
object: t,
|
|
1205
|
+
rootState: e,
|
|
1206
|
+
tagName: c
|
|
1207
|
+
}, d = l.getBoundingClientRect.bind(l);
|
|
1208
|
+
return l.getBoundingClientRect = () => {
|
|
1209
|
+
let e = gi(u), t = l.ownerDocument.defaultView?.DOMRect;
|
|
1210
|
+
return t ? new t(e.x, e.y, e.width, e.height) : d();
|
|
1211
|
+
}, Ht(l, {
|
|
1212
|
+
hostElement: u.canvas,
|
|
1213
|
+
supportsDomEditing: !1,
|
|
1214
|
+
getBounds: () => gi(u),
|
|
1215
|
+
getFiber: () => u.fiber ? xt$1(u.fiber) : null,
|
|
1216
|
+
getPreview: () => li(u),
|
|
1217
|
+
getSelector: () => ui(u),
|
|
1218
|
+
getTagName: () => u.tagName,
|
|
1219
|
+
isConnected: () => u.canvas.isConnected && ei(u.object, u.rootState.scene)
|
|
1220
|
+
}), i.set(r, u), Dr.set(l, u), l;
|
|
1221
|
+
};
|
|
1222
|
+
const oi = (e, t, n) => {
|
|
1223
|
+
if (!Rr(e)) return e;
|
|
1224
|
+
let r = F$1.get(e);
|
|
1225
|
+
if (!r) return e;
|
|
1226
|
+
try {
|
|
1227
|
+
let i = r.getState(), a = Jt(e);
|
|
1228
|
+
if (a.width <= 0 || a.height <= 0) return e;
|
|
1229
|
+
let o = (t - a.x) / a.width * 2 - 1, s = -((n - a.y) / a.height) * 2 + 1;
|
|
1230
|
+
if (o < -1 || o > 1 || s < -1 || s > 1) return e;
|
|
1231
|
+
i.pointer.set(o, s), i.raycaster.setFromCamera(i.pointer, i.camera);
|
|
1232
|
+
let c = i.raycaster.intersectObjects(i.scene.children, !0);
|
|
1233
|
+
for (let e of c) {
|
|
1234
|
+
if (!$r(e.object)) continue;
|
|
1235
|
+
let t = Qr(e.object);
|
|
1236
|
+
if (!t || t.visible === !1) continue;
|
|
1237
|
+
let n = ai(i, t, e);
|
|
1238
|
+
if (n) return n;
|
|
1239
|
+
}
|
|
1240
|
+
for (let e of c) {
|
|
1241
|
+
let t = Qr(e.object);
|
|
1242
|
+
if (!t || t.visible === !1) continue;
|
|
1243
|
+
let n = ai(i, t, e);
|
|
1244
|
+
if (n) return n;
|
|
1245
|
+
}
|
|
1246
|
+
} catch {}
|
|
1247
|
+
return e;
|
|
1248
|
+
};
|
|
1249
|
+
const si = (e, t) => {
|
|
1250
|
+
if (!Rr(e)) return [];
|
|
1251
|
+
let n = F$1.get(e);
|
|
1252
|
+
if (!n) return [];
|
|
1253
|
+
try {
|
|
1254
|
+
let e = n.getState(), r = t ? Dr.get(t) : null;
|
|
1255
|
+
if (!n.selectableObjects) {
|
|
1256
|
+
let t = [], r = [...e.scene.children];
|
|
1257
|
+
for (let e = 0; e < r.length; e += 1) {
|
|
1258
|
+
let n = r[e];
|
|
1259
|
+
if (n.children) for (let e of n.children) r.push(e);
|
|
1260
|
+
ni(n) && t.push(n);
|
|
1261
|
+
}
|
|
1262
|
+
n.selectableObjects = t;
|
|
1263
|
+
}
|
|
1264
|
+
let i = [];
|
|
1265
|
+
for (let t of n.selectableObjects) {
|
|
1266
|
+
if (!ti(t) || !ei(t, e.scene) || t.isInstancedMesh === !0 && t.count === 0) continue;
|
|
1267
|
+
let n = ri(t);
|
|
1268
|
+
if (n > 0 && n <= 512) {
|
|
1269
|
+
for (let r = 0; r < n; r += 1) ii(i, e, t, r);
|
|
1270
|
+
continue;
|
|
1271
|
+
}
|
|
1272
|
+
if (n > 512 && r?.object === t && r.instanceId !== null) {
|
|
1273
|
+
i.push(r.element);
|
|
1274
|
+
continue;
|
|
1275
|
+
}
|
|
1276
|
+
ii(i, e, t);
|
|
1277
|
+
}
|
|
1278
|
+
return i;
|
|
1279
|
+
} catch {
|
|
1280
|
+
return [];
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
const ci = (e) => typeof e == `string` ? JSON.stringify(e) : typeof e == `number` || typeof e == `boolean` ? `{${String(e)}}` : Array.isArray(e) && e.length <= 4 && e.every((e) => typeof e == `number` || typeof e == `string`) ? `{${JSON.stringify(e)}}` : null;
|
|
1284
|
+
const li = (e) => {
|
|
1285
|
+
let t = e.instance?.props ?? {}, n = [];
|
|
1286
|
+
for (let r of Ar) {
|
|
1287
|
+
let i = t[r];
|
|
1288
|
+
r === `name` && i === void 0 && e.object.name && (i = e.object.name);
|
|
1289
|
+
let a = ci(i);
|
|
1290
|
+
a && n.push(`${r}=${a}`);
|
|
1291
|
+
}
|
|
1292
|
+
return e.instanceId !== null && n.push(`instanceId={${e.instanceId}}`), `<${e.tagName}${n.length > 0 ? ` ${n.join(` `)}` : ``} />`;
|
|
1293
|
+
};
|
|
1294
|
+
const ui = (e) => {
|
|
1295
|
+
if (e.object.name) return `${e.tagName}[name=${JSON.stringify(e.object.name)}]`;
|
|
1296
|
+
let t = e.instanceId === null ? `` : `:${e.instanceId}`;
|
|
1297
|
+
return `${e.tagName}[uuid=${JSON.stringify(`${e.object.uuid}${t}`)}]`;
|
|
1298
|
+
};
|
|
1299
|
+
const di = (e) => {
|
|
1300
|
+
e.object.updateWorldMatrix(!0, !1);
|
|
1301
|
+
let t = e.object.matrixWorld.clone();
|
|
1302
|
+
if (e.instanceId === null || !e.object.getMatrixAt) return t;
|
|
1303
|
+
let n = e.object.matrixWorld.clone();
|
|
1304
|
+
return e.object.getMatrixAt(e.instanceId, n), n.premultiply(t);
|
|
1305
|
+
};
|
|
1306
|
+
const fi = (e) => {
|
|
1307
|
+
if (!Nr(e.geometry)) return null;
|
|
1308
|
+
if (!e.geometry.boundingBox) try {
|
|
1309
|
+
e.geometry.computeBoundingBox();
|
|
1310
|
+
} catch {
|
|
1311
|
+
return null;
|
|
1312
|
+
}
|
|
1313
|
+
let t = e.geometry.boundingBox;
|
|
1314
|
+
return !t || !R$1(t.min) || !R$1(t.max) ? null : t;
|
|
1315
|
+
};
|
|
1316
|
+
const pi = (e) => {
|
|
1317
|
+
if (e.isInstancedMesh !== !0 || typeof e.computeBoundingBox != `function`) return null;
|
|
1318
|
+
if (!e.boundingBox) try {
|
|
1319
|
+
e.computeBoundingBox();
|
|
1320
|
+
} catch {
|
|
1321
|
+
return null;
|
|
1322
|
+
}
|
|
1323
|
+
let t = e.boundingBox;
|
|
1324
|
+
return !t || !R$1(t.min) || !R$1(t.max) ? null : t;
|
|
1325
|
+
};
|
|
1326
|
+
const mi = (e) => e.instanceId === null ? pi(e.object) ?? fi(e.object) : fi(e.object);
|
|
1327
|
+
const hi = (e, t) => {
|
|
1328
|
+
let n = t.x + t.width / 2, r = t.y + t.height / 2;
|
|
1329
|
+
try {
|
|
1330
|
+
let i = e.intersectionPoint ? e.intersectionPoint.clone() : R$1(e.object.position) ? e.object.position.clone().set(0, 0, 0).applyMatrix4(di(e)) : null;
|
|
1331
|
+
i && (i.project(e.rootState.camera), Number.isFinite(i.x) && Number.isFinite(i.y) && (n = t.x + (i.x + 1) / 2 * t.width, r = t.y + (1 - i.y) / 2 * t.height));
|
|
1332
|
+
} catch {}
|
|
1333
|
+
return {
|
|
1334
|
+
x: n - 8,
|
|
1335
|
+
y: r - 8,
|
|
1336
|
+
width: 16,
|
|
1337
|
+
height: 16,
|
|
1338
|
+
borderRadius: `0px`
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
const gi = (e) => {
|
|
1342
|
+
let t = Jt(e.canvas);
|
|
1343
|
+
try {
|
|
1344
|
+
let n = mi(e);
|
|
1345
|
+
if (!n) return hi(e, t);
|
|
1346
|
+
let r = di(e), i = [n.min.x, n.max.x], a = [n.min.y, n.max.y], o = [n.min.z, n.max.z], s = 1 / 0, c = 1 / 0, l = -1 / 0, u = -1 / 0, d = n.min.clone();
|
|
1347
|
+
for (let n of i) for (let i of a) for (let a of o) {
|
|
1348
|
+
if (d.set(n, i, a).applyMatrix4(r).project(e.rootState.camera), !Number.isFinite(d.x) || !Number.isFinite(d.y)) continue;
|
|
1349
|
+
let o = t.x + (d.x + 1) / 2 * t.width, f = t.y + (1 - d.y) / 2 * t.height;
|
|
1350
|
+
s = Math.min(s, o), c = Math.min(c, f), l = Math.max(l, o), u = Math.max(u, f);
|
|
1351
|
+
}
|
|
1352
|
+
if (!Number.isFinite(s) || !Number.isFinite(c) || !Number.isFinite(l) || !Number.isFinite(u)) return hi(e, t);
|
|
1353
|
+
let f = Math.max(t.x, s), p = Math.max(t.y, c), ee = Math.min(t.x + t.width, l), m = Math.min(t.y + t.height, u);
|
|
1354
|
+
return ee <= f || m <= p ? hi(e, t) : {
|
|
1355
|
+
x: f,
|
|
1356
|
+
y: p,
|
|
1357
|
+
width: ee - f,
|
|
1358
|
+
height: m - p,
|
|
1359
|
+
borderRadius: `0px`
|
|
1360
|
+
};
|
|
1361
|
+
} catch {
|
|
1362
|
+
return hi(e, t);
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1365
|
+
let z$1 = null;
|
|
1366
|
+
let B$1 = null;
|
|
1367
|
+
let V$1 = null;
|
|
1368
|
+
const _i = () => {
|
|
1369
|
+
V$1 !== null && clearTimeout(V$1), V$1 = setTimeout(() => {
|
|
1370
|
+
V$1 = null, br();
|
|
1371
|
+
}, 100);
|
|
1372
|
+
};
|
|
1373
|
+
const vi = () => {
|
|
1374
|
+
V$1 !== null && (clearTimeout(V$1), V$1 = null);
|
|
1375
|
+
};
|
|
1376
|
+
const yi = (e, t, n, r) => {
|
|
1377
|
+
let i = Math.abs(e - n), a = Math.abs(t - r);
|
|
1378
|
+
return i <= 2 && a <= 2;
|
|
1379
|
+
};
|
|
1380
|
+
const bi = (e, t, n) => {
|
|
1381
|
+
let r = oi(e, t, n);
|
|
1382
|
+
return Hn(r) && D$1(e) && $n(e, t, n) ? r : null;
|
|
1383
|
+
};
|
|
1384
|
+
const xi = (e, t) => {
|
|
1385
|
+
if (!Number.isFinite(e) || !Number.isFinite(t)) return [];
|
|
1386
|
+
vi(), yr();
|
|
1387
|
+
try {
|
|
1388
|
+
let n = rr(e, t), r = _n() ? n.filter(D$1) : n, i = [], a = /* @__PURE__ */ new Set(), o = !1;
|
|
1389
|
+
for (let n of r) {
|
|
1390
|
+
let r = n, s = $n(n, e, t);
|
|
1391
|
+
if (!o) {
|
|
1392
|
+
let i = cr(n, e, t);
|
|
1393
|
+
i && D$1(i) && Hn(i) && $n(i, e, t) ? (r = i, s = !0, o = !0) : Hn(n) && s && (o = !0);
|
|
1394
|
+
}
|
|
1395
|
+
let c = oi(r, e, t);
|
|
1396
|
+
if (s && !a.has(c) && (a.add(c), i.push(c)), r === n) continue;
|
|
1397
|
+
let l = E$1(r);
|
|
1398
|
+
for (; l && D$1(l);) {
|
|
1399
|
+
let n = oi(l, e, t);
|
|
1400
|
+
$n(l, e, t) && !a.has(n) && (a.add(n), i.push(n)), l = E$1(l);
|
|
1401
|
+
}
|
|
1402
|
+
break;
|
|
1403
|
+
}
|
|
1404
|
+
return i;
|
|
1405
|
+
} finally {
|
|
1406
|
+
_i();
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
const Si = (e, t) => {
|
|
1410
|
+
if (!Number.isFinite(e) || !Number.isFinite(t)) return null;
|
|
1411
|
+
let n = performance.now();
|
|
1412
|
+
if (B$1) {
|
|
1413
|
+
let r = B$1.element, i = n - B$1.timestamp < 16;
|
|
1414
|
+
if (r.isConnected && i && lr(e, t, B$1.bounds) && !O$1(r)) return r;
|
|
1415
|
+
B$1 = null, z$1?.element === r && (z$1 = null);
|
|
1416
|
+
}
|
|
1417
|
+
if (z$1) {
|
|
1418
|
+
let r = yi(e, t, z$1.clientX, z$1.clientY), i = n - z$1.timestamp < 16;
|
|
1419
|
+
if (r && i) {
|
|
1420
|
+
if (!z$1.preciseHitElement) return z$1.element;
|
|
1421
|
+
let n = cr(z$1.preciseHitElement, e, t);
|
|
1422
|
+
if (n) {
|
|
1423
|
+
let r = bi(n, e, t);
|
|
1424
|
+
if (r) return r;
|
|
1425
|
+
}
|
|
1426
|
+
return z$1.usesTextHitTesting ? bi(z$1.preciseHitElement, e, t) ?? tr(e, t) : z$1.fallbackElement;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
vi(), yr();
|
|
1430
|
+
try {
|
|
1431
|
+
let r = null, i = Dn(e, t), a = i ? Qn(i) !== null : !1, o = i ? cr(i, e, t) : null, s = o ? bi(o, e, t) : null, c = (i ? bi(i, e, t) : null) ?? tr(e, t);
|
|
1432
|
+
if (r = s ?? c, r && g$1(r) && !O$1(r)) {
|
|
1433
|
+
let e = Jt(r);
|
|
1434
|
+
B$1 = {
|
|
1435
|
+
element: r,
|
|
1436
|
+
timestamp: n,
|
|
1437
|
+
bounds: {
|
|
1438
|
+
left: e.x,
|
|
1439
|
+
top: e.y,
|
|
1440
|
+
right: e.x + e.width,
|
|
1441
|
+
bottom: e.y + e.height
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1444
|
+
} else B$1 = null;
|
|
1445
|
+
return z$1 = {
|
|
1446
|
+
clientX: e,
|
|
1447
|
+
clientY: t,
|
|
1448
|
+
element: r,
|
|
1449
|
+
fallbackElement: c,
|
|
1450
|
+
preciseHitElement: i?.namespaceURI === `http://www.w3.org/2000/svg` || o || a ? i : null,
|
|
1451
|
+
usesTextHitTesting: a,
|
|
1452
|
+
timestamp: n
|
|
1453
|
+
}, r;
|
|
1454
|
+
} finally {
|
|
1455
|
+
_i();
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
const Ci = () => {
|
|
1459
|
+
vi(), br(), z$1 = null, B$1 = null;
|
|
1460
|
+
};
|
|
1461
|
+
const H$1 = (e) => {
|
|
1462
|
+
console.warn(`[react-grab]`, e);
|
|
1463
|
+
};
|
|
1464
|
+
const wi = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
|
|
1465
|
+
let U$1 = !1;
|
|
1466
|
+
let W$1 = null;
|
|
1467
|
+
let G$1 = !1;
|
|
1468
|
+
const K$1 = /* @__PURE__ */ new Map();
|
|
1469
|
+
let Ti = -1;
|
|
1470
|
+
const Ei = /* @__PURE__ */ new WeakSet();
|
|
1471
|
+
const Di = /* @__PURE__ */ new WeakSet();
|
|
1472
|
+
const Oi = /* @__PURE__ */ new WeakMap();
|
|
1473
|
+
const ki = /* @__PURE__ */ new Map();
|
|
1474
|
+
const q$1 = /* @__PURE__ */ new Map();
|
|
1475
|
+
const Ai = (e) => {
|
|
1476
|
+
if (W$1 === e && (G$1 = !0), Ei.has(e)) return !0;
|
|
1477
|
+
if (!U$1 && W$1 === e) {
|
|
1478
|
+
let t = (Oi.get(e) ?? 0) + 1;
|
|
1479
|
+
return Oi.set(e, t), t < 4 ? !1 : (Ei.add(e), !0);
|
|
1480
|
+
}
|
|
1481
|
+
return !U$1 || !(`gsapVersions` in window) || !(Error().stack ?? ``).includes(`_tick`) ? !1 : (Ei.add(e), Di.add(e), !0);
|
|
1482
|
+
};
|
|
1483
|
+
typeof window < `u` && (window.requestAnimationFrame = (e) => {
|
|
1484
|
+
let t = Ai(e);
|
|
1485
|
+
if (U$1 && t) {
|
|
1486
|
+
let t = Ti--;
|
|
1487
|
+
return K$1.set(t, e), t;
|
|
1488
|
+
}
|
|
1489
|
+
let n = Sn((t) => {
|
|
1490
|
+
if (U$1 && Ai(e)) {
|
|
1491
|
+
let t = Ti--;
|
|
1492
|
+
K$1.set(t, e), ki.set(n, t);
|
|
1493
|
+
return;
|
|
1494
|
+
}
|
|
1495
|
+
let r = W$1, i = G$1;
|
|
1496
|
+
W$1 = e, G$1 = !1;
|
|
1497
|
+
try {
|
|
1498
|
+
e(t);
|
|
1499
|
+
} finally {
|
|
1500
|
+
let t = G$1;
|
|
1501
|
+
W$1 = r, G$1 = i, !t && !Di.has(e) && (Ei.delete(e), Oi.delete(e));
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
return n;
|
|
1505
|
+
}, window.cancelAnimationFrame = (e) => {
|
|
1506
|
+
if (K$1.has(e)) {
|
|
1507
|
+
K$1.delete(e);
|
|
1508
|
+
return;
|
|
1509
|
+
}
|
|
1510
|
+
let t = q$1.get(e);
|
|
1511
|
+
if (t !== void 0) {
|
|
1512
|
+
Cn(t.nativeId), q$1.delete(e);
|
|
1513
|
+
return;
|
|
1514
|
+
}
|
|
1515
|
+
let n = ki.get(e);
|
|
1516
|
+
if (n !== void 0) {
|
|
1517
|
+
K$1.delete(n), ki.delete(e);
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
Cn(e);
|
|
1521
|
+
});
|
|
1522
|
+
const ji = () => {
|
|
1523
|
+
if (!U$1) {
|
|
1524
|
+
U$1 = !0, K$1.clear(), ki.clear();
|
|
1525
|
+
for (let [e, { nativeId: t, callback: n }] of q$1) Cn(t), K$1.set(e, n);
|
|
1526
|
+
q$1.clear();
|
|
1527
|
+
}
|
|
1528
|
+
};
|
|
1529
|
+
const Mi = () => {
|
|
1530
|
+
if (U$1) {
|
|
1531
|
+
U$1 = !1;
|
|
1532
|
+
for (let [e, t] of K$1.entries()) {
|
|
1533
|
+
let n = Sn((n) => {
|
|
1534
|
+
q$1.delete(e);
|
|
1535
|
+
let r = W$1, i = G$1;
|
|
1536
|
+
W$1 = t, G$1 = !1;
|
|
1537
|
+
try {
|
|
1538
|
+
t(n);
|
|
1539
|
+
} finally {
|
|
1540
|
+
let e = G$1;
|
|
1541
|
+
W$1 = r, G$1 = i, !e && !Di.has(t) && (Ei.delete(t), Oi.delete(t));
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
q$1.set(e, {
|
|
1545
|
+
nativeId: n,
|
|
1546
|
+
callback: t
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
K$1.clear(), ki.clear();
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
const Ni = `
|
|
1553
|
+
[${ve$1}],
|
|
1554
|
+
[${ve$1}] * {
|
|
1555
|
+
animation-play-state: paused !important;
|
|
1556
|
+
transition: none !important;
|
|
1557
|
+
}
|
|
1558
|
+
`;
|
|
1559
|
+
const Pi = (e) => e?.namespaceURI === `http://www.w3.org/2000/svg` && e.tagName === `svg`;
|
|
1560
|
+
let Fi = null;
|
|
1561
|
+
let J$1 = [];
|
|
1562
|
+
let Ii = [];
|
|
1563
|
+
let Li = [];
|
|
1564
|
+
const Ri = /* @__PURE__ */ new Set();
|
|
1565
|
+
const Y$1 = /* @__PURE__ */ new Map();
|
|
1566
|
+
const X$1 = /* @__PURE__ */ new Map();
|
|
1567
|
+
let zi = [];
|
|
1568
|
+
const Bi = () => Y$1.size > 0;
|
|
1569
|
+
const Vi = () => {
|
|
1570
|
+
Fi ||= ur(`data-react-grab-frozen-styles`, Ni);
|
|
1571
|
+
};
|
|
1572
|
+
const Hi = (e) => {
|
|
1573
|
+
let t = /* @__PURE__ */ new Set();
|
|
1574
|
+
for (let n of e) {
|
|
1575
|
+
let e = Pi(n) ? n : n.closest(`svg`);
|
|
1576
|
+
Pi(e) && t.add(e);
|
|
1577
|
+
for (let e of n.querySelectorAll(`svg`)) Pi(e) && t.add(e);
|
|
1578
|
+
}
|
|
1579
|
+
return [...t];
|
|
1580
|
+
};
|
|
1581
|
+
const Ui = (e, t) => {
|
|
1582
|
+
let n = Reflect.get(e, t);
|
|
1583
|
+
typeof n == `function` && n.call(e);
|
|
1584
|
+
};
|
|
1585
|
+
const Wi = (e, t) => {
|
|
1586
|
+
for (let n of e) {
|
|
1587
|
+
let e = X$1.get(n) ?? 0;
|
|
1588
|
+
if (e === 0) {
|
|
1589
|
+
X$1.set(n, 1), t.push(n), Ui(n, `pauseAnimations`);
|
|
1590
|
+
continue;
|
|
1591
|
+
}
|
|
1592
|
+
X$1.set(n, e + 1), t.push(n);
|
|
1593
|
+
}
|
|
1594
|
+
};
|
|
1595
|
+
const Gi = (e, t) => {
|
|
1596
|
+
let n = [];
|
|
1597
|
+
for (let r of e) {
|
|
1598
|
+
let e = X$1.get(r);
|
|
1599
|
+
if (e) {
|
|
1600
|
+
if (e === 1) {
|
|
1601
|
+
try {
|
|
1602
|
+
Ui(r, `unpauseAnimations`), X$1.delete(r);
|
|
1603
|
+
} catch (e) {
|
|
1604
|
+
n.push(r), t.push(e);
|
|
1605
|
+
}
|
|
1606
|
+
continue;
|
|
1607
|
+
}
|
|
1608
|
+
X$1.set(r, e - 1);
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
return n;
|
|
1612
|
+
};
|
|
1613
|
+
const Ki = (e) => {
|
|
1614
|
+
let t = [];
|
|
1615
|
+
for (let n of e) for (let e of n.getAnimations({ subtree: !0 })) e.playState === `running` && t.push(e);
|
|
1616
|
+
return t;
|
|
1617
|
+
};
|
|
1618
|
+
const qi = (e) => {
|
|
1619
|
+
for (let t of e) try {
|
|
1620
|
+
t.finish();
|
|
1621
|
+
} catch {}
|
|
1622
|
+
};
|
|
1623
|
+
const Ji = (e) => {
|
|
1624
|
+
for (let t of e) try {
|
|
1625
|
+
t.finish();
|
|
1626
|
+
} catch {
|
|
1627
|
+
try {
|
|
1628
|
+
t.play();
|
|
1629
|
+
} catch {}
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
const Yi = (e) => {
|
|
1633
|
+
if (!(e.effect instanceof KeyframeEffect)) return !1;
|
|
1634
|
+
let t = e.effect.target;
|
|
1635
|
+
if (!Re$1(t)) return !1;
|
|
1636
|
+
let n = t.getRootNode();
|
|
1637
|
+
return Yt(n) && Fn(n.host);
|
|
1638
|
+
};
|
|
1639
|
+
const Xi = (e) => {
|
|
1640
|
+
if (e.length === 0 || wi(e, Li)) return;
|
|
1641
|
+
Zi();
|
|
1642
|
+
let t = [...e];
|
|
1643
|
+
Vi(), J$1 = t, Ii = [];
|
|
1644
|
+
try {
|
|
1645
|
+
Wi(Hi(J$1), Ii);
|
|
1646
|
+
for (let e of J$1) e.setAttribute(ve$1, ``);
|
|
1647
|
+
let e = Ki(J$1);
|
|
1648
|
+
zi = [];
|
|
1649
|
+
for (let t of e) t.pause(), zi.push(t);
|
|
1650
|
+
Li = t;
|
|
1651
|
+
} catch (e) {
|
|
1652
|
+
try {
|
|
1653
|
+
Zi();
|
|
1654
|
+
} catch (t) {
|
|
1655
|
+
throw AggregateError([e, t], `Rolling back animation freeze failed`);
|
|
1656
|
+
}
|
|
1657
|
+
throw e;
|
|
1658
|
+
}
|
|
1659
|
+
};
|
|
1660
|
+
const Zi = () => {
|
|
1661
|
+
if (J$1.length === 0 && Ii.length === 0 && zi.length === 0) return;
|
|
1662
|
+
let e = J$1, t = Ii, n = zi, r = [], i = [];
|
|
1663
|
+
Li = [];
|
|
1664
|
+
for (let t of e) try {
|
|
1665
|
+
t.removeAttribute(ve$1);
|
|
1666
|
+
} catch (e) {
|
|
1667
|
+
i.push(t), r.push(e);
|
|
1668
|
+
}
|
|
1669
|
+
J$1 = i, Ii = Gi(t, r), Ji(n), zi = [], M$1(r, `Unfreezing element animations failed`);
|
|
1670
|
+
};
|
|
1671
|
+
const Qi = (e) => e.length === 0 ? (Zi(), () => {}) : (Xi(e), Zi);
|
|
1672
|
+
const $i = (e) => {
|
|
1673
|
+
let t = [];
|
|
1674
|
+
for (let n of e.getAnimations()) Yi(n) || n.playState === `running` && t.push(n);
|
|
1675
|
+
return {
|
|
1676
|
+
targetDocument: e,
|
|
1677
|
+
runningAnimations: t
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
const ea = (e) => {
|
|
1681
|
+
let t = Y$1.get(e);
|
|
1682
|
+
if (!t) return [];
|
|
1683
|
+
let n = [], r = t.styleElement;
|
|
1684
|
+
if (r) {
|
|
1685
|
+
try {
|
|
1686
|
+
if (t.didUseCssFreeze) {
|
|
1687
|
+
r.textContent = `
|
|
1688
|
+
*, *::before, *::after {
|
|
1689
|
+
transition: none !important;
|
|
1690
|
+
}
|
|
1691
|
+
`;
|
|
1692
|
+
let t = [];
|
|
1693
|
+
for (let n of e.getAnimations()) Yi(n) || t.push(n);
|
|
1694
|
+
qi(t);
|
|
1695
|
+
} else Ji(t.frozenWaapiAnimations);
|
|
1696
|
+
t.didUseCssFreeze = !1, t.frozenWaapiAnimations = [];
|
|
1697
|
+
} catch (e) {
|
|
1698
|
+
n.push(e);
|
|
1699
|
+
}
|
|
1700
|
+
try {
|
|
1701
|
+
r.remove(), t.styleElement = null;
|
|
1702
|
+
} catch (e) {
|
|
1703
|
+
n.push(e);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
return t.frozenSvgElements = Gi(t.frozenSvgElements, n), t.styleElement === null && t.frozenSvgElements.length === 0 && t.frozenWaapiAnimations.length === 0 && Y$1.delete(e), n;
|
|
1707
|
+
};
|
|
1708
|
+
const ta = (e) => {
|
|
1709
|
+
if (Y$1.has(e.targetDocument)) return;
|
|
1710
|
+
let t = ur(`data-react-grab-global-freeze`, ``, e.targetDocument), n = {
|
|
1711
|
+
styleElement: t,
|
|
1712
|
+
frozenSvgElements: [],
|
|
1713
|
+
frozenWaapiAnimations: [],
|
|
1714
|
+
didUseCssFreeze: !1
|
|
1715
|
+
};
|
|
1716
|
+
if (Y$1.set(e.targetDocument, n), e.runningAnimations.length > 200) t.textContent = `
|
|
1717
|
+
*, *::before, *::after {
|
|
1718
|
+
animation-play-state: paused !important;
|
|
1719
|
+
transition: none !important;
|
|
1720
|
+
}
|
|
1721
|
+
`, n.didUseCssFreeze = !0;
|
|
1722
|
+
else for (let t of e.runningAnimations) t.pause(), n.frozenWaapiAnimations.push(t);
|
|
1723
|
+
Wi(Hi(Array.from(e.targetDocument.querySelectorAll(`svg`))), n.frozenSvgElements);
|
|
1724
|
+
};
|
|
1725
|
+
const na = (e) => {
|
|
1726
|
+
Ri.add(e);
|
|
1727
|
+
try {
|
|
1728
|
+
Bi() && ta($i(e));
|
|
1729
|
+
} catch (t) {
|
|
1730
|
+
Ri.delete(e);
|
|
1731
|
+
let n = ea(e);
|
|
1732
|
+
throw n.length === 0 ? t : AggregateError([t, ...n], `Freezing frame animations failed`);
|
|
1733
|
+
}
|
|
1734
|
+
return () => {
|
|
1735
|
+
Ri.delete(e), M$1(ea(e), `Unfreezing frame animations failed`);
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
const ra = () => Bi() ? [] : (Ri.add(document), [...Ri].map($i));
|
|
1739
|
+
const ia = (e) => {
|
|
1740
|
+
if (!Bi()) {
|
|
1741
|
+
for (let t of e) ta(t);
|
|
1742
|
+
ji();
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
const aa = () => {
|
|
1746
|
+
if (!Bi()) return;
|
|
1747
|
+
let e = [];
|
|
1748
|
+
for (let t of [...Y$1.keys()]) e.push(...ea(t));
|
|
1749
|
+
try {
|
|
1750
|
+
Mi();
|
|
1751
|
+
} catch (t) {
|
|
1752
|
+
e.push(t);
|
|
1753
|
+
}
|
|
1754
|
+
M$1(e, `Unfreezing global animations failed`);
|
|
1755
|
+
};
|
|
1756
|
+
const oa = (e, t) => {
|
|
1757
|
+
for (let n of e.querySelectorAll(`:hover`)) if (!In(n) && (h$1(n) && t.add(n), n.shadowRoot && oa(n.shadowRoot, t), g$1(n))) {
|
|
1758
|
+
let e = O$1(n);
|
|
1759
|
+
e && oa(e, t);
|
|
1760
|
+
}
|
|
1761
|
+
};
|
|
1762
|
+
const sa = () => {
|
|
1763
|
+
let e = /* @__PURE__ */ new Set();
|
|
1764
|
+
return oa(document, e), [...e];
|
|
1765
|
+
};
|
|
1766
|
+
const ca = [
|
|
1767
|
+
`mouseenter`,
|
|
1768
|
+
`mouseleave`,
|
|
1769
|
+
`mouseover`,
|
|
1770
|
+
`mouseout`,
|
|
1771
|
+
`pointerenter`,
|
|
1772
|
+
`pointerleave`,
|
|
1773
|
+
`pointerover`,
|
|
1774
|
+
`pointerout`
|
|
1775
|
+
];
|
|
1776
|
+
const la = [
|
|
1777
|
+
`focus`,
|
|
1778
|
+
`blur`,
|
|
1779
|
+
`focusin`,
|
|
1780
|
+
`focusout`
|
|
1781
|
+
];
|
|
1782
|
+
const ua = [
|
|
1783
|
+
`background-color`,
|
|
1784
|
+
`color`,
|
|
1785
|
+
`border-color`,
|
|
1786
|
+
`box-shadow`,
|
|
1787
|
+
`transform`,
|
|
1788
|
+
`opacity`,
|
|
1789
|
+
`outline`,
|
|
1790
|
+
`filter`,
|
|
1791
|
+
`scale`,
|
|
1792
|
+
`visibility`,
|
|
1793
|
+
`display`
|
|
1794
|
+
];
|
|
1795
|
+
const da = [
|
|
1796
|
+
`background-color`,
|
|
1797
|
+
`color`,
|
|
1798
|
+
`border-color`,
|
|
1799
|
+
`box-shadow`,
|
|
1800
|
+
`outline`,
|
|
1801
|
+
`outline-offset`,
|
|
1802
|
+
`outline-width`,
|
|
1803
|
+
`outline-color`,
|
|
1804
|
+
`outline-style`,
|
|
1805
|
+
`filter`,
|
|
1806
|
+
`opacity`,
|
|
1807
|
+
`ring-color`,
|
|
1808
|
+
`ring-width`
|
|
1809
|
+
];
|
|
1810
|
+
const fa = /* @__PURE__ */ new Map();
|
|
1811
|
+
const pa = /* @__PURE__ */ new Map();
|
|
1812
|
+
const ma = /* @__PURE__ */ new Set();
|
|
1813
|
+
let ha = !1;
|
|
1814
|
+
const ga = (e) => {
|
|
1815
|
+
e.stopImmediatePropagation();
|
|
1816
|
+
};
|
|
1817
|
+
const _a = (e) => {
|
|
1818
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
1819
|
+
};
|
|
1820
|
+
const va = (e) => {
|
|
1821
|
+
for (let t of ca) e.addEventListener(t, ga, !0);
|
|
1822
|
+
for (let t of la) e.addEventListener(t, _a, !0);
|
|
1823
|
+
};
|
|
1824
|
+
const ya = (e) => {
|
|
1825
|
+
for (let t of ca) e.removeEventListener(t, ga, !0);
|
|
1826
|
+
for (let t of la) e.removeEventListener(t, _a, !0);
|
|
1827
|
+
};
|
|
1828
|
+
const ba = (e) => {
|
|
1829
|
+
ma.add(e);
|
|
1830
|
+
let t = gr(e);
|
|
1831
|
+
return ha && va(e), () => {
|
|
1832
|
+
ha && ya(e), ma.delete(e), t();
|
|
1833
|
+
};
|
|
1834
|
+
};
|
|
1835
|
+
const xa = (e, t, n) => {
|
|
1836
|
+
if (n?.has(e)) return null;
|
|
1837
|
+
let r = getComputedStyle(e), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
1838
|
+
for (let n of t) {
|
|
1839
|
+
let t = r.getPropertyValue(n);
|
|
1840
|
+
t && (i.set(n, t), a.set(n, {
|
|
1841
|
+
value: e.style.getPropertyValue(n),
|
|
1842
|
+
priority: e.style.getPropertyPriority(n)
|
|
1843
|
+
}));
|
|
1844
|
+
}
|
|
1845
|
+
return {
|
|
1846
|
+
element: e,
|
|
1847
|
+
frozenPropertyValues: i,
|
|
1848
|
+
originalPropertyValues: a
|
|
1849
|
+
};
|
|
1850
|
+
};
|
|
1851
|
+
const Sa = (e, t) => {
|
|
1852
|
+
let n = [], r = Dn(e, t);
|
|
1853
|
+
for (; r && r !== document.documentElement && !In(r);) h$1(r) && n.push(r), r = E$1(r);
|
|
1854
|
+
return n;
|
|
1855
|
+
};
|
|
1856
|
+
const Ca = () => {
|
|
1857
|
+
let e = [], t = document.activeElement;
|
|
1858
|
+
for (; t && t !== document.body;) {
|
|
1859
|
+
if (h$1(t) && e.push(t), t.shadowRoot?.activeElement) {
|
|
1860
|
+
t = t.shadowRoot.activeElement;
|
|
1861
|
+
continue;
|
|
1862
|
+
}
|
|
1863
|
+
if (g$1(t)) {
|
|
1864
|
+
t = O$1(t)?.activeElement ?? null;
|
|
1865
|
+
continue;
|
|
1866
|
+
}
|
|
1867
|
+
t = null;
|
|
1868
|
+
}
|
|
1869
|
+
return e;
|
|
1870
|
+
};
|
|
1871
|
+
const wa = (e, t) => {
|
|
1872
|
+
for (let { element: n, frozenPropertyValues: r, originalPropertyValues: i } of e) {
|
|
1873
|
+
t.set(n, i);
|
|
1874
|
+
for (let [e, t] of r) n.style.setProperty(e, t, `important`);
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
const Ta = (e) => {
|
|
1878
|
+
let t = [];
|
|
1879
|
+
for (let [n, r] of e) {
|
|
1880
|
+
for (let [e, i] of r) try {
|
|
1881
|
+
i.value ? n.style.setProperty(e, i.value, i.priority) : n.style.removeProperty(e), r.delete(e);
|
|
1882
|
+
} catch (e) {
|
|
1883
|
+
t.push(e);
|
|
1884
|
+
}
|
|
1885
|
+
r.size === 0 && e.delete(n);
|
|
1886
|
+
}
|
|
1887
|
+
return t;
|
|
1888
|
+
};
|
|
1889
|
+
const Ea = (e, t) => {
|
|
1890
|
+
if (hr()) return null;
|
|
1891
|
+
let n = [], r = e !== void 0 && t !== void 0 && e >= 0 && t >= 0 && e < window.innerWidth && t < window.innerHeight ? Sa(e, t) : sa();
|
|
1892
|
+
for (let e of r) {
|
|
1893
|
+
let t = xa(e, ua);
|
|
1894
|
+
t && n.push(t);
|
|
1895
|
+
}
|
|
1896
|
+
let i = [];
|
|
1897
|
+
for (let e of Ca()) {
|
|
1898
|
+
let t = xa(e, da, pa);
|
|
1899
|
+
t && i.push(t);
|
|
1900
|
+
}
|
|
1901
|
+
return {
|
|
1902
|
+
hoverStates: n,
|
|
1903
|
+
focusStates: i
|
|
1904
|
+
};
|
|
1905
|
+
};
|
|
1906
|
+
const Da = (e) => {
|
|
1907
|
+
if (e) {
|
|
1908
|
+
ha = !0, ma.add(document);
|
|
1909
|
+
for (let e of ma) va(e);
|
|
1910
|
+
wa(e.hoverStates, fa), wa(e.focusStates, pa), _r();
|
|
1911
|
+
}
|
|
1912
|
+
};
|
|
1913
|
+
const Oa = () => {
|
|
1914
|
+
Ci(), ha = !1;
|
|
1915
|
+
for (let e of ma) ya(e);
|
|
1916
|
+
let e = [...Ta(fa), ...Ta(pa)];
|
|
1917
|
+
try {
|
|
1918
|
+
vr();
|
|
1919
|
+
} catch (t) {
|
|
1920
|
+
e.push(t);
|
|
1921
|
+
}
|
|
1922
|
+
M$1(e, `Unfreezing pseudo states failed`);
|
|
1923
|
+
};
|
|
1924
|
+
const ka = () => {
|
|
1925
|
+
let e = [];
|
|
1926
|
+
try {
|
|
1927
|
+
Tr();
|
|
1928
|
+
} catch (t) {
|
|
1929
|
+
e.push(t);
|
|
1930
|
+
}
|
|
1931
|
+
try {
|
|
1932
|
+
Oa();
|
|
1933
|
+
} catch (t) {
|
|
1934
|
+
e.push(t);
|
|
1935
|
+
}
|
|
1936
|
+
try {
|
|
1937
|
+
aa();
|
|
1938
|
+
} catch (t) {
|
|
1939
|
+
e.push(t);
|
|
1940
|
+
}
|
|
1941
|
+
return e;
|
|
1942
|
+
};
|
|
1943
|
+
const Aa = (e, t) => {
|
|
1944
|
+
let n = Ea(e, t), r = ra();
|
|
1945
|
+
try {
|
|
1946
|
+
Da(n), ia(r), wr();
|
|
1947
|
+
} catch (e) {
|
|
1948
|
+
let t = ka();
|
|
1949
|
+
throw t.length === 0 ? e : AggregateError([e, ...t], `Freezing global interactions failed`);
|
|
1950
|
+
}
|
|
1951
|
+
};
|
|
1952
|
+
const ja = () => {
|
|
1953
|
+
M$1(ka(), `Unfreezing global interactions failed`);
|
|
1954
|
+
};
|
|
1955
|
+
let Z$1 = !1;
|
|
1956
|
+
let Q$1 = 0;
|
|
1957
|
+
let Ma = 0;
|
|
1958
|
+
const Na = (e, t, n) => {
|
|
1959
|
+
let r = e.get(t);
|
|
1960
|
+
if (r) return r;
|
|
1961
|
+
let i = n();
|
|
1962
|
+
return e.set(t, i), i;
|
|
1963
|
+
};
|
|
1964
|
+
const Pa = /* @__PURE__ */ new WeakMap();
|
|
1965
|
+
const Fa = /* @__PURE__ */ new WeakMap();
|
|
1966
|
+
const Ia = /* @__PURE__ */ new WeakMap();
|
|
1967
|
+
const La = /* @__PURE__ */ new Set();
|
|
1968
|
+
const Ra = [];
|
|
1969
|
+
const $$1 = [];
|
|
1970
|
+
const za = /* @__PURE__ */ new WeakMap();
|
|
1971
|
+
const Ba = /* @__PURE__ */ new WeakMap();
|
|
1972
|
+
const Va = /* @__PURE__ */ new WeakSet();
|
|
1973
|
+
const Ha = bt$1;
|
|
1974
|
+
const Ua = /* @__PURE__ */ new Set();
|
|
1975
|
+
const Wa = /* @__PURE__ */ new WeakMap();
|
|
1976
|
+
Lt({
|
|
1977
|
+
name: `react-grab-freeze-updates`,
|
|
1978
|
+
onCommitFiberRoot: (e, t) => {
|
|
1979
|
+
let n = y$1().renderers.get(e);
|
|
1980
|
+
n && Wa.set(t, n);
|
|
1981
|
+
}
|
|
1982
|
+
});
|
|
1983
|
+
const Ga = (e) => {
|
|
1984
|
+
try {
|
|
1985
|
+
let t = e.rendererPackageName;
|
|
1986
|
+
return typeof t == `string` && t.startsWith(`react-dom`);
|
|
1987
|
+
} catch {
|
|
1988
|
+
return !1;
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
const Ka = (e) => {
|
|
1992
|
+
let t = e;
|
|
1993
|
+
for (; t.return;) t = t.return;
|
|
1994
|
+
return t.stateNode ?? null;
|
|
1995
|
+
};
|
|
1996
|
+
const qa = (e) => {
|
|
1997
|
+
let t = e.current, n = t;
|
|
1998
|
+
for (; n;) {
|
|
1999
|
+
let e = n.stateNode;
|
|
2000
|
+
if (e && typeof e == `object` && typeof Reflect.get(e, `nodeType`) == `number`) return e;
|
|
2001
|
+
if (n.child) {
|
|
2002
|
+
n = n.child;
|
|
2003
|
+
continue;
|
|
2004
|
+
}
|
|
2005
|
+
for (; n !== t && !n.sibling;) if (n = n.return, !n) return null;
|
|
2006
|
+
if (n === t) return null;
|
|
2007
|
+
n = n.sibling;
|
|
2008
|
+
}
|
|
2009
|
+
return null;
|
|
2010
|
+
};
|
|
2011
|
+
const Ja = (e) => {
|
|
2012
|
+
let t = Wa.get(e);
|
|
2013
|
+
if (t) return Ga(t) ? t : null;
|
|
2014
|
+
let n = Array.from(y$1().renderers.values()).filter(Ga);
|
|
2015
|
+
if (n.length === 1) {
|
|
2016
|
+
let t = n[0];
|
|
2017
|
+
return t && Wa.set(e, t), t ?? null;
|
|
2018
|
+
}
|
|
2019
|
+
let r = qa(e);
|
|
2020
|
+
if (!r) return null;
|
|
2021
|
+
for (let t of n) try {
|
|
2022
|
+
let n = t.findFiberByHostInstance?.(r);
|
|
2023
|
+
if (n && Ka(n) === e) return Wa.set(e, t), t;
|
|
2024
|
+
} catch {}
|
|
2025
|
+
return null;
|
|
2026
|
+
};
|
|
2027
|
+
const Ya = (e) => {
|
|
2028
|
+
let t = e.current?.stateNode;
|
|
2029
|
+
if (!t || typeof t != `object`) return !1;
|
|
2030
|
+
let n = Reflect.get(t, `containerInfo`);
|
|
2031
|
+
return !!(n && typeof n == `object` && typeof Reflect.get(n, `nodeType`) == `number`);
|
|
2032
|
+
};
|
|
2033
|
+
const Xa = () => {
|
|
2034
|
+
if (Ha.size > 0) {
|
|
2035
|
+
let e = /* @__PURE__ */ new Set();
|
|
2036
|
+
for (let t of Ha) Ya(t) && e.add(t);
|
|
2037
|
+
return e;
|
|
2038
|
+
}
|
|
2039
|
+
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
2040
|
+
let r = Bt(n);
|
|
2041
|
+
if (r) {
|
|
2042
|
+
let t = Ka(r);
|
|
2043
|
+
t && e.add(t);
|
|
2044
|
+
return;
|
|
2045
|
+
}
|
|
2046
|
+
for (let r of Array.from(n.children)) if (t(r), e.size > 0) return;
|
|
2047
|
+
};
|
|
2048
|
+
return t(document.body), e;
|
|
2049
|
+
};
|
|
2050
|
+
const Za = (e, t) => {
|
|
2051
|
+
if (!e) return t;
|
|
2052
|
+
if (!t) return e;
|
|
2053
|
+
if (!e.next || !t.next) return t;
|
|
2054
|
+
let n = e.next, r = t.next, i = e === n, a = t === r;
|
|
2055
|
+
return i && a ? (e.next = t, t.next = e) : i ? (e.next = r, t.next = e) : a ? (t.next = n, e.next = t) : (e.next = r, t.next = n), t;
|
|
2056
|
+
};
|
|
2057
|
+
const Qa = (e) => {
|
|
2058
|
+
if (!e || za.has(e)) return;
|
|
2059
|
+
let t = {
|
|
2060
|
+
originalPendingDescriptor: Object.getOwnPropertyDescriptor(e, `pending`),
|
|
2061
|
+
pendingValueAtPause: e.pending,
|
|
2062
|
+
bufferedPending: null
|
|
2063
|
+
};
|
|
2064
|
+
typeof e.getSnapshot == `function` && (t.originalGetSnapshot = e.getSnapshot, t.snapshotValueAtPause = e.getSnapshot(), e.getSnapshot = () => Z$1 ? t.snapshotValueAtPause : t.originalGetSnapshot());
|
|
2065
|
+
let n = t.pendingValueAtPause;
|
|
2066
|
+
Object.defineProperty(e, `pending`, {
|
|
2067
|
+
configurable: !0,
|
|
2068
|
+
enumerable: !0,
|
|
2069
|
+
get: () => Z$1 ? null : n,
|
|
2070
|
+
set: (e) => {
|
|
2071
|
+
if (Z$1) {
|
|
2072
|
+
e !== null && (t.bufferedPending = Za(t.bufferedPending ?? null, e));
|
|
2073
|
+
return;
|
|
2074
|
+
}
|
|
2075
|
+
n = e;
|
|
2076
|
+
}
|
|
2077
|
+
}), za.set(e, t);
|
|
2078
|
+
};
|
|
2079
|
+
const $a = (e) => {
|
|
2080
|
+
if (!e) return [];
|
|
2081
|
+
let t = [], n = e.next;
|
|
2082
|
+
if (!n) return [];
|
|
2083
|
+
let r = n;
|
|
2084
|
+
do
|
|
2085
|
+
r &&= (t.push(r.action), r.next);
|
|
2086
|
+
while (r && r !== n);
|
|
2087
|
+
return t;
|
|
2088
|
+
};
|
|
2089
|
+
const eo = (e) => {
|
|
2090
|
+
let t = za.get(e);
|
|
2091
|
+
if (!t) return;
|
|
2092
|
+
t.originalGetSnapshot && (e.getSnapshot = t.originalGetSnapshot), t.originalPendingDescriptor ? Object.defineProperty(e, `pending`, t.originalPendingDescriptor) : delete e.pending, e.pending = null;
|
|
2093
|
+
let n = e.dispatch;
|
|
2094
|
+
if (typeof n == `function`) {
|
|
2095
|
+
let e = $a(t.pendingValueAtPause ?? null), r = $a(t.bufferedPending ?? null);
|
|
2096
|
+
for (let t of [...e, ...r]) $$1.push(() => n(t));
|
|
2097
|
+
}
|
|
2098
|
+
za.delete(e);
|
|
2099
|
+
};
|
|
2100
|
+
const to = (e) => {
|
|
2101
|
+
if (Ba.has(e)) return;
|
|
2102
|
+
let t = {
|
|
2103
|
+
originalDescriptor: Object.getOwnPropertyDescriptor(e, `memoizedValue`),
|
|
2104
|
+
frozenValue: e.memoizedValue
|
|
2105
|
+
};
|
|
2106
|
+
Object.defineProperty(e, `memoizedValue`, {
|
|
2107
|
+
configurable: !0,
|
|
2108
|
+
enumerable: !0,
|
|
2109
|
+
get() {
|
|
2110
|
+
return Z$1 ? t.frozenValue : t.originalDescriptor?.get ? t.originalDescriptor.get.call(this) : this._memoizedValue;
|
|
2111
|
+
},
|
|
2112
|
+
set(e) {
|
|
2113
|
+
if (Z$1) {
|
|
2114
|
+
t.pendingValue = e, t.didReceivePendingValue = !0;
|
|
2115
|
+
return;
|
|
2116
|
+
}
|
|
2117
|
+
t.originalDescriptor?.set ? t.originalDescriptor.set.call(this, e) : this._memoizedValue = e;
|
|
2118
|
+
}
|
|
2119
|
+
}), t.originalDescriptor?.get || (e._memoizedValue = t.frozenValue), Ba.set(e, t);
|
|
2120
|
+
};
|
|
2121
|
+
const no = (e) => {
|
|
2122
|
+
let t = Ba.get(e);
|
|
2123
|
+
t && (t.originalDescriptor ? Object.defineProperty(e, `memoizedValue`, t.originalDescriptor) : delete e.memoizedValue, t.didReceivePendingValue && (e.memoizedValue = t.pendingValue), Ba.delete(e));
|
|
2124
|
+
};
|
|
2125
|
+
const ro = (e) => {
|
|
2126
|
+
let t = e.memoizedState;
|
|
2127
|
+
for (; t;) t.queue && typeof t.queue == `object` && Qa(t.queue), t = t.next;
|
|
2128
|
+
let n = e.dependencies?.firstContext;
|
|
2129
|
+
for (; n && typeof n == `object` && `memoizedValue` in n;) to(n), n = n.next;
|
|
2130
|
+
};
|
|
2131
|
+
const io = (e) => {
|
|
2132
|
+
let t = e.memoizedState;
|
|
2133
|
+
for (; t;) t.queue && typeof t.queue == `object` && eo(t.queue), t = t.next;
|
|
2134
|
+
let n = e.dependencies?.firstContext;
|
|
2135
|
+
for (; n && typeof n == `object` && `memoizedValue` in n;) no(n), n = n.next;
|
|
2136
|
+
};
|
|
2137
|
+
const ao = (e) => {
|
|
2138
|
+
let t = e;
|
|
2139
|
+
for (; t;) {
|
|
2140
|
+
if (lt$1(t) && ro(t), t.child) {
|
|
2141
|
+
t = t.child;
|
|
2142
|
+
continue;
|
|
2143
|
+
}
|
|
2144
|
+
for (; t !== e && !t.sibling;) if (t = t.return, !t) return;
|
|
2145
|
+
if (t === e) return;
|
|
2146
|
+
t = t.sibling;
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2149
|
+
const oo = (e) => {
|
|
2150
|
+
let t = e;
|
|
2151
|
+
for (; t;) {
|
|
2152
|
+
if (lt$1(t) && io(t), t.child) {
|
|
2153
|
+
t = t.child;
|
|
2154
|
+
continue;
|
|
2155
|
+
}
|
|
2156
|
+
for (; t !== e && !t.sibling;) if (t = t.return, !t) return;
|
|
2157
|
+
if (t === e) return;
|
|
2158
|
+
t = t.sibling;
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
const so = (e) => {
|
|
2162
|
+
if (Pa.has(e)) return;
|
|
2163
|
+
let t = e, n = {
|
|
2164
|
+
useState: t.useState,
|
|
2165
|
+
useReducer: t.useReducer,
|
|
2166
|
+
useTransition: t.useTransition,
|
|
2167
|
+
useSyncExternalStore: t.useSyncExternalStore
|
|
2168
|
+
};
|
|
2169
|
+
Pa.set(e, n), t.useState = (...t) => {
|
|
2170
|
+
let r = n.useState.apply(e, t);
|
|
2171
|
+
if (!Z$1 || !Array.isArray(r) || typeof r[1] != `function`) return r;
|
|
2172
|
+
let [i, a] = r;
|
|
2173
|
+
return [i, Na(Fa, a, () => (...e) => {
|
|
2174
|
+
Z$1 ? $$1.push(() => a(...e)) : a(...e);
|
|
2175
|
+
})];
|
|
2176
|
+
}, t.useReducer = (...t) => {
|
|
2177
|
+
let r = n.useReducer.apply(e, t);
|
|
2178
|
+
if (!Z$1 || !Array.isArray(r) || typeof r[1] != `function`) return r;
|
|
2179
|
+
let [i, a] = r;
|
|
2180
|
+
return [i, Na(Fa, a, () => (...e) => {
|
|
2181
|
+
Z$1 ? $$1.push(() => a(...e)) : a(...e);
|
|
2182
|
+
})];
|
|
2183
|
+
}, t.useTransition = (...t) => {
|
|
2184
|
+
let r = n.useTransition.apply(e, t);
|
|
2185
|
+
if (!Z$1 || !Array.isArray(r) || typeof r[1] != `function`) return r;
|
|
2186
|
+
let [i, a] = r;
|
|
2187
|
+
return [i, Na(Ia, a, () => (e) => {
|
|
2188
|
+
Z$1 ? Ra.push(() => a(e)) : a(e);
|
|
2189
|
+
})];
|
|
2190
|
+
}, t.useSyncExternalStore = ((e, t, r) => Z$1 ? n.useSyncExternalStore((t) => e(() => {
|
|
2191
|
+
Z$1 ? La.add(t) : t();
|
|
2192
|
+
}), t, r) : n.useSyncExternalStore(e, t, r));
|
|
2193
|
+
};
|
|
2194
|
+
const co = (e) => {
|
|
2195
|
+
let t = e.currentDispatcherRef;
|
|
2196
|
+
if (!t || typeof t != `object`) return;
|
|
2197
|
+
let n = `H` in t ? `H` : `current`, r = t[n];
|
|
2198
|
+
Object.defineProperty(t, n, {
|
|
2199
|
+
configurable: !0,
|
|
2200
|
+
enumerable: !0,
|
|
2201
|
+
get: () => (r && typeof r == `object` && so(r), r),
|
|
2202
|
+
set: (e) => {
|
|
2203
|
+
r = e;
|
|
2204
|
+
}
|
|
2205
|
+
});
|
|
2206
|
+
};
|
|
2207
|
+
const lo = (e, t) => {
|
|
2208
|
+
queueMicrotask(() => {
|
|
2209
|
+
if (!(Z$1 || Ma !== t)) try {
|
|
2210
|
+
for (let t of e) {
|
|
2211
|
+
let e = Ja(t);
|
|
2212
|
+
if (t.current && e?.scheduleUpdate) try {
|
|
2213
|
+
e.scheduleUpdate(t.current);
|
|
2214
|
+
} catch (e) {
|
|
2215
|
+
H$1(new T$1(`scheduleUpdate failed during unfreeze`, e));
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
} catch (e) {
|
|
2219
|
+
H$1(new T$1(`scheduleReactUpdate failed`, e));
|
|
2220
|
+
}
|
|
2221
|
+
});
|
|
2222
|
+
};
|
|
2223
|
+
const uo = (e) => {
|
|
2224
|
+
for (let t of e) try {
|
|
2225
|
+
t();
|
|
2226
|
+
} catch (e) {
|
|
2227
|
+
H$1(new T$1(`Callback failed during state replay`, e));
|
|
2228
|
+
}
|
|
2229
|
+
};
|
|
2230
|
+
const fo = () => {
|
|
2231
|
+
for (let e of y$1().renderers.values()) Ga(e) && (Va.has(e) || (co(e), Va.add(e)));
|
|
2232
|
+
};
|
|
2233
|
+
const po = () => {
|
|
2234
|
+
La.clear(), Ra.length = 0, $$1.length = 0;
|
|
2235
|
+
};
|
|
2236
|
+
const mo = () => {
|
|
2237
|
+
let e = Ma, t = new Set(Ua);
|
|
2238
|
+
try {
|
|
2239
|
+
for (let e of Xa()) t.add(e);
|
|
2240
|
+
} catch (e) {
|
|
2241
|
+
H$1(new T$1(`Collecting fiber roots failed during unfreeze`, e));
|
|
2242
|
+
}
|
|
2243
|
+
Ua.clear(), Z$1 = !1;
|
|
2244
|
+
for (let e of t) try {
|
|
2245
|
+
oo(e.current);
|
|
2246
|
+
} catch (e) {
|
|
2247
|
+
H$1(new T$1(`Resuming a fiber root failed during unfreeze`, e));
|
|
2248
|
+
}
|
|
2249
|
+
let n = Array.from(La), r = Ra.slice(), i = $$1.slice();
|
|
2250
|
+
po(), uo(n), uo(r), uo(i), !Z$1 && Ma === e && lo(t, e);
|
|
2251
|
+
};
|
|
2252
|
+
const ho = () => {
|
|
2253
|
+
let e = Q$1 === 0;
|
|
2254
|
+
if (Q$1 += 1, e) try {
|
|
2255
|
+
fo(), Ma += 1, Z$1 = !0;
|
|
2256
|
+
let e = Xa();
|
|
2257
|
+
for (let t of e) Ua.add(t), ao(t.current);
|
|
2258
|
+
} catch (e) {
|
|
2259
|
+
throw --Q$1, Z$1 && mo(), e;
|
|
2260
|
+
}
|
|
2261
|
+
let t = !1;
|
|
2262
|
+
return () => {
|
|
2263
|
+
t || (t = !0, --Q$1, Q$1 === 0 && mo());
|
|
2264
|
+
};
|
|
2265
|
+
};
|
|
2266
|
+
const go = () => {
|
|
2267
|
+
try {
|
|
2268
|
+
return ho();
|
|
2269
|
+
} catch (e) {
|
|
2270
|
+
return H$1(new T$1(`Pausing React updates failed`, e)), () => {};
|
|
2271
|
+
}
|
|
2272
|
+
};
|
|
2273
|
+
//#endregion
|
|
2274
|
+
//#region node_modules/.pnpm/react-grab@0.2.0_react@19.3.0/node_modules/react-grab/dist/execute-context-menu-action-Bbh74u99.js
|
|
2275
|
+
/**
|
|
2276
|
+
* @license MIT
|
|
2277
|
+
*
|
|
2278
|
+
* Copyright (c) 2025 Aiden Bai
|
|
2279
|
+
*
|
|
2280
|
+
* This source code is licensed under the MIT license found in the
|
|
2281
|
+
* LICENSE file in the root directory of this source tree.
|
|
2282
|
+
*/
|
|
2283
|
+
const c = {
|
|
2284
|
+
context: void 0,
|
|
2285
|
+
registry: void 0,
|
|
2286
|
+
effects: void 0,
|
|
2287
|
+
done: !1,
|
|
2288
|
+
getContextId() {
|
|
2289
|
+
return l(this.context.count);
|
|
2290
|
+
},
|
|
2291
|
+
getNextContextId() {
|
|
2292
|
+
return l(this.context.count++);
|
|
2293
|
+
}
|
|
2294
|
+
};
|
|
2295
|
+
function l(e) {
|
|
2296
|
+
let t = String(e), n = t.length - 1;
|
|
2297
|
+
return c.context.id + (n ? String.fromCharCode(96 + n) : ``) + t;
|
|
2298
|
+
}
|
|
2299
|
+
function u(e) {
|
|
2300
|
+
c.context = e;
|
|
2301
|
+
}
|
|
2302
|
+
const d = (e, t) => e === t;
|
|
2303
|
+
const f = Symbol(`solid-proxy`);
|
|
2304
|
+
const p = typeof Proxy == `function`;
|
|
2305
|
+
const m = Symbol(`solid-track`);
|
|
2306
|
+
const h = { equals: d };
|
|
2307
|
+
let g = me;
|
|
2308
|
+
const _ = {
|
|
2309
|
+
owned: null,
|
|
2310
|
+
cleanups: null,
|
|
2311
|
+
context: null,
|
|
2312
|
+
owner: null
|
|
2313
|
+
};
|
|
2314
|
+
const v = {};
|
|
2315
|
+
var y = null;
|
|
2316
|
+
let b = null;
|
|
2317
|
+
let x = null;
|
|
2318
|
+
let S = null;
|
|
2319
|
+
let C = null;
|
|
2320
|
+
let w = 0;
|
|
2321
|
+
function T(e, t) {
|
|
2322
|
+
let n = x, r = y, i = e.length === 0, a = t === void 0 ? r : t, o = i ? _ : {
|
|
2323
|
+
owned: null,
|
|
2324
|
+
cleanups: null,
|
|
2325
|
+
context: a ? a.context : null,
|
|
2326
|
+
owner: a
|
|
2327
|
+
}, s = i ? e : () => e(() => M(() => H(o)));
|
|
2328
|
+
y = o, x = null;
|
|
2329
|
+
try {
|
|
2330
|
+
return B(s, !0);
|
|
2331
|
+
} finally {
|
|
2332
|
+
x = n, y = r;
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
function E(e, t) {
|
|
2336
|
+
t = t ? Object.assign({}, h, t) : h;
|
|
2337
|
+
let n = {
|
|
2338
|
+
value: e,
|
|
2339
|
+
observers: null,
|
|
2340
|
+
observerSlots: null,
|
|
2341
|
+
comparator: t.equals || void 0
|
|
2342
|
+
};
|
|
2343
|
+
return [ue.bind(n), (e) => (typeof e == `function` && (e = b && b.running && b.sources.has(n) ? e(n.tValue) : e(n.value)), de(n, e))];
|
|
2344
|
+
}
|
|
2345
|
+
function ee(e, t, n) {
|
|
2346
|
+
L(R(e, t, !0, 1));
|
|
2347
|
+
}
|
|
2348
|
+
function D(e, t, n) {
|
|
2349
|
+
L(R(e, t, !1, 1));
|
|
2350
|
+
}
|
|
2351
|
+
function O(e, t, n) {
|
|
2352
|
+
g = he;
|
|
2353
|
+
let r = R(e, t, !1, 1), i = I && F(I);
|
|
2354
|
+
i && (r.suspense = i), (!n || !n.render) && (r.user = !0), C ? C.push(r) : L(r);
|
|
2355
|
+
}
|
|
2356
|
+
function k(e, t, n) {
|
|
2357
|
+
n = n ? Object.assign({}, h, n) : h;
|
|
2358
|
+
let r = R(e, t, !0, 0);
|
|
2359
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, L(r), ue.bind(r);
|
|
2360
|
+
}
|
|
2361
|
+
function te(e) {
|
|
2362
|
+
return e && typeof e == `object` && `then` in e;
|
|
2363
|
+
}
|
|
2364
|
+
function A(e, t, n) {
|
|
2365
|
+
let r, i, a;
|
|
2366
|
+
typeof t == `function` ? (r = e, i = t, a = n || {}) : (r = !0, i = e, a = t || {});
|
|
2367
|
+
let o = null, s = v, l = null, u = !1, d = !1, f = `initialValue` in a, p = typeof r == `function` && k(r), m = /* @__PURE__ */ new Set(), [h, g] = (a.storage || E)(a.initialValue), [_, S] = E(void 0), [C, w] = E(void 0, { equals: !1 }), [T, D] = E(f ? `ready` : `unresolved`);
|
|
2368
|
+
c.context && (l = c.getNextContextId(), a.ssrLoadFrom === `initial` ? s = a.initialValue : c.load && c.has(l) && (s = c.load(l)));
|
|
2369
|
+
function O(e, t, n, r) {
|
|
2370
|
+
return o === e && (o = null, r !== void 0 && (f = !0), (e === s || t === s) && a.onHydrated && queueMicrotask(() => a.onHydrated(r, { value: t })), s = v, b && e && u ? (b.promises.delete(e), u = !1, B(() => {
|
|
2371
|
+
b.running = !0, A(t, n);
|
|
2372
|
+
}, !1)) : A(t, n)), t;
|
|
2373
|
+
}
|
|
2374
|
+
function A(e, t) {
|
|
2375
|
+
B(() => {
|
|
2376
|
+
t === void 0 && g(() => e), D(t === void 0 ? f ? `ready` : `unresolved` : `errored`), S(t);
|
|
2377
|
+
for (let e of m.keys()) e.decrement();
|
|
2378
|
+
m.clear();
|
|
2379
|
+
}, !1);
|
|
2380
|
+
}
|
|
2381
|
+
function j() {
|
|
2382
|
+
let e = I && F(I), t = h(), n = _();
|
|
2383
|
+
if (n !== void 0 && !o) throw n;
|
|
2384
|
+
return x && !x.user && e && ee(() => {
|
|
2385
|
+
C(), o && (e.resolved && b && u ? b.promises.add(o) : m.has(e) || (e.increment(), m.add(e)));
|
|
2386
|
+
}), t;
|
|
2387
|
+
}
|
|
2388
|
+
function N(e = !0) {
|
|
2389
|
+
if (e !== !1 && d) return;
|
|
2390
|
+
d = !1;
|
|
2391
|
+
let t = p ? p() : r;
|
|
2392
|
+
if (u = b && b.running, t == null || t === !1) {
|
|
2393
|
+
O(o, M(h));
|
|
2394
|
+
return;
|
|
2395
|
+
}
|
|
2396
|
+
b && o && b.promises.delete(o);
|
|
2397
|
+
let n, a = s === v ? M(() => {
|
|
2398
|
+
try {
|
|
2399
|
+
return i(t, {
|
|
2400
|
+
value: h(),
|
|
2401
|
+
refetching: e
|
|
2402
|
+
});
|
|
2403
|
+
} catch (e) {
|
|
2404
|
+
n = e;
|
|
2405
|
+
}
|
|
2406
|
+
}) : s;
|
|
2407
|
+
if (n !== void 0) {
|
|
2408
|
+
O(o, void 0, U(n), t);
|
|
2409
|
+
return;
|
|
2410
|
+
} else if (!te(a)) return O(o, a, void 0, t), a;
|
|
2411
|
+
return o = a, `v` in a ? (a.s === 1 ? O(o, a.v, void 0, t) : O(o, void 0, U(a.v), t), a) : (d = !0, queueMicrotask(() => d = !1), B(() => {
|
|
2412
|
+
D(f ? `refreshing` : `pending`), w();
|
|
2413
|
+
}, !1), a.then((e) => O(a, e, void 0, t), (e) => O(a, void 0, U(e), t)));
|
|
2414
|
+
}
|
|
2415
|
+
Object.defineProperties(j, {
|
|
2416
|
+
state: { get: () => T() },
|
|
2417
|
+
error: { get: () => _() },
|
|
2418
|
+
loading: { get() {
|
|
2419
|
+
let e = T();
|
|
2420
|
+
return e === `pending` || e === `refreshing`;
|
|
2421
|
+
} },
|
|
2422
|
+
latest: { get() {
|
|
2423
|
+
if (!f) return j();
|
|
2424
|
+
let e = _();
|
|
2425
|
+
if (e && !o) throw e;
|
|
2426
|
+
return h();
|
|
2427
|
+
} }
|
|
2428
|
+
});
|
|
2429
|
+
let P = y;
|
|
2430
|
+
return p ? ee(() => (P = y, N(!1))) : N(!1), [j, {
|
|
2431
|
+
refetch: (e) => ae(P, () => N(e)),
|
|
2432
|
+
mutate: g
|
|
2433
|
+
}];
|
|
2434
|
+
}
|
|
2435
|
+
function j(e) {
|
|
2436
|
+
return B(e, !1);
|
|
2437
|
+
}
|
|
2438
|
+
function M(e) {
|
|
2439
|
+
if (x === null) return e();
|
|
2440
|
+
let t = x;
|
|
2441
|
+
x = null;
|
|
2442
|
+
try {
|
|
2443
|
+
return e();
|
|
2444
|
+
} finally {
|
|
2445
|
+
x = t;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
function N(e, t, n) {
|
|
2449
|
+
let r = Array.isArray(e), i, a = n && n.defer;
|
|
2450
|
+
return (n) => {
|
|
2451
|
+
let o;
|
|
2452
|
+
if (r) {
|
|
2453
|
+
o = Array(e.length);
|
|
2454
|
+
for (let t = 0; t < e.length; t++) o[t] = e[t]();
|
|
2455
|
+
} else o = e();
|
|
2456
|
+
if (a) return a = !1, n;
|
|
2457
|
+
let s = M(() => t(o, i, n));
|
|
2458
|
+
return i = o, s;
|
|
2459
|
+
};
|
|
2460
|
+
}
|
|
2461
|
+
function P(e) {
|
|
2462
|
+
O(() => M(e));
|
|
2463
|
+
}
|
|
2464
|
+
function ne(e) {
|
|
2465
|
+
return y === null || (y.cleanups === null ? y.cleanups = [e] : y.cleanups.push(e)), e;
|
|
2466
|
+
}
|
|
2467
|
+
function re() {
|
|
2468
|
+
return x;
|
|
2469
|
+
}
|
|
2470
|
+
function ie() {
|
|
2471
|
+
return y;
|
|
2472
|
+
}
|
|
2473
|
+
function ae(e, t) {
|
|
2474
|
+
let n = y, r = x;
|
|
2475
|
+
y = e, x = null;
|
|
2476
|
+
try {
|
|
2477
|
+
return B(t, !0);
|
|
2478
|
+
} catch (e) {
|
|
2479
|
+
W(e);
|
|
2480
|
+
} finally {
|
|
2481
|
+
y = n, x = r;
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
const [oe, se] = E(!1);
|
|
2485
|
+
function ce(e, t) {
|
|
2486
|
+
let n = Symbol(`context`);
|
|
2487
|
+
return {
|
|
2488
|
+
id: n,
|
|
2489
|
+
Provider: ve(n),
|
|
2490
|
+
defaultValue: e
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
function F(e) {
|
|
2494
|
+
let t;
|
|
2495
|
+
return y && y.context && (t = y.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2496
|
+
}
|
|
2497
|
+
function le(e) {
|
|
2498
|
+
let t = k(e), n = k(() => G(t()));
|
|
2499
|
+
return n.toArray = () => {
|
|
2500
|
+
let e = n();
|
|
2501
|
+
return Array.isArray(e) ? e : e == null ? [] : [e];
|
|
2502
|
+
}, n;
|
|
2503
|
+
}
|
|
2504
|
+
let I;
|
|
2505
|
+
function ue() {
|
|
2506
|
+
let e = b && b.running;
|
|
2507
|
+
if (this.sources && (e ? this.tState : this.state)) if ((e ? this.tState : this.state) === 1) L(this);
|
|
2508
|
+
else {
|
|
2509
|
+
let e = S;
|
|
2510
|
+
S = null, B(() => V(this), !1), S = e;
|
|
2511
|
+
}
|
|
2512
|
+
if (x) {
|
|
2513
|
+
let e = this.observers ? this.observers.length : 0;
|
|
2514
|
+
x.sources ? (x.sources.push(this), x.sourceSlots.push(e)) : (x.sources = [this], x.sourceSlots = [e]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
|
|
2515
|
+
}
|
|
2516
|
+
return e && b.sources.has(this) ? this.tValue : this.value;
|
|
2517
|
+
}
|
|
2518
|
+
function de(e, t, n) {
|
|
2519
|
+
let r = b && b.running && b.sources.has(e) ? e.tValue : e.value;
|
|
2520
|
+
if (!e.comparator || !e.comparator(r, t)) {
|
|
2521
|
+
if (b) {
|
|
2522
|
+
let r = b.running;
|
|
2523
|
+
(r || !n && b.sources.has(e)) && (b.sources.add(e), e.tValue = t), r || (e.value = t);
|
|
2524
|
+
} else e.value = t;
|
|
2525
|
+
e.observers && e.observers.length && B(() => {
|
|
2526
|
+
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2527
|
+
let n = e.observers[t], r = b && b.running;
|
|
2528
|
+
r && b.disposed.has(n) || ((r ? !n.tState : !n.state) && (n.pure ? S.push(n) : C.push(n), n.observers && ge(n)), r ? n.tState = 1 : n.state = 1);
|
|
2529
|
+
}
|
|
2530
|
+
if (S.length > 1e6) throw S = [], Error();
|
|
2531
|
+
}, !1);
|
|
2532
|
+
}
|
|
2533
|
+
return t;
|
|
2534
|
+
}
|
|
2535
|
+
function L(e) {
|
|
2536
|
+
if (!e.fn) return;
|
|
2537
|
+
H(e);
|
|
2538
|
+
let t = w;
|
|
2539
|
+
fe(e, b && b.running && b.sources.has(e) ? e.tValue : e.value, t), b && !b.running && b.sources.has(e) && queueMicrotask(() => {
|
|
2540
|
+
B(() => {
|
|
2541
|
+
b && (b.running = !0), x = y = e, fe(e, e.tValue, t), x = y = null;
|
|
2542
|
+
}, !1);
|
|
2543
|
+
});
|
|
2544
|
+
}
|
|
2545
|
+
function fe(e, t, n) {
|
|
2546
|
+
let r, i = y, a = x;
|
|
2547
|
+
x = y = e;
|
|
2548
|
+
try {
|
|
2549
|
+
r = e.fn(t);
|
|
2550
|
+
} catch (t) {
|
|
2551
|
+
return e.pure && (b && b.running ? (e.tState = 1, e.tOwned && e.tOwned.forEach(H), e.tOwned = void 0) : (e.state = 1, e.owned && e.owned.forEach(H), e.owned = null)), e.updatedAt = n + 1, W(t);
|
|
2552
|
+
} finally {
|
|
2553
|
+
x = a, y = i;
|
|
2554
|
+
}
|
|
2555
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && `observers` in e ? de(e, r, !0) : b && b.running && e.pure ? (b.sources.has(e) || (e.value = r), b.sources.add(e), e.tValue = r) : e.value = r, e.updatedAt = n);
|
|
2556
|
+
}
|
|
2557
|
+
function R(e, t, n, r = 1, i) {
|
|
2558
|
+
let a = {
|
|
2559
|
+
fn: e,
|
|
2560
|
+
state: r,
|
|
2561
|
+
updatedAt: null,
|
|
2562
|
+
owned: null,
|
|
2563
|
+
sources: null,
|
|
2564
|
+
sourceSlots: null,
|
|
2565
|
+
cleanups: null,
|
|
2566
|
+
value: t,
|
|
2567
|
+
owner: y,
|
|
2568
|
+
context: y ? y.context : null,
|
|
2569
|
+
pure: n
|
|
2570
|
+
};
|
|
2571
|
+
return b && b.running && (a.state = 0, a.tState = r), y === null || y !== _ && (b && b.running && y.pure ? y.tOwned ? y.tOwned.push(a) : y.tOwned = [a] : y.owned ? y.owned.push(a) : y.owned = [a]), a;
|
|
2572
|
+
}
|
|
2573
|
+
function z(e) {
|
|
2574
|
+
let t = b && b.running;
|
|
2575
|
+
if ((t ? e.tState : e.state) === 0) return;
|
|
2576
|
+
if ((t ? e.tState : e.state) === 2) return V(e);
|
|
2577
|
+
if (e.suspense && M(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2578
|
+
let n = [e];
|
|
2579
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < w);) {
|
|
2580
|
+
if (t && b.disposed.has(e)) return;
|
|
2581
|
+
(t ? e.tState : e.state) && n.push(e);
|
|
2582
|
+
}
|
|
2583
|
+
for (let r = n.length - 1; r >= 0; r--) {
|
|
2584
|
+
if (e = n[r], t) {
|
|
2585
|
+
let t = e, i = n[r + 1];
|
|
2586
|
+
for (; (t = t.owner) && t !== i;) if (b.disposed.has(t)) return;
|
|
2587
|
+
}
|
|
2588
|
+
if ((t ? e.tState : e.state) === 1) L(e);
|
|
2589
|
+
else if ((t ? e.tState : e.state) === 2) {
|
|
2590
|
+
let t = S;
|
|
2591
|
+
S = null, B(() => V(e, n[0]), !1), S = t;
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
function B(e, t) {
|
|
2596
|
+
if (S) return e();
|
|
2597
|
+
let n = !1;
|
|
2598
|
+
t || (S = []), C ? n = !0 : C = [], w++;
|
|
2599
|
+
try {
|
|
2600
|
+
let t = e();
|
|
2601
|
+
return pe(n), t;
|
|
2602
|
+
} catch (e) {
|
|
2603
|
+
n || (C = null), S = null, W(e);
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
function pe(e) {
|
|
2607
|
+
if (S &&= (me(S), null), e) return;
|
|
2608
|
+
let t;
|
|
2609
|
+
if (b) {
|
|
2610
|
+
if (!b.promises.size && !b.queue.size) {
|
|
2611
|
+
let e = b.sources, n = b.disposed;
|
|
2612
|
+
C.push.apply(C, b.effects), t = b.resolve;
|
|
2613
|
+
for (let e of C) `tState` in e && (e.state = e.tState), delete e.tState;
|
|
2614
|
+
b = null, B(() => {
|
|
2615
|
+
for (let e of n) H(e);
|
|
2616
|
+
for (let t of e) {
|
|
2617
|
+
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++) H(t.owned[e]);
|
|
2618
|
+
t.tOwned && (t.owned = t.tOwned), delete t.tValue, delete t.tOwned, t.tState = 0;
|
|
2619
|
+
}
|
|
2620
|
+
se(!1);
|
|
2621
|
+
}, !1);
|
|
2622
|
+
} else if (b.running) {
|
|
2623
|
+
b.running = !1, b.effects.push.apply(b.effects, C), C = null, se(!0);
|
|
2624
|
+
return;
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
let n = C;
|
|
2628
|
+
C = null, n.length && B(() => g(n), !1), t && t();
|
|
2629
|
+
}
|
|
2630
|
+
function me(e) {
|
|
2631
|
+
for (let t = 0; t < e.length; t++) z(e[t]);
|
|
2632
|
+
}
|
|
2633
|
+
function he(e) {
|
|
2634
|
+
let t, n = 0;
|
|
2635
|
+
for (t = 0; t < e.length; t++) {
|
|
2636
|
+
let r = e[t];
|
|
2637
|
+
r.user ? e[n++] = r : z(r);
|
|
2638
|
+
}
|
|
2639
|
+
if (c.context) {
|
|
2640
|
+
if (c.count) {
|
|
2641
|
+
c.effects ||= [], c.effects.push(...e.slice(0, n));
|
|
2642
|
+
return;
|
|
2643
|
+
}
|
|
2644
|
+
u();
|
|
2645
|
+
}
|
|
2646
|
+
for (c.effects && (c.done || !c.count) && (e = [...c.effects, ...e], n += c.effects.length, delete c.effects), t = 0; t < n; t++) z(e[t]);
|
|
2647
|
+
}
|
|
2648
|
+
function V(e, t) {
|
|
2649
|
+
let n = b && b.running;
|
|
2650
|
+
n ? e.tState = 0 : e.state = 0;
|
|
2651
|
+
for (let r = 0; r < e.sources.length; r += 1) {
|
|
2652
|
+
let i = e.sources[r];
|
|
2653
|
+
if (i.sources) {
|
|
2654
|
+
let e = n ? i.tState : i.state;
|
|
2655
|
+
e === 1 ? i !== t && (!i.updatedAt || i.updatedAt < w) && z(i) : e === 2 && V(i, t);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
function ge(e) {
|
|
2660
|
+
let t = b && b.running;
|
|
2661
|
+
for (let n = 0; n < e.observers.length; n += 1) {
|
|
2662
|
+
let r = e.observers[n];
|
|
2663
|
+
(t ? !r.tState : !r.state) && (t ? r.tState = 2 : r.state = 2, r.pure ? S.push(r) : C.push(r), r.observers && ge(r));
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
function H(e) {
|
|
2667
|
+
let t;
|
|
2668
|
+
if (e.sources) for (; e.sources.length;) {
|
|
2669
|
+
let t = e.sources.pop(), n = e.sourceSlots.pop(), r = t.observers;
|
|
2670
|
+
if (r && r.length) {
|
|
2671
|
+
let e = r.pop(), i = t.observerSlots.pop();
|
|
2672
|
+
n < r.length && (e.sourceSlots[i] = n, r[n] = e, t.observerSlots[n] = i);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
if (e.tOwned) {
|
|
2676
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) H(e.tOwned[t]);
|
|
2677
|
+
delete e.tOwned;
|
|
2678
|
+
}
|
|
2679
|
+
if (b && b.running && e.pure) _e(e, !0);
|
|
2680
|
+
else if (e.owned) {
|
|
2681
|
+
for (t = e.owned.length - 1; t >= 0; t--) H(e.owned[t]);
|
|
2682
|
+
e.owned = null;
|
|
2683
|
+
}
|
|
2684
|
+
if (e.cleanups) {
|
|
2685
|
+
for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
|
|
2686
|
+
e.cleanups = null;
|
|
2687
|
+
}
|
|
2688
|
+
b && b.running ? e.tState = 0 : e.state = 0;
|
|
2689
|
+
}
|
|
2690
|
+
function _e(e, t) {
|
|
2691
|
+
if (t || (e.tState = 0, b.disposed.add(e)), e.owned) for (let t = 0; t < e.owned.length; t++) _e(e.owned[t]);
|
|
2692
|
+
}
|
|
2693
|
+
function U(e) {
|
|
2694
|
+
return e instanceof Error ? e : Error(typeof e == `string` ? e : `Unknown error`, { cause: e });
|
|
2695
|
+
}
|
|
2696
|
+
function W(e, t = y) {
|
|
2697
|
+
throw U(e);
|
|
2698
|
+
}
|
|
2699
|
+
function G(e) {
|
|
2700
|
+
if (typeof e == `function` && !e.length) return G(e());
|
|
2701
|
+
if (Array.isArray(e)) {
|
|
2702
|
+
let t = [];
|
|
2703
|
+
for (let n = 0; n < e.length; n++) {
|
|
2704
|
+
let r = G(e[n]);
|
|
2705
|
+
Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
|
|
2706
|
+
}
|
|
2707
|
+
return t;
|
|
2708
|
+
}
|
|
2709
|
+
return e;
|
|
2710
|
+
}
|
|
2711
|
+
function ve(e, t) {
|
|
2712
|
+
return function(t) {
|
|
2713
|
+
let n;
|
|
2714
|
+
return D(() => n = M(() => (y.context = {
|
|
2715
|
+
...y.context,
|
|
2716
|
+
[e]: t.value
|
|
2717
|
+
}, le(() => t.children))), void 0), n;
|
|
2718
|
+
};
|
|
2719
|
+
}
|
|
2720
|
+
const ye = Symbol(`fallback`);
|
|
2721
|
+
function be(e) {
|
|
2722
|
+
for (let t = 0; t < e.length; t++) e[t]();
|
|
2723
|
+
}
|
|
2724
|
+
function xe(e, t, n = {}) {
|
|
2725
|
+
let r = [], i = [], a = [], o = 0, s = t.length > 1 ? [] : null;
|
|
2726
|
+
return ne(() => be(a)), () => {
|
|
2727
|
+
let c = e() || [], l = c.length, u, d;
|
|
2728
|
+
return c[m], M(() => {
|
|
2729
|
+
let e, t, p, m, h, g, _, v, y;
|
|
2730
|
+
if (l === 0) o !== 0 && (be(a), a = [], r = [], i = [], o = 0, s &&= []), n.fallback && (r = [ye], i[0] = T((e) => (a[0] = e, n.fallback())), o = 1);
|
|
2731
|
+
else if (o === 0) {
|
|
2732
|
+
for (i = Array(l), d = 0; d < l; d++) r[d] = c[d], i[d] = T(f);
|
|
2733
|
+
o = l;
|
|
2734
|
+
} else {
|
|
2735
|
+
for (p = Array(l), m = Array(l), s && (h = Array(l)), g = 0, _ = Math.min(o, l); g < _ && r[g] === c[g]; g++);
|
|
2736
|
+
for (_ = o - 1, v = l - 1; _ >= g && v >= g && r[_] === c[v]; _--, v--) p[v] = i[_], m[v] = a[_], s && (h[v] = s[_]);
|
|
2737
|
+
for (e = /* @__PURE__ */ new Map(), t = Array(v + 1), d = v; d >= g; d--) y = c[d], u = e.get(y), t[d] = u === void 0 ? -1 : u, e.set(y, d);
|
|
2738
|
+
for (u = g; u <= _; u++) y = r[u], d = e.get(y), d !== void 0 && d !== -1 ? (p[d] = i[u], m[d] = a[u], s && (h[d] = s[u]), d = t[d], e.set(y, d)) : a[u]();
|
|
2739
|
+
for (d = g; d < l; d++) d in p ? (i[d] = p[d], a[d] = m[d], s && (s[d] = h[d], s[d](d))) : i[d] = T(f);
|
|
2740
|
+
i = i.slice(0, o = l), r = c.slice(0);
|
|
2741
|
+
}
|
|
2742
|
+
return i;
|
|
2743
|
+
});
|
|
2744
|
+
function f(e) {
|
|
2745
|
+
if (a[d] = e, s) {
|
|
2746
|
+
let [e, n] = E(d);
|
|
2747
|
+
return s[d] = n, t(c[d], e);
|
|
2748
|
+
}
|
|
2749
|
+
return t(c[d]);
|
|
2750
|
+
}
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
2753
|
+
function Se(e, t) {
|
|
2754
|
+
return M(() => e(t || {}));
|
|
2755
|
+
}
|
|
2756
|
+
function K() {
|
|
2757
|
+
return !0;
|
|
2758
|
+
}
|
|
2759
|
+
const q = {
|
|
2760
|
+
get(e, t, n) {
|
|
2761
|
+
return t === f ? n : e.get(t);
|
|
2762
|
+
},
|
|
2763
|
+
has(e, t) {
|
|
2764
|
+
return t === f ? !0 : e.has(t);
|
|
2765
|
+
},
|
|
2766
|
+
set: K,
|
|
2767
|
+
deleteProperty: K,
|
|
2768
|
+
getOwnPropertyDescriptor(e, t) {
|
|
2769
|
+
return {
|
|
2770
|
+
configurable: !0,
|
|
2771
|
+
enumerable: !0,
|
|
2772
|
+
get() {
|
|
2773
|
+
return e.get(t);
|
|
2774
|
+
},
|
|
2775
|
+
set: K,
|
|
2776
|
+
deleteProperty: K
|
|
2777
|
+
};
|
|
2778
|
+
},
|
|
2779
|
+
ownKeys(e) {
|
|
2780
|
+
return e.keys();
|
|
2781
|
+
}
|
|
2782
|
+
};
|
|
2783
|
+
function J(e) {
|
|
2784
|
+
return (e = typeof e == `function` ? e() : e) ? e : {};
|
|
2785
|
+
}
|
|
2786
|
+
function Ce() {
|
|
2787
|
+
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2788
|
+
let t = this[e]();
|
|
2789
|
+
if (t !== void 0) return t;
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
function we(...e) {
|
|
2793
|
+
let t = !1;
|
|
2794
|
+
for (let n = 0; n < e.length; n++) {
|
|
2795
|
+
let r = e[n];
|
|
2796
|
+
t ||= !!r && f in r, e[n] = typeof r == `function` ? (t = !0, k(r)) : r;
|
|
2797
|
+
}
|
|
2798
|
+
if (p && t) return new Proxy({
|
|
2799
|
+
get(t) {
|
|
2800
|
+
for (let n = e.length - 1; n >= 0; n--) {
|
|
2801
|
+
let r = J(e[n])[t];
|
|
2802
|
+
if (r !== void 0) return r;
|
|
2803
|
+
}
|
|
2804
|
+
},
|
|
2805
|
+
has(t) {
|
|
2806
|
+
for (let n = e.length - 1; n >= 0; n--) if (t in J(e[n])) return !0;
|
|
2807
|
+
return !1;
|
|
2808
|
+
},
|
|
2809
|
+
keys() {
|
|
2810
|
+
let t = [];
|
|
2811
|
+
for (let n = 0; n < e.length; n++) t.push(...Object.keys(J(e[n])));
|
|
2812
|
+
return [...new Set(t)];
|
|
2813
|
+
}
|
|
2814
|
+
}, q);
|
|
2815
|
+
let n = {}, r = Object.create(null);
|
|
2816
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
2817
|
+
let i = e[t];
|
|
2818
|
+
if (!i) continue;
|
|
2819
|
+
let a = Object.getOwnPropertyNames(i);
|
|
2820
|
+
for (let e = a.length - 1; e >= 0; e--) {
|
|
2821
|
+
let t = a[e];
|
|
2822
|
+
if (t === `__proto__` || t === `constructor`) continue;
|
|
2823
|
+
let o = Object.getOwnPropertyDescriptor(i, t);
|
|
2824
|
+
if (!r[t]) r[t] = o.get ? {
|
|
2825
|
+
enumerable: !0,
|
|
2826
|
+
configurable: !0,
|
|
2827
|
+
get: Ce.bind(n[t] = [o.get.bind(i)])
|
|
2828
|
+
} : o.value === void 0 ? void 0 : o;
|
|
2829
|
+
else {
|
|
2830
|
+
let e = n[t];
|
|
2831
|
+
e && (o.get ? e.push(o.get.bind(i)) : o.value !== void 0 && e.push(() => o.value));
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
let i = {}, a = Object.keys(r);
|
|
2836
|
+
for (let e = a.length - 1; e >= 0; e--) {
|
|
2837
|
+
let t = a[e], n = r[t];
|
|
2838
|
+
n && n.get ? Object.defineProperty(i, t, n) : i[t] = n ? n.value : void 0;
|
|
2839
|
+
}
|
|
2840
|
+
return i;
|
|
2841
|
+
}
|
|
2842
|
+
function Te(e, ...t) {
|
|
2843
|
+
let n = t.length;
|
|
2844
|
+
if (p && f in e) {
|
|
2845
|
+
let r = n > 1 ? t.flat() : t[0], i = t.map((t) => new Proxy({
|
|
2846
|
+
get(n) {
|
|
2847
|
+
return t.includes(n) ? e[n] : void 0;
|
|
2848
|
+
},
|
|
2849
|
+
has(n) {
|
|
2850
|
+
return t.includes(n) && n in e;
|
|
2851
|
+
},
|
|
2852
|
+
keys() {
|
|
2853
|
+
return t.filter((t) => t in e);
|
|
2854
|
+
}
|
|
2855
|
+
}, q));
|
|
2856
|
+
return i.push(new Proxy({
|
|
2857
|
+
get(t) {
|
|
2858
|
+
return r.includes(t) ? void 0 : e[t];
|
|
2859
|
+
},
|
|
2860
|
+
has(t) {
|
|
2861
|
+
return r.includes(t) ? !1 : t in e;
|
|
2862
|
+
},
|
|
2863
|
+
keys() {
|
|
2864
|
+
return Object.keys(e).filter((e) => !r.includes(e));
|
|
2865
|
+
}
|
|
2866
|
+
}, q)), i;
|
|
2867
|
+
}
|
|
2868
|
+
let r = [];
|
|
2869
|
+
for (let e = 0; e <= n; e++) r[e] = {};
|
|
2870
|
+
for (let i of Object.getOwnPropertyNames(e)) {
|
|
2871
|
+
let a = n;
|
|
2872
|
+
for (let e = 0; e < t.length; e++) if (t[e].includes(i)) {
|
|
2873
|
+
a = e;
|
|
2874
|
+
break;
|
|
2875
|
+
}
|
|
2876
|
+
let o = Object.getOwnPropertyDescriptor(e, i);
|
|
2877
|
+
!o.get && !o.set && o.enumerable && o.writable && o.configurable ? r[a][i] = o.value : Object.defineProperty(r[a], i, o);
|
|
2878
|
+
}
|
|
2879
|
+
return r;
|
|
2880
|
+
}
|
|
2881
|
+
const Ee = (e) => `Stale read from <${e}>.`;
|
|
2882
|
+
function De(e) {
|
|
2883
|
+
let t = `fallback` in e && { fallback: () => e.fallback };
|
|
2884
|
+
return k(xe(() => e.each, e.children, t || void 0));
|
|
2885
|
+
}
|
|
2886
|
+
function Oe(e) {
|
|
2887
|
+
let t = e.keyed, n = k(() => e.when, void 0, void 0), r = t ? n : k(n, void 0, { equals: (e, t) => !e == !t });
|
|
2888
|
+
return k(() => {
|
|
2889
|
+
let i = r();
|
|
2890
|
+
if (i) {
|
|
2891
|
+
let a = e.children;
|
|
2892
|
+
return typeof a == `function` && a.length > 0 ? M(() => a(t ? i : () => {
|
|
2893
|
+
if (!M(r)) throw Ee(`Show`);
|
|
2894
|
+
return n();
|
|
2895
|
+
})) : a;
|
|
2896
|
+
}
|
|
2897
|
+
return e.fallback;
|
|
2898
|
+
}, void 0, void 0);
|
|
2899
|
+
}
|
|
2900
|
+
const ke = /* @__PURE__ */ new Set([
|
|
2901
|
+
`className`,
|
|
2902
|
+
`value`,
|
|
2903
|
+
`readOnly`,
|
|
2904
|
+
`noValidate`,
|
|
2905
|
+
`formNoValidate`,
|
|
2906
|
+
`isMap`,
|
|
2907
|
+
`noModule`,
|
|
2908
|
+
`playsInline`,
|
|
2909
|
+
`adAuctionHeaders`,
|
|
2910
|
+
`allowFullscreen`,
|
|
2911
|
+
`browsingTopics`,
|
|
2912
|
+
`defaultChecked`,
|
|
2913
|
+
`defaultMuted`,
|
|
2914
|
+
`defaultSelected`,
|
|
2915
|
+
`disablePictureInPicture`,
|
|
2916
|
+
`disableRemotePlayback`,
|
|
2917
|
+
`preservesPitch`,
|
|
2918
|
+
`shadowRootClonable`,
|
|
2919
|
+
`shadowRootCustomElementRegistry`,
|
|
2920
|
+
`shadowRootDelegatesFocus`,
|
|
2921
|
+
`shadowRootSerializable`,
|
|
2922
|
+
`sharedStorageWritable`,
|
|
2923
|
+
...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)
|
|
2924
|
+
]);
|
|
2925
|
+
const Ae = /* @__PURE__ */ new Set([
|
|
2926
|
+
`innerHTML`,
|
|
2927
|
+
`textContent`,
|
|
2928
|
+
`innerText`,
|
|
2929
|
+
`children`
|
|
2930
|
+
]);
|
|
2931
|
+
const je = Object.assign(Object.create(null), {
|
|
2932
|
+
className: `class`,
|
|
2933
|
+
htmlFor: `for`
|
|
2934
|
+
});
|
|
2935
|
+
const Me = Object.assign(Object.create(null), {
|
|
2936
|
+
class: `className`,
|
|
2937
|
+
novalidate: {
|
|
2938
|
+
$: `noValidate`,
|
|
2939
|
+
FORM: 1
|
|
2940
|
+
},
|
|
2941
|
+
formnovalidate: {
|
|
2942
|
+
$: `formNoValidate`,
|
|
2943
|
+
BUTTON: 1,
|
|
2944
|
+
INPUT: 1
|
|
2945
|
+
},
|
|
2946
|
+
ismap: {
|
|
2947
|
+
$: `isMap`,
|
|
2948
|
+
IMG: 1
|
|
2949
|
+
},
|
|
2950
|
+
nomodule: {
|
|
2951
|
+
$: `noModule`,
|
|
2952
|
+
SCRIPT: 1
|
|
2953
|
+
},
|
|
2954
|
+
playsinline: {
|
|
2955
|
+
$: `playsInline`,
|
|
2956
|
+
VIDEO: 1
|
|
2957
|
+
},
|
|
2958
|
+
readonly: {
|
|
2959
|
+
$: `readOnly`,
|
|
2960
|
+
INPUT: 1,
|
|
2961
|
+
TEXTAREA: 1
|
|
2962
|
+
},
|
|
2963
|
+
adauctionheaders: {
|
|
2964
|
+
$: `adAuctionHeaders`,
|
|
2965
|
+
IFRAME: 1
|
|
2966
|
+
},
|
|
2967
|
+
allowfullscreen: {
|
|
2968
|
+
$: `allowFullscreen`,
|
|
2969
|
+
IFRAME: 1
|
|
2970
|
+
},
|
|
2971
|
+
browsingtopics: {
|
|
2972
|
+
$: `browsingTopics`,
|
|
2973
|
+
IMG: 1
|
|
2974
|
+
},
|
|
2975
|
+
defaultchecked: {
|
|
2976
|
+
$: `defaultChecked`,
|
|
2977
|
+
INPUT: 1
|
|
2978
|
+
},
|
|
2979
|
+
defaultmuted: {
|
|
2980
|
+
$: `defaultMuted`,
|
|
2981
|
+
AUDIO: 1,
|
|
2982
|
+
VIDEO: 1
|
|
2983
|
+
},
|
|
2984
|
+
defaultselected: {
|
|
2985
|
+
$: `defaultSelected`,
|
|
2986
|
+
OPTION: 1
|
|
2987
|
+
},
|
|
2988
|
+
disablepictureinpicture: {
|
|
2989
|
+
$: `disablePictureInPicture`,
|
|
2990
|
+
VIDEO: 1
|
|
2991
|
+
},
|
|
2992
|
+
disableremoteplayback: {
|
|
2993
|
+
$: `disableRemotePlayback`,
|
|
2994
|
+
AUDIO: 1,
|
|
2995
|
+
VIDEO: 1
|
|
2996
|
+
},
|
|
2997
|
+
preservespitch: {
|
|
2998
|
+
$: `preservesPitch`,
|
|
2999
|
+
AUDIO: 1,
|
|
3000
|
+
VIDEO: 1
|
|
3001
|
+
},
|
|
3002
|
+
shadowrootclonable: {
|
|
3003
|
+
$: `shadowRootClonable`,
|
|
3004
|
+
TEMPLATE: 1
|
|
3005
|
+
},
|
|
3006
|
+
shadowrootdelegatesfocus: {
|
|
3007
|
+
$: `shadowRootDelegatesFocus`,
|
|
3008
|
+
TEMPLATE: 1
|
|
3009
|
+
},
|
|
3010
|
+
shadowrootserializable: {
|
|
3011
|
+
$: `shadowRootSerializable`,
|
|
3012
|
+
TEMPLATE: 1
|
|
3013
|
+
},
|
|
3014
|
+
sharedstoragewritable: {
|
|
3015
|
+
$: `sharedStorageWritable`,
|
|
3016
|
+
IFRAME: 1,
|
|
3017
|
+
IMG: 1
|
|
3018
|
+
}
|
|
3019
|
+
});
|
|
3020
|
+
function Ne(e, t) {
|
|
3021
|
+
let n = Me[e];
|
|
3022
|
+
return typeof n == `object` ? n[t] ? n.$ : void 0 : n;
|
|
3023
|
+
}
|
|
3024
|
+
const Pe = /* @__PURE__ */ new Set([
|
|
3025
|
+
`beforeinput`,
|
|
3026
|
+
`click`,
|
|
3027
|
+
`dblclick`,
|
|
3028
|
+
`contextmenu`,
|
|
3029
|
+
`focusin`,
|
|
3030
|
+
`focusout`,
|
|
3031
|
+
`input`,
|
|
3032
|
+
`keydown`,
|
|
3033
|
+
`keyup`,
|
|
3034
|
+
`mousedown`,
|
|
3035
|
+
`mousemove`,
|
|
3036
|
+
`mouseout`,
|
|
3037
|
+
`mouseover`,
|
|
3038
|
+
`mouseup`,
|
|
3039
|
+
`pointerdown`,
|
|
3040
|
+
`pointermove`,
|
|
3041
|
+
`pointerout`,
|
|
3042
|
+
`pointerover`,
|
|
3043
|
+
`pointerup`,
|
|
3044
|
+
`touchend`,
|
|
3045
|
+
`touchmove`,
|
|
3046
|
+
`touchstart`
|
|
3047
|
+
]);
|
|
3048
|
+
const Fe = {
|
|
3049
|
+
xlink: `http://www.w3.org/1999/xlink`,
|
|
3050
|
+
xml: `http://www.w3.org/XML/1998/namespace`
|
|
3051
|
+
};
|
|
3052
|
+
const Ie = (e) => k(() => e());
|
|
3053
|
+
function Le(e, t, n) {
|
|
3054
|
+
let r = n.length, i = t.length, a = r, o = 0, s = 0, c = t[i - 1].nextSibling, l = null;
|
|
3055
|
+
for (; o < i || s < a;) {
|
|
3056
|
+
if (t[o] === n[s]) {
|
|
3057
|
+
o++, s++;
|
|
3058
|
+
continue;
|
|
3059
|
+
}
|
|
3060
|
+
for (; t[i - 1] === n[a - 1];) i--, a--;
|
|
3061
|
+
if (i === o) {
|
|
3062
|
+
let t = a < r ? s ? n[s - 1].nextSibling : n[a - s] : c;
|
|
3063
|
+
for (; s < a;) e.insertBefore(n[s++], t);
|
|
3064
|
+
} else if (a === s) for (; o < i;) (!l || !l.has(t[o])) && t[o].remove(), o++;
|
|
3065
|
+
else if (t[o] === n[a - 1] && n[s] === t[i - 1]) {
|
|
3066
|
+
let r = t[--i].nextSibling;
|
|
3067
|
+
e.insertBefore(n[s++], t[o++].nextSibling), e.insertBefore(n[--a], r), t[i] = n[a];
|
|
3068
|
+
} else {
|
|
3069
|
+
if (!l) {
|
|
3070
|
+
l = /* @__PURE__ */ new Map();
|
|
3071
|
+
let e = s;
|
|
3072
|
+
for (; e < a;) l.set(n[e], e++);
|
|
3073
|
+
}
|
|
3074
|
+
let r = l.get(t[o]);
|
|
3075
|
+
if (r != null) if (s < r && r < a) {
|
|
3076
|
+
let c = o, u = 1, d;
|
|
3077
|
+
for (; ++c < i && c < a && !((d = l.get(t[c])) == null || d !== r + u);) u++;
|
|
3078
|
+
if (u > r - s) {
|
|
3079
|
+
let i = t[o];
|
|
3080
|
+
for (; s < r;) e.insertBefore(n[s++], i);
|
|
3081
|
+
} else e.replaceChild(n[s++], t[o++]);
|
|
3082
|
+
} else o++;
|
|
3083
|
+
else t[o++].remove();
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3087
|
+
const Re = `_$DX_DELEGATE`;
|
|
3088
|
+
function ze(e, t, n, r = {}) {
|
|
3089
|
+
let i;
|
|
3090
|
+
return T((r) => {
|
|
3091
|
+
i = r, t === document ? e() : Ze(t, e(), t.firstChild ? null : void 0, n);
|
|
3092
|
+
}, r.owner), () => {
|
|
3093
|
+
i(), t.textContent = ``;
|
|
3094
|
+
};
|
|
3095
|
+
}
|
|
3096
|
+
function Be(e, t, n, r) {
|
|
3097
|
+
let i, a = () => {
|
|
3098
|
+
let t = r ? document.createElementNS(`http://www.w3.org/1998/Math/MathML`, `template`) : document.createElement(`template`);
|
|
3099
|
+
return t.innerHTML = e, n ? t.content.firstChild.firstChild : r ? t.firstChild : t.content.firstChild;
|
|
3100
|
+
}, o = t ? () => M(() => document.importNode(i ||= a(), !0)) : () => (i ||= a()).cloneNode(!0);
|
|
3101
|
+
return o.cloneNode = o, o;
|
|
3102
|
+
}
|
|
3103
|
+
function Ve(e, t = window.document) {
|
|
3104
|
+
let n = t[Re] || (t[Re] = /* @__PURE__ */ new Set());
|
|
3105
|
+
for (let r = 0, i = e.length; r < i; r++) {
|
|
3106
|
+
let i = e[r];
|
|
3107
|
+
n.has(i) || (n.add(i), t.addEventListener(i, nt));
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
function Y(e, t, n) {
|
|
3111
|
+
X(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
3112
|
+
}
|
|
3113
|
+
function He(e, t, n, r) {
|
|
3114
|
+
X(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
|
|
3115
|
+
}
|
|
3116
|
+
function Ue(e, t, n) {
|
|
3117
|
+
X(e) || (n ? e.setAttribute(t, ``) : e.removeAttribute(t));
|
|
3118
|
+
}
|
|
3119
|
+
function We(e, t) {
|
|
3120
|
+
X(e) || (t == null ? e.removeAttribute(`class`) : e.className = t);
|
|
3121
|
+
}
|
|
3122
|
+
function Ge(e, t, n, r) {
|
|
3123
|
+
if (r) Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
3124
|
+
else if (Array.isArray(n)) {
|
|
3125
|
+
let r = n[0];
|
|
3126
|
+
e.addEventListener(t, n[0] = (t) => r.call(e, n[1], t));
|
|
3127
|
+
} else e.addEventListener(t, n, typeof n != `function` && n);
|
|
3128
|
+
}
|
|
3129
|
+
function Ke(e, t, n = {}) {
|
|
3130
|
+
let r = Object.keys(t || {}), i = Object.keys(n), a, o;
|
|
3131
|
+
for (a = 0, o = i.length; a < o; a++) {
|
|
3132
|
+
let r = i[a];
|
|
3133
|
+
!r || r === `undefined` || t[r] || (et(e, r, !1), delete n[r]);
|
|
3134
|
+
}
|
|
3135
|
+
for (a = 0, o = r.length; a < o; a++) {
|
|
3136
|
+
let i = r[a], o = !!t[i];
|
|
3137
|
+
!i || i === `undefined` || n[i] === o || !o || (et(e, i, !0), n[i] = o);
|
|
3138
|
+
}
|
|
3139
|
+
return n;
|
|
3140
|
+
}
|
|
3141
|
+
function qe(e, t, n) {
|
|
3142
|
+
if (!t) return n ? Y(e, `style`) : t;
|
|
3143
|
+
let r = e.style;
|
|
3144
|
+
if (typeof t == `string`) return r.cssText = t;
|
|
3145
|
+
typeof n == `string` && (r.cssText = n = void 0), n ||= {}, t ||= {};
|
|
3146
|
+
let i, a;
|
|
3147
|
+
for (a in n) t[a] ?? r.removeProperty(a), delete n[a];
|
|
3148
|
+
for (a in t) i = t[a], i !== n[a] && (r.setProperty(a, i), n[a] = i);
|
|
3149
|
+
return n;
|
|
3150
|
+
}
|
|
3151
|
+
function Je(e, t, n) {
|
|
3152
|
+
n == null ? e.style.removeProperty(t) : e.style.setProperty(t, n);
|
|
3153
|
+
}
|
|
3154
|
+
function Ye(e, t = {}, n, r) {
|
|
3155
|
+
let i = {};
|
|
3156
|
+
return r || D(() => i.children = Z(e, t.children, i.children)), D(() => typeof t.ref == `function` && Xe(t.ref, e)), D(() => Qe(e, t, n, !0, i, !0)), i;
|
|
3157
|
+
}
|
|
3158
|
+
function Xe(e, t, n) {
|
|
3159
|
+
return M(() => e(t, n));
|
|
3160
|
+
}
|
|
3161
|
+
function Ze(e, t, n, r) {
|
|
3162
|
+
if (n !== void 0 && !r && (r = []), typeof t != `function`) return Z(e, t, r, n);
|
|
3163
|
+
D((r) => Z(e, t(), r, n), r);
|
|
3164
|
+
}
|
|
3165
|
+
function Qe(e, t, n, r, i = {}, a = !1) {
|
|
3166
|
+
t ||= {};
|
|
3167
|
+
for (let r in i) if (!(r in t)) {
|
|
3168
|
+
if (r === `children`) continue;
|
|
3169
|
+
i[r] = tt(e, r, null, i[r], n, a, t);
|
|
3170
|
+
}
|
|
3171
|
+
for (let o in t) {
|
|
3172
|
+
if (o === `children`) {
|
|
3173
|
+
r || Z(e, t.children);
|
|
3174
|
+
continue;
|
|
3175
|
+
}
|
|
3176
|
+
let s = t[o];
|
|
3177
|
+
i[o] = tt(e, o, s, i[o], n, a, t);
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
function X(e) {
|
|
3181
|
+
return !!c.context && !c.done && (!e || e.isConnected);
|
|
3182
|
+
}
|
|
3183
|
+
function $e(e) {
|
|
3184
|
+
return e.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
3185
|
+
}
|
|
3186
|
+
function et(e, t, n) {
|
|
3187
|
+
let r = t.trim().split(/\s+/);
|
|
3188
|
+
for (let t = 0, i = r.length; t < i; t++) e.classList.toggle(r[t], n);
|
|
3189
|
+
}
|
|
3190
|
+
function tt(e, t, n, r, i, a, o) {
|
|
3191
|
+
let s, c, l, u, d;
|
|
3192
|
+
if (t === `style`) return qe(e, n, r);
|
|
3193
|
+
if (t === `classList`) return Ke(e, n, r);
|
|
3194
|
+
if (n === r) return r;
|
|
3195
|
+
if (t === `ref`) a || n(e);
|
|
3196
|
+
else if (t.slice(0, 3) === `on:`) {
|
|
3197
|
+
let i = t.slice(3);
|
|
3198
|
+
r && e.removeEventListener(i, r, typeof r != `function` && r), n && e.addEventListener(i, n, typeof n != `function` && n);
|
|
3199
|
+
} else if (t.slice(0, 10) === `oncapture:`) {
|
|
3200
|
+
let i = t.slice(10);
|
|
3201
|
+
r && e.removeEventListener(i, r, !0), n && e.addEventListener(i, n, !0);
|
|
3202
|
+
} else if (t.slice(0, 2) === `on`) {
|
|
3203
|
+
let i = t.slice(2).toLowerCase(), a = Pe.has(i);
|
|
3204
|
+
if (!a && r) {
|
|
3205
|
+
let t = Array.isArray(r) ? r[0] : r;
|
|
3206
|
+
e.removeEventListener(i, t);
|
|
3207
|
+
}
|
|
3208
|
+
(a || n) && (Ge(e, i, n, a), a && Ve([i]));
|
|
3209
|
+
} else if (t.slice(0, 5) === `attr:`) Y(e, t.slice(5), n);
|
|
3210
|
+
else if (t.slice(0, 5) === `bool:`) Ue(e, t.slice(5), n);
|
|
3211
|
+
else if ((d = t.slice(0, 5) === `prop:`) || (l = Ae.has(t)) || !i && ((u = Ne(t, e.tagName)) || (c = ke.has(t))) || (s = e.nodeName.includes(`-`) || `is` in o)) {
|
|
3212
|
+
if (d) t = t.slice(5), c = !0;
|
|
3213
|
+
else if (X(e)) return n;
|
|
3214
|
+
t === `class` || t === `className` ? We(e, n) : s && !c && !l ? e[$e(t)] = n : e[u || t] = n;
|
|
3215
|
+
} else {
|
|
3216
|
+
let r = i && t.indexOf(`:`) > -1 && Fe[t.split(`:`)[0]];
|
|
3217
|
+
r ? He(e, r, t, n) : Y(e, je[t] || t, n);
|
|
3218
|
+
}
|
|
3219
|
+
return n;
|
|
3220
|
+
}
|
|
3221
|
+
function nt(e) {
|
|
3222
|
+
if (c.registry && c.events && c.events.find(([t, n]) => n === e)) return;
|
|
3223
|
+
let t = e.target, n = `$$${e.type}`, r = e.target, i = e.currentTarget, a = (t) => Object.defineProperty(e, `target`, {
|
|
3224
|
+
configurable: !0,
|
|
3225
|
+
value: t
|
|
3226
|
+
}), o = () => {
|
|
3227
|
+
let r = t[n];
|
|
3228
|
+
if (r && !t.disabled) {
|
|
3229
|
+
let i = t[`${n}Data`];
|
|
3230
|
+
if (i === void 0 ? r.call(t, e) : r.call(t, i, e), e.cancelBubble) return;
|
|
3231
|
+
}
|
|
3232
|
+
return t.host && typeof t.host != `string` && !t.host._$host && t.contains(e.target) && a(t.host), !0;
|
|
3233
|
+
}, s = () => {
|
|
3234
|
+
for (; o() && (t = t._$host || t.parentNode || t.host););
|
|
3235
|
+
};
|
|
3236
|
+
if (Object.defineProperty(e, `currentTarget`, {
|
|
3237
|
+
configurable: !0,
|
|
3238
|
+
get() {
|
|
3239
|
+
return t || document;
|
|
3240
|
+
}
|
|
3241
|
+
}), c.registry && !c.done && (c.done = _$HY.done = !0), e.composedPath) {
|
|
3242
|
+
let n = e.composedPath();
|
|
3243
|
+
a(n[0]);
|
|
3244
|
+
for (let e = 0; e < n.length - 2 && (t = n[e], o()); e++) {
|
|
3245
|
+
if (t._$host) {
|
|
3246
|
+
t = t._$host, s();
|
|
3247
|
+
break;
|
|
3248
|
+
}
|
|
3249
|
+
if (t.parentNode === i) break;
|
|
3250
|
+
}
|
|
3251
|
+
} else s();
|
|
3252
|
+
a(r);
|
|
3253
|
+
}
|
|
3254
|
+
function Z(e, t, n, r, i) {
|
|
3255
|
+
let a = X(e);
|
|
3256
|
+
if (a) {
|
|
3257
|
+
!n && (n = [...e.childNodes]);
|
|
3258
|
+
let t = [];
|
|
3259
|
+
for (let e = 0; e < n.length; e++) {
|
|
3260
|
+
let r = n[e];
|
|
3261
|
+
r.nodeType === 8 && r.data.slice(0, 2) === `!$` ? r.remove() : t.push(r);
|
|
3262
|
+
}
|
|
3263
|
+
n = t;
|
|
3264
|
+
}
|
|
3265
|
+
for (; typeof n == `function`;) n = n();
|
|
3266
|
+
if (t === n) return n;
|
|
3267
|
+
let o = typeof t, s = r !== void 0;
|
|
3268
|
+
if (e = s && n[0] && n[0].parentNode || e, o === `string` || o === `number`) {
|
|
3269
|
+
if (a || o === `number` && (t = t.toString(), t === n)) return n;
|
|
3270
|
+
if (s) {
|
|
3271
|
+
let i = n[0];
|
|
3272
|
+
i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n = Q(e, n, r, i);
|
|
3273
|
+
} else n = n !== `` && typeof n == `string` ? e.firstChild.data = t : e.textContent = t;
|
|
3274
|
+
} else if (t == null || o === `boolean`) {
|
|
3275
|
+
if (a) return n;
|
|
3276
|
+
n = Q(e, n, r);
|
|
3277
|
+
} else if (o === `function`) return D(() => {
|
|
3278
|
+
let i = t();
|
|
3279
|
+
for (; typeof i == `function`;) i = i();
|
|
3280
|
+
n = Z(e, i, n, r);
|
|
3281
|
+
}), () => n;
|
|
3282
|
+
else if (Array.isArray(t)) {
|
|
3283
|
+
let o = [], c = n && Array.isArray(n);
|
|
3284
|
+
if (rt(o, t, n, i)) return D(() => n = Z(e, o, n, r, !0)), () => n;
|
|
3285
|
+
if (a) {
|
|
3286
|
+
if (!o.length) return n;
|
|
3287
|
+
if (r === void 0) return n = [...e.childNodes];
|
|
3288
|
+
let t = o[0];
|
|
3289
|
+
if (t.parentNode !== e) return n;
|
|
3290
|
+
let i = [t];
|
|
3291
|
+
for (; (t = t.nextSibling) !== r;) i.push(t);
|
|
3292
|
+
return n = i;
|
|
3293
|
+
}
|
|
3294
|
+
if (o.length === 0) {
|
|
3295
|
+
if (n = Q(e, n, r), s) return n;
|
|
3296
|
+
} else c ? n.length === 0 ? it(e, o, r) : Le(e, n, o) : (n && Q(e), it(e, o));
|
|
3297
|
+
n = o;
|
|
3298
|
+
} else if (t.nodeType) {
|
|
3299
|
+
if (a && t.parentNode) return n = s ? [t] : t;
|
|
3300
|
+
if (Array.isArray(n)) {
|
|
3301
|
+
if (s) return n = Q(e, n, r, t);
|
|
3302
|
+
Q(e, n, null, t);
|
|
3303
|
+
} else n == null || n === `` || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
3304
|
+
n = t;
|
|
3305
|
+
}
|
|
3306
|
+
return n;
|
|
3307
|
+
}
|
|
3308
|
+
function rt(e, t, n, r) {
|
|
3309
|
+
let i = !1;
|
|
3310
|
+
for (let a = 0, o = t.length; a < o; a++) {
|
|
3311
|
+
let o = t[a], s = n && n[e.length], c;
|
|
3312
|
+
if (!(o == null || o === !0 || o === !1)) if ((c = typeof o) == `object` && o.nodeType) e.push(o);
|
|
3313
|
+
else if (Array.isArray(o)) i = rt(e, o, s) || i;
|
|
3314
|
+
else if (c === `function`) if (r) {
|
|
3315
|
+
for (; typeof o == `function`;) o = o();
|
|
3316
|
+
i = rt(e, Array.isArray(o) ? o : [o], Array.isArray(s) ? s : [s]) || i;
|
|
3317
|
+
} else e.push(o), i = !0;
|
|
3318
|
+
else {
|
|
3319
|
+
let t = String(o);
|
|
3320
|
+
s && s.nodeType === 3 && s.data === t ? e.push(s) : e.push(document.createTextNode(t));
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
return i;
|
|
3324
|
+
}
|
|
3325
|
+
function it(e, t, n = null) {
|
|
3326
|
+
for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
|
|
3327
|
+
}
|
|
3328
|
+
function Q(e, t, n, r) {
|
|
3329
|
+
if (n === void 0) return e.textContent = ``;
|
|
3330
|
+
let i = r || document.createTextNode(``);
|
|
3331
|
+
if (t.length) {
|
|
3332
|
+
let r = !1;
|
|
3333
|
+
for (let a = t.length - 1; a >= 0; a--) {
|
|
3334
|
+
let o = t[a];
|
|
3335
|
+
if (i !== o) {
|
|
3336
|
+
let t = o.parentNode === e;
|
|
3337
|
+
!r && !a ? t ? e.replaceChild(i, o) : e.insertBefore(i, n) : t && o.remove();
|
|
3338
|
+
} else r = !0;
|
|
3339
|
+
}
|
|
3340
|
+
} else e.insertBefore(i, n);
|
|
3341
|
+
return [i];
|
|
3342
|
+
}
|
|
3343
|
+
const at = (e) => {
|
|
3344
|
+
if (!e) return !1;
|
|
3345
|
+
let t = C$1(e);
|
|
3346
|
+
return t ? t.isConnected() : !!(e.isConnected || e.ownerDocument?.contains(e));
|
|
3347
|
+
};
|
|
3348
|
+
const ot = [
|
|
3349
|
+
`input`,
|
|
3350
|
+
`textarea`,
|
|
3351
|
+
`select`,
|
|
3352
|
+
`searchbox`,
|
|
3353
|
+
`slider`,
|
|
3354
|
+
`spinbutton`,
|
|
3355
|
+
`menuitem`,
|
|
3356
|
+
`menuitemcheckbox`,
|
|
3357
|
+
`menuitemradio`,
|
|
3358
|
+
`option`,
|
|
3359
|
+
`radio`,
|
|
3360
|
+
`textbox`,
|
|
3361
|
+
`combobox`
|
|
3362
|
+
];
|
|
3363
|
+
const st = (e) => {
|
|
3364
|
+
if (e.composed) {
|
|
3365
|
+
let t = e.composedPath()[0];
|
|
3366
|
+
if (t instanceof HTMLElement) return t;
|
|
3367
|
+
} else if (e.target instanceof HTMLElement) return e.target;
|
|
3368
|
+
};
|
|
3369
|
+
const ct = (e) => {
|
|
3370
|
+
if (document.designMode === `on`) return !0;
|
|
3371
|
+
let t = st(e);
|
|
3372
|
+
if (!t) return !1;
|
|
3373
|
+
if (t.isContentEditable) return !0;
|
|
3374
|
+
let n = cn(t);
|
|
3375
|
+
return ot.some((e) => e === n || e === t.role);
|
|
3376
|
+
};
|
|
3377
|
+
const lt = (e) => {
|
|
3378
|
+
let t = e.target;
|
|
3379
|
+
if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) {
|
|
3380
|
+
let e = t.selectionStart ?? 0;
|
|
3381
|
+
return (t.selectionEnd ?? 0) - e > 0;
|
|
3382
|
+
}
|
|
3383
|
+
return !1;
|
|
3384
|
+
};
|
|
3385
|
+
const ut = () => {
|
|
3386
|
+
let e = window.getSelection();
|
|
3387
|
+
return e ? e.toString().length > 0 : !1;
|
|
3388
|
+
};
|
|
3389
|
+
const dt = (e, t, n) => Math.max(t, Math.min(e, n));
|
|
3390
|
+
let $ = null;
|
|
3391
|
+
const ft = () => {
|
|
3392
|
+
if (typeof navigator > `u` || !(`userAgentData` in navigator)) return null;
|
|
3393
|
+
let e = navigator.userAgentData;
|
|
3394
|
+
if (typeof e != `object` || !e || !(`platform` in e)) return null;
|
|
3395
|
+
let t = e.platform;
|
|
3396
|
+
return typeof t == `string` ? t : null;
|
|
3397
|
+
};
|
|
3398
|
+
const pt = () => {
|
|
3399
|
+
if ($ === null) {
|
|
3400
|
+
if (typeof navigator > `u`) return $ = !1, $;
|
|
3401
|
+
let e = navigator.platform ?? ft() ?? navigator.userAgent;
|
|
3402
|
+
$ = /Mac|iPhone|iPad|iPod/i.test(e);
|
|
3403
|
+
}
|
|
3404
|
+
return $;
|
|
3405
|
+
};
|
|
3406
|
+
const mt = (e, t) => {
|
|
3407
|
+
try {
|
|
3408
|
+
return e.composedPath().some((e) => h$1(e) && e.hasAttribute(t));
|
|
3409
|
+
} catch {
|
|
3410
|
+
return !1;
|
|
3411
|
+
}
|
|
3412
|
+
};
|
|
3413
|
+
const ht = `react-grab-toolbar-state`;
|
|
3414
|
+
const gt = () => {
|
|
3415
|
+
try {
|
|
3416
|
+
let e = localStorage.getItem(ht);
|
|
3417
|
+
if (!e) return null;
|
|
3418
|
+
let t = JSON.parse(e);
|
|
3419
|
+
if (typeof t != `object` || !t) return null;
|
|
3420
|
+
let n = t, r = typeof n.collapsed == `boolean` ? n.collapsed : !1;
|
|
3421
|
+
return {
|
|
3422
|
+
edge: n.edge === `top` || n.edge === `bottom` || n.edge === `left` || n.edge === `right` ? n.edge : `bottom`,
|
|
3423
|
+
ratio: typeof n.ratio == `number` ? n.ratio : Te$1,
|
|
3424
|
+
collapsed: r,
|
|
3425
|
+
enabled: !r,
|
|
3426
|
+
defaultAction: typeof n.defaultAction == `string` ? n.defaultAction : Ee$1
|
|
3427
|
+
};
|
|
3428
|
+
} catch (e) {
|
|
3429
|
+
console.warn(`[react-grab] Failed to load toolbar state from localStorage:`, e);
|
|
3430
|
+
}
|
|
3431
|
+
return null;
|
|
3432
|
+
};
|
|
3433
|
+
const _t = (e) => {
|
|
3434
|
+
try {
|
|
3435
|
+
localStorage.setItem(ht, JSON.stringify(e));
|
|
3436
|
+
} catch (e) {
|
|
3437
|
+
console.warn(`[react-grab] Failed to save toolbar state to localStorage:`, e);
|
|
3438
|
+
}
|
|
3439
|
+
};
|
|
3440
|
+
const vt = (e) => e.key === `Enter`;
|
|
3441
|
+
const yt = (e) => e.metaKey || e.ctrlKey;
|
|
3442
|
+
const bt = (e, t, n = {}) => {
|
|
3443
|
+
if (!t.key) return null;
|
|
3444
|
+
if (vt(t)) return e.find((e) => e.shortcut === `Enter`) ?? null;
|
|
3445
|
+
if (t.repeat) return null;
|
|
3446
|
+
let r = t.key.toLowerCase();
|
|
3447
|
+
return yt(t) ? n.includeModifierShortcuts === !0 ? e.find((e) => e.shortcut !== void 0 && e.shortcut !== `Enter` && e.shortcutModifier !== !1 && r === e.shortcut.toLowerCase()) ?? null : null : e.find((e) => e.shortcut !== void 0 && e.shortcutModifier === !1 && r === e.shortcut.toLowerCase()) ?? null;
|
|
3448
|
+
};
|
|
3449
|
+
const xt = (e) => e ?? !0;
|
|
3450
|
+
const St = (t, n) => {
|
|
3451
|
+
if (typeof t.enabled == `function`) {
|
|
3452
|
+
if (!n) return !1;
|
|
3453
|
+
try {
|
|
3454
|
+
return t.enabled(n);
|
|
3455
|
+
} catch (n) {
|
|
3456
|
+
return H$1(new nn(t.id, n)), !1;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
return xt(t.enabled);
|
|
3460
|
+
};
|
|
3461
|
+
const Ct = (e, n) => {
|
|
3462
|
+
if (!St(e, n)) return !1;
|
|
3463
|
+
try {
|
|
3464
|
+
let i = e.onAction(n);
|
|
3465
|
+
i && i.catch((n) => {
|
|
3466
|
+
H$1(new tn(e.id, n));
|
|
3467
|
+
});
|
|
3468
|
+
} catch (n) {
|
|
3469
|
+
H$1(new tn(e.id, n));
|
|
3470
|
+
}
|
|
3471
|
+
return !0;
|
|
3472
|
+
};
|
|
3473
|
+
//#endregion
|
|
3474
|
+
export { Ce$1 as $, fe$1 as $t, ce as A, rt$1 as An, Ut as At, mt as B, vn as Bn, an as Bt, Xe as C, p$1 as Cn, Re$1 as Ct, _t as D, re$1 as Dn, T$1 as Dt, Ze as E, pt$1 as En, Sn as Et, ie as F, t as Fn, Zt as Ft, ut as G, xt$1 as Gn, cn as Gt, pt as H, we$1 as Hn, br as Ht, j as I, te$1 as In, _e$1 as It, ze as J, yr as Jn, d$1 as Jt, we as K, y$1 as Kn, cr as Kt, k as L, u$1 as Ln, _n as Lt, dt as M, se$1 as Mn, Xi as Mt, f as N, si as Nn, Xn as Nt, at as O, rn as On, Te$1 as Ot, gt as P, sn as Pn, Yt as Pt, C$1 as Q, f$1 as Qt, lt as R, ue$1 as Rn, a as Rt, We as S, on as Sn, Qt as St, Ye as T, pn as Tn, Si as Tt, qe as U, wn as Un, c$1 as Ut, ne as V, vt$1 as Vn, ba as Vt, re as W, xi as Wn, ce$1 as Wt, Aa as X, ee$1 as Xt, $t as Y, yt$1 as Yn, de$1 as Yt, Bt as Z, en as Zt, Se as _, na as _n, Nn as _t, De as a, h$1 as an, Ee$1 as at, Te as b, oe$1 as bn, Qi as bt, Ge as c, ja as cn, He$1 as ct, Ke as d, l$1 as dn, In as dt, fn as en, Ci as et, M as f, le$1 as fn, Jt as ft, P as g, mt$1 as gn, Ne$1 as gt, Oe as h, me$1 as hn, Me$1 as ht, D as i, go as in, E$1 as it, ct as j, s as jn, Vn as jt, bt as k, rr as kn, Ue$1 as kt, Ie as l, je$1 as ln, Hn as lt, O as m, m$1 as mn, M$1 as mt, Be as n, ge$1 as nn, D$1 as nt, E as o, he$1 as on, Fe$1 as ot, N as p, lt$1 as pn, Kt as pt, xe as q, ye$1 as qn, ct$1 as qt, Ct as r, gn as rn, De$1 as rt, F as s, i as sn, H$1 as st, A as t, g$1 as tn, Cn as tt, Je as u, ke$1 as un, Ie$1 as ut, St as v, ne$1 as vn, O$1 as vt, Y as w, pe$1 as wn, Se$1 as wt, Ve as x, oi as xn, Qn as xt, T as y, o as yn, Pe$1 as yt, m as z, un as zn, ae$1 as zt };
|