@famibee/skynovel 1.64.22 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/Button.js +131 -163
- package/dist/Button.js.map +1 -1
- package/dist/CallStack.js +19 -22
- package/dist/CallStack.js.map +1 -1
- package/dist/CmnInterface.js +91 -0
- package/dist/CmnInterface.js.map +1 -0
- package/dist/CmnLib.js +94 -0
- package/dist/CmnLib.js.map +1 -0
- package/dist/Config.js +26 -0
- package/dist/Config.js.map +1 -0
- package/dist/ConfigBase.js +152 -0
- package/dist/ConfigBase.js.map +1 -0
- package/dist/DebugMng.js +89 -102
- package/dist/DebugMng.js.map +1 -1
- package/dist/EventListenerCtn.js +21 -0
- package/dist/EventListenerCtn.js.map +1 -0
- package/dist/EventMng.js +1435 -1577
- package/dist/EventMng.js.map +1 -1
- package/dist/Grammar.js +194 -0
- package/dist/Grammar.js.map +1 -0
- package/dist/GrpLayer.js +163 -195
- package/dist/GrpLayer.js.map +1 -1
- package/dist/Layer.js +260 -0
- package/dist/Layer.js.map +1 -0
- package/dist/LayerMng.js +810 -992
- package/dist/LayerMng.js.map +1 -1
- package/dist/Main.js +144 -393
- package/dist/Main.js.map +1 -1
- package/dist/PropParser.js +936 -834
- package/dist/PropParser.js.map +1 -1
- package/dist/Reading.js +918 -786
- package/dist/Reading.js.map +1 -1
- package/dist/RubySpliter.js +59 -89
- package/dist/RubySpliter.js.map +1 -1
- package/dist/ScriptIterator.js +805 -1035
- package/dist/ScriptIterator.js.map +1 -1
- package/dist/SndBuf.js +1097 -1326
- package/dist/SndBuf.js.map +1 -1
- package/dist/SoundMng.js +124 -135
- package/dist/SoundMng.js.map +1 -1
- package/dist/SpritesMng.js +220 -232
- package/dist/SpritesMng.js.map +1 -1
- package/dist/SysBase.js +1729 -0
- package/dist/SysBase.js.map +1 -0
- package/dist/TxtLayer.js +1212 -1398
- package/dist/TxtLayer.js.map +1 -1
- package/dist/Variable.js +398 -466
- package/dist/Variable.js.map +1 -1
- package/dist/chunk.js +18 -0
- package/dist/gamepad.js +723 -511
- package/dist/gamepad.js.map +1 -1
- package/dist/pixi.js +13422 -0
- package/dist/pixi.js.map +1 -0
- package/dist/platform.js +424 -369
- package/dist/platform.js.map +1 -1
- package/dist/sn/AnalyzeTagArg.d.ts +1 -1
- package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
- package/dist/sn/CmnInterface.d.ts +3 -1
- package/dist/sn/CmnInterface.d.ts.map +1 -1
- package/dist/sn/CmnLib.d.ts.map +1 -1
- package/dist/sn/CmnTween.d.ts +7 -7
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/EventMng.d.ts.map +1 -1
- package/dist/sn/FocusMng.d.ts.map +1 -1
- package/dist/sn/Grammar.d.ts +1 -1
- package/dist/sn/Grammar.d.ts.map +1 -1
- package/dist/sn/Log.d.ts.map +1 -1
- package/dist/sn/Main.d.ts.map +1 -1
- package/dist/sn/Pages.d.ts.map +1 -1
- package/dist/sn/PropParser.d.ts +2 -2
- package/dist/sn/PropParser.d.ts.map +1 -1
- package/dist/sn/Reading.d.ts +7 -0
- package/dist/sn/Reading.d.ts.map +1 -1
- package/dist/sn/RubySpliter.d.ts.map +1 -1
- package/dist/sn/ScriptIterator.d.ts.map +1 -1
- package/dist/sn/SndBuf.d.ts +27 -16
- package/dist/sn/SndBuf.d.ts.map +1 -1
- package/dist/sn/SoundMng.d.ts +4 -1
- package/dist/sn/SoundMng.d.ts.map +1 -1
- package/dist/sn/SysBase.d.ts.map +1 -1
- package/dist/sn/TxtStage.d.ts +4 -1
- package/dist/sn/TxtStage.d.ts.map +1 -1
- package/dist/test/ValTest.d.ts +1 -1
- package/dist/test/ValTest.d.ts.map +1 -1
- package/dist/web.js +653 -8
- package/dist/web.js.map +1 -1
- package/dist_app/Button.js +131 -163
- package/dist_app/Button.js.map +1 -1
- package/dist_app/CallStack.js +19 -22
- package/dist_app/CallStack.js.map +1 -1
- package/dist_app/CmnInterface.js +91 -0
- package/dist_app/CmnInterface.js.map +1 -0
- package/dist_app/CmnLib.js +94 -0
- package/dist_app/CmnLib.js.map +1 -0
- package/dist_app/Config.js +26 -0
- package/dist_app/Config.js.map +1 -0
- package/dist_app/ConfigBase.js +152 -0
- package/dist_app/ConfigBase.js.map +1 -0
- package/dist_app/DebugMng.js +92 -0
- package/dist_app/DebugMng.js.map +1 -0
- package/dist_app/EventListenerCtn.js +21 -0
- package/dist_app/EventListenerCtn.js.map +1 -0
- package/dist_app/EventMng.js +1435 -1577
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/Grammar.js +194 -0
- package/dist_app/Grammar.js.map +1 -0
- package/dist_app/GrpLayer.js +163 -195
- package/dist_app/GrpLayer.js.map +1 -1
- package/dist_app/Layer.js +260 -0
- package/dist_app/Layer.js.map +1 -0
- package/dist_app/LayerMng.js +810 -992
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/Main.js +144 -392
- package/dist_app/Main.js.map +1 -1
- package/dist_app/PropParser.js +936 -834
- package/dist_app/PropParser.js.map +1 -1
- package/dist_app/Reading.js +918 -786
- package/dist_app/Reading.js.map +1 -1
- package/dist_app/RubySpliter.js +59 -89
- package/dist_app/RubySpliter.js.map +1 -1
- package/dist_app/ScriptIterator.js +805 -1034
- package/dist_app/ScriptIterator.js.map +1 -1
- package/dist_app/SndBuf.js +1097 -1326
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/SoundMng.js +124 -135
- package/dist_app/SoundMng.js.map +1 -1
- package/dist_app/SpritesMng.js +220 -231
- package/dist_app/SpritesMng.js.map +1 -1
- package/dist_app/SysBase.js +1729 -0
- package/dist_app/SysBase.js.map +1 -0
- package/dist_app/TxtLayer.js +1212 -1397
- package/dist_app/TxtLayer.js.map +1 -1
- package/dist_app/Variable.js +398 -466
- package/dist_app/Variable.js.map +1 -1
- package/dist_app/app.js +211 -8
- package/dist_app/app.js.map +1 -1
- package/dist_app/appMain.js +20 -21
- package/dist_app/appMain.js.map +1 -1
- package/dist_app/chunk.js +18 -0
- package/dist_app/gamepad.js +723 -511
- package/dist_app/gamepad.js.map +1 -1
- package/dist_app/pixi.js +11181 -0
- package/dist_app/pixi.js.map +1 -0
- package/dist_app/platform.js +424 -369
- package/dist_app/platform.js.map +1 -1
- package/dist_app/preload.js +2 -2
- package/dist_app/preload.js.map +1 -1
- package/dist_app/sn/AnalyzeTagArg.d.ts +1 -1
- package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -1
- package/dist_app/sn/CmnInterface.d.ts +3 -1
- package/dist_app/sn/CmnInterface.d.ts.map +1 -1
- package/dist_app/sn/CmnLib.d.ts.map +1 -1
- package/dist_app/sn/CmnTween.d.ts +7 -7
- 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.map +1 -1
- package/dist_app/sn/Grammar.d.ts +1 -1
- package/dist_app/sn/Grammar.d.ts.map +1 -1
- package/dist_app/sn/Log.d.ts.map +1 -1
- package/dist_app/sn/Main.d.ts.map +1 -1
- package/dist_app/sn/Pages.d.ts.map +1 -1
- package/dist_app/sn/PropParser.d.ts +2 -2
- package/dist_app/sn/PropParser.d.ts.map +1 -1
- package/dist_app/sn/Reading.d.ts +7 -0
- package/dist_app/sn/Reading.d.ts.map +1 -1
- package/dist_app/sn/RubySpliter.d.ts.map +1 -1
- package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
- package/dist_app/sn/SndBuf.d.ts +27 -16
- package/dist_app/sn/SndBuf.d.ts.map +1 -1
- package/dist_app/sn/SoundMng.d.ts +4 -1
- package/dist_app/sn/SoundMng.d.ts.map +1 -1
- package/dist_app/sn/SysBase.d.ts.map +1 -1
- package/dist_app/sn/TxtStage.d.ts +4 -1
- package/dist_app/sn/TxtStage.d.ts.map +1 -1
- package/dist_app/test/ValTest.d.ts +1 -1
- package/dist_app/test/ValTest.d.ts.map +1 -1
- package/package.json +24 -14
- package/dist/CmnTween.js +0 -193
- package/dist/CmnTween.js.map +0 -1
- package/dist/web2.js +0 -21644
- package/dist/web2.js.map +0 -1
- package/dist_app/CmnTween.js +0 -193
- package/dist_app/CmnTween.js.map +0 -1
- package/dist_app/app2.js +0 -18547
- package/dist_app/app2.js.map +0 -1
package/dist_app/EventMng.js
CHANGED
|
@@ -1,1593 +1,1451 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
1
|
+
import { r as __toDynamicImportESM } from "./chunk.js";
|
|
2
|
+
import { i as EVNM_KEY, m as mesErrJSON, n as EVNM_BUTTON, o as addStyle, r as EVNM_CLICK, s as argChk_Boolean, t as CmnLib } from "./CmnLib.js";
|
|
3
|
+
import "./CmnInterface.js";
|
|
4
|
+
import { _ as clearTextureCache, m as Container } from "./pixi.js";
|
|
5
|
+
import { t as EventListenerCtn } from "./EventListenerCtn.js";
|
|
6
|
+
import { n as SEARCH_PATH_ARG_EXT } from "./ConfigBase.js";
|
|
7
|
+
import { t as SysBase } from "./SysBase.js";
|
|
8
|
+
import "./DebugMng.js";
|
|
9
|
+
import "./Layer.js";
|
|
10
|
+
import { n as ReadingState, t as Reading } from "./Reading.js";
|
|
11
|
+
import "./SpritesMng.js";
|
|
12
|
+
import { Button } from "./Button.js";
|
|
13
|
+
import { TxtLayer } from "./TxtLayer.js";
|
|
14
|
+
var FocusMng = class {
|
|
15
|
+
#e = [];
|
|
16
|
+
#t = -1;
|
|
17
|
+
#n = new EventListenerCtn();
|
|
18
|
+
constructor(e, t) {
|
|
19
|
+
this.#a = t.isApp ? () => e.focus() : () => globalThis.focus();
|
|
20
|
+
}
|
|
21
|
+
destroy() {
|
|
22
|
+
this.#e = [], this.#t = -1, this.#n.clear();
|
|
23
|
+
}
|
|
24
|
+
add(e, n, r) {
|
|
25
|
+
if (this.#e.findIndex((t) => t.btn === e) >= 0) return;
|
|
26
|
+
if (e instanceof Container) {
|
|
27
|
+
e.on("pointerdown", () => {
|
|
28
|
+
for (let t = this.#e.length - 1; t >= 0; --t) if (this.#e[t].btn === e) {
|
|
29
|
+
this.#t = t;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
this.#t = -1;
|
|
33
|
+
}), this.#e.push({
|
|
34
|
+
btn: e,
|
|
35
|
+
on: n,
|
|
36
|
+
off: r
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.#n.add(e, "focus", () => {
|
|
41
|
+
for (let t = this.#e.length - 1; t >= 0; --t) if (this.#e[t].btn === e) {
|
|
42
|
+
this.#t = t;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.#t = -1;
|
|
46
|
+
});
|
|
47
|
+
let i = (e) => {}, a = e.localName === "button" || e.localName === "a" ? (e) => !e.isTrusted && e.key === "Enter" : (e) => e.key === "Enter", o = e;
|
|
48
|
+
switch (o.type ?? "") {
|
|
49
|
+
case "checkbox":
|
|
50
|
+
i = () => {
|
|
51
|
+
o.checked = !o.checked;
|
|
52
|
+
};
|
|
53
|
+
break;
|
|
54
|
+
case "":
|
|
55
|
+
e.querySelectorAll("input[type]").length > 0 && (i = (t) => this.#r(e, t.key), a = () => !1);
|
|
56
|
+
break;
|
|
57
|
+
case "range":
|
|
58
|
+
i = (e) => {
|
|
59
|
+
e.isTrusted || (e.key === "ArrowUp" ? o.stepUp() : o.stepDown());
|
|
60
|
+
};
|
|
61
|
+
break;
|
|
62
|
+
case "text":
|
|
63
|
+
case "textarea":
|
|
64
|
+
i = (e) => {
|
|
65
|
+
if (e.isTrusted) return;
|
|
66
|
+
let t = (o.selectionStart ?? 0) + (e.key === "ArrowUp" ? -1 : 1);
|
|
67
|
+
t < 0 && (t = 0), o.setSelectionRange(t, t);
|
|
68
|
+
};
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
this.#n.add(e, EVNM_KEY, (t) => {
|
|
72
|
+
if (!(t.key !== "ArrowUp" && t.key !== "ArrowDown" && t.key !== "Enter")) {
|
|
73
|
+
if (t.stopImmediatePropagation(), a(t)) {
|
|
74
|
+
e.dispatchEvent(new MouseEvent("click"));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
i(t);
|
|
78
|
+
}
|
|
79
|
+
}, { passive: !0 }), e.hasAttribute("tabindex") || (e.tabIndex = 0), this.#e.push({
|
|
80
|
+
btn: e,
|
|
81
|
+
on: n,
|
|
82
|
+
off: r
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
remove(e) {
|
|
86
|
+
let t = this.#e.findIndex((t) => t.btn === e);
|
|
87
|
+
t < 0 || (this.#e.splice(t, 1), this.#e.length === 0 ? this.#t = -1 : t <= this.#t && --this.#t);
|
|
88
|
+
}
|
|
89
|
+
#r(e, t) {
|
|
90
|
+
let n = e.querySelectorAll("input[type]"), r = n.length;
|
|
91
|
+
for (let e = 0; e < r; ++e) if (n[e].checked) {
|
|
92
|
+
n[(e + r + (t === "ArrowUp" ? -1 : 1)) % r].checked = !0;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
isFocus(e) {
|
|
97
|
+
return this.#t < 0 ? !1 : this.#e[this.#t].btn === e;
|
|
98
|
+
}
|
|
99
|
+
prev() {
|
|
100
|
+
this.#o();
|
|
101
|
+
let e = this.#e.length;
|
|
102
|
+
if (e !== 0) {
|
|
103
|
+
--this.#t < 0 && (this.#t = e - 1);
|
|
104
|
+
for (let t = e; t >= 1; --t) {
|
|
105
|
+
let n = (this.#t + t) % e;
|
|
106
|
+
if (this.#e[n].on()) {
|
|
107
|
+
this.#t = n, this.#i(n);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
this.#t = -1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
next() {
|
|
115
|
+
this.#o();
|
|
116
|
+
let e = this.#e.length;
|
|
117
|
+
if (e !== 0) {
|
|
118
|
+
++this.#t >= e && (this.#t = 0);
|
|
119
|
+
for (let t = 0; t < e; ++t) {
|
|
120
|
+
let n = (this.#t + t) % e;
|
|
121
|
+
if (this.#e[n].on()) {
|
|
122
|
+
this.#t = n, this.#i(n);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
this.#t = -1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
#i = CmnLib.debugLog ? (e) => console.log(`👾 <FocusMng idx:${String(e)} btn:%o`, this.#e[e].btn) : () => {};
|
|
130
|
+
getFocus() {
|
|
131
|
+
if (this.#t < 0) return null;
|
|
132
|
+
this.#o(), this.#t >= this.#e.length && (this.#t = 0);
|
|
133
|
+
let e = this.#e[this.#t];
|
|
134
|
+
return e.on() ? e.btn : null;
|
|
135
|
+
}
|
|
136
|
+
blur() {
|
|
137
|
+
this.#o(), this.#t = -1, this.#a();
|
|
138
|
+
}
|
|
139
|
+
#a = () => {};
|
|
140
|
+
#o() {
|
|
141
|
+
for (let e = this.#e.length - 1; e >= 0; --e) {
|
|
142
|
+
let t = this.#e[e];
|
|
143
|
+
!(t.btn instanceof Container) || t.btn.parent ? t.off() : this.#e.splice(e, 1);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [
|
|
147
|
+
"top",
|
|
148
|
+
bottom,
|
|
149
|
+
right,
|
|
150
|
+
left
|
|
151
|
+
], start = "start", clippingParents = "clippingParents", viewport = "viewport", popper = "popper", reference = "reference", variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(e, t) {
|
|
152
|
+
return e.concat([t + "-" + start, t + "-end"]);
|
|
153
|
+
}, []), placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(e, t) {
|
|
154
|
+
return e.concat([
|
|
155
|
+
t,
|
|
156
|
+
t + "-" + start,
|
|
157
|
+
t + "-end"
|
|
158
|
+
]);
|
|
159
|
+
}, []), modifierPhases = [
|
|
160
|
+
"beforeRead",
|
|
161
|
+
"read",
|
|
162
|
+
"afterRead",
|
|
163
|
+
"beforeMain",
|
|
164
|
+
"main",
|
|
165
|
+
"afterMain",
|
|
166
|
+
"beforeWrite",
|
|
167
|
+
"write",
|
|
168
|
+
"afterWrite"
|
|
169
|
+
];
|
|
170
|
+
function getNodeName(e) {
|
|
171
|
+
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
172
|
+
}
|
|
173
|
+
function getWindow(e) {
|
|
174
|
+
if (e == null) return window;
|
|
175
|
+
if (e.toString() !== "[object Window]") {
|
|
176
|
+
var t = e.ownerDocument;
|
|
177
|
+
return t && t.defaultView || window;
|
|
178
|
+
}
|
|
179
|
+
return e;
|
|
180
|
+
}
|
|
181
|
+
function isElement(e) {
|
|
182
|
+
return e instanceof getWindow(e).Element || e instanceof Element;
|
|
183
|
+
}
|
|
184
|
+
function isHTMLElement(e) {
|
|
185
|
+
return e instanceof getWindow(e).HTMLElement || e instanceof HTMLElement;
|
|
186
|
+
}
|
|
187
|
+
function isShadowRoot(e) {
|
|
188
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof getWindow(e).ShadowRoot || e instanceof ShadowRoot;
|
|
189
|
+
}
|
|
190
|
+
function applyStyles(e) {
|
|
191
|
+
var t = e.state;
|
|
192
|
+
Object.keys(t.elements).forEach(function(e) {
|
|
193
|
+
var n = t.styles[e] || {}, r = t.attributes[e] || {}, i = t.elements[e];
|
|
194
|
+
!isHTMLElement(i) || !getNodeName(i) || (Object.assign(i.style, n), Object.keys(r).forEach(function(e) {
|
|
195
|
+
var t = r[e];
|
|
196
|
+
t === !1 ? i.removeAttribute(e) : i.setAttribute(e, t === !0 ? "" : t);
|
|
197
|
+
}));
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
function effect$2(e) {
|
|
201
|
+
var t = e.state, n = {
|
|
202
|
+
popper: {
|
|
203
|
+
position: t.options.strategy,
|
|
204
|
+
left: "0",
|
|
205
|
+
top: "0",
|
|
206
|
+
margin: "0"
|
|
207
|
+
},
|
|
208
|
+
arrow: { position: "absolute" },
|
|
209
|
+
reference: {}
|
|
210
|
+
};
|
|
211
|
+
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
|
|
212
|
+
Object.keys(t.elements).forEach(function(e) {
|
|
213
|
+
var r = t.elements[e], i = t.attributes[e] || {}, a = Object.keys(t.styles.hasOwnProperty(e) ? t.styles[e] : n[e]).reduce(function(e, t) {
|
|
214
|
+
return e[t] = "", e;
|
|
215
|
+
}, {});
|
|
216
|
+
!isHTMLElement(r) || !getNodeName(r) || (Object.assign(r.style, a), Object.keys(i).forEach(function(e) {
|
|
217
|
+
r.removeAttribute(e);
|
|
218
|
+
}));
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
var applyStyles_default = {
|
|
223
|
+
name: "applyStyles",
|
|
224
|
+
enabled: !0,
|
|
225
|
+
phase: "write",
|
|
226
|
+
fn: applyStyles,
|
|
227
|
+
effect: effect$2,
|
|
228
|
+
requires: ["computeStyles"]
|
|
210
229
|
};
|
|
211
|
-
function
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
var
|
|
215
|
-
function
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
function
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
function
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
function
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
function
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
function
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
function
|
|
323
|
-
return {
|
|
324
|
-
top: 0,
|
|
325
|
-
right: 0,
|
|
326
|
-
bottom: 0,
|
|
327
|
-
left: 0
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
function de(i) {
|
|
331
|
-
return Object.assign({}, he(), i);
|
|
332
|
-
}
|
|
333
|
-
function fe(i, t) {
|
|
334
|
-
return t.reduce(function(e, n) {
|
|
335
|
-
return e[n] = i, e;
|
|
336
|
-
}, {});
|
|
337
|
-
}
|
|
338
|
-
var Ue = function(t, e) {
|
|
339
|
-
return t = typeof t == "function" ? t(Object.assign({}, e.rects, {
|
|
340
|
-
placement: e.placement
|
|
341
|
-
})) : t, de(typeof t != "number" ? t : fe(t, vt));
|
|
230
|
+
function getBasePlacement(e) {
|
|
231
|
+
return e.split("-")[0];
|
|
232
|
+
}
|
|
233
|
+
var max = Math.max, min = Math.min, round = Math.round;
|
|
234
|
+
function getUAString() {
|
|
235
|
+
var e = navigator.userAgentData;
|
|
236
|
+
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(e) {
|
|
237
|
+
return e.brand + "/" + e.version;
|
|
238
|
+
}).join(" ") : navigator.userAgent;
|
|
239
|
+
}
|
|
240
|
+
function isLayoutViewport() {
|
|
241
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
|
242
|
+
}
|
|
243
|
+
function getBoundingClientRect(e, t, n) {
|
|
244
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
245
|
+
var r = e.getBoundingClientRect(), i = 1, a = 1;
|
|
246
|
+
t && isHTMLElement(e) && (i = e.offsetWidth > 0 && round(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && round(r.height) / e.offsetHeight || 1);
|
|
247
|
+
var o = (isElement(e) ? getWindow(e) : window).visualViewport, s = !isLayoutViewport() && n, c = (r.left + (s && o ? o.offsetLeft : 0)) / i, l = (r.top + (s && o ? o.offsetTop : 0)) / a, u = r.width / i, d = r.height / a;
|
|
248
|
+
return {
|
|
249
|
+
width: u,
|
|
250
|
+
height: d,
|
|
251
|
+
top: l,
|
|
252
|
+
right: c + u,
|
|
253
|
+
bottom: l + d,
|
|
254
|
+
left: c,
|
|
255
|
+
x: c,
|
|
256
|
+
y: l
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function getLayoutRect(e) {
|
|
260
|
+
var t = getBoundingClientRect(e), n = e.offsetWidth, r = e.offsetHeight;
|
|
261
|
+
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
|
|
262
|
+
x: e.offsetLeft,
|
|
263
|
+
y: e.offsetTop,
|
|
264
|
+
width: n,
|
|
265
|
+
height: r
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function contains(e, t) {
|
|
269
|
+
var n = t.getRootNode && t.getRootNode();
|
|
270
|
+
if (e.contains(t)) return !0;
|
|
271
|
+
if (n && isShadowRoot(n)) {
|
|
272
|
+
var r = t;
|
|
273
|
+
do {
|
|
274
|
+
if (r && e.isSameNode(r)) return !0;
|
|
275
|
+
r = r.parentNode || r.host;
|
|
276
|
+
} while (r);
|
|
277
|
+
}
|
|
278
|
+
return !1;
|
|
279
|
+
}
|
|
280
|
+
function getComputedStyle$1(e) {
|
|
281
|
+
return getWindow(e).getComputedStyle(e);
|
|
282
|
+
}
|
|
283
|
+
function isTableElement(e) {
|
|
284
|
+
return [
|
|
285
|
+
"table",
|
|
286
|
+
"td",
|
|
287
|
+
"th"
|
|
288
|
+
].indexOf(getNodeName(e)) >= 0;
|
|
289
|
+
}
|
|
290
|
+
function getDocumentElement(e) {
|
|
291
|
+
return ((isElement(e) ? e.ownerDocument : e.document) || window.document).documentElement;
|
|
292
|
+
}
|
|
293
|
+
function getParentNode(e) {
|
|
294
|
+
return getNodeName(e) === "html" ? e : e.assignedSlot || e.parentNode || (isShadowRoot(e) ? e.host : null) || getDocumentElement(e);
|
|
295
|
+
}
|
|
296
|
+
function getTrueOffsetParent(e) {
|
|
297
|
+
return !isHTMLElement(e) || getComputedStyle$1(e).position === "fixed" ? null : e.offsetParent;
|
|
298
|
+
}
|
|
299
|
+
function getContainingBlock(e) {
|
|
300
|
+
var t = /firefox/i.test(getUAString());
|
|
301
|
+
if (/Trident/i.test(getUAString()) && isHTMLElement(e) && getComputedStyle$1(e).position === "fixed") return null;
|
|
302
|
+
var n = getParentNode(e);
|
|
303
|
+
for (isShadowRoot(n) && (n = n.host); isHTMLElement(n) && ["html", "body"].indexOf(getNodeName(n)) < 0;) {
|
|
304
|
+
var r = getComputedStyle$1(n);
|
|
305
|
+
if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || t && r.willChange === "filter" || t && r.filter && r.filter !== "none") return n;
|
|
306
|
+
n = n.parentNode;
|
|
307
|
+
}
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
function getOffsetParent(e) {
|
|
311
|
+
for (var t = getWindow(e), n = getTrueOffsetParent(e); n && isTableElement(n) && getComputedStyle$1(n).position === "static";) n = getTrueOffsetParent(n);
|
|
312
|
+
return n && (getNodeName(n) === "html" || getNodeName(n) === "body" && getComputedStyle$1(n).position === "static") ? t : n || getContainingBlock(e) || t;
|
|
313
|
+
}
|
|
314
|
+
function getMainAxisFromPlacement(e) {
|
|
315
|
+
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
316
|
+
}
|
|
317
|
+
function within(e, t, n) {
|
|
318
|
+
return max(e, min(t, n));
|
|
319
|
+
}
|
|
320
|
+
function withinMaxClamp(e, t, n) {
|
|
321
|
+
var r = within(e, t, n);
|
|
322
|
+
return r > n ? n : r;
|
|
323
|
+
}
|
|
324
|
+
function getFreshSideObject() {
|
|
325
|
+
return {
|
|
326
|
+
top: 0,
|
|
327
|
+
right: 0,
|
|
328
|
+
bottom: 0,
|
|
329
|
+
left: 0
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function mergePaddingObject(e) {
|
|
333
|
+
return Object.assign({}, getFreshSideObject(), e);
|
|
334
|
+
}
|
|
335
|
+
function expandToHashMap(e, t) {
|
|
336
|
+
return t.reduce(function(t, n) {
|
|
337
|
+
return t[n] = e, t;
|
|
338
|
+
}, {});
|
|
339
|
+
}
|
|
340
|
+
var toPaddingObject = function(e, t) {
|
|
341
|
+
return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, mergePaddingObject(typeof e == "number" ? expandToHashMap(e, basePlacements) : e);
|
|
342
342
|
};
|
|
343
|
-
function
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
function
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
343
|
+
function arrow(e) {
|
|
344
|
+
var t, n = e.state, r = e.name, i = e.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = getBasePlacement(n.placement), c = getMainAxisFromPlacement(s), l = ["left", "right"].indexOf(s) >= 0 ? "height" : "width";
|
|
345
|
+
if (!(!a || !o)) {
|
|
346
|
+
var u = toPaddingObject(i.padding, n), d = getLayoutRect(a), f = c === "y" ? "top" : left, p = c === "y" ? bottom : right, m = n.rects.reference[l] + n.rects.reference[c] - o[c] - n.rects.popper[l], h = o[c] - n.rects.reference[c], g = getOffsetParent(a), _ = g ? c === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = m / 2 - h / 2, S = u[f], C = _ - d[l] - u[p], w = _ / 2 - d[l] / 2 + x, T = within(S, w, C), E = c;
|
|
347
|
+
n.modifiersData[r] = (t = {}, t[E] = T, t.centerOffset = T - w, t);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function effect$1(e) {
|
|
351
|
+
var t = e.state, n = e.options.element, r = n === void 0 ? "[data-popper-arrow]" : n;
|
|
352
|
+
r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || contains(t.elements.popper, r) && (t.elements.arrow = r));
|
|
353
|
+
}
|
|
354
|
+
var arrow_default = {
|
|
355
|
+
name: "arrow",
|
|
356
|
+
enabled: !0,
|
|
357
|
+
phase: "main",
|
|
358
|
+
fn: arrow,
|
|
359
|
+
effect: effect$1,
|
|
360
|
+
requires: ["popperOffsets"],
|
|
361
|
+
requiresIfExists: ["preventOverflow"]
|
|
362
362
|
};
|
|
363
|
-
function
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
var
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
363
|
+
function getVariation(e) {
|
|
364
|
+
return e.split("-")[1];
|
|
365
|
+
}
|
|
366
|
+
var unsetSides = {
|
|
367
|
+
top: "auto",
|
|
368
|
+
right: "auto",
|
|
369
|
+
bottom: "auto",
|
|
370
|
+
left: "auto"
|
|
371
371
|
};
|
|
372
|
-
function
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
function
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
372
|
+
function roundOffsetsByDPR(e, t) {
|
|
373
|
+
var n = e.x, r = e.y, i = t.devicePixelRatio || 1;
|
|
374
|
+
return {
|
|
375
|
+
x: round(n * i) / i || 0,
|
|
376
|
+
y: round(r * i) / i || 0
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function mapToStyles(e) {
|
|
380
|
+
var t, n = e.popper, r = e.popperRect, i = e.placement, a = e.variation, o = e.offsets, s = e.position, c = e.gpuAcceleration, l = e.adaptive, u = e.roundOffsets, d = e.isFixed, f = o.x, p = f === void 0 ? 0 : f, m = o.y, h = m === void 0 ? 0 : m, g = typeof u == "function" ? u({
|
|
381
|
+
x: p,
|
|
382
|
+
y: h
|
|
383
|
+
}) : {
|
|
384
|
+
x: p,
|
|
385
|
+
y: h
|
|
386
|
+
};
|
|
387
|
+
p = g.x, h = g.y;
|
|
388
|
+
var _ = o.hasOwnProperty("x"), x = o.hasOwnProperty("y"), S = left, C = "top", w = window;
|
|
389
|
+
if (l) {
|
|
390
|
+
var T = getOffsetParent(n), E = "clientHeight", D = "clientWidth";
|
|
391
|
+
if (T === getWindow(n) && (T = getDocumentElement(n), getComputedStyle$1(T).position !== "static" && s === "absolute" && (E = "scrollHeight", D = "scrollWidth")), T = T, i === "top" || (i === "left" || i === "right") && a === "end") {
|
|
392
|
+
C = bottom;
|
|
393
|
+
var O = d && T === w && w.visualViewport ? w.visualViewport.height : T[E];
|
|
394
|
+
h -= O - r.height, h *= c ? 1 : -1;
|
|
395
|
+
}
|
|
396
|
+
if (i === "left" || (i === "top" || i === "bottom") && a === "end") {
|
|
397
|
+
S = right;
|
|
398
|
+
var k = d && T === w && w.visualViewport ? w.visualViewport.width : T[D];
|
|
399
|
+
p -= k - r.width, p *= c ? 1 : -1;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
var A = Object.assign({ position: s }, l && unsetSides), j = u === !0 ? roundOffsetsByDPR({
|
|
403
|
+
x: p,
|
|
404
|
+
y: h
|
|
405
|
+
}, getWindow(n)) : {
|
|
406
|
+
x: p,
|
|
407
|
+
y: h
|
|
408
|
+
};
|
|
409
|
+
if (p = j.x, h = j.y, c) {
|
|
410
|
+
var N;
|
|
411
|
+
return Object.assign({}, A, (N = {}, N[C] = x ? "0" : "", N[S] = _ ? "0" : "", N.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + h + "px)" : "translate3d(" + p + "px, " + h + "px, 0)", N));
|
|
412
|
+
}
|
|
413
|
+
return Object.assign({}, A, (t = {}, t[C] = x ? h + "px" : "", t[S] = _ ? p + "px" : "", t.transform = "", t));
|
|
414
|
+
}
|
|
415
|
+
function computeStyles(e) {
|
|
416
|
+
var t = e.state, n = e.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, o = a === void 0 ? !0 : a, s = n.roundOffsets, c = s === void 0 ? !0 : s, l = {
|
|
417
|
+
placement: getBasePlacement(t.placement),
|
|
418
|
+
variation: getVariation(t.placement),
|
|
419
|
+
popper: t.elements.popper,
|
|
420
|
+
popperRect: t.rects.popper,
|
|
421
|
+
gpuAcceleration: i,
|
|
422
|
+
isFixed: t.options.strategy === "fixed"
|
|
423
|
+
};
|
|
424
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, mapToStyles(Object.assign({}, l, {
|
|
425
|
+
offsets: t.modifiersData.popperOffsets,
|
|
426
|
+
position: t.options.strategy,
|
|
427
|
+
adaptive: o,
|
|
428
|
+
roundOffsets: c
|
|
429
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, mapToStyles(Object.assign({}, l, {
|
|
430
|
+
offsets: t.modifiersData.arrow,
|
|
431
|
+
position: "absolute",
|
|
432
|
+
adaptive: !1,
|
|
433
|
+
roundOffsets: c
|
|
434
|
+
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
|
|
435
|
+
}
|
|
436
|
+
var computeStyles_default = {
|
|
437
|
+
name: "computeStyles",
|
|
438
|
+
enabled: !0,
|
|
439
|
+
phase: "beforeWrite",
|
|
440
|
+
fn: computeStyles,
|
|
441
|
+
data: {}
|
|
442
|
+
}, passive = { passive: !0 };
|
|
443
|
+
function effect(e) {
|
|
444
|
+
var t = e.state, n = e.instance, r = e.options, i = r.scroll, a = i === void 0 ? !0 : i, o = r.resize, s = o === void 0 ? !0 : o, c = getWindow(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
445
|
+
return a && l.forEach(function(e) {
|
|
446
|
+
e.addEventListener("scroll", n.update, passive);
|
|
447
|
+
}), s && c.addEventListener("resize", n.update, passive), function() {
|
|
448
|
+
a && l.forEach(function(e) {
|
|
449
|
+
e.removeEventListener("scroll", n.update, passive);
|
|
450
|
+
}), s && c.removeEventListener("resize", n.update, passive);
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
var eventListeners_default = {
|
|
454
|
+
name: "eventListeners",
|
|
455
|
+
enabled: !0,
|
|
456
|
+
phase: "write",
|
|
457
|
+
fn: function() {},
|
|
458
|
+
effect,
|
|
459
|
+
data: {}
|
|
460
|
+
}, hash$1 = {
|
|
461
|
+
left: "right",
|
|
462
|
+
right: "left",
|
|
463
|
+
bottom: "top",
|
|
464
|
+
top: "bottom"
|
|
452
465
|
};
|
|
453
|
-
|
|
454
|
-
|
|
466
|
+
function getOppositePlacement(e) {
|
|
467
|
+
return e.replace(/left|right|bottom|top/g, function(e) {
|
|
468
|
+
return hash$1[e];
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
var hash = {
|
|
472
|
+
start: "end",
|
|
473
|
+
end: "start"
|
|
455
474
|
};
|
|
456
|
-
function
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
475
|
+
function getOppositeVariationPlacement(e) {
|
|
476
|
+
return e.replace(/start|end/g, function(e) {
|
|
477
|
+
return hash[e];
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
function getWindowScroll(e) {
|
|
481
|
+
var t = getWindow(e);
|
|
482
|
+
return {
|
|
483
|
+
scrollLeft: t.pageXOffset,
|
|
484
|
+
scrollTop: t.pageYOffset
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
function getWindowScrollBarX(e) {
|
|
488
|
+
return getBoundingClientRect(getDocumentElement(e)).left + getWindowScroll(e).scrollLeft;
|
|
489
|
+
}
|
|
490
|
+
function getViewportRect(e, t) {
|
|
491
|
+
var n = getWindow(e), r = getDocumentElement(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
492
|
+
if (i) {
|
|
493
|
+
a = i.width, o = i.height;
|
|
494
|
+
var l = isLayoutViewport();
|
|
495
|
+
(l || !l && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
width: a,
|
|
499
|
+
height: o,
|
|
500
|
+
x: s + getWindowScrollBarX(e),
|
|
501
|
+
y: c
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function getDocumentRect(e) {
|
|
505
|
+
var t = getDocumentElement(e), n = getWindowScroll(e), r = e.ownerDocument?.body, i = max(t.scrollWidth, t.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), a = max(t.scrollHeight, t.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), o = -n.scrollLeft + getWindowScrollBarX(e), s = -n.scrollTop;
|
|
506
|
+
return getComputedStyle$1(r || t).direction === "rtl" && (o += max(t.clientWidth, r ? r.clientWidth : 0) - i), {
|
|
507
|
+
width: i,
|
|
508
|
+
height: a,
|
|
509
|
+
x: o,
|
|
510
|
+
y: s
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
function isScrollParent(e) {
|
|
514
|
+
var t = getComputedStyle$1(e), n = t.overflow, r = t.overflowX, i = t.overflowY;
|
|
515
|
+
return /auto|scroll|overlay|hidden/.test(n + i + r);
|
|
516
|
+
}
|
|
517
|
+
function getScrollParent(e) {
|
|
518
|
+
return [
|
|
519
|
+
"html",
|
|
520
|
+
"body",
|
|
521
|
+
"#document"
|
|
522
|
+
].indexOf(getNodeName(e)) >= 0 ? e.ownerDocument.body : isHTMLElement(e) && isScrollParent(e) ? e : getScrollParent(getParentNode(e));
|
|
523
|
+
}
|
|
524
|
+
function listScrollParents(e, t) {
|
|
525
|
+
t === void 0 && (t = []);
|
|
526
|
+
var n = getScrollParent(e), r = n === e.ownerDocument?.body, i = getWindow(n), a = r ? [i].concat(i.visualViewport || [], isScrollParent(n) ? n : []) : n, o = t.concat(a);
|
|
527
|
+
return r ? o : o.concat(listScrollParents(getParentNode(a)));
|
|
528
|
+
}
|
|
529
|
+
function rectToClientRect(e) {
|
|
530
|
+
return Object.assign({}, e, {
|
|
531
|
+
left: e.x,
|
|
532
|
+
top: e.y,
|
|
533
|
+
right: e.x + e.width,
|
|
534
|
+
bottom: e.y + e.height
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
function getInnerBoundingClientRect(e, t) {
|
|
538
|
+
var n = getBoundingClientRect(e, !1, t === "fixed");
|
|
539
|
+
return n.top += e.clientTop, n.left += e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
540
|
+
}
|
|
541
|
+
function getClientRectFromMixedType(e, t, n) {
|
|
542
|
+
return t === "viewport" ? rectToClientRect(getViewportRect(e, n)) : isElement(t) ? getInnerBoundingClientRect(t, n) : rectToClientRect(getDocumentRect(getDocumentElement(e)));
|
|
543
|
+
}
|
|
544
|
+
function getClippingParents(e) {
|
|
545
|
+
var t = listScrollParents(getParentNode(e)), n = ["absolute", "fixed"].indexOf(getComputedStyle$1(e).position) >= 0 && isHTMLElement(e) ? getOffsetParent(e) : e;
|
|
546
|
+
return isElement(n) ? t.filter(function(e) {
|
|
547
|
+
return isElement(e) && contains(e, n) && getNodeName(e) !== "body";
|
|
548
|
+
}) : [];
|
|
549
|
+
}
|
|
550
|
+
function getClippingRect(e, t, n, r) {
|
|
551
|
+
var i = t === "clippingParents" ? getClippingParents(e) : [].concat(t), a = [].concat(i, [n]), o = a[0], s = a.reduce(function(t, n) {
|
|
552
|
+
var i = getClientRectFromMixedType(e, n, r);
|
|
553
|
+
return t.top = max(i.top, t.top), t.right = min(i.right, t.right), t.bottom = min(i.bottom, t.bottom), t.left = max(i.left, t.left), t;
|
|
554
|
+
}, getClientRectFromMixedType(e, o, r));
|
|
555
|
+
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
556
|
+
}
|
|
557
|
+
function computeOffsets(e) {
|
|
558
|
+
var t = e.reference, n = e.element, r = e.placement, i = r ? getBasePlacement(r) : null, a = r ? getVariation(r) : null, o = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, c;
|
|
559
|
+
switch (i) {
|
|
560
|
+
case "top":
|
|
561
|
+
c = {
|
|
562
|
+
x: o,
|
|
563
|
+
y: t.y - n.height
|
|
564
|
+
};
|
|
565
|
+
break;
|
|
566
|
+
case bottom:
|
|
567
|
+
c = {
|
|
568
|
+
x: o,
|
|
569
|
+
y: t.y + t.height
|
|
570
|
+
};
|
|
571
|
+
break;
|
|
572
|
+
case right:
|
|
573
|
+
c = {
|
|
574
|
+
x: t.x + t.width,
|
|
575
|
+
y: s
|
|
576
|
+
};
|
|
577
|
+
break;
|
|
578
|
+
case left:
|
|
579
|
+
c = {
|
|
580
|
+
x: t.x - n.width,
|
|
581
|
+
y: s
|
|
582
|
+
};
|
|
583
|
+
break;
|
|
584
|
+
default: c = {
|
|
585
|
+
x: t.x,
|
|
586
|
+
y: t.y
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
var l = i ? getMainAxisFromPlacement(i) : null;
|
|
590
|
+
if (l != null) {
|
|
591
|
+
var u = l === "y" ? "height" : "width";
|
|
592
|
+
switch (a) {
|
|
593
|
+
case start:
|
|
594
|
+
c[l] = c[l] - (t[u] / 2 - n[u] / 2);
|
|
595
|
+
break;
|
|
596
|
+
case "end":
|
|
597
|
+
c[l] = c[l] + (t[u] / 2 - n[u] / 2);
|
|
598
|
+
break;
|
|
599
|
+
default:
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
return c;
|
|
603
|
+
}
|
|
604
|
+
function detectOverflow(e, t) {
|
|
605
|
+
t === void 0 && (t = {});
|
|
606
|
+
var n = t, r = n.placement, i = r === void 0 ? e.placement : r, a = n.strategy, o = a === void 0 ? e.strategy : a, s = n.boundary, c = s === void 0 ? clippingParents : s, l = n.rootBoundary, u = l === void 0 ? viewport : l, d = n.elementContext, f = d === void 0 ? popper : d, p = n.altBoundary, m = p === void 0 ? !1 : p, h = n.padding, g = h === void 0 ? 0 : h, _ = mergePaddingObject(typeof g == "number" ? expandToHashMap(g, basePlacements) : g), v = f === "popper" ? reference : popper, y = e.rects.popper, b = e.elements[m ? v : f], x = getClippingRect(isElement(b) ? b : b.contextElement || getDocumentElement(e.elements.popper), c, u, o), C = getBoundingClientRect(e.elements.reference), O = computeOffsets({
|
|
607
|
+
reference: C,
|
|
608
|
+
element: y,
|
|
609
|
+
strategy: "absolute",
|
|
610
|
+
placement: i
|
|
611
|
+
}), k = rectToClientRect(Object.assign({}, y, O)), A = f === "popper" ? k : C, j = {
|
|
612
|
+
top: x.top - A.top + _.top,
|
|
613
|
+
bottom: A.bottom - x.bottom + _.bottom,
|
|
614
|
+
left: x.left - A.left + _.left,
|
|
615
|
+
right: A.right - x.right + _.right
|
|
616
|
+
}, M = e.modifiersData.offset;
|
|
617
|
+
if (f === "popper" && M) {
|
|
618
|
+
var P = M[i];
|
|
619
|
+
Object.keys(j).forEach(function(e) {
|
|
620
|
+
var t = ["right", "bottom"].indexOf(e) >= 0 ? 1 : -1, n = ["top", "bottom"].indexOf(e) >= 0 ? "y" : "x";
|
|
621
|
+
j[e] += P[n] * t;
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
return j;
|
|
625
|
+
}
|
|
626
|
+
function computeAutoPlacement(e, t) {
|
|
627
|
+
t === void 0 && (t = {});
|
|
628
|
+
var n = t, r = n.placement, i = n.boundary, a = n.rootBoundary, o = n.padding, s = n.flipVariations, c = n.allowedAutoPlacements, l = c === void 0 ? placements : c, u = getVariation(r), d = u ? s ? variationPlacements : variationPlacements.filter(function(e) {
|
|
629
|
+
return getVariation(e) === u;
|
|
630
|
+
}) : basePlacements, f = d.filter(function(e) {
|
|
631
|
+
return l.indexOf(e) >= 0;
|
|
632
|
+
});
|
|
633
|
+
f.length === 0 && (f = d);
|
|
634
|
+
var p = f.reduce(function(t, n) {
|
|
635
|
+
return t[n] = detectOverflow(e, {
|
|
636
|
+
placement: n,
|
|
637
|
+
boundary: i,
|
|
638
|
+
rootBoundary: a,
|
|
639
|
+
padding: o
|
|
640
|
+
})[getBasePlacement(n)], t;
|
|
641
|
+
}, {});
|
|
642
|
+
return Object.keys(p).sort(function(e, t) {
|
|
643
|
+
return p[e] - p[t];
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
function getExpandedFallbackPlacements(e) {
|
|
647
|
+
if (getBasePlacement(e) === "auto") return [];
|
|
648
|
+
var t = getOppositePlacement(e);
|
|
649
|
+
return [
|
|
650
|
+
getOppositeVariationPlacement(e),
|
|
651
|
+
t,
|
|
652
|
+
getOppositeVariationPlacement(t)
|
|
653
|
+
];
|
|
654
|
+
}
|
|
655
|
+
function flip(e) {
|
|
656
|
+
var t = e.state, n = e.options, r = e.name;
|
|
657
|
+
if (!t.modifiersData[r]._skip) {
|
|
658
|
+
for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, c = n.fallbackPlacements, l = n.padding, u = n.boundary, d = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, m = p === void 0 ? !0 : p, h = n.allowedAutoPlacements, g = t.options.placement, _ = getBasePlacement(g) === g, x = c || (_ || !m ? [getOppositePlacement(g)] : getExpandedFallbackPlacements(g)), S = [g].concat(x).reduce(function(e, n) {
|
|
659
|
+
return e.concat(getBasePlacement(n) === "auto" ? computeAutoPlacement(t, {
|
|
660
|
+
placement: n,
|
|
661
|
+
boundary: u,
|
|
662
|
+
rootBoundary: d,
|
|
663
|
+
padding: l,
|
|
664
|
+
flipVariations: m,
|
|
665
|
+
allowedAutoPlacements: h
|
|
666
|
+
}) : n);
|
|
667
|
+
}, []), w = t.rects.reference, T = t.rects.popper, E = /* @__PURE__ */ new Map(), D = !0, O = S[0], k = 0; k < S.length; k++) {
|
|
668
|
+
var A = S[k], j = getBasePlacement(A), M = getVariation(A) === start, N = ["top", bottom].indexOf(j) >= 0, P = N ? "width" : "height", F = detectOverflow(t, {
|
|
669
|
+
placement: A,
|
|
670
|
+
boundary: u,
|
|
671
|
+
rootBoundary: d,
|
|
672
|
+
altBoundary: f,
|
|
673
|
+
padding: l
|
|
674
|
+
}), I = N ? M ? right : left : M ? bottom : "top";
|
|
675
|
+
w[P] > T[P] && (I = getOppositePlacement(I));
|
|
676
|
+
var L = getOppositePlacement(I), R = [];
|
|
677
|
+
if (a && R.push(F[j] <= 0), s && R.push(F[I] <= 0, F[L] <= 0), R.every(function(e) {
|
|
678
|
+
return e;
|
|
679
|
+
})) {
|
|
680
|
+
O = A, D = !1;
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
E.set(A, R);
|
|
684
|
+
}
|
|
685
|
+
if (D) for (var rt = m ? 3 : 1, it = function(e) {
|
|
686
|
+
var t = S.find(function(t) {
|
|
687
|
+
var n = E.get(t);
|
|
688
|
+
if (n) return n.slice(0, e).every(function(e) {
|
|
689
|
+
return e;
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
if (t) return O = t, "break";
|
|
693
|
+
}, z = rt; z > 0 && it(z) !== "break"; z--);
|
|
694
|
+
t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
var flip_default = {
|
|
698
|
+
name: "flip",
|
|
699
|
+
enabled: !0,
|
|
700
|
+
phase: "main",
|
|
701
|
+
fn: flip,
|
|
702
|
+
requiresIfExists: ["offset"],
|
|
703
|
+
data: { _skip: !1 }
|
|
474
704
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
705
|
+
function getSideOffsets(e, t, n) {
|
|
706
|
+
return n === void 0 && (n = {
|
|
707
|
+
x: 0,
|
|
708
|
+
y: 0
|
|
709
|
+
}), {
|
|
710
|
+
top: e.top - t.height - n.y,
|
|
711
|
+
right: e.right - t.width + n.x,
|
|
712
|
+
bottom: e.bottom - t.height + n.y,
|
|
713
|
+
left: e.left - t.width - n.x
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
function isAnySideFullyClipped(e) {
|
|
717
|
+
return [
|
|
718
|
+
"top",
|
|
719
|
+
right,
|
|
720
|
+
bottom,
|
|
721
|
+
left
|
|
722
|
+
].some(function(t) {
|
|
723
|
+
return e[t] >= 0;
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
function hide(e) {
|
|
727
|
+
var t = e.state, n = e.name, r = t.rects.reference, i = t.rects.popper, a = t.modifiersData.preventOverflow, o = detectOverflow(t, { elementContext: "reference" }), s = detectOverflow(t, { altBoundary: !0 }), c = getSideOffsets(o, r), l = getSideOffsets(s, i, a), u = isAnySideFullyClipped(c), d = isAnySideFullyClipped(l);
|
|
728
|
+
t.modifiersData[n] = {
|
|
729
|
+
referenceClippingOffsets: c,
|
|
730
|
+
popperEscapeOffsets: l,
|
|
731
|
+
isReferenceHidden: u,
|
|
732
|
+
hasPopperEscaped: d
|
|
733
|
+
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
734
|
+
"data-popper-reference-hidden": u,
|
|
735
|
+
"data-popper-escaped": d
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
var hide_default = {
|
|
739
|
+
name: "hide",
|
|
740
|
+
enabled: !0,
|
|
741
|
+
phase: "main",
|
|
742
|
+
requiresIfExists: ["preventOverflow"],
|
|
743
|
+
fn: hide
|
|
480
744
|
};
|
|
481
|
-
function
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
745
|
+
function distanceAndSkiddingToXY(e, t, n) {
|
|
746
|
+
var r = getBasePlacement(e), i = ["left", "top"].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, o = a[0], s = a[1];
|
|
747
|
+
return o ||= 0, s = (s || 0) * i, ["left", "right"].indexOf(r) >= 0 ? {
|
|
748
|
+
x: s,
|
|
749
|
+
y: o
|
|
750
|
+
} : {
|
|
751
|
+
x: o,
|
|
752
|
+
y: s
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function offset(e) {
|
|
756
|
+
var t = e.state, n = e.options, r = e.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = placements.reduce(function(e, n) {
|
|
757
|
+
return e[n] = distanceAndSkiddingToXY(n, t.rects, a), e;
|
|
758
|
+
}, {}), s = o[t.placement], c = s.x, l = s.y;
|
|
759
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += l), t.modifiersData[r] = o;
|
|
760
|
+
}
|
|
761
|
+
var offset_default = {
|
|
762
|
+
name: "offset",
|
|
763
|
+
enabled: !0,
|
|
764
|
+
phase: "main",
|
|
765
|
+
requires: ["popperOffsets"],
|
|
766
|
+
fn: offset
|
|
489
767
|
};
|
|
490
|
-
function
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}
|
|
505
|
-
function si(i, t) {
|
|
506
|
-
var e = H(i), n = q(i), r = e.visualViewport, s = n.clientWidth, l = n.clientHeight, o = 0, a = 0;
|
|
507
|
-
if (r) {
|
|
508
|
-
s = r.width, l = r.height;
|
|
509
|
-
var h = ce();
|
|
510
|
-
(h || !h && t === "fixed") && (o = r.offsetLeft, a = r.offsetTop);
|
|
511
|
-
}
|
|
512
|
-
return {
|
|
513
|
-
width: s,
|
|
514
|
-
height: l,
|
|
515
|
-
x: o + At(i),
|
|
516
|
-
y: a
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
function ai(i) {
|
|
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;
|
|
521
|
-
return B(r || e).direction === "rtl" && (o += Q(e.clientWidth, r ? r.clientWidth : 0) - s), {
|
|
522
|
-
width: s,
|
|
523
|
-
height: l,
|
|
524
|
-
x: o,
|
|
525
|
-
y: a
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
function Ft(i) {
|
|
529
|
-
var t = B(i), e = t.overflow, n = t.overflowX, r = t.overflowY;
|
|
530
|
-
return /auto|scroll|overlay|hidden/.test(e + r + n);
|
|
531
|
-
}
|
|
532
|
-
function pe(i) {
|
|
533
|
-
return ["html", "body", "#document"].indexOf(W(i)) >= 0 ? i.ownerDocument.body : j(i) && Ft(i) ? i : pe(kt(i));
|
|
534
|
-
}
|
|
535
|
-
function dt(i, t) {
|
|
536
|
-
var e;
|
|
537
|
-
t === void 0 && (t = []);
|
|
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);
|
|
539
|
-
return r ? o : (
|
|
540
|
-
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
541
|
-
o.concat(dt(kt(l)))
|
|
542
|
-
);
|
|
543
|
-
}
|
|
544
|
-
function Yt(i) {
|
|
545
|
-
return Object.assign({}, i, {
|
|
546
|
-
left: i.x,
|
|
547
|
-
top: i.y,
|
|
548
|
-
right: i.x + i.width,
|
|
549
|
-
bottom: i.y + i.height
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
function li(i, t) {
|
|
553
|
-
var e = ot(i, !1, t === "fixed");
|
|
554
|
-
return e.top = e.top + i.clientTop, e.left = e.left + i.clientLeft, e.bottom = e.top + i.clientHeight, e.right = e.left + i.clientWidth, e.width = i.clientWidth, e.height = i.clientHeight, e.x = e.left, e.y = e.top, e;
|
|
555
|
-
}
|
|
556
|
-
function ee(i, t, e) {
|
|
557
|
-
return t === ae ? Yt(si(i, e)) : tt(t) ? li(t, e) : Yt(ai(q(i)));
|
|
558
|
-
}
|
|
559
|
-
function ci(i) {
|
|
560
|
-
var t = dt(kt(i)), e = ["absolute", "fixed"].indexOf(B(i).position) >= 0, n = e && j(i) ? mt(i) : i;
|
|
561
|
-
return tt(n) ? t.filter(function(r) {
|
|
562
|
-
return tt(r) && ue(r, n) && W(r) !== "body";
|
|
563
|
-
}) : [];
|
|
564
|
-
}
|
|
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;
|
|
569
|
-
}, ee(i, l, n));
|
|
570
|
-
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
571
|
-
}
|
|
572
|
-
function ve(i) {
|
|
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;
|
|
574
|
-
switch (r) {
|
|
575
|
-
case C:
|
|
576
|
-
a = {
|
|
577
|
-
x: l,
|
|
578
|
-
y: t.y - e.height
|
|
579
|
-
};
|
|
580
|
-
break;
|
|
581
|
-
case R:
|
|
582
|
-
a = {
|
|
583
|
-
x: l,
|
|
584
|
-
y: t.y + t.height
|
|
585
|
-
};
|
|
586
|
-
break;
|
|
587
|
-
case $:
|
|
588
|
-
a = {
|
|
589
|
-
x: t.x + t.width,
|
|
590
|
-
y: o
|
|
591
|
-
};
|
|
592
|
-
break;
|
|
593
|
-
case Y:
|
|
594
|
-
a = {
|
|
595
|
-
x: t.x - e.width,
|
|
596
|
-
y: o
|
|
597
|
-
};
|
|
598
|
-
break;
|
|
599
|
-
default:
|
|
600
|
-
a = {
|
|
601
|
-
x: t.x,
|
|
602
|
-
y: t.y
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
var h = r ? Rt(r) : null;
|
|
606
|
-
if (h != null) {
|
|
607
|
-
var u = h === "y" ? "height" : "width";
|
|
608
|
-
switch (s) {
|
|
609
|
-
case nt:
|
|
610
|
-
a[h] = a[h] - (t[u] / 2 - e[u] / 2);
|
|
611
|
-
break;
|
|
612
|
-
case ft:
|
|
613
|
-
a[h] = a[h] + (t[u] / 2 - e[u] / 2);
|
|
614
|
-
break;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return a;
|
|
618
|
-
}
|
|
619
|
-
function pt(i, t) {
|
|
620
|
-
t === void 0 && (t = {});
|
|
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({
|
|
622
|
-
reference: x,
|
|
623
|
-
element: f,
|
|
624
|
-
placement: r
|
|
625
|
-
}), S = Yt(Object.assign({}, f, T)), M = y === ct ? S : x, _ = {
|
|
626
|
-
top: E.top - M.top + w.top,
|
|
627
|
-
bottom: M.bottom - E.bottom + w.bottom,
|
|
628
|
-
left: E.left - M.left + w.left,
|
|
629
|
-
right: M.right - E.right + w.right
|
|
630
|
-
}, O = i.modifiersData.offset;
|
|
631
|
-
if (y === ct && O) {
|
|
632
|
-
var D = O[r];
|
|
633
|
-
Object.keys(_).forEach(function(P) {
|
|
634
|
-
var A = [$, R].indexOf(P) >= 0 ? 1 : -1, I = [C, R].indexOf(P) >= 0 ? "y" : "x";
|
|
635
|
-
_[P] += D[I] * A;
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
return _;
|
|
639
|
-
}
|
|
640
|
-
function hi(i, t) {
|
|
641
|
-
t === void 0 && (t = {});
|
|
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;
|
|
644
|
-
}) : vt, y = p.filter(function(m) {
|
|
645
|
-
return h.indexOf(m) >= 0;
|
|
646
|
-
});
|
|
647
|
-
y.length === 0 && (y = p);
|
|
648
|
-
var d = y.reduce(function(m, v) {
|
|
649
|
-
return m[v] = pt(i, {
|
|
650
|
-
placement: v,
|
|
651
|
-
boundary: r,
|
|
652
|
-
rootBoundary: s,
|
|
653
|
-
padding: l
|
|
654
|
-
})[V(v)], m;
|
|
655
|
-
}, {});
|
|
656
|
-
return Object.keys(d).sort(function(m, v) {
|
|
657
|
-
return d[m] - d[v];
|
|
658
|
-
});
|
|
659
|
-
}
|
|
660
|
-
function di(i) {
|
|
661
|
-
if (V(i) === Xt)
|
|
662
|
-
return [];
|
|
663
|
-
var t = Tt(i);
|
|
664
|
-
return [te(i), t, te(t)];
|
|
665
|
-
}
|
|
666
|
-
function fi(i) {
|
|
667
|
-
var t = i.state, e = i.options, n = i.name;
|
|
668
|
-
if (!t.modifiersData[n]._skip) {
|
|
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, {
|
|
671
|
-
placement: N,
|
|
672
|
-
boundary: u,
|
|
673
|
-
rootBoundary: p,
|
|
674
|
-
padding: h,
|
|
675
|
-
flipVariations: m,
|
|
676
|
-
allowedAutoPlacements: v
|
|
677
|
-
}) : N);
|
|
678
|
-
}, []), E = t.rects.reference, x = t.rects.popper, T = /* @__PURE__ */ new Map(), S = !0, M = b[0], _ = 0; _ < b.length; _++) {
|
|
679
|
-
var O = b[_], D = V(O), P = st(O) === nt, A = [C, R].indexOf(D) >= 0, I = A ? "width" : "height", X = pt(t, {
|
|
680
|
-
placement: O,
|
|
681
|
-
boundary: u,
|
|
682
|
-
rootBoundary: p,
|
|
683
|
-
altBoundary: y,
|
|
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) {
|
|
689
|
-
return et;
|
|
690
|
-
})) {
|
|
691
|
-
M = O, S = !1;
|
|
692
|
-
break;
|
|
693
|
-
}
|
|
694
|
-
T.set(O, z);
|
|
695
|
-
}
|
|
696
|
-
if (S)
|
|
697
|
-
for (var yt = m ? 3 : 1, Mt = function(N) {
|
|
698
|
-
var lt = b.find(function(wt) {
|
|
699
|
-
var U = T.get(wt);
|
|
700
|
-
if (U)
|
|
701
|
-
return U.slice(0, N).every(function(St) {
|
|
702
|
-
return St;
|
|
703
|
-
});
|
|
704
|
-
});
|
|
705
|
-
if (lt)
|
|
706
|
-
return M = lt, "break";
|
|
707
|
-
}, at = yt; at > 0; at--) {
|
|
708
|
-
var bt = Mt(at);
|
|
709
|
-
if (bt === "break") break;
|
|
710
|
-
}
|
|
711
|
-
t.placement !== M && (t.modifiersData[n]._skip = !0, t.placement = M, t.reset = !0);
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
const pi = {
|
|
715
|
-
name: "flip",
|
|
716
|
-
enabled: !0,
|
|
717
|
-
phase: "main",
|
|
718
|
-
fn: fi,
|
|
719
|
-
requiresIfExists: ["offset"],
|
|
720
|
-
data: {
|
|
721
|
-
_skip: !1
|
|
722
|
-
}
|
|
768
|
+
function popperOffsets(e) {
|
|
769
|
+
var t = e.state, n = e.name;
|
|
770
|
+
t.modifiersData[n] = computeOffsets({
|
|
771
|
+
reference: t.rects.reference,
|
|
772
|
+
element: t.rects.popper,
|
|
773
|
+
strategy: "absolute",
|
|
774
|
+
placement: t.placement
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
var popperOffsets_default = {
|
|
778
|
+
name: "popperOffsets",
|
|
779
|
+
enabled: !0,
|
|
780
|
+
phase: "read",
|
|
781
|
+
fn: popperOffsets,
|
|
782
|
+
data: {}
|
|
723
783
|
};
|
|
724
|
-
function
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
784
|
+
function getAltAxis(e) {
|
|
785
|
+
return e === "x" ? "y" : "x";
|
|
786
|
+
}
|
|
787
|
+
function preventOverflow(e) {
|
|
788
|
+
var t = e.state, n = e.options, r = e.name, i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !1 : o, c = n.boundary, l = n.rootBoundary, u = n.altBoundary, d = n.padding, f = n.tether, p = f === void 0 ? !0 : f, m = n.tetherOffset, h = m === void 0 ? 0 : m, g = detectOverflow(t, {
|
|
789
|
+
boundary: c,
|
|
790
|
+
rootBoundary: l,
|
|
791
|
+
padding: d,
|
|
792
|
+
altBoundary: u
|
|
793
|
+
}), _ = getBasePlacement(t.placement), x = getVariation(t.placement), S = !x, C = getMainAxisFromPlacement(_), w = getAltAxis(C), T = t.modifiersData.popperOffsets, E = t.rects.reference, D = t.rects.popper, O = typeof h == "function" ? h(Object.assign({}, t.rects, { placement: t.placement })) : h, k = typeof O == "number" ? {
|
|
794
|
+
mainAxis: O,
|
|
795
|
+
altAxis: O
|
|
796
|
+
} : Object.assign({
|
|
797
|
+
mainAxis: 0,
|
|
798
|
+
altAxis: 0
|
|
799
|
+
}, O), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j = {
|
|
800
|
+
x: 0,
|
|
801
|
+
y: 0
|
|
802
|
+
};
|
|
803
|
+
if (T) {
|
|
804
|
+
if (a) {
|
|
805
|
+
var M = C === "y" ? "top" : left, N = C === "y" ? bottom : right, P = C === "y" ? "height" : "width", F = T[C], I = F + g[M], L = F - g[N], R = p ? -D[P] / 2 : 0, z = x === "start" ? E[P] : D[P], at = x === "start" ? -D[P] : -E[P], B = t.elements.arrow, ot = p && B ? getLayoutRect(B) : {
|
|
806
|
+
width: 0,
|
|
807
|
+
height: 0
|
|
808
|
+
}, V = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), H = V[M], U = V[N], W = within(0, E[P], ot[P]), st = S ? E[P] / 2 - R - W - H - k.mainAxis : z - W - H - k.mainAxis, ct = S ? -E[P] / 2 + R + W + U + k.mainAxis : at + W + U + k.mainAxis, G = t.elements.arrow && getOffsetParent(t.elements.arrow), lt = G ? C === "y" ? G.clientTop || 0 : G.clientLeft || 0 : 0, K = A?.[C] ?? 0, ut = F + st - K - lt, dt = F + ct - K, q = within(p ? min(I, ut) : I, F, p ? max(L, dt) : L);
|
|
809
|
+
T[C] = q, j[C] = q - F;
|
|
810
|
+
}
|
|
811
|
+
if (s) {
|
|
812
|
+
var ft = C === "x" ? "top" : left, pt = C === "x" ? bottom : right, J = T[w], Y = w === "y" ? "height" : "width", X = J + g[ft], Z = J - g[pt], Q = ["top", left].indexOf(_) !== -1, $ = A?.[w] ?? 0, mt = Q ? X : J - E[Y] - D[Y] - $ + k.altAxis, ht = Q ? J + E[Y] + D[Y] - $ - k.altAxis : Z, gt = p && Q ? withinMaxClamp(mt, J, ht) : within(p ? mt : X, J, p ? ht : Z);
|
|
813
|
+
T[w] = gt, j[w] = gt - J;
|
|
814
|
+
}
|
|
815
|
+
t.modifiersData[r] = j;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
var preventOverflow_default = {
|
|
819
|
+
name: "preventOverflow",
|
|
820
|
+
enabled: !0,
|
|
821
|
+
phase: "main",
|
|
822
|
+
fn: preventOverflow,
|
|
823
|
+
requiresIfExists: ["offset"]
|
|
762
824
|
};
|
|
763
|
-
function
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
825
|
+
function getHTMLElementScroll(e) {
|
|
826
|
+
return {
|
|
827
|
+
scrollLeft: e.scrollLeft,
|
|
828
|
+
scrollTop: e.scrollTop
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
function getNodeScroll(e) {
|
|
832
|
+
return e === getWindow(e) || !isHTMLElement(e) ? getWindowScroll(e) : getHTMLElementScroll(e);
|
|
833
|
+
}
|
|
834
|
+
function isElementScaled(e) {
|
|
835
|
+
var t = e.getBoundingClientRect(), n = round(t.width) / e.offsetWidth || 1, r = round(t.height) / e.offsetHeight || 1;
|
|
836
|
+
return n !== 1 || r !== 1;
|
|
837
|
+
}
|
|
838
|
+
function getCompositeRect(e, t, n) {
|
|
839
|
+
n === void 0 && (n = !1);
|
|
840
|
+
var r = isHTMLElement(t), i = isHTMLElement(t) && isElementScaled(t), a = getDocumentElement(t), o = getBoundingClientRect(e, i, n), s = {
|
|
841
|
+
scrollLeft: 0,
|
|
842
|
+
scrollTop: 0
|
|
843
|
+
}, c = {
|
|
844
|
+
x: 0,
|
|
845
|
+
y: 0
|
|
846
|
+
};
|
|
847
|
+
return (r || !r && !n) && ((getNodeName(t) !== "body" || isScrollParent(a)) && (s = getNodeScroll(t)), isHTMLElement(t) ? (c = getBoundingClientRect(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : a && (c.x = getWindowScrollBarX(a))), {
|
|
848
|
+
x: o.left + s.scrollLeft - c.x,
|
|
849
|
+
y: o.top + s.scrollTop - c.y,
|
|
850
|
+
width: o.width,
|
|
851
|
+
height: o.height
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
function order(e) {
|
|
855
|
+
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
856
|
+
e.forEach(function(e) {
|
|
857
|
+
t.set(e.name, e);
|
|
858
|
+
});
|
|
859
|
+
function i(e) {
|
|
860
|
+
n.add(e.name), [].concat(e.requires || [], e.requiresIfExists || []).forEach(function(e) {
|
|
861
|
+
if (!n.has(e)) {
|
|
862
|
+
var r = t.get(e);
|
|
863
|
+
r && i(r);
|
|
864
|
+
}
|
|
865
|
+
}), r.push(e);
|
|
866
|
+
}
|
|
867
|
+
return e.forEach(function(e) {
|
|
868
|
+
n.has(e.name) || i(e);
|
|
869
|
+
}), r;
|
|
870
|
+
}
|
|
871
|
+
function orderModifiers(e) {
|
|
872
|
+
var t = order(e);
|
|
873
|
+
return modifierPhases.reduce(function(e, n) {
|
|
874
|
+
return e.concat(t.filter(function(e) {
|
|
875
|
+
return e.phase === n;
|
|
876
|
+
}));
|
|
877
|
+
}, []);
|
|
878
|
+
}
|
|
879
|
+
function debounce(e) {
|
|
880
|
+
var t;
|
|
881
|
+
return function() {
|
|
882
|
+
return t ||= new Promise(function(n) {
|
|
883
|
+
Promise.resolve().then(function() {
|
|
884
|
+
t = void 0, n(e());
|
|
885
|
+
});
|
|
886
|
+
}), t;
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
function mergeByName(e) {
|
|
890
|
+
var t = e.reduce(function(e, t) {
|
|
891
|
+
var n = e[t.name];
|
|
892
|
+
return e[t.name] = n ? Object.assign({}, n, t, {
|
|
893
|
+
options: Object.assign({}, n.options, t.options),
|
|
894
|
+
data: Object.assign({}, n.data, t.data)
|
|
895
|
+
}) : t, e;
|
|
896
|
+
}, {});
|
|
897
|
+
return Object.keys(t).map(function(e) {
|
|
898
|
+
return t[e];
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
var DEFAULT_OPTIONS = {
|
|
902
|
+
placement: "bottom",
|
|
903
|
+
modifiers: [],
|
|
904
|
+
strategy: "absolute"
|
|
787
905
|
};
|
|
788
|
-
function
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
906
|
+
function areValidElements() {
|
|
907
|
+
return ![...arguments].some(function(e) {
|
|
908
|
+
return !(e && typeof e.getBoundingClientRect == "function");
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
function popperGenerator(e) {
|
|
912
|
+
e === void 0 && (e = {});
|
|
913
|
+
var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, i = t.defaultOptions, a = i === void 0 ? DEFAULT_OPTIONS : i;
|
|
914
|
+
return function(e, t, n) {
|
|
915
|
+
n === void 0 && (n = a);
|
|
916
|
+
var i = {
|
|
917
|
+
placement: "bottom",
|
|
918
|
+
orderedModifiers: [],
|
|
919
|
+
options: Object.assign({}, DEFAULT_OPTIONS, a),
|
|
920
|
+
modifiersData: {},
|
|
921
|
+
elements: {
|
|
922
|
+
reference: e,
|
|
923
|
+
popper: t
|
|
924
|
+
},
|
|
925
|
+
attributes: {},
|
|
926
|
+
styles: {}
|
|
927
|
+
}, o = [], s = !1, c = {
|
|
928
|
+
state: i,
|
|
929
|
+
setOptions: function(n) {
|
|
930
|
+
var o = typeof n == "function" ? n(i.options) : n;
|
|
931
|
+
u(), i.options = Object.assign({}, a, i.options, o), i.scrollParents = {
|
|
932
|
+
reference: isElement(e) ? listScrollParents(e) : e.contextElement ? listScrollParents(e.contextElement) : [],
|
|
933
|
+
popper: listScrollParents(t)
|
|
934
|
+
};
|
|
935
|
+
var s = orderModifiers(mergeByName([].concat(r, i.options.modifiers)));
|
|
936
|
+
return i.orderedModifiers = s.filter(function(e) {
|
|
937
|
+
return e.enabled;
|
|
938
|
+
}), l(), c.update();
|
|
939
|
+
},
|
|
940
|
+
forceUpdate: function() {
|
|
941
|
+
if (!s) {
|
|
942
|
+
var e = i.elements, t = e.reference, n = e.popper;
|
|
943
|
+
if (areValidElements(t, n)) {
|
|
944
|
+
i.rects = {
|
|
945
|
+
reference: getCompositeRect(t, getOffsetParent(n), i.options.strategy === "fixed"),
|
|
946
|
+
popper: getLayoutRect(n)
|
|
947
|
+
}, i.reset = !1, i.placement = i.options.placement, i.orderedModifiers.forEach(function(e) {
|
|
948
|
+
return i.modifiersData[e.name] = Object.assign({}, e.data);
|
|
949
|
+
});
|
|
950
|
+
for (var r = 0; r < i.orderedModifiers.length; r++) {
|
|
951
|
+
if (i.reset === !0) {
|
|
952
|
+
i.reset = !1, r = -1;
|
|
953
|
+
continue;
|
|
954
|
+
}
|
|
955
|
+
var a = i.orderedModifiers[r], o = a.fn, l = a.options, u = l === void 0 ? {} : l, d = a.name;
|
|
956
|
+
typeof o == "function" && (i = o({
|
|
957
|
+
state: i,
|
|
958
|
+
options: u,
|
|
959
|
+
name: d,
|
|
960
|
+
instance: c
|
|
961
|
+
}) || i);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
update: debounce(function() {
|
|
967
|
+
return new Promise(function(e) {
|
|
968
|
+
c.forceUpdate(), e(i);
|
|
969
|
+
});
|
|
970
|
+
}),
|
|
971
|
+
destroy: function() {
|
|
972
|
+
u(), s = !0;
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
if (!areValidElements(e, t)) return c;
|
|
976
|
+
c.setOptions(n).then(function(e) {
|
|
977
|
+
!s && n.onFirstUpdate && n.onFirstUpdate(e);
|
|
978
|
+
});
|
|
979
|
+
function l() {
|
|
980
|
+
i.orderedModifiers.forEach(function(e) {
|
|
981
|
+
var t = e.name, n = e.options, r = n === void 0 ? {} : n, a = e.effect;
|
|
982
|
+
if (typeof a == "function") {
|
|
983
|
+
var s = a({
|
|
984
|
+
state: i,
|
|
985
|
+
name: t,
|
|
986
|
+
instance: c,
|
|
987
|
+
options: r
|
|
988
|
+
});
|
|
989
|
+
o.push(s || function() {});
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
function u() {
|
|
994
|
+
o.forEach(function(e) {
|
|
995
|
+
return e();
|
|
996
|
+
}), o = [];
|
|
997
|
+
}
|
|
998
|
+
return c;
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
var createPopper = /* @__PURE__ */ popperGenerator({ defaultModifiers: [
|
|
1002
|
+
eventListeners_default,
|
|
1003
|
+
popperOffsets_default,
|
|
1004
|
+
computeStyles_default,
|
|
1005
|
+
applyStyles_default,
|
|
1006
|
+
offset_default,
|
|
1007
|
+
flip_default,
|
|
1008
|
+
preventOverflow_default,
|
|
1009
|
+
arrow_default,
|
|
1010
|
+
hide_default
|
|
1011
|
+
] }), TinyGesture = class e {
|
|
1012
|
+
constructor(t, n) {
|
|
1013
|
+
this.element = t, this.touch1 = null, this.touch2 = null, this.touchStartX = null, this.touchStartY = null, this.touchEndX = null, this.touchEndY = null, this.touchMove1 = null, this.touchMove2 = null, this.touchMoveX = null, this.touchMoveY = null, this.velocityX = null, this.velocityY = null, this.longPressTimer = null, this.doubleTapTimer = null, this.doubleTapWaiting = !1, this.thresholdX = 0, this.thresholdY = 0, this.disregardVelocityThresholdX = 0, this.disregardVelocityThresholdY = 0, this.swipingHorizontal = !1, this.swipingVertical = !1, this.swipingDirection = null, this.swipedHorizontal = !1, this.swipedVertical = !1, this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null, this.handlers = {
|
|
1014
|
+
panstart: [],
|
|
1015
|
+
panmove: [],
|
|
1016
|
+
panend: [],
|
|
1017
|
+
swipeleft: [],
|
|
1018
|
+
swiperight: [],
|
|
1019
|
+
swipeup: [],
|
|
1020
|
+
swipedown: [],
|
|
1021
|
+
tap: [],
|
|
1022
|
+
doubletap: [],
|
|
1023
|
+
longpress: [],
|
|
1024
|
+
pinch: [],
|
|
1025
|
+
pinchend: [],
|
|
1026
|
+
rotate: [],
|
|
1027
|
+
rotateend: []
|
|
1028
|
+
}, this._onTouchStart = this.onTouchStart.bind(this), this._onTouchMove = this.onTouchMove.bind(this), this._onTouchEnd = this.onTouchEnd.bind(this), this.opts = Object.assign({}, e.defaults, n), this.element.addEventListener("touchstart", this._onTouchStart, passiveIfSupported), this.element.addEventListener("touchmove", this._onTouchMove, passiveIfSupported), this.element.addEventListener("touchend", this._onTouchEnd, passiveIfSupported), this.opts.mouseSupport && !("ontouchstart" in window) && (this.element.addEventListener("mousedown", this._onTouchStart, passiveIfSupported), document.addEventListener("mousemove", this._onTouchMove, passiveIfSupported), document.addEventListener("mouseup", this._onTouchEnd, passiveIfSupported));
|
|
1029
|
+
}
|
|
1030
|
+
destroy() {
|
|
1031
|
+
this.element.removeEventListener("touchstart", this._onTouchStart), this.element.removeEventListener("touchmove", this._onTouchMove), this.element.removeEventListener("touchend", this._onTouchEnd), this.element.removeEventListener("mousedown", this._onTouchStart), document.removeEventListener("mousemove", this._onTouchMove), document.removeEventListener("mouseup", this._onTouchEnd), clearTimeout(this.longPressTimer ?? void 0), clearTimeout(this.doubleTapTimer ?? void 0);
|
|
1032
|
+
}
|
|
1033
|
+
on(e, t) {
|
|
1034
|
+
if (this.handlers[e]) return this.handlers[e].push(t), {
|
|
1035
|
+
type: e,
|
|
1036
|
+
fn: t,
|
|
1037
|
+
cancel: () => this.off(e, t)
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
off(e, t) {
|
|
1041
|
+
if (this.handlers[e]) {
|
|
1042
|
+
let n = this.handlers[e].indexOf(t);
|
|
1043
|
+
n !== -1 && this.handlers[e].splice(n, 1);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
fire(e, t) {
|
|
1047
|
+
for (let n = 0; n < this.handlers[e].length; n++) this.handlers[e][n](t);
|
|
1048
|
+
}
|
|
1049
|
+
onTouchStart(e) {
|
|
1050
|
+
let t = !1;
|
|
1051
|
+
if (e.type !== "mousedown") {
|
|
1052
|
+
if (this.touch1 || (this.touch1 = e.changedTouches[0], t = !0), (t && e.changedTouches.length > 1 || !t) && !this.touch2) {
|
|
1053
|
+
this.touch2 = [...e.changedTouches].find((e) => e.identifier !== this.touch1?.identifier) || null, this.originalDistance = Math.sqrt(((this.touch2?.screenX ?? 0) - (this.touchMove1?.screenX ?? this.touch1?.screenX ?? 0)) ** 2 + ((this.touch2?.screenY ?? 0) - (this.touchMove1?.screenY ?? this.touch1?.screenY ?? 0)) ** 2), this.originalAngle = Math.atan2((this.touch2?.screenY ?? 0) - (this.touchMove1?.screenY ?? this.touch1?.screenY ?? 0), (this.touch2?.screenX ?? 0) - (this.touchMove1?.screenX ?? this.touch1?.screenX ?? 0)) / (Math.PI / 180);
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
if (!t) return;
|
|
1057
|
+
}
|
|
1058
|
+
(t || e.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 = e.type === "mousedown" ? e.screenX : this.touch1?.screenX || 0, this.touchStartY = e.type === "mousedown" ? e.screenY : this.touch1?.screenY || 0, this.touchMoveX = null, this.touchMoveY = null, this.touchEndX = null, this.touchEndY = null, this.swipingDirection = null, this.longPressTimer = setTimeout(() => this.fire("longpress", e), this.opts.longPressTime), this.scale = 1, this.rotation = 0, this.fire("panstart", e));
|
|
1059
|
+
}
|
|
1060
|
+
onTouchMove(e) {
|
|
1061
|
+
if (e.type === "mousemove" && (!this.touchStartX || this.touchEndX !== null)) return;
|
|
1062
|
+
let t, n;
|
|
1063
|
+
if (e.type !== "mousemove" && (t = [...e.changedTouches].find((e) => e.identifier === this.touch1?.identifier), this.touchMove1 = t || this.touchMove1, n = [...e.changedTouches].find((e) => e.identifier === this.touch2?.identifier), this.touchMove2 = n || this.touchMove2), e.type === "mousemove" || t) {
|
|
1064
|
+
let n = (e.type === "mousemove" ? e.screenX : t?.screenX ?? 0) - (this.touchStartX ?? 0);
|
|
1065
|
+
this.velocityX = n - (this.touchMoveX ?? 0), this.touchMoveX = n;
|
|
1066
|
+
let r = (e.type === "mousemove" ? e.screenY : t?.screenY ?? 0) - (this.touchStartY ?? 0);
|
|
1067
|
+
this.velocityY = r - (this.touchMoveY ?? 0), this.touchMoveY = r;
|
|
1068
|
+
let i = Math.abs(this.touchMoveX), a = Math.abs(this.touchMoveY);
|
|
1069
|
+
this.swipingHorizontal = i > this.thresholdX, this.swipingVertical = a > this.thresholdY, this.swipingDirection = i > a ? this.swipingHorizontal ? "horizontal" : "pre-horizontal" : this.swipingVertical ? "vertical" : "pre-vertical", Math.max(i, a) > this.opts.pressThreshold && clearTimeout(this.longPressTimer ?? void 0), this.fire("panmove", e);
|
|
1070
|
+
}
|
|
1071
|
+
e.type !== "mousemove" && this.touchMove1 != null && this.touchMove2 != null && (this.newDistance = Math.sqrt((this.touchMove2.screenX - this.touchMove1.screenX) ** 2 + (this.touchMove2.screenY - this.touchMove1.screenY) ** 2), this.scale = this.newDistance / (this.originalDistance ?? 0), this.fire("pinch", e), this.newAngle = Math.atan2((this.touchMove2.screenY ?? 0) - (this.touchMove1.screenY ?? 0), (this.touchMove2.screenX ?? 0) - (this.touchMove1.screenX ?? 0)) / (Math.PI / 180), this.rotation = this.newAngle - (this.originalAngle ?? 0), this.fire("rotate", e));
|
|
1072
|
+
}
|
|
1073
|
+
onTouchEnd(e) {
|
|
1074
|
+
let t;
|
|
1075
|
+
if (e.type !== "mouseup" && (t = [...e.changedTouches].find((e) => e.identifier === this.touch1?.identifier), [...e.touches].find((e) => e.identifier === this.touch1?.identifier) || (this.touch1 = null, this.touchMove1 = null), [...e.touches].find((e) => e.identifier === this.touch2?.identifier) || (this.touch2 = null, this.touchMove2 = null)), !(e.type === "mouseup" && (!this.touchStartX || this.touchEndX !== null))) {
|
|
1076
|
+
if (e.type === "mouseup" || t) {
|
|
1077
|
+
this.touchEndX = e.type === "mouseup" ? e.screenX : t?.screenX ?? 0, this.touchEndY = e.type === "mouseup" ? e.screenY : t?.screenY ?? 0, this.fire("panend", e), clearTimeout(this.longPressTimer ?? void 0);
|
|
1078
|
+
let n = this.touchEndX - (this.touchStartX ?? 0), r = Math.abs(n), i = this.touchEndY - (this.touchStartY ?? 0), a = Math.abs(i), o = Math.sqrt(n ** 2 + i ** 2), s = Math.abs(o), c = a / r;
|
|
1079
|
+
r > this.thresholdX || a > this.thresholdY || this.opts.diagonalSwipes && (s > this.thresholdX || s > this.thresholdY) ? (this.swipedHorizontal = r > this.thresholdX || this.opts.diagonalSwipes && s > this.thresholdX, this.swipedVertical = a > this.thresholdY || this.opts.diagonalSwipes && s > this.thresholdY, (!this.opts.diagonalSwipes || c < Math.tan((45 - this.opts.diagonalLimit) * Math.PI / 180) || c > Math.tan((45 + this.opts.diagonalLimit) * Math.PI / 180)) && (r >= a && (this.swipedVertical = !1), a > r && (this.swipedHorizontal = !1)), this.swipedHorizontal && (n < 0 ? ((this.velocityX ?? 0) < -this.opts.velocityThreshold || o < -this.disregardVelocityThresholdX) && this.fire("swipeleft", e) : ((this.velocityX ?? 0) > this.opts.velocityThreshold || o > this.disregardVelocityThresholdX) && this.fire("swiperight", e)), this.swipedVertical && (i < 0 ? ((this.velocityY ?? 0) < -this.opts.velocityThreshold || o < -this.disregardVelocityThresholdY) && this.fire("swipeup", e) : ((this.velocityY ?? 0) > this.opts.velocityThreshold || o > this.disregardVelocityThresholdY) && this.fire("swipedown", e))) : r < this.opts.pressThreshold && a < this.opts.pressThreshold && (this.doubleTapWaiting ? (this.doubleTapWaiting = !1, clearTimeout(this.doubleTapTimer ?? void 0), this.fire("doubletap", e)) : (this.doubleTapWaiting = !0, this.doubleTapTimer = setTimeout(() => this.doubleTapWaiting = !1, this.opts.doubleTapTime), this.fire("tap", e)));
|
|
1080
|
+
}
|
|
1081
|
+
!this.touch1 && !this.touch2 && (this.fire("pinchend", e), this.fire("rotateend", e), this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null);
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
802
1084
|
};
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
placement: t.placement
|
|
814
|
-
})) : v, _ = typeof M == "number" ? {
|
|
815
|
-
mainAxis: M,
|
|
816
|
-
altAxis: M
|
|
817
|
-
} : Object.assign({
|
|
818
|
-
mainAxis: 0,
|
|
819
|
-
altAxis: 0
|
|
820
|
-
}, M), O = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, D = {
|
|
821
|
-
x: 0,
|
|
822
|
-
y: 0
|
|
823
|
-
};
|
|
824
|
-
if (x) {
|
|
825
|
-
if (s) {
|
|
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) : {
|
|
827
|
-
width: 0,
|
|
828
|
-
height: 0
|
|
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;
|
|
831
|
-
}
|
|
832
|
-
if (o) {
|
|
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);
|
|
834
|
-
x[E] = Kt, D[E] = Kt - K;
|
|
835
|
-
}
|
|
836
|
-
t.modifiersData[n] = D;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
const Oi = {
|
|
840
|
-
name: "preventOverflow",
|
|
841
|
-
enabled: !0,
|
|
842
|
-
phase: "main",
|
|
843
|
-
fn: Ti,
|
|
844
|
-
requiresIfExists: ["offset"]
|
|
1085
|
+
TinyGesture.defaults = {
|
|
1086
|
+
threshold: (e, t) => Math.max(25, Math.floor(.15 * (e === "x" ? window.innerWidth || document.body.clientWidth : window.innerHeight || document.body.clientHeight))),
|
|
1087
|
+
velocityThreshold: 10,
|
|
1088
|
+
disregardVelocityThreshold: (e, t) => Math.floor(.5 * (e === "x" ? t.element.clientWidth : t.element.clientHeight)),
|
|
1089
|
+
pressThreshold: 8,
|
|
1090
|
+
diagonalSwipes: !1,
|
|
1091
|
+
diagonalLimit: 15,
|
|
1092
|
+
longPressTime: 500,
|
|
1093
|
+
doubleTapTime: 300,
|
|
1094
|
+
mouseSupport: !0
|
|
845
1095
|
};
|
|
846
|
-
|
|
847
|
-
return {
|
|
848
|
-
scrollLeft: i.scrollLeft,
|
|
849
|
-
scrollTop: i.scrollTop
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
function _i(i) {
|
|
853
|
-
return i === H(i) || !j(i) ? $t(i) : ki(i);
|
|
854
|
-
}
|
|
855
|
-
function Mi(i) {
|
|
856
|
-
var t = i.getBoundingClientRect(), e = rt(t.width) / i.offsetWidth || 1, n = rt(t.height) / i.offsetHeight || 1;
|
|
857
|
-
return e !== 1 || n !== 1;
|
|
858
|
-
}
|
|
859
|
-
function Si(i, t, e) {
|
|
860
|
-
e === void 0 && (e = !1);
|
|
861
|
-
var n = j(t), r = j(t) && Mi(t), s = q(t), l = ot(i, r, e), o = {
|
|
862
|
-
scrollLeft: 0,
|
|
863
|
-
scrollTop: 0
|
|
864
|
-
}, a = {
|
|
865
|
-
x: 0,
|
|
866
|
-
y: 0
|
|
867
|
-
};
|
|
868
|
-
return (n || !n && !e) && ((W(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
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))), {
|
|
870
|
-
x: l.left + o.scrollLeft - a.x,
|
|
871
|
-
y: l.top + o.scrollTop - a.y,
|
|
872
|
-
width: l.width,
|
|
873
|
-
height: l.height
|
|
874
|
-
};
|
|
875
|
-
}
|
|
876
|
-
function Di(i) {
|
|
877
|
-
var t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set(), n = [];
|
|
878
|
-
i.forEach(function(s) {
|
|
879
|
-
t.set(s.name, s);
|
|
880
|
-
});
|
|
881
|
-
function r(s) {
|
|
882
|
-
e.add(s.name);
|
|
883
|
-
var l = [].concat(s.requires || [], s.requiresIfExists || []);
|
|
884
|
-
l.forEach(function(o) {
|
|
885
|
-
if (!e.has(o)) {
|
|
886
|
-
var a = t.get(o);
|
|
887
|
-
a && r(a);
|
|
888
|
-
}
|
|
889
|
-
}), n.push(s);
|
|
890
|
-
}
|
|
891
|
-
return i.forEach(function(s) {
|
|
892
|
-
e.has(s.name) || r(s);
|
|
893
|
-
}), n;
|
|
894
|
-
}
|
|
895
|
-
function Pi(i) {
|
|
896
|
-
var t = Di(i);
|
|
897
|
-
return Ve.reduce(function(e, n) {
|
|
898
|
-
return e.concat(t.filter(function(r) {
|
|
899
|
-
return r.phase === n;
|
|
900
|
-
}));
|
|
901
|
-
}, []);
|
|
902
|
-
}
|
|
903
|
-
function Li(i) {
|
|
904
|
-
var t;
|
|
905
|
-
return function() {
|
|
906
|
-
return t || (t = new Promise(function(e) {
|
|
907
|
-
Promise.resolve().then(function() {
|
|
908
|
-
t = void 0, e(i());
|
|
909
|
-
});
|
|
910
|
-
})), t;
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
function Ci(i) {
|
|
914
|
-
var t = i.reduce(function(e, n) {
|
|
915
|
-
var r = e[n.name];
|
|
916
|
-
return e[n.name] = r ? Object.assign({}, r, n, {
|
|
917
|
-
options: Object.assign({}, r.options, n.options),
|
|
918
|
-
data: Object.assign({}, r.data, n.data)
|
|
919
|
-
}) : n, e;
|
|
920
|
-
}, {});
|
|
921
|
-
return Object.keys(t).map(function(e) {
|
|
922
|
-
return t[e];
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
var re = {
|
|
926
|
-
placement: "bottom",
|
|
927
|
-
modifiers: [],
|
|
928
|
-
strategy: "absolute"
|
|
929
|
-
};
|
|
930
|
-
function oe() {
|
|
931
|
-
for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
|
|
932
|
-
t[e] = arguments[e];
|
|
933
|
-
return !t.some(function(n) {
|
|
934
|
-
return !(n && typeof n.getBoundingClientRect == "function");
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
function Yi(i) {
|
|
938
|
-
i === void 0 && (i = {});
|
|
939
|
-
var t = i, e = t.defaultModifiers, n = e === void 0 ? [] : e, r = t.defaultOptions, s = r === void 0 ? re : r;
|
|
940
|
-
return function(o, a, h) {
|
|
941
|
-
h === void 0 && (h = s);
|
|
942
|
-
var u = {
|
|
943
|
-
placement: "bottom",
|
|
944
|
-
orderedModifiers: [],
|
|
945
|
-
options: Object.assign({}, re, s),
|
|
946
|
-
modifiersData: {},
|
|
947
|
-
elements: {
|
|
948
|
-
reference: o,
|
|
949
|
-
popper: a
|
|
950
|
-
},
|
|
951
|
-
attributes: {},
|
|
952
|
-
styles: {}
|
|
953
|
-
}, p = [], y = !1, d = {
|
|
954
|
-
state: u,
|
|
955
|
-
setOptions: function(w) {
|
|
956
|
-
var c = typeof w == "function" ? w(u.options) : w;
|
|
957
|
-
v(), u.options = Object.assign({}, s, u.options, c), u.scrollParents = {
|
|
958
|
-
reference: tt(o) ? dt(o) : o.contextElement ? dt(o.contextElement) : [],
|
|
959
|
-
popper: dt(a)
|
|
960
|
-
};
|
|
961
|
-
var f = Pi(Ci([].concat(n, u.options.modifiers)));
|
|
962
|
-
return u.orderedModifiers = f.filter(function(b) {
|
|
963
|
-
return b.enabled;
|
|
964
|
-
}), m(), d.update();
|
|
965
|
-
},
|
|
966
|
-
// Sync update – it will always be executed, even if not necessary. This
|
|
967
|
-
// is useful for low frequency updates where sync behavior simplifies the
|
|
968
|
-
// logic.
|
|
969
|
-
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
970
|
-
// prefer the async Popper#update method
|
|
971
|
-
forceUpdate: function() {
|
|
972
|
-
if (!y) {
|
|
973
|
-
var w = u.elements, c = w.reference, f = w.popper;
|
|
974
|
-
if (oe(c, f)) {
|
|
975
|
-
u.rects = {
|
|
976
|
-
reference: Si(c, mt(f), u.options.strategy === "fixed"),
|
|
977
|
-
popper: jt(f)
|
|
978
|
-
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) {
|
|
979
|
-
return u.modifiersData[_.name] = Object.assign({}, _.data);
|
|
980
|
-
});
|
|
981
|
-
for (var b = 0; b < u.orderedModifiers.length; b++) {
|
|
982
|
-
if (u.reset === !0) {
|
|
983
|
-
u.reset = !1, b = -1;
|
|
984
|
-
continue;
|
|
985
|
-
}
|
|
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,
|
|
989
|
-
options: S,
|
|
990
|
-
name: M,
|
|
991
|
-
instance: d
|
|
992
|
-
}) || u);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
},
|
|
997
|
-
// Async and optimistically optimized update – it will not be executed if
|
|
998
|
-
// not necessary (debounced to run at most once-per-tick)
|
|
999
|
-
update: Li(function() {
|
|
1000
|
-
return new Promise(function(g) {
|
|
1001
|
-
d.forceUpdate(), g(u);
|
|
1002
|
-
});
|
|
1003
|
-
}),
|
|
1004
|
-
destroy: function() {
|
|
1005
|
-
v(), y = !0;
|
|
1006
|
-
}
|
|
1007
|
-
};
|
|
1008
|
-
if (!oe(o, a))
|
|
1009
|
-
return d;
|
|
1010
|
-
d.setOptions(h).then(function(g) {
|
|
1011
|
-
!y && h.onFirstUpdate && h.onFirstUpdate(g);
|
|
1012
|
-
});
|
|
1013
|
-
function m() {
|
|
1014
|
-
u.orderedModifiers.forEach(function(g) {
|
|
1015
|
-
var w = g.name, c = g.options, f = c === void 0 ? {} : c, b = g.effect;
|
|
1016
|
-
if (typeof b == "function") {
|
|
1017
|
-
var E = b({
|
|
1018
|
-
state: u,
|
|
1019
|
-
name: w,
|
|
1020
|
-
instance: d,
|
|
1021
|
-
options: f
|
|
1022
|
-
}), x = function() {
|
|
1023
|
-
};
|
|
1024
|
-
p.push(E || x);
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
function v() {
|
|
1029
|
-
p.forEach(function(g) {
|
|
1030
|
-
return g();
|
|
1031
|
-
}), p = [];
|
|
1032
|
-
}
|
|
1033
|
-
return d;
|
|
1034
|
-
};
|
|
1035
|
-
}
|
|
1036
|
-
var Xi = [ni, xi, ei, Ne, bi, pi, Oi, Ge, mi], Hi = /* @__PURE__ */ Yi({
|
|
1037
|
-
defaultModifiers: Xi
|
|
1038
|
-
});
|
|
1039
|
-
class _t {
|
|
1040
|
-
constructor(t, e) {
|
|
1041
|
-
this.element = t, this.touch1 = null, this.touch2 = null, this.touchStartX = null, this.touchStartY = null, this.touchEndX = null, this.touchEndY = null, this.touchMove1 = null, this.touchMove2 = null, this.touchMoveX = null, this.touchMoveY = null, this.velocityX = null, this.velocityY = null, this.longPressTimer = null, this.doubleTapTimer = null, this.doubleTapWaiting = !1, this.thresholdX = 0, this.thresholdY = 0, this.disregardVelocityThresholdX = 0, this.disregardVelocityThresholdY = 0, this.swipingHorizontal = !1, this.swipingVertical = !1, this.swipingDirection = null, this.swipedHorizontal = !1, this.swipedVertical = !1, this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null, this.handlers = {
|
|
1042
|
-
panstart: [],
|
|
1043
|
-
panmove: [],
|
|
1044
|
-
panend: [],
|
|
1045
|
-
swipeleft: [],
|
|
1046
|
-
swiperight: [],
|
|
1047
|
-
swipeup: [],
|
|
1048
|
-
swipedown: [],
|
|
1049
|
-
tap: [],
|
|
1050
|
-
doubletap: [],
|
|
1051
|
-
longpress: [],
|
|
1052
|
-
pinch: [],
|
|
1053
|
-
pinchend: [],
|
|
1054
|
-
rotate: [],
|
|
1055
|
-
rotateend: []
|
|
1056
|
-
}, this._onTouchStart = this.onTouchStart.bind(this), this._onTouchMove = this.onTouchMove.bind(this), this._onTouchEnd = this.onTouchEnd.bind(this), this.opts = Object.assign({}, _t.defaults, e), this.element.addEventListener("touchstart", this._onTouchStart, Z), this.element.addEventListener("touchmove", this._onTouchMove, Z), this.element.addEventListener("touchend", this._onTouchEnd, Z), this.opts.mouseSupport && !("ontouchstart" in window) && (this.element.addEventListener("mousedown", this._onTouchStart, Z), document.addEventListener("mousemove", this._onTouchMove, Z), document.addEventListener("mouseup", this._onTouchEnd, Z));
|
|
1057
|
-
}
|
|
1058
|
-
destroy() {
|
|
1059
|
-
var t, e;
|
|
1060
|
-
this.element.removeEventListener("touchstart", this._onTouchStart), this.element.removeEventListener("touchmove", this._onTouchMove), this.element.removeEventListener("touchend", this._onTouchEnd), this.element.removeEventListener("mousedown", this._onTouchStart), document.removeEventListener("mousemove", this._onTouchMove), document.removeEventListener("mouseup", this._onTouchEnd), clearTimeout((t = this.longPressTimer) !== null && t !== void 0 ? t : void 0), clearTimeout((e = this.doubleTapTimer) !== null && e !== void 0 ? e : void 0);
|
|
1061
|
-
}
|
|
1062
|
-
on(t, e) {
|
|
1063
|
-
if (this.handlers[t])
|
|
1064
|
-
return this.handlers[t].push(e), {
|
|
1065
|
-
type: t,
|
|
1066
|
-
fn: e,
|
|
1067
|
-
cancel: () => this.off(t, e)
|
|
1068
|
-
};
|
|
1069
|
-
}
|
|
1070
|
-
off(t, e) {
|
|
1071
|
-
if (this.handlers[t]) {
|
|
1072
|
-
const n = this.handlers[t].indexOf(e);
|
|
1073
|
-
n !== -1 && this.handlers[t].splice(n, 1);
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
fire(t, e) {
|
|
1077
|
-
for (let n = 0; n < this.handlers[t].length; n++)
|
|
1078
|
-
this.handlers[t][n](e);
|
|
1079
|
-
}
|
|
1080
|
-
onTouchStart(t) {
|
|
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;
|
|
1082
|
-
let D = !1;
|
|
1083
|
-
if (t.type !== "mousedown") {
|
|
1084
|
-
if (this.touch1 || (this.touch1 = t.changedTouches[0], D = !0), (D && t.changedTouches.length > 1 || !D) && !this.touch2) {
|
|
1085
|
-
this.touch2 = [...t.changedTouches].find((P) => {
|
|
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);
|
|
1089
|
-
return;
|
|
1090
|
-
}
|
|
1091
|
-
if (!D)
|
|
1092
|
-
return;
|
|
1093
|
-
}
|
|
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));
|
|
1095
|
-
}
|
|
1096
|
-
onTouchMove(t) {
|
|
1097
|
-
var e, n, r, s, l, o, a, h, u, p, y, d, m;
|
|
1098
|
-
if (t.type === "mousemove" && (!this.touchStartX || this.touchEndX !== null))
|
|
1099
|
-
return;
|
|
1100
|
-
let v, g;
|
|
1101
|
-
if (t.type !== "mousemove" && (v = [...t.changedTouches].find((w) => {
|
|
1102
|
-
var c;
|
|
1103
|
-
return w.identifier === ((c = this.touch1) === null || c === void 0 ? void 0 : c.identifier);
|
|
1104
|
-
}), this.touchMove1 = v || this.touchMove1, g = [...t.changedTouches].find((w) => {
|
|
1105
|
-
var c;
|
|
1106
|
-
return w.identifier === ((c = this.touch2) === null || c === void 0 ? void 0 : c.identifier);
|
|
1107
|
-
}), this.touchMove2 = g || this.touchMove2), t.type === "mousemove" || v) {
|
|
1108
|
-
const w = (t.type === "mousemove" ? t.screenX : (e = v?.screenX) !== null && e !== void 0 ? e : 0) - ((n = this.touchStartX) !== null && n !== void 0 ? n : 0);
|
|
1109
|
-
this.velocityX = w - ((r = this.touchMoveX) !== null && r !== void 0 ? r : 0), this.touchMoveX = w;
|
|
1110
|
-
const c = (t.type === "mousemove" ? t.screenY : (s = v?.screenY) !== null && s !== void 0 ? s : 0) - ((l = this.touchStartY) !== null && l !== void 0 ? l : 0);
|
|
1111
|
-
this.velocityY = c - ((o = this.touchMoveY) !== null && o !== void 0 ? o : 0), this.touchMoveY = c;
|
|
1112
|
-
const f = Math.abs(this.touchMoveX), b = Math.abs(this.touchMoveY);
|
|
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);
|
|
1114
|
-
}
|
|
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));
|
|
1116
|
-
}
|
|
1117
|
-
onTouchEnd(t) {
|
|
1118
|
-
var e, n, r, s, l, o, a, h, u, p;
|
|
1119
|
-
let y;
|
|
1120
|
-
if (t.type !== "mouseup" && (y = [...t.changedTouches].find((d) => {
|
|
1121
|
-
var m;
|
|
1122
|
-
return d.identifier === ((m = this.touch1) === null || m === void 0 ? void 0 : m.identifier);
|
|
1123
|
-
}), [...t.touches].find((d) => {
|
|
1124
|
-
var m;
|
|
1125
|
-
return d.identifier === ((m = this.touch1) === null || m === void 0 ? void 0 : m.identifier);
|
|
1126
|
-
}) || (this.touch1 = null, this.touchMove1 = null), [...t.touches].find((d) => {
|
|
1127
|
-
var m;
|
|
1128
|
-
return d.identifier === ((m = this.touch2) === null || m === void 0 ? void 0 : m.identifier);
|
|
1129
|
-
}) || (this.touch2 = null, this.touchMove2 = null)), !(t.type === "mouseup" && (!this.touchStartX || this.touchEndX !== null))) {
|
|
1130
|
-
if (t.type === "mouseup" || y) {
|
|
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);
|
|
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;
|
|
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)));
|
|
1134
|
-
}
|
|
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);
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
_t.defaults = {
|
|
1140
|
-
threshold: (i, t) => Math.max(25, Math.floor(0.15 * (i === "x" ? window.innerWidth || document.body.clientWidth : window.innerHeight || document.body.clientHeight))),
|
|
1141
|
-
velocityThreshold: 10,
|
|
1142
|
-
disregardVelocityThreshold: (i, t) => Math.floor(0.5 * (i === "x" ? t.element.clientWidth : t.element.clientHeight)),
|
|
1143
|
-
pressThreshold: 8,
|
|
1144
|
-
diagonalSwipes: !1,
|
|
1145
|
-
diagonalLimit: 15,
|
|
1146
|
-
longPressTime: 500,
|
|
1147
|
-
doubleTapTime: 300,
|
|
1148
|
-
mouseSupport: !0
|
|
1149
|
-
};
|
|
1150
|
-
let Z = !1;
|
|
1096
|
+
var TinyGesture_default = TinyGesture, passiveIfSupported = !1;
|
|
1151
1097
|
try {
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
.
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
.
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
}
|
|
1197
|
-
.
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
u = ["input", "change"];
|
|
1503
|
-
break;
|
|
1504
|
-
}
|
|
1505
|
-
const y = u.length;
|
|
1506
|
-
for (let d = 0; d < y; ++d) {
|
|
1507
|
-
const m = u[d];
|
|
1508
|
-
h.el.forEach((v) => {
|
|
1509
|
-
this.#e.add(v, m, (g) => {
|
|
1510
|
-
if (!k.isWait || this.layMng.getFrmDisabled(h.id) || m === G && g.key !== "Enter") return;
|
|
1511
|
-
const w = v.dataset;
|
|
1512
|
-
for (const [c, f] of Object.entries(w)) this.val.setVal_Nochk("tmp", `sn.event.domdata.${c}`, f);
|
|
1513
|
-
k.fire(e, g);
|
|
1514
|
-
}), d === 0 && this.#t.add(
|
|
1515
|
-
v,
|
|
1516
|
-
() => this.#g(v) ? (v.focus(), !0) : !1,
|
|
1517
|
-
() => {
|
|
1518
|
-
}
|
|
1519
|
-
);
|
|
1520
|
-
});
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
return L.setEvt2Fnc(s, n, () => this.main.resumeByJumpOrCall(t)), !1;
|
|
1524
|
-
}
|
|
1525
|
-
#g(t) {
|
|
1526
|
-
if (!t || t.offsetParent === null) return !1;
|
|
1527
|
-
let e = t;
|
|
1528
|
-
do {
|
|
1529
|
-
if (getComputedStyle(e).display === "none" || e.dataset.focus === "false" || e?.disabled) return !1;
|
|
1530
|
-
e = e.parentElement;
|
|
1531
|
-
} while (e);
|
|
1532
|
-
return !0;
|
|
1533
|
-
}
|
|
1534
|
-
// フォーカス移動
|
|
1535
|
-
#w(t) {
|
|
1536
|
-
const { add: e, del: n, to: r } = t;
|
|
1537
|
-
if (e?.startsWith("dom=")) {
|
|
1538
|
-
const s = L.getHtmlElmList(e);
|
|
1539
|
-
if (s.el.length === 0 && J(t, "need_err", !0)) throw `HTML内にセレクタ(${s.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
|
|
1540
|
-
return s.el.forEach((l) => this.#t.add(
|
|
1541
|
-
l,
|
|
1542
|
-
() => this.#g(l) ? (l.focus(), !0) : !1,
|
|
1543
|
-
() => {
|
|
1544
|
-
}
|
|
1545
|
-
)), !1;
|
|
1546
|
-
}
|
|
1547
|
-
if (n?.startsWith("dom=")) {
|
|
1548
|
-
const s = L.getHtmlElmList(n);
|
|
1549
|
-
if (s.el.length === 0 && J(t, "need_err", !0)) throw `HTML内にセレクタ(${s.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
|
|
1550
|
-
return s.el.forEach((l) => this.#t.remove(l)), !1;
|
|
1551
|
-
}
|
|
1552
|
-
if (!r) throw "[set_focus] add か to は必須です";
|
|
1553
|
-
switch (r) {
|
|
1554
|
-
case "null":
|
|
1555
|
-
this.#t.blur();
|
|
1556
|
-
break;
|
|
1557
|
-
case "next":
|
|
1558
|
-
this.#t.next();
|
|
1559
|
-
break;
|
|
1560
|
-
case "prev":
|
|
1561
|
-
this.#t.prev();
|
|
1562
|
-
break;
|
|
1563
|
-
}
|
|
1564
|
-
return !1;
|
|
1565
|
-
}
|
|
1566
|
-
// キー押しっぱなしスキップ中か
|
|
1567
|
-
get isSkipping() {
|
|
1568
|
-
return k.isSkipping ? !0 : Object.keys(this.#r).some(
|
|
1569
|
-
(t) => this.#r[t] === 2
|
|
1570
|
-
/* PUSH_REPEATING */
|
|
1571
|
-
);
|
|
1572
|
-
}
|
|
1573
|
-
// 0:no push 1:one push 2:push repeating
|
|
1574
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
1575
|
-
#r = {
|
|
1576
|
-
Alt: 0,
|
|
1577
|
-
Meta: 0,
|
|
1578
|
-
// COMMANDキー
|
|
1579
|
-
Control: 0,
|
|
1580
|
-
ArrowDown: 0,
|
|
1581
|
-
End: 0,
|
|
1582
|
-
Enter: 0,
|
|
1583
|
-
Escape: 0,
|
|
1584
|
-
" ": 0,
|
|
1585
|
-
GoBack: 0
|
|
1586
|
-
/* NO_PUSH */
|
|
1587
|
-
// AndroidのBackキーだと思う
|
|
1588
|
-
};
|
|
1589
|
-
}
|
|
1590
|
-
export {
|
|
1591
|
-
Fi as EventMng
|
|
1098
|
+
window.addEventListener("test", null, Object.defineProperty({}, "passive", { get: function() {
|
|
1099
|
+
passiveIfSupported = { passive: !0 };
|
|
1100
|
+
} }));
|
|
1101
|
+
} catch {}
|
|
1102
|
+
var eDownKeys = /* @__PURE__ */ function(e) {
|
|
1103
|
+
return e[e.NO_PUSH = 0] = "NO_PUSH", e[e.ONE_PUSH = 1] = "ONE_PUSH", e[e.PUSH_REPEATING = 2] = "PUSH_REPEATING", e;
|
|
1104
|
+
}(eDownKeys || {}), EventMng = class {
|
|
1105
|
+
#e = new EventListenerCtn();
|
|
1106
|
+
#t;
|
|
1107
|
+
#n;
|
|
1108
|
+
#r = new Map([[0, ""], [1, "middle"]]);
|
|
1109
|
+
constructor(n, r, a, o, u, d, f, h, v) {
|
|
1110
|
+
if (this.cfg = n, this.hTag = r, this.appPixi = a, this.main = o, this.layMng = u, this.val = d, this.scrItr = h, this.sys = v, r.clear_event = (e) => ReadingState.clear_event(e), r.event = (e) => this.#_(e), r.set_cancel_skip = () => !1, r.set_focus = (e) => this.#y(e), this.#t = new FocusMng(a.view, v), f.setEvtMng(this), h.setOtherObj(this, u), TxtLayer.setEvtMng(this, v, h), u.setEvtMng(this), Reading.setFcs(this.#t), v.setFire((e, t) => Reading.fire(e, t)), CmnLib.isDbg) {
|
|
1111
|
+
let e = { pause: () => {
|
|
1112
|
+
if (!Reading.isWait) return;
|
|
1113
|
+
let e = {};
|
|
1114
|
+
h.recodeDesign(e), v.callHook("_enterDesign", e), v.send2Dbg("_enterDesign", e);
|
|
1115
|
+
} };
|
|
1116
|
+
e.attach = e.stopOnEntry = e.stopOnStep = e.stopOnStepIn = e.stopOnStepOut = e.stopOnBackstep = e.pause, v.addHook((t) => e[t]?.());
|
|
1117
|
+
}
|
|
1118
|
+
addStyle("\n.sn_hint {\n background-color: #3c3225;\n color: white;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 1.2em;\n z-index: 10000;\n pointer-events: none;\n user-select: none;\n}\n\n.sn_hint_ar,\n.sn_hint_ar::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n}\n.sn_hint_ar {\n visibility: hidden;\n}\n.sn_hint_ar::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n}\n\n.sn_hint[data-popper-placement^='top'] > .sn_hint_ar {bottom: -4px;}\n.sn_hint[data-popper-placement^='bottom'] > .sn_hint_ar {top: -4px;}\n.sn_hint[data-popper-placement^='left'] > .sn_hint_ar {right: -4px;}\n.sn_hint[data-popper-placement^='right'] > .sn_hint_ar {left: -4px;}\n"), o.cvs.parentElement?.insertAdjacentHTML("beforeend", "\n<div class=\"sn_hint\" role=\"tooltip\">\n <span>Dummy</span>\n <div class=\"sn_hint_ar\" data-popper-arrow></div>\n</div>"), this.#f = document.querySelector(".sn_hint"), this.#p = this.#f.querySelector("span"), this.#m = createPopper(this.#d, this.#f), this.#f.hidden = !0, a.stage.interactive = !0, this.#e.add(document.body, EVNM_KEY, (e) => this.#a(e)), this.#e.add(document.body, "keyup", () => ReadingState.resetFired()), this.#e.add(o.cvs, "contextmenu", (e) => {
|
|
1119
|
+
let t = this.#o(e) + "rightclick";
|
|
1120
|
+
Reading.fire(t, e, !0), e.preventDefault();
|
|
1121
|
+
});
|
|
1122
|
+
let { width: y, height: b } = n.oCfg.window, x = Math.floor(y > b ? b / 3 : y / 3);
|
|
1123
|
+
this.#n = new TinyGesture_default(o.cvs, {
|
|
1124
|
+
velocityThreshold: 0,
|
|
1125
|
+
disregardVelocityThreshold: (e) => Math.floor(x * (e === "x" ? 1 : .5))
|
|
1126
|
+
});
|
|
1127
|
+
let S = !1;
|
|
1128
|
+
this.#n.on("tap", (e) => {
|
|
1129
|
+
if (S) return;
|
|
1130
|
+
if (e instanceof TouchEvent) {
|
|
1131
|
+
Reading.fire("click", e, !0), ReadingState.resetFired();
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
if (e.button > 1) return;
|
|
1135
|
+
let t = this.#o(e) + `${this.#r.get(e.button) ?? ""}click`;
|
|
1136
|
+
Reading.fire(t, e, !0), ReadingState.resetFired();
|
|
1137
|
+
}), this.#e.add(window, "pointerout", () => ReadingState.resetFired()), this.#n.on("longpress", (e) => {
|
|
1138
|
+
if (S = !0, e instanceof TouchEvent) {
|
|
1139
|
+
Reading.fire("longpress", e, !0);
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
let t = this.#o(e) + `${this.#r.get(e.button) ?? ""}longpress`;
|
|
1143
|
+
Reading.fire(t, e, !0);
|
|
1144
|
+
}), this.#n.on("panend", () => {
|
|
1145
|
+
S && queueMicrotask(() => {
|
|
1146
|
+
S = !1;
|
|
1147
|
+
});
|
|
1148
|
+
}), [
|
|
1149
|
+
"swiperight",
|
|
1150
|
+
"swipeleft",
|
|
1151
|
+
"swipeup",
|
|
1152
|
+
"swipedown"
|
|
1153
|
+
].forEach((e) => {
|
|
1154
|
+
this.#n.on(e, (t) => {
|
|
1155
|
+
if (t instanceof TouchEvent) {
|
|
1156
|
+
Reading.fire(e, t, !0);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
let n = this.#o(t) + e;
|
|
1160
|
+
Reading.fire(n, t, !0);
|
|
1161
|
+
});
|
|
1162
|
+
});
|
|
1163
|
+
let C = () => d.setVal_Nochk("tmp", "const.sn.navigator.language", navigator.language);
|
|
1164
|
+
this.#e.add(globalThis, "languagechange", (e) => {
|
|
1165
|
+
C(), Reading.fire("sn:chgNavLang", e), clearTextureCache();
|
|
1166
|
+
}), C();
|
|
1167
|
+
let w = (e) => {
|
|
1168
|
+
CmnLib.isDarkMode = e.matches, d.setVal_Nochk("tmp", "const.sn.isDarkMode", CmnLib.isDarkMode);
|
|
1169
|
+
}, T = globalThis.matchMedia("(prefers-color-scheme: dark)");
|
|
1170
|
+
w(T), this.#e.add(T, "change", (e) => {
|
|
1171
|
+
w(e), Reading.fire("sn:chgDarkMode", e);
|
|
1172
|
+
});
|
|
1173
|
+
let E = (e, t) => {};
|
|
1174
|
+
"WheelEvent" in globalThis && (this.#e.add(o.cvs, "wheel", (e) => this.#s(e), { passive: !0 }), this.#i = (e) => this.#e.add(e, "wheel", (e) => this.#s(e), { passive: !0 }), E = (e, t) => e.add(o.cvs, "wheel", (e) => {
|
|
1175
|
+
e.deltaY <= 0 || (e.stopPropagation(), t());
|
|
1176
|
+
})), Reading.init(n, r, o, d, h, u, this, f, E), import("./gamepad.js").then(__toDynamicImportESM()).then(({ GamepadListener: e }) => {
|
|
1177
|
+
let n = new e({
|
|
1178
|
+
analog: !1,
|
|
1179
|
+
deadZone: .3
|
|
1180
|
+
});
|
|
1181
|
+
CmnLib.debugLog && (n.on("gamepad:connected", ({ detail: e }) => console.log(`👺<'gamepad:connected' index:${String(e.index)} id:${e.gamepad.id}`)), n.on("gamepad:disconnected", ({ detail: e }) => console.log(`👺<'gamepad:disconnected' index:${String(e.index)} id:${e.gamepad.id}`)));
|
|
1182
|
+
let r = [
|
|
1183
|
+
"",
|
|
1184
|
+
"ArrowUp",
|
|
1185
|
+
"",
|
|
1186
|
+
"ArrowLeft",
|
|
1187
|
+
"",
|
|
1188
|
+
"ArrowRight",
|
|
1189
|
+
"",
|
|
1190
|
+
"ArrowDown",
|
|
1191
|
+
""
|
|
1192
|
+
], i = [0, 0];
|
|
1193
|
+
n.on("gamepad:axis", ({ detail: e }) => {
|
|
1194
|
+
if (!document.hasFocus()) return;
|
|
1195
|
+
i[e.axis] = e.value;
|
|
1196
|
+
let [n = 0, a = 0] = i, o = r[(a + 1) * 3 + (n + 1)];
|
|
1197
|
+
if (!o) return;
|
|
1198
|
+
let s = this.#t.getFocus();
|
|
1199
|
+
(!s || s instanceof Container ? globalThis : s).dispatchEvent(new KeyboardEvent(EVNM_KEY, {
|
|
1200
|
+
key: o,
|
|
1201
|
+
bubbles: !0
|
|
1202
|
+
})), !(!s || s instanceof Container) && (Reading.cancelAutoSkip(), s.getAttribute("type") === "range" && s.dispatchEvent(new InputEvent("input", { bubbles: !0 })));
|
|
1203
|
+
}), n.on("gamepad:button", (e) => {
|
|
1204
|
+
if (document.hasFocus()) if (e.detail.button % 2 == 0) {
|
|
1205
|
+
Reading.cancelAutoSkip();
|
|
1206
|
+
let e = this.#t.getFocus();
|
|
1207
|
+
(!e || e instanceof Container ? document.body : e).dispatchEvent(new KeyboardEvent(EVNM_KEY, {
|
|
1208
|
+
key: "Enter",
|
|
1209
|
+
bubbles: !0
|
|
1210
|
+
}));
|
|
1211
|
+
} else Reading.fire("middleclick", e, !0);
|
|
1212
|
+
}), n.start();
|
|
1213
|
+
}), this.#e.add(document, "keyup", (e) => {
|
|
1214
|
+
e.isComposing || e.key in this.#b && (this.#b[e.key] = eDownKeys.NO_PUSH);
|
|
1215
|
+
}), d.defTmp("const.sn.key.alternate", () => this.#b.Alt > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.command", () => this.#b.Meta > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.control", () => this.#b.Control > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.end", () => this.#b.End > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.escape", () => this.#b.Escape > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.back", () => this.#b.GoBack > eDownKeys.NO_PUSH);
|
|
1216
|
+
}
|
|
1217
|
+
resvFlameEvent(e) {
|
|
1218
|
+
this.#e.add(e, EVNM_KEY, (e) => this.#a(e)), this.#e.add(e, "contextmenu", (e) => {
|
|
1219
|
+
Reading.fire(this.#o(e) + "rightclick", e, !0), e.preventDefault();
|
|
1220
|
+
}), this.#i(e), this.#e.add(e, EVNM_CLICK, (e) => {
|
|
1221
|
+
if (e instanceof TouchEvent) {
|
|
1222
|
+
Reading.fire("click", e, !0);
|
|
1223
|
+
return;
|
|
1224
|
+
}
|
|
1225
|
+
if (e.button > 1) return;
|
|
1226
|
+
let t = this.#o(e) + `${this.#r.get(e.button) ?? ""}click`;
|
|
1227
|
+
Reading.fire(t, e, !0);
|
|
1228
|
+
}), this.#e.add(e, "pointerup", () => ReadingState.resetFired()), this.#e.add(e, "pointerout", () => ReadingState.resetFired());
|
|
1229
|
+
}
|
|
1230
|
+
#i = (e) => {};
|
|
1231
|
+
#a(e) {
|
|
1232
|
+
e.isComposing || (e.key in this.#b && (this.#b[e.key] = e.repeat ? eDownKeys.PUSH_REPEATING : eDownKeys.ONE_PUSH), e.preventDefault(), Reading.fire(SysBase.modKey(e) + e.key, e, !0));
|
|
1233
|
+
}
|
|
1234
|
+
#o(e) {
|
|
1235
|
+
return (e.altKey ? "alt+" : "") + (e.ctrlKey ? "ctrl+" : "") + (e.metaKey ? "meta+" : "") + (e.shiftKey ? "shift+" : "");
|
|
1236
|
+
}
|
|
1237
|
+
#s(e) {
|
|
1238
|
+
if (this.#c) {
|
|
1239
|
+
this.#l = !0;
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
this.#c = !0, this.#u();
|
|
1243
|
+
let t = this.#o(e) + (e.deltaY > 0 ? "downwheel" : "upwheel");
|
|
1244
|
+
Reading.fire(t, e, !0);
|
|
1245
|
+
}
|
|
1246
|
+
#c = !1;
|
|
1247
|
+
#l = !1;
|
|
1248
|
+
#u() {
|
|
1249
|
+
setTimeout(() => {
|
|
1250
|
+
if (this.#l) {
|
|
1251
|
+
this.#l = !1, this.#u();
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
this.#c = !1;
|
|
1255
|
+
}, 250);
|
|
1256
|
+
}
|
|
1257
|
+
destroy() {
|
|
1258
|
+
for (let e of Array.from(document.getElementsByClassName("sn_hint"))) e.parentElement?.removeChild(e);
|
|
1259
|
+
this.#n.destroy(), Reading.destroy(), this.#t.destroy(), this.#e.clear();
|
|
1260
|
+
}
|
|
1261
|
+
unButton(e) {
|
|
1262
|
+
this.#t.remove(e);
|
|
1263
|
+
}
|
|
1264
|
+
button(e, t, n, i, a) {
|
|
1265
|
+
!e.fn && !e.label && !e.url && this.main.errScript("fnまたはlabelまたはurlは必須です"), e.fn ??= this.scrItr.scriptFn, t.interactive = !0, t.cursor = "pointer";
|
|
1266
|
+
let c = e.key?.toLowerCase() ?? " ", l = argChk_Boolean(e, "global", !1);
|
|
1267
|
+
ReadingState.setEvt2Fnc(l, c, () => this.main.resumeByJumpOrCall(e)), t.on(EVNM_BUTTON, (e) => {
|
|
1268
|
+
e.preventDefault?.(), Reading.fire(c, e, !0);
|
|
1269
|
+
});
|
|
1270
|
+
let u = e.hint ? () => this.#g(e, t) : () => {}, f = () => {
|
|
1271
|
+
n(), this.#f.hidden = !0;
|
|
1272
|
+
}, g = () => (u(), i());
|
|
1273
|
+
if (t.on("pointerover", g), t.on("pointerout", () => {
|
|
1274
|
+
this.#t.isFocus(t) ? g() : f();
|
|
1275
|
+
}), t.on("pointerdown", () => {
|
|
1276
|
+
this.#f.hidden = !0;
|
|
1277
|
+
let e = this.#t.getFocus();
|
|
1278
|
+
a(), e instanceof Button && e.normal();
|
|
1279
|
+
}), t.on("pointerup", CmnLib.isMobile ? f : () => {
|
|
1280
|
+
this.#t.isFocus(t) ? g() : f();
|
|
1281
|
+
}), this.#t.add(t, g, f), e.clickse && (e.clicksebuf ??= "SYS", this.cfg.searchPath(e.clickse, SEARCH_PATH_ARG_EXT.SOUND), t.on("pointerdown", () => this.hTag.playse({
|
|
1282
|
+
fn: e.clickse,
|
|
1283
|
+
...e.clicksebuf ? { buf: e.clicksebuf } : {},
|
|
1284
|
+
join: !1
|
|
1285
|
+
}))), e.enterse && (e.entersebuf ??= "SYS", this.cfg.searchPath(e.enterse, SEARCH_PATH_ARG_EXT.SOUND), t.on("pointerover", () => this.hTag.playse({
|
|
1286
|
+
fn: e.enterse,
|
|
1287
|
+
...e.entersebuf ? { buf: e.entersebuf } : {},
|
|
1288
|
+
join: !1
|
|
1289
|
+
}))), e.leavese && (e.leavesebuf ??= "SYS", this.cfg.searchPath(e.leavese, SEARCH_PATH_ARG_EXT.SOUND), t.on("pointerout", () => this.hTag.playse({
|
|
1290
|
+
fn: e.leavese,
|
|
1291
|
+
...e.leavesebuf ? { buf: e.leavesebuf } : {},
|
|
1292
|
+
join: !1
|
|
1293
|
+
}))), e.onenter) {
|
|
1294
|
+
let n = c + e.onenter.toLowerCase(), r = {
|
|
1295
|
+
fn: e.fn,
|
|
1296
|
+
label: e.onenter,
|
|
1297
|
+
call: !0,
|
|
1298
|
+
key: n
|
|
1299
|
+
};
|
|
1300
|
+
ReadingState.setEvt2Fnc(l, n, () => this.main.resumeByJumpOrCall(r)), t.on("pointerover", (e) => Reading.fire(n, e));
|
|
1301
|
+
}
|
|
1302
|
+
if (e.onleave) {
|
|
1303
|
+
let n = c + e.onleave.toLowerCase(), r = {
|
|
1304
|
+
fn: e.fn,
|
|
1305
|
+
label: e.onleave,
|
|
1306
|
+
call: !0,
|
|
1307
|
+
key: n
|
|
1308
|
+
};
|
|
1309
|
+
ReadingState.setEvt2Fnc(l, n, () => this.main.resumeByJumpOrCall(r)), t.on("pointerout", (e) => Reading.fire(n, e));
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
#d = { getBoundingClientRect: (e = 0, t = 0) => DOMRect.fromRect({
|
|
1313
|
+
x: e,
|
|
1314
|
+
y: t,
|
|
1315
|
+
width: 0,
|
|
1316
|
+
height: 0
|
|
1317
|
+
}) };
|
|
1318
|
+
#f;
|
|
1319
|
+
#p;
|
|
1320
|
+
#m;
|
|
1321
|
+
#h = {
|
|
1322
|
+
placement: "bottom",
|
|
1323
|
+
modifiers: [{
|
|
1324
|
+
name: "flip",
|
|
1325
|
+
options: { fallbackPlacements: ["top", "bottom"] }
|
|
1326
|
+
}]
|
|
1327
|
+
};
|
|
1328
|
+
#g(e, t) {
|
|
1329
|
+
let r = t instanceof Button ? t.getBtnBounds() : t.getBounds();
|
|
1330
|
+
if (e[":タグ名"] !== "link") {
|
|
1331
|
+
let e = t.parent.parent;
|
|
1332
|
+
r.x += e.x, r.y += e.y;
|
|
1333
|
+
}
|
|
1334
|
+
if (!e.hint) {
|
|
1335
|
+
this.#f.hidden = !0;
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1338
|
+
this.#f.style.cssText = `position:${this.#f.style.position}; transform:${this.#f.style.transform};` + (e.hint_style ?? ""), this.#p.style.cssText = "", this.#p.textContent = e.hint ?? "", this.#d.getBoundingClientRect = () => DOMRect.fromRect({
|
|
1339
|
+
x: this.sys.ofsLeft4elm + r.x * this.sys.cvsScale,
|
|
1340
|
+
y: this.sys.ofsTop4elm + r.y * this.sys.cvsScale,
|
|
1341
|
+
width: r.width,
|
|
1342
|
+
height: r.height
|
|
1343
|
+
}), this.#m.setOptions(e.hint_opt ? {
|
|
1344
|
+
...this.#h,
|
|
1345
|
+
...JSON.parse(e.hint_opt)
|
|
1346
|
+
} : this.#h).then(async () => {
|
|
1347
|
+
await this.#m.update(), this.#f.hidden = !1;
|
|
1348
|
+
}).catch((t) => console.error(mesErrJSON(e, "hint_opt", `dispHint 引数 hint_opt エラー ${t instanceof SyntaxError ? t.message : ""}`)));
|
|
1349
|
+
}
|
|
1350
|
+
hideHint() {
|
|
1351
|
+
this.#f.hidden = !0;
|
|
1352
|
+
}
|
|
1353
|
+
cvsResize() {
|
|
1354
|
+
this.hideHint();
|
|
1355
|
+
}
|
|
1356
|
+
#_(e) {
|
|
1357
|
+
let n = e.key;
|
|
1358
|
+
if (!n) throw "keyは必須です";
|
|
1359
|
+
let r = n.toLowerCase(), i = argChk_Boolean(e, "call", !1), a = argChk_Boolean(e, "global", !1), { fn: s, label: c, url: l } = e;
|
|
1360
|
+
if (argChk_Boolean(e, "del", !1)) {
|
|
1361
|
+
if (s || c || i || l) throw "fn/label/callとdelは同時指定できません";
|
|
1362
|
+
return ReadingState.clear_eventer(n, a, r), !1;
|
|
1363
|
+
}
|
|
1364
|
+
if (!s && !c && !l) throw "fn,label,url いずれかは必須です";
|
|
1365
|
+
if (e.fn ??= this.scrItr.scriptFn, n.startsWith("dom=")) {
|
|
1366
|
+
let r = ReadingState.getHtmlElmList(n);
|
|
1367
|
+
if (r.el.length === 0) {
|
|
1368
|
+
if (argChk_Boolean(e, "need_err", !0)) throw `HTML内にセレクタ(${r.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
|
|
1369
|
+
return !1;
|
|
1370
|
+
}
|
|
1371
|
+
let i = ["click", EVNM_KEY];
|
|
1372
|
+
switch (r.el[0].type ?? "") {
|
|
1373
|
+
case "checkbox":
|
|
1374
|
+
i = ["input"];
|
|
1375
|
+
break;
|
|
1376
|
+
case "range":
|
|
1377
|
+
i = ["input"];
|
|
1378
|
+
break;
|
|
1379
|
+
case "text":
|
|
1380
|
+
case "textarea":
|
|
1381
|
+
i = ["input", "change"];
|
|
1382
|
+
break;
|
|
1383
|
+
}
|
|
1384
|
+
let a = i.length;
|
|
1385
|
+
for (let e = 0; e < a; ++e) {
|
|
1386
|
+
let t = i[e];
|
|
1387
|
+
r.el.forEach((i) => {
|
|
1388
|
+
this.#e.add(i, t, (e) => {
|
|
1389
|
+
if (!Reading.isWait || this.layMng.getFrmDisabled(r.id) || t === "keydown" && e.key !== "Enter") return;
|
|
1390
|
+
let a = i.dataset;
|
|
1391
|
+
for (let [e, t] of Object.entries(a)) this.val.setVal_Nochk("tmp", `sn.event.domdata.${e}`, t);
|
|
1392
|
+
Reading.fire(n, e);
|
|
1393
|
+
}), e === 0 && this.#t.add(i, () => this.#v(i) ? (i.focus(), !0) : !1, () => {});
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
return ReadingState.setEvt2Fnc(a, r, () => this.main.resumeByJumpOrCall(e)), !1;
|
|
1398
|
+
}
|
|
1399
|
+
#v(e) {
|
|
1400
|
+
if (!e || e.offsetParent === null) return !1;
|
|
1401
|
+
let t = e;
|
|
1402
|
+
do {
|
|
1403
|
+
if (getComputedStyle(t).display === "none" || t.dataset.focus === "false" || t?.disabled) return !1;
|
|
1404
|
+
t = t.parentElement;
|
|
1405
|
+
} while (t);
|
|
1406
|
+
return !0;
|
|
1407
|
+
}
|
|
1408
|
+
#y(e) {
|
|
1409
|
+
let { add: t, del: n, to: r } = e;
|
|
1410
|
+
if (t?.startsWith("dom=")) {
|
|
1411
|
+
let n = ReadingState.getHtmlElmList(t);
|
|
1412
|
+
if (n.el.length === 0 && argChk_Boolean(e, "need_err", !0)) throw `HTML内にセレクタ(${n.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
|
|
1413
|
+
return n.el.forEach((e) => this.#t.add(e, () => this.#v(e) ? (e.focus(), !0) : !1, () => {})), !1;
|
|
1414
|
+
}
|
|
1415
|
+
if (n?.startsWith("dom=")) {
|
|
1416
|
+
let t = ReadingState.getHtmlElmList(n);
|
|
1417
|
+
if (t.el.length === 0 && argChk_Boolean(e, "need_err", !0)) throw `HTML内にセレクタ(${t.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
|
|
1418
|
+
return t.el.forEach((e) => this.#t.remove(e)), !1;
|
|
1419
|
+
}
|
|
1420
|
+
if (!r) throw "[set_focus] add か to は必須です";
|
|
1421
|
+
switch (r) {
|
|
1422
|
+
case "null":
|
|
1423
|
+
this.#t.blur();
|
|
1424
|
+
break;
|
|
1425
|
+
case "next":
|
|
1426
|
+
this.#t.next();
|
|
1427
|
+
break;
|
|
1428
|
+
case "prev":
|
|
1429
|
+
this.#t.prev();
|
|
1430
|
+
break;
|
|
1431
|
+
}
|
|
1432
|
+
return !1;
|
|
1433
|
+
}
|
|
1434
|
+
get isSkipping() {
|
|
1435
|
+
return Reading.isSkipping ? !0 : Object.keys(this.#b).some((e) => this.#b[e] === eDownKeys.PUSH_REPEATING);
|
|
1436
|
+
}
|
|
1437
|
+
#b = {
|
|
1438
|
+
Alt: eDownKeys.NO_PUSH,
|
|
1439
|
+
Meta: eDownKeys.NO_PUSH,
|
|
1440
|
+
Control: eDownKeys.NO_PUSH,
|
|
1441
|
+
ArrowDown: eDownKeys.NO_PUSH,
|
|
1442
|
+
End: eDownKeys.NO_PUSH,
|
|
1443
|
+
Enter: eDownKeys.NO_PUSH,
|
|
1444
|
+
Escape: eDownKeys.NO_PUSH,
|
|
1445
|
+
" ": eDownKeys.NO_PUSH,
|
|
1446
|
+
GoBack: eDownKeys.NO_PUSH
|
|
1447
|
+
};
|
|
1592
1448
|
};
|
|
1593
|
-
|
|
1449
|
+
export { EventMng };
|
|
1450
|
+
|
|
1451
|
+
//# sourceMappingURL=EventMng.js.map
|