@famibee/skynovel 1.48.13 → 1.63.11

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