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