mesurer-solid 0.1.2 → 0.1.3-beta.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/AGENT_INTEGRATION.md +166 -154
- package/README.md +188 -232
- package/dist/arrange.d.ts +90 -0
- package/dist/arrange.js +2907 -0
- package/dist/core.js +1 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +4392 -2494
- package/dist/inject-script.js +75 -9
- package/dist/inject.js +4937 -3795
- package/dist/screenshot.js +25 -2
- package/package.json +5 -1
- package/skills/mesurer-ui/SKILL.md +209 -139
package/dist/arrange.js
ADDED
|
@@ -0,0 +1,2907 @@
|
|
|
1
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/error.js
|
|
2
|
+
var e = class extends Error {
|
|
3
|
+
source;
|
|
4
|
+
constructor(e) {
|
|
5
|
+
let t = Error, n = t.stackTraceLimit;
|
|
6
|
+
n !== void 0 && (t.stackTraceLimit = 0), super(), n !== void 0 && (t.stackTraceLimit = n), this.source = e;
|
|
7
|
+
}
|
|
8
|
+
}, t = class extends Error {
|
|
9
|
+
source;
|
|
10
|
+
constructor(e, t) {
|
|
11
|
+
super(t instanceof Error ? t.message : String(t), { cause: t }), this.source = e;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function n(e) {
|
|
15
|
+
return e instanceof t ? e.cause : e;
|
|
16
|
+
}
|
|
17
|
+
var r = class extends Error {
|
|
18
|
+
constructor() {
|
|
19
|
+
super("");
|
|
20
|
+
}
|
|
21
|
+
}, i = 1024, a = 2048, o = {}, s = {};
|
|
22
|
+
function c(e) {
|
|
23
|
+
return e === s ? void 0 : e;
|
|
24
|
+
}
|
|
25
|
+
var l = typeof Proxy == "function", u = {}, d = Symbol("refresh"), f = /* @__PURE__ */ new Set();
|
|
26
|
+
function p(e) {
|
|
27
|
+
for (; e.tn;) e = e.tn;
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function m(e, t) {
|
|
31
|
+
if (e = p(e), t = p(t), e === t) return e;
|
|
32
|
+
t.tn = e;
|
|
33
|
+
for (let n of t.Ae) e.Ae.add(n);
|
|
34
|
+
return t.Ae.clear(), e.rn[0].push(...t.rn[0]), e.rn[1].push(...t.rn[1]), t.rn[0].length = 0, t.rn[1].length = 0, e;
|
|
35
|
+
}
|
|
36
|
+
function h(e) {
|
|
37
|
+
let t = e.Ke;
|
|
38
|
+
if (!t) return;
|
|
39
|
+
let n = p(t);
|
|
40
|
+
if (f.has(n)) return n;
|
|
41
|
+
e.Ke = void 0;
|
|
42
|
+
}
|
|
43
|
+
function g(e) {
|
|
44
|
+
if (_(e) && e.sn) {
|
|
45
|
+
let t = e.sn = U(e.sn);
|
|
46
|
+
if (t.fn !== !0) return t;
|
|
47
|
+
e.sn = null;
|
|
48
|
+
}
|
|
49
|
+
return h(e)?.Ne ?? e.Ne;
|
|
50
|
+
}
|
|
51
|
+
function _(e) {
|
|
52
|
+
return e._e !== void 0 && e._e !== o;
|
|
53
|
+
}
|
|
54
|
+
function v(e, t) {
|
|
55
|
+
let n = p(t), r = e.Ke;
|
|
56
|
+
if (r) {
|
|
57
|
+
if (r.tn) {
|
|
58
|
+
e.Ke = t;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
let i = p(r);
|
|
62
|
+
if (f.has(i)) {
|
|
63
|
+
i !== n && !_(e) && (n.an && p(n.an) === i ? e.Ke = t : i.an && p(i.an) === n || m(n, i));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
e.Ke = t;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/scheduler.js
|
|
71
|
+
var y = /* @__PURE__ */ new Set(), b = {
|
|
72
|
+
eE: Array(2e3).fill(void 0),
|
|
73
|
+
tE: !1,
|
|
74
|
+
Ve: 0,
|
|
75
|
+
EE: 0
|
|
76
|
+
}, x = {
|
|
77
|
+
eE: Array(2e3).fill(void 0),
|
|
78
|
+
tE: !1,
|
|
79
|
+
Ve: 0,
|
|
80
|
+
EE: 0
|
|
81
|
+
};
|
|
82
|
+
function S(e) {
|
|
83
|
+
e.se & 16 ? e.se &= -12 : (q(e, x), e.se &= -4);
|
|
84
|
+
}
|
|
85
|
+
var C = 0, w = null, T = !1, E = !1, D = !1, O = 0, k = /* @__PURE__ */ new Set();
|
|
86
|
+
function ee(e) {
|
|
87
|
+
let t = e.m;
|
|
88
|
+
return y.size === 0 && f.size === 0 && e.vt.length === 0 && t.Me.length === 0 && t.A.length === 0 && t.cn.size === 0 && k.size === 0;
|
|
89
|
+
}
|
|
90
|
+
function A() {
|
|
91
|
+
if (k.size !== 0) for (let e of k) {
|
|
92
|
+
if (e.o !== null) {
|
|
93
|
+
k.delete(e);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
e.De === o && (e._e === void 0 || e._e === o) && (e.t || (k.delete(e), e.ut?.()));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function j() {
|
|
100
|
+
return {
|
|
101
|
+
de: C,
|
|
102
|
+
Qt: [],
|
|
103
|
+
Ie: /* @__PURE__ */ new Map(),
|
|
104
|
+
Me: [],
|
|
105
|
+
A: [],
|
|
106
|
+
cn: /* @__PURE__ */ new Set(),
|
|
107
|
+
ie: [],
|
|
108
|
+
yt: {
|
|
109
|
+
bt: [[], []],
|
|
110
|
+
vt: []
|
|
111
|
+
},
|
|
112
|
+
fn: !1,
|
|
113
|
+
ln: /* @__PURE__ */ new Set()
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function te(e, t) {
|
|
117
|
+
t.fn = e, e.ie.push(...t.ie);
|
|
118
|
+
for (let n of f) n.Ne === t && (n.Ne = e);
|
|
119
|
+
t.Me.length && (e.Me.push(...t.Me), t.Me.length = 0), t.A.length && (e.A.push(...t.A), t.A.length = 0);
|
|
120
|
+
for (let n of t.cn) e.cn.add(n);
|
|
121
|
+
for (let [n, r] of t.Ie) {
|
|
122
|
+
let t = e.Ie.get(n);
|
|
123
|
+
t || e.Ie.set(n, t = /* @__PURE__ */ new Set());
|
|
124
|
+
for (let e of r) t.add(e);
|
|
125
|
+
}
|
|
126
|
+
for (let n of t.ln) e.ln.add(n);
|
|
127
|
+
}
|
|
128
|
+
function M() {
|
|
129
|
+
if (E) {
|
|
130
|
+
P();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
T || (T = !0, !O && !B.gt && queueMicrotask(H));
|
|
134
|
+
}
|
|
135
|
+
function N(e) {
|
|
136
|
+
if (E) return;
|
|
137
|
+
E = !0;
|
|
138
|
+
let t = "[REACTIVITY_HALTED]";
|
|
139
|
+
e === void 0 ? console.error(t) : console.error(t, e);
|
|
140
|
+
}
|
|
141
|
+
function P() {
|
|
142
|
+
D || (D = !0, console.error("[REACTIVITY_HALTED]"));
|
|
143
|
+
}
|
|
144
|
+
var ne = 0, re = class {
|
|
145
|
+
ke = null;
|
|
146
|
+
bt = [[], []];
|
|
147
|
+
vt = [];
|
|
148
|
+
kt = 0;
|
|
149
|
+
created = C;
|
|
150
|
+
addChild(e) {
|
|
151
|
+
this.vt.push(e), e.ke = this;
|
|
152
|
+
}
|
|
153
|
+
removeChild(e) {
|
|
154
|
+
let t = this.vt.indexOf(e);
|
|
155
|
+
t >= 0 && (this.vt.splice(t, 1), e.ke = null);
|
|
156
|
+
}
|
|
157
|
+
notify(e, t, n, r) {
|
|
158
|
+
return this.ke ? this.ke.notify(e, t, n, r) : !1;
|
|
159
|
+
}
|
|
160
|
+
run(e) {
|
|
161
|
+
if (this.bt[e - 1].length) {
|
|
162
|
+
let t = this.bt[e - 1];
|
|
163
|
+
this.bt[e - 1] = [], ce(t, e);
|
|
164
|
+
}
|
|
165
|
+
let t = this.vt, n = ++ne;
|
|
166
|
+
for (let r = 0; r < t.length;) {
|
|
167
|
+
let i = t[r];
|
|
168
|
+
if (i.kt !== n && (i.kt = n, i.run?.(e), t[r] !== i)) {
|
|
169
|
+
r = 0;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
r++;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
enqueue(e, t) {
|
|
176
|
+
e && (Q ? p(Q).rn[e - 1].push(t) : this.bt[e - 1].push(t)), M();
|
|
177
|
+
}
|
|
178
|
+
stashQueues(e) {
|
|
179
|
+
e.bt[0].push(...this.bt[0]), e.bt[1].push(...this.bt[1]), this.bt = [[], []];
|
|
180
|
+
for (let t = 0; t < this.vt.length; t++) {
|
|
181
|
+
let n = this.vt[t], r = e.vt[t];
|
|
182
|
+
r || (r = {
|
|
183
|
+
bt: [[], []],
|
|
184
|
+
vt: []
|
|
185
|
+
}, e.vt[t] = r), n.stashQueues(r);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
restoreQueues(e) {
|
|
189
|
+
this.bt[0].push(...e.bt[0]), this.bt[1].push(...e.bt[1]);
|
|
190
|
+
for (let t = 0; t < e.vt.length; t++) {
|
|
191
|
+
let n = e.vt[t], r = this.vt[t];
|
|
192
|
+
r && r.restoreQueues(n);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, F = class e extends re {
|
|
196
|
+
gt = !1;
|
|
197
|
+
m = j();
|
|
198
|
+
static Ce;
|
|
199
|
+
static me;
|
|
200
|
+
static et;
|
|
201
|
+
static Dt = null;
|
|
202
|
+
static p = null;
|
|
203
|
+
static G = null;
|
|
204
|
+
static M = null;
|
|
205
|
+
static h = null;
|
|
206
|
+
static It = null;
|
|
207
|
+
static St = null;
|
|
208
|
+
static Pe = null;
|
|
209
|
+
static Se = null;
|
|
210
|
+
static Oe = null;
|
|
211
|
+
static un = null;
|
|
212
|
+
static At = null;
|
|
213
|
+
static Ct = null;
|
|
214
|
+
static ht = null;
|
|
215
|
+
static Be = null;
|
|
216
|
+
static k = null;
|
|
217
|
+
static Lt = null;
|
|
218
|
+
static Gt = null;
|
|
219
|
+
static En = null;
|
|
220
|
+
static Tn = null;
|
|
221
|
+
static dn = null;
|
|
222
|
+
static In = null;
|
|
223
|
+
static Rt = null;
|
|
224
|
+
static Ot = null;
|
|
225
|
+
static Pt = null;
|
|
226
|
+
static je = null;
|
|
227
|
+
static $e = null;
|
|
228
|
+
static ze = null;
|
|
229
|
+
static Nn = null;
|
|
230
|
+
flush() {
|
|
231
|
+
if (!this.gt) {
|
|
232
|
+
this.gt = !0;
|
|
233
|
+
try {
|
|
234
|
+
if (ge(b, e.Ce), w) {
|
|
235
|
+
if (!ue(w)) {
|
|
236
|
+
let t = w;
|
|
237
|
+
ge(x, this.m === t ? S : e.Ce), this.m === t && (V = this.m = j()), f.size && (e.In(1), e.In(2)), this.stashQueues(t.yt), C++, T = b.EE >= b.Ve || this.m.Qt.length > 0, z(t.Qt), w = null, se(null, !0);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
let t = w, n = this.m;
|
|
241
|
+
if (n !== t && n.Qt.push(...t.Qt), this.restoreQueues(t.yt), y.delete(t), w = null, z(n.Qt), se(t), n === t) {
|
|
242
|
+
let e = j();
|
|
243
|
+
e.Qt = n.Qt, e.Me = n.Me, e.A = n.A, e.cn = n.cn, V = this.m = e;
|
|
244
|
+
}
|
|
245
|
+
} else ee(this) ? (oe(), b.EE >= b.Ve && (ge(b, e.Ce), oe())) : (y.size && ge(x, e.Ce), se());
|
|
246
|
+
C++, T = b.EE >= b.Ve, f.size && e.In(1), this.run(1), f.size && e.In(2), this.run(2);
|
|
247
|
+
} finally {
|
|
248
|
+
this.gt = !1;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
notify(e, t, n, r) {
|
|
253
|
+
if (t & 1) {
|
|
254
|
+
if (n & 1) {
|
|
255
|
+
let t = r === void 0 ? e._ : r;
|
|
256
|
+
if (t?.l) return !0;
|
|
257
|
+
if (w && t) {
|
|
258
|
+
let n = t.source, r = w.Ie.get(n);
|
|
259
|
+
r || w.Ie.set(n, r = /* @__PURE__ */ new Set());
|
|
260
|
+
let i = r.size;
|
|
261
|
+
r.add(e), r.size !== i && M();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return !0;
|
|
265
|
+
}
|
|
266
|
+
return !1;
|
|
267
|
+
}
|
|
268
|
+
initTransition(e) {
|
|
269
|
+
if (e &&= U(e), e && e === w || !e && w && w.de === C) return;
|
|
270
|
+
if (!w) w = e ?? j();
|
|
271
|
+
else if (e) {
|
|
272
|
+
let t = w;
|
|
273
|
+
te(e, t), y.delete(t), w = e;
|
|
274
|
+
}
|
|
275
|
+
y.add(w), w.de = C;
|
|
276
|
+
let t = this.m;
|
|
277
|
+
if (t !== w) {
|
|
278
|
+
for (let e = 0; e < t.Qt.length; e++) {
|
|
279
|
+
let n = t.Qt[e];
|
|
280
|
+
n.Ne = w, w.Qt.push(n);
|
|
281
|
+
}
|
|
282
|
+
for (let e = 0; e < t.Me.length; e++) {
|
|
283
|
+
let n = t.Me[e];
|
|
284
|
+
n.Ne = w, w.Me.push(n);
|
|
285
|
+
}
|
|
286
|
+
t.A.length && w.A.push(...t.A);
|
|
287
|
+
for (let e of t.cn) w.cn.add(e);
|
|
288
|
+
if (t.ln.size) {
|
|
289
|
+
for (let e of t.ln) w.ln.add(e);
|
|
290
|
+
t.ln.clear();
|
|
291
|
+
}
|
|
292
|
+
V = this.m = w;
|
|
293
|
+
}
|
|
294
|
+
for (let e of f) e.Ne ||= w;
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
function I(e) {
|
|
298
|
+
V.Qt.push(e);
|
|
299
|
+
}
|
|
300
|
+
var L = !1;
|
|
301
|
+
function ie(e, t = !1) {
|
|
302
|
+
let n = e.Ke || Q, r = e.Le !== void 0, i = L;
|
|
303
|
+
for (let o = e.o; o !== null; o = o.le) {
|
|
304
|
+
if (i && (o.fe.se &= ~a), r && o.fe.T & 8) {
|
|
305
|
+
o.fe.se |= 256;
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
t && n ? (o.fe.se |= 128, v(o.fe, n)) : t && (o.fe.se |= 128, o.fe.Ke = void 0), G(o.fe);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function ae(e) {
|
|
312
|
+
let t = e;
|
|
313
|
+
if (!t.ce) {
|
|
314
|
+
e.De !== o && (e.Ue = e.De, e.De = o), (e.ge || e.pe) && F.un(e);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
e.De !== o && (e.Ue = e.De, e.De = o, e.Re && e.Re !== 3 && (e.Je = !0)), t.Ee = !1, t.se &= ~i, t.S & 1 || (t.S &= -5), (t.We !== null || t.Qe !== null) && F.me(t, !1, !0), (e.ge || e.pe) && F.un(e);
|
|
318
|
+
}
|
|
319
|
+
function oe() {
|
|
320
|
+
let e = V.Qt;
|
|
321
|
+
for (let t = 0; t < e.length; t++) ae(e[t]);
|
|
322
|
+
e.length = 0;
|
|
323
|
+
}
|
|
324
|
+
function se(e = null, t = !1) {
|
|
325
|
+
let n = !t;
|
|
326
|
+
n && oe(), !t && B.vt.length && R(B);
|
|
327
|
+
let r = b.EE >= b.Ve;
|
|
328
|
+
if (r && ge(b, F.Ce), n) {
|
|
329
|
+
r && oe();
|
|
330
|
+
let t = e ?? B.m;
|
|
331
|
+
if (t.Me.length && F.En(t.Me), t.ln.size) {
|
|
332
|
+
for (let e of t.ln) e.se & 64 || G(e);
|
|
333
|
+
t.ln.clear(), M();
|
|
334
|
+
}
|
|
335
|
+
t.A.length && (F.G(t.A), B.vt.length && R(B)), t.cn.size && F.Dt(t.cn, e), A(), f.size && F.dn(e);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function R(e) {
|
|
339
|
+
for (let t of e.vt) t.ne?.(), R(t);
|
|
340
|
+
}
|
|
341
|
+
function z(e) {
|
|
342
|
+
for (let t = 0; t < e.length; t++) e[t].Ne = w;
|
|
343
|
+
}
|
|
344
|
+
var B = new F(), V = B.m;
|
|
345
|
+
function H(e) {
|
|
346
|
+
if (e) {
|
|
347
|
+
O++;
|
|
348
|
+
try {
|
|
349
|
+
return e();
|
|
350
|
+
} finally {
|
|
351
|
+
try {
|
|
352
|
+
H();
|
|
353
|
+
} finally {
|
|
354
|
+
O--;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if (!B.gt && !E) for (; T || w;) B.flush();
|
|
359
|
+
}
|
|
360
|
+
function ce(e, t) {
|
|
361
|
+
for (let n = 0; n < e.length; n++) e[n](t);
|
|
362
|
+
}
|
|
363
|
+
function le(t, n) {
|
|
364
|
+
if (t.se & 96) return !1;
|
|
365
|
+
if (t.oe?.has(n)) return !0;
|
|
366
|
+
for (let e = t.tt; e; e = e.nt) {
|
|
367
|
+
let t = e.it;
|
|
368
|
+
for (; t;) {
|
|
369
|
+
if (t === n || t.lt === n) return !0;
|
|
370
|
+
t = t.nn;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return !!(t.S & 1 && t._ instanceof e && t._.source === n);
|
|
374
|
+
}
|
|
375
|
+
function ue(e) {
|
|
376
|
+
if (e.fn) return !0;
|
|
377
|
+
if (e.ie.length) return !1;
|
|
378
|
+
let t = !0;
|
|
379
|
+
for (let [n, r] of e.Ie) {
|
|
380
|
+
let i = !1;
|
|
381
|
+
for (let e of r) {
|
|
382
|
+
if (le(e, n)) {
|
|
383
|
+
i = !0;
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
r.delete(e);
|
|
387
|
+
}
|
|
388
|
+
if (!i) e.Ie.delete(n);
|
|
389
|
+
else if (n.S & 1 && n._?.source === n) {
|
|
390
|
+
t = !1;
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return t && F.Tn?.(e) && (t = !1), t && (e.fn = !0), t;
|
|
395
|
+
}
|
|
396
|
+
function U(e) {
|
|
397
|
+
for (; e.fn && typeof e.fn == "object";) e = e.fn;
|
|
398
|
+
return e;
|
|
399
|
+
}
|
|
400
|
+
function de(e, t) {
|
|
401
|
+
let n = w;
|
|
402
|
+
try {
|
|
403
|
+
return w = U(e), t();
|
|
404
|
+
} finally {
|
|
405
|
+
w = n;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/heap.js
|
|
410
|
+
function W(e) {
|
|
411
|
+
return e.se & 32 ? x : b;
|
|
412
|
+
}
|
|
413
|
+
function G(e) {
|
|
414
|
+
if (e.Re === 3) {
|
|
415
|
+
let t = e;
|
|
416
|
+
t.Je || (t.Je = !0, t.C.enqueue(2, t.Ft));
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
let t = W(e);
|
|
420
|
+
t.Ve > e.xe && (t.Ve = e.xe), pe(e, t);
|
|
421
|
+
}
|
|
422
|
+
function fe(e, t) {
|
|
423
|
+
let n = (e.ke?.Nt ? e.ke.dt?.xe : e.ke?.xe) ?? -1;
|
|
424
|
+
n >= e.xe && (e.xe = n + 1);
|
|
425
|
+
let r = e.xe, i = t.eE[r];
|
|
426
|
+
if (i === void 0) t.eE[r] = e;
|
|
427
|
+
else {
|
|
428
|
+
let t = i.st;
|
|
429
|
+
t.ot = e, e.st = t, i.st = e;
|
|
430
|
+
}
|
|
431
|
+
r > t.EE && (t.EE = r);
|
|
432
|
+
}
|
|
433
|
+
function pe(e, t) {
|
|
434
|
+
let n = e.se;
|
|
435
|
+
n & 1036 || (n & 1 ? e.se = n & -4 | 10 : (e.se = n | 8, t.tE && !(n & 2) && (t.tE = !1)), n & 16 || fe(e, t));
|
|
436
|
+
}
|
|
437
|
+
function K(e, t) {
|
|
438
|
+
let n = e.se;
|
|
439
|
+
n & 1052 || (e.se = n | 16, fe(e, t));
|
|
440
|
+
}
|
|
441
|
+
function q(e, t) {
|
|
442
|
+
let n = e.se;
|
|
443
|
+
if (!(n & 24)) return;
|
|
444
|
+
e.se = n & -25;
|
|
445
|
+
let r = e.xe;
|
|
446
|
+
if (e.st === e) t.eE[r] = void 0;
|
|
447
|
+
else {
|
|
448
|
+
let n = e.ot, i = t.eE[r], a = n ?? i;
|
|
449
|
+
e === i ? t.eE[r] = n : e.st.ot = n, a.st = e.st;
|
|
450
|
+
}
|
|
451
|
+
e.st = e, e.ot = void 0;
|
|
452
|
+
}
|
|
453
|
+
function me(e) {
|
|
454
|
+
if (!e.tE) {
|
|
455
|
+
e.tE = !0;
|
|
456
|
+
for (let t = 0; t <= e.EE; t++) for (let n = e.eE[t]; n !== void 0; n = n.ot) n.se & 8 && he(n);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function he(e, t = 2) {
|
|
460
|
+
let n = e.se;
|
|
461
|
+
if (!((n & 3) >= t)) {
|
|
462
|
+
e.se = n & -4 | t;
|
|
463
|
+
for (let t = e.o; t !== null; t = t.le) he(t.fe, 1);
|
|
464
|
+
if (e.u !== null) for (let t = e.u; t !== null; t = t.ae) for (let e = t.o; e !== null; e = e.le) he(e.fe, 1);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
function ge(e, t) {
|
|
468
|
+
for (e.tE = !1, e.Ve = 0; e.Ve <= e.EE; e.Ve++) {
|
|
469
|
+
let n = e.eE[e.Ve];
|
|
470
|
+
for (; n !== void 0;) n.se & 8 ? t(n) : _e(n, e), n = e.eE[e.Ve];
|
|
471
|
+
}
|
|
472
|
+
e.EE = 0;
|
|
473
|
+
}
|
|
474
|
+
function _e(e, t) {
|
|
475
|
+
q(e, t);
|
|
476
|
+
let n = e.xe;
|
|
477
|
+
for (let t = e.tt; t; t = t.nt) {
|
|
478
|
+
let e = t.it, r = e.lt || e;
|
|
479
|
+
r.ce && r.xe >= n && (n = r.xe + 1);
|
|
480
|
+
}
|
|
481
|
+
if (e.xe !== n) {
|
|
482
|
+
e.xe = n;
|
|
483
|
+
for (let t = e.o; t !== null; t = t.le) K(t.fe, W(t.fe));
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/owner.js
|
|
488
|
+
function ve(e) {
|
|
489
|
+
let t = e.Fe;
|
|
490
|
+
for (; t;) {
|
|
491
|
+
let e = t.se;
|
|
492
|
+
t.se = e | 32, e & 24 && (q(t, e & 32 ? x : b), e & 8 ? pe(t, x) : K(t, x)), ve(t), t = t.He;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
function ye(e, t = !1, n) {
|
|
496
|
+
let r = e.se;
|
|
497
|
+
if (r & 64) return;
|
|
498
|
+
if (t) {
|
|
499
|
+
e.se = r | 64;
|
|
500
|
+
let t = e;
|
|
501
|
+
(t.ge || t.pe) && F.un(t);
|
|
502
|
+
}
|
|
503
|
+
t && e.ce && (e.Te = null);
|
|
504
|
+
let i = n ? e.We : e.Fe;
|
|
505
|
+
for (; i;) {
|
|
506
|
+
let e = i.He, t = i;
|
|
507
|
+
if (t.se & 24 && q(t, W(t)), t.tt) {
|
|
508
|
+
let e = t.tt;
|
|
509
|
+
do
|
|
510
|
+
e = Ae(e);
|
|
511
|
+
while (e !== null);
|
|
512
|
+
t.tt = null, t.Ye = null;
|
|
513
|
+
}
|
|
514
|
+
ye(i, !0), i = e;
|
|
515
|
+
}
|
|
516
|
+
if (n ? e.We = null : (e.Fe = null, e.qe = 0), t && !n && !(r & 32) && e.ke !== null && !(e.ke.se & 64)) {
|
|
517
|
+
let t = e.ct, n = e.He;
|
|
518
|
+
t === null ? e.ke.Fe = n : t.He = n, n !== null && (n.ct = t), e.ct = null;
|
|
519
|
+
}
|
|
520
|
+
if (be(e, n), t && e.Tt) {
|
|
521
|
+
let t = e.Tt;
|
|
522
|
+
e.Tt = void 0, t();
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
function be(e, t) {
|
|
526
|
+
let n = t ? e.Qe : e.ye;
|
|
527
|
+
if (n) {
|
|
528
|
+
if (Array.isArray(n)) for (let e = 0; e < n.length; e++) {
|
|
529
|
+
let t = n[e];
|
|
530
|
+
t.call(t);
|
|
531
|
+
}
|
|
532
|
+
else n.call(n);
|
|
533
|
+
t ? e.Qe = null : e.ye = null;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function xe(e, t) {
|
|
537
|
+
let n = e;
|
|
538
|
+
for (; n.T & 4 && n.ke;) n = n.ke;
|
|
539
|
+
if (n.id != null) return we(n.id, t ? n.qe++ : n.qe);
|
|
540
|
+
throw Error("");
|
|
541
|
+
}
|
|
542
|
+
function Se(e) {
|
|
543
|
+
return xe(e, !0);
|
|
544
|
+
}
|
|
545
|
+
function Ce(e, t, n) {
|
|
546
|
+
return e?.id ?? (t ? n?.id : n?.id == null ? void 0 : Se(n));
|
|
547
|
+
}
|
|
548
|
+
function we(e, t) {
|
|
549
|
+
let n = t.toString(36), r = n.length - 1;
|
|
550
|
+
return e + (r ? String.fromCharCode(64 + r) : "") + n;
|
|
551
|
+
}
|
|
552
|
+
function Te() {
|
|
553
|
+
return Z;
|
|
554
|
+
}
|
|
555
|
+
function Ee(e) {
|
|
556
|
+
return Z && (Z.ye ? Array.isArray(Z.ye) ? Z.ye.push(e) : Z.ye = [Z.ye, e] : Z.ye = e), e;
|
|
557
|
+
}
|
|
558
|
+
function De(e = !0) {
|
|
559
|
+
ye(this, e);
|
|
560
|
+
}
|
|
561
|
+
function Oe(e) {
|
|
562
|
+
let t = Z, n = e?.transparent ?? !1, r = {
|
|
563
|
+
id: Ce(e, n, t),
|
|
564
|
+
T: n ? 4 : 0,
|
|
565
|
+
Nt: !0,
|
|
566
|
+
dt: t?.Nt ? t.dt : t,
|
|
567
|
+
Fe: null,
|
|
568
|
+
He: null,
|
|
569
|
+
ct: null,
|
|
570
|
+
ye: null,
|
|
571
|
+
C: t?.C ?? B,
|
|
572
|
+
we: t?.we || u,
|
|
573
|
+
qe: 0,
|
|
574
|
+
Qe: null,
|
|
575
|
+
We: null,
|
|
576
|
+
ke: t,
|
|
577
|
+
dispose: De
|
|
578
|
+
};
|
|
579
|
+
if (t) {
|
|
580
|
+
let e = t.Fe;
|
|
581
|
+
e === null ? t.Fe = r : (r.He = e, e.ct = r, t.Fe = r);
|
|
582
|
+
}
|
|
583
|
+
return r;
|
|
584
|
+
}
|
|
585
|
+
function ke(e, t) {
|
|
586
|
+
let n = Oe(t);
|
|
587
|
+
return at(n, () => e(() => n.dispose()));
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/graph.js
|
|
591
|
+
function Ae(e) {
|
|
592
|
+
let t = e.it, n = e.nt, r = e.le, i = e.ll;
|
|
593
|
+
if (r === null ? t.rt = i : r.ll = i, i !== null) i.le = r;
|
|
594
|
+
else if (t.o = r, r === null) {
|
|
595
|
+
t.ut?.();
|
|
596
|
+
let e = t;
|
|
597
|
+
e.ce && e.T & 32 && !(e.se & 32) && !(e.S & 1) && Me(e);
|
|
598
|
+
}
|
|
599
|
+
return n;
|
|
600
|
+
}
|
|
601
|
+
function je(e) {
|
|
602
|
+
let t = e.Ye, n = t === null ? e.tt : t.nt;
|
|
603
|
+
if (n !== null) {
|
|
604
|
+
do
|
|
605
|
+
n = Ae(n);
|
|
606
|
+
while (n !== null);
|
|
607
|
+
t === null ? e.tt = null : t.nt = null;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
function Me(e) {
|
|
611
|
+
q(e, W(e));
|
|
612
|
+
let t = e.tt;
|
|
613
|
+
for (; t !== null;) t = Ae(t);
|
|
614
|
+
e.tt = null, e.Ye = null, ye(e, !0);
|
|
615
|
+
}
|
|
616
|
+
function Ne(e, t, n = !1) {
|
|
617
|
+
let r = t.Ye;
|
|
618
|
+
if (r !== null && r.it === e) {
|
|
619
|
+
r.Ge &&= n;
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
let i = null, a = t.se & 4;
|
|
623
|
+
if (a && (i = r === null ? t.tt : r.nt, i !== null && i.it === e)) {
|
|
624
|
+
i.nl = t.Ze, t.Ye = i, i.Ge = n;
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
let o = e.rt;
|
|
628
|
+
if (o !== null && o.fe === t && (!a || o.nl === t.Ze)) {
|
|
629
|
+
a ? o.Ge &&= n : o.Ge = n;
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
let s = t.Ye = e.rt = {
|
|
633
|
+
it: e,
|
|
634
|
+
fe: t,
|
|
635
|
+
nt: i,
|
|
636
|
+
ll: o,
|
|
637
|
+
le: null,
|
|
638
|
+
nl: t.Ze,
|
|
639
|
+
Ge: n
|
|
640
|
+
};
|
|
641
|
+
r === null ? t.tt = s : r.nt = s, o === null ? e.o = s : o.le = s;
|
|
642
|
+
}
|
|
643
|
+
//#endregion
|
|
644
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/async.js
|
|
645
|
+
function Pe(e, t) {
|
|
646
|
+
return !e.oe?.has(t) && ((e.oe ??= /* @__PURE__ */ new Set()).add(t), !0);
|
|
647
|
+
}
|
|
648
|
+
function Fe(e, t) {
|
|
649
|
+
return e.oe?.delete(t) ? (e.oe.size === 0 && (e.oe = void 0), !0) : !1;
|
|
650
|
+
}
|
|
651
|
+
function Ie(e) {
|
|
652
|
+
e.oe?.clear(), e.oe = void 0;
|
|
653
|
+
}
|
|
654
|
+
function Le(e, t) {
|
|
655
|
+
e.ue = !0, t.source && Pe(e, t.source), e.S & 2 || Re(e, t.source, t);
|
|
656
|
+
}
|
|
657
|
+
function Re(t, n, r) {
|
|
658
|
+
if (!n) {
|
|
659
|
+
t._ = null;
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
if (r instanceof e && r.source === n) {
|
|
663
|
+
t._ = r;
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
let i = t._;
|
|
667
|
+
(!(i instanceof e) || i.source !== n) && (t._ = new e(n));
|
|
668
|
+
}
|
|
669
|
+
function J(e, t) {
|
|
670
|
+
for (let n = e.o; n !== null; n = n.le) t(n.fe, n);
|
|
671
|
+
for (let n = e.u ?? null; n !== null; n = n.ae) for (let e = n.o; e !== null; e = e.le) t(e.fe, e);
|
|
672
|
+
}
|
|
673
|
+
function ze(e) {
|
|
674
|
+
e.ce && e.T & 32 && !e.o && !(e.se & 32) && !(e.S & 1) && Me(e);
|
|
675
|
+
}
|
|
676
|
+
function Be(e) {
|
|
677
|
+
let t, n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
678
|
+
n.has(e) || (n.add(e), !e.o && e.T & 32 && (t ??= []).push(e), J(e, r));
|
|
679
|
+
};
|
|
680
|
+
if (J(e, r), t) for (let e of t) ze(e);
|
|
681
|
+
}
|
|
682
|
+
function Ve(e, t) {
|
|
683
|
+
let n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
684
|
+
r.has(e) || (r.add(e), e._ === t && (G(e), n = !0), J(e, i));
|
|
685
|
+
};
|
|
686
|
+
J(e, i), n && M();
|
|
687
|
+
}
|
|
688
|
+
function He(e) {
|
|
689
|
+
let t = !1, n, r = /* @__PURE__ */ new Set(), i = F.Se, a = (o) => {
|
|
690
|
+
if (r.has(o) || !Fe(o, e)) return;
|
|
691
|
+
r.add(o), o.de = C;
|
|
692
|
+
let s = o.oe?.values().next().value, c = o.S & 2;
|
|
693
|
+
s ? (c || Re(o, s), i !== null && i(o)) : (o.S &= -2, c || Re(o), i !== null && i(o), o.ue && (G(o), t = !0), o.ue = !1, !o.o && o.T & 32 && (n ??= []).push(o)), J(o, a);
|
|
694
|
+
};
|
|
695
|
+
if (J(e, a), n) for (let e of n) ze(e);
|
|
696
|
+
t && M();
|
|
697
|
+
}
|
|
698
|
+
function Ue(e) {
|
|
699
|
+
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
700
|
+
}
|
|
701
|
+
function We(t, n, r) {
|
|
702
|
+
let i = !1, a = !1;
|
|
703
|
+
if (typeof n == "object" && n && tt(() => {
|
|
704
|
+
i = n[Symbol.asyncIterator], a = !i && Ue(n);
|
|
705
|
+
}), !a && !i) return t.Te = null, t.Ee = !1, n;
|
|
706
|
+
t.Te = n;
|
|
707
|
+
let s, c = () => {
|
|
708
|
+
let e = g(t);
|
|
709
|
+
if (e && t.S & 4 && !U(e).Ie.has(t)) {
|
|
710
|
+
t.Ne = null;
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
B.initTransition(e);
|
|
714
|
+
}, l = (r) => {
|
|
715
|
+
if (t.Te !== n) return;
|
|
716
|
+
let i = r instanceof e;
|
|
717
|
+
if (i && t.Ee) {
|
|
718
|
+
t.Te = null, Le(t, r), t.de = C;
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
c(), Y(t, i ? 1 : 2, r), t.de = C, i || Be(t);
|
|
722
|
+
}, u = (e, i) => {
|
|
723
|
+
if (t.Te !== n || t.se & 130) return;
|
|
724
|
+
c();
|
|
725
|
+
let a = !!(t.S & 4);
|
|
726
|
+
je(t), Ge(t);
|
|
727
|
+
let s = h(t);
|
|
728
|
+
if (s && s.Ae.delete(t), r) r(e), a && Ge(t, !0);
|
|
729
|
+
else if (t._e !== void 0) t.De === o && I(t), t.De = e, F.Pe !== null && F.Pe(t, e), _(t) || ie(t), t.de = C;
|
|
730
|
+
else if (s) {
|
|
731
|
+
let n = t.Re, r = t.Ue, i = t.be;
|
|
732
|
+
try {
|
|
733
|
+
(!n && a || !i || !i(e, r)) && (t.Ue = e, t.de = C, F.Pe !== null && F.Pe(t, e), ie(t, !0));
|
|
734
|
+
} catch (e) {
|
|
735
|
+
Y(t, 2, e);
|
|
736
|
+
}
|
|
737
|
+
} else try {
|
|
738
|
+
it(t, () => e);
|
|
739
|
+
} catch (e) {
|
|
740
|
+
Y(t, 2, e);
|
|
741
|
+
}
|
|
742
|
+
t.De === o && (t.Ee = !1), He(t), M(), H(), i?.();
|
|
743
|
+
}, d = () => t.T & 32 && !t.o && !(t.S & 1) ? (Me(t), !0) : !1;
|
|
744
|
+
if (a) {
|
|
745
|
+
let r = !1, i = !1, a, o = !0;
|
|
746
|
+
if (n.then((e) => {
|
|
747
|
+
o ? (s = e, r = !0) : (u(e), d());
|
|
748
|
+
}, (e) => {
|
|
749
|
+
o ? (a = e, i = !0) : (l(e), d());
|
|
750
|
+
}), o = !1, i) throw l(a), a;
|
|
751
|
+
if (r) t.Ee = !1;
|
|
752
|
+
else {
|
|
753
|
+
if (t.Ee) return t.Ue;
|
|
754
|
+
throw B.initTransition(g(t)), new e(Z);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
if (i) {
|
|
758
|
+
let r = n[Symbol.asyncIterator](), i = !1, a = !1, o = !0;
|
|
759
|
+
Ee(() => {
|
|
760
|
+
if (!a) {
|
|
761
|
+
a = !0;
|
|
762
|
+
try {
|
|
763
|
+
let e = r.return?.();
|
|
764
|
+
Ue(e) && e.then(void 0, () => {});
|
|
765
|
+
} catch {}
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
let c = () => {
|
|
769
|
+
d() || f();
|
|
770
|
+
}, f = () => {
|
|
771
|
+
let e, p, m = !1, h = !1, g = !0, _ = r.next();
|
|
772
|
+
if ((Ue(_) ? _ : { then: (e) => void e(_) }).then((r) => {
|
|
773
|
+
if (g && o) e = r, m = !0, r.done && (a = !0);
|
|
774
|
+
else if (t.Te !== n) return;
|
|
775
|
+
else r.done ? (a = !0, i ? (M(), H()) : u(void 0), d()) : (i = !0, u(r.value, c));
|
|
776
|
+
}, (e) => {
|
|
777
|
+
g ? (p = e, h = !0) : t.Te === n && (a = !0, l(e), d());
|
|
778
|
+
}), g = !1, h) {
|
|
779
|
+
if (a = !0, l(p), o) throw p;
|
|
780
|
+
return !0;
|
|
781
|
+
}
|
|
782
|
+
return m && !e.done ? (s = e.value, i = !0, f()) : m && e.done;
|
|
783
|
+
}, p = f();
|
|
784
|
+
if (o = !1, !i && !p) {
|
|
785
|
+
if (t.Ee) return t.Ue;
|
|
786
|
+
throw B.initTransition(g(t)), new e(Z);
|
|
787
|
+
}
|
|
788
|
+
t.Ee = !1;
|
|
789
|
+
}
|
|
790
|
+
return s;
|
|
791
|
+
}
|
|
792
|
+
function Ge(e, t = !1) {
|
|
793
|
+
e.oe && Ie(e), e.ue &&= !1, e.he = !1, e.S = t ? 0 : e.S & 4, e._ && Re(e), (e.ge || e.pe) && F.Se(e), e.u && F.Oe !== null && F.Oe(e), e.i && e.i();
|
|
794
|
+
}
|
|
795
|
+
function Y(n, r, i, a, o) {
|
|
796
|
+
r === 2 && !(i instanceof t) && !(i instanceof e) && (i = new t(n, i));
|
|
797
|
+
let s = r === 1 && i instanceof e ? i.source : void 0, c = s === n, l = r === 1 && n._e !== void 0 && !c, u = l && _(n);
|
|
798
|
+
a || (r === 1 && s ? (Pe(n, s), n.S = 1 | n.S & 4, Re(n, s, i)) : (Ie(n), n.S = r | (r === 2 ? 0 : n.S & 4), n._ = i), F.Se !== null && F.Se(n), n.u && F.Oe !== null && F.Oe(n)), o && !a && v(n, o);
|
|
799
|
+
let d = a || u, f = a || l ? void 0 : o;
|
|
800
|
+
if (n.i) {
|
|
801
|
+
if (a && r === 1) return;
|
|
802
|
+
d ? n.i(r, i) : n.i();
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
J(n, (t, n) => {
|
|
806
|
+
if (t.de = C, r === 1 && s && !t.oe?.has(s) || r !== 1 && (t._ !== i || t.oe)) {
|
|
807
|
+
if (n.Ge && r !== 1 && !(i instanceof e)) {
|
|
808
|
+
G(t), M();
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
!d && !t.Ne && I(t), Y(t, r, i, d, f);
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
F.Ce = $, F.me = ye;
|
|
816
|
+
var X = !1, Ke = !1, qe = !1, Je = !1, Z = null, Q = null;
|
|
817
|
+
function $(t, n = !1) {
|
|
818
|
+
let r = t.Re;
|
|
819
|
+
n || (t.Ne && (!r || w) && w !== t.Ne && B.initTransition(t.Ne), q(t, W(t)), t.Te = null, t.Ne || r === 3 ? ye(t) : (t.Fe !== null || t.ye !== null) && (ve(t), t.Qe = t.ye, t.We = t.Fe, t.ye = null, t.Fe = null, t.qe = 0));
|
|
820
|
+
let i = !!(t.se & 128), l = t._e !== void 0 && t._e !== o, u = !!(t.S & 4), d = t.S & 2 ? t._ : void 0, f = (t.se & a) !== 0, p = t.Ee, m = Z;
|
|
821
|
+
Z = t, t.Ye = null, t.Ze++, t.se = 4, t.de = C;
|
|
822
|
+
let h = t.De === o ? t.Ue : t.De, g = t.xe, _ = X, v = Q;
|
|
823
|
+
X = !0;
|
|
824
|
+
let y = Je;
|
|
825
|
+
if (Je = !1, i) {
|
|
826
|
+
let e = F.je(t, !0);
|
|
827
|
+
e && (Q = e);
|
|
828
|
+
} else if (w && !n && w.Me.length) {
|
|
829
|
+
let e = F.je(t, !1);
|
|
830
|
+
e && (i = !0, Q = e);
|
|
831
|
+
}
|
|
832
|
+
let b = r && r !== 2, x = Ke;
|
|
833
|
+
b && (Ke = !0);
|
|
834
|
+
try {
|
|
835
|
+
if (t.T & 64) h = t.ce(h), t.Te = null, t.Ee = !1;
|
|
836
|
+
else {
|
|
837
|
+
let e = t.Te, n = t.ce(h), r = typeof n == "object" && !!n, i = t.Te !== e;
|
|
838
|
+
h = i || !r ? n : We(t, n), !i && !r && (t.Te = null, t.Ee = !1);
|
|
839
|
+
}
|
|
840
|
+
(t.S !== 0 || t.i !== void 0 || t._ || t.he || t.ue || t.oe !== void 0 || t.ge !== void 0 || t.pe !== void 0 || t.u !== null) && Ge(t, n), t.Ke && F.ze(t);
|
|
841
|
+
} catch (n) {
|
|
842
|
+
let r = n instanceof e;
|
|
843
|
+
if (r && t.Ee) Le(t, n);
|
|
844
|
+
else {
|
|
845
|
+
r && Q && F.$e(t);
|
|
846
|
+
let e = !1;
|
|
847
|
+
r && (t.ue = !0, F.Be !== null && (e = F.Be(t, f))), Y(t, r ? 1 : 2, n, void 0, r ? t.Ke : void 0), e && F.k(t);
|
|
848
|
+
}
|
|
849
|
+
} finally {
|
|
850
|
+
X = _, Je = y, b && (Ke = x), t.se = 0 | (n ? t.se & 256 : 0), Z = m;
|
|
851
|
+
}
|
|
852
|
+
if (!t._) {
|
|
853
|
+
je(t);
|
|
854
|
+
let e = l ? c(t._e) : t.De === o ? t.Ue : t.De, a = !1;
|
|
855
|
+
try {
|
|
856
|
+
a = !r && u || !t.be || !t.be(e, h);
|
|
857
|
+
} catch (e) {
|
|
858
|
+
Y(t, 2, e);
|
|
859
|
+
}
|
|
860
|
+
if (r && a && (t.Je = !t._, n || t.C.enqueue(r, t.Xe ??= F.et.bind(null, t))), !t._) {
|
|
861
|
+
if (a) {
|
|
862
|
+
let e = l ? t._e : void 0;
|
|
863
|
+
n || r && (w !== t.Ne || w === null) || i ? (t.Ue = h, l && i && (t._e = h === void 0 ? s : h, t.De = o)) : (t.De = h, p && (t.Ee = !0), (w || t.Ne) && F.Pe !== null && F.Pe(t, h)), t.o !== null && (!l || i || t._e !== e) && ie(t, i || l);
|
|
864
|
+
} else if (l) t.De === o && I(t), t.De = h, p && (t.Ee = !0);
|
|
865
|
+
else if (t.xe != g) for (let e = t.o; e !== null; e = e.le) K(e.fe, W(e.fe));
|
|
866
|
+
}
|
|
867
|
+
d !== void 0 && !a && !t._ && Ve(t, d);
|
|
868
|
+
}
|
|
869
|
+
Q = v, (t.De !== o || t.We !== null || t.Qe !== null || t.S & 5) && (!n || t.S & 1) && (!t.Ne || l) && I(t), t.Ne && r && w !== t.Ne && de(t.Ne, () => $(t));
|
|
870
|
+
}
|
|
871
|
+
function Ye(e) {
|
|
872
|
+
if (e.se & 1) for (let t = e.tt; t; t = t.nt) {
|
|
873
|
+
let n = t.it, r = n.lt || n;
|
|
874
|
+
if (r.ce && Ye(r), e.se & 2) break;
|
|
875
|
+
}
|
|
876
|
+
(e.se & 130 || e._ && e.de < C && !e.Te) && $(e), e.se &= 280;
|
|
877
|
+
}
|
|
878
|
+
function Xe(e, t) {
|
|
879
|
+
let n = t?.transparent ?? !1, r = typeof t == "object" && !!t && "loadingValue" in t, i = {
|
|
880
|
+
id: Ce(t, n, Z),
|
|
881
|
+
T: (n ? 4 : 0) | !!t?.ownedWrite | (!Z || t?.lazy ? 32 : 0) | (t?.sync ? 64 : 0) | (t?.V ? 2 : 0) | 0,
|
|
882
|
+
be: t?.equals == null ? et : t.equals,
|
|
883
|
+
ut: t?.unobserved,
|
|
884
|
+
ye: null,
|
|
885
|
+
C: Z?.C ?? B,
|
|
886
|
+
we: Z?.we ?? u,
|
|
887
|
+
qe: 0,
|
|
888
|
+
ce: e,
|
|
889
|
+
Ue: r ? t.loadingValue : void 0,
|
|
890
|
+
xe: 0,
|
|
891
|
+
u: null,
|
|
892
|
+
ot: void 0,
|
|
893
|
+
st: null,
|
|
894
|
+
tt: null,
|
|
895
|
+
Ye: null,
|
|
896
|
+
Ze: 0,
|
|
897
|
+
o: null,
|
|
898
|
+
rt: null,
|
|
899
|
+
ke: Z,
|
|
900
|
+
He: null,
|
|
901
|
+
ct: null,
|
|
902
|
+
Fe: null,
|
|
903
|
+
se: t?.lazy ? 512 : 0,
|
|
904
|
+
S: r ? 0 : 4,
|
|
905
|
+
de: C,
|
|
906
|
+
De: o,
|
|
907
|
+
Qe: null,
|
|
908
|
+
We: null,
|
|
909
|
+
Te: null,
|
|
910
|
+
Ne: null,
|
|
911
|
+
he: !1,
|
|
912
|
+
Ee: r
|
|
913
|
+
};
|
|
914
|
+
return $e(i, t), i;
|
|
915
|
+
}
|
|
916
|
+
function Ze(e, t, n, r, i, a) {
|
|
917
|
+
let s = a?.transparent ?? !1, c = {
|
|
918
|
+
id: Ce(a, s, Z),
|
|
919
|
+
T: (s ? 4 : 0) | !!a?.ownedWrite | (a?.sync ? 64 : 0) | 0,
|
|
920
|
+
be: !1,
|
|
921
|
+
ut: a?.unobserved,
|
|
922
|
+
ye: null,
|
|
923
|
+
C: Z?.C ?? B,
|
|
924
|
+
we: Z?.we ?? u,
|
|
925
|
+
qe: 0,
|
|
926
|
+
ce: e,
|
|
927
|
+
Ue: void 0,
|
|
928
|
+
xe: 0,
|
|
929
|
+
u: null,
|
|
930
|
+
ot: void 0,
|
|
931
|
+
st: null,
|
|
932
|
+
tt: null,
|
|
933
|
+
Ye: null,
|
|
934
|
+
Ze: 0,
|
|
935
|
+
o: null,
|
|
936
|
+
rt: null,
|
|
937
|
+
ke: Z,
|
|
938
|
+
He: null,
|
|
939
|
+
ct: null,
|
|
940
|
+
Fe: null,
|
|
941
|
+
se: 512,
|
|
942
|
+
S: 4,
|
|
943
|
+
de: C,
|
|
944
|
+
De: o,
|
|
945
|
+
Qe: null,
|
|
946
|
+
We: null,
|
|
947
|
+
Te: null,
|
|
948
|
+
Ne: null,
|
|
949
|
+
he: !1,
|
|
950
|
+
Ee: !1,
|
|
951
|
+
Je: !1,
|
|
952
|
+
_t: void 0,
|
|
953
|
+
ft: t,
|
|
954
|
+
Et: n,
|
|
955
|
+
Tt: void 0,
|
|
956
|
+
Re: r,
|
|
957
|
+
i
|
|
958
|
+
};
|
|
959
|
+
return $e(c, Qe), c;
|
|
960
|
+
}
|
|
961
|
+
var Qe = { lazy: !0 };
|
|
962
|
+
function $e(e, t) {
|
|
963
|
+
e.st = e;
|
|
964
|
+
let n = Z?.Nt ? Z.dt : Z;
|
|
965
|
+
if (Z) {
|
|
966
|
+
let t = Z.Fe;
|
|
967
|
+
t === null ? Z.Fe = e : (e.He = t, t.ct = e, Z.Fe = e);
|
|
968
|
+
}
|
|
969
|
+
n && (e.xe = n.xe + 1), F.It !== null && F.It(e), !t?.lazy && $(e, !0);
|
|
970
|
+
}
|
|
971
|
+
function et(e, t) {
|
|
972
|
+
return e === t;
|
|
973
|
+
}
|
|
974
|
+
function tt(e, t) {
|
|
975
|
+
if (F.St === null && !X) return e();
|
|
976
|
+
let n = X;
|
|
977
|
+
X = !1;
|
|
978
|
+
try {
|
|
979
|
+
return F.St === null ? e() : F.St(e);
|
|
980
|
+
} finally {
|
|
981
|
+
X = n;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
function nt(e, t) {
|
|
985
|
+
e.se & 512 ? (e.se &= -513, $(e, !0)) : e.se & 64 ? $(e, !0) : t && Ye(e);
|
|
986
|
+
}
|
|
987
|
+
function rt(e) {
|
|
988
|
+
if (Je) return F.At(e);
|
|
989
|
+
let t = Z;
|
|
990
|
+
t?.Nt && (t = t.dt);
|
|
991
|
+
let n = e, r = e.lt || e;
|
|
992
|
+
if (typeof n.ce == "function" && nt(e, !1), !n.ce && r === e && e._e === void 0 && e.Le === void 0 && w === null && Q === null) return t && X && Ne(e, t), !t || e.De === o ? e.Ue : e.De;
|
|
993
|
+
if (t && X && (Ne(e, t, qe), r.ce)) {
|
|
994
|
+
let n = W(e);
|
|
995
|
+
r.xe >= n.Ve && (he(t), me(n), Ye(r));
|
|
996
|
+
let i = r.xe;
|
|
997
|
+
i >= t.xe && e.ke !== t && (t.xe = i + 1);
|
|
998
|
+
}
|
|
999
|
+
if (r.S & 1) {
|
|
1000
|
+
if (t && !(Ke && r.Ne && w !== r.Ne)) {
|
|
1001
|
+
if (Q === null || F.Ot(r)) throw !X && e !== t && Ne(e, t), r._;
|
|
1002
|
+
} else if (t && r !== e && r.S & 4) throw !X && e !== t && Ne(e, t), r._;
|
|
1003
|
+
else if (!t && r.S & 4) throw r._;
|
|
1004
|
+
}
|
|
1005
|
+
if (r.ce && r.S & 2) {
|
|
1006
|
+
if (X && r.de < C) return $(r), rt(e);
|
|
1007
|
+
throw r._;
|
|
1008
|
+
}
|
|
1009
|
+
if (e._e !== void 0 && e._e !== o) return c(e._e);
|
|
1010
|
+
if (Q !== null && w !== null && t !== null && F.Rt(e, r, t)) return e.Ue;
|
|
1011
|
+
let i = !t || Q !== null && F.Pt(e, r, t) || e.De === o || Ke && e.Ne && w !== e.Ne ? e.Ue : e.De;
|
|
1012
|
+
return !t && r === e && typeof n.ce == "function" && e.T & 32 && !(r.S & 1) && !e.o && Me(e), i;
|
|
1013
|
+
}
|
|
1014
|
+
function it(e, t) {
|
|
1015
|
+
if (e.Ne && w !== e.Ne && B.initTransition(e.Ne), e._e !== void 0) return F.Gt(e, t);
|
|
1016
|
+
let n = e.De === o ? e.Ue : e.De;
|
|
1017
|
+
return typeof t == "function" && (t = t(n)), e.S & 4 || !e.be || !e.be(n, t) ? (e.De === o && I(e), e.De = t, (e.ge !== void 0 || e.pe !== void 0) && F.Pe !== null && F.Pe(e, t), e.de = C, ie(e), M(), t) : t;
|
|
1018
|
+
}
|
|
1019
|
+
function at(e, t) {
|
|
1020
|
+
let n = Z, r = X;
|
|
1021
|
+
Z = e, X = !1;
|
|
1022
|
+
try {
|
|
1023
|
+
return t();
|
|
1024
|
+
} finally {
|
|
1025
|
+
Z = n, X = r;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
//#endregion
|
|
1029
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/context.js
|
|
1030
|
+
function ot(e, t, n = Te()) {
|
|
1031
|
+
if (!n) throw new r();
|
|
1032
|
+
n.we = {
|
|
1033
|
+
...n.we,
|
|
1034
|
+
[e.id]: st(t) ? e.defaultValue : t
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
function st(e) {
|
|
1038
|
+
return e === void 0;
|
|
1039
|
+
}
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/effect.js
|
|
1042
|
+
function ct(e, t, n, r) {
|
|
1043
|
+
let i = Ze(e, t, n, r?.user ? 2 : 1, lt, r);
|
|
1044
|
+
$(i, !0), !r?.defer && (i.Re === 2 || r?.schedule ? i.C.enqueue(i.Re, ut.bind(null, i)) : ut(i));
|
|
1045
|
+
}
|
|
1046
|
+
function lt(e, t) {
|
|
1047
|
+
let r = e === void 0 ? this.S : e, i = t === void 0 ? this._ : t;
|
|
1048
|
+
if (r & 2) {
|
|
1049
|
+
if (this.C.notify(this, 1, 0), this.Re === 2) {
|
|
1050
|
+
this.S & 2 && (this.Je = !0, this.C.enqueue(this.Re, this.Xe ??= ut.bind(null, this)));
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
if (!this.C.notify(this, 2, 2)) throw N(n(i)), i;
|
|
1054
|
+
} else this.Re === 1 && this.C.notify(this, 3, r, i);
|
|
1055
|
+
}
|
|
1056
|
+
function ut(e) {
|
|
1057
|
+
if (!e.Je || e.se & 64) return;
|
|
1058
|
+
if (e.S & 2 && e.Re === 2) {
|
|
1059
|
+
let t = n(e._);
|
|
1060
|
+
e._t = e.Ue, e.Je = !1;
|
|
1061
|
+
try {
|
|
1062
|
+
e.Et ? e.Et(t, () => {
|
|
1063
|
+
let t = e.Tt;
|
|
1064
|
+
e.Tt = void 0, t?.();
|
|
1065
|
+
}) : console.error(t);
|
|
1066
|
+
} catch (t) {
|
|
1067
|
+
if (!e.C.notify(e, 2, 2)) throw N(t), t;
|
|
1068
|
+
}
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
let r = e.Tt;
|
|
1072
|
+
e.Tt = void 0;
|
|
1073
|
+
try {
|
|
1074
|
+
r?.(), e.Tt = e.ft(e.Ue, e._t);
|
|
1075
|
+
} catch (n) {
|
|
1076
|
+
if (e._ = new t(e, n), e.S |= 2, !e.C.notify(e, 2, 2)) throw N(n), n;
|
|
1077
|
+
} finally {
|
|
1078
|
+
e._t = e.Ue, e.Je = !1;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
F.et = ut;
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/signals.js
|
|
1084
|
+
function dt(e) {
|
|
1085
|
+
let t = rt.bind(null, e);
|
|
1086
|
+
return t[d] = e, t;
|
|
1087
|
+
}
|
|
1088
|
+
function ft(e, t) {
|
|
1089
|
+
return dt(Xe(e, t));
|
|
1090
|
+
}
|
|
1091
|
+
function pt(e, t, n) {
|
|
1092
|
+
ct(e, t, void 0, n);
|
|
1093
|
+
}
|
|
1094
|
+
//#endregion
|
|
1095
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/store/store.js
|
|
1096
|
+
var mt = Symbol(0);
|
|
1097
|
+
function ht(e) {
|
|
1098
|
+
return Reflect.ownKeys(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
1099
|
+
}
|
|
1100
|
+
//#endregion
|
|
1101
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/store/utils.js
|
|
1102
|
+
function gt() {
|
|
1103
|
+
return !0;
|
|
1104
|
+
}
|
|
1105
|
+
var _t = {
|
|
1106
|
+
get(e, t, n) {
|
|
1107
|
+
return t === mt ? n : e.get(t);
|
|
1108
|
+
},
|
|
1109
|
+
has(e, t) {
|
|
1110
|
+
return t === mt || e.has(t);
|
|
1111
|
+
},
|
|
1112
|
+
set: gt,
|
|
1113
|
+
deleteProperty: gt,
|
|
1114
|
+
getOwnPropertyDescriptor(e, t) {
|
|
1115
|
+
return {
|
|
1116
|
+
configurable: !0,
|
|
1117
|
+
enumerable: !0,
|
|
1118
|
+
get() {
|
|
1119
|
+
return e.get(t);
|
|
1120
|
+
},
|
|
1121
|
+
set: gt,
|
|
1122
|
+
deleteProperty: gt
|
|
1123
|
+
};
|
|
1124
|
+
},
|
|
1125
|
+
ownKeys(e) {
|
|
1126
|
+
return e.keys();
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
function vt(e) {
|
|
1130
|
+
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
1131
|
+
}
|
|
1132
|
+
var yt = Symbol(0);
|
|
1133
|
+
function bt(...e) {
|
|
1134
|
+
if (e.length === 1 && typeof e[0] != "function") return e[0];
|
|
1135
|
+
let t = !1, n = [];
|
|
1136
|
+
for (let r = 0; r < e.length; r++) {
|
|
1137
|
+
let i = e[r];
|
|
1138
|
+
t ||= !!i && mt in i;
|
|
1139
|
+
let a = !!i && i[yt];
|
|
1140
|
+
if (a) for (let e = 0; e < a.length; e++) n.push(a[e]);
|
|
1141
|
+
else n.push(typeof i == "function" ? (t = !0, ft(i)) : i);
|
|
1142
|
+
}
|
|
1143
|
+
if (l && t) return new Proxy({
|
|
1144
|
+
get(e) {
|
|
1145
|
+
if (e === yt) return n;
|
|
1146
|
+
for (let t = n.length - 1; t >= 0; t--) {
|
|
1147
|
+
let r = vt(n[t]);
|
|
1148
|
+
if (e in r) return r[e];
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
has(e) {
|
|
1152
|
+
for (let t = n.length - 1; t >= 0; t--) if (e in vt(n[t])) return !0;
|
|
1153
|
+
return !1;
|
|
1154
|
+
},
|
|
1155
|
+
keys() {
|
|
1156
|
+
let e = /* @__PURE__ */ new Set();
|
|
1157
|
+
for (let t = 0; t < n.length; t++) {
|
|
1158
|
+
let r = ht(vt(n[t]));
|
|
1159
|
+
for (let t = 0; t < r.length; t++) e.add(r[t]);
|
|
1160
|
+
}
|
|
1161
|
+
return [...e];
|
|
1162
|
+
}
|
|
1163
|
+
}, _t);
|
|
1164
|
+
let r = Object.create(null), i = !1, a = n.length - 1;
|
|
1165
|
+
for (let e = a; e >= 0; e--) {
|
|
1166
|
+
let t = n[e];
|
|
1167
|
+
if (!t) {
|
|
1168
|
+
e === a && a--;
|
|
1169
|
+
continue;
|
|
1170
|
+
}
|
|
1171
|
+
let o = Object.getOwnPropertyNames(t);
|
|
1172
|
+
for (let n = o.length - 1; n >= 0; n--) {
|
|
1173
|
+
let s = o[n];
|
|
1174
|
+
if (s !== "__proto__" && s !== "constructor" && !r[s]) {
|
|
1175
|
+
i ||= e !== a;
|
|
1176
|
+
let n = Object.getOwnPropertyDescriptor(t, s);
|
|
1177
|
+
r[s] = n.get ? {
|
|
1178
|
+
enumerable: !0,
|
|
1179
|
+
configurable: !0,
|
|
1180
|
+
get: n.get.bind(t)
|
|
1181
|
+
} : n;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (!i) return n[a];
|
|
1186
|
+
let o = {}, s = Object.keys(r);
|
|
1187
|
+
for (let e = s.length - 1; e >= 0; e--) {
|
|
1188
|
+
let t = s[e], n = r[t];
|
|
1189
|
+
n.get ? Object.defineProperty(o, t, n) : o[t] = n.value;
|
|
1190
|
+
}
|
|
1191
|
+
return o[yt] = n, o;
|
|
1192
|
+
}
|
|
1193
|
+
//#endregion
|
|
1194
|
+
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/boundaries.js
|
|
1195
|
+
function xt(e, t) {
|
|
1196
|
+
if (typeof e == "function" && !e.length) {
|
|
1197
|
+
if (t?.doNotUnwrap) return e;
|
|
1198
|
+
do
|
|
1199
|
+
e = e();
|
|
1200
|
+
while (typeof e == "function" && !e.length);
|
|
1201
|
+
}
|
|
1202
|
+
if (!(t?.skipNonRendered && (e == null || e === !0 || e === !1 || e === ""))) {
|
|
1203
|
+
if (Array.isArray(e)) {
|
|
1204
|
+
let n = [];
|
|
1205
|
+
return St(e, n, t) ? () => {
|
|
1206
|
+
let e = [];
|
|
1207
|
+
return St(n, e, {
|
|
1208
|
+
...t,
|
|
1209
|
+
doNotUnwrap: !1
|
|
1210
|
+
}), e;
|
|
1211
|
+
} : n;
|
|
1212
|
+
}
|
|
1213
|
+
return e;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
function St(t, n = [], r) {
|
|
1217
|
+
let i = null, a = !1;
|
|
1218
|
+
for (let o = 0; o < t.length; o++) try {
|
|
1219
|
+
let e = t[o];
|
|
1220
|
+
if (typeof e == "function" && !e.length) {
|
|
1221
|
+
if (r?.doNotUnwrap) {
|
|
1222
|
+
n.push(e), a = !0;
|
|
1223
|
+
continue;
|
|
1224
|
+
}
|
|
1225
|
+
do
|
|
1226
|
+
e = e();
|
|
1227
|
+
while (typeof e == "function" && !e.length);
|
|
1228
|
+
}
|
|
1229
|
+
Array.isArray(e) ? a = St(e, n, r) : r?.skipNonRendered && (e == null || e === !0 || e === !1 || e === "") || n.push(e);
|
|
1230
|
+
} catch (t) {
|
|
1231
|
+
if (!(t instanceof e)) throw t;
|
|
1232
|
+
i = t;
|
|
1233
|
+
}
|
|
1234
|
+
if (i) throw i;
|
|
1235
|
+
return a;
|
|
1236
|
+
}
|
|
1237
|
+
//#endregion
|
|
1238
|
+
//#region ../../node_modules/.bun/solid-js@2.0.0-rc.0/node_modules/solid-js/dist/solid.js
|
|
1239
|
+
function Ct(e, t) {
|
|
1240
|
+
let n = Symbol(t && t.name || "");
|
|
1241
|
+
function r(e) {
|
|
1242
|
+
return ke(() => (ot(r, e.value), wt(() => e.children)));
|
|
1243
|
+
}
|
|
1244
|
+
return r.id = n, r.defaultValue = e, r;
|
|
1245
|
+
}
|
|
1246
|
+
function wt(e) {
|
|
1247
|
+
let t = ft(e, { lazy: !0 }), n = ft(() => xt(t()), {
|
|
1248
|
+
lazy: !0,
|
|
1249
|
+
sync: !0
|
|
1250
|
+
});
|
|
1251
|
+
return n.toArray = () => {
|
|
1252
|
+
let e = n();
|
|
1253
|
+
return Array.isArray(e) ? e : e == null ? [] : [e];
|
|
1254
|
+
}, n;
|
|
1255
|
+
}
|
|
1256
|
+
var Tt = (...e) => ft(...e), Et = (...e) => pt(...e);
|
|
1257
|
+
function Dt(e, t) {
|
|
1258
|
+
return tt(() => e(t || {}));
|
|
1259
|
+
}
|
|
1260
|
+
//#endregion
|
|
1261
|
+
//#region ../renderer/dist/index.js
|
|
1262
|
+
var Ot = {
|
|
1263
|
+
transparent: !0,
|
|
1264
|
+
sync: !0
|
|
1265
|
+
}, kt = { sync: !0 }, At = (e, t, n) => Et(e, t, n ? {
|
|
1266
|
+
sync: !0,
|
|
1267
|
+
...n,
|
|
1268
|
+
transparent: !n.scope
|
|
1269
|
+
} : Ot), jt = (e) => Tt(() => e(), kt), Mt = {};
|
|
1270
|
+
function Nt({ createElement: e, createTextNode: t, createSentinel: n = () => t(""), isTextNode: r, replaceText: i, insertNode: a, removeNode: o, cleanupNodes: s, setProperty: c, getParentNode: l, getFirstChild: u, getNextSibling: d }) {
|
|
1271
|
+
function f(e, t, r, i, o) {
|
|
1272
|
+
let s = o && o.onUpdate, c = o;
|
|
1273
|
+
if (s) {
|
|
1274
|
+
let { onUpdate: e, ...t } = o;
|
|
1275
|
+
c = t;
|
|
1276
|
+
}
|
|
1277
|
+
let l = r !== void 0;
|
|
1278
|
+
if (l && !i && (i = []), typeof t != "function" && (t = m(t, l, !0), typeof t != "function")) {
|
|
1279
|
+
p(e, t, i, r), s && s(t);
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
if (l && i.length === 0) {
|
|
1283
|
+
let t = n();
|
|
1284
|
+
a(e, t, r), i = [t];
|
|
1285
|
+
}
|
|
1286
|
+
let u = i;
|
|
1287
|
+
At((n) => {
|
|
1288
|
+
let i = m(t(), l, !0);
|
|
1289
|
+
return typeof i == "function" ? (At(() => m(i, l), (t) => {
|
|
1290
|
+
p(e, t, u, r), u = t, s && s(u);
|
|
1291
|
+
}, n !== void 0 && !(o && o.schedule) ? {
|
|
1292
|
+
...c,
|
|
1293
|
+
schedule: !0
|
|
1294
|
+
} : c), Mt) : i;
|
|
1295
|
+
}, (t) => {
|
|
1296
|
+
t !== Mt && (p(e, t, u, r), u = t, s && s(u));
|
|
1297
|
+
}, c);
|
|
1298
|
+
}
|
|
1299
|
+
function p(e, n, r, o) {
|
|
1300
|
+
if (n === r) return;
|
|
1301
|
+
let s = typeof n, c = o !== void 0;
|
|
1302
|
+
if (s === "string" || s === "number") {
|
|
1303
|
+
let a = typeof r;
|
|
1304
|
+
a === "string" || a === "number" ? i(u(e), n) : g(e, r, o, t(n));
|
|
1305
|
+
} else n == null ? g(e, r, o) : Array.isArray(n) ? n.length === 0 ? g(e, r, o) : Array.isArray(r) ? r.length === 0 ? _(e, n, o) : h(e, r, n) : r == null ? _(e, n) : h(e, c && r || [u(e)], n) : Array.isArray(r) ? g(e, r, c ? o : null, n) : r == null || !u(e) ? a(e, n) : v(e, n, u(e));
|
|
1306
|
+
}
|
|
1307
|
+
function m(e, n, r) {
|
|
1308
|
+
if (e = xt(e, {
|
|
1309
|
+
skipNonRendered: !0,
|
|
1310
|
+
doNotUnwrap: r
|
|
1311
|
+
}), r && typeof e == "function") return e;
|
|
1312
|
+
if (n && !Array.isArray(e) && (e = [e ?? ""]), Array.isArray(e)) for (let n = 0, r = e.length; n < r; n++) {
|
|
1313
|
+
let r = e[n], i = typeof r;
|
|
1314
|
+
(i === "string" || i === "number") && (e[n] = t(r));
|
|
1315
|
+
}
|
|
1316
|
+
return e;
|
|
1317
|
+
}
|
|
1318
|
+
function h(e, t, n) {
|
|
1319
|
+
let r = n.length, i = t.length, s = r, c = 0, l = 0, u = d(t[i - 1]), f = null;
|
|
1320
|
+
for (; c < i || l < s;) {
|
|
1321
|
+
if (t[c] === n[l]) {
|
|
1322
|
+
c++, l++;
|
|
1323
|
+
continue;
|
|
1324
|
+
}
|
|
1325
|
+
for (; t[i - 1] === n[s - 1];) i--, s--;
|
|
1326
|
+
if (i === c) {
|
|
1327
|
+
let t = s < r ? l ? d(n[l - 1]) : n[s - l] : u;
|
|
1328
|
+
for (; l < s;) a(e, n[l++], t);
|
|
1329
|
+
} else if (s === l) for (; c < i;) (!f || !f.has(t[c])) && o(e, t[c]), c++;
|
|
1330
|
+
else if (t[c] === n[s - 1] && n[l] === t[i - 1]) {
|
|
1331
|
+
let r = t[c];
|
|
1332
|
+
do
|
|
1333
|
+
if (a(e, t[--i], r), l++, c >= i - 1 || l >= s) break;
|
|
1334
|
+
while (t[c] === n[s - 1] && n[l] === t[i - 1]);
|
|
1335
|
+
} else {
|
|
1336
|
+
if (!f) {
|
|
1337
|
+
f = /* @__PURE__ */ new Map();
|
|
1338
|
+
let e = l;
|
|
1339
|
+
for (; e < s;) f.set(n[e], e++);
|
|
1340
|
+
}
|
|
1341
|
+
let r = f.get(t[c]);
|
|
1342
|
+
if (r != null) {
|
|
1343
|
+
if (l < r && r < s) {
|
|
1344
|
+
let o = c, u = 1, d;
|
|
1345
|
+
for (; ++o < i && o < s && (d = f.get(t[o])) != null && d === r + u;) u++;
|
|
1346
|
+
if (u > r - l) {
|
|
1347
|
+
let i = t[c];
|
|
1348
|
+
for (; l < r;) a(e, n[l++], i);
|
|
1349
|
+
} else v(e, n[l++], t[c++]);
|
|
1350
|
+
} else c++;
|
|
1351
|
+
} else o(e, t[c++]);
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
function g(e, t, n, r) {
|
|
1356
|
+
if (n === void 0) {
|
|
1357
|
+
let t;
|
|
1358
|
+
for (; t = u(e);) o(e, t);
|
|
1359
|
+
return r && a(e, r), "";
|
|
1360
|
+
}
|
|
1361
|
+
if (t.length) {
|
|
1362
|
+
let i = !1;
|
|
1363
|
+
for (let s = t.length - 1; s >= 0; s--) {
|
|
1364
|
+
let c = t[s];
|
|
1365
|
+
if (r !== c) {
|
|
1366
|
+
let t = l(c) === e;
|
|
1367
|
+
r && !i && !s ? t ? v(e, r, c) : a(e, r, n) : t && o(e, c);
|
|
1368
|
+
} else i = !0;
|
|
1369
|
+
}
|
|
1370
|
+
} else r && a(e, r, n);
|
|
1371
|
+
}
|
|
1372
|
+
function _(e, t, n) {
|
|
1373
|
+
for (let r = 0, i = t.length; r < i; r++) a(e, t[r], n);
|
|
1374
|
+
}
|
|
1375
|
+
function v(e, t, n) {
|
|
1376
|
+
a(e, t, n), o(e, n);
|
|
1377
|
+
}
|
|
1378
|
+
function y(e, t) {
|
|
1379
|
+
if (Array.isArray(e)) for (let n = 0, r = e.length; n < r; n++) y(e[n], t);
|
|
1380
|
+
else e != null && typeof e != "string" && typeof e != "number" && t.push(e);
|
|
1381
|
+
return t;
|
|
1382
|
+
}
|
|
1383
|
+
function b(e, t) {
|
|
1384
|
+
let n = y(t, []);
|
|
1385
|
+
if (!n.length && (typeof t == "string" || typeof t == "number")) {
|
|
1386
|
+
let t = u(e);
|
|
1387
|
+
t && n.push(t);
|
|
1388
|
+
}
|
|
1389
|
+
return n;
|
|
1390
|
+
}
|
|
1391
|
+
function x(e, t) {
|
|
1392
|
+
for (let n = 0, r = t.length; n < r; n++) {
|
|
1393
|
+
let r = t[n];
|
|
1394
|
+
l(r) === e && o(e, r);
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
function S(e, t, n) {
|
|
1398
|
+
let r = {};
|
|
1399
|
+
return t ||= {}, n || f(e, () => t.children), At(() => {
|
|
1400
|
+
let n = t.ref;
|
|
1401
|
+
(typeof n == "function" || Array.isArray(n)) && w(() => n, e);
|
|
1402
|
+
}, () => {}), At(() => {
|
|
1403
|
+
let e = {};
|
|
1404
|
+
for (let n in t) n !== "children" && n !== "ref" && (e[n] = t[n]);
|
|
1405
|
+
return e;
|
|
1406
|
+
}, (t) => {
|
|
1407
|
+
for (let n in r) n in t || (c(e, n, void 0, r[n]), delete r[n]);
|
|
1408
|
+
for (let n in t) {
|
|
1409
|
+
let i = t[n];
|
|
1410
|
+
i !== r[n] && (c(e, n, i, r[n]), r[n] = i);
|
|
1411
|
+
}
|
|
1412
|
+
}), r;
|
|
1413
|
+
}
|
|
1414
|
+
function C(e, t) {
|
|
1415
|
+
Array.isArray(e) ? e.flat(Infinity).forEach((e) => e && e(t)) : e(t);
|
|
1416
|
+
}
|
|
1417
|
+
function w(e, t) {
|
|
1418
|
+
let n = tt(e);
|
|
1419
|
+
at(null, () => C(n, t));
|
|
1420
|
+
}
|
|
1421
|
+
return {
|
|
1422
|
+
render(e, t) {
|
|
1423
|
+
let n, r = !1, i = [], a = s || x;
|
|
1424
|
+
try {
|
|
1425
|
+
ke((r) => {
|
|
1426
|
+
n = r, f(t, e(), void 0, void 0, { onUpdate(e) {
|
|
1427
|
+
i = b(t, e);
|
|
1428
|
+
} });
|
|
1429
|
+
});
|
|
1430
|
+
} catch (e) {
|
|
1431
|
+
throw n && n(), a(t, i), e;
|
|
1432
|
+
}
|
|
1433
|
+
return () => {
|
|
1434
|
+
r || (r = !0, n(), a(t, i), i = []);
|
|
1435
|
+
};
|
|
1436
|
+
},
|
|
1437
|
+
insert: f,
|
|
1438
|
+
spread: S,
|
|
1439
|
+
createElement: e,
|
|
1440
|
+
createTextNode: t,
|
|
1441
|
+
insertNode: a,
|
|
1442
|
+
setProp(e, t, n, r) {
|
|
1443
|
+
return c(e, t, n, r), n;
|
|
1444
|
+
},
|
|
1445
|
+
mergeProps: bt,
|
|
1446
|
+
effect: At,
|
|
1447
|
+
memo: jt,
|
|
1448
|
+
createComponent: Dt,
|
|
1449
|
+
applyRef: C,
|
|
1450
|
+
ref: w
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
function Pt(e) {
|
|
1454
|
+
let t = Nt(e), n = t.insert;
|
|
1455
|
+
return {
|
|
1456
|
+
...t,
|
|
1457
|
+
render(e, t) {
|
|
1458
|
+
let r;
|
|
1459
|
+
return ke((i) => {
|
|
1460
|
+
r = i;
|
|
1461
|
+
let a = e();
|
|
1462
|
+
n(t, () => a, void 0, void 0, { schedule: !0 });
|
|
1463
|
+
}), H(), r;
|
|
1464
|
+
}
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
var Ft = "http://www.w3.org/2000/svg", It = "http://www.w3.org/1999/xlink", Lt = /* @__PURE__ */ new Set(/* @__PURE__ */ "svg.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.symbol.text.textPath.tspan.use.view".split(".")), Rt = /* @__PURE__ */ new Set([
|
|
1468
|
+
"checked",
|
|
1469
|
+
"disabled",
|
|
1470
|
+
"hidden",
|
|
1471
|
+
"multiple",
|
|
1472
|
+
"muted",
|
|
1473
|
+
"open",
|
|
1474
|
+
"readOnly",
|
|
1475
|
+
"required",
|
|
1476
|
+
"selected",
|
|
1477
|
+
"autofocus"
|
|
1478
|
+
]), zt = /* @__PURE__ */ new Set([
|
|
1479
|
+
...Rt,
|
|
1480
|
+
"className",
|
|
1481
|
+
"htmlFor",
|
|
1482
|
+
"id",
|
|
1483
|
+
"tabIndex",
|
|
1484
|
+
"textContent",
|
|
1485
|
+
"title",
|
|
1486
|
+
"value"
|
|
1487
|
+
]), Bt = /* @__PURE__ */ new Map([
|
|
1488
|
+
["className", "class"],
|
|
1489
|
+
["clipPath", "clip-path"],
|
|
1490
|
+
["clipRule", "clip-rule"],
|
|
1491
|
+
["fillRule", "fill-rule"],
|
|
1492
|
+
["fontFamily", "font-family"],
|
|
1493
|
+
["fontSize", "font-size"],
|
|
1494
|
+
["markerEnd", "marker-end"],
|
|
1495
|
+
["markerMid", "marker-mid"],
|
|
1496
|
+
["markerStart", "marker-start"],
|
|
1497
|
+
["stopColor", "stop-color"],
|
|
1498
|
+
["stopOpacity", "stop-opacity"],
|
|
1499
|
+
["strokeDasharray", "stroke-dasharray"],
|
|
1500
|
+
["strokeDashoffset", "stroke-dashoffset"],
|
|
1501
|
+
["strokeLinecap", "stroke-linecap"],
|
|
1502
|
+
["strokeLinejoin", "stroke-linejoin"],
|
|
1503
|
+
["strokeMiterlimit", "stroke-miterlimit"],
|
|
1504
|
+
["strokeOpacity", "stroke-opacity"],
|
|
1505
|
+
["strokeWidth", "stroke-width"],
|
|
1506
|
+
["textAnchor", "text-anchor"]
|
|
1507
|
+
]), Vt = (e) => typeof e == "string", Ht = (e) => typeof e == "function", Ut = (e) => typeof e == "object" && !!e && !Array.isArray(e), Wt = (e) => "style" in e;
|
|
1508
|
+
function Gt(e) {
|
|
1509
|
+
return e.startsWith("--") || e.includes("-") ? e : e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
1510
|
+
}
|
|
1511
|
+
function Kt(e, t, n) {
|
|
1512
|
+
if (!Wt(e)) return;
|
|
1513
|
+
let { style: r } = e;
|
|
1514
|
+
if (Vt(t)) {
|
|
1515
|
+
r.cssText = t;
|
|
1516
|
+
return;
|
|
1517
|
+
}
|
|
1518
|
+
if (!Ut(t)) {
|
|
1519
|
+
r.cssText = "";
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
let i = Ut(n) ? n : null;
|
|
1523
|
+
if (i) for (let e of Object.keys(i)) (!(e in t) || t[e] == null) && r.removeProperty(Gt(e));
|
|
1524
|
+
for (let [e, n] of Object.entries(t)) n == null ? r.removeProperty(Gt(e)) : r.setProperty(Gt(e), String(n));
|
|
1525
|
+
}
|
|
1526
|
+
function qt(e, t, n) {
|
|
1527
|
+
let r = Ut(t) ? t : null, i = Ut(n) ? n : null;
|
|
1528
|
+
if (i) for (let t of Object.keys(i)) r?.[t] || e.classList.remove(...t.trim().split(/\s+/));
|
|
1529
|
+
if (r) for (let [t, n] of Object.entries(r)) n && e.classList.add(...t.trim().split(/\s+/));
|
|
1530
|
+
}
|
|
1531
|
+
function Jt(e, t, n) {
|
|
1532
|
+
let r = t.toLowerCase();
|
|
1533
|
+
if (Array.isArray(n)) {
|
|
1534
|
+
let t = n[0], i = n[1];
|
|
1535
|
+
if (!Ht(t)) {
|
|
1536
|
+
Reflect.set(e, r, null);
|
|
1537
|
+
return;
|
|
1538
|
+
}
|
|
1539
|
+
let a = t;
|
|
1540
|
+
Reflect.set(e, r, (e) => a(i, e));
|
|
1541
|
+
return;
|
|
1542
|
+
}
|
|
1543
|
+
Reflect.set(e, r, Ht(n) ? n : null);
|
|
1544
|
+
}
|
|
1545
|
+
function Yt(e, t, n, r) {
|
|
1546
|
+
if (!(e instanceof Element)) return;
|
|
1547
|
+
let i = e.namespaceURI === Ft, a = t;
|
|
1548
|
+
if (a === "style") {
|
|
1549
|
+
Kt(e, n, r);
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1552
|
+
if (a === "classList") {
|
|
1553
|
+
qt(e, n, r);
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
if (a === "class" || a === "className") {
|
|
1557
|
+
n == null || n === !1 ? e.removeAttribute("class") : e.setAttribute("class", String(n));
|
|
1558
|
+
return;
|
|
1559
|
+
}
|
|
1560
|
+
if (/^on[A-Z]/.test(a) || /^on[a-z]/.test(a)) {
|
|
1561
|
+
Jt(e, a, n);
|
|
1562
|
+
return;
|
|
1563
|
+
}
|
|
1564
|
+
if (a.startsWith("on:")) {
|
|
1565
|
+
let t = a.slice(3);
|
|
1566
|
+
if (Ht(r)) {
|
|
1567
|
+
let n = r;
|
|
1568
|
+
e.removeEventListener(t, n);
|
|
1569
|
+
}
|
|
1570
|
+
if (Ht(n)) {
|
|
1571
|
+
let r = n;
|
|
1572
|
+
e.addEventListener(t, r);
|
|
1573
|
+
}
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1576
|
+
if (a.startsWith("attr:") && (a = a.slice(5)), a.startsWith("bool:")) {
|
|
1577
|
+
a = a.slice(5), n ? e.setAttribute(a, "") : e.removeAttribute(a);
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
if (!i && zt.has(a)) {
|
|
1581
|
+
Reflect.set(e, a === "htmlFor" ? "htmlFor" : a, Rt.has(a) ? !!n : n ?? "");
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
if (a === "htmlFor" && (a = "for"), i && a === "xlinkHref") {
|
|
1585
|
+
n == null || n === !1 ? e.removeAttributeNS(It, "href") : e.setAttributeNS(It, "xlink:href", String(n));
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1588
|
+
i && (a = Bt.get(a) ?? a), n == null || n === !1 ? e.removeAttribute(a) : e.setAttribute(a, n === !0 ? "" : String(n));
|
|
1589
|
+
}
|
|
1590
|
+
var { render: Xt, effect: Zt, memo: Qt, createComponent: $t, createElement: en, createTextNode: tn, insertNode: nn, insert: rn, spread: an, setProp: on, mergeProps: sn, applyRef: cn, ref: ln } = Pt({
|
|
1591
|
+
createElement(e, t) {
|
|
1592
|
+
let n = Lt.has(e) ? document.createElementNS(Ft, e) : document.createElement(e);
|
|
1593
|
+
if (t) for (let [e, r] of Object.entries(t)) Yt(n, e, r, void 0);
|
|
1594
|
+
return n;
|
|
1595
|
+
},
|
|
1596
|
+
createTextNode(e) {
|
|
1597
|
+
return document.createTextNode(String(e));
|
|
1598
|
+
},
|
|
1599
|
+
replaceText(e, t) {
|
|
1600
|
+
e.nodeValue = String(t);
|
|
1601
|
+
},
|
|
1602
|
+
setProperty(e, t, n, r) {
|
|
1603
|
+
Yt(e, t, n, r);
|
|
1604
|
+
},
|
|
1605
|
+
insertNode(e, t, n) {
|
|
1606
|
+
e.insertBefore(t, n ?? null);
|
|
1607
|
+
},
|
|
1608
|
+
isTextNode(e) {
|
|
1609
|
+
return e.nodeType === Node.TEXT_NODE;
|
|
1610
|
+
},
|
|
1611
|
+
removeNode(e, t) {
|
|
1612
|
+
e.removeChild(t);
|
|
1613
|
+
},
|
|
1614
|
+
getParentNode(e) {
|
|
1615
|
+
return e.parentNode ?? void 0;
|
|
1616
|
+
},
|
|
1617
|
+
getFirstChild(e) {
|
|
1618
|
+
return e.firstChild ?? void 0;
|
|
1619
|
+
},
|
|
1620
|
+
getNextSibling(e) {
|
|
1621
|
+
return e.nextSibling ?? void 0;
|
|
1622
|
+
}
|
|
1623
|
+
}), un = {
|
|
1624
|
+
opacity: 1,
|
|
1625
|
+
width: 1,
|
|
1626
|
+
pattern: "solid",
|
|
1627
|
+
dashLength: 6,
|
|
1628
|
+
gap: 4
|
|
1629
|
+
}, dn = {
|
|
1630
|
+
opacity: 1,
|
|
1631
|
+
edgeReveal: !1
|
|
1632
|
+
};
|
|
1633
|
+
({ ...un }), { ...dn };
|
|
1634
|
+
var fn = (e) => e, pn = 5;
|
|
1635
|
+
Array.from({ length: 801 }, (e, t) => t * pn), Ct(null);
|
|
1636
|
+
var mn = (e, t) => {
|
|
1637
|
+
let n = t.CSS;
|
|
1638
|
+
return n?.escape ? n.escape(e) : e.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
1639
|
+
}, hn = (e) => (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 200) || null, gn = (e) => e.nodeType === 9, _n = (e) => e.nodeType === 11;
|
|
1640
|
+
function vn(e) {
|
|
1641
|
+
let t = e.getBoundingClientRect();
|
|
1642
|
+
return {
|
|
1643
|
+
left: t.left,
|
|
1644
|
+
top: t.top,
|
|
1645
|
+
width: t.width,
|
|
1646
|
+
height: t.height
|
|
1647
|
+
};
|
|
1648
|
+
}
|
|
1649
|
+
function yn(e, t) {
|
|
1650
|
+
if (gn(t)) return !0;
|
|
1651
|
+
let n = e;
|
|
1652
|
+
for (; n;) {
|
|
1653
|
+
if (t === n || t.contains(n)) return !0;
|
|
1654
|
+
let e = n.getRootNode();
|
|
1655
|
+
if (!_n(e)) return !1;
|
|
1656
|
+
n = e.host;
|
|
1657
|
+
}
|
|
1658
|
+
return !1;
|
|
1659
|
+
}
|
|
1660
|
+
function bn(e) {
|
|
1661
|
+
let t = e.ownerDocument.defaultView ?? window;
|
|
1662
|
+
if (e.id) return `#${mn(e.id, t)}`;
|
|
1663
|
+
let n = e.getAttribute("data-testid");
|
|
1664
|
+
if (n) return `[data-testid=${JSON.stringify(n)}]`;
|
|
1665
|
+
let r = [], i = e;
|
|
1666
|
+
for (; i && r.length < 5;) {
|
|
1667
|
+
let e = i.localName, t = i.localName, n = i.parentElement;
|
|
1668
|
+
if (n) {
|
|
1669
|
+
let r = [...n.children].filter((e) => e.localName === t);
|
|
1670
|
+
r.length > 1 && (e += `:nth-of-type(${r.indexOf(i) + 1})`);
|
|
1671
|
+
}
|
|
1672
|
+
r.unshift(e), i = n;
|
|
1673
|
+
}
|
|
1674
|
+
return r.join(" > ");
|
|
1675
|
+
}
|
|
1676
|
+
function xn(e) {
|
|
1677
|
+
return {
|
|
1678
|
+
tag: e.localName,
|
|
1679
|
+
id: e.id || null,
|
|
1680
|
+
testId: e.getAttribute("data-testid"),
|
|
1681
|
+
role: e.getAttribute("role"),
|
|
1682
|
+
ariaLabel: e.getAttribute("aria-label"),
|
|
1683
|
+
classes: [...e.classList],
|
|
1684
|
+
text: hn(e)
|
|
1685
|
+
};
|
|
1686
|
+
}
|
|
1687
|
+
function Sn(e) {
|
|
1688
|
+
return !!(e.id || e.testId || e.role || e.ariaLabel || e.classes.length || e.text);
|
|
1689
|
+
}
|
|
1690
|
+
function Cn(e, t) {
|
|
1691
|
+
return e.localName !== t.tag || t.id && e.id !== t.id || t.testId && e.getAttribute("data-testid") !== t.testId || t.role && e.getAttribute("role") !== t.role || t.ariaLabel && e.getAttribute("aria-label") !== t.ariaLabel ? !1 : t.id || t.testId ? !0 : t.classes.some((t) => !e.classList.contains(t)) || t.text && hn(e) !== t.text ? !1 : Sn(t);
|
|
1692
|
+
}
|
|
1693
|
+
Ct((e) => void 0);
|
|
1694
|
+
var wn = "#f8fafc", Tn = "#e2e8f0", En = "#64748b", Dn = "#0f172a", On = (e, t, n) => {
|
|
1695
|
+
let r = e.createElement("div");
|
|
1696
|
+
return Object.assign(r.style, {
|
|
1697
|
+
position: "absolute",
|
|
1698
|
+
backgroundColor: n,
|
|
1699
|
+
...t === "top" || t === "bottom" ? {
|
|
1700
|
+
left: "0",
|
|
1701
|
+
[t]: "0",
|
|
1702
|
+
width: "100%",
|
|
1703
|
+
height: "1px"
|
|
1704
|
+
} : {
|
|
1705
|
+
top: "0",
|
|
1706
|
+
[t]: "0",
|
|
1707
|
+
width: "1px",
|
|
1708
|
+
height: "100%"
|
|
1709
|
+
}
|
|
1710
|
+
}), r;
|
|
1711
|
+
}, kn = (e, t, n) => {
|
|
1712
|
+
let r = e.createElement("div");
|
|
1713
|
+
Object.assign(r.style, {
|
|
1714
|
+
position: "fixed",
|
|
1715
|
+
zIndex: "0",
|
|
1716
|
+
pointerEvents: "none",
|
|
1717
|
+
backgroundColor: t,
|
|
1718
|
+
boxSizing: "border-box"
|
|
1719
|
+
}), r.className = "mesurer-ti-box", r.dataset.state = "hidden";
|
|
1720
|
+
for (let t of [
|
|
1721
|
+
"top",
|
|
1722
|
+
"right",
|
|
1723
|
+
"bottom",
|
|
1724
|
+
"left"
|
|
1725
|
+
]) r.appendChild(On(e, t, n));
|
|
1726
|
+
return r;
|
|
1727
|
+
}, An = (e, t) => {
|
|
1728
|
+
Object.assign(e.style, {
|
|
1729
|
+
left: `${t.left}px`,
|
|
1730
|
+
top: `${t.top}px`,
|
|
1731
|
+
width: `${t.width}px`,
|
|
1732
|
+
height: `${t.height}px`
|
|
1733
|
+
});
|
|
1734
|
+
}, jn = (e, t) => {
|
|
1735
|
+
let n = e.createElement("div");
|
|
1736
|
+
return Object.assign(n.style, {
|
|
1737
|
+
position: "fixed",
|
|
1738
|
+
zIndex: "1",
|
|
1739
|
+
pointerEvents: t ? "auto" : "none",
|
|
1740
|
+
background: "#ffffff",
|
|
1741
|
+
color: Dn,
|
|
1742
|
+
borderRadius: "13px",
|
|
1743
|
+
padding: "10px 12px",
|
|
1744
|
+
fontSize: "11px",
|
|
1745
|
+
lineHeight: "1.5",
|
|
1746
|
+
fontFamily: "ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
1747
|
+
fontVariantNumeric: "tabular-nums",
|
|
1748
|
+
userSelect: "none",
|
|
1749
|
+
whiteSpace: "nowrap",
|
|
1750
|
+
width: "320px",
|
|
1751
|
+
minWidth: "320px",
|
|
1752
|
+
maxWidth: "320px",
|
|
1753
|
+
boxSizing: "border-box",
|
|
1754
|
+
boxShadow: "0px 0px 0.5px rgba(0, 0, 0, 0.18), 0px 3px 8px rgba(0, 0, 0, 0.1), 0px 1px 3px rgba(0, 0, 0, 0.1)"
|
|
1755
|
+
}), n.className = t ? "mesurer-ti-card mesurer-ti-card--pinned" : "mesurer-ti-card", n.dataset.state = "hidden", n;
|
|
1756
|
+
}, Mn = (e, t, n, r) => {
|
|
1757
|
+
t.replaceChildren();
|
|
1758
|
+
let i = e.createElement("div");
|
|
1759
|
+
Object.assign(i.style, {
|
|
1760
|
+
display: "flex",
|
|
1761
|
+
alignItems: "center",
|
|
1762
|
+
gap: "8px",
|
|
1763
|
+
marginBottom: "8px",
|
|
1764
|
+
paddingBottom: "6px"
|
|
1765
|
+
});
|
|
1766
|
+
let a = e.createElement("span");
|
|
1767
|
+
if (Object.assign(a.style, {
|
|
1768
|
+
color: wn,
|
|
1769
|
+
background: Dn,
|
|
1770
|
+
borderRadius: "4px",
|
|
1771
|
+
padding: "1px 5px",
|
|
1772
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
1773
|
+
fontSize: "10px",
|
|
1774
|
+
fontWeight: "500"
|
|
1775
|
+
}), a.textContent = n.tagName, i.appendChild(a), n.textSnippet) {
|
|
1776
|
+
let t = e.createElement("span");
|
|
1777
|
+
Object.assign(t.style, {
|
|
1778
|
+
color: En,
|
|
1779
|
+
overflow: "hidden",
|
|
1780
|
+
textOverflow: "ellipsis",
|
|
1781
|
+
whiteSpace: "nowrap",
|
|
1782
|
+
flex: "1",
|
|
1783
|
+
minWidth: "0",
|
|
1784
|
+
fontSize: "10px"
|
|
1785
|
+
}), t.textContent = n.textSnippet, i.appendChild(t);
|
|
1786
|
+
}
|
|
1787
|
+
if (r) {
|
|
1788
|
+
let t = e.createElement("button");
|
|
1789
|
+
t.type = "button", t.className = "mesurer-ti-close", t.setAttribute("aria-label", "Close"), t.textContent = "×", Object.assign(t.style, {
|
|
1790
|
+
all: "unset",
|
|
1791
|
+
marginLeft: n.textSnippet ? "0" : "auto",
|
|
1792
|
+
flex: "0 0 auto",
|
|
1793
|
+
width: "16px",
|
|
1794
|
+
height: "16px",
|
|
1795
|
+
lineHeight: "14px",
|
|
1796
|
+
textAlign: "center",
|
|
1797
|
+
borderRadius: "4px",
|
|
1798
|
+
color: En,
|
|
1799
|
+
fontSize: "14px"
|
|
1800
|
+
}), i.appendChild(t);
|
|
1801
|
+
}
|
|
1802
|
+
t.appendChild(i);
|
|
1803
|
+
let o = e.createElement("div");
|
|
1804
|
+
Object.assign(o.style, {
|
|
1805
|
+
display: "grid",
|
|
1806
|
+
gridTemplateColumns: "auto 1fr",
|
|
1807
|
+
columnGap: "12px",
|
|
1808
|
+
rowGap: "3px",
|
|
1809
|
+
alignItems: "baseline"
|
|
1810
|
+
});
|
|
1811
|
+
for (let t of n.rows) {
|
|
1812
|
+
let n = e.createElement("span");
|
|
1813
|
+
n.style.color = En, n.style.fontSize = "11px", n.textContent = t.label;
|
|
1814
|
+
let r = e.createElement("span");
|
|
1815
|
+
if (Object.assign(r.style, {
|
|
1816
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
1817
|
+
fontSize: "11px",
|
|
1818
|
+
color: Dn,
|
|
1819
|
+
overflow: "hidden",
|
|
1820
|
+
textOverflow: "ellipsis",
|
|
1821
|
+
whiteSpace: "nowrap"
|
|
1822
|
+
}), !t.varName) r.textContent = t.value;
|
|
1823
|
+
else {
|
|
1824
|
+
let n = e.createElement("span");
|
|
1825
|
+
n.textContent = t.value;
|
|
1826
|
+
let i = e.createElement("span");
|
|
1827
|
+
i.style.color = Tn, i.style.margin = "0 6px", i.textContent = "·";
|
|
1828
|
+
let a = e.createElement("span");
|
|
1829
|
+
a.style.color = "#0369a1", a.textContent = t.varName, r.append(n, i, a);
|
|
1830
|
+
}
|
|
1831
|
+
o.append(n, r);
|
|
1832
|
+
}
|
|
1833
|
+
t.appendChild(o);
|
|
1834
|
+
}, Nn = (e, t, n, r = 0, i = 0) => {
|
|
1835
|
+
let a = n.left + n.width / 2 + r;
|
|
1836
|
+
t.style.left = `${a}px`;
|
|
1837
|
+
let o = t.getBoundingClientRect(), s = n.bottom + 4 + i;
|
|
1838
|
+
s + o.height > e.innerHeight - 8 && (s = n.top - o.height - 4 + i), t.style.top = `${Math.max(8, s)}px`;
|
|
1839
|
+
let c = o.width / 2;
|
|
1840
|
+
t.style.left = `${Math.min(Math.max(a, 8 + c), e.innerWidth - 8 - c)}px`;
|
|
1841
|
+
}, Pn = /* @__PURE__ */ new Map([
|
|
1842
|
+
["100", "thin"],
|
|
1843
|
+
["200", "extralight"],
|
|
1844
|
+
["300", "light"],
|
|
1845
|
+
["400", "normal"],
|
|
1846
|
+
["500", "medium"],
|
|
1847
|
+
["600", "semibold"],
|
|
1848
|
+
["700", "bold"],
|
|
1849
|
+
["800", "extrabold"],
|
|
1850
|
+
["900", "black"]
|
|
1851
|
+
]), Fn = [
|
|
1852
|
+
"font-family",
|
|
1853
|
+
"font-size",
|
|
1854
|
+
"font-weight",
|
|
1855
|
+
"line-height",
|
|
1856
|
+
"letter-spacing"
|
|
1857
|
+
], In = /* @__PURE__ */ new Map([
|
|
1858
|
+
["Family", "font-family"],
|
|
1859
|
+
["Size", "font-size"],
|
|
1860
|
+
["Weight", "font-weight"],
|
|
1861
|
+
["Line", "line-height"],
|
|
1862
|
+
["Tracking", "letter-spacing"]
|
|
1863
|
+
]), Ln = (e) => {
|
|
1864
|
+
if (!e || e === "normal") return e || "normal";
|
|
1865
|
+
let t = /^(-?[\d.]+)px$/.exec(e);
|
|
1866
|
+
return t ? `${Math.round(Number(t[1]) * 10) / 10}px` : e;
|
|
1867
|
+
}, Rn = (e) => (e.split(",")[0] ?? "").trim().replace(/^['"]|['"]$/g, ""), zn = (e) => {
|
|
1868
|
+
let t = Pn.get(e);
|
|
1869
|
+
return t ? `${e} / ${t}` : e;
|
|
1870
|
+
}, Bn = (e) => e ? /var\(\s*(--[a-zA-Z0-9_-]+)/.exec(e)?.[1] ?? null : null, Vn = (e) => (e.match(/#[\w-]+/g) ?? []).length * 1e4 + (e.match(/\.[\w-]+|\[[^\]]+\]|:[\w-]+/g) ?? []).length * 100 + (e.match(/(?:^|[ >+~])([a-zA-Z][\w-]*)/g) ?? []).length, Hn = (e, t) => !t || (e.important === t.important ? e.specificity === t.specificity ? e.order > t.order : e.specificity > t.specificity : e.important), Un = class {
|
|
1871
|
+
document;
|
|
1872
|
+
window;
|
|
1873
|
+
constructor(e, t) {
|
|
1874
|
+
this.document = e, this.window = t;
|
|
1875
|
+
}
|
|
1876
|
+
collectRules(e, t, n, r) {
|
|
1877
|
+
for (let i = 0; i < e.length; i++) {
|
|
1878
|
+
let a = e[i], o = r.value++;
|
|
1879
|
+
if (a.type === 4) {
|
|
1880
|
+
let e = a, i = n;
|
|
1881
|
+
try {
|
|
1882
|
+
i = n && this.window.matchMedia(e.media.mediaText).matches;
|
|
1883
|
+
} catch {
|
|
1884
|
+
i = !1;
|
|
1885
|
+
}
|
|
1886
|
+
this.collectRules(e.cssRules, t, i, r);
|
|
1887
|
+
} else if (a.type === 12) {
|
|
1888
|
+
let e = a;
|
|
1889
|
+
this.collectRules(e.cssRules, t, n, r);
|
|
1890
|
+
} else if (a.type === 1) {
|
|
1891
|
+
let e = a;
|
|
1892
|
+
t.push({
|
|
1893
|
+
rule: e,
|
|
1894
|
+
mediaOk: n,
|
|
1895
|
+
order: o
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
getRules() {
|
|
1901
|
+
let e = [], t = { value: 0 };
|
|
1902
|
+
for (let n of Array.from(this.document.styleSheets)) try {
|
|
1903
|
+
this.collectRules(n.cssRules, e, !0, t);
|
|
1904
|
+
} catch {
|
|
1905
|
+
continue;
|
|
1906
|
+
}
|
|
1907
|
+
return e;
|
|
1908
|
+
}
|
|
1909
|
+
findVarReferences(e) {
|
|
1910
|
+
let t = new Map(Fn.map((e) => [e, null])), n = this.getRules();
|
|
1911
|
+
for (let r of Fn) {
|
|
1912
|
+
let i = e;
|
|
1913
|
+
for (; i && t.get(r) === null;) {
|
|
1914
|
+
let e, a = Bn(i.style.getPropertyValue(r));
|
|
1915
|
+
a && (e = {
|
|
1916
|
+
name: a,
|
|
1917
|
+
specificity: 2 ** 53 - 1,
|
|
1918
|
+
order: 2 ** 53 - 1,
|
|
1919
|
+
important: i.style.getPropertyPriority(r) === "important"
|
|
1920
|
+
});
|
|
1921
|
+
for (let { rule: t, mediaOk: a, order: o } of n) {
|
|
1922
|
+
if (!a) continue;
|
|
1923
|
+
let n = !1;
|
|
1924
|
+
try {
|
|
1925
|
+
n = i.matches(t.selectorText);
|
|
1926
|
+
} catch {
|
|
1927
|
+
continue;
|
|
1928
|
+
}
|
|
1929
|
+
if (!n) continue;
|
|
1930
|
+
let s = Bn(t.style.getPropertyValue(r));
|
|
1931
|
+
if (!s) continue;
|
|
1932
|
+
let c = {
|
|
1933
|
+
name: s,
|
|
1934
|
+
specificity: Vn(t.selectorText),
|
|
1935
|
+
order: o,
|
|
1936
|
+
important: t.style.getPropertyPriority(r) === "important"
|
|
1937
|
+
};
|
|
1938
|
+
Hn(c, e) && (e = c);
|
|
1939
|
+
}
|
|
1940
|
+
e && t.set(r, e.name), i = i.parentElement;
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
return t;
|
|
1944
|
+
}
|
|
1945
|
+
getFast(e) {
|
|
1946
|
+
let t = this.window.getComputedStyle(e), n = [
|
|
1947
|
+
{
|
|
1948
|
+
label: "Family",
|
|
1949
|
+
value: Rn(t.fontFamily),
|
|
1950
|
+
varName: null
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
label: "Size",
|
|
1954
|
+
value: Ln(t.fontSize),
|
|
1955
|
+
varName: null
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
label: "Weight",
|
|
1959
|
+
value: zn(t.fontWeight),
|
|
1960
|
+
varName: null
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
label: "Line",
|
|
1964
|
+
value: t.lineHeight === "normal" ? "normal" : Ln(t.lineHeight),
|
|
1965
|
+
varName: null
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
label: "Tracking",
|
|
1969
|
+
value: t.letterSpacing === "normal" ? "normal" : Ln(t.letterSpacing),
|
|
1970
|
+
varName: null
|
|
1971
|
+
}
|
|
1972
|
+
], r = Array.from(e.childNodes).filter((e) => e.nodeType === Node.TEXT_NODE).map((e) => e.nodeValue?.trim() ?? "").filter(Boolean).join(" ").replace(/\s+/g, " ");
|
|
1973
|
+
return {
|
|
1974
|
+
rows: n,
|
|
1975
|
+
tagName: e.tagName.toLowerCase(),
|
|
1976
|
+
textSnippet: r.length > 40 ? `${r.slice(0, 40)}…` : r
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
getFull(e, t = this.getFast(e)) {
|
|
1980
|
+
let n = this.findVarReferences(e);
|
|
1981
|
+
return {
|
|
1982
|
+
...t,
|
|
1983
|
+
rows: t.rows.map((e) => {
|
|
1984
|
+
let t = In.get(e.label);
|
|
1985
|
+
return {
|
|
1986
|
+
...e,
|
|
1987
|
+
varName: t ? n.get(t) ?? null : null
|
|
1988
|
+
};
|
|
1989
|
+
})
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1992
|
+
}, Wn = [
|
|
1993
|
+
"HTML",
|
|
1994
|
+
"BODY",
|
|
1995
|
+
"SCRIPT",
|
|
1996
|
+
"STYLE",
|
|
1997
|
+
"META",
|
|
1998
|
+
"LINK",
|
|
1999
|
+
"NOSCRIPT",
|
|
2000
|
+
"IMG",
|
|
2001
|
+
"VIDEO",
|
|
2002
|
+
"AUDIO",
|
|
2003
|
+
"IFRAME"
|
|
2004
|
+
], Gn = "color-mix(in oklch, oklch(0.62 0.18 255) 8%, transparent)", Kn = "color-mix(in oklch, oklch(0.62 0.18 255) 80%, transparent)", qn = "color-mix(in oklch, oklch(0.62 0.18 255) 4%, transparent)", Jn = "color-mix(in oklch, oklch(0.62 0.18 255) 35%, transparent)", Yn = 0, Xn = (e, t) => `
|
|
2005
|
+
.${e},.${e} *{cursor:help!important}
|
|
2006
|
+
.${e} [data-mesurer-root],.${e} [data-mesurer-root] *{cursor:auto!important}
|
|
2007
|
+
#${t} .mesurer-ti-card{transform:translateX(-50%);opacity:1}
|
|
2008
|
+
#${t} .mesurer-ti-box{opacity:1}
|
|
2009
|
+
#${t} [data-state="hidden"]{opacity:0!important}
|
|
2010
|
+
#${t} .mesurer-ti-card--pinned{cursor:grab}
|
|
2011
|
+
#${t} .mesurer-ti-card--pinned:active{cursor:grabbing}
|
|
2012
|
+
#${t} .mesurer-ti-close{cursor:pointer}
|
|
2013
|
+
#${t} .mesurer-ti-close:hover{background:rgba(15,23,42,.06)!important;color:#0f172a!important}
|
|
2014
|
+
`;
|
|
2015
|
+
function Zn(e = {}, t = !1) {
|
|
2016
|
+
let n = e.portalTarget?.ownerDocument ?? globalThis.document, r = n?.defaultView ?? globalThis.window;
|
|
2017
|
+
if (!n || !r) {
|
|
2018
|
+
let e = () => {};
|
|
2019
|
+
return {
|
|
2020
|
+
enable: e,
|
|
2021
|
+
disable: e,
|
|
2022
|
+
undo: () => !1,
|
|
2023
|
+
redo: () => !1,
|
|
2024
|
+
isEnabled: () => !1,
|
|
2025
|
+
cleanup: e,
|
|
2026
|
+
destroy: e,
|
|
2027
|
+
clear: e,
|
|
2028
|
+
inspect: () => !1,
|
|
2029
|
+
canUndo: () => !1,
|
|
2030
|
+
canRedo: () => !1
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
let i = (e.id ?? (t ? "mesurer-text-inspector" : `mesurer-text-inspector-${++Yn}`)).replace(/[^a-zA-Z0-9_-]/g, "-"), a = `${i}-overlay`, o = `${i}-styles`, s = `${i}-mode`, c = new Set((e.ignoredTags ?? Wn).map((e) => e.toUpperCase())), l = Number.isFinite(e.maxPinned) ? Math.max(1, Math.floor(e.maxPinned)) : Infinity, u = new Un(n, r), d = r.HTMLElement, f = r.SVGElement, p = r.Node, m = !1, h = null, g = null, _ = null, v = null, y = {
|
|
2034
|
+
x: 0,
|
|
2035
|
+
y: 0
|
|
2036
|
+
}, b = 0, x = 0, S = [], C = [], w = [], T = e.portalTarget ?? n.body, E = () => {
|
|
2037
|
+
let e = [n];
|
|
2038
|
+
T instanceof r.ShadowRoot && e.push(T);
|
|
2039
|
+
for (let t of e) {
|
|
2040
|
+
if (t.querySelector(`#${o}`)) continue;
|
|
2041
|
+
let e = n.createElement("style");
|
|
2042
|
+
e.id = o, e.textContent = Xn(s, a), t === n ? n.head.append(e) : t.append(e);
|
|
2043
|
+
}
|
|
2044
|
+
}, D = () => h?.isConnected ? h : (h = n.createElement("div"), h.id = a, h.dataset.mesurerInspectorUi = "true", Object.assign(h.style, {
|
|
2045
|
+
position: "fixed",
|
|
2046
|
+
inset: "0",
|
|
2047
|
+
pointerEvents: "none",
|
|
2048
|
+
zIndex: "2147483646"
|
|
2049
|
+
}), T.appendChild(h), h), O = (e, t) => {
|
|
2050
|
+
e && (e.dataset.state = t ? "visible" : "hidden");
|
|
2051
|
+
}, k = () => {
|
|
2052
|
+
let e = D();
|
|
2053
|
+
g ??= kn(n, Gn, Kn), _ ??= jn(n, !1), g.parentNode || e.append(g), _.parentNode || e.append(_);
|
|
2054
|
+
}, ee = (e) => Array.from(e.childNodes).some((e) => e.nodeType === p.TEXT_NODE && !!e.nodeValue?.trim()), A = (e) => !!e && e instanceof d && !(e instanceof f) && !c.has(e.tagName) && ee(e) && !e.closest("[data-mesurer-root]"), j = (e, t) => n.elementsFromPoint(e, t).find((e) => A(e)) ?? null, te = () => {
|
|
2055
|
+
v = null, O(g, !1), O(_, !1);
|
|
2056
|
+
}, M = (t) => {
|
|
2057
|
+
if (!m || !A(t)) return !1;
|
|
2058
|
+
k();
|
|
2059
|
+
let i = t.getBoundingClientRect(), a = u.getFast(t);
|
|
2060
|
+
return v = t, Mn(n, _, a, !1), An(g, i), Nn(r, _, i), O(g, !0), O(_, !0), r.clearTimeout(x), x = r.setTimeout(() => {
|
|
2061
|
+
if (!m || v !== t || !_) return;
|
|
2062
|
+
let i = u.getFull(t, a);
|
|
2063
|
+
Mn(n, _, i, !1), Nn(r, _, t.getBoundingClientRect()), e.onInspect?.(t, i);
|
|
2064
|
+
}, 24), !0;
|
|
2065
|
+
}, N = () => S.map((e) => ({
|
|
2066
|
+
sourceEl: e.sourceEl,
|
|
2067
|
+
left: e.userPlaced ? e.card.getBoundingClientRect().left + e.card.getBoundingClientRect().width / 2 : 0,
|
|
2068
|
+
top: e.userPlaced ? e.card.getBoundingClientRect().top : 0,
|
|
2069
|
+
userPlaced: e.userPlaced
|
|
2070
|
+
})), P = () => {
|
|
2071
|
+
C.push(N()), C.length > 100 && C.shift(), w.length = 0;
|
|
2072
|
+
}, ne = (t, n = !0, r = !0) => {
|
|
2073
|
+
let i = S.indexOf(t);
|
|
2074
|
+
i < 0 || (n && P(), S.splice(i, 1), t.detach(), t.box.remove(), t.card.remove(), r && e.onUnpin?.(t.sourceEl));
|
|
2075
|
+
}, re = (e = !1) => {
|
|
2076
|
+
for (; S.length;) ne(S[S.length - 1], !1, e);
|
|
2077
|
+
}, F = (e) => {
|
|
2078
|
+
let t = -1, n = 0, i = 0, a = 0, o = 0, s = !1, c = !1, l = (l) => {
|
|
2079
|
+
if (l.pointerId !== t) return;
|
|
2080
|
+
let u = l.clientX - n, d = l.clientY - i;
|
|
2081
|
+
!s && Math.abs(u) <= 6 && Math.abs(d) <= 6 || (s = !0, c ||= (P(), !0), e.userPlaced = !0, e.card.style.left = `${Math.min(r.innerWidth - 8, Math.max(8, a + u))}px`, e.card.style.top = `${Math.min(r.innerHeight - 8, Math.max(8, o + d))}px`);
|
|
2082
|
+
}, u = (e) => {
|
|
2083
|
+
(t === -1 || e.pointerId === t) && (r.removeEventListener("pointermove", l), r.removeEventListener("pointerup", u), r.removeEventListener("pointercancel", u), t = -1, s = !1, c = !1);
|
|
2084
|
+
}, f = (s) => {
|
|
2085
|
+
if (s.button !== 0 || s.target instanceof d && s.target.classList.contains("mesurer-ti-close")) return;
|
|
2086
|
+
let c = e.card.getBoundingClientRect();
|
|
2087
|
+
t = s.pointerId, n = s.clientX, i = s.clientY, a = c.left + c.width / 2, o = c.top, r.addEventListener("pointermove", l), r.addEventListener("pointerup", u), r.addEventListener("pointercancel", u);
|
|
2088
|
+
};
|
|
2089
|
+
return e.card.addEventListener("pointerdown", f), () => {
|
|
2090
|
+
e.card.removeEventListener("pointerdown", f), r.removeEventListener("pointermove", l), r.removeEventListener("pointerup", u), r.removeEventListener("pointercancel", u);
|
|
2091
|
+
};
|
|
2092
|
+
}, I = (t, i, a = !0, o = !0) => {
|
|
2093
|
+
if (S.find((e) => e.sourceEl === t)) return;
|
|
2094
|
+
a && P(), S.length >= l && ne(S[0], !1, !0);
|
|
2095
|
+
let s = D(), c = kn(n, qn, Jn), d = jn(n, !0), f = u.getFull(t);
|
|
2096
|
+
Mn(n, d, f, !0), s.append(c, d);
|
|
2097
|
+
let p = t.getBoundingClientRect();
|
|
2098
|
+
An(c, p), Nn(r, d, p), i?.userPlaced && (d.style.left = `${i.left}px`, d.style.top = `${i.top}px`), O(c, !0), O(d, !0);
|
|
2099
|
+
let m = {
|
|
2100
|
+
sourceEl: t,
|
|
2101
|
+
box: c,
|
|
2102
|
+
card: d,
|
|
2103
|
+
left: i?.left ?? 0,
|
|
2104
|
+
top: i?.top ?? 0,
|
|
2105
|
+
userPlaced: i?.userPlaced ?? !1,
|
|
2106
|
+
detach: () => {}
|
|
2107
|
+
};
|
|
2108
|
+
S.push(m), m.detach = F(m), d.querySelector(".mesurer-ti-close")?.addEventListener("click", (e) => {
|
|
2109
|
+
e.preventDefault(), e.stopPropagation(), ne(m);
|
|
2110
|
+
}), o && e.onPin?.(t, f);
|
|
2111
|
+
}, L = (e) => {
|
|
2112
|
+
re(!1);
|
|
2113
|
+
for (let t of e) t.sourceEl.isConnected && I(t.sourceEl, t, !1, !1);
|
|
2114
|
+
}, ie = () => {
|
|
2115
|
+
let e = C.pop();
|
|
2116
|
+
return e ? (w.push(N()), L(e), !0) : !1;
|
|
2117
|
+
}, ae = () => {
|
|
2118
|
+
let e = w.pop();
|
|
2119
|
+
return e ? (C.push(N()), L(e), !0) : !1;
|
|
2120
|
+
}, oe = () => {
|
|
2121
|
+
S.length && (P(), re(!0));
|
|
2122
|
+
}, se = () => {
|
|
2123
|
+
if (!m) return;
|
|
2124
|
+
let e = j(y.x, y.y);
|
|
2125
|
+
if (!e) te();
|
|
2126
|
+
else if (e !== v) M(e);
|
|
2127
|
+
else if (g && _) {
|
|
2128
|
+
let t = e.getBoundingClientRect();
|
|
2129
|
+
An(g, t), Nn(r, _, t);
|
|
2130
|
+
}
|
|
2131
|
+
for (let e of S.slice()) {
|
|
2132
|
+
if (!e.sourceEl.isConnected) {
|
|
2133
|
+
ne(e, !1, !1);
|
|
2134
|
+
continue;
|
|
2135
|
+
}
|
|
2136
|
+
let t = e.sourceEl.getBoundingClientRect();
|
|
2137
|
+
An(e.box, t), e.userPlaced || Nn(r, e.card, t);
|
|
2138
|
+
let n = t.bottom >= 0 && t.right >= 0 && t.left <= r.innerWidth && t.top <= r.innerHeight;
|
|
2139
|
+
O(e.box, n), O(e.card, n), e.card.style.pointerEvents = n ? "auto" : "none";
|
|
2140
|
+
}
|
|
2141
|
+
}, R = () => {
|
|
2142
|
+
b ||= r.requestAnimationFrame(() => {
|
|
2143
|
+
b = 0, se();
|
|
2144
|
+
});
|
|
2145
|
+
}, z = (e) => {
|
|
2146
|
+
y = {
|
|
2147
|
+
x: e.clientX,
|
|
2148
|
+
y: e.clientY
|
|
2149
|
+
}, R();
|
|
2150
|
+
}, B = (e) => {
|
|
2151
|
+
e.relatedTarget || te();
|
|
2152
|
+
}, V = (e) => e.composedPath().some((e) => e instanceof d && (e.id === a || e.hasAttribute("data-mesurer-root") || e.classList.contains("mesurer-ti-card") || e.classList.contains("mesurer-ti-close"))), H = (e) => {
|
|
2153
|
+
if (!V(e) && (e.preventDefault(), e.stopImmediatePropagation(), e.button === 0)) {
|
|
2154
|
+
let t = j(e.clientX, e.clientY);
|
|
2155
|
+
t && I(t);
|
|
2156
|
+
}
|
|
2157
|
+
}, ce = (e) => {
|
|
2158
|
+
V(e) || (e.preventDefault(), e.stopImmediatePropagation());
|
|
2159
|
+
}, le = () => {
|
|
2160
|
+
m || (m = !0, E(), D(), n.body.classList.add(s), r.addEventListener("mousemove", z, !0), r.addEventListener("mouseout", B, !0), r.addEventListener("click", H, !0), r.addEventListener("auxclick", ce, !0), r.addEventListener("scroll", R, !0), r.addEventListener("resize", R, !0));
|
|
2161
|
+
}, ue = () => {
|
|
2162
|
+
m && (m = !1, r.cancelAnimationFrame(b), b = 0, r.clearTimeout(x), r.removeEventListener("mousemove", z, !0), r.removeEventListener("mouseout", B, !0), r.removeEventListener("click", H, !0), r.removeEventListener("auxclick", ce, !0), r.removeEventListener("scroll", R, !0), r.removeEventListener("resize", R, !0), te(), re(), g?.remove(), _?.remove(), g = null, _ = null, C.length = 0, w.length = 0, n.body.classList.remove(s));
|
|
2163
|
+
}, U = () => {
|
|
2164
|
+
ue(), h?.remove(), h = null, n.getElementById(o)?.remove(), T instanceof r.ShadowRoot && T.querySelector(`#${o}`)?.remove();
|
|
2165
|
+
};
|
|
2166
|
+
return {
|
|
2167
|
+
enable: le,
|
|
2168
|
+
disable: ue,
|
|
2169
|
+
undo: ie,
|
|
2170
|
+
redo: ae,
|
|
2171
|
+
clear: oe,
|
|
2172
|
+
inspect: M,
|
|
2173
|
+
isEnabled: () => m,
|
|
2174
|
+
canUndo: () => C.length > 0,
|
|
2175
|
+
canRedo: () => w.length > 0,
|
|
2176
|
+
cleanup: U,
|
|
2177
|
+
destroy: U
|
|
2178
|
+
};
|
|
2179
|
+
}
|
|
2180
|
+
Zn({}, !0);
|
|
2181
|
+
var Qn = "mesurer.arrange", $n = "arrange", er = "mesurer.arrange.intents", tr = "mesurer.arrange.active", nr = "mesurer.arrange.settings", rr = "runtime:solid", ir = "builtin.select", ar = "arrange.toggle", or = "arrange.commit", sr = "arrange.clear", cr = "mesurer.arrange.selection-available", lr = 1, ur = 24, dr = 160, fr = 500, pr = "#ef4444", mr = {
|
|
2182
|
+
viewBox: "0 0 24 24",
|
|
2183
|
+
paths: ["M12 2.75 8.75 6h2.5v5.25H6V8.75L2.75 12 6 15.25v-2.5h5.25V18h-2.5L12 21.25 15.25 18h-2.5v-5.25H18v2.5L21.25 12 18 8.75v2.5h-5.25V6h2.5L12 2.75Z"]
|
|
2184
|
+
}, hr = (e, t) => ({
|
|
2185
|
+
left: e.left + t.x,
|
|
2186
|
+
top: e.top + t.y,
|
|
2187
|
+
width: e.width,
|
|
2188
|
+
height: e.height
|
|
2189
|
+
}), gr = (e, t) => ({
|
|
2190
|
+
left: e.left - t.left,
|
|
2191
|
+
top: e.top - t.top,
|
|
2192
|
+
width: e.width - t.width,
|
|
2193
|
+
height: e.height - t.height
|
|
2194
|
+
}), _r = (e) => {
|
|
2195
|
+
if (!e.length) return null;
|
|
2196
|
+
let t = Math.min(...e.map((e) => e.left)), n = Math.min(...e.map((e) => e.top)), r = Math.max(...e.map((e) => e.left + e.width)), i = Math.max(...e.map((e) => e.top + e.height));
|
|
2197
|
+
return {
|
|
2198
|
+
left: t,
|
|
2199
|
+
top: n,
|
|
2200
|
+
width: r - t,
|
|
2201
|
+
height: i - n
|
|
2202
|
+
};
|
|
2203
|
+
}, vr = (e, t, n, r) => Math.max(0, Math.max(e, n) - Math.min(t, r)), yr = (e, t, n) => {
|
|
2204
|
+
let r = t === "x" ? e.left : e.top, i = t === "x" ? e.width : e.height, a = r + i;
|
|
2205
|
+
return n === "edge" ? [r, a] : n === "center" ? [r + i / 2] : [
|
|
2206
|
+
r,
|
|
2207
|
+
r + i / 2,
|
|
2208
|
+
a
|
|
2209
|
+
];
|
|
2210
|
+
}, br = (e, t) => t === "x" ? {
|
|
2211
|
+
start: e.top,
|
|
2212
|
+
end: e.top + e.height
|
|
2213
|
+
} : {
|
|
2214
|
+
start: e.left,
|
|
2215
|
+
end: e.left + e.width
|
|
2216
|
+
}, xr = (e) => e.kind === "edge" ? 2 : +(e.kind === "guide"), Sr = (e, t, n) => {
|
|
2217
|
+
let r = br(t, e), i = null;
|
|
2218
|
+
for (let a of n) if (a.axis === e && !(a.source === "element" && vr(r.start, r.end, a.start, a.end) > dr)) for (let n of yr(t, e, a.kind)) {
|
|
2219
|
+
let e = a.position - n, t = Math.abs(e);
|
|
2220
|
+
if (t > 10) continue;
|
|
2221
|
+
let r = i ? Math.abs(i.delta) : Infinity;
|
|
2222
|
+
(t < r || t === r && (!i || xr(a) > xr(i))) && (i = {
|
|
2223
|
+
...a,
|
|
2224
|
+
delta: e
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
return i;
|
|
2228
|
+
}, Cr = (e) => {
|
|
2229
|
+
let { origin: t, pathname: n, search: r } = e.location;
|
|
2230
|
+
return `${t}${n}${r}`;
|
|
2231
|
+
}, wr = (e, t) => `${t}-${e.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}`}`, Tr = (e) => ({
|
|
2232
|
+
tag: e.fingerprintTag,
|
|
2233
|
+
id: e.fingerprintId,
|
|
2234
|
+
testId: e.fingerprintTestId,
|
|
2235
|
+
role: e.fingerprintRole,
|
|
2236
|
+
ariaLabel: e.fingerprintAriaLabel,
|
|
2237
|
+
classes: [...e.fingerprintClasses],
|
|
2238
|
+
text: e.fingerprintText
|
|
2239
|
+
}), Er = (e) => ({
|
|
2240
|
+
id: e.id,
|
|
2241
|
+
selector: e.selector,
|
|
2242
|
+
fingerprint: Tr(e),
|
|
2243
|
+
before: {
|
|
2244
|
+
left: e.beforeLeft,
|
|
2245
|
+
top: e.beforeTop,
|
|
2246
|
+
width: e.beforeWidth,
|
|
2247
|
+
height: e.beforeHeight
|
|
2248
|
+
},
|
|
2249
|
+
desired: {
|
|
2250
|
+
left: e.desiredLeft,
|
|
2251
|
+
top: e.desiredTop,
|
|
2252
|
+
width: e.desiredWidth,
|
|
2253
|
+
height: e.desiredHeight
|
|
2254
|
+
},
|
|
2255
|
+
beforeOffset: {
|
|
2256
|
+
x: e.beforeOffsetX,
|
|
2257
|
+
y: e.beforeOffsetY
|
|
2258
|
+
},
|
|
2259
|
+
desiredOffset: {
|
|
2260
|
+
x: e.desiredOffsetX,
|
|
2261
|
+
y: e.desiredOffsetY
|
|
2262
|
+
}
|
|
2263
|
+
}), Dr = (e) => ({
|
|
2264
|
+
id: e.id,
|
|
2265
|
+
createdAt: e.createdAt,
|
|
2266
|
+
pageUrl: e.pageUrl,
|
|
2267
|
+
targets: e.targets.map(Er)
|
|
2268
|
+
}), Or = (e) => {
|
|
2269
|
+
let { element: t, transform: n } = e;
|
|
2270
|
+
n.value || n.priority ? t.style.setProperty("transform", n.value, n.priority) : t.style.removeProperty("transform");
|
|
2271
|
+
}, kr = (e) => e instanceof Element && !!e.closest("input, textarea, select, [contenteditable='true'], [contenteditable='']"), Ar = () => fn({
|
|
2272
|
+
id: Qn,
|
|
2273
|
+
version: "0.1.0",
|
|
2274
|
+
requires: [rr, "tool:select"],
|
|
2275
|
+
provides: [
|
|
2276
|
+
"tool:arrange",
|
|
2277
|
+
"intent:arrange",
|
|
2278
|
+
"agent:arrange",
|
|
2279
|
+
"settings:arrange"
|
|
2280
|
+
],
|
|
2281
|
+
setup(e) {
|
|
2282
|
+
let t = e.service.get(rr);
|
|
2283
|
+
if (!t) throw Error("Arrange plugin requires the Solid renderer runtime.");
|
|
2284
|
+
let { ownerDocument: n, ownerWindow: r } = t, i = t.createWorkspaceRuntime(), a = t.createInspectorMount(), o = t.pageTarget ?? n.body ?? n.documentElement, s = t.portalTarget, c = r;
|
|
2285
|
+
e.state.register({
|
|
2286
|
+
id: er,
|
|
2287
|
+
initial: { intents: [] },
|
|
2288
|
+
history: !0,
|
|
2289
|
+
persist: !0
|
|
2290
|
+
}), e.state.register({
|
|
2291
|
+
id: tr,
|
|
2292
|
+
initial: !1
|
|
2293
|
+
}), e.state.register({
|
|
2294
|
+
id: nr,
|
|
2295
|
+
initial: {
|
|
2296
|
+
snapping: !0,
|
|
2297
|
+
elementEdges: !0,
|
|
2298
|
+
elementCenters: !0,
|
|
2299
|
+
guides: !0,
|
|
2300
|
+
preferXrayEdges: !0,
|
|
2301
|
+
snapLines: !0
|
|
2302
|
+
},
|
|
2303
|
+
persist: !0
|
|
2304
|
+
});
|
|
2305
|
+
let l = a.element;
|
|
2306
|
+
l.dataset.mesurerArrange = "true", l.style.position = "fixed", l.style.inset = "0", l.style.zIndex = "84", l.style.pointerEvents = "none";
|
|
2307
|
+
let u = n.createElement("div");
|
|
2308
|
+
u.dataset.mesurerArrangeSnapLine = "vertical", u.setAttribute("aria-hidden", "true"), u.style.position = "fixed", u.style.display = "none", u.style.width = "1px", u.style.backgroundColor = pr, u.style.pointerEvents = "none";
|
|
2309
|
+
let d = n.createElement("div");
|
|
2310
|
+
d.dataset.mesurerArrangeSnapLine = "horizontal", d.setAttribute("aria-hidden", "true"), d.style.position = "fixed", d.style.display = "none", d.style.height = "1px", d.style.backgroundColor = pr, d.style.pointerEvents = "none";
|
|
2311
|
+
let f = n.createElement("div");
|
|
2312
|
+
f.dataset.mesurerArrangeBox = "true", f.setAttribute("role", "application"), f.setAttribute("aria-label", "Arrange selected elements"), f.style.position = "fixed", f.style.display = "none", f.style.boxSizing = "border-box", f.style.border = "1px solid #0d99ff", f.style.cursor = "grab", f.style.pointerEvents = "auto", f.style.touchAction = "none", f.style.userSelect = "none", l.append(u, d, f);
|
|
2313
|
+
let p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = {
|
|
2314
|
+
intentId: null,
|
|
2315
|
+
state: "desired"
|
|
2316
|
+
}, g = null, _ = null, v = !1, y = 0, b = null, x = () => e.state.get("mesurer.arrange.intents") ?? { intents: [] }, S = () => e.state.get("mesurer.arrange.active") ?? !1, C = () => {
|
|
2317
|
+
let t = e.state.get(nr);
|
|
2318
|
+
return {
|
|
2319
|
+
snapping: t?.snapping ?? !0,
|
|
2320
|
+
elementEdges: t?.elementEdges ?? !0,
|
|
2321
|
+
elementCenters: t?.elementCenters ?? !0,
|
|
2322
|
+
guides: t?.guides ?? !0,
|
|
2323
|
+
preferXrayEdges: t?.preferXrayEdges ?? !0,
|
|
2324
|
+
snapLines: t?.snapLines ?? !0
|
|
2325
|
+
};
|
|
2326
|
+
}, w = (t) => {
|
|
2327
|
+
e.state.update(nr, (e) => ({
|
|
2328
|
+
...e,
|
|
2329
|
+
...t
|
|
2330
|
+
}));
|
|
2331
|
+
}, T = () => Cr(r), E = () => x().intents.filter((e) => e.pageUrl === T()), D = (e) => !!e.closest("[data-mesurer-island='true'], [data-mesurer-inspector-ui='true'], [data-mesurer-root='true']"), O = (e) => yn(e, o) && !D(e), k = (e) => {
|
|
2332
|
+
let t = [];
|
|
2333
|
+
o instanceof c.HTMLElement && o.matches(e) && !D(o) && t.push(o);
|
|
2334
|
+
for (let n of o.querySelectorAll(e)) n instanceof c.HTMLElement && O(n) && t.push(n);
|
|
2335
|
+
return t;
|
|
2336
|
+
}, ee = (e) => {
|
|
2337
|
+
let t = Tr(e);
|
|
2338
|
+
if (!Sn(t)) return null;
|
|
2339
|
+
let n = [];
|
|
2340
|
+
try {
|
|
2341
|
+
n = k(e.selector).filter((e) => Cn(e, t));
|
|
2342
|
+
} catch {
|
|
2343
|
+
return null;
|
|
2344
|
+
}
|
|
2345
|
+
if (n.length !== 1) return null;
|
|
2346
|
+
if (!t.id && !t.testId) {
|
|
2347
|
+
let e = [];
|
|
2348
|
+
try {
|
|
2349
|
+
e = k(t.tag).filter((e) => Cn(e, t));
|
|
2350
|
+
} catch {
|
|
2351
|
+
return null;
|
|
2352
|
+
}
|
|
2353
|
+
if (e.length !== 1 || e[0] !== n[0]) return null;
|
|
2354
|
+
}
|
|
2355
|
+
return n[0] ?? null;
|
|
2356
|
+
}, A = () => {
|
|
2357
|
+
for (let e of p.values()) Or(e);
|
|
2358
|
+
p.clear();
|
|
2359
|
+
}, j = () => {
|
|
2360
|
+
u.style.display = "none", d.style.display = "none";
|
|
2361
|
+
}, te = (e, t, n) => {
|
|
2362
|
+
if (j(), C().snapLines) {
|
|
2363
|
+
if (e) {
|
|
2364
|
+
let t = Math.min(n.top, e.start), r = Math.max(n.top + n.height, e.end);
|
|
2365
|
+
u.style.display = "block", u.style.left = `${e.position}px`, u.style.top = `${t}px`, u.style.height = `${Math.max(1, r - t)}px`;
|
|
2366
|
+
}
|
|
2367
|
+
if (t) {
|
|
2368
|
+
let e = Math.min(n.left, t.start), r = Math.max(n.left + n.width, t.end);
|
|
2369
|
+
d.style.display = "block", d.style.left = `${e}px`, d.style.top = `${t.position}px`, d.style.width = `${Math.max(1, r - e)}px`;
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
}, M = () => {
|
|
2373
|
+
if (!(m.size > 0)) for (let e of s.querySelectorAll("[data-mesurer-measurement='true']")) e instanceof c.HTMLElement && (m.set(e, {
|
|
2374
|
+
value: e.style.getPropertyValue("visibility"),
|
|
2375
|
+
priority: e.style.getPropertyPriority("visibility")
|
|
2376
|
+
}), e.style.setProperty("visibility", "hidden", "important"));
|
|
2377
|
+
}, N = () => {
|
|
2378
|
+
for (let [e, t] of m) t.value || t.priority ? e.style.setProperty("visibility", t.value, t.priority) : e.style.removeProperty("visibility");
|
|
2379
|
+
m.clear();
|
|
2380
|
+
}, P = (e = E()) => {
|
|
2381
|
+
let t = /* @__PURE__ */ new Map();
|
|
2382
|
+
for (let n of e) for (let e of n.targets) {
|
|
2383
|
+
let n = ee(e);
|
|
2384
|
+
n && t.set(n, {
|
|
2385
|
+
x: e.desiredOffsetX,
|
|
2386
|
+
y: e.desiredOffsetY
|
|
2387
|
+
});
|
|
2388
|
+
}
|
|
2389
|
+
return t;
|
|
2390
|
+
}, ne = () => {
|
|
2391
|
+
if (h.state === "live") return /* @__PURE__ */ new Map();
|
|
2392
|
+
if (!h.intentId) return P();
|
|
2393
|
+
let e = x().intents.find((e) => e.id === h.intentId);
|
|
2394
|
+
if (!e) return P();
|
|
2395
|
+
let t = /* @__PURE__ */ new Map();
|
|
2396
|
+
for (let n of e.targets) {
|
|
2397
|
+
let e = ee(n);
|
|
2398
|
+
e && t.set(e, h.state === "before" ? {
|
|
2399
|
+
x: n.beforeOffsetX,
|
|
2400
|
+
y: n.beforeOffsetY
|
|
2401
|
+
} : {
|
|
2402
|
+
x: n.desiredOffsetX,
|
|
2403
|
+
y: n.desiredOffsetY
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
return t;
|
|
2407
|
+
}, re = (e) => {
|
|
2408
|
+
A();
|
|
2409
|
+
for (let [t, n] of e) {
|
|
2410
|
+
if (!t.isConnected || !O(t) || n.x === 0 && n.y === 0) continue;
|
|
2411
|
+
let e = {
|
|
2412
|
+
value: t.style.getPropertyValue("transform"),
|
|
2413
|
+
priority: t.style.getPropertyPriority("transform")
|
|
2414
|
+
}, i = r.getComputedStyle(t).transform, a = i && i !== "none" ? ` ${i}` : "";
|
|
2415
|
+
t.style.setProperty("transform", `translate3d(${n.x}px, ${n.y}px, 0)${a}`, "important"), p.set(t, {
|
|
2416
|
+
element: t,
|
|
2417
|
+
transform: e
|
|
2418
|
+
});
|
|
2419
|
+
}
|
|
2420
|
+
}, F = () => re(ne()), I = (e) => {
|
|
2421
|
+
A();
|
|
2422
|
+
try {
|
|
2423
|
+
return e();
|
|
2424
|
+
} finally {
|
|
2425
|
+
!v && !g && F();
|
|
2426
|
+
}
|
|
2427
|
+
}, L = () => i.currentSelection().elements.filter((e) => e.isConnected && O(e));
|
|
2428
|
+
e.state.register({
|
|
2429
|
+
id: cr,
|
|
2430
|
+
initial: L().length > 0
|
|
2431
|
+
});
|
|
2432
|
+
let ie = () => e.state.get(cr) ?? !1, ae = () => {
|
|
2433
|
+
let t = L().length > 0;
|
|
2434
|
+
t !== ie() && e.state.update(cr, () => t);
|
|
2435
|
+
}, oe = () => _r(L().map((e) => vn(e))), se = (e) => {
|
|
2436
|
+
let t = C();
|
|
2437
|
+
if (!t.snapping) return [];
|
|
2438
|
+
let n = [], a = new Set(e), s = i.snapshot(), l = s.xrayVisible && t.preferXrayEdges && t.elementEdges, u = 0, d = (i) => {
|
|
2439
|
+
if (u >= fr || a.has(i) || e.some((e) => e.contains(i)) || !O(i)) return;
|
|
2440
|
+
let o = r.getComputedStyle(i);
|
|
2441
|
+
if (o.display === "none" || o.visibility === "hidden" || o.visibility === "collapse") return;
|
|
2442
|
+
let s = o.outlineStyle === "solid" && (Number.parseFloat(o.outlineWidth) || 0) > 0;
|
|
2443
|
+
if (l && !s) return;
|
|
2444
|
+
let c = vn(i);
|
|
2445
|
+
if (c.width <= 0 || c.height <= 0) return;
|
|
2446
|
+
let d = dr;
|
|
2447
|
+
if (c.left + c.width < -160 || c.top + c.height < -160 || c.left > r.innerWidth + d || c.top > r.innerHeight + d) return;
|
|
2448
|
+
u += 1;
|
|
2449
|
+
let f = c.left + c.width, p = c.top + c.height;
|
|
2450
|
+
if (t.elementEdges) {
|
|
2451
|
+
for (let e of [c.left, f]) n.push({
|
|
2452
|
+
axis: "x",
|
|
2453
|
+
position: e,
|
|
2454
|
+
start: c.top,
|
|
2455
|
+
end: p,
|
|
2456
|
+
source: "element",
|
|
2457
|
+
kind: "edge"
|
|
2458
|
+
});
|
|
2459
|
+
for (let e of [c.top, p]) n.push({
|
|
2460
|
+
axis: "y",
|
|
2461
|
+
position: e,
|
|
2462
|
+
start: c.left,
|
|
2463
|
+
end: f,
|
|
2464
|
+
source: "element",
|
|
2465
|
+
kind: "edge"
|
|
2466
|
+
});
|
|
2467
|
+
}
|
|
2468
|
+
t.elementCenters && !l && (n.push({
|
|
2469
|
+
axis: "x",
|
|
2470
|
+
position: c.left + c.width / 2,
|
|
2471
|
+
start: c.top,
|
|
2472
|
+
end: p,
|
|
2473
|
+
source: "element",
|
|
2474
|
+
kind: "center"
|
|
2475
|
+
}), n.push({
|
|
2476
|
+
axis: "y",
|
|
2477
|
+
position: c.top + c.height / 2,
|
|
2478
|
+
start: c.left,
|
|
2479
|
+
end: f,
|
|
2480
|
+
source: "element",
|
|
2481
|
+
kind: "center"
|
|
2482
|
+
}));
|
|
2483
|
+
};
|
|
2484
|
+
if (t.elementEdges || t.elementCenters) {
|
|
2485
|
+
o instanceof c.HTMLElement && d(o);
|
|
2486
|
+
for (let e of o.querySelectorAll("*")) {
|
|
2487
|
+
if (u >= fr) break;
|
|
2488
|
+
e instanceof c.HTMLElement && d(e);
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
if (t.guides) for (let e of s.guides) e.orientation === "vertical" ? n.push({
|
|
2492
|
+
axis: "x",
|
|
2493
|
+
position: e.position,
|
|
2494
|
+
start: 0,
|
|
2495
|
+
end: r.innerHeight,
|
|
2496
|
+
source: "guide",
|
|
2497
|
+
kind: "guide"
|
|
2498
|
+
}) : n.push({
|
|
2499
|
+
axis: "y",
|
|
2500
|
+
position: e.position,
|
|
2501
|
+
start: 0,
|
|
2502
|
+
end: r.innerWidth,
|
|
2503
|
+
source: "guide",
|
|
2504
|
+
kind: "guide"
|
|
2505
|
+
});
|
|
2506
|
+
return n;
|
|
2507
|
+
}, R = (e) => {
|
|
2508
|
+
if (!S()) {
|
|
2509
|
+
f.style.display = "none";
|
|
2510
|
+
return;
|
|
2511
|
+
}
|
|
2512
|
+
let t = e === void 0 ? oe() : e;
|
|
2513
|
+
if (!t) {
|
|
2514
|
+
f.style.display = "none";
|
|
2515
|
+
return;
|
|
2516
|
+
}
|
|
2517
|
+
f.style.display = "block", f.style.left = `${t.left}px`, f.style.top = `${t.top}px`, f.style.width = `${t.width}px`, f.style.height = `${t.height}px`;
|
|
2518
|
+
}, z = () => {
|
|
2519
|
+
h = {
|
|
2520
|
+
intentId: null,
|
|
2521
|
+
state: "desired"
|
|
2522
|
+
}, F(), j(), S() ? M() : N();
|
|
2523
|
+
}, B = () => {
|
|
2524
|
+
h = {
|
|
2525
|
+
intentId: null,
|
|
2526
|
+
state: "live"
|
|
2527
|
+
}, A(), j(), N();
|
|
2528
|
+
}, V = () => {
|
|
2529
|
+
v || g || (F(), j(), S() ? M() : N(), R());
|
|
2530
|
+
}, H = () => {
|
|
2531
|
+
y || v || (y = r.requestAnimationFrame(() => {
|
|
2532
|
+
y = 0, V();
|
|
2533
|
+
}));
|
|
2534
|
+
}, ce = async () => {
|
|
2535
|
+
s.querySelector("[data-mesurer-builtin='select'] button")?.getAttribute("aria-pressed") !== "true" && await e.command.execute(ir, void 0, { source: "arrange" });
|
|
2536
|
+
}, le = (e) => {
|
|
2537
|
+
if (!S() || e.button !== 0) return;
|
|
2538
|
+
let t = L();
|
|
2539
|
+
if (!t.length) return;
|
|
2540
|
+
e.preventDefault(), e.stopPropagation(), h = {
|
|
2541
|
+
intentId: null,
|
|
2542
|
+
state: "desired"
|
|
2543
|
+
}, F();
|
|
2544
|
+
let n = P(E());
|
|
2545
|
+
A();
|
|
2546
|
+
let r = t.map((e, t) => {
|
|
2547
|
+
let r = vn(e), i = n.get(e) ?? {
|
|
2548
|
+
x: 0,
|
|
2549
|
+
y: 0
|
|
2550
|
+
}, a = hr(r, i), o = xn(e);
|
|
2551
|
+
return {
|
|
2552
|
+
element: e,
|
|
2553
|
+
target: {
|
|
2554
|
+
id: `target-${t + 1}`,
|
|
2555
|
+
selector: bn(e),
|
|
2556
|
+
fingerprintTag: o.tag,
|
|
2557
|
+
fingerprintId: o.id,
|
|
2558
|
+
fingerprintTestId: o.testId,
|
|
2559
|
+
fingerprintRole: o.role,
|
|
2560
|
+
fingerprintAriaLabel: o.ariaLabel,
|
|
2561
|
+
fingerprintClasses: [...o.classes],
|
|
2562
|
+
fingerprintText: o.text,
|
|
2563
|
+
beforeLeft: a.left,
|
|
2564
|
+
beforeTop: a.top,
|
|
2565
|
+
beforeWidth: a.width,
|
|
2566
|
+
beforeHeight: a.height,
|
|
2567
|
+
desiredLeft: a.left,
|
|
2568
|
+
desiredTop: a.top,
|
|
2569
|
+
desiredWidth: a.width,
|
|
2570
|
+
desiredHeight: a.height,
|
|
2571
|
+
beforeOffsetX: i.x,
|
|
2572
|
+
beforeOffsetY: i.y,
|
|
2573
|
+
desiredOffsetX: i.x,
|
|
2574
|
+
desiredOffsetY: i.y
|
|
2575
|
+
}
|
|
2576
|
+
};
|
|
2577
|
+
}), i = _r(r.map(({ target: e }) => ({
|
|
2578
|
+
left: e.beforeLeft,
|
|
2579
|
+
top: e.beforeTop,
|
|
2580
|
+
width: e.beforeWidth,
|
|
2581
|
+
height: e.beforeHeight
|
|
2582
|
+
})));
|
|
2583
|
+
if (!i) {
|
|
2584
|
+
F();
|
|
2585
|
+
return;
|
|
2586
|
+
}
|
|
2587
|
+
F(), M(), j(), g = {
|
|
2588
|
+
pointerId: e.pointerId,
|
|
2589
|
+
originX: e.clientX,
|
|
2590
|
+
originY: e.clientY,
|
|
2591
|
+
targets: r,
|
|
2592
|
+
groupBefore: i,
|
|
2593
|
+
snapCandidates: se(t),
|
|
2594
|
+
dx: 0,
|
|
2595
|
+
dy: 0
|
|
2596
|
+
}, R(i), f.style.cursor = "grabbing", f.setPointerCapture?.(e.pointerId);
|
|
2597
|
+
}, ue = (e) => {
|
|
2598
|
+
if (!g || e.pointerId !== g.pointerId) return;
|
|
2599
|
+
let t = e.clientX - g.originX, n = e.clientY - g.originY, r = null;
|
|
2600
|
+
e.shiftKey && (Math.abs(t) >= Math.abs(n) ? (n = 0, r = "x") : (t = 0, r = "y"));
|
|
2601
|
+
let i = hr(g.groupBefore, {
|
|
2602
|
+
x: t,
|
|
2603
|
+
y: n
|
|
2604
|
+
}), a = r === "y" ? null : Sr("x", i, g.snapCandidates), o = r === "x" ? null : Sr("y", i, g.snapCandidates);
|
|
2605
|
+
t += a?.delta ?? 0, n += o?.delta ?? 0, g.dx = t, g.dy = n;
|
|
2606
|
+
let s = P(E());
|
|
2607
|
+
for (let e of g.targets) s.set(e.element, {
|
|
2608
|
+
x: e.target.beforeOffsetX + t,
|
|
2609
|
+
y: e.target.beforeOffsetY + n
|
|
2610
|
+
});
|
|
2611
|
+
re(s);
|
|
2612
|
+
let c = hr(g.groupBefore, {
|
|
2613
|
+
x: t,
|
|
2614
|
+
y: n
|
|
2615
|
+
});
|
|
2616
|
+
R(c), te(a, o, c);
|
|
2617
|
+
}, U = () => {
|
|
2618
|
+
if (!g) return;
|
|
2619
|
+
let e = g.pointerId;
|
|
2620
|
+
g = null, f.hasPointerCapture?.(e) && f.releasePointerCapture(e), f.style.cursor = "grab", z(), R();
|
|
2621
|
+
}, de = (t) => {
|
|
2622
|
+
if (!g || t.pointerId !== g.pointerId) return;
|
|
2623
|
+
t.preventDefault(), t.stopPropagation();
|
|
2624
|
+
let n = g;
|
|
2625
|
+
if (g = null, f.hasPointerCapture?.(t.pointerId) && f.releasePointerCapture(t.pointerId), f.style.cursor = "grab", j(), n.dx === 0 && n.dy === 0) {
|
|
2626
|
+
z(), R();
|
|
2627
|
+
return;
|
|
2628
|
+
}
|
|
2629
|
+
_ = {
|
|
2630
|
+
id: wr(r, "arrange"),
|
|
2631
|
+
createdAt: Date.now(),
|
|
2632
|
+
pageUrl: T(),
|
|
2633
|
+
targets: n.targets.map(({ target: e }) => ({
|
|
2634
|
+
...e,
|
|
2635
|
+
desiredLeft: e.beforeLeft + n.dx,
|
|
2636
|
+
desiredTop: e.beforeTop + n.dy,
|
|
2637
|
+
desiredOffsetX: e.beforeOffsetX + n.dx,
|
|
2638
|
+
desiredOffsetY: e.beforeOffsetY + n.dy
|
|
2639
|
+
}))
|
|
2640
|
+
}, e.command.execute(or).catch(() => {
|
|
2641
|
+
_ = null, z(), R();
|
|
2642
|
+
});
|
|
2643
|
+
}, W = (e) => {
|
|
2644
|
+
!g || e.pointerId !== g.pointerId || U();
|
|
2645
|
+
}, G = (t) => {
|
|
2646
|
+
t.key !== "Escape" || !S() && !g || kr(t.target) || s.querySelector("[data-mesurer-tool-menu]") || (t.preventDefault(), t.stopImmediatePropagation(), g ? U() : (e.state.update("mesurer.arrange.active", () => !1), B(), R()));
|
|
2647
|
+
};
|
|
2648
|
+
f.addEventListener("pointerdown", le), f.addEventListener("pointermove", ue), f.addEventListener("pointerup", de), f.addEventListener("pointercancel", W), r.addEventListener("keydown", G, !0), r.addEventListener("resize", H), r.addEventListener("scroll", H, !0), o.addEventListener("scroll", H, !0), b = new c.MutationObserver(() => {
|
|
2649
|
+
ae(), H();
|
|
2650
|
+
}), b.observe(o, {
|
|
2651
|
+
childList: !0,
|
|
2652
|
+
subtree: !0,
|
|
2653
|
+
attributes: !0,
|
|
2654
|
+
attributeFilter: [
|
|
2655
|
+
"id",
|
|
2656
|
+
"class",
|
|
2657
|
+
"data-testid",
|
|
2658
|
+
"role",
|
|
2659
|
+
"aria-label"
|
|
2660
|
+
]
|
|
2661
|
+
});
|
|
2662
|
+
let fe = i.subscribe(() => {
|
|
2663
|
+
ae(), H();
|
|
2664
|
+
}), pe = e.state.subscribe(H), K = (e) => x().intents.find((t) => t.id === e) ?? null, q = (e, t) => {
|
|
2665
|
+
let n = null;
|
|
2666
|
+
if (n = t === "before" ? _r(e.targets.map((e) => ({
|
|
2667
|
+
left: e.beforeLeft,
|
|
2668
|
+
top: e.beforeTop,
|
|
2669
|
+
width: e.beforeWidth,
|
|
2670
|
+
height: e.beforeHeight
|
|
2671
|
+
}))) : t === "desired" ? _r(e.targets.map((e) => ({
|
|
2672
|
+
left: e.desiredLeft,
|
|
2673
|
+
top: e.desiredTop,
|
|
2674
|
+
width: e.desiredWidth,
|
|
2675
|
+
height: e.desiredHeight
|
|
2676
|
+
}))) : I(() => _r(e.targets.map((e) => ee(e)).filter((e) => e !== null).map((e) => vn(e)))), !n) throw Error(`Arrange intent has no resolvable capture region: ${e.id}`);
|
|
2677
|
+
let i = Math.max(0, n.left - ur), a = Math.max(0, n.top - ur), o = Math.min(r.innerWidth, n.left + n.width + ur), s = Math.min(r.innerHeight, n.top + n.height + ur);
|
|
2678
|
+
return {
|
|
2679
|
+
left: i,
|
|
2680
|
+
top: a,
|
|
2681
|
+
width: Math.max(0, o - i),
|
|
2682
|
+
height: Math.max(0, s - a)
|
|
2683
|
+
};
|
|
2684
|
+
}, me = {
|
|
2685
|
+
active: S,
|
|
2686
|
+
intents: () => x().intents.map(Dr),
|
|
2687
|
+
intent(e) {
|
|
2688
|
+
let t = K(e);
|
|
2689
|
+
return t ? Dr(t) : null;
|
|
2690
|
+
},
|
|
2691
|
+
show(e, t) {
|
|
2692
|
+
if (!K(e)) throw Error(`Arrange intent not found: ${e}`);
|
|
2693
|
+
h = {
|
|
2694
|
+
intentId: e,
|
|
2695
|
+
state: t
|
|
2696
|
+
}, V();
|
|
2697
|
+
},
|
|
2698
|
+
showCurrent() {
|
|
2699
|
+
h = {
|
|
2700
|
+
intentId: null,
|
|
2701
|
+
state: "desired"
|
|
2702
|
+
}, V();
|
|
2703
|
+
},
|
|
2704
|
+
capturePlan(e, t) {
|
|
2705
|
+
let n = K(e);
|
|
2706
|
+
if (!n) throw Error(`Arrange intent not found: ${e}`);
|
|
2707
|
+
return {
|
|
2708
|
+
schema: "mesurer.arrange-capture/v1",
|
|
2709
|
+
arrangeId: e,
|
|
2710
|
+
state: t,
|
|
2711
|
+
chrome: "hide",
|
|
2712
|
+
captures: [{
|
|
2713
|
+
id: "viewport",
|
|
2714
|
+
kind: "viewport"
|
|
2715
|
+
}, {
|
|
2716
|
+
id: "focus",
|
|
2717
|
+
kind: "clip",
|
|
2718
|
+
rect: q(n, t)
|
|
2719
|
+
}]
|
|
2720
|
+
};
|
|
2721
|
+
},
|
|
2722
|
+
review: (e, t = lr) => {
|
|
2723
|
+
let n = K(e);
|
|
2724
|
+
if (!n) throw Error(`Arrange intent not found: ${e}`);
|
|
2725
|
+
let r = I(() => n.targets.map((e) => {
|
|
2726
|
+
let n = ee(e), r = {
|
|
2727
|
+
left: e.desiredLeft,
|
|
2728
|
+
top: e.desiredTop,
|
|
2729
|
+
width: e.desiredWidth,
|
|
2730
|
+
height: e.desiredHeight
|
|
2731
|
+
};
|
|
2732
|
+
if (!n) return {
|
|
2733
|
+
targetId: e.id,
|
|
2734
|
+
selector: e.selector,
|
|
2735
|
+
desired: r,
|
|
2736
|
+
current: null,
|
|
2737
|
+
delta: null,
|
|
2738
|
+
matched: !1
|
|
2739
|
+
};
|
|
2740
|
+
let i = vn(n), a = gr(i, r), o = Math.abs(a.left) <= t && Math.abs(a.top) <= t && Math.abs(a.width) <= t && Math.abs(a.height) <= t;
|
|
2741
|
+
return {
|
|
2742
|
+
targetId: e.id,
|
|
2743
|
+
selector: e.selector,
|
|
2744
|
+
desired: r,
|
|
2745
|
+
current: i,
|
|
2746
|
+
delta: a,
|
|
2747
|
+
matched: o
|
|
2748
|
+
};
|
|
2749
|
+
})), i = r.filter((e) => e.current !== null).length, a = i === 0 ? "stale" : i === r.length ? "connected" : "partial";
|
|
2750
|
+
return {
|
|
2751
|
+
schema: "mesurer.arrange-review/v1",
|
|
2752
|
+
arrangeId: n.id,
|
|
2753
|
+
targetStatus: a,
|
|
2754
|
+
tolerance: t,
|
|
2755
|
+
matched: r.length > 0 && r.every((e) => e.matched),
|
|
2756
|
+
targets: r
|
|
2757
|
+
};
|
|
2758
|
+
},
|
|
2759
|
+
clear: () => e.command.execute(sr)
|
|
2760
|
+
};
|
|
2761
|
+
e.tool.register({
|
|
2762
|
+
id: "arrange",
|
|
2763
|
+
label: "Arrange",
|
|
2764
|
+
order: 65,
|
|
2765
|
+
command: ar,
|
|
2766
|
+
icon: mr,
|
|
2767
|
+
active: S,
|
|
2768
|
+
menu: {
|
|
2769
|
+
label: "Arrange options",
|
|
2770
|
+
items: [
|
|
2771
|
+
{
|
|
2772
|
+
id: "snapping",
|
|
2773
|
+
label: "Snapping",
|
|
2774
|
+
checked: () => C().snapping,
|
|
2775
|
+
run: () => w({ snapping: !C().snapping })
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
id: "element-edges",
|
|
2779
|
+
label: "Element edges",
|
|
2780
|
+
checked: () => C().elementEdges,
|
|
2781
|
+
disabled: () => !C().snapping,
|
|
2782
|
+
run: () => w({ elementEdges: !C().elementEdges })
|
|
2783
|
+
},
|
|
2784
|
+
{
|
|
2785
|
+
id: "element-centers",
|
|
2786
|
+
label: "Element centers",
|
|
2787
|
+
checked: () => C().elementCenters,
|
|
2788
|
+
disabled: () => !C().snapping,
|
|
2789
|
+
run: () => w({ elementCenters: !C().elementCenters })
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
id: "guides",
|
|
2793
|
+
label: "Guides",
|
|
2794
|
+
checked: () => C().guides,
|
|
2795
|
+
disabled: () => !C().snapping,
|
|
2796
|
+
run: () => w({ guides: !C().guides })
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
id: "prefer-xray-edges",
|
|
2800
|
+
label: "Prefer X-ray edges",
|
|
2801
|
+
checked: () => C().preferXrayEdges,
|
|
2802
|
+
disabled: () => !C().snapping || !C().elementEdges,
|
|
2803
|
+
run: () => w({ preferXrayEdges: !C().preferXrayEdges })
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
id: "alignment-rulers",
|
|
2807
|
+
label: "Alignment rulers",
|
|
2808
|
+
checked: () => C().snapLines,
|
|
2809
|
+
disabled: () => !C().snapping,
|
|
2810
|
+
run: () => w({ snapLines: !C().snapLines })
|
|
2811
|
+
}
|
|
2812
|
+
]
|
|
2813
|
+
}
|
|
2814
|
+
}), e.settings.register({
|
|
2815
|
+
id: "arrange",
|
|
2816
|
+
label: "Arrange",
|
|
2817
|
+
order: 35,
|
|
2818
|
+
controls: [
|
|
2819
|
+
{
|
|
2820
|
+
type: "toggle",
|
|
2821
|
+
id: "snapping",
|
|
2822
|
+
label: "Snapping",
|
|
2823
|
+
description: "Magnetically align dragged selections to nearby layout anchors.",
|
|
2824
|
+
value: () => C().snapping,
|
|
2825
|
+
set: (e) => w({ snapping: e })
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
type: "toggle",
|
|
2829
|
+
id: "element-edges",
|
|
2830
|
+
label: "Element edges",
|
|
2831
|
+
description: "Snap left/right and top/bottom edges to nearby elements.",
|
|
2832
|
+
value: () => C().elementEdges,
|
|
2833
|
+
set: (e) => w({ elementEdges: e }),
|
|
2834
|
+
disabled: () => !C().snapping
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
type: "toggle",
|
|
2838
|
+
id: "element-centers",
|
|
2839
|
+
label: "Element centers",
|
|
2840
|
+
description: "Snap center-to-center when X-ray edge preference is not active.",
|
|
2841
|
+
value: () => C().elementCenters,
|
|
2842
|
+
set: (e) => w({ elementCenters: e }),
|
|
2843
|
+
disabled: () => !C().snapping
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
type: "toggle",
|
|
2847
|
+
id: "guides",
|
|
2848
|
+
label: "Guides",
|
|
2849
|
+
description: "Snap to existing Mesurer guides.",
|
|
2850
|
+
value: () => C().guides,
|
|
2851
|
+
set: (e) => w({ guides: e }),
|
|
2852
|
+
disabled: () => !C().snapping
|
|
2853
|
+
},
|
|
2854
|
+
{
|
|
2855
|
+
type: "toggle",
|
|
2856
|
+
id: "prefer-xray-edges",
|
|
2857
|
+
label: "Prefer X-ray edges",
|
|
2858
|
+
description: "When X-ray is on, use its visible blue box edges as element snap targets.",
|
|
2859
|
+
value: () => C().preferXrayEdges,
|
|
2860
|
+
set: (e) => w({ preferXrayEdges: e }),
|
|
2861
|
+
disabled: () => !C().snapping || !C().elementEdges
|
|
2862
|
+
},
|
|
2863
|
+
{
|
|
2864
|
+
type: "toggle",
|
|
2865
|
+
id: "alignment-rulers",
|
|
2866
|
+
label: "Alignment rulers",
|
|
2867
|
+
description: "Show the red alignment ruler while a snap is active.",
|
|
2868
|
+
value: () => C().snapLines,
|
|
2869
|
+
set: (e) => w({ snapLines: e }),
|
|
2870
|
+
disabled: () => !C().snapping
|
|
2871
|
+
}
|
|
2872
|
+
]
|
|
2873
|
+
}), e.command.register(ar, async () => {
|
|
2874
|
+
let t = !S();
|
|
2875
|
+
if (t && await ce(), e.state.update("mesurer.arrange.active", () => t), !t) {
|
|
2876
|
+
g && U(), B(), R();
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
z(), R();
|
|
2880
|
+
}), e.command.register(or, () => {
|
|
2881
|
+
let t = _;
|
|
2882
|
+
_ = null, t && (e.state.update("mesurer.arrange.intents", (e) => ({ intents: [...e.intents, t].slice(-100) })), z(), R());
|
|
2883
|
+
}), e.command.register(sr, () => {
|
|
2884
|
+
e.state.update(er, () => ({ intents: [] })), h = {
|
|
2885
|
+
intentId: null,
|
|
2886
|
+
state: "desired"
|
|
2887
|
+
}, A(), j(), S() ? M() : N(), R();
|
|
2888
|
+
}), e.service.provide($n, me), F(), R(), e.lifecycle.onDispose(() => {
|
|
2889
|
+
v = !0, y && r.cancelAnimationFrame(y), b?.disconnect(), b = null, f.removeEventListener("pointerdown", le), f.removeEventListener("pointermove", ue), f.removeEventListener("pointerup", de), f.removeEventListener("pointercancel", W), r.removeEventListener("keydown", G, !0), r.removeEventListener("resize", H), r.removeEventListener("scroll", H, !0), o.removeEventListener("scroll", H, !0), fe(), pe.dispose(), A(), j(), N(), i.dispose(), a.dispose();
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
});
|
|
2893
|
+
[
|
|
2894
|
+
"[data-mesurer-measurement='true']",
|
|
2895
|
+
"[data-mesurer-selected-measurement='true']",
|
|
2896
|
+
"[data-mesurer-selection-spacing-target='true']",
|
|
2897
|
+
"[data-mesurer-guide='true']",
|
|
2898
|
+
"[data-mesurer-distance='true']"
|
|
2899
|
+
].join(",");
|
|
2900
|
+
//#endregion
|
|
2901
|
+
//#region src/version.ts
|
|
2902
|
+
var jr = "0.1.3-beta.0", Mr = tr, Nr = Qn, Pr = $n, Fr = nr, Ir = er, Lr = () => ({
|
|
2903
|
+
...Ar(),
|
|
2904
|
+
version: jr
|
|
2905
|
+
});
|
|
2906
|
+
//#endregion
|
|
2907
|
+
export { Mr as MESURER_ARRANGE_ACTIVE_STATE_ID, Nr as MESURER_ARRANGE_PLUGIN_ID, Pr as MESURER_ARRANGE_SERVICE_ID, Fr as MESURER_ARRANGE_SETTINGS_STATE_ID, Ir as MESURER_ARRANGE_STATE_ID, Lr as arrangePlugin };
|