@famibee/skynovel 1.64.20 → 1.64.21
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/dist/EventMng.js +217 -215
- package/dist/EventMng.js.map +1 -1
- package/dist_app/EventMng.js +217 -215
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/sn/FocusMng.d.ts +2 -2
- package/dist_app/sn/FocusMng.d.ts.map +1 -1
- package/package.json +2 -2
package/dist_app/EventMng.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { E as se, o as
|
|
1
|
+
import { E as se, o as ut, H as G, a as it, w as Ee, d as Te, I as Oe, J as ke, e as J, K as _e, S as Lt, M as Me } from "./app2.js";
|
|
2
2
|
import { T as Se } from "./TxtLayer.js";
|
|
3
3
|
import { Button as Jt } from "./Button.js";
|
|
4
4
|
import { R as L, a as k } from "./Reading.js";
|
|
5
5
|
class De {
|
|
6
|
-
constructor(t) {
|
|
7
|
-
this.cvs = t;
|
|
8
|
-
}
|
|
9
6
|
#e = [];
|
|
10
7
|
#t = -1;
|
|
11
|
-
#
|
|
8
|
+
#o = new se();
|
|
9
|
+
constructor(t, e) {
|
|
10
|
+
this.#l = e.isApp ? () => t.focus() : () => globalThis.focus();
|
|
11
|
+
}
|
|
12
12
|
destroy() {
|
|
13
|
-
this.#e = [], this.#t = -1, this.#
|
|
13
|
+
this.#e = [], this.#t = -1, this.#o.clear();
|
|
14
14
|
}
|
|
15
15
|
add(t, e, n) {
|
|
16
16
|
if (this.#e.findIndex((o) => o.btn === t) >= 0) return;
|
|
17
|
-
if (t instanceof
|
|
17
|
+
if (t instanceof ut) {
|
|
18
18
|
t.on("pointerdown", () => {
|
|
19
19
|
for (let o = this.#e.length - 1; o >= 0; --o)
|
|
20
20
|
if (this.#e[o].btn === t) {
|
|
@@ -25,7 +25,7 @@ class De {
|
|
|
25
25
|
}), this.#e.push({ btn: t, on: e, off: n });
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
this.#
|
|
28
|
+
this.#o.add(t, "focus", () => {
|
|
29
29
|
for (let o = this.#e.length - 1; o >= 0; --o)
|
|
30
30
|
if (this.#e[o].btn === t) {
|
|
31
31
|
this.#t = o;
|
|
@@ -44,7 +44,7 @@ class De {
|
|
|
44
44
|
};
|
|
45
45
|
break;
|
|
46
46
|
case "":
|
|
47
|
-
t.querySelectorAll("input[type]").length > 0 && (r = (o) => this.#
|
|
47
|
+
t.querySelectorAll("input[type]").length > 0 && (r = (o) => this.#s(t, o.key), s = () => !1);
|
|
48
48
|
break;
|
|
49
49
|
case "range":
|
|
50
50
|
r = (o) => {
|
|
@@ -60,7 +60,7 @@ class De {
|
|
|
60
60
|
};
|
|
61
61
|
break;
|
|
62
62
|
}
|
|
63
|
-
this.#
|
|
63
|
+
this.#o.add(t, G, (o) => {
|
|
64
64
|
if (!(o.key !== "ArrowUp" && o.key !== "ArrowDown" && o.key !== "Enter")) {
|
|
65
65
|
if (o.stopImmediatePropagation(), s(o)) {
|
|
66
66
|
t.dispatchEvent(new MouseEvent("click"));
|
|
@@ -74,7 +74,7 @@ class De {
|
|
|
74
74
|
const e = this.#e.findIndex((n) => n.btn === t);
|
|
75
75
|
e < 0 || (this.#e.splice(e, 1), this.#e.length === 0 ? this.#t = -1 : e <= this.#t && --this.#t);
|
|
76
76
|
}
|
|
77
|
-
#
|
|
77
|
+
#s(t, e) {
|
|
78
78
|
const n = t.querySelectorAll("input[type]"), r = n.length;
|
|
79
79
|
for (let s = 0; s < r; ++s)
|
|
80
80
|
if (n[s].checked) {
|
|
@@ -86,14 +86,14 @@ class De {
|
|
|
86
86
|
return this.#t < 0 ? !1 : this.#e[this.#t].btn === t;
|
|
87
87
|
}
|
|
88
88
|
prev() {
|
|
89
|
-
this.#
|
|
89
|
+
this.#i();
|
|
90
90
|
const t = this.#e.length;
|
|
91
91
|
if (t !== 0) {
|
|
92
92
|
--this.#t < 0 && (this.#t = t - 1);
|
|
93
93
|
for (let e = t; e >= 1; --e) {
|
|
94
94
|
const n = (this.#t + e) % t;
|
|
95
95
|
if (this.#e[n].on()) {
|
|
96
|
-
this.#t = n, this.#
|
|
96
|
+
this.#t = n, this.#a(n);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -101,35 +101,37 @@ class De {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
next() {
|
|
104
|
-
this.#
|
|
104
|
+
this.#i();
|
|
105
105
|
const t = this.#e.length;
|
|
106
106
|
if (t !== 0) {
|
|
107
107
|
++this.#t >= t && (this.#t = 0);
|
|
108
108
|
for (let e = 0; e < t; ++e) {
|
|
109
109
|
const n = (this.#t + e) % t;
|
|
110
110
|
if (this.#e[n].on()) {
|
|
111
|
-
this.#t = n, this.#
|
|
111
|
+
this.#t = n, this.#a(n);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
this.#t = -1;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
#
|
|
118
|
+
#a = it.debugLog ? (t) => console.log(`👾 <FocusMng idx:${String(t)} btn:%o`, this.#e[t].btn) : () => {
|
|
119
119
|
};
|
|
120
120
|
getFocus() {
|
|
121
121
|
if (this.#t < 0) return null;
|
|
122
|
-
this.#
|
|
122
|
+
this.#i(), this.#t >= this.#e.length && (this.#t = 0);
|
|
123
123
|
const t = this.#e[this.#t];
|
|
124
124
|
return t.on() ? t.btn : null;
|
|
125
125
|
}
|
|
126
126
|
blur() {
|
|
127
|
-
this.#
|
|
127
|
+
this.#i(), this.#t = -1, this.#l();
|
|
128
128
|
}
|
|
129
|
-
#
|
|
129
|
+
#l = () => {
|
|
130
|
+
};
|
|
131
|
+
#i() {
|
|
130
132
|
for (let t = this.#e.length - 1; t >= 0; --t) {
|
|
131
133
|
const e = this.#e[t];
|
|
132
|
-
!(e.btn instanceof
|
|
134
|
+
!(e.btn instanceof ut) || e.btn.parent ? e.off() : this.#e.splice(t, 1);
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
}
|
|
@@ -137,7 +139,7 @@ var C = "top", R = "bottom", $ = "right", Y = "left", Xt = "auto", vt = [C, R, $
|
|
|
137
139
|
return i.concat([t + "-" + nt, t + "-" + ft]);
|
|
138
140
|
}, []), le = /* @__PURE__ */ [].concat(vt, [Xt]).reduce(function(i, t) {
|
|
139
141
|
return i.concat([t, t + "-" + nt, t + "-" + ft]);
|
|
140
|
-
}, []), Ce = "beforeRead", Ye = "read", Xe = "afterRead", He = "beforeMain", je = "main", Re = "afterMain", $e = "beforeWrite",
|
|
142
|
+
}, []), Ce = "beforeRead", Ye = "read", Xe = "afterRead", He = "beforeMain", je = "main", Re = "afterMain", $e = "beforeWrite", Ae = "write", Fe = "afterWrite", Ve = [Ce, Ye, Xe, He, je, Re, $e, Ae, Fe];
|
|
141
143
|
function W(i) {
|
|
142
144
|
return i ? (i.nodeName || "").toLowerCase() : null;
|
|
143
145
|
}
|
|
@@ -189,8 +191,8 @@ function Be(i) {
|
|
|
189
191
|
};
|
|
190
192
|
return Object.assign(t.elements.popper.style, e.popper), t.styles = e, t.elements.arrow && Object.assign(t.elements.arrow.style, e.arrow), function() {
|
|
191
193
|
Object.keys(t.elements).forEach(function(n) {
|
|
192
|
-
var r = t.elements[n], s = t.attributes[n] || {}, l = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : e[n]), o = l.reduce(function(a,
|
|
193
|
-
return a[
|
|
194
|
+
var r = t.elements[n], s = t.attributes[n] || {}, l = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : e[n]), o = l.reduce(function(a, h) {
|
|
195
|
+
return a[h] = "", a;
|
|
194
196
|
}, {});
|
|
195
197
|
!j(r) || !W(r) || (Object.assign(r.style, o), Object.keys(s).forEach(function(a) {
|
|
196
198
|
r.removeAttribute(a);
|
|
@@ -206,7 +208,7 @@ const Ne = {
|
|
|
206
208
|
effect: Be,
|
|
207
209
|
requires: ["computeStyles"]
|
|
208
210
|
};
|
|
209
|
-
function
|
|
211
|
+
function V(i) {
|
|
210
212
|
return i.split("-")[0];
|
|
211
213
|
}
|
|
212
214
|
var Q = Math.max, Ot = Math.min, rt = Math.round;
|
|
@@ -223,16 +225,16 @@ function ot(i, t, e) {
|
|
|
223
225
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
224
226
|
var n = i.getBoundingClientRect(), r = 1, s = 1;
|
|
225
227
|
t && j(i) && (r = i.offsetWidth > 0 && rt(n.width) / i.offsetWidth || 1, s = i.offsetHeight > 0 && rt(n.height) / i.offsetHeight || 1);
|
|
226
|
-
var l = tt(i) ? H(i) : window, o = l.visualViewport, a = !ce() && e,
|
|
228
|
+
var l = tt(i) ? H(i) : window, o = l.visualViewport, a = !ce() && e, h = (n.left + (a && o ? o.offsetLeft : 0)) / r, u = (n.top + (a && o ? o.offsetTop : 0)) / s, p = n.width / r, y = n.height / s;
|
|
227
229
|
return {
|
|
228
230
|
width: p,
|
|
229
231
|
height: y,
|
|
230
|
-
top:
|
|
231
|
-
right:
|
|
232
|
-
bottom:
|
|
233
|
-
left:
|
|
234
|
-
x:
|
|
235
|
-
y:
|
|
232
|
+
top: u,
|
|
233
|
+
right: h + p,
|
|
234
|
+
bottom: u + y,
|
|
235
|
+
left: h,
|
|
236
|
+
x: h,
|
|
237
|
+
y: u
|
|
236
238
|
};
|
|
237
239
|
}
|
|
238
240
|
function jt(i) {
|
|
@@ -244,7 +246,7 @@ function jt(i) {
|
|
|
244
246
|
height: n
|
|
245
247
|
};
|
|
246
248
|
}
|
|
247
|
-
function
|
|
249
|
+
function ue(i, t) {
|
|
248
250
|
var e = t.getRootNode && t.getRootNode();
|
|
249
251
|
if (i.contains(t))
|
|
250
252
|
return !0;
|
|
@@ -310,14 +312,14 @@ function mt(i) {
|
|
|
310
312
|
function Rt(i) {
|
|
311
313
|
return ["top", "bottom"].indexOf(i) >= 0 ? "x" : "y";
|
|
312
314
|
}
|
|
313
|
-
function
|
|
315
|
+
function ht(i, t, e) {
|
|
314
316
|
return Q(i, Ot(t, e));
|
|
315
317
|
}
|
|
316
318
|
function ze(i, t, e) {
|
|
317
|
-
var n =
|
|
319
|
+
var n = ht(i, t, e);
|
|
318
320
|
return n > e ? e : n;
|
|
319
321
|
}
|
|
320
|
-
function
|
|
322
|
+
function he() {
|
|
321
323
|
return {
|
|
322
324
|
top: 0,
|
|
323
325
|
right: 0,
|
|
@@ -326,7 +328,7 @@ function ue() {
|
|
|
326
328
|
};
|
|
327
329
|
}
|
|
328
330
|
function de(i) {
|
|
329
|
-
return Object.assign({},
|
|
331
|
+
return Object.assign({}, he(), i);
|
|
330
332
|
}
|
|
331
333
|
function fe(i, t) {
|
|
332
334
|
return t.reduce(function(e, n) {
|
|
@@ -339,15 +341,15 @@ var Ue = function(t, e) {
|
|
|
339
341
|
})) : t, de(typeof t != "number" ? t : fe(t, vt));
|
|
340
342
|
};
|
|
341
343
|
function Ke(i) {
|
|
342
|
-
var t, e = i.state, n = i.name, r = i.options, s = e.elements.arrow, l = e.modifiersData.popperOffsets, o =
|
|
344
|
+
var t, e = i.state, n = i.name, r = i.options, s = e.elements.arrow, l = e.modifiersData.popperOffsets, o = V(e.placement), a = Rt(o), h = [Y, $].indexOf(o) >= 0, u = h ? "height" : "width";
|
|
343
345
|
if (!(!s || !l)) {
|
|
344
|
-
var p = Ue(r.padding, e), y = jt(s), d = a === "y" ? C : Y, m = a === "y" ? R : $, v = e.rects.reference[
|
|
346
|
+
var p = Ue(r.padding, e), y = jt(s), d = a === "y" ? C : Y, m = a === "y" ? R : $, v = e.rects.reference[u] + e.rects.reference[a] - l[a] - e.rects.popper[u], g = l[a] - e.rects.reference[a], w = mt(s), c = w ? a === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, f = v / 2 - g / 2, b = p[d], E = c - y[u] - p[m], x = c / 2 - y[u] / 2 + f, T = ht(b, x, E), S = a;
|
|
345
347
|
e.modifiersData[n] = (t = {}, t[S] = T, t.centerOffset = T - x, t);
|
|
346
348
|
}
|
|
347
349
|
}
|
|
348
350
|
function Je(i) {
|
|
349
351
|
var t = i.state, e = i.options, n = e.element, r = n === void 0 ? "[data-popper-arrow]" : n;
|
|
350
|
-
r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) ||
|
|
352
|
+
r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || ue(t.elements.popper, r) && (t.elements.arrow = r));
|
|
351
353
|
}
|
|
352
354
|
const Ge = {
|
|
353
355
|
name: "arrow",
|
|
@@ -375,7 +377,7 @@ function Qe(i, t) {
|
|
|
375
377
|
};
|
|
376
378
|
}
|
|
377
379
|
function Qt(i) {
|
|
378
|
-
var t, e = i.popper, n = i.popperRect, r = i.placement, s = i.variation, l = i.offsets, o = i.position, a = i.gpuAcceleration,
|
|
380
|
+
var t, e = i.popper, n = i.popperRect, r = i.placement, s = i.variation, l = i.offsets, o = i.position, a = i.gpuAcceleration, h = i.adaptive, u = i.roundOffsets, p = i.isFixed, y = l.x, d = y === void 0 ? 0 : y, m = l.y, v = m === void 0 ? 0 : m, g = typeof u == "function" ? u({
|
|
379
381
|
x: d,
|
|
380
382
|
y: v
|
|
381
383
|
}) : {
|
|
@@ -384,7 +386,7 @@ function Qt(i) {
|
|
|
384
386
|
};
|
|
385
387
|
d = g.x, v = g.y;
|
|
386
388
|
var w = l.hasOwnProperty("x"), c = l.hasOwnProperty("y"), f = Y, b = C, E = window;
|
|
387
|
-
if (
|
|
389
|
+
if (h) {
|
|
388
390
|
var x = mt(e), T = "clientHeight", S = "clientWidth";
|
|
389
391
|
if (x === H(e) && (x = q(e), B(x).position !== "static" && o === "absolute" && (T = "scrollHeight", S = "scrollWidth")), x = x, r === C || (r === Y || r === $) && s === ft) {
|
|
390
392
|
b = R;
|
|
@@ -405,7 +407,7 @@ function Qt(i) {
|
|
|
405
407
|
}
|
|
406
408
|
var O = Object.assign({
|
|
407
409
|
position: o
|
|
408
|
-
},
|
|
410
|
+
}, h && Ze), D = u === !0 ? Qe({
|
|
409
411
|
x: d,
|
|
410
412
|
y: v
|
|
411
413
|
}, H(e)) : {
|
|
@@ -419,20 +421,20 @@ function Qt(i) {
|
|
|
419
421
|
return Object.assign({}, O, (t = {}, t[b] = c ? v + "px" : "", t[f] = w ? d + "px" : "", t.transform = "", t));
|
|
420
422
|
}
|
|
421
423
|
function ti(i) {
|
|
422
|
-
var t = i.state, e = i.options, n = e.gpuAcceleration, r = n === void 0 ? !0 : n, s = e.adaptive, l = s === void 0 ? !0 : s, o = e.roundOffsets, a = o === void 0 ? !0 : o,
|
|
423
|
-
placement:
|
|
424
|
+
var t = i.state, e = i.options, n = e.gpuAcceleration, r = n === void 0 ? !0 : n, s = e.adaptive, l = s === void 0 ? !0 : s, o = e.roundOffsets, a = o === void 0 ? !0 : o, h = {
|
|
425
|
+
placement: V(t.placement),
|
|
424
426
|
variation: st(t.placement),
|
|
425
427
|
popper: t.elements.popper,
|
|
426
428
|
popperRect: t.rects.popper,
|
|
427
429
|
gpuAcceleration: r,
|
|
428
430
|
isFixed: t.options.strategy === "fixed"
|
|
429
431
|
};
|
|
430
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Qt(Object.assign({},
|
|
432
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Qt(Object.assign({}, h, {
|
|
431
433
|
offsets: t.modifiersData.popperOffsets,
|
|
432
434
|
position: t.options.strategy,
|
|
433
435
|
adaptive: l,
|
|
434
436
|
roundOffsets: a
|
|
435
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Qt(Object.assign({},
|
|
437
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Qt(Object.assign({}, h, {
|
|
436
438
|
offsets: t.modifiersData.arrow,
|
|
437
439
|
position: "absolute",
|
|
438
440
|
adaptive: !1,
|
|
@@ -452,12 +454,12 @@ var Et = {
|
|
|
452
454
|
passive: !0
|
|
453
455
|
};
|
|
454
456
|
function ii(i) {
|
|
455
|
-
var t = i.state, e = i.instance, n = i.options, r = n.scroll, s = r === void 0 ? !0 : r, l = n.resize, o = l === void 0 ? !0 : l, a = H(t.elements.popper),
|
|
456
|
-
return s &&
|
|
457
|
-
|
|
457
|
+
var t = i.state, e = i.instance, n = i.options, r = n.scroll, s = r === void 0 ? !0 : r, l = n.resize, o = l === void 0 ? !0 : l, a = H(t.elements.popper), h = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
458
|
+
return s && h.forEach(function(u) {
|
|
459
|
+
u.addEventListener("scroll", e.update, Et);
|
|
458
460
|
}), o && a.addEventListener("resize", e.update, Et), function() {
|
|
459
|
-
s &&
|
|
460
|
-
|
|
461
|
+
s && h.forEach(function(u) {
|
|
462
|
+
u.removeEventListener("scroll", e.update, Et);
|
|
461
463
|
}), o && a.removeEventListener("resize", e.update, Et);
|
|
462
464
|
};
|
|
463
465
|
}
|
|
@@ -497,25 +499,25 @@ function $t(i) {
|
|
|
497
499
|
scrollTop: n
|
|
498
500
|
};
|
|
499
501
|
}
|
|
500
|
-
function
|
|
502
|
+
function At(i) {
|
|
501
503
|
return ot(q(i)).left + $t(i).scrollLeft;
|
|
502
504
|
}
|
|
503
505
|
function si(i, t) {
|
|
504
506
|
var e = H(i), n = q(i), r = e.visualViewport, s = n.clientWidth, l = n.clientHeight, o = 0, a = 0;
|
|
505
507
|
if (r) {
|
|
506
508
|
s = r.width, l = r.height;
|
|
507
|
-
var
|
|
508
|
-
(
|
|
509
|
+
var h = ce();
|
|
510
|
+
(h || !h && t === "fixed") && (o = r.offsetLeft, a = r.offsetTop);
|
|
509
511
|
}
|
|
510
512
|
return {
|
|
511
513
|
width: s,
|
|
512
514
|
height: l,
|
|
513
|
-
x: o +
|
|
515
|
+
x: o + At(i),
|
|
514
516
|
y: a
|
|
515
517
|
};
|
|
516
518
|
}
|
|
517
519
|
function ai(i) {
|
|
518
|
-
var t, e = q(i), n = $t(i), r = (t = i.ownerDocument) == null ? void 0 : t.body, s = Q(e.scrollWidth, e.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), l = Q(e.scrollHeight, e.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), o = -n.scrollLeft +
|
|
520
|
+
var t, e = q(i), n = $t(i), r = (t = i.ownerDocument) == null ? void 0 : t.body, s = Q(e.scrollWidth, e.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), l = Q(e.scrollHeight, e.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), o = -n.scrollLeft + At(i), a = -n.scrollTop;
|
|
519
521
|
return B(r || e).direction === "rtl" && (o += Q(e.clientWidth, r ? r.clientWidth : 0) - s), {
|
|
520
522
|
width: s,
|
|
521
523
|
height: l,
|
|
@@ -523,17 +525,17 @@ function ai(i) {
|
|
|
523
525
|
y: a
|
|
524
526
|
};
|
|
525
527
|
}
|
|
526
|
-
function
|
|
528
|
+
function Ft(i) {
|
|
527
529
|
var t = B(i), e = t.overflow, n = t.overflowX, r = t.overflowY;
|
|
528
530
|
return /auto|scroll|overlay|hidden/.test(e + r + n);
|
|
529
531
|
}
|
|
530
532
|
function pe(i) {
|
|
531
|
-
return ["html", "body", "#document"].indexOf(W(i)) >= 0 ? i.ownerDocument.body : j(i) &&
|
|
533
|
+
return ["html", "body", "#document"].indexOf(W(i)) >= 0 ? i.ownerDocument.body : j(i) && Ft(i) ? i : pe(kt(i));
|
|
532
534
|
}
|
|
533
535
|
function dt(i, t) {
|
|
534
536
|
var e;
|
|
535
537
|
t === void 0 && (t = []);
|
|
536
|
-
var n = pe(i), r = n === ((e = i.ownerDocument) == null ? void 0 : e.body), s = H(n), l = r ? [s].concat(s.visualViewport || [],
|
|
538
|
+
var n = pe(i), r = n === ((e = i.ownerDocument) == null ? void 0 : e.body), s = H(n), l = r ? [s].concat(s.visualViewport || [], Ft(n) ? n : []) : n, o = t.concat(l);
|
|
537
539
|
return r ? o : (
|
|
538
540
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
539
541
|
o.concat(dt(kt(l)))
|
|
@@ -557,18 +559,18 @@ function ee(i, t, e) {
|
|
|
557
559
|
function ci(i) {
|
|
558
560
|
var t = dt(kt(i)), e = ["absolute", "fixed"].indexOf(B(i).position) >= 0, n = e && j(i) ? mt(i) : i;
|
|
559
561
|
return tt(n) ? t.filter(function(r) {
|
|
560
|
-
return tt(r) &&
|
|
562
|
+
return tt(r) && ue(r, n) && W(r) !== "body";
|
|
561
563
|
}) : [];
|
|
562
564
|
}
|
|
563
|
-
function
|
|
564
|
-
var r = t === "clippingParents" ? ci(i) : [].concat(t), s = [].concat(r, [e]), l = s[0], o = s.reduce(function(a,
|
|
565
|
-
var
|
|
566
|
-
return a.top = Q(
|
|
565
|
+
function ui(i, t, e, n) {
|
|
566
|
+
var r = t === "clippingParents" ? ci(i) : [].concat(t), s = [].concat(r, [e]), l = s[0], o = s.reduce(function(a, h) {
|
|
567
|
+
var u = ee(i, h, n);
|
|
568
|
+
return a.top = Q(u.top, a.top), a.right = Ot(u.right, a.right), a.bottom = Ot(u.bottom, a.bottom), a.left = Q(u.left, a.left), a;
|
|
567
569
|
}, ee(i, l, n));
|
|
568
570
|
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
569
571
|
}
|
|
570
572
|
function ve(i) {
|
|
571
|
-
var t = i.reference, e = i.element, n = i.placement, r = n ?
|
|
573
|
+
var t = i.reference, e = i.element, n = i.placement, r = n ? V(n) : null, s = n ? st(n) : null, l = t.x + t.width / 2 - e.width / 2, o = t.y + t.height / 2 - e.height / 2, a;
|
|
572
574
|
switch (r) {
|
|
573
575
|
case C:
|
|
574
576
|
a = {
|
|
@@ -600,15 +602,15 @@ function ve(i) {
|
|
|
600
602
|
y: t.y
|
|
601
603
|
};
|
|
602
604
|
}
|
|
603
|
-
var
|
|
604
|
-
if (
|
|
605
|
-
var
|
|
605
|
+
var h = r ? Rt(r) : null;
|
|
606
|
+
if (h != null) {
|
|
607
|
+
var u = h === "y" ? "height" : "width";
|
|
606
608
|
switch (s) {
|
|
607
609
|
case nt:
|
|
608
|
-
a[
|
|
610
|
+
a[h] = a[h] - (t[u] / 2 - e[u] / 2);
|
|
609
611
|
break;
|
|
610
612
|
case ft:
|
|
611
|
-
a[
|
|
613
|
+
a[h] = a[h] + (t[u] / 2 - e[u] / 2);
|
|
612
614
|
break;
|
|
613
615
|
}
|
|
614
616
|
}
|
|
@@ -616,7 +618,7 @@ function ve(i) {
|
|
|
616
618
|
}
|
|
617
619
|
function pt(i, t) {
|
|
618
620
|
t === void 0 && (t = {});
|
|
619
|
-
var e = t, n = e.placement, r = n === void 0 ? i.placement : n, s = e.strategy, l = s === void 0 ? i.strategy : s, o = e.boundary, a = o === void 0 ? Pe : o,
|
|
621
|
+
var e = t, n = e.placement, r = n === void 0 ? i.placement : n, s = e.strategy, l = s === void 0 ? i.strategy : s, o = e.boundary, a = o === void 0 ? Pe : o, h = e.rootBoundary, u = h === void 0 ? ae : h, p = e.elementContext, y = p === void 0 ? ct : p, d = e.altBoundary, m = d === void 0 ? !1 : d, v = e.padding, g = v === void 0 ? 0 : v, w = de(typeof g != "number" ? g : fe(g, vt)), c = y === ct ? Le : ct, f = i.rects.popper, b = i.elements[m ? c : y], E = ui(tt(b) ? b : b.contextElement || q(i.elements.popper), a, u, l), x = ot(i.elements.reference), T = ve({
|
|
620
622
|
reference: x,
|
|
621
623
|
element: f,
|
|
622
624
|
placement: r
|
|
@@ -629,18 +631,18 @@ function pt(i, t) {
|
|
|
629
631
|
if (y === ct && O) {
|
|
630
632
|
var D = O[r];
|
|
631
633
|
Object.keys(_).forEach(function(P) {
|
|
632
|
-
var
|
|
633
|
-
_[P] += D[I] *
|
|
634
|
+
var A = [$, R].indexOf(P) >= 0 ? 1 : -1, I = [C, R].indexOf(P) >= 0 ? "y" : "x";
|
|
635
|
+
_[P] += D[I] * A;
|
|
634
636
|
});
|
|
635
637
|
}
|
|
636
638
|
return _;
|
|
637
639
|
}
|
|
638
|
-
function
|
|
640
|
+
function hi(i, t) {
|
|
639
641
|
t === void 0 && (t = {});
|
|
640
|
-
var e = t, n = e.placement, r = e.boundary, s = e.rootBoundary, l = e.padding, o = e.flipVariations, a = e.allowedAutoPlacements,
|
|
641
|
-
return st(m) ===
|
|
642
|
+
var e = t, n = e.placement, r = e.boundary, s = e.rootBoundary, l = e.padding, o = e.flipVariations, a = e.allowedAutoPlacements, h = a === void 0 ? le : a, u = st(n), p = u ? o ? Gt : Gt.filter(function(m) {
|
|
643
|
+
return st(m) === u;
|
|
642
644
|
}) : vt, y = p.filter(function(m) {
|
|
643
|
-
return
|
|
645
|
+
return h.indexOf(m) >= 0;
|
|
644
646
|
});
|
|
645
647
|
y.length === 0 && (y = p);
|
|
646
648
|
var d = y.reduce(function(m, v) {
|
|
@@ -649,14 +651,14 @@ function ui(i, t) {
|
|
|
649
651
|
boundary: r,
|
|
650
652
|
rootBoundary: s,
|
|
651
653
|
padding: l
|
|
652
|
-
})[
|
|
654
|
+
})[V(v)], m;
|
|
653
655
|
}, {});
|
|
654
656
|
return Object.keys(d).sort(function(m, v) {
|
|
655
657
|
return d[m] - d[v];
|
|
656
658
|
});
|
|
657
659
|
}
|
|
658
660
|
function di(i) {
|
|
659
|
-
if (
|
|
661
|
+
if (V(i) === Xt)
|
|
660
662
|
return [];
|
|
661
663
|
var t = Tt(i);
|
|
662
664
|
return [te(i), t, te(t)];
|
|
@@ -664,26 +666,26 @@ function di(i) {
|
|
|
664
666
|
function fi(i) {
|
|
665
667
|
var t = i.state, e = i.options, n = i.name;
|
|
666
668
|
if (!t.modifiersData[n]._skip) {
|
|
667
|
-
for (var r = e.mainAxis, s = r === void 0 ? !0 : r, l = e.altAxis, o = l === void 0 ? !0 : l, a = e.fallbackPlacements,
|
|
668
|
-
return et.concat(
|
|
669
|
+
for (var r = e.mainAxis, s = r === void 0 ? !0 : r, l = e.altAxis, o = l === void 0 ? !0 : l, a = e.fallbackPlacements, h = e.padding, u = e.boundary, p = e.rootBoundary, y = e.altBoundary, d = e.flipVariations, m = d === void 0 ? !0 : d, v = e.allowedAutoPlacements, g = t.options.placement, w = V(g), c = w === g, f = a || (c || !m ? [Tt(g)] : di(g)), b = [g].concat(f).reduce(function(et, N) {
|
|
670
|
+
return et.concat(V(N) === Xt ? hi(t, {
|
|
669
671
|
placement: N,
|
|
670
|
-
boundary:
|
|
672
|
+
boundary: u,
|
|
671
673
|
rootBoundary: p,
|
|
672
|
-
padding:
|
|
674
|
+
padding: h,
|
|
673
675
|
flipVariations: m,
|
|
674
676
|
allowedAutoPlacements: v
|
|
675
677
|
}) : N);
|
|
676
678
|
}, []), E = t.rects.reference, x = t.rects.popper, T = /* @__PURE__ */ new Map(), S = !0, M = b[0], _ = 0; _ < b.length; _++) {
|
|
677
|
-
var O = b[_], D =
|
|
679
|
+
var O = b[_], D = V(O), P = st(O) === nt, A = [C, R].indexOf(D) >= 0, I = A ? "width" : "height", X = pt(t, {
|
|
678
680
|
placement: O,
|
|
679
|
-
boundary:
|
|
681
|
+
boundary: u,
|
|
680
682
|
rootBoundary: p,
|
|
681
683
|
altBoundary: y,
|
|
682
|
-
padding:
|
|
683
|
-
}),
|
|
684
|
-
E[I] > x[I] && (
|
|
685
|
-
var gt = Tt(
|
|
686
|
-
if (s && z.push(X[D] <= 0), o && z.push(X[
|
|
684
|
+
padding: h
|
|
685
|
+
}), F = A ? P ? $ : Y : P ? R : C;
|
|
686
|
+
E[I] > x[I] && (F = Tt(F));
|
|
687
|
+
var gt = Tt(F), z = [];
|
|
688
|
+
if (s && z.push(X[D] <= 0), o && z.push(X[F] <= 0, X[gt] <= 0), z.every(function(et) {
|
|
687
689
|
return et;
|
|
688
690
|
})) {
|
|
689
691
|
M = O, S = !1;
|
|
@@ -740,14 +742,14 @@ function vi(i) {
|
|
|
740
742
|
elementContext: "reference"
|
|
741
743
|
}), o = pt(t, {
|
|
742
744
|
altBoundary: !0
|
|
743
|
-
}), a = ie(l, n),
|
|
745
|
+
}), a = ie(l, n), h = ie(o, r, s), u = ne(a), p = ne(h);
|
|
744
746
|
t.modifiersData[e] = {
|
|
745
747
|
referenceClippingOffsets: a,
|
|
746
|
-
popperEscapeOffsets:
|
|
747
|
-
isReferenceHidden:
|
|
748
|
+
popperEscapeOffsets: h,
|
|
749
|
+
isReferenceHidden: u,
|
|
748
750
|
hasPopperEscaped: p
|
|
749
751
|
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
750
|
-
"data-popper-reference-hidden":
|
|
752
|
+
"data-popper-reference-hidden": u,
|
|
751
753
|
"data-popper-escaped": p
|
|
752
754
|
});
|
|
753
755
|
}
|
|
@@ -759,7 +761,7 @@ const mi = {
|
|
|
759
761
|
fn: vi
|
|
760
762
|
};
|
|
761
763
|
function gi(i, t, e) {
|
|
762
|
-
var n =
|
|
764
|
+
var n = V(i), r = [Y, C].indexOf(n) >= 0 ? -1 : 1, s = typeof e == "function" ? e(Object.assign({}, t, {
|
|
763
765
|
placement: i
|
|
764
766
|
})) : e, l = s[0], o = s[1];
|
|
765
767
|
return l = l || 0, o = (o || 0) * r, [Y, $].indexOf(n) >= 0 ? {
|
|
@@ -771,10 +773,10 @@ function gi(i, t, e) {
|
|
|
771
773
|
};
|
|
772
774
|
}
|
|
773
775
|
function yi(i) {
|
|
774
|
-
var t = i.state, e = i.options, n = i.name, r = e.offset, s = r === void 0 ? [0, 0] : r, l = le.reduce(function(
|
|
775
|
-
return
|
|
776
|
-
}, {}), o = l[t.placement], a = o.x,
|
|
777
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y +=
|
|
776
|
+
var t = i.state, e = i.options, n = i.name, r = e.offset, s = r === void 0 ? [0, 0] : r, l = le.reduce(function(u, p) {
|
|
777
|
+
return u[p] = gi(p, t.rects, s), u;
|
|
778
|
+
}, {}), o = l[t.placement], a = o.x, h = o.y;
|
|
779
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += h), t.modifiersData[n] = l;
|
|
778
780
|
}
|
|
779
781
|
const bi = {
|
|
780
782
|
name: "offset",
|
|
@@ -802,12 +804,12 @@ function Ei(i) {
|
|
|
802
804
|
return i === "x" ? "y" : "x";
|
|
803
805
|
}
|
|
804
806
|
function Ti(i) {
|
|
805
|
-
var t = i.state, e = i.options, n = i.name, r = e.mainAxis, s = r === void 0 ? !0 : r, l = e.altAxis, o = l === void 0 ? !1 : l, a = e.boundary,
|
|
807
|
+
var t = i.state, e = i.options, n = i.name, r = e.mainAxis, s = r === void 0 ? !0 : r, l = e.altAxis, o = l === void 0 ? !1 : l, a = e.boundary, h = e.rootBoundary, u = e.altBoundary, p = e.padding, y = e.tether, d = y === void 0 ? !0 : y, m = e.tetherOffset, v = m === void 0 ? 0 : m, g = pt(t, {
|
|
806
808
|
boundary: a,
|
|
807
|
-
rootBoundary:
|
|
809
|
+
rootBoundary: h,
|
|
808
810
|
padding: p,
|
|
809
|
-
altBoundary:
|
|
810
|
-
}), w =
|
|
811
|
+
altBoundary: u
|
|
812
|
+
}), w = V(t.placement), c = st(t.placement), f = !c, b = Rt(w), E = Ei(b), x = t.modifiersData.popperOffsets, T = t.rects.reference, S = t.rects.popper, M = typeof v == "function" ? v(Object.assign({}, t.rects, {
|
|
811
813
|
placement: t.placement
|
|
812
814
|
})) : v, _ = typeof M == "number" ? {
|
|
813
815
|
mainAxis: M,
|
|
@@ -821,14 +823,14 @@ function Ti(i) {
|
|
|
821
823
|
};
|
|
822
824
|
if (x) {
|
|
823
825
|
if (s) {
|
|
824
|
-
var P,
|
|
826
|
+
var P, A = b === "y" ? C : Y, I = b === "y" ? R : $, X = b === "y" ? "height" : "width", F = x[b], gt = F + g[A], z = F - g[I], yt = d ? -S[X] / 2 : 0, Mt = c === nt ? T[X] : S[X], at = c === nt ? -S[X] : -T[X], bt = t.elements.arrow, et = d && bt ? jt(bt) : {
|
|
825
827
|
width: 0,
|
|
826
828
|
height: 0
|
|
827
|
-
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
828
|
-
x[b] = Wt, D[b] = Wt -
|
|
829
|
+
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : he(), lt = N[A], wt = N[I], U = ht(0, T[X], et[X]), St = f ? T[X] / 2 - yt - U - lt - _.mainAxis : Mt - U - lt - _.mainAxis, me = f ? -T[X] / 2 + yt + U + wt + _.mainAxis : at + U + wt + _.mainAxis, Dt = t.elements.arrow && mt(t.elements.arrow), ge = Dt ? b === "y" ? Dt.clientTop || 0 : Dt.clientLeft || 0 : 0, Vt = (P = O?.[b]) != null ? P : 0, ye = F + St - Vt - ge, be = F + me - Vt, Wt = ht(d ? Ot(gt, ye) : gt, F, d ? Q(z, be) : z);
|
|
830
|
+
x[b] = Wt, D[b] = Wt - F;
|
|
829
831
|
}
|
|
830
832
|
if (o) {
|
|
831
|
-
var Bt, we = b === "x" ? C : Y, xe = b === "x" ? R : $, K = x[E], xt = E === "y" ? "height" : "width", Nt = K + g[we], qt = K - g[xe], Pt = [C, Y].indexOf(w) !== -1, It = (Bt = O?.[E]) != null ? Bt : 0, zt = Pt ? Nt : K - T[xt] - S[xt] - It + _.altAxis, Ut = Pt ? K + T[xt] + S[xt] - It - _.altAxis : qt, Kt = d && Pt ? ze(zt, K, Ut) :
|
|
833
|
+
var Bt, we = b === "x" ? C : Y, xe = b === "x" ? R : $, K = x[E], xt = E === "y" ? "height" : "width", Nt = K + g[we], qt = K - g[xe], Pt = [C, Y].indexOf(w) !== -1, It = (Bt = O?.[E]) != null ? Bt : 0, zt = Pt ? Nt : K - T[xt] - S[xt] - It + _.altAxis, Ut = Pt ? K + T[xt] + S[xt] - It - _.altAxis : qt, Kt = d && Pt ? ze(zt, K, Ut) : ht(d ? zt : Nt, K, d ? Ut : qt);
|
|
832
834
|
x[E] = Kt, D[E] = Kt - K;
|
|
833
835
|
}
|
|
834
836
|
t.modifiersData[n] = D;
|
|
@@ -864,7 +866,7 @@ function Si(i, t, e) {
|
|
|
864
866
|
y: 0
|
|
865
867
|
};
|
|
866
868
|
return (n || !n && !e) && ((W(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
867
|
-
|
|
869
|
+
Ft(s)) && (o = _i(t)), j(t) ? (a = ot(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : s && (a.x = At(s))), {
|
|
868
870
|
x: l.left + o.scrollLeft - a.x,
|
|
869
871
|
y: l.top + o.scrollTop - a.y,
|
|
870
872
|
width: l.width,
|
|
@@ -892,7 +894,7 @@ function Di(i) {
|
|
|
892
894
|
}
|
|
893
895
|
function Pi(i) {
|
|
894
896
|
var t = Di(i);
|
|
895
|
-
return
|
|
897
|
+
return Ve.reduce(function(e, n) {
|
|
896
898
|
return e.concat(t.filter(function(r) {
|
|
897
899
|
return r.phase === n;
|
|
898
900
|
}));
|
|
@@ -935,9 +937,9 @@ function oe() {
|
|
|
935
937
|
function Yi(i) {
|
|
936
938
|
i === void 0 && (i = {});
|
|
937
939
|
var t = i, e = t.defaultModifiers, n = e === void 0 ? [] : e, r = t.defaultOptions, s = r === void 0 ? re : r;
|
|
938
|
-
return function(o, a,
|
|
939
|
-
|
|
940
|
-
var
|
|
940
|
+
return function(o, a, h) {
|
|
941
|
+
h === void 0 && (h = s);
|
|
942
|
+
var u = {
|
|
941
943
|
placement: "bottom",
|
|
942
944
|
orderedModifiers: [],
|
|
943
945
|
options: Object.assign({}, re, s),
|
|
@@ -949,15 +951,15 @@ function Yi(i) {
|
|
|
949
951
|
attributes: {},
|
|
950
952
|
styles: {}
|
|
951
953
|
}, p = [], y = !1, d = {
|
|
952
|
-
state:
|
|
954
|
+
state: u,
|
|
953
955
|
setOptions: function(w) {
|
|
954
|
-
var c = typeof w == "function" ? w(
|
|
955
|
-
v(),
|
|
956
|
+
var c = typeof w == "function" ? w(u.options) : w;
|
|
957
|
+
v(), u.options = Object.assign({}, s, u.options, c), u.scrollParents = {
|
|
956
958
|
reference: tt(o) ? dt(o) : o.contextElement ? dt(o.contextElement) : [],
|
|
957
959
|
popper: dt(a)
|
|
958
960
|
};
|
|
959
|
-
var f = Pi(Ci([].concat(n,
|
|
960
|
-
return
|
|
961
|
+
var f = Pi(Ci([].concat(n, u.options.modifiers)));
|
|
962
|
+
return u.orderedModifiers = f.filter(function(b) {
|
|
961
963
|
return b.enabled;
|
|
962
964
|
}), m(), d.update();
|
|
963
965
|
},
|
|
@@ -968,26 +970,26 @@ function Yi(i) {
|
|
|
968
970
|
// prefer the async Popper#update method
|
|
969
971
|
forceUpdate: function() {
|
|
970
972
|
if (!y) {
|
|
971
|
-
var w =
|
|
973
|
+
var w = u.elements, c = w.reference, f = w.popper;
|
|
972
974
|
if (oe(c, f)) {
|
|
973
|
-
|
|
974
|
-
reference: Si(c, mt(f),
|
|
975
|
+
u.rects = {
|
|
976
|
+
reference: Si(c, mt(f), u.options.strategy === "fixed"),
|
|
975
977
|
popper: jt(f)
|
|
976
|
-
},
|
|
977
|
-
return
|
|
978
|
+
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) {
|
|
979
|
+
return u.modifiersData[_.name] = Object.assign({}, _.data);
|
|
978
980
|
});
|
|
979
|
-
for (var b = 0; b <
|
|
980
|
-
if (
|
|
981
|
-
|
|
981
|
+
for (var b = 0; b < u.orderedModifiers.length; b++) {
|
|
982
|
+
if (u.reset === !0) {
|
|
983
|
+
u.reset = !1, b = -1;
|
|
982
984
|
continue;
|
|
983
985
|
}
|
|
984
|
-
var E =
|
|
985
|
-
typeof x == "function" && (
|
|
986
|
-
state:
|
|
986
|
+
var E = u.orderedModifiers[b], x = E.fn, T = E.options, S = T === void 0 ? {} : T, M = E.name;
|
|
987
|
+
typeof x == "function" && (u = x({
|
|
988
|
+
state: u,
|
|
987
989
|
options: S,
|
|
988
990
|
name: M,
|
|
989
991
|
instance: d
|
|
990
|
-
}) ||
|
|
992
|
+
}) || u);
|
|
991
993
|
}
|
|
992
994
|
}
|
|
993
995
|
}
|
|
@@ -996,7 +998,7 @@ function Yi(i) {
|
|
|
996
998
|
// not necessary (debounced to run at most once-per-tick)
|
|
997
999
|
update: Li(function() {
|
|
998
1000
|
return new Promise(function(g) {
|
|
999
|
-
d.forceUpdate(), g(
|
|
1001
|
+
d.forceUpdate(), g(u);
|
|
1000
1002
|
});
|
|
1001
1003
|
}),
|
|
1002
1004
|
destroy: function() {
|
|
@@ -1005,15 +1007,15 @@ function Yi(i) {
|
|
|
1005
1007
|
};
|
|
1006
1008
|
if (!oe(o, a))
|
|
1007
1009
|
return d;
|
|
1008
|
-
d.setOptions(
|
|
1009
|
-
!y &&
|
|
1010
|
+
d.setOptions(h).then(function(g) {
|
|
1011
|
+
!y && h.onFirstUpdate && h.onFirstUpdate(g);
|
|
1010
1012
|
});
|
|
1011
1013
|
function m() {
|
|
1012
|
-
|
|
1014
|
+
u.orderedModifiers.forEach(function(g) {
|
|
1013
1015
|
var w = g.name, c = g.options, f = c === void 0 ? {} : c, b = g.effect;
|
|
1014
1016
|
if (typeof b == "function") {
|
|
1015
1017
|
var E = b({
|
|
1016
|
-
state:
|
|
1018
|
+
state: u,
|
|
1017
1019
|
name: w,
|
|
1018
1020
|
instance: d,
|
|
1019
1021
|
options: f
|
|
@@ -1076,14 +1078,14 @@ class _t {
|
|
|
1076
1078
|
this.handlers[t][n](e);
|
|
1077
1079
|
}
|
|
1078
1080
|
onTouchStart(t) {
|
|
1079
|
-
var e, n, r, s, l, o, a,
|
|
1081
|
+
var e, n, r, s, l, o, a, h, u, p, y, d, m, v, g, w, c, f, b, E, x, T, S, M, _, O;
|
|
1080
1082
|
let D = !1;
|
|
1081
1083
|
if (t.type !== "mousedown") {
|
|
1082
1084
|
if (this.touch1 || (this.touch1 = t.changedTouches[0], D = !0), (D && t.changedTouches.length > 1 || !D) && !this.touch2) {
|
|
1083
1085
|
this.touch2 = [...t.changedTouches].find((P) => {
|
|
1084
|
-
var
|
|
1085
|
-
return P.identifier !== ((
|
|
1086
|
-
}) || null, this.originalDistance = Math.sqrt(Math.pow(((n = (e = this.touch2) === null || e === void 0 ? void 0 : e.screenX) !== null && n !== void 0 ? n : 0) - ((o = (s = (r = this.touchMove1) === null || r === void 0 ? void 0 : r.screenX) !== null && s !== void 0 ? s : (l = this.touch1) === null || l === void 0 ? void 0 : l.screenX) !== null && o !== void 0 ? o : 0), 2) + Math.pow(((
|
|
1086
|
+
var A;
|
|
1087
|
+
return P.identifier !== ((A = this.touch1) === null || A === void 0 ? void 0 : A.identifier);
|
|
1088
|
+
}) || null, this.originalDistance = Math.sqrt(Math.pow(((n = (e = this.touch2) === null || e === void 0 ? void 0 : e.screenX) !== null && n !== void 0 ? n : 0) - ((o = (s = (r = this.touchMove1) === null || r === void 0 ? void 0 : r.screenX) !== null && s !== void 0 ? s : (l = this.touch1) === null || l === void 0 ? void 0 : l.screenX) !== null && o !== void 0 ? o : 0), 2) + Math.pow(((h = (a = this.touch2) === null || a === void 0 ? void 0 : a.screenY) !== null && h !== void 0 ? h : 0) - ((d = (p = (u = this.touchMove1) === null || u === void 0 ? void 0 : u.screenY) !== null && p !== void 0 ? p : (y = this.touch1) === null || y === void 0 ? void 0 : y.screenY) !== null && d !== void 0 ? d : 0), 2)), this.originalAngle = Math.atan2(((v = (m = this.touch2) === null || m === void 0 ? void 0 : m.screenY) !== null && v !== void 0 ? v : 0) - ((f = (w = (g = this.touchMove1) === null || g === void 0 ? void 0 : g.screenY) !== null && w !== void 0 ? w : (c = this.touch1) === null || c === void 0 ? void 0 : c.screenY) !== null && f !== void 0 ? f : 0), ((E = (b = this.touch2) === null || b === void 0 ? void 0 : b.screenX) !== null && E !== void 0 ? E : 0) - ((M = (T = (x = this.touchMove1) === null || x === void 0 ? void 0 : x.screenX) !== null && T !== void 0 ? T : (S = this.touch1) === null || S === void 0 ? void 0 : S.screenX) !== null && M !== void 0 ? M : 0)) / (Math.PI / 180);
|
|
1087
1089
|
return;
|
|
1088
1090
|
}
|
|
1089
1091
|
if (!D)
|
|
@@ -1092,7 +1094,7 @@ class _t {
|
|
|
1092
1094
|
(D || t.type === "mousedown") && (this.thresholdX = this.opts.threshold("x", this), this.thresholdY = this.opts.threshold("y", this), this.disregardVelocityThresholdX = this.opts.disregardVelocityThreshold("x", this), this.disregardVelocityThresholdY = this.opts.disregardVelocityThreshold("y", this), this.touchStartX = t.type === "mousedown" ? t.screenX : ((_ = this.touch1) === null || _ === void 0 ? void 0 : _.screenX) || 0, this.touchStartY = t.type === "mousedown" ? t.screenY : ((O = this.touch1) === null || O === void 0 ? void 0 : O.screenY) || 0, this.touchMoveX = null, this.touchMoveY = null, this.touchEndX = null, this.touchEndY = null, this.swipingDirection = null, this.longPressTimer = setTimeout(() => this.fire("longpress", t), this.opts.longPressTime), this.scale = 1, this.rotation = 0, this.fire("panstart", t));
|
|
1093
1095
|
}
|
|
1094
1096
|
onTouchMove(t) {
|
|
1095
|
-
var e, n, r, s, l, o, a,
|
|
1097
|
+
var e, n, r, s, l, o, a, h, u, p, y, d, m;
|
|
1096
1098
|
if (t.type === "mousemove" && (!this.touchStartX || this.touchEndX !== null))
|
|
1097
1099
|
return;
|
|
1098
1100
|
let v, g;
|
|
@@ -1110,10 +1112,10 @@ class _t {
|
|
|
1110
1112
|
const f = Math.abs(this.touchMoveX), b = Math.abs(this.touchMoveY);
|
|
1111
1113
|
this.swipingHorizontal = f > this.thresholdX, this.swipingVertical = b > this.thresholdY, this.swipingDirection = f > b ? this.swipingHorizontal ? "horizontal" : "pre-horizontal" : this.swipingVertical ? "vertical" : "pre-vertical", Math.max(f, b) > this.opts.pressThreshold && clearTimeout((a = this.longPressTimer) !== null && a !== void 0 ? a : void 0), this.fire("panmove", t);
|
|
1112
1114
|
}
|
|
1113
|
-
t.type !== "mousemove" && this.touchMove1 != null && this.touchMove2 != null && (this.newDistance = Math.sqrt(Math.pow(this.touchMove2.screenX - this.touchMove1.screenX, 2) + Math.pow(this.touchMove2.screenY - this.touchMove1.screenY, 2)), this.scale = this.newDistance / ((
|
|
1115
|
+
t.type !== "mousemove" && this.touchMove1 != null && this.touchMove2 != null && (this.newDistance = Math.sqrt(Math.pow(this.touchMove2.screenX - this.touchMove1.screenX, 2) + Math.pow(this.touchMove2.screenY - this.touchMove1.screenY, 2)), this.scale = this.newDistance / ((h = this.originalDistance) !== null && h !== void 0 ? h : 0), this.fire("pinch", t), this.newAngle = Math.atan2(((u = this.touchMove2.screenY) !== null && u !== void 0 ? u : 0) - ((p = this.touchMove1.screenY) !== null && p !== void 0 ? p : 0), ((y = this.touchMove2.screenX) !== null && y !== void 0 ? y : 0) - ((d = this.touchMove1.screenX) !== null && d !== void 0 ? d : 0)) / (Math.PI / 180), this.rotation = this.newAngle - ((m = this.originalAngle) !== null && m !== void 0 ? m : 0), this.fire("rotate", t));
|
|
1114
1116
|
}
|
|
1115
1117
|
onTouchEnd(t) {
|
|
1116
|
-
var e, n, r, s, l, o, a,
|
|
1118
|
+
var e, n, r, s, l, o, a, h, u, p;
|
|
1117
1119
|
let y;
|
|
1118
1120
|
if (t.type !== "mouseup" && (y = [...t.changedTouches].find((d) => {
|
|
1119
1121
|
var m;
|
|
@@ -1128,7 +1130,7 @@ class _t {
|
|
|
1128
1130
|
if (t.type === "mouseup" || y) {
|
|
1129
1131
|
this.touchEndX = t.type === "mouseup" ? t.screenX : (e = y?.screenX) !== null && e !== void 0 ? e : 0, this.touchEndY = t.type === "mouseup" ? t.screenY : (n = y?.screenY) !== null && n !== void 0 ? n : 0, this.fire("panend", t), clearTimeout((r = this.longPressTimer) !== null && r !== void 0 ? r : void 0);
|
|
1130
1132
|
const d = this.touchEndX - ((s = this.touchStartX) !== null && s !== void 0 ? s : 0), m = Math.abs(d), v = this.touchEndY - ((l = this.touchStartY) !== null && l !== void 0 ? l : 0), g = Math.abs(v), w = Math.sqrt(Math.pow(d, 2) + Math.pow(v, 2)), c = Math.abs(w), f = g / m;
|
|
1131
|
-
m > this.thresholdX || g > this.thresholdY || this.opts.diagonalSwipes && (c > this.thresholdX || c > this.thresholdY) ? (this.swipedHorizontal = m > this.thresholdX || this.opts.diagonalSwipes && c > this.thresholdX, this.swipedVertical = g > this.thresholdY || this.opts.diagonalSwipes && c > this.thresholdY, (!this.opts.diagonalSwipes || f < Math.tan((45 - this.opts.diagonalLimit) * Math.PI / 180) || f > Math.tan((45 + this.opts.diagonalLimit) * Math.PI / 180)) && (m >= g && (this.swipedVertical = !1), g > m && (this.swipedHorizontal = !1)), this.swipedHorizontal && (d < 0 ? (((o = this.velocityX) !== null && o !== void 0 ? o : 0) < -this.opts.velocityThreshold || w < -this.disregardVelocityThresholdX) && this.fire("swipeleft", t) : (((a = this.velocityX) !== null && a !== void 0 ? a : 0) > this.opts.velocityThreshold || w > this.disregardVelocityThresholdX) && this.fire("swiperight", t)), this.swipedVertical && (v < 0 ? (((
|
|
1133
|
+
m > this.thresholdX || g > this.thresholdY || this.opts.diagonalSwipes && (c > this.thresholdX || c > this.thresholdY) ? (this.swipedHorizontal = m > this.thresholdX || this.opts.diagonalSwipes && c > this.thresholdX, this.swipedVertical = g > this.thresholdY || this.opts.diagonalSwipes && c > this.thresholdY, (!this.opts.diagonalSwipes || f < Math.tan((45 - this.opts.diagonalLimit) * Math.PI / 180) || f > Math.tan((45 + this.opts.diagonalLimit) * Math.PI / 180)) && (m >= g && (this.swipedVertical = !1), g > m && (this.swipedHorizontal = !1)), this.swipedHorizontal && (d < 0 ? (((o = this.velocityX) !== null && o !== void 0 ? o : 0) < -this.opts.velocityThreshold || w < -this.disregardVelocityThresholdX) && this.fire("swipeleft", t) : (((a = this.velocityX) !== null && a !== void 0 ? a : 0) > this.opts.velocityThreshold || w > this.disregardVelocityThresholdX) && this.fire("swiperight", t)), this.swipedVertical && (v < 0 ? (((h = this.velocityY) !== null && h !== void 0 ? h : 0) < -this.opts.velocityThreshold || w < -this.disregardVelocityThresholdY) && this.fire("swipeup", t) : (((u = this.velocityY) !== null && u !== void 0 ? u : 0) > this.opts.velocityThreshold || w > this.disregardVelocityThresholdY) && this.fire("swipedown", t))) : m < this.opts.pressThreshold && g < this.opts.pressThreshold && (this.doubleTapWaiting ? (this.doubleTapWaiting = !1, clearTimeout((p = this.doubleTapTimer) !== null && p !== void 0 ? p : void 0), this.fire("doubletap", t)) : (this.doubleTapWaiting = !0, this.doubleTapTimer = setTimeout(() => this.doubleTapWaiting = !1, this.opts.doubleTapTime), this.fire("tap", t)));
|
|
1132
1134
|
}
|
|
1133
1135
|
!this.touch1 && !this.touch2 && (this.fire("pinchend", t), this.fire("rotateend", t), this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null);
|
|
1134
1136
|
}
|
|
@@ -1154,21 +1156,21 @@ try {
|
|
|
1154
1156
|
}));
|
|
1155
1157
|
} catch {
|
|
1156
1158
|
}
|
|
1157
|
-
class
|
|
1158
|
-
constructor(t, e, n, r, s, l, o, a,
|
|
1159
|
-
if (this.cfg = t, this.hTag = e, this.appPixi = n, this.main = r, this.layMng = s, this.val = l, this.scrItr = a, this.sys =
|
|
1159
|
+
class Fi {
|
|
1160
|
+
constructor(t, e, n, r, s, l, o, a, h) {
|
|
1161
|
+
if (this.cfg = t, this.hTag = e, this.appPixi = n, this.main = r, this.layMng = s, this.val = l, this.scrItr = a, this.sys = h, e.clear_event = (c) => L.clear_event(c), e.event = (c) => this.#b(c), e.set_cancel_skip = () => !1, e.set_focus = (c) => this.#w(c), this.#t = new De(n.view, h), o.setEvtMng(this), a.setOtherObj(this, s), Se.setEvtMng(this, h, a), s.setEvtMng(this), k.setFcs(this.#t), h.setFire((c, f) => k.fire(c, f)), it.isDbg) {
|
|
1160
1162
|
const c = {
|
|
1161
1163
|
pause: () => {
|
|
1162
1164
|
if (!k.isWait) return;
|
|
1163
1165
|
const f = {};
|
|
1164
|
-
a.recodeDesign(f),
|
|
1166
|
+
a.recodeDesign(f), h.callHook("_enterDesign", f), h.send2Dbg("_enterDesign", f);
|
|
1165
1167
|
}
|
|
1166
1168
|
// stopOnBreakpoint : ()=> this.#isDbgBreak = true,
|
|
1167
1169
|
// stopOnDataBreakpoint : ()=> this.#isDbgBreak = true,
|
|
1168
1170
|
// continue : ()=> this.#isDbgBreak = false,
|
|
1169
1171
|
// disconnect : ()=> this.#isDbgBreak = false,
|
|
1170
1172
|
};
|
|
1171
|
-
c.attach = c.stopOnEntry = c.stopOnStep = c.stopOnStepIn = c.stopOnStepOut = c.stopOnBackstep = c.pause,
|
|
1173
|
+
c.attach = c.stopOnEntry = c.stopOnStep = c.stopOnStepIn = c.stopOnStepOut = c.stopOnBackstep = c.pause, h.addHook((f) => c[f]?.());
|
|
1172
1174
|
}
|
|
1173
1175
|
Ee(`
|
|
1174
1176
|
.sn_hint {
|
|
@@ -1206,33 +1208,33 @@ class Vi {
|
|
|
1206
1208
|
<div class="sn_hint" role="tooltip">
|
|
1207
1209
|
<span>Dummy</span>
|
|
1208
1210
|
<div class="sn_hint_ar" data-popper-arrow></div>
|
|
1209
|
-
</div>`), this.#
|
|
1210
|
-
const f = this.#
|
|
1211
|
+
</div>`), this.#n = document.querySelector(".sn_hint"), this.#h = this.#n.querySelector("span"), this.#d = Hi(this.#v, this.#n), this.#n.hidden = !0, n.stage.interactive = !0, this.#e.add(document.body, G, (c) => this.#l(c)), this.#e.add(document.body, "keyup", () => L.resetFired()), this.#e.add(r.cvs, "contextmenu", (c) => {
|
|
1212
|
+
const f = this.#i(c) + "rightclick";
|
|
1211
1213
|
k.fire(f, c, !0), c.preventDefault();
|
|
1212
1214
|
});
|
|
1213
|
-
const { width:
|
|
1214
|
-
this.#
|
|
1215
|
+
const { width: u, height: p } = t.oCfg.window, y = Math.floor(u > p ? p / 3 : u / 3);
|
|
1216
|
+
this.#o = new _t(r.cvs, {
|
|
1215
1217
|
velocityThreshold: 0,
|
|
1216
1218
|
disregardVelocityThreshold: (c) => Math.floor(y * (c === "x" ? 1 : 0.5))
|
|
1217
1219
|
});
|
|
1218
1220
|
let d = !1;
|
|
1219
|
-
this.#
|
|
1221
|
+
this.#o.on("tap", (c) => {
|
|
1220
1222
|
if (d) return;
|
|
1221
1223
|
if (c instanceof TouchEvent) {
|
|
1222
1224
|
k.fire("click", c, !0), L.resetFired();
|
|
1223
1225
|
return;
|
|
1224
1226
|
}
|
|
1225
1227
|
if (c.button > 1) return;
|
|
1226
|
-
const f = this.#
|
|
1228
|
+
const f = this.#i(c) + `${this.#s.get(c.button) ?? ""}click`;
|
|
1227
1229
|
k.fire(f, c, !0), L.resetFired();
|
|
1228
|
-
}), this.#e.add(window, "pointerup", () => L.resetFired()), this.#e.add(window, "pointerout", () => L.resetFired()), this.#
|
|
1230
|
+
}), this.#e.add(window, "pointerup", () => L.resetFired()), this.#e.add(window, "pointerout", () => L.resetFired()), this.#o.on("longpress", (c) => {
|
|
1229
1231
|
if (d = !0, c instanceof TouchEvent) {
|
|
1230
1232
|
k.fire("longpress", c, !0);
|
|
1231
1233
|
return;
|
|
1232
1234
|
}
|
|
1233
|
-
const f = this.#
|
|
1235
|
+
const f = this.#i(c) + `${this.#s.get(c.button) ?? ""}longpress`;
|
|
1234
1236
|
k.fire(f, c, !0);
|
|
1235
|
-
}), this.#
|
|
1237
|
+
}), this.#o.on("panend", () => {
|
|
1236
1238
|
d && queueMicrotask(() => {
|
|
1237
1239
|
d = !1;
|
|
1238
1240
|
});
|
|
@@ -1242,12 +1244,12 @@ class Vi {
|
|
|
1242
1244
|
"swipeup",
|
|
1243
1245
|
"swipedown"
|
|
1244
1246
|
].forEach((c) => {
|
|
1245
|
-
this.#
|
|
1247
|
+
this.#o.on(c, (f) => {
|
|
1246
1248
|
if (f instanceof TouchEvent) {
|
|
1247
1249
|
k.fire(c, f, !0);
|
|
1248
1250
|
return;
|
|
1249
1251
|
}
|
|
1250
|
-
const b = this.#
|
|
1252
|
+
const b = this.#i(f) + c;
|
|
1251
1253
|
k.fire(b, f, !0);
|
|
1252
1254
|
});
|
|
1253
1255
|
});
|
|
@@ -1263,7 +1265,7 @@ class Vi {
|
|
|
1263
1265
|
});
|
|
1264
1266
|
let w = (c, f) => {
|
|
1265
1267
|
};
|
|
1266
|
-
"WheelEvent" in globalThis && (this.#e.add(r.cvs, "wheel", (c) => this.#f(c), { passive: !0 }), this.#
|
|
1268
|
+
"WheelEvent" in globalThis && (this.#e.add(r.cvs, "wheel", (c) => this.#f(c), { passive: !0 }), this.#a = (c) => this.#e.add(c, "wheel", (f) => this.#f(f), { passive: !0 }), w = (c, f) => c.add(r.cvs, "wheel", (b) => {
|
|
1267
1269
|
b.deltaY <= 0 || (b.stopPropagation(), f());
|
|
1268
1270
|
})), k.init(t, e, r, l, a, s, this, o, w), import("./gamepad.js").then((c) => c.g).then(({ GamepadListener: c }) => {
|
|
1269
1271
|
const f = new c({
|
|
@@ -1291,88 +1293,88 @@ class Vi {
|
|
|
1291
1293
|
const [T = 0, S = 0] = E, M = (S + 1) * 3 + (T + 1), _ = b[M];
|
|
1292
1294
|
if (!_) return;
|
|
1293
1295
|
const O = this.#t.getFocus();
|
|
1294
|
-
(!O || O instanceof
|
|
1296
|
+
(!O || O instanceof ut ? globalThis : O).dispatchEvent(new KeyboardEvent(G, { key: _, bubbles: !0 })), !(!O || O instanceof ut) && (k.cancelAutoSkip(), O.getAttribute("type") === "range" && O.dispatchEvent(new InputEvent("input", { bubbles: !0 })));
|
|
1295
1297
|
}), f.on("gamepad:button", (x) => {
|
|
1296
1298
|
if (document.hasFocus())
|
|
1297
1299
|
if (x.detail.button % 2 === 0) {
|
|
1298
1300
|
k.cancelAutoSkip();
|
|
1299
1301
|
const T = this.#t.getFocus();
|
|
1300
|
-
(!T || T instanceof
|
|
1302
|
+
(!T || T instanceof ut ? document.body : T).dispatchEvent(new KeyboardEvent(G, { key: "Enter", bubbles: !0 }));
|
|
1301
1303
|
} else k.fire("middleclick", x, !0);
|
|
1302
1304
|
}), f.start();
|
|
1303
1305
|
}), this.#e.add(document, "keyup", (c) => {
|
|
1304
|
-
c.isComposing || c.key in this.#
|
|
1306
|
+
c.isComposing || c.key in this.#r && (this.#r[c.key] = 0);
|
|
1305
1307
|
}), l.defTmp(
|
|
1306
1308
|
"const.sn.key.alternate",
|
|
1307
|
-
() => this.#
|
|
1309
|
+
() => this.#r.Alt > 0
|
|
1308
1310
|
/* NO_PUSH */
|
|
1309
1311
|
), l.defTmp(
|
|
1310
1312
|
"const.sn.key.command",
|
|
1311
|
-
() => this.#
|
|
1313
|
+
() => this.#r.Meta > 0
|
|
1312
1314
|
/* NO_PUSH */
|
|
1313
1315
|
), l.defTmp(
|
|
1314
1316
|
"const.sn.key.control",
|
|
1315
|
-
() => this.#
|
|
1317
|
+
() => this.#r.Control > 0
|
|
1316
1318
|
/* NO_PUSH */
|
|
1317
1319
|
), l.defTmp(
|
|
1318
1320
|
"const.sn.key.end",
|
|
1319
|
-
() => this.#
|
|
1321
|
+
() => this.#r.End > 0
|
|
1320
1322
|
/* NO_PUSH */
|
|
1321
1323
|
), l.defTmp(
|
|
1322
1324
|
"const.sn.key.escape",
|
|
1323
|
-
() => this.#
|
|
1325
|
+
() => this.#r.Escape > 0
|
|
1324
1326
|
/* NO_PUSH */
|
|
1325
1327
|
), l.defTmp(
|
|
1326
1328
|
"const.sn.key.back",
|
|
1327
|
-
() => this.#
|
|
1329
|
+
() => this.#r.GoBack > 0
|
|
1328
1330
|
/* NO_PUSH */
|
|
1329
1331
|
);
|
|
1330
1332
|
}
|
|
1331
1333
|
#e = new se();
|
|
1332
1334
|
#t;
|
|
1333
|
-
#
|
|
1334
|
-
#
|
|
1335
|
+
#o;
|
|
1336
|
+
#s = /* @__PURE__ */ new Map([
|
|
1335
1337
|
[0, ""],
|
|
1336
1338
|
[1, "middle"]
|
|
1337
1339
|
// [2, 'right'],
|
|
1338
1340
|
]);
|
|
1339
1341
|
resvFlameEvent(t) {
|
|
1340
|
-
this.#e.add(t, G, (e) => this.#
|
|
1341
|
-
k.fire(this.#
|
|
1342
|
-
}), this.#
|
|
1342
|
+
this.#e.add(t, G, (e) => this.#l(e)), this.#e.add(t, "contextmenu", (e) => {
|
|
1343
|
+
k.fire(this.#i(e) + "rightclick", e, !0), e.preventDefault();
|
|
1344
|
+
}), this.#a(t), this.#e.add(t, Oe, (e) => {
|
|
1343
1345
|
if (e instanceof TouchEvent) {
|
|
1344
1346
|
k.fire("click", e, !0);
|
|
1345
1347
|
return;
|
|
1346
1348
|
}
|
|
1347
1349
|
if (e.button > 1) return;
|
|
1348
|
-
const n = this.#
|
|
1350
|
+
const n = this.#i(e) + `${this.#s.get(e.button) ?? ""}click`;
|
|
1349
1351
|
k.fire(n, e, !0);
|
|
1350
1352
|
}), this.#e.add(t, "pointerup", () => L.resetFired()), this.#e.add(t, "pointerout", () => L.resetFired());
|
|
1351
1353
|
}
|
|
1352
|
-
#
|
|
1354
|
+
#a = (t) => {
|
|
1353
1355
|
};
|
|
1354
|
-
#
|
|
1355
|
-
t.isComposing || (t.key in this.#
|
|
1356
|
+
#l(t) {
|
|
1357
|
+
t.isComposing || (t.key in this.#r && (this.#r[t.key] = t.repeat ? 2 : 1), t.preventDefault(), k.fire(ke.modKey(t) + t.key, t, !0));
|
|
1356
1358
|
}
|
|
1357
|
-
#
|
|
1359
|
+
#i(t) {
|
|
1358
1360
|
return (t.altKey ? "alt+" : "") + (t.ctrlKey ? "ctrl+" : "") + (t.metaKey ? "meta+" : "") + (t.shiftKey ? "shift+" : "");
|
|
1359
1361
|
}
|
|
1360
1362
|
// 縦回転ホイール
|
|
1361
1363
|
#f(t) {
|
|
1362
1364
|
if (this.#c) {
|
|
1363
|
-
this.#
|
|
1365
|
+
this.#u = !0;
|
|
1364
1366
|
return;
|
|
1365
1367
|
}
|
|
1366
1368
|
this.#c = !0, this.#p();
|
|
1367
|
-
const e = this.#
|
|
1369
|
+
const e = this.#i(t) + (t.deltaY > 0 ? "downwheel" : "upwheel");
|
|
1368
1370
|
k.fire(e, t, !0);
|
|
1369
1371
|
}
|
|
1370
1372
|
#c = !1;
|
|
1371
|
-
#
|
|
1373
|
+
#u = !1;
|
|
1372
1374
|
#p() {
|
|
1373
1375
|
setTimeout(() => {
|
|
1374
|
-
if (this.#
|
|
1375
|
-
this.#
|
|
1376
|
+
if (this.#u) {
|
|
1377
|
+
this.#u = !1, this.#p();
|
|
1376
1378
|
return;
|
|
1377
1379
|
}
|
|
1378
1380
|
this.#c = !1;
|
|
@@ -1380,7 +1382,7 @@ class Vi {
|
|
|
1380
1382
|
}
|
|
1381
1383
|
destroy() {
|
|
1382
1384
|
for (const t of Array.from(document.getElementsByClassName("sn_hint"))) t.parentElement?.removeChild(t);
|
|
1383
|
-
this.#
|
|
1385
|
+
this.#o.destroy(), L.destroy(), this.#t.destroy(), this.#e.clear();
|
|
1384
1386
|
}
|
|
1385
1387
|
unButton(t) {
|
|
1386
1388
|
this.#t.remove(t);
|
|
@@ -1392,21 +1394,21 @@ class Vi {
|
|
|
1392
1394
|
p.preventDefault?.(), k.fire(l, p, !0);
|
|
1393
1395
|
});
|
|
1394
1396
|
const a = t.hint ? () => this.#y(t, e) : () => {
|
|
1395
|
-
},
|
|
1396
|
-
n(), this.#
|
|
1397
|
-
},
|
|
1398
|
-
if (e.on("pointerover",
|
|
1399
|
-
this.#t.isFocus(e) ?
|
|
1397
|
+
}, h = () => {
|
|
1398
|
+
n(), this.#n.hidden = !0;
|
|
1399
|
+
}, u = () => (a(), r());
|
|
1400
|
+
if (e.on("pointerover", u), e.on("pointerout", () => {
|
|
1401
|
+
this.#t.isFocus(e) ? u() : h();
|
|
1400
1402
|
}), e.on("pointerdown", () => {
|
|
1401
|
-
this.#
|
|
1403
|
+
this.#n.hidden = !0;
|
|
1402
1404
|
const p = this.#t.getFocus();
|
|
1403
1405
|
s(), p instanceof Jt && p.normal();
|
|
1404
1406
|
}), e.on(
|
|
1405
1407
|
"pointerup",
|
|
1406
|
-
it.isMobile ?
|
|
1407
|
-
this.#t.isFocus(e) ?
|
|
1408
|
+
it.isMobile ? h : () => {
|
|
1409
|
+
this.#t.isFocus(e) ? u() : h();
|
|
1408
1410
|
}
|
|
1409
|
-
), this.#t.add(e,
|
|
1411
|
+
), this.#t.add(e, u, h), t.clickse && (t.clicksebuf ??= "SYS", this.cfg.searchPath(t.clickse, Lt.SOUND), e.on("pointerdown", () => {
|
|
1410
1412
|
this.hTag.playse({ fn: t.clickse, buf: t.clicksebuf, join: !1 });
|
|
1411
1413
|
})), t.enterse && (t.entersebuf ??= "SYS", this.cfg.searchPath(t.enterse, Lt.SOUND), e.on("pointerover", () => {
|
|
1412
1414
|
this.hTag.playse({ fn: t.enterse, buf: t.entersebuf, join: !1 });
|
|
@@ -1424,8 +1426,8 @@ class Vi {
|
|
|
1424
1426
|
#v = {
|
|
1425
1427
|
getBoundingClientRect: (t = 0, e = 0) => DOMRect.fromRect({ x: t, y: e, width: 0, height: 0 })
|
|
1426
1428
|
};
|
|
1427
|
-
#
|
|
1428
|
-
#
|
|
1429
|
+
#n;
|
|
1430
|
+
#h;
|
|
1429
1431
|
#d;
|
|
1430
1432
|
#m = {
|
|
1431
1433
|
placement: "bottom",
|
|
@@ -1446,10 +1448,10 @@ class Vi {
|
|
|
1446
1448
|
n.x += s.x, n.y += s.y;
|
|
1447
1449
|
}
|
|
1448
1450
|
if (!t.hint) {
|
|
1449
|
-
this.#
|
|
1451
|
+
this.#n.hidden = !0;
|
|
1450
1452
|
return;
|
|
1451
1453
|
}
|
|
1452
|
-
this.#
|
|
1454
|
+
this.#n.style.cssText = `position:${this.#n.style.position}; transform:${this.#n.style.transform};` + (t.hint_style ?? ""), this.#h.style.cssText = "", this.#h.textContent = t.hint ?? "", this.#v.getBoundingClientRect = () => DOMRect.fromRect({
|
|
1453
1455
|
x: this.sys.ofsLeft4elm + n.x * this.sys.cvsScale,
|
|
1454
1456
|
y: this.sys.ofsTop4elm + n.y * this.sys.cvsScale,
|
|
1455
1457
|
width: n.width,
|
|
@@ -1458,7 +1460,7 @@ class Vi {
|
|
|
1458
1460
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
1459
1461
|
t.hint_opt ? { ...this.#m, ...JSON.parse(t.hint_opt) } : this.#m
|
|
1460
1462
|
).then(async () => {
|
|
1461
|
-
await this.#d.update(), this.#
|
|
1463
|
+
await this.#d.update(), this.#n.hidden = !1;
|
|
1462
1464
|
}).catch((s) => console.error(Me(
|
|
1463
1465
|
t,
|
|
1464
1466
|
"hint_opt",
|
|
@@ -1466,7 +1468,7 @@ class Vi {
|
|
|
1466
1468
|
)));
|
|
1467
1469
|
}
|
|
1468
1470
|
hideHint() {
|
|
1469
|
-
this.#
|
|
1471
|
+
this.#n.hidden = !0;
|
|
1470
1472
|
}
|
|
1471
1473
|
cvsResize() {
|
|
1472
1474
|
this.hideHint();
|
|
@@ -1481,31 +1483,31 @@ class Vi {
|
|
|
1481
1483
|
}
|
|
1482
1484
|
if (!l && !o && !a) throw "fn,label,url いずれかは必須です";
|
|
1483
1485
|
if (t.fn ??= this.scrItr.scriptFn, e.startsWith("dom=")) {
|
|
1484
|
-
const
|
|
1485
|
-
if (
|
|
1486
|
-
if (J(t, "need_err", !0)) throw `HTML内にセレクタ(${
|
|
1486
|
+
const h = L.getHtmlElmList(e);
|
|
1487
|
+
if (h.el.length === 0) {
|
|
1488
|
+
if (J(t, "need_err", !0)) throw `HTML内にセレクタ(${h.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
|
|
1487
1489
|
return !1;
|
|
1488
1490
|
}
|
|
1489
|
-
let
|
|
1490
|
-
switch (
|
|
1491
|
+
let u = ["click", G];
|
|
1492
|
+
switch (h.el[0].type ?? "") {
|
|
1491
1493
|
// switch (g.el[0].getAttribute('type') ?? '') { textareaで''になる
|
|
1492
1494
|
case "checkbox":
|
|
1493
|
-
|
|
1495
|
+
u = ["input"];
|
|
1494
1496
|
break;
|
|
1495
1497
|
case "range":
|
|
1496
|
-
|
|
1498
|
+
u = ["input"];
|
|
1497
1499
|
break;
|
|
1498
1500
|
case "text":
|
|
1499
1501
|
case "textarea":
|
|
1500
|
-
|
|
1502
|
+
u = ["input", "change"];
|
|
1501
1503
|
break;
|
|
1502
1504
|
}
|
|
1503
|
-
const y =
|
|
1505
|
+
const y = u.length;
|
|
1504
1506
|
for (let d = 0; d < y; ++d) {
|
|
1505
|
-
const m =
|
|
1506
|
-
|
|
1507
|
+
const m = u[d];
|
|
1508
|
+
h.el.forEach((v) => {
|
|
1507
1509
|
this.#e.add(v, m, (g) => {
|
|
1508
|
-
if (!k.isWait || this.layMng.getFrmDisabled(
|
|
1510
|
+
if (!k.isWait || this.layMng.getFrmDisabled(h.id) || m === G && g.key !== "Enter") return;
|
|
1509
1511
|
const w = v.dataset;
|
|
1510
1512
|
for (const [c, f] of Object.entries(w)) this.val.setVal_Nochk("tmp", `sn.event.domdata.${c}`, f);
|
|
1511
1513
|
k.fire(e, g);
|
|
@@ -1563,14 +1565,14 @@ class Vi {
|
|
|
1563
1565
|
}
|
|
1564
1566
|
// キー押しっぱなしスキップ中か
|
|
1565
1567
|
get isSkipping() {
|
|
1566
|
-
return k.isSkipping ? !0 : Object.keys(this.#
|
|
1567
|
-
(t) => this.#
|
|
1568
|
+
return k.isSkipping ? !0 : Object.keys(this.#r).some(
|
|
1569
|
+
(t) => this.#r[t] === 2
|
|
1568
1570
|
/* PUSH_REPEATING */
|
|
1569
1571
|
);
|
|
1570
1572
|
}
|
|
1571
1573
|
// 0:no push 1:one push 2:push repeating
|
|
1572
1574
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
1573
|
-
#
|
|
1575
|
+
#r = {
|
|
1574
1576
|
Alt: 0,
|
|
1575
1577
|
Meta: 0,
|
|
1576
1578
|
// COMMANDキー
|
|
@@ -1586,6 +1588,6 @@ class Vi {
|
|
|
1586
1588
|
};
|
|
1587
1589
|
}
|
|
1588
1590
|
export {
|
|
1589
|
-
|
|
1591
|
+
Fi as EventMng
|
|
1590
1592
|
};
|
|
1591
1593
|
//# sourceMappingURL=EventMng.js.map
|