st-comp 0.0.178 → 0.0.180

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 (185) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +3 -3
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +29 -33
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +14 -18
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +25 -30
  9. package/es/KlineConfig.cjs +1 -1
  10. package/es/KlineConfig.js +457 -419
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +13 -16
  13. package/es/KlinePlus.cjs +3 -3
  14. package/es/KlinePlus.js +140 -142
  15. package/es/Pagination.cjs +1 -1
  16. package/es/Pagination.js +274 -276
  17. package/es/PasswordPrompt.cjs +1 -1
  18. package/es/PasswordPrompt.js +3 -3
  19. package/es/Table.cjs +1 -1
  20. package/es/Table.js +21 -23
  21. package/es/User.cjs +1 -1
  22. package/es/User.js +472 -482
  23. package/es/VarSelectDialog.cjs +3 -3
  24. package/es/VarSelectDialog.js +440 -2878
  25. package/es/VarietySearch.cjs +12 -12
  26. package/es/VarietySearch.js +1199 -1176
  27. package/es/VirtualTable.cjs +1 -13
  28. package/es/VirtualTable.js +1547 -1567
  29. package/es/{_initCloneObject-da90eef0.js → _initCloneObject-346b7ee2.js} +25 -26
  30. package/es/_initCloneObject-e2f0deb9.cjs +1 -0
  31. package/es/base-62a70f61.js +288 -0
  32. package/es/base-ef747d02.cjs +5 -0
  33. package/es/config-provider-178bb43c.cjs +1 -0
  34. package/es/config-provider-2e733cae.js +58 -0
  35. package/es/dayjs.min-2c20abe6.cjs +1 -0
  36. package/es/{dayjs.min-54a4e095.js → dayjs.min-8313b006.js} +96 -93
  37. package/es/{debounce-9e323221.cjs → debounce-0b77a317.cjs} +1 -1
  38. package/es/{debounce-3cec4646.js → debounce-5f2ec4be.js} +19 -19
  39. package/es/{dropdown-82b80e8b.js → dropdown-d06edf54.js} +49 -39
  40. package/es/dropdown-f2fec683.cjs +1 -0
  41. package/es/el-button-5b08c08a.js +272 -0
  42. package/es/el-button-fc46a173.cjs +1 -0
  43. package/es/el-dialog-0b7166c9.cjs +1 -0
  44. package/es/el-dialog-d8d0da7a.js +276 -0
  45. package/es/{el-divider-fd2b4e2e.js → el-divider-2f300113.js} +1 -1
  46. package/es/{el-divider-40c50ce7.cjs → el-divider-4713d74c.cjs} +1 -1
  47. package/es/{el-empty-412fc297.js → el-empty-87a86f30.js} +57 -80
  48. package/es/el-empty-bb2b0235.cjs +1 -0
  49. package/es/el-form-item-caffd133.cjs +12 -0
  50. package/es/el-form-item-ff9c7d98.js +1267 -0
  51. package/es/el-input-6db30c8c.js +531 -0
  52. package/es/el-input-9c912678.cjs +1 -0
  53. package/es/el-input-number-05f150e5.js +311 -0
  54. package/es/el-input-number-6fe73563.cjs +1 -0
  55. package/es/el-loading-8514feaa.cjs +1 -0
  56. package/es/el-loading-93842445.js +203 -0
  57. package/es/el-menu-item-7a57c1be.cjs +1 -0
  58. package/es/el-menu-item-a886fbdd.js +768 -0
  59. package/es/el-message-8aa674f2.js +406 -0
  60. package/es/el-message-aad5b42b.cjs +1 -0
  61. package/es/el-message-box-2b6b2b68.js +550 -0
  62. package/es/el-message-box-53f355d7.cjs +1 -0
  63. package/es/el-overlay-540b2a02.js +324 -0
  64. package/es/el-overlay-96630a2e.cjs +1 -0
  65. package/es/el-popconfirm-2afdf6fb.cjs +1 -0
  66. package/es/el-popconfirm-c18d8035.js +162 -0
  67. package/es/el-popper-544fd77e.js +2412 -0
  68. package/es/el-popper-73466d7a.cjs +1 -0
  69. package/es/el-scrollbar-691cfc11.cjs +1 -0
  70. package/es/el-scrollbar-fae984e3.js +763 -0
  71. package/es/el-segmented-a7493831.js +142 -0
  72. package/es/el-segmented-b6bd3c0e.cjs +1 -0
  73. package/es/el-select-5959e837.cjs +1 -0
  74. package/es/el-select-ea8feecf.js +1251 -0
  75. package/es/el-table-column-9ef52443.js +3878 -0
  76. package/es/el-table-column-b824ac5c.cjs +14 -0
  77. package/es/el-tag-2fc9b9eb.js +116 -0
  78. package/es/el-tag-ecad6d02.cjs +1 -0
  79. package/es/index-2e331d74.js +10 -0
  80. package/es/{index-a8e9ec0f.js → index-34592e82.js} +176 -182
  81. package/es/index-3a74eae4.cjs +1 -0
  82. package/es/{index-1c41bd56.js → index-5d4e5c51.js} +3 -3
  83. package/es/{index-e348d5e8.cjs → index-694bb944.cjs} +1 -1
  84. package/es/{index-ee1cebbc.js → index-74fb90c7.js} +5 -5
  85. package/es/{index-d577b81b.js → index-8d7ae5dc.js} +2 -2
  86. package/es/index-a9095b4a.js +163 -0
  87. package/es/index-a93dd9c4.cjs +1 -0
  88. package/es/index-ebd2fd7e.cjs +1 -0
  89. package/es/index-f1c702f6.cjs +1 -0
  90. package/es/{index-19fa1fcf.cjs → index-f6afafaa.cjs} +1 -1
  91. package/es/{raf-bfbf42e4.js → raf-41aed4d4.js} +1 -1
  92. package/es/{raf-07cb6953.cjs → raf-8249652f.cjs} +1 -1
  93. package/es/{scroll-e3cb691f.js → scroll-7d352c1f.js} +2 -2
  94. package/es/{scroll-4769a65d.cjs → scroll-b108dabd.cjs} +1 -1
  95. package/es/style.css +1 -1
  96. package/es/use-global-config-03735617.cjs +1 -0
  97. package/es/use-global-config-4b185eb5.js +71 -0
  98. package/es/validator-0e688e4e.cjs +1 -0
  99. package/es/validator-d12a8f8c.js +5 -0
  100. package/es/vnode-4db20540.cjs +1 -0
  101. package/es/vnode-a0795a4b.js +70 -0
  102. package/es/{zh-cn-d883afa8.js → zh-cn-0ff32188.js} +5 -4
  103. package/es/{zh-cn-b24a7dc9.cjs → zh-cn-adf19c4b.cjs} +1 -1
  104. package/lib/bundle.js +1 -1
  105. package/lib/bundle.umd.cjs +226 -245
  106. package/lib/{index-0f16f8b0.js → index-9341884f.js} +44358 -46367
  107. package/lib/{python-e9c32bc9.js → python-5c9b3e4e.js} +1 -1
  108. package/lib/style.css +1 -1
  109. package/package.json +2 -2
  110. package/packages/KlinePlus/index.vue +2 -1
  111. package/packages/VarSelectDialog/index.vue +43 -67
  112. package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +4 -2
  113. package/packages/VarietySearch/components/FactorScreen/index.vue +6 -4
  114. package/packages/index.ts +0 -2
  115. package/src/pages/VarSelectDialog/index.vue +1 -1
  116. package/src/router/routes.ts +0 -5
  117. package/es/Dialog.cjs +0 -1
  118. package/es/Dialog.js +0 -95
  119. package/es/_commonjsHelpers-10dfc225.js +0 -8
  120. package/es/_commonjsHelpers-87b0abe8.cjs +0 -1
  121. package/es/_initCloneObject-9ccbb113.cjs +0 -1
  122. package/es/base-bdc10baa.cjs +0 -5
  123. package/es/base-d9284bf0.js +0 -304
  124. package/es/castArray-37eb9980.cjs +0 -1
  125. package/es/castArray-b0ab0165.js +0 -10
  126. package/es/config-provider-ec6b09df.cjs +0 -1
  127. package/es/config-provider-f0151e9f.js +0 -47
  128. package/es/dayjs.min-19fb125f.cjs +0 -1
  129. package/es/dropdown-b2dab5bb.cjs +0 -1
  130. package/es/el-button-34665425.js +0 -237
  131. package/es/el-button-960edd49.cjs +0 -1
  132. package/es/el-dialog-a412484e.js +0 -267
  133. package/es/el-dialog-cd484c1f.cjs +0 -1
  134. package/es/el-empty-627ec09e.cjs +0 -1
  135. package/es/el-form-item-668ba024.js +0 -1263
  136. package/es/el-form-item-e1c3104b.cjs +0 -12
  137. package/es/el-input-22e66e37.js +0 -523
  138. package/es/el-input-5163bda3.cjs +0 -1
  139. package/es/el-input-number-481e21c5.js +0 -284
  140. package/es/el-input-number-eb54cde4.cjs +0 -1
  141. package/es/el-loading-15a5501c.cjs +0 -1
  142. package/es/el-loading-d4e403ab.js +0 -187
  143. package/es/el-menu-item-404c10e5.js +0 -772
  144. package/es/el-menu-item-ac89e804.cjs +0 -1
  145. package/es/el-message-ad87b9dd.cjs +0 -1
  146. package/es/el-message-box-41f39f6d.js +0 -558
  147. package/es/el-message-box-6694f827.cjs +0 -1
  148. package/es/el-message-ef506caa.js +0 -375
  149. package/es/el-overlay-4a9fa4e1.js +0 -269
  150. package/es/el-overlay-e5d318c3.cjs +0 -1
  151. package/es/el-popconfirm-7b9183aa.js +0 -140
  152. package/es/el-popconfirm-a497b279.cjs +0 -1
  153. package/es/el-popper-14a9d493.cjs +0 -1
  154. package/es/el-popper-e73466eb.js +0 -2263
  155. package/es/el-scrollbar-45318df0.js +0 -201
  156. package/es/el-scrollbar-8bf765f2.cjs +0 -1
  157. package/es/el-segmented-3ba6d664.cjs +0 -1
  158. package/es/el-segmented-41820018.js +0 -135
  159. package/es/el-select-1d2309a1.cjs +0 -1
  160. package/es/el-select-d7a00294.js +0 -1130
  161. package/es/el-table-column-a2d0c635.js +0 -3805
  162. package/es/el-table-column-be9a76bb.cjs +0 -14
  163. package/es/el-tag-7f391090.js +0 -280
  164. package/es/el-tag-8d49d4d2.cjs +0 -1
  165. package/es/index-02ca0096.cjs +0 -5
  166. package/es/index-3120be08.js +0 -14
  167. package/es/index-5b81f4da.cjs +0 -1
  168. package/es/index-85a32a00.js +0 -59
  169. package/es/index-8d3c5e96.cjs +0 -3
  170. package/es/index-94f38460.js +0 -306
  171. package/es/index-a99a5307.cjs +0 -1
  172. package/es/index-b90c746b.cjs +0 -1
  173. package/es/index-d94bae37.cjs +0 -1
  174. package/es/index-d99fdc6d.js +0 -159
  175. package/es/use-form-common-props-592797e2.cjs +0 -2
  176. package/es/use-form-common-props-cc347a83.js +0 -171
  177. package/es/use-global-config-584b62f1.cjs +0 -1
  178. package/es/use-global-config-c7f0a7e3.js +0 -73
  179. package/es/validator-10fa54fe.js +0 -5
  180. package/es/validator-af488a9a.cjs +0 -1
  181. package/es/vnode-1b827c99.cjs +0 -1
  182. package/es/vnode-6be33bb1.js +0 -14
  183. package/packages/Dialog/index.ts +0 -8
  184. package/packages/Dialog/index.vue +0 -54
  185. package/src/pages/Dialog/index.vue +0 -16
@@ -1,31 +1,30 @@
1
- import { b as gi, d as Wn, N as mi, i as Ht, e as yi, u as bi, _ as xi, g as Gt, t as wi, w as _i } from "./base-d9284bf0.js";
1
+ import { b as De, e as ue, N as Ue, c as Y, p as Z, f as Le, u as Oe, _ as ze, j as ee, w as Ke } from "./base-62a70f61.js";
2
+ import { E as Re } from "./el-dialog-d8d0da7a.js";
3
+ import "./el-overlay-540b2a02.js";
2
4
  import "./el-tooltip-4ed993c7.js";
3
- import { b as Ei, u as Si, E as Un, a as Ti } from "./el-popper-e73466eb.js";
4
- import { E as ki } from "./el-button-34665425.js";
5
- import { u as Pi, E as Hn } from "./el-input-22e66e37.js";
6
- import "./el-tag-7f391090.js";
7
- import { E as Oi, a as Ii } from "./el-select-d7a00294.js";
8
- import { o as Di } from "./el-scrollbar-45318df0.js";
9
- import { defineComponent as Gn, useAttrs as Mi, ref as H, computed as it, onBeforeUnmount as zi, onMounted as Kn, openBlock as V, createBlock as ot, unref as M, withCtx as ne, createElementVNode as pe, normalizeClass as Et, normalizeStyle as Kt, createVNode as de, createElementBlock as Z, renderSlot as Xe, Fragment as Fe, renderList as at, createTextVNode as Jn, toDisplayString as Ve, mergeProps as Ai, withKeys as rt, withModifiers as Xn, createSlots as Ci, inject as Qn, createCommentVNode as Te, withDirectives as Ri, vShow as ji, pushScopeId as Fi, popScopeId as Vi } from "vue";
10
- import { g as $i, c as Ni } from "./_commonjsHelpers-10dfc225.js";
11
- import { E as Zn, l as Bi, c as Li, i as Wi } from "./index-ee1cebbc.js";
12
- import { V as Xi } from "./index-7ed0999e.js";
13
- import { _ as er } from "./_plugin-vue_export-helper-dad06003.js";
14
- import { U as St, I as Jt, C as tr } from "./index-94f38460.js";
15
- import { c as Yi } from "./use-form-common-props-cc347a83.js";
16
- import { a as qi } from "./index-a8e9ec0f.js";
17
- import { d as Ui } from "./debounce-3cec4646.js";
18
- import { E as Yn } from "./el-message-ef506caa.js";
19
- import "./index-3120be08.js";
20
- import "./use-global-config-c7f0a7e3.js";
5
+ import { h as ie, U as H, I as te, C as fe, p as qe, E as me, g as Me, b as We } from "./el-popper-544fd77e.js";
6
+ import { E as je } from "./el-button-5b08c08a.js";
7
+ import { i as ve, E as ge } from "./el-input-6db30c8c.js";
8
+ import "./el-tag-2fc9b9eb.js";
9
+ import { E as He, a as Ge } from "./el-select-ea8feecf.js";
10
+ import { g as Je, L as Qe } from "./el-scrollbar-fae984e3.js";
11
+ import { defineComponent as he, computed as O, useAttrs as Xe, ref as y, onBeforeUnmount as Ye, onMounted as _e, openBlock as n, createBlock as z, unref as a, withCtx as h, createElementVNode as k, normalizeClass as L, normalizeStyle as ce, createElementBlock as g, withModifiers as j, renderSlot as F, createCommentVNode as T, createVNode as $, Fragment as D, renderList as M, createTextVNode as be, toDisplayString as U, mergeProps as pe, withKeys as q, createSlots as Ze, inject as ye, pushScopeId as et, popScopeId as tt } from "vue";
12
+ import { E as Ve, l as lt, c as ot, i as at } from "./index-74fb90c7.js";
13
+ import { V as st } from "./index-7ed0999e.js";
14
+ import { _ as Se } from "./_plugin-vue_export-helper-dad06003.js";
15
+ import { a as nt } from "./index-34592e82.js";
16
+ import { d as rt } from "./debounce-5f2ec4be.js";
17
+ import { E as de } from "./el-message-8aa674f2.js";
18
+ import "./index-2e331d74.js";
19
+ import "./vnode-a0795a4b.js";
20
+ import "./scroll-7d352c1f.js";
21
+ import "./use-global-config-4b185eb5.js";
21
22
  import "./index-657047bb.js";
22
23
  import "./typescript-7ae59c4c.js";
23
- import "./index-85a32a00.js";
24
- import "./index-1c41bd56.js";
25
- import "./castArray-b0ab0165.js";
26
- import "./scroll-e3cb691f.js";
27
- import "./config-provider-f0151e9f.js";
28
- const Hi = gi({
24
+ import "./index-5d4e5c51.js";
25
+ import "./config-provider-2e733cae.js";
26
+ const ut = De({
27
+ ...ve,
29
28
  valueKey: {
30
29
  type: String,
31
30
  default: "value"
@@ -39,7 +38,7 @@ const Hi = gi({
39
38
  default: 300
40
39
  },
41
40
  placement: {
42
- type: Wn(String),
41
+ type: ue(String),
43
42
  values: [
44
43
  "top",
45
44
  "top-start",
@@ -51,8 +50,8 @@ const Hi = gi({
51
50
  default: "bottom-start"
52
51
  },
53
52
  fetchSuggestions: {
54
- type: Wn([Function, Array]),
55
- default: mi
53
+ type: ue([Function, Array]),
54
+ default: Ue
56
55
  },
57
56
  popperClass: {
58
57
  type: String,
@@ -62,2714 +61,286 @@ const Hi = gi({
62
61
  type: Boolean,
63
62
  default: !0
64
63
  },
65
- selectWhenUnmatched: {
66
- type: Boolean,
67
- default: !1
68
- },
69
- hideLoading: {
70
- type: Boolean,
71
- default: !1
72
- },
73
- teleported: Ei.teleported,
74
- highlightFirstItem: {
75
- type: Boolean,
76
- default: !1
77
- },
78
- fitInputWidth: {
79
- type: Boolean,
80
- default: !1
81
- },
82
- clearable: {
83
- type: Boolean,
84
- default: !1
85
- },
86
- disabled: {
87
- type: Boolean,
88
- default: !1
89
- },
90
- name: String,
91
- ...Si(["ariaLabel"])
92
- }), Gi = {
93
- [St]: (I) => Ht(I),
94
- [Jt]: (I) => Ht(I),
95
- [tr]: (I) => Ht(I),
96
- focus: (I) => I instanceof FocusEvent,
97
- blur: (I) => I instanceof FocusEvent,
64
+ selectWhenUnmatched: Boolean,
65
+ hideLoading: Boolean,
66
+ teleported: ie.teleported,
67
+ appendTo: ie.appendTo,
68
+ highlightFirstItem: Boolean,
69
+ fitInputWidth: Boolean
70
+ }), it = {
71
+ [H]: (o) => Y(o) || Z(o),
72
+ [te]: (o) => Y(o) || Z(o),
73
+ [fe]: (o) => Y(o) || Z(o),
74
+ focus: (o) => o instanceof FocusEvent,
75
+ blur: (o) => o instanceof FocusEvent,
98
76
  clear: () => !0,
99
- select: (I) => yi(I)
100
- }, nr = "ElAutocomplete", Ki = Gn({
101
- name: nr,
77
+ select: (o) => Le(o)
78
+ }, Ee = "ElAutocomplete", ct = he({
79
+ name: Ee,
102
80
  inheritAttrs: !1
103
- }), Ji = /* @__PURE__ */ Gn({
104
- ...Ki,
105
- props: Hi,
106
- emits: Gi,
107
- setup(I, { expose: $e, emit: Y }) {
108
- const z = I, re = Pi(), A = Mi(), he = Yi(), P = bi("autocomplete"), F = H(), W = H(), C = H(), ee = H();
109
- let J = !1, le = !1;
110
- const $ = H([]), O = H(-1), q = H(""), N = H(!1), R = H(!1), B = H(!1), X = qi(), ie = it(() => A.style), U = it(() => ($.value.length > 0 || B.value) && N.value), d = it(() => !z.hideLoading && B.value), G = it(() => F.value ? Array.from(F.value.$el.querySelectorAll("input")) : []), D = () => {
111
- U.value && (q.value = `${F.value.$el.offsetWidth}px`);
112
- }, ge = () => {
113
- O.value = -1;
114
- }, te = async (x) => {
115
- if (R.value)
81
+ }), pt = /* @__PURE__ */ he({
82
+ ...ct,
83
+ props: ut,
84
+ emits: it,
85
+ setup(o, { expose: K, emit: _ }) {
86
+ const d = o, I = O(() => qe(d, Object.keys(ve))), x = Xe(), A = Je(), f = Oe("autocomplete"), b = y(), S = y(), V = y(), c = y();
87
+ let r = !1, C = !1;
88
+ const u = y([]), t = y(-1), P = y(""), m = y(!1), E = y(!1), p = y(!1), s = nt(), B = O(() => x.style), l = O(() => (u.value.length > 0 || p.value) && m.value), W = O(() => !d.hideLoading && p.value), w = O(() => b.value ? Array.from(b.value.$el.querySelectorAll("input")) : []), G = () => {
89
+ l.value && (P.value = `${b.value.$el.offsetWidth}px`);
90
+ }, ke = () => {
91
+ t.value = -1;
92
+ }, le = async (e) => {
93
+ if (E.value)
116
94
  return;
117
- const L = (y) => {
118
- B.value = !1, !R.value && (Gt(y) ? ($.value = y, O.value = z.highlightFirstItem ? 0 : -1) : wi(nr, "autocomplete suggestions must be an array"));
95
+ const i = (v) => {
96
+ p.value = !1, !E.value && (ee(v) ? (u.value = v, t.value = d.highlightFirstItem ? 0 : -1) : We(Ee, "autocomplete suggestions must be an array"));
119
97
  };
120
- if (B.value = !0, Gt(z.fetchSuggestions))
121
- L(z.fetchSuggestions);
98
+ if (p.value = !0, ee(d.fetchSuggestions))
99
+ i(d.fetchSuggestions);
122
100
  else {
123
- const y = await z.fetchSuggestions(x, L);
124
- Gt(y) && L(y);
101
+ const v = await d.fetchSuggestions(e, i);
102
+ ee(v) && i(v);
125
103
  }
126
- }, Q = Ui(te, z.debounce), ke = (x) => {
127
- const L = !!x;
128
- if (Y(Jt, x), Y(St, x), R.value = !1, N.value || (N.value = L), !z.triggerOnFocus && !x) {
129
- R.value = !0, $.value = [];
104
+ }, oe = rt(le, d.debounce), $e = (e) => {
105
+ const i = !!e;
106
+ if (_(te, e), _(H, e), E.value = !1, m.value || (m.value = i), !d.triggerOnFocus && !e) {
107
+ E.value = !0, u.value = [];
130
108
  return;
131
109
  }
132
- Q(x);
133
- }, K = (x) => {
134
- var L;
135
- he.value || (((L = x.target) == null ? void 0 : L.tagName) !== "INPUT" || G.value.includes(document.activeElement)) && (N.value = !0);
136
- }, se = (x) => {
137
- Y(tr, x);
138
- }, ce = (x) => {
139
- le ? le = !1 : (N.value = !0, Y("focus", x), z.triggerOnFocus && !J && Q(String(z.modelValue)));
140
- }, ye = (x) => {
110
+ oe(e);
111
+ }, Ce = (e) => {
112
+ var i;
113
+ A.value || (((i = e.target) == null ? void 0 : i.tagName) !== "INPUT" || w.value.includes(document.activeElement)) && (m.value = !0);
114
+ }, we = (e) => {
115
+ _(fe, e);
116
+ }, Ne = (e) => {
117
+ var i;
118
+ if (C)
119
+ C = !1;
120
+ else {
121
+ m.value = !0, _("focus", e);
122
+ const v = (i = d.modelValue) != null ? i : "";
123
+ d.triggerOnFocus && !r && oe(String(v));
124
+ }
125
+ }, Ie = (e) => {
141
126
  setTimeout(() => {
142
- var L;
143
- if ((L = C.value) != null && L.isFocusInsideContent()) {
144
- le = !0;
127
+ var i;
128
+ if ((i = V.value) != null && i.isFocusInsideContent()) {
129
+ C = !0;
145
130
  return;
146
131
  }
147
- N.value && be(), Y("blur", x);
132
+ m.value && R(), _("blur", e);
148
133
  });
149
- }, st = () => {
150
- N.value = !1, Y(St, ""), Y("clear");
151
- }, fe = async () => {
152
- U.value && O.value >= 0 && O.value < $.value.length ? Ne($.value[O.value]) : z.selectWhenUnmatched && (Y("select", { value: z.modelValue }), $.value = [], O.value = -1);
153
- }, me = (x) => {
154
- U.value && (x.preventDefault(), x.stopPropagation(), be());
155
- }, be = () => {
156
- N.value = !1;
157
- }, lt = () => {
158
- var x;
159
- (x = F.value) == null || x.focus();
160
- }, Ye = () => {
161
- var x;
162
- (x = F.value) == null || x.blur();
163
- }, Ne = async (x) => {
164
- Y(Jt, x[z.valueKey]), Y(St, x[z.valueKey]), Y("select", x), $.value = [], O.value = -1;
165
- }, Me = (x) => {
166
- if (!U.value || B.value)
134
+ }, xe = () => {
135
+ m.value = !1, _(H, ""), _("clear");
136
+ }, ae = async () => {
137
+ var e;
138
+ (e = b.value) != null && e.isComposing || (l.value && t.value >= 0 && t.value < u.value.length ? J(u.value[t.value]) : d.selectWhenUnmatched && (_("select", { value: d.modelValue }), u.value = [], t.value = -1));
139
+ }, Te = (e) => {
140
+ l.value && (e.preventDefault(), e.stopPropagation(), R());
141
+ }, R = () => {
142
+ m.value = !1;
143
+ }, Ae = () => {
144
+ var e;
145
+ (e = b.value) == null || e.focus();
146
+ }, Be = () => {
147
+ var e;
148
+ (e = b.value) == null || e.blur();
149
+ }, J = async (e) => {
150
+ _(te, e[d.valueKey]), _(H, e[d.valueKey]), _("select", e), u.value = [], t.value = -1;
151
+ }, Q = (e) => {
152
+ var i, v;
153
+ if (!l.value || p.value)
167
154
  return;
168
- if (x < 0) {
169
- O.value = -1;
155
+ if (e < 0) {
156
+ t.value = -1;
170
157
  return;
171
158
  }
172
- x >= $.value.length && (x = $.value.length - 1);
173
- const L = W.value.querySelector(`.${P.be("suggestion", "wrap")}`), xe = L.querySelectorAll(`.${P.be("suggestion", "list")} li`)[x], we = L.scrollTop, { offsetTop: ze, scrollHeight: Ae } = xe;
174
- ze + Ae > we + L.clientHeight && (L.scrollTop += Ae), ze < we && (L.scrollTop -= Ae), O.value = x, F.value.ref.setAttribute("aria-activedescendant", `${X.value}-item-${O.value}`);
175
- }, Be = Di(ee, () => {
176
- var x;
177
- (x = C.value) != null && x.isFocusInsideContent() || U.value && be();
159
+ e >= u.value.length && (e = u.value.length - 1);
160
+ const N = S.value.querySelector(`.${f.be("suggestion", "wrap")}`), Pe = N.querySelectorAll(`.${f.be("suggestion", "list")} li`)[e], ne = N.scrollTop, { offsetTop: re, scrollHeight: X } = Pe;
161
+ re + X > ne + N.clientHeight && (N.scrollTop += X), re < ne && (N.scrollTop -= X), t.value = e, (v = (i = b.value) == null ? void 0 : i.ref) == null || v.setAttribute("aria-activedescendant", `${s.value}-item-${t.value}`);
162
+ }, se = Qe(c, () => {
163
+ var e;
164
+ (e = V.value) != null && e.isFocusInsideContent() || l.value && R();
178
165
  });
179
- return zi(() => {
180
- Be == null || Be();
181
- }), Kn(() => {
182
- F.value.ref.setAttribute("role", "textbox"), F.value.ref.setAttribute("aria-autocomplete", "list"), F.value.ref.setAttribute("aria-controls", "id"), F.value.ref.setAttribute("aria-activedescendant", `${X.value}-item-${O.value}`), J = F.value.ref.hasAttribute("readonly");
183
- }), $e({
184
- highlightedIndex: O,
185
- activated: N,
186
- loading: B,
187
- inputRef: F,
188
- popperRef: C,
189
- suggestions: $,
190
- handleSelect: Ne,
191
- handleKeyEnter: fe,
192
- focus: lt,
193
- blur: Ye,
194
- close: be,
195
- highlight: Me,
196
- getData: te
197
- }), (x, L) => (V(), ot(M(Un), {
166
+ return Ye(() => {
167
+ se == null || se();
168
+ }), _e(() => {
169
+ var e;
170
+ const i = (e = b.value) == null ? void 0 : e.ref;
171
+ i && ([
172
+ { key: "role", value: "textbox" },
173
+ { key: "aria-autocomplete", value: "list" },
174
+ { key: "aria-controls", value: "id" },
175
+ {
176
+ key: "aria-activedescendant",
177
+ value: `${s.value}-item-${t.value}`
178
+ }
179
+ ].forEach(({ key: v, value: N }) => i.setAttribute(v, N)), r = i.hasAttribute("readonly"));
180
+ }), K({
181
+ highlightedIndex: t,
182
+ activated: m,
183
+ loading: p,
184
+ inputRef: b,
185
+ popperRef: V,
186
+ suggestions: u,
187
+ handleSelect: J,
188
+ handleKeyEnter: ae,
189
+ focus: Ae,
190
+ blur: Be,
191
+ close: R,
192
+ highlight: Q,
193
+ getData: le
194
+ }), (e, i) => (n(), z(a(me), {
198
195
  ref_key: "popperRef",
199
- ref: C,
200
- visible: M(U),
201
- placement: x.placement,
196
+ ref: V,
197
+ visible: a(l),
198
+ placement: e.placement,
202
199
  "fallback-placements": ["bottom-start", "top-start"],
203
- "popper-class": [M(P).e("popper"), x.popperClass],
204
- teleported: x.teleported,
200
+ "popper-class": [a(f).e("popper"), e.popperClass],
201
+ teleported: e.teleported,
202
+ "append-to": e.appendTo,
205
203
  "gpu-acceleration": !1,
206
204
  pure: "",
207
205
  "manual-mode": "",
208
206
  effect: "light",
209
207
  trigger: "click",
210
- transition: `${M(P).namespace.value}-zoom-in-top`,
208
+ transition: `${a(f).namespace.value}-zoom-in-top`,
211
209
  persistent: "",
212
210
  role: "listbox",
213
- onBeforeShow: D,
214
- onHide: ge
211
+ onBeforeShow: G,
212
+ onHide: ke
215
213
  }, {
216
- content: ne(() => [
217
- pe("div", {
214
+ content: h(() => [
215
+ k("div", {
218
216
  ref_key: "regionRef",
219
- ref: W,
220
- class: Et([M(P).b("suggestion"), M(P).is("loading", M(d))]),
221
- style: Kt({
222
- [x.fitInputWidth ? "width" : "minWidth"]: q.value,
217
+ ref: S,
218
+ class: L([a(f).b("suggestion"), a(f).is("loading", a(W))]),
219
+ style: ce({
220
+ [e.fitInputWidth ? "width" : "minWidth"]: P.value,
223
221
  outline: "none"
224
222
  }),
225
223
  role: "region"
226
224
  }, [
227
- de(M(Ti), {
228
- id: M(X),
225
+ e.$slots.header ? (n(), g("div", {
226
+ key: 0,
227
+ class: L(a(f).be("suggestion", "header")),
228
+ onClick: j(() => {
229
+ }, ["stop"])
230
+ }, [
231
+ F(e.$slots, "header")
232
+ ], 10, ["onClick"])) : T("v-if", !0),
233
+ $(a(Me), {
234
+ id: a(s),
229
235
  tag: "ul",
230
- "wrap-class": M(P).be("suggestion", "wrap"),
231
- "view-class": M(P).be("suggestion", "list"),
236
+ "wrap-class": a(f).be("suggestion", "wrap"),
237
+ "view-class": a(f).be("suggestion", "list"),
232
238
  role: "listbox"
233
239
  }, {
234
- default: ne(() => [
235
- M(d) ? (V(), Z("li", { key: 0 }, [
236
- Xe(x.$slots, "loading", {}, () => [
237
- de(M(Zn), {
238
- class: Et(M(P).is("loading"))
240
+ default: h(() => [
241
+ a(W) ? (n(), g("li", { key: 0 }, [
242
+ F(e.$slots, "loading", {}, () => [
243
+ $(a(Ve), {
244
+ class: L(a(f).is("loading"))
239
245
  }, {
240
- default: ne(() => [
241
- de(M(Bi))
246
+ default: h(() => [
247
+ $(a(lt))
242
248
  ]),
243
249
  _: 1
244
250
  }, 8, ["class"])
245
251
  ])
246
- ])) : (V(!0), Z(Fe, { key: 1 }, at($.value, (y, xe) => (V(), Z("li", {
247
- id: `${M(X)}-item-${xe}`,
248
- key: xe,
249
- class: Et({ highlighted: O.value === xe }),
252
+ ])) : (n(!0), g(D, { key: 1 }, M(u.value, (v, N) => (n(), g("li", {
253
+ id: `${a(s)}-item-${N}`,
254
+ key: N,
255
+ class: L({ highlighted: t.value === N }),
250
256
  role: "option",
251
- "aria-selected": O.value === xe,
252
- onClick: (we) => Ne(y)
257
+ "aria-selected": t.value === N,
258
+ onClick: (Fe) => J(v)
253
259
  }, [
254
- Xe(x.$slots, "default", { item: y }, () => [
255
- Jn(Ve(y[x.valueKey]), 1)
260
+ F(e.$slots, "default", { item: v }, () => [
261
+ be(U(v[e.valueKey]), 1)
256
262
  ])
257
263
  ], 10, ["id", "aria-selected", "onClick"]))), 128))
258
264
  ]),
259
265
  _: 3
260
- }, 8, ["id", "wrap-class", "view-class"])
266
+ }, 8, ["id", "wrap-class", "view-class"]),
267
+ e.$slots.footer ? (n(), g("div", {
268
+ key: 1,
269
+ class: L(a(f).be("suggestion", "footer")),
270
+ onClick: j(() => {
271
+ }, ["stop"])
272
+ }, [
273
+ F(e.$slots, "footer")
274
+ ], 10, ["onClick"])) : T("v-if", !0)
261
275
  ], 6)
262
276
  ]),
263
- default: ne(() => [
264
- pe("div", {
277
+ default: h(() => [
278
+ k("div", {
265
279
  ref_key: "listboxRef",
266
- ref: ee,
267
- class: Et([M(P).b(), x.$attrs.class]),
268
- style: Kt(M(ie)),
280
+ ref: c,
281
+ class: L([a(f).b(), e.$attrs.class]),
282
+ style: ce(a(B)),
269
283
  role: "combobox",
270
284
  "aria-haspopup": "listbox",
271
- "aria-expanded": M(U),
272
- "aria-owns": M(X)
285
+ "aria-expanded": a(l),
286
+ "aria-owns": a(s)
273
287
  }, [
274
- de(M(Hn), Ai({
288
+ $(a(ge), pe({
275
289
  ref_key: "inputRef",
276
- ref: F
277
- }, M(re), {
278
- clearable: x.clearable,
279
- disabled: M(he),
280
- name: x.name,
281
- "model-value": x.modelValue,
282
- "aria-label": x.ariaLabel,
283
- onInput: ke,
284
- onChange: se,
285
- onFocus: ce,
286
- onBlur: ye,
287
- onClear: st,
290
+ ref: b
291
+ }, pe(a(I), e.$attrs), {
292
+ "model-value": e.modelValue,
293
+ disabled: a(A),
294
+ onInput: $e,
295
+ onChange: we,
296
+ onFocus: Ne,
297
+ onBlur: Ie,
298
+ onClear: xe,
288
299
  onKeydown: [
289
- rt(Xn((y) => Me(O.value - 1), ["prevent"]), ["up"]),
290
- rt(Xn((y) => Me(O.value + 1), ["prevent"]), ["down"]),
291
- rt(fe, ["enter"]),
292
- rt(be, ["tab"]),
293
- rt(me, ["esc"])
300
+ q(j((v) => Q(t.value - 1), ["prevent"]), ["up"]),
301
+ q(j((v) => Q(t.value + 1), ["prevent"]), ["down"]),
302
+ q(ae, ["enter"]),
303
+ q(R, ["tab"]),
304
+ q(Te, ["esc"])
294
305
  ],
295
- onMousedown: K
296
- }), Ci({
306
+ onMousedown: Ce
307
+ }), Ze({
297
308
  _: 2
298
309
  }, [
299
- x.$slots.prepend ? {
310
+ e.$slots.prepend ? {
300
311
  name: "prepend",
301
- fn: ne(() => [
302
- Xe(x.$slots, "prepend")
312
+ fn: h(() => [
313
+ F(e.$slots, "prepend")
303
314
  ])
304
315
  } : void 0,
305
- x.$slots.append ? {
316
+ e.$slots.append ? {
306
317
  name: "append",
307
- fn: ne(() => [
308
- Xe(x.$slots, "append")
318
+ fn: h(() => [
319
+ F(e.$slots, "append")
309
320
  ])
310
321
  } : void 0,
311
- x.$slots.prefix ? {
322
+ e.$slots.prefix ? {
312
323
  name: "prefix",
313
- fn: ne(() => [
314
- Xe(x.$slots, "prefix")
324
+ fn: h(() => [
325
+ F(e.$slots, "prefix")
315
326
  ])
316
327
  } : void 0,
317
- x.$slots.suffix ? {
328
+ e.$slots.suffix ? {
318
329
  name: "suffix",
319
- fn: ne(() => [
320
- Xe(x.$slots, "suffix")
330
+ fn: h(() => [
331
+ F(e.$slots, "suffix")
321
332
  ])
322
333
  } : void 0
323
- ]), 1040, ["clearable", "disabled", "name", "model-value", "aria-label", "onKeydown"])
334
+ ]), 1040, ["model-value", "disabled", "onKeydown"])
324
335
  ], 14, ["aria-expanded", "aria-owns"])
325
336
  ]),
326
337
  _: 3
327
- }, 8, ["visible", "placement", "popper-class", "teleported", "transition"]));
338
+ }, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]));
328
339
  }
329
340
  });
330
- var Qi = /* @__PURE__ */ xi(Ji, [["__file", "autocomplete.vue"]]);
331
- const Zi = _i(Qi);
332
- var Tt = { exports: {} };
333
- Tt.exports;
334
- (function(I, $e) {
335
- (function(Y, z) {
336
- I.exports = z();
337
- })(Ni, function() {
338
- function Y(t, e) {
339
- var n = Object.keys(t);
340
- if (Object.getOwnPropertySymbols) {
341
- var r = Object.getOwnPropertySymbols(t);
342
- e && (r = r.filter(function(i) {
343
- return Object.getOwnPropertyDescriptor(t, i).enumerable;
344
- })), n.push.apply(n, r);
345
- }
346
- return n;
347
- }
348
- function z(t) {
349
- for (var e = 1; e < arguments.length; e++) {
350
- var n = arguments[e] != null ? arguments[e] : {};
351
- e % 2 ? Y(Object(n), !0).forEach(function(r) {
352
- F(t, r, n[r]);
353
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Y(Object(n)).forEach(function(r) {
354
- Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
355
- });
356
- }
357
- return t;
358
- }
359
- function re(t) {
360
- return re = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
361
- return typeof e;
362
- } : function(e) {
363
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
364
- }, re(t);
365
- }
366
- function A(t, e) {
367
- if (!(t instanceof e))
368
- throw new TypeError("Cannot call a class as a function");
369
- }
370
- function he(t, e) {
371
- for (var n = 0; n < e.length; n++) {
372
- var r = e[n];
373
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, O(r.key), r);
374
- }
375
- }
376
- function P(t, e, n) {
377
- return e && he(t.prototype, e), n && he(t, n), Object.defineProperty(t, "prototype", { writable: !1 }), t;
378
- }
379
- function F(t, e, n) {
380
- return (e = O(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
381
- }
382
- function W(t, e) {
383
- if (typeof e != "function" && e !== null)
384
- throw new TypeError("Super expression must either be null or a function");
385
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && ee(t, e);
386
- }
387
- function C(t) {
388
- return C = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
389
- return e.__proto__ || Object.getPrototypeOf(e);
390
- }, C(t);
391
- }
392
- function ee(t, e) {
393
- return ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
394
- return n.__proto__ = r, n;
395
- }, ee(t, e);
396
- }
397
- function J(t) {
398
- if (t === void 0)
399
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
400
- return t;
401
- }
402
- function le(t) {
403
- var e = function() {
404
- if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
405
- return !1;
406
- if (typeof Proxy == "function")
407
- return !0;
408
- try {
409
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
410
- })), !0;
411
- } catch {
412
- return !1;
413
- }
414
- }();
415
- return function() {
416
- var n, r = C(t);
417
- if (e) {
418
- var i = C(this).constructor;
419
- n = Reflect.construct(r, arguments, i);
420
- } else
421
- n = r.apply(this, arguments);
422
- return function(o, a) {
423
- if (a && (typeof a == "object" || typeof a == "function"))
424
- return a;
425
- if (a !== void 0)
426
- throw new TypeError("Derived constructors may only return object or undefined");
427
- return J(o);
428
- }(this, n);
429
- };
430
- }
431
- function $() {
432
- return $ = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
433
- var r = function(o, a) {
434
- for (; !Object.prototype.hasOwnProperty.call(o, a) && (o = C(o)) !== null; )
435
- ;
436
- return o;
437
- }(t, e);
438
- if (r) {
439
- var i = Object.getOwnPropertyDescriptor(r, e);
440
- return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
441
- }
442
- }, $.apply(this, arguments);
443
- }
444
- function O(t) {
445
- var e = function(n, r) {
446
- if (typeof n != "object" || n === null)
447
- return n;
448
- var i = n[Symbol.toPrimitive];
449
- if (i !== void 0) {
450
- var o = i.call(n, r || "default");
451
- if (typeof o != "object")
452
- return o;
453
- throw new TypeError("@@toPrimitive must return a primitive value.");
454
- }
455
- return (r === "string" ? String : Number)(n);
456
- }(t, "string");
457
- return typeof e == "symbol" ? e : e + "";
458
- }
459
- var q = function(t) {
460
- return !(!t || !t.Window) && t instanceof t.Window;
461
- }, N = void 0, R = void 0;
462
- function B(t) {
463
- N = t;
464
- var e = t.document.createTextNode("");
465
- e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), R = t;
466
- }
467
- function X(t) {
468
- return q(t) ? t : (t.ownerDocument || t).defaultView || R.window;
469
- }
470
- typeof window < "u" && window && B(window);
471
- var ie = function(t) {
472
- return !!t && re(t) === "object";
473
- }, U = function(t) {
474
- return typeof t == "function";
475
- }, d = { window: function(t) {
476
- return t === R || q(t);
477
- }, docFrag: function(t) {
478
- return ie(t) && t.nodeType === 11;
479
- }, object: ie, func: U, number: function(t) {
480
- return typeof t == "number";
481
- }, bool: function(t) {
482
- return typeof t == "boolean";
483
- }, string: function(t) {
484
- return typeof t == "string";
485
- }, element: function(t) {
486
- if (!t || re(t) !== "object")
487
- return !1;
488
- var e = X(t) || R;
489
- return /object|function/.test(typeof Element > "u" ? "undefined" : re(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
490
- }, plainObject: function(t) {
491
- return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
492
- }, array: function(t) {
493
- return ie(t) && t.length !== void 0 && U(t.splice);
494
- } };
495
- function G(t) {
496
- var e = t.interaction;
497
- if (e.prepared.name === "drag") {
498
- var n = e.prepared.axis;
499
- n === "x" ? (e.coords.cur.page.y = e.coords.start.page.y, e.coords.cur.client.y = e.coords.start.client.y, e.coords.velocity.client.y = 0, e.coords.velocity.page.y = 0) : n === "y" && (e.coords.cur.page.x = e.coords.start.page.x, e.coords.cur.client.x = e.coords.start.client.x, e.coords.velocity.client.x = 0, e.coords.velocity.page.x = 0);
500
- }
501
- }
502
- function D(t) {
503
- var e = t.iEvent, n = t.interaction;
504
- if (n.prepared.name === "drag") {
505
- var r = n.prepared.axis;
506
- if (r === "x" || r === "y") {
507
- var i = r === "x" ? "y" : "x";
508
- e.page[i] = n.coords.start.page[i], e.client[i] = n.coords.start.client[i], e.delta[i] = 0;
509
- }
510
- }
511
- }
512
- var ge = { id: "actions/drag", install: function(t) {
513
- var e = t.actions, n = t.Interactable, r = t.defaults;
514
- n.prototype.draggable = ge.draggable, e.map.drag = ge, e.methodDict.drag = "draggable", r.actions.drag = ge.defaults;
515
- }, listeners: { "interactions:before-action-move": G, "interactions:action-resume": G, "interactions:action-move": D, "auto-start:check": function(t) {
516
- var e = t.interaction, n = t.interactable, r = t.buttons, i = n.options.drag;
517
- if (i && i.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || r & n.options.drag.mouseButtons))
518
- return t.action = { name: "drag", axis: i.lockAxis === "start" ? i.startAxis : i.lockAxis }, !1;
519
- } }, draggable: function(t) {
520
- return d.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : d.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
521
- }, beforeMove: G, move: D, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
522
- return "move";
523
- }, filterEventType: function(t) {
524
- return t.search("drag") === 0;
525
- } }, te = ge, Q = { init: function(t) {
526
- var e = t;
527
- Q.document = e.document, Q.DocumentFragment = e.DocumentFragment || ke, Q.SVGElement = e.SVGElement || ke, Q.SVGSVGElement = e.SVGSVGElement || ke, Q.SVGElementInstance = e.SVGElementInstance || ke, Q.Element = e.Element || ke, Q.HTMLElement = e.HTMLElement || Q.Element, Q.Event = e.Event, Q.Touch = e.Touch || ke, Q.PointerEvent = e.PointerEvent || e.MSPointerEvent;
528
- }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
529
- function ke() {
530
- }
531
- var K = Q, se = { init: function(t) {
532
- var e = K.Element, n = t.navigator || {};
533
- se.supportsTouch = "ontouchstart" in t || d.func(t.DocumentTouch) && K.document instanceof t.DocumentTouch, se.supportsPointerEvent = n.pointerEnabled !== !1 && !!K.PointerEvent, se.isIOS = /iP(hone|od|ad)/.test(n.platform), se.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), se.isIe9 = /MSIE 9/.test(n.userAgent), se.isOperaMobile = n.appName === "Opera" && se.supportsTouch && /Presto/.test(n.userAgent), se.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", se.pEventTypes = se.supportsPointerEvent ? K.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, se.wheelEvent = K.document && "onmousewheel" in K.document ? "mousewheel" : "wheel";
534
- }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, ce = se;
535
- function ye(t, e) {
536
- if (t.contains)
537
- return t.contains(e);
538
- for (; e; ) {
539
- if (e === t)
540
- return !0;
541
- e = e.parentNode;
542
- }
543
- return !1;
544
- }
545
- function st(t, e) {
546
- for (; d.element(t); ) {
547
- if (me(t, e))
548
- return t;
549
- t = fe(t);
550
- }
551
- return null;
552
- }
553
- function fe(t) {
554
- var e = t.parentNode;
555
- if (d.docFrag(e)) {
556
- for (; (e = e.host) && d.docFrag(e); )
557
- ;
558
- return e;
559
- }
560
- return e;
561
- }
562
- function me(t, e) {
563
- return R !== N && (e = e.replace(/\/deep\//g, " ")), t[ce.prefixedMatchesSelector](e);
564
- }
565
- var be = function(t) {
566
- return t.parentNode || t.host;
567
- };
568
- function lt(t, e) {
569
- for (var n, r = [], i = t; (n = be(i)) && i !== e && n !== i.ownerDocument; )
570
- r.unshift(i), i = n;
571
- return r;
572
- }
573
- function Ye(t, e, n) {
574
- for (; d.element(t); ) {
575
- if (me(t, e))
576
- return !0;
577
- if ((t = fe(t)) === n)
578
- return me(t, e);
579
- }
580
- return !1;
581
- }
582
- function Ne(t) {
583
- return t.correspondingUseElement || t;
584
- }
585
- function Me(t) {
586
- var e = t instanceof K.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
587
- return e && { left: e.left, right: e.right, top: e.top, bottom: e.bottom, width: e.width || e.right - e.left, height: e.height || e.bottom - e.top };
588
- }
589
- function Be(t) {
590
- var e, n = Me(t);
591
- if (!ce.isIOS7 && n) {
592
- var r = { x: (e = (e = X(t)) || R).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
593
- n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
594
- }
595
- return n;
596
- }
597
- function x(t) {
598
- for (var e = []; t; )
599
- e.push(t), t = fe(t);
600
- return e;
601
- }
602
- function L(t) {
603
- return !!d.string(t) && (K.document.querySelector(t), !0);
604
- }
605
- function y(t, e) {
606
- for (var n in e)
607
- t[n] = e[n];
608
- return t;
609
- }
610
- function xe(t, e, n) {
611
- return t === "parent" ? fe(n) : t === "self" ? e.getRect(n) : st(n, t);
612
- }
613
- function we(t, e, n, r) {
614
- var i = t;
615
- return d.string(i) ? i = xe(i, e, n) : d.func(i) && (i = i.apply(void 0, r)), d.element(i) && (i = Be(i)), i;
616
- }
617
- function ze(t) {
618
- return t && { x: "x" in t ? t.x : t.left, y: "y" in t ? t.y : t.top };
619
- }
620
- function Ae(t) {
621
- return !t || "x" in t && "y" in t || ((t = y({}, t)).x = t.left || 0, t.y = t.top || 0, t.width = t.width || (t.right || 0) - t.x, t.height = t.height || (t.bottom || 0) - t.y), t;
622
- }
623
- function ct(t, e, n) {
624
- t.left && (e.left += n.x), t.right && (e.right += n.x), t.top && (e.top += n.y), t.bottom && (e.bottom += n.y), e.width = e.right - e.left, e.height = e.bottom - e.top;
625
- }
626
- function qe(t, e, n) {
627
- var r = n && t.options[n];
628
- return ze(we(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
629
- }
630
- function Ce(t, e) {
631
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(l) {
632
- return !0;
633
- }, r = arguments.length > 3 ? arguments[3] : void 0;
634
- if (r = r || {}, d.string(t) && t.search(" ") !== -1 && (t = Qt(t)), d.array(t))
635
- return t.forEach(function(l) {
636
- return Ce(l, e, n, r);
637
- }), r;
638
- if (d.object(t) && (e = t, t = ""), d.func(e) && n(t))
639
- r[t] = r[t] || [], r[t].push(e);
640
- else if (d.array(e))
641
- for (var i = 0, o = e; i < o.length; i++) {
642
- var a = o[i];
643
- Ce(t, a, n, r);
644
- }
645
- else if (d.object(e))
646
- for (var s in e)
647
- Ce(Qt(s).map(function(l) {
648
- return "".concat(t).concat(l);
649
- }), e[s], n, r);
650
- return r;
651
- }
652
- function Qt(t) {
653
- return t.trim().split(/ +/);
654
- }
655
- var Ue = function(t, e) {
656
- return Math.sqrt(t * t + e * e);
657
- }, rr = ["webkit", "moz"];
658
- function ut(t, e) {
659
- t.__set || (t.__set = {});
660
- var n = function(i) {
661
- if (rr.some(function(o) {
662
- return i.indexOf(o) === 0;
663
- }))
664
- return 1;
665
- typeof t[i] != "function" && i !== "__set" && Object.defineProperty(t, i, { get: function() {
666
- return i in t.__set ? t.__set[i] : t.__set[i] = e[i];
667
- }, set: function(o) {
668
- t.__set[i] = o;
669
- }, configurable: !0 });
670
- };
671
- for (var r in e)
672
- n(r);
673
- return t;
674
- }
675
- function pt(t, e) {
676
- t.page = t.page || {}, t.page.x = e.page.x, t.page.y = e.page.y, t.client = t.client || {}, t.client.x = e.client.x, t.client.y = e.client.y, t.timeStamp = e.timeStamp;
677
- }
678
- function Zt(t) {
679
- t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
680
- }
681
- function en(t) {
682
- return t instanceof K.Event || t instanceof K.Touch;
683
- }
684
- function dt(t, e, n) {
685
- return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
686
- }
687
- function tn(t, e) {
688
- return e = e || { x: 0, y: 0 }, ce.isOperaMobile && en(t) ? (dt("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : dt("page", t, e), e;
689
- }
690
- function He(t) {
691
- return d.number(t.pointerId) ? t.pointerId : t.identifier;
692
- }
693
- function ir(t, e, n) {
694
- var r = e.length > 1 ? nn(e) : e[0];
695
- tn(r, t.page), function(i, o) {
696
- o = o || {}, ce.isOperaMobile && en(i) ? dt("screen", i, o) : dt("client", i, o);
697
- }(r, t.client), t.timeStamp = n;
698
- }
699
- function kt(t) {
700
- var e = [];
701
- return d.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
702
- }
703
- function nn(t) {
704
- for (var e = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < t.length; n++) {
705
- var r = t[n];
706
- for (var i in e)
707
- e[i] += r[i];
708
- }
709
- for (var o in e)
710
- e[o] /= t.length;
711
- return e;
712
- }
713
- function Pt(t) {
714
- if (!t.length)
715
- return null;
716
- var e = kt(t), n = Math.min(e[0].pageX, e[1].pageX), r = Math.min(e[0].pageY, e[1].pageY), i = Math.max(e[0].pageX, e[1].pageX), o = Math.max(e[0].pageY, e[1].pageY);
717
- return { x: n, y: r, left: n, top: r, right: i, bottom: o, width: i - n, height: o - r };
718
- }
719
- function Ot(t, e) {
720
- var n = e + "X", r = e + "Y", i = kt(t), o = i[0][n] - i[1][n], a = i[0][r] - i[1][r];
721
- return Ue(o, a);
722
- }
723
- function It(t, e) {
724
- var n = e + "X", r = e + "Y", i = kt(t), o = i[1][n] - i[0][n], a = i[1][r] - i[0][r];
725
- return 180 * Math.atan2(a, o) / Math.PI;
726
- }
727
- function rn(t) {
728
- return d.string(t.pointerType) ? t.pointerType : d.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof K.Touch ? "touch" : "mouse";
729
- }
730
- function on(t) {
731
- var e = d.func(t.composedPath) ? t.composedPath() : t.path;
732
- return [Ne(e ? e[0] : t.target), Ne(t.currentTarget)];
733
- }
734
- var ft = function() {
735
- function t(e) {
736
- A(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
737
- }
738
- return P(t, [{ key: "preventDefault", value: function() {
739
- } }, { key: "stopPropagation", value: function() {
740
- this.propagationStopped = !0;
741
- } }, { key: "stopImmediatePropagation", value: function() {
742
- this.immediatePropagationStopped = this.propagationStopped = !0;
743
- } }]), t;
744
- }();
745
- Object.defineProperty(ft.prototype, "interaction", { get: function() {
746
- return this._interaction._proxy;
747
- }, set: function() {
748
- } });
749
- var an = function(t, e) {
750
- for (var n = 0; n < e.length; n++) {
751
- var r = e[n];
752
- t.push(r);
753
- }
754
- return t;
755
- }, sn = function(t) {
756
- return an([], t);
757
- }, Ge = function(t, e) {
758
- for (var n = 0; n < t.length; n++)
759
- if (e(t[n], n, t))
760
- return n;
761
- return -1;
762
- }, Ke = function(t, e) {
763
- return t[Ge(t, e)];
764
- }, Le = function(t) {
765
- W(n, t);
766
- var e = le(n);
767
- function n(r, i, o) {
768
- var a;
769
- A(this, n), (a = e.call(this, i._interaction)).dropzone = void 0, a.dragEvent = void 0, a.relatedTarget = void 0, a.draggable = void 0, a.propagationStopped = !1, a.immediatePropagationStopped = !1;
770
- var s = o === "dragleave" ? r.prev : r.cur, l = s.element, u = s.dropzone;
771
- return a.type = o, a.target = l, a.currentTarget = l, a.dropzone = u, a.dragEvent = i, a.relatedTarget = i.target, a.draggable = i.interactable, a.timeStamp = i.timeStamp, a;
772
- }
773
- return P(n, [{ key: "reject", value: function() {
774
- var r = this, i = this._interaction.dropState;
775
- if (this.type === "dropactivate" || this.dropzone && i.cur.dropzone === this.dropzone && i.cur.element === this.target)
776
- if (i.prev.dropzone = this.dropzone, i.prev.element = this.target, i.rejected = !0, i.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
777
- var o = i.activeDrops, a = Ge(o, function(l) {
778
- var u = l.dropzone, c = l.element;
779
- return u === r.dropzone && c === r.target;
780
- });
781
- i.activeDrops.splice(a, 1);
782
- var s = new n(i, this.dragEvent, "dropdeactivate");
783
- s.dropzone = this.dropzone, s.target = this.target, this.dropzone.fire(s);
784
- } else
785
- this.dropzone.fire(new n(i, this.dragEvent, "dragleave"));
786
- } }, { key: "preventDefault", value: function() {
787
- } }, { key: "stopPropagation", value: function() {
788
- this.propagationStopped = !0;
789
- } }, { key: "stopImmediatePropagation", value: function() {
790
- this.immediatePropagationStopped = this.propagationStopped = !0;
791
- } }]), n;
792
- }(ft);
793
- function ln(t, e) {
794
- for (var n = 0, r = t.slice(); n < r.length; n++) {
795
- var i = r[n], o = i.dropzone, a = i.element;
796
- e.dropzone = o, e.target = a, o.fire(e), e.propagationStopped = e.immediatePropagationStopped = !1;
797
- }
798
- }
799
- function Dt(t, e) {
800
- for (var n = function(o, a) {
801
- for (var s = [], l = 0, u = o.interactables.list; l < u.length; l++) {
802
- var c = u[l];
803
- if (c.options.drop.enabled) {
804
- var p = c.options.drop.accept;
805
- if (!(d.element(p) && p !== a || d.string(p) && !me(a, p) || d.func(p) && !p({ dropzone: c, draggableElement: a })))
806
- for (var f = 0, h = c.getAllElements(); f < h.length; f++) {
807
- var v = h[f];
808
- v !== a && s.push({ dropzone: c, element: v, rect: c.getRect(v) });
809
- }
810
- }
811
- }
812
- return s;
813
- }(t, e), r = 0; r < n.length; r++) {
814
- var i = n[r];
815
- i.rect = i.dropzone.getRect(i.element);
816
- }
817
- return n;
818
- }
819
- function cn(t, e, n) {
820
- for (var r = t.dropState, i = t.interactable, o = t.element, a = [], s = 0, l = r.activeDrops; s < l.length; s++) {
821
- var u = l[s], c = u.dropzone, p = u.element, f = u.rect, h = c.dropCheck(e, n, i, o, p, f);
822
- a.push(h ? p : null);
823
- }
824
- var v = function(g) {
825
- for (var b, m, w, S = [], k = 0; k < g.length; k++) {
826
- var _ = g[k], T = g[b];
827
- if (_ && k !== b)
828
- if (T) {
829
- var ae = be(_), j = be(T);
830
- if (ae !== _.ownerDocument)
831
- if (j !== _.ownerDocument)
832
- if (ae !== j) {
833
- S = S.length ? S : lt(T);
834
- var ue = void 0;
835
- if (T instanceof K.HTMLElement && _ instanceof K.SVGElement && !(_ instanceof K.SVGSVGElement)) {
836
- if (_ === j)
837
- continue;
838
- ue = _.ownerSVGElement;
839
- } else
840
- ue = _;
841
- for (var ve = lt(ue, T.ownerDocument), Se = 0; ve[Se] && ve[Se] === S[Se]; )
842
- Se++;
843
- var _t = [ve[Se - 1], ve[Se], S[Se]];
844
- if (_t[0])
845
- for (var nt = _t[0].lastChild; nt; ) {
846
- if (nt === _t[1]) {
847
- b = k, S = ve;
848
- break;
849
- }
850
- if (nt === _t[2])
851
- break;
852
- nt = nt.previousSibling;
853
- }
854
- } else
855
- w = T, (parseInt(X(m = _).getComputedStyle(m).zIndex, 10) || 0) >= (parseInt(X(w).getComputedStyle(w).zIndex, 10) || 0) && (b = k);
856
- else
857
- b = k;
858
- } else
859
- b = k;
860
- }
861
- return b;
862
- }(a);
863
- return r.activeDrops[v] || null;
864
- }
865
- function Mt(t, e, n) {
866
- var r = t.dropState, i = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
867
- return n.type === "dragstart" && (i.activate = new Le(r, n, "dropactivate"), i.activate.target = null, i.activate.dropzone = null), n.type === "dragend" && (i.deactivate = new Le(r, n, "dropdeactivate"), i.deactivate.target = null, i.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (i.leave = new Le(r, n, "dragleave"), n.dragLeave = i.leave.target = r.prev.element, n.prevDropzone = i.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (i.enter = new Le(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (i.drop = new Le(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (i.move = new Le(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), i;
868
- }
869
- function zt(t, e) {
870
- var n = t.dropState, r = n.activeDrops, i = n.cur, o = n.prev;
871
- e.leave && o.dropzone.fire(e.leave), e.enter && i.dropzone.fire(e.enter), e.move && i.dropzone.fire(e.move), e.drop && i.dropzone.fire(e.drop), e.deactivate && ln(r, e.deactivate), n.prev.dropzone = i.dropzone, n.prev.element = i.element;
872
- }
873
- function un(t, e) {
874
- var n = t.interaction, r = t.iEvent, i = t.event;
875
- if (r.type === "dragmove" || r.type === "dragend") {
876
- var o = n.dropState;
877
- e.dynamicDrop && (o.activeDrops = Dt(e, n.element));
878
- var a = r, s = cn(n, a, i);
879
- o.rejected = o.rejected && !!s && s.dropzone === o.cur.dropzone && s.element === o.cur.element, o.cur.dropzone = s && s.dropzone, o.cur.element = s && s.element, o.events = Mt(n, 0, a);
880
- }
881
- }
882
- var pn = { id: "actions/drop", install: function(t) {
883
- var e = t.actions, n = t.interactStatic, r = t.Interactable, i = t.defaults;
884
- t.usePlugin(te), r.prototype.dropzone = function(o) {
885
- return function(a, s) {
886
- if (d.object(s)) {
887
- if (a.options.drop.enabled = s.enabled !== !1, s.listeners) {
888
- var l = Ce(s.listeners), u = Object.keys(l).reduce(function(p, f) {
889
- return p[/^(enter|leave)/.test(f) ? "drag".concat(f) : /^(activate|deactivate|move)/.test(f) ? "drop".concat(f) : f] = l[f], p;
890
- }, {}), c = a.options.drop.listeners;
891
- c && a.off(c), a.on(u), a.options.drop.listeners = u;
892
- }
893
- return d.func(s.ondrop) && a.on("drop", s.ondrop), d.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), d.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), d.func(s.ondragenter) && a.on("dragenter", s.ondragenter), d.func(s.ondragleave) && a.on("dragleave", s.ondragleave), d.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : d.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
894
- }
895
- return d.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
896
- }(this, o);
897
- }, r.prototype.dropCheck = function(o, a, s, l, u, c) {
898
- return function(p, f, h, v, g, b, m) {
899
- var w = !1;
900
- if (!(m = m || p.getRect(b)))
901
- return !!p.options.drop.checker && p.options.drop.checker(f, h, w, p, b, v, g);
902
- var S = p.options.drop.overlap;
903
- if (S === "pointer") {
904
- var k = qe(v, g, "drag"), _ = tn(f);
905
- _.x += k.x, _.y += k.y;
906
- var T = _.x > m.left && _.x < m.right, ae = _.y > m.top && _.y < m.bottom;
907
- w = T && ae;
908
- }
909
- var j = v.getRect(g);
910
- if (j && S === "center") {
911
- var ue = j.left + j.width / 2, ve = j.top + j.height / 2;
912
- w = ue >= m.left && ue <= m.right && ve >= m.top && ve <= m.bottom;
913
- }
914
- return j && d.number(S) && (w = Math.max(0, Math.min(m.right, j.right) - Math.max(m.left, j.left)) * Math.max(0, Math.min(m.bottom, j.bottom) - Math.max(m.top, j.top)) / (j.width * j.height) >= S), p.options.drop.checker && (w = p.options.drop.checker(f, h, w, p, b, v, g)), w;
915
- }(this, o, a, s, l, u, c);
916
- }, n.dynamicDrop = function(o) {
917
- return d.bool(o) ? (t.dynamicDrop = o, n) : t.dynamicDrop;
918
- }, y(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, i.actions.drop = pn.defaults;
919
- }, listeners: { "interactions:before-action-start": function(t) {
920
- var e = t.interaction;
921
- e.prepared.name === "drag" && (e.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
922
- }, "interactions:after-action-start": function(t, e) {
923
- var n = t.interaction, r = (t.event, t.iEvent);
924
- if (n.prepared.name === "drag") {
925
- var i = n.dropState;
926
- i.activeDrops = [], i.events = {}, i.activeDrops = Dt(e, n.element), i.events = Mt(n, 0, r), i.events.activate && (ln(i.activeDrops, i.events.activate), e.fire("actions/drop:start", { interaction: n, dragEvent: r }));
927
- }
928
- }, "interactions:action-move": un, "interactions:after-action-move": function(t, e) {
929
- var n = t.interaction, r = t.iEvent;
930
- if (n.prepared.name === "drag") {
931
- var i = n.dropState;
932
- zt(n, i.events), e.fire("actions/drop:move", { interaction: n, dragEvent: r }), i.events = {};
933
- }
934
- }, "interactions:action-end": function(t, e) {
935
- if (t.interaction.prepared.name === "drag") {
936
- var n = t.interaction, r = t.iEvent;
937
- un(t, e), zt(n, n.dropState.events), e.fire("actions/drop:end", { interaction: n, dragEvent: r });
938
- }
939
- }, "interactions:stop": function(t) {
940
- var e = t.interaction;
941
- if (e.prepared.name === "drag") {
942
- var n = e.dropState;
943
- n && (n.activeDrops = null, n.events = null, n.cur.dropzone = null, n.cur.element = null, n.prev.dropzone = null, n.prev.element = null, n.rejected = !1);
944
- }
945
- } }, getActiveDrops: Dt, getDrop: cn, getDropEvents: Mt, fireDropEvents: zt, filterEventType: function(t) {
946
- return t.search("drag") === 0 || t.search("drop") === 0;
947
- }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, or = pn;
948
- function At(t) {
949
- var e = t.interaction, n = t.iEvent, r = t.phase;
950
- if (e.prepared.name === "gesture") {
951
- var i = e.pointers.map(function(u) {
952
- return u.pointer;
953
- }), o = r === "start", a = r === "end", s = e.interactable.options.deltaSource;
954
- if (n.touches = [i[0], i[1]], o)
955
- n.distance = Ot(i, s), n.box = Pt(i), n.scale = 1, n.ds = 0, n.angle = It(i, s), n.da = 0, e.gesture.startDistance = n.distance, e.gesture.startAngle = n.angle;
956
- else if (a || e.pointers.length < 2) {
957
- var l = e.prevEvent;
958
- n.distance = l.distance, n.box = l.box, n.scale = l.scale, n.ds = 0, n.angle = l.angle, n.da = 0;
959
- } else
960
- n.distance = Ot(i, s), n.box = Pt(i), n.scale = n.distance / e.gesture.startDistance, n.angle = It(i, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
961
- e.gesture.distance = n.distance, e.gesture.angle = n.angle, d.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
962
- }
963
- }
964
- var Ct = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
965
- var e = t.actions, n = t.Interactable, r = t.defaults;
966
- n.prototype.gesturable = function(i) {
967
- return d.object(i) ? (this.options.gesture.enabled = i.enabled !== !1, this.setPerAction("gesture", i), this.setOnEvents("gesture", i), this) : d.bool(i) ? (this.options.gesture.enabled = i, this) : this.options.gesture;
968
- }, e.map.gesture = Ct, e.methodDict.gesture = "gesturable", r.actions.gesture = Ct.defaults;
969
- }, listeners: { "interactions:action-start": At, "interactions:action-move": At, "interactions:action-end": At, "interactions:new": function(t) {
970
- t.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
971
- }, "auto-start:check": function(t) {
972
- if (!(t.interaction.pointers.length < 2)) {
973
- var e = t.interactable.options.gesture;
974
- if (e && e.enabled)
975
- return t.action = { name: "gesture" }, !1;
976
- }
977
- } }, defaults: {}, getCursor: function() {
978
- return "";
979
- }, filterEventType: function(t) {
980
- return t.search("gesture") === 0;
981
- } }, ar = Ct;
982
- function sr(t, e, n, r, i, o, a) {
983
- if (!e)
984
- return !1;
985
- if (e === !0) {
986
- var s = d.number(o.width) ? o.width : o.right - o.left, l = d.number(o.height) ? o.height : o.bottom - o.top;
987
- if (a = Math.min(a, Math.abs((t === "left" || t === "right" ? s : l) / 2)), s < 0 && (t === "left" ? t = "right" : t === "right" && (t = "left")), l < 0 && (t === "top" ? t = "bottom" : t === "bottom" && (t = "top")), t === "left") {
988
- var u = s >= 0 ? o.left : o.right;
989
- return n.x < u + a;
990
- }
991
- if (t === "top") {
992
- var c = l >= 0 ? o.top : o.bottom;
993
- return n.y < c + a;
994
- }
995
- if (t === "right")
996
- return n.x > (s >= 0 ? o.right : o.left) - a;
997
- if (t === "bottom")
998
- return n.y > (l >= 0 ? o.bottom : o.top) - a;
999
- }
1000
- return !!d.element(r) && (d.element(e) ? e === r : Ye(r, e, i));
1001
- }
1002
- function dn(t) {
1003
- var e = t.iEvent, n = t.interaction;
1004
- if (n.prepared.name === "resize" && n.resizeAxes) {
1005
- var r = e;
1006
- n.interactable.options.resize.square ? (n.resizeAxes === "y" ? r.delta.x = r.delta.y : r.delta.y = r.delta.x, r.axes = "xy") : (r.axes = n.resizeAxes, n.resizeAxes === "x" ? r.delta.y = 0 : n.resizeAxes === "y" && (r.delta.x = 0));
1007
- }
1008
- }
1009
- var _e, Re, Ee = { id: "actions/resize", before: ["actions/drag"], install: function(t) {
1010
- var e = t.actions, n = t.browser, r = t.Interactable, i = t.defaults;
1011
- Ee.cursors = function(o) {
1012
- return o.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
1013
- }(n), Ee.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(o) {
1014
- return function(a, s, l) {
1015
- return d.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), d.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), d.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : d.bool(s.square) && (a.options.resize.square = s.square), a) : d.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1016
- }(this, o, t);
1017
- }, e.map.resize = Ee, e.methodDict.resize = "resizable", i.actions.resize = Ee.defaults;
1018
- }, listeners: { "interactions:new": function(t) {
1019
- t.interaction.resizeAxes = "xy";
1020
- }, "interactions:action-start": function(t) {
1021
- (function(e) {
1022
- var n = e.iEvent, r = e.interaction;
1023
- if (r.prepared.name === "resize" && r.prepared.edges) {
1024
- var i = n, o = r.rect;
1025
- r._rects = { start: y({}, o), corrected: y({}, o), previous: y({}, o), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, i.edges = r.prepared.edges, i.rect = r._rects.corrected, i.deltaRect = r._rects.delta;
1026
- }
1027
- })(t), dn(t);
1028
- }, "interactions:action-move": function(t) {
1029
- (function(e) {
1030
- var n = e.iEvent, r = e.interaction;
1031
- if (r.prepared.name === "resize" && r.prepared.edges) {
1032
- var i = n, o = r.interactable.options.resize.invert, a = o === "reposition" || o === "negate", s = r.rect, l = r._rects, u = l.start, c = l.corrected, p = l.delta, f = l.previous;
1033
- if (y(f, c), a) {
1034
- if (y(c, s), o === "reposition") {
1035
- if (c.top > c.bottom) {
1036
- var h = c.top;
1037
- c.top = c.bottom, c.bottom = h;
1038
- }
1039
- if (c.left > c.right) {
1040
- var v = c.left;
1041
- c.left = c.right, c.right = v;
1042
- }
1043
- }
1044
- } else
1045
- c.top = Math.min(s.top, u.bottom), c.bottom = Math.max(s.bottom, u.top), c.left = Math.min(s.left, u.right), c.right = Math.max(s.right, u.left);
1046
- for (var g in c.width = c.right - c.left, c.height = c.bottom - c.top, c)
1047
- p[g] = c[g] - f[g];
1048
- i.edges = r.prepared.edges, i.rect = c, i.deltaRect = p;
1049
- }
1050
- })(t), dn(t);
1051
- }, "interactions:action-end": function(t) {
1052
- var e = t.iEvent, n = t.interaction;
1053
- if (n.prepared.name === "resize" && n.prepared.edges) {
1054
- var r = e;
1055
- r.edges = n.prepared.edges, r.rect = n._rects.corrected, r.deltaRect = n._rects.delta;
1056
- }
1057
- }, "auto-start:check": function(t) {
1058
- var e = t.interaction, n = t.interactable, r = t.element, i = t.rect, o = t.buttons;
1059
- if (i) {
1060
- var a = y({}, e.coords.cur.page), s = n.options.resize;
1061
- if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || o & s.mouseButtons)) {
1062
- if (d.object(s.edges)) {
1063
- var l = { left: !1, right: !1, top: !1, bottom: !1 };
1064
- for (var u in l)
1065
- l[u] = sr(u, s.edges[u], a, e._latestPointer.eventTarget, r, i, s.margin || Ee.defaultMargin);
1066
- l.left = l.left && !l.right, l.top = l.top && !l.bottom, (l.left || l.right || l.top || l.bottom) && (t.action = { name: "resize", edges: l });
1067
- } else {
1068
- var c = s.axis !== "y" && a.x > i.right - Ee.defaultMargin, p = s.axis !== "x" && a.y > i.bottom - Ee.defaultMargin;
1069
- (c || p) && (t.action = { name: "resize", axes: (c ? "x" : "") + (p ? "y" : "") });
1070
- }
1071
- return !t.action && void 0;
1072
- }
1073
- }
1074
- } }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(t) {
1075
- var e = t.edges, n = t.axis, r = t.name, i = Ee.cursors, o = null;
1076
- if (n)
1077
- o = i[r + n];
1078
- else if (e) {
1079
- for (var a = "", s = 0, l = ["top", "bottom", "left", "right"]; s < l.length; s++) {
1080
- var u = l[s];
1081
- e[u] && (a += u);
1082
- }
1083
- o = i[a];
1084
- }
1085
- return o;
1086
- }, filterEventType: function(t) {
1087
- return t.search("resize") === 0;
1088
- }, defaultMargin: null }, lr = Ee, cr = { id: "actions", install: function(t) {
1089
- t.usePlugin(ar), t.usePlugin(lr), t.usePlugin(te), t.usePlugin(or);
1090
- } }, fn = 0, Pe = { request: function(t) {
1091
- return _e(t);
1092
- }, cancel: function(t) {
1093
- return Re(t);
1094
- }, init: function(t) {
1095
- if (_e = t.requestAnimationFrame, Re = t.cancelAnimationFrame, !_e)
1096
- for (var e = ["ms", "moz", "webkit", "o"], n = 0; n < e.length; n++) {
1097
- var r = e[n];
1098
- _e = t["".concat(r, "RequestAnimationFrame")], Re = t["".concat(r, "CancelAnimationFrame")] || t["".concat(r, "CancelRequestAnimationFrame")];
1099
- }
1100
- _e = _e && _e.bind(t), Re = Re && Re.bind(t), _e || (_e = function(i) {
1101
- var o = Date.now(), a = Math.max(0, 16 - (o - fn)), s = t.setTimeout(function() {
1102
- i(o + a);
1103
- }, a);
1104
- return fn = o + a, s;
1105
- }, Re = function(i) {
1106
- return clearTimeout(i);
1107
- });
1108
- } }, E = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(t) {
1109
- E.isScrolling = !0, Pe.cancel(E.i), t.autoScroll = E, E.interaction = t, E.prevTime = E.now(), E.i = Pe.request(E.scroll);
1110
- }, stop: function() {
1111
- E.isScrolling = !1, E.interaction && (E.interaction.autoScroll = null), Pe.cancel(E.i);
1112
- }, scroll: function() {
1113
- var t = E.interaction, e = t.interactable, n = t.element, r = t.prepared.name, i = e.options[r].autoScroll, o = vn(i.container, e, n), a = E.now(), s = (a - E.prevTime) / 1e3, l = i.speed * s;
1114
- if (l >= 1) {
1115
- var u = { x: E.x * l, y: E.y * l };
1116
- if (u.x || u.y) {
1117
- var c = hn(o);
1118
- d.window(o) ? o.scrollBy(u.x, u.y) : o && (o.scrollLeft += u.x, o.scrollTop += u.y);
1119
- var p = hn(o), f = { x: p.x - c.x, y: p.y - c.y };
1120
- (f.x || f.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: f, interaction: t, container: o });
1121
- }
1122
- E.prevTime = a;
1123
- }
1124
- E.isScrolling && (Pe.cancel(E.i), E.i = Pe.request(E.scroll));
1125
- }, check: function(t, e) {
1126
- var n;
1127
- return (n = t.options[e].autoScroll) == null ? void 0 : n.enabled;
1128
- }, onInteractionMove: function(t) {
1129
- var e = t.interaction, n = t.pointer;
1130
- if (e.interacting() && E.check(e.interactable, e.prepared.name))
1131
- if (e.simulation)
1132
- E.x = E.y = 0;
1133
- else {
1134
- var r, i, o, a, s = e.interactable, l = e.element, u = e.prepared.name, c = s.options[u].autoScroll, p = vn(c.container, s, l);
1135
- if (d.window(p))
1136
- a = n.clientX < E.margin, r = n.clientY < E.margin, i = n.clientX > p.innerWidth - E.margin, o = n.clientY > p.innerHeight - E.margin;
1137
- else {
1138
- var f = Me(p);
1139
- a = n.clientX < f.left + E.margin, r = n.clientY < f.top + E.margin, i = n.clientX > f.right - E.margin, o = n.clientY > f.bottom - E.margin;
1140
- }
1141
- E.x = i ? 1 : a ? -1 : 0, E.y = o ? 1 : r ? -1 : 0, E.isScrolling || (E.margin = c.margin, E.speed = c.speed, E.start(e));
1142
- }
1143
- } };
1144
- function vn(t, e, n) {
1145
- return (d.string(t) ? xe(t, e, n) : t) || X(n);
1146
- }
1147
- function hn(t) {
1148
- return d.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1149
- }
1150
- var ur = { id: "auto-scroll", install: function(t) {
1151
- var e = t.defaults, n = t.actions;
1152
- t.autoScroll = E, E.now = function() {
1153
- return t.now();
1154
- }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = E.defaults;
1155
- }, listeners: { "interactions:new": function(t) {
1156
- t.interaction.autoScroll = null;
1157
- }, "interactions:destroy": function(t) {
1158
- t.interaction.autoScroll = null, E.stop(), E.interaction && (E.interaction = null);
1159
- }, "interactions:stop": E.stop, "interactions:action-move": function(t) {
1160
- return E.onInteractionMove(t);
1161
- } } }, pr = ur;
1162
- function Je(t, e) {
1163
- var n = !1;
1164
- return function() {
1165
- return n || (R.console.warn(e), n = !0), t.apply(this, arguments);
1166
- };
1167
- }
1168
- function Rt(t, e) {
1169
- return t.name = e.name, t.axis = e.axis, t.edges = e.edges, t;
1170
- }
1171
- function dr(t) {
1172
- return d.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1173
- }
1174
- function fr(t) {
1175
- return d.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1176
- }
1177
- var vr = { id: "auto-start/interactableMethods", install: function(t) {
1178
- var e = t.Interactable;
1179
- e.prototype.getAction = function(n, r, i, o) {
1180
- var a = function(s, l, u, c, p) {
1181
- var f = s.getRect(c), h = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], v = { action: null, interactable: s, interaction: u, element: c, rect: f, buttons: h };
1182
- return p.fire("auto-start:check", v), v.action;
1183
- }(this, r, i, o, t);
1184
- return this.options.actionChecker ? this.options.actionChecker(n, r, a, this, o, i) : a;
1185
- }, e.prototype.ignoreFrom = Je(function(n) {
1186
- return this._backCompatOption("ignoreFrom", n);
1187
- }, "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = Je(function(n) {
1188
- return this._backCompatOption("allowFrom", n);
1189
- }, "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), e.prototype.actionChecker = fr, e.prototype.styleCursor = dr;
1190
- } };
1191
- function gn(t, e, n, r, i) {
1192
- return e.testIgnoreAllow(e.options[t.name], n, r) && e.options[t.name].enabled && vt(e, n, t, i) ? t : null;
1193
- }
1194
- function hr(t, e, n, r, i, o, a) {
1195
- for (var s = 0, l = r.length; s < l; s++) {
1196
- var u = r[s], c = i[s], p = u.getAction(e, n, t, c);
1197
- if (p) {
1198
- var f = gn(p, u, c, o, a);
1199
- if (f)
1200
- return { action: f, interactable: u, element: c };
1201
- }
1202
- }
1203
- return { action: null, interactable: null, element: null };
1204
- }
1205
- function mn(t, e, n, r, i) {
1206
- var o = [], a = [], s = r;
1207
- function l(c) {
1208
- o.push(c), a.push(s);
1209
- }
1210
- for (; d.element(s); ) {
1211
- o = [], a = [], i.interactables.forEachMatch(s, l);
1212
- var u = hr(t, e, n, o, a, r, i);
1213
- if (u.action && !u.interactable.options[u.action.name].manualStart)
1214
- return u;
1215
- s = fe(s);
1216
- }
1217
- return { action: null, interactable: null, element: null };
1218
- }
1219
- function yn(t, e, n) {
1220
- var r = e.action, i = e.interactable, o = e.element;
1221
- r = r || { name: null }, t.interactable = i, t.element = o, Rt(t.prepared, r), t.rect = i && r.name ? i.getRect(o) : null, xn(t, n), n.fire("autoStart:prepared", { interaction: t });
1222
- }
1223
- function vt(t, e, n, r) {
1224
- var i = t.options, o = i[n.name].max, a = i[n.name].maxPerElement, s = r.autoStart.maxInteractions, l = 0, u = 0, c = 0;
1225
- if (!(o && a && s))
1226
- return !1;
1227
- for (var p = 0, f = r.interactions.list; p < f.length; p++) {
1228
- var h = f[p], v = h.prepared.name;
1229
- if (h.interacting() && (++l >= s || h.interactable === t && ((u += v === n.name ? 1 : 0) >= o || h.element === e && (c++, v === n.name && c >= a))))
1230
- return !1;
1231
- }
1232
- return s > 0;
1233
- }
1234
- function bn(t, e) {
1235
- return d.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1236
- }
1237
- function jt(t, e, n) {
1238
- var r = n.autoStart.cursorElement;
1239
- r && r !== t && (r.style.cursor = ""), t.ownerDocument.documentElement.style.cursor = e, t.style.cursor = e, n.autoStart.cursorElement = e ? t : null;
1240
- }
1241
- function xn(t, e) {
1242
- var n = t.interactable, r = t.element, i = t.prepared;
1243
- if (t.pointerType === "mouse" && n && n.options.styleCursor) {
1244
- var o = "";
1245
- if (i.name) {
1246
- var a = n.options[i.name].cursorChecker;
1247
- o = d.func(a) ? a(i, n, r, t._interacting) : e.actions.map[i.name].getCursor(i);
1248
- }
1249
- jt(t.element, o || "", e);
1250
- } else
1251
- e.autoStart.cursorElement && jt(e.autoStart.cursorElement, "", e);
1252
- }
1253
- var gr = { id: "auto-start/base", before: ["actions"], install: function(t) {
1254
- var e = t.interactStatic, n = t.defaults;
1255
- t.usePlugin(vr), n.base.actionChecker = null, n.base.styleCursor = !0, y(n.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), e.maxInteractions = function(r) {
1256
- return bn(r, t);
1257
- }, t.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: vt, cursorElement: null };
1258
- }, listeners: { "interactions:down": function(t, e) {
1259
- var n = t.interaction, r = t.pointer, i = t.event, o = t.eventTarget;
1260
- n.interacting() || yn(n, mn(n, r, i, o, e), e);
1261
- }, "interactions:move": function(t, e) {
1262
- (function(n, r) {
1263
- var i = n.interaction, o = n.pointer, a = n.event, s = n.eventTarget;
1264
- i.pointerType !== "mouse" || i.pointerIsDown || i.interacting() || yn(i, mn(i, o, a, s, r), r);
1265
- })(t, e), function(n, r) {
1266
- var i = n.interaction;
1267
- if (i.pointerIsDown && !i.interacting() && i.pointerWasMoved && i.prepared.name) {
1268
- r.fire("autoStart:before-start", n);
1269
- var o = i.interactable, a = i.prepared.name;
1270
- a && o && (o.options[a].manualStart || !vt(o, i.element, i.prepared, r) ? i.stop() : (i.start(i.prepared, o, i.element), xn(i, r)));
1271
- }
1272
- }(t, e);
1273
- }, "interactions:stop": function(t, e) {
1274
- var n = t.interaction, r = n.interactable;
1275
- r && r.options.styleCursor && jt(n.element, "", e);
1276
- } }, maxInteractions: bn, withinInteractionLimit: vt, validateAction: gn }, Ft = gr, mr = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
1277
- var n = t.interaction, r = t.eventTarget, i = t.dx, o = t.dy;
1278
- if (n.prepared.name === "drag") {
1279
- var a = Math.abs(i), s = Math.abs(o), l = n.interactable.options.drag, u = l.startAxis, c = a > s ? "x" : a < s ? "y" : "xy";
1280
- if (n.prepared.axis = l.lockAxis === "start" ? c[0] : l.lockAxis, c !== "xy" && u !== "xy" && u !== c) {
1281
- n.prepared.name = null;
1282
- for (var p = r, f = function(v) {
1283
- if (v !== n.interactable) {
1284
- var g = n.interactable.options.drag;
1285
- if (!g.manualStart && v.testIgnoreAllow(g, p, r)) {
1286
- var b = v.getAction(n.downPointer, n.downEvent, n, p);
1287
- if (b && b.name === "drag" && function(m, w) {
1288
- if (!w)
1289
- return !1;
1290
- var S = w.options.drag.startAxis;
1291
- return m === "xy" || S === "xy" || S === m;
1292
- }(c, v) && Ft.validateAction(b, v, p, r, e))
1293
- return v;
1294
- }
1295
- }
1296
- }; d.element(p); ) {
1297
- var h = e.interactables.forEachMatch(p, f);
1298
- if (h) {
1299
- n.prepared.name = "drag", n.interactable = h, n.element = p;
1300
- break;
1301
- }
1302
- p = fe(p);
1303
- }
1304
- }
1305
- }
1306
- } } };
1307
- function Vt(t) {
1308
- var e = t.prepared && t.prepared.name;
1309
- if (!e)
1310
- return null;
1311
- var n = t.interactable.options;
1312
- return n[e].hold || n[e].delay;
1313
- }
1314
- var yr = { id: "auto-start/hold", install: function(t) {
1315
- var e = t.defaults;
1316
- t.usePlugin(Ft), e.perAction.hold = 0, e.perAction.delay = 0;
1317
- }, listeners: { "interactions:new": function(t) {
1318
- t.interaction.autoStartHoldTimer = null;
1319
- }, "autoStart:prepared": function(t) {
1320
- var e = t.interaction, n = Vt(e);
1321
- n > 0 && (e.autoStartHoldTimer = setTimeout(function() {
1322
- e.start(e.prepared, e.interactable, e.element);
1323
- }, n));
1324
- }, "interactions:move": function(t) {
1325
- var e = t.interaction, n = t.duplicate;
1326
- e.autoStartHoldTimer && e.pointerWasMoved && !n && (clearTimeout(e.autoStartHoldTimer), e.autoStartHoldTimer = null);
1327
- }, "autoStart:before-start": function(t) {
1328
- var e = t.interaction;
1329
- Vt(e) > 0 && (e.prepared.name = null);
1330
- } }, getHoldDuration: Vt }, br = yr, xr = { id: "auto-start", install: function(t) {
1331
- t.usePlugin(Ft), t.usePlugin(br), t.usePlugin(mr);
1332
- } }, wr = function(t) {
1333
- return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : d.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1334
- };
1335
- function _r(t) {
1336
- var e = t.interaction, n = t.event;
1337
- e.interactable && e.interactable.checkAndPreventDefault(n);
1338
- }
1339
- var wn = { id: "core/interactablePreventDefault", install: function(t) {
1340
- var e = t.Interactable;
1341
- e.prototype.preventDefault = wr, e.prototype.checkAndPreventDefault = function(n) {
1342
- return function(r, i, o) {
1343
- var a = r.options.preventDefault;
1344
- if (a !== "never")
1345
- if (a !== "always") {
1346
- if (i.events.supportsPassive && /^touch(start|move)$/.test(o.type)) {
1347
- var s = X(o.target).document, l = i.getDocOptions(s);
1348
- if (!l || !l.events || l.events.passive !== !1)
1349
- return;
1350
- }
1351
- /^(mouse|pointer|touch)*(down|start)/i.test(o.type) || d.element(o.target) && me(o.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || o.preventDefault();
1352
- } else
1353
- o.preventDefault();
1354
- }(this, t, n);
1355
- }, t.interactions.docEvents.push({ type: "dragstart", listener: function(n) {
1356
- for (var r = 0, i = t.interactions.list; r < i.length; r++) {
1357
- var o = i[r];
1358
- if (o.element && (o.element === n.target || ye(o.element, n.target)))
1359
- return void o.interactable.checkAndPreventDefault(n);
1360
- }
1361
- } });
1362
- }, listeners: ["down", "move", "up", "cancel"].reduce(function(t, e) {
1363
- return t["interactions:".concat(e)] = _r, t;
1364
- }, {}) };
1365
- function ht(t, e) {
1366
- if (e.phaselessTypes[t])
1367
- return !0;
1368
- for (var n in e.map)
1369
- if (t.indexOf(n) === 0 && t.substr(n.length) in e.phases)
1370
- return !0;
1371
- return !1;
1372
- }
1373
- function We(t) {
1374
- var e = {};
1375
- for (var n in t) {
1376
- var r = t[n];
1377
- d.plainObject(r) ? e[n] = We(r) : d.array(r) ? e[n] = sn(r) : e[n] = r;
1378
- }
1379
- return e;
1380
- }
1381
- var $t = function() {
1382
- function t(e) {
1383
- A(this, t), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = e, this.result = gt(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
1384
- }
1385
- return P(t, [{ key: "start", value: function(e, n) {
1386
- var r, i, o = e.phase, a = this.interaction, s = function(u) {
1387
- var c = u.interactable.options[u.prepared.name], p = c.modifiers;
1388
- return p && p.length ? p : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map(function(f) {
1389
- var h = c[f];
1390
- return h && h.enabled && { options: h, methods: h._methods };
1391
- }).filter(function(f) {
1392
- return !!f;
1393
- });
1394
- }(a);
1395
- this.prepareStates(s), this.startEdges = y({}, a.edges), this.edges = y({}, this.startEdges), this.startOffset = (r = a.rect, i = n, r ? { left: i.x - r.left, top: i.y - r.top, right: r.right - i.x, bottom: r.bottom - i.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
1396
- var l = this.fillArg({ phase: o, pageCoords: n, preEnd: !1 });
1397
- return this.result = gt(), this.startAll(l), this.result = this.setAll(l);
1398
- } }, { key: "fillArg", value: function(e) {
1399
- var n = this.interaction;
1400
- return e.interaction = n, e.interactable = n.interactable, e.element = n.element, e.rect || (e.rect = n.rect), e.edges || (e.edges = this.startEdges), e.startOffset = this.startOffset, e;
1401
- } }, { key: "startAll", value: function(e) {
1402
- for (var n = 0, r = this.states; n < r.length; n++) {
1403
- var i = r[n];
1404
- i.methods.start && (e.state = i, i.methods.start(e));
1405
- }
1406
- } }, { key: "setAll", value: function(e) {
1407
- var n = e.phase, r = e.preEnd, i = e.skipModifiers, o = e.rect, a = e.edges;
1408
- e.coords = y({}, e.pageCoords), e.rect = y({}, o), e.edges = y({}, a);
1409
- for (var s = i ? this.states.slice(i) : this.states, l = gt(e.coords, e.rect), u = 0; u < s.length; u++) {
1410
- var c, p = s[u], f = p.options, h = y({}, e.coords), v = null;
1411
- (c = p.methods) != null && c.set && this.shouldDo(f, r, n) && (e.state = p, v = p.methods.set(e), ct(e.edges, e.rect, { x: e.coords.x - h.x, y: e.coords.y - h.y })), l.eventProps.push(v);
1412
- }
1413
- y(this.edges, e.edges), l.delta.x = e.coords.x - e.pageCoords.x, l.delta.y = e.coords.y - e.pageCoords.y, l.rectDelta.left = e.rect.left - o.left, l.rectDelta.right = e.rect.right - o.right, l.rectDelta.top = e.rect.top - o.top, l.rectDelta.bottom = e.rect.bottom - o.bottom;
1414
- var g = this.result.coords, b = this.result.rect;
1415
- if (g && b) {
1416
- var m = l.rect.left !== b.left || l.rect.right !== b.right || l.rect.top !== b.top || l.rect.bottom !== b.bottom;
1417
- l.changed = m || g.x !== l.coords.x || g.y !== l.coords.y;
1418
- }
1419
- return l;
1420
- } }, { key: "applyToInteraction", value: function(e) {
1421
- var n = this.interaction, r = e.phase, i = n.coords.cur, o = n.coords.start, a = this.result, s = this.startDelta, l = a.delta;
1422
- r === "start" && y(this.startDelta, a.delta);
1423
- for (var u = 0, c = [[o, s], [i, l]]; u < c.length; u++) {
1424
- var p = c[u], f = p[0], h = p[1];
1425
- f.page.x += h.x, f.page.y += h.y, f.client.x += h.x, f.client.y += h.y;
1426
- }
1427
- var v = this.result.rectDelta, g = e.rect || n.rect;
1428
- g.left += v.left, g.right += v.right, g.top += v.top, g.bottom += v.bottom, g.width = g.right - g.left, g.height = g.bottom - g.top;
1429
- } }, { key: "setAndApply", value: function(e) {
1430
- var n = this.interaction, r = e.phase, i = e.preEnd, o = e.skipModifiers, a = this.setAll(this.fillArg({ preEnd: i, phase: r, pageCoords: e.modifiedCoords || n.coords.cur.page }));
1431
- if (this.result = a, !a.changed && (!o || o < this.states.length) && n.interacting())
1432
- return !1;
1433
- if (e.modifiedCoords) {
1434
- var s = n.coords.cur.page, l = { x: e.modifiedCoords.x - s.x, y: e.modifiedCoords.y - s.y };
1435
- a.coords.x += l.x, a.coords.y += l.y, a.delta.x += l.x, a.delta.y += l.y;
1436
- }
1437
- this.applyToInteraction(e);
1438
- } }, { key: "beforeEnd", value: function(e) {
1439
- var n = e.interaction, r = e.event, i = this.states;
1440
- if (i && i.length) {
1441
- for (var o = !1, a = 0; a < i.length; a++) {
1442
- var s = i[a];
1443
- e.state = s;
1444
- var l = s.options, u = s.methods, c = u.beforeEnd && u.beforeEnd(e);
1445
- if (c)
1446
- return this.endResult = c, !1;
1447
- o = o || !o && this.shouldDo(l, !0, e.phase, !0);
1448
- }
1449
- o && n.move({ event: r, preEnd: !0 });
1450
- }
1451
- } }, { key: "stop", value: function(e) {
1452
- var n = e.interaction;
1453
- if (this.states && this.states.length) {
1454
- var r = y({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
1455
- this.fillArg(r);
1456
- for (var i = 0, o = this.states; i < o.length; i++) {
1457
- var a = o[i];
1458
- r.state = a, a.methods.stop && a.methods.stop(r);
1459
- }
1460
- this.states = null, this.endResult = null;
1461
- }
1462
- } }, { key: "prepareStates", value: function(e) {
1463
- this.states = [];
1464
- for (var n = 0; n < e.length; n++) {
1465
- var r = e[n], i = r.options, o = r.methods, a = r.name;
1466
- this.states.push({ options: i, methods: o, index: n, name: a });
1467
- }
1468
- return this.states;
1469
- } }, { key: "restoreInteractionCoords", value: function(e) {
1470
- var n = e.interaction, r = n.coords, i = n.rect, o = n.modification;
1471
- if (o.result) {
1472
- for (var a = o.startDelta, s = o.result, l = s.delta, u = s.rectDelta, c = 0, p = [[r.start, a], [r.cur, l]]; c < p.length; c++) {
1473
- var f = p[c], h = f[0], v = f[1];
1474
- h.page.x -= v.x, h.page.y -= v.y, h.client.x -= v.x, h.client.y -= v.y;
1475
- }
1476
- i.left -= u.left, i.right -= u.right, i.top -= u.top, i.bottom -= u.bottom;
1477
- }
1478
- } }, { key: "shouldDo", value: function(e, n, r, i) {
1479
- return !(!e || e.enabled === !1 || i && !e.endOnly || e.endOnly && !n || r === "start" && !e.setStart);
1480
- } }, { key: "copyFrom", value: function(e) {
1481
- this.startOffset = e.startOffset, this.startDelta = e.startDelta, this.startEdges = e.startEdges, this.edges = e.edges, this.states = e.states.map(function(n) {
1482
- return We(n);
1483
- }), this.result = gt(y({}, e.result.coords), y({}, e.result.rect));
1484
- } }, { key: "destroy", value: function() {
1485
- for (var e in this)
1486
- this[e] = null;
1487
- } }]), t;
1488
- }();
1489
- function gt(t, e) {
1490
- return { rect: e, coords: t, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
1491
- }
1492
- function Oe(t, e) {
1493
- var n = t.defaults, r = { start: t.start, set: t.set, beforeEnd: t.beforeEnd, stop: t.stop }, i = function(o) {
1494
- var a = o || {};
1495
- for (var s in a.enabled = a.enabled !== !1, n)
1496
- s in a || (a[s] = n[s]);
1497
- var l = { options: a, methods: r, name: e, enable: function() {
1498
- return a.enabled = !0, l;
1499
- }, disable: function() {
1500
- return a.enabled = !1, l;
1501
- } };
1502
- return l;
1503
- };
1504
- return e && typeof e == "string" && (i._defaults = n, i._methods = r), i;
1505
- }
1506
- function Qe(t) {
1507
- var e = t.iEvent, n = t.interaction.modification.result;
1508
- n && (e.modifiers = n.eventProps);
1509
- }
1510
- var Er = { id: "modifiers/base", before: ["actions"], install: function(t) {
1511
- t.defaults.perAction.modifiers = [];
1512
- }, listeners: { "interactions:new": function(t) {
1513
- var e = t.interaction;
1514
- e.modification = new $t(e);
1515
- }, "interactions:before-action-start": function(t) {
1516
- var e = t.interaction, n = t.interaction.modification;
1517
- n.start(t, e.coords.start.page), e.edges = n.edges, n.applyToInteraction(t);
1518
- }, "interactions:before-action-move": function(t) {
1519
- var e = t.interaction, n = e.modification, r = n.setAndApply(t);
1520
- return e.edges = n.edges, r;
1521
- }, "interactions:before-action-end": function(t) {
1522
- var e = t.interaction, n = e.modification, r = n.beforeEnd(t);
1523
- return e.edges = n.startEdges, r;
1524
- }, "interactions:action-start": Qe, "interactions:action-move": Qe, "interactions:action-end": Qe, "interactions:after-action-start": function(t) {
1525
- return t.interaction.modification.restoreInteractionCoords(t);
1526
- }, "interactions:after-action-move": function(t) {
1527
- return t.interaction.modification.restoreInteractionCoords(t);
1528
- }, "interactions:stop": function(t) {
1529
- return t.interaction.modification.stop(t);
1530
- } } }, _n = Er, En = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Nt = function(t) {
1531
- W(n, t);
1532
- var e = le(n);
1533
- function n(r, i, o, a, s, l, u) {
1534
- var c;
1535
- A(this, n), (c = e.call(this, r)).relatedTarget = null, c.screenX = void 0, c.screenY = void 0, c.button = void 0, c.buttons = void 0, c.ctrlKey = void 0, c.shiftKey = void 0, c.altKey = void 0, c.metaKey = void 0, c.page = void 0, c.client = void 0, c.delta = void 0, c.rect = void 0, c.x0 = void 0, c.y0 = void 0, c.t0 = void 0, c.dt = void 0, c.duration = void 0, c.clientX0 = void 0, c.clientY0 = void 0, c.velocity = void 0, c.speed = void 0, c.swipe = void 0, c.axes = void 0, c.preEnd = void 0, s = s || r.element;
1536
- var p = r.interactable, f = (p && p.options || En).deltaSource, h = qe(p, s, o), v = a === "start", g = a === "end", b = v ? J(c) : r.prevEvent, m = v ? r.coords.start : g ? { page: b.page, client: b.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1537
- return c.page = y({}, m.page), c.client = y({}, m.client), c.rect = y({}, r.rect), c.timeStamp = m.timeStamp, g || (c.page.x -= h.x, c.page.y -= h.y, c.client.x -= h.x, c.client.y -= h.y), c.ctrlKey = i.ctrlKey, c.altKey = i.altKey, c.shiftKey = i.shiftKey, c.metaKey = i.metaKey, c.button = i.button, c.buttons = i.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = u || o + (a || ""), c.interactable = p, c.t0 = v ? r.pointers[r.pointers.length - 1].downTime : b.t0, c.x0 = r.coords.start.page.x - h.x, c.y0 = r.coords.start.page.y - h.y, c.clientX0 = r.coords.start.client.x - h.x, c.clientY0 = r.coords.start.client.y - h.y, c.delta = v || g ? { x: 0, y: 0 } : { x: c[f].x - b[f].x, y: c[f].y - b[f].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = y({}, r.coords.velocity[f]), c.speed = Ue(c.velocity.x, c.velocity.y), c.swipe = g || a === "inertiastart" ? c.getSwipe() : null, c;
1538
- }
1539
- return P(n, [{ key: "getSwipe", value: function() {
1540
- var r = this._interaction;
1541
- if (r.prevEvent.speed < 600 || this.timeStamp - r.prevEvent.timeStamp > 150)
1542
- return null;
1543
- var i = 180 * Math.atan2(r.prevEvent.velocityY, r.prevEvent.velocityX) / Math.PI;
1544
- i < 0 && (i += 360);
1545
- var o = 112.5 <= i && i < 247.5, a = 202.5 <= i && i < 337.5;
1546
- return { up: a, down: !a && 22.5 <= i && i < 157.5, left: o, right: !o && (292.5 <= i || i < 67.5), angle: i, speed: r.prevEvent.speed, velocity: { x: r.prevEvent.velocityX, y: r.prevEvent.velocityY } };
1547
- } }, { key: "preventDefault", value: function() {
1548
- } }, { key: "stopImmediatePropagation", value: function() {
1549
- this.immediatePropagationStopped = this.propagationStopped = !0;
1550
- } }, { key: "stopPropagation", value: function() {
1551
- this.propagationStopped = !0;
1552
- } }]), n;
1553
- }(ft);
1554
- Object.defineProperties(Nt.prototype, { pageX: { get: function() {
1555
- return this.page.x;
1556
- }, set: function(t) {
1557
- this.page.x = t;
1558
- } }, pageY: { get: function() {
1559
- return this.page.y;
1560
- }, set: function(t) {
1561
- this.page.y = t;
1562
- } }, clientX: { get: function() {
1563
- return this.client.x;
1564
- }, set: function(t) {
1565
- this.client.x = t;
1566
- } }, clientY: { get: function() {
1567
- return this.client.y;
1568
- }, set: function(t) {
1569
- this.client.y = t;
1570
- } }, dx: { get: function() {
1571
- return this.delta.x;
1572
- }, set: function(t) {
1573
- this.delta.x = t;
1574
- } }, dy: { get: function() {
1575
- return this.delta.y;
1576
- }, set: function(t) {
1577
- this.delta.y = t;
1578
- } }, velocityX: { get: function() {
1579
- return this.velocity.x;
1580
- }, set: function(t) {
1581
- this.velocity.x = t;
1582
- } }, velocityY: { get: function() {
1583
- return this.velocity.y;
1584
- }, set: function(t) {
1585
- this.velocity.y = t;
1586
- } } });
1587
- var Sr = P(function t(e, n, r, i, o) {
1588
- A(this, t), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = e, this.pointer = n, this.event = r, this.downTime = i, this.downTarget = o;
1589
- }), Tr = function(t) {
1590
- return t.interactable = "", t.element = "", t.prepared = "", t.pointerIsDown = "", t.pointerWasMoved = "", t._proxy = "", t;
1591
- }({}), Sn = function(t) {
1592
- return t.start = "", t.move = "", t.end = "", t.stop = "", t.interacting = "", t;
1593
- }({}), kr = 0, Pr = function() {
1594
- function t(e) {
1595
- var n = this, r = e.pointerType, i = e.scopeFire;
1596
- A(this, t), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = Je(function(c) {
1597
- this.move(c);
1598
- }, "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = kr++, this._scopeFire = i, this.pointerType = r;
1599
- var o = this;
1600
- this._proxy = {};
1601
- var a = function(c) {
1602
- Object.defineProperty(n._proxy, c, { get: function() {
1603
- return o[c];
1604
- } });
1605
- };
1606
- for (var s in Tr)
1607
- a(s);
1608
- var l = function(c) {
1609
- Object.defineProperty(n._proxy, c, { value: function() {
1610
- return o[c].apply(o, arguments);
1611
- } });
1612
- };
1613
- for (var u in Sn)
1614
- l(u);
1615
- this._scopeFire("interactions:new", { interaction: this });
1616
- }
1617
- return P(t, [{ key: "pointerMoveTolerance", get: function() {
1618
- return 1;
1619
- } }, { key: "pointerDown", value: function(e, n, r) {
1620
- var i = this.updatePointer(e, n, r, !0), o = this.pointers[i];
1621
- this._scopeFire("interactions:down", { pointer: e, event: n, eventTarget: r, pointerIndex: i, pointerInfo: o, type: "down", interaction: this });
1622
- } }, { key: "start", value: function(e, n, r) {
1623
- return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (Rt(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? y({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
1624
- } }, { key: "pointerMove", value: function(e, n, r) {
1625
- this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
1626
- var i, o, a = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
1627
- this.pointerIsDown && !this.pointerWasMoved && (i = this.coords.cur.client.x - this.coords.start.client.x, o = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Ue(i, o) > this.pointerMoveTolerance);
1628
- var s, l, u, c = this.getPointerIndex(e), p = { pointer: e, pointerIndex: c, pointerInfo: this.pointers[c], event: n, type: "move", eventTarget: r, dx: i, dy: o, duplicate: a, interaction: this };
1629
- a || (s = this.coords.velocity, l = this.coords.delta, u = Math.max(l.timeStamp / 1e3, 1e-3), s.page.x = l.page.x / u, s.page.y = l.page.y / u, s.client.x = l.client.x / u, s.client.y = l.client.y / u, s.timeStamp = u), this._scopeFire("interactions:move", p), a || this.simulation || (this.interacting() && (p.type = null, this.move(p)), this.pointerWasMoved && pt(this.coords.prev, this.coords.cur));
1630
- } }, { key: "move", value: function(e) {
1631
- e && e.event || Zt(this.coords.delta), (e = y({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
1632
- } }, { key: "pointerUp", value: function(e, n, r, i) {
1633
- var o = this.getPointerIndex(e);
1634
- o === -1 && (o = this.updatePointer(e, n, r, !1));
1635
- var a = /cancel$/i.test(n.type) ? "cancel" : "up";
1636
- this._scopeFire("interactions:".concat(a), { pointer: e, pointerIndex: o, pointerInfo: this.pointers[o], event: n, eventTarget: r, type: a, curEventTarget: i, interaction: this }), this.simulation || this.end(n), this.removePointer(e, n);
1637
- } }, { key: "documentBlur", value: function(e) {
1638
- this.end(e), this._scopeFire("interactions:blur", { event: e, type: "blur", interaction: this });
1639
- } }, { key: "end", value: function(e) {
1640
- var n;
1641
- this._ending = !0, e = e || this._latestPointer.event, this.interacting() && (n = this._doPhase({ event: e, interaction: this, phase: "end" })), this._ending = !1, n === !0 && this.stop();
1642
- } }, { key: "currentAction", value: function() {
1643
- return this._interacting ? this.prepared.name : null;
1644
- } }, { key: "interacting", value: function() {
1645
- return this._interacting;
1646
- } }, { key: "stop", value: function() {
1647
- this._scopeFire("interactions:stop", { interaction: this }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;
1648
- } }, { key: "getPointerIndex", value: function(e) {
1649
- var n = He(e);
1650
- return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : Ge(this.pointers, function(r) {
1651
- return r.id === n;
1652
- });
1653
- } }, { key: "getPointerInfo", value: function(e) {
1654
- return this.pointers[this.getPointerIndex(e)];
1655
- } }, { key: "updatePointer", value: function(e, n, r, i) {
1656
- var o, a, s, l = He(e), u = this.getPointerIndex(e), c = this.pointers[u];
1657
- return i = i !== !1 && (i || /(down|start)$/i.test(n.type)), c ? c.pointer = e : (c = new Sr(l, e, n, null, null), u = this.pointers.length, this.pointers.push(c)), ir(this.coords.cur, this.pointers.map(function(p) {
1658
- return p.pointer;
1659
- }), this._now()), o = this.coords.delta, a = this.coords.prev, s = this.coords.cur, o.page.x = s.page.x - a.page.x, o.page.y = s.page.y - a.page.y, o.client.x = s.client.x - a.client.x, o.client.y = s.client.y - a.client.y, o.timeStamp = s.timeStamp - a.timeStamp, i && (this.pointerIsDown = !0, c.downTime = this.coords.cur.timeStamp, c.downTarget = r, ut(this.downPointer, e), this.interacting() || (pt(this.coords.start, this.coords.cur), pt(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: i, pointerInfo: c, pointerIndex: u, interaction: this }), u;
1660
- } }, { key: "removePointer", value: function(e, n) {
1661
- var r = this.getPointerIndex(e);
1662
- if (r !== -1) {
1663
- var i = this.pointers[r];
1664
- this._scopeFire("interactions:remove-pointer", { pointer: e, event: n, eventTarget: null, pointerIndex: r, pointerInfo: i, interaction: this }), this.pointers.splice(r, 1), this.pointerIsDown = !1;
1665
- }
1666
- } }, { key: "_updateLatestPointer", value: function(e, n, r) {
1667
- this._latestPointer.pointer = e, this._latestPointer.event = n, this._latestPointer.eventTarget = r;
1668
- } }, { key: "destroy", value: function() {
1669
- this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
1670
- } }, { key: "_createPreparedEvent", value: function(e, n, r, i) {
1671
- return new Nt(this, e, this.prepared.name, n, this.element, r, i);
1672
- } }, { key: "_fireEvent", value: function(e) {
1673
- var n;
1674
- (n = this.interactable) == null || n.fire(e), (!this.prevEvent || e.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = e);
1675
- } }, { key: "_doPhase", value: function(e) {
1676
- var n = e.event, r = e.phase, i = e.preEnd, o = e.type, a = this.rect;
1677
- if (a && r === "move" && (ct(this.edges, a, this.coords.delta[this.interactable.options.deltaSource]), a.width = a.right - a.left, a.height = a.bottom - a.top), this._scopeFire("interactions:before-action-".concat(r), e) === !1)
1678
- return !1;
1679
- var s = e.iEvent = this._createPreparedEvent(n, r, i, o);
1680
- return this._scopeFire("interactions:action-".concat(r), e), r === "start" && (this.prevEvent = s), this._fireEvent(s), this._scopeFire("interactions:after-action-".concat(r), e), !0;
1681
- } }, { key: "_now", value: function() {
1682
- return Date.now();
1683
- } }]), t;
1684
- }();
1685
- function Tn(t) {
1686
- kn(t.interaction);
1687
- }
1688
- function kn(t) {
1689
- if (!function(n) {
1690
- return !(!n.offset.pending.x && !n.offset.pending.y);
1691
- }(t))
1692
- return !1;
1693
- var e = t.offset.pending;
1694
- return Bt(t.coords.cur, e), Bt(t.coords.delta, e), ct(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
1695
- }
1696
- function Or(t) {
1697
- var e = t.x, n = t.y;
1698
- this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
1699
- }
1700
- function Bt(t, e) {
1701
- var n = t.page, r = t.client, i = e.x, o = e.y;
1702
- n.x += i, n.y += o, r.x += i, r.y += o;
1703
- }
1704
- Sn.offsetBy = "";
1705
- var Ir = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(t) {
1706
- t.Interaction.prototype.offsetBy = Or;
1707
- }, listeners: { "interactions:new": function(t) {
1708
- t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
1709
- }, "interactions:update-pointer": function(t) {
1710
- return function(e) {
1711
- e.pointerIsDown && (Bt(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
1712
- }(t.interaction);
1713
- }, "interactions:before-action-start": Tn, "interactions:before-action-move": Tn, "interactions:before-action-end": function(t) {
1714
- var e = t.interaction;
1715
- if (kn(e))
1716
- return e.move({ offset: !0 }), e.end(), !1;
1717
- }, "interactions:stop": function(t) {
1718
- var e = t.interaction;
1719
- e.offset.total.x = 0, e.offset.total.y = 0, e.offset.pending.x = 0, e.offset.pending.y = 0;
1720
- } } }, Pn = Ir, Dr = function() {
1721
- function t(e) {
1722
- A(this, t), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = e;
1723
- }
1724
- return P(t, [{ key: "start", value: function(e) {
1725
- var n = this.interaction, r = mt(n);
1726
- if (!r || !r.enabled)
1727
- return !1;
1728
- var i = n.coords.velocity.client, o = Ue(i.x, i.y), a = this.modification || (this.modification = new $t(n));
1729
- if (a.copyFrom(n.modification), this.t0 = n._now(), this.allowResume = r.allowResume, this.v0 = o, this.currentOffset = { x: 0, y: 0 }, this.startCoords = n.coords.cur.page, this.modifierArg = a.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - n.coords.cur.timeStamp < 50 && o > r.minSpeed && o > r.endSpeed)
1730
- this.startInertia();
1731
- else {
1732
- if (a.result = a.setAll(this.modifierArg), !a.result.changed)
1733
- return !1;
1734
- this.startSmoothEnd();
1735
- }
1736
- return n.modification.result.rect = null, n.offsetBy(this.targetOffset), n._doPhase({ interaction: n, event: e, phase: "inertiastart" }), n.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), n.modification.result.rect = null, this.active = !0, n.simulation = this, !0;
1737
- } }, { key: "startInertia", value: function() {
1738
- var e = this, n = this.interaction.coords.velocity.client, r = mt(this.interaction), i = r.resistance, o = -Math.log(r.endSpeed / this.v0) / i;
1739
- this.targetOffset = { x: (n.x - o) / i, y: (n.y - o) / i }, this.te = o, this.lambda_v0 = i / this.v0, this.one_ve_v0 = 1 - r.endSpeed / this.v0;
1740
- var a = this.modification, s = this.modifierArg;
1741
- s.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, a.result = a.setAll(s), a.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + a.result.delta.x, y: this.targetOffset.y + a.result.delta.y }), this.onNextFrame(function() {
1742
- return e.inertiaTick();
1743
- });
1744
- } }, { key: "startSmoothEnd", value: function() {
1745
- var e = this;
1746
- this.smoothEnd = !0, this.isModified = !0, this.targetOffset = { x: this.modification.result.delta.x, y: this.modification.result.delta.y }, this.onNextFrame(function() {
1747
- return e.smoothEndTick();
1748
- });
1749
- } }, { key: "onNextFrame", value: function(e) {
1750
- var n = this;
1751
- this.timeout = Pe.request(function() {
1752
- n.active && e();
1753
- });
1754
- } }, { key: "inertiaTick", value: function() {
1755
- var e, n, r, i, o, a, s, l = this, u = this.interaction, c = mt(u).resistance, p = (u._now() - this.t0) / 1e3;
1756
- if (p < this.te) {
1757
- var f, h = 1 - (Math.exp(-c * p) - this.lambda_v0) / this.one_ve_v0;
1758
- this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, i = this.targetOffset.y, o = this.modifiedOffset.x, a = this.modifiedOffset.y, f = { x: On(s = h, e, r, o), y: On(s, n, i, a) }) : f = { x: this.targetOffset.x * h, y: this.targetOffset.y * h };
1759
- var v = { x: f.x - this.currentOffset.x, y: f.y - this.currentOffset.y };
1760
- this.currentOffset.x += v.x, this.currentOffset.y += v.y, u.offsetBy(v), u.move(), this.onNextFrame(function() {
1761
- return l.inertiaTick();
1762
- });
1763
- } else
1764
- u.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
1765
- } }, { key: "smoothEndTick", value: function() {
1766
- var e = this, n = this.interaction, r = n._now() - this.t0, i = mt(n).smoothEndDuration;
1767
- if (r < i) {
1768
- var o = { x: In(r, 0, this.targetOffset.x, i), y: In(r, 0, this.targetOffset.y, i) }, a = { x: o.x - this.currentOffset.x, y: o.y - this.currentOffset.y };
1769
- this.currentOffset.x += a.x, this.currentOffset.y += a.y, n.offsetBy(a), n.move({ skipModifiers: this.modifierCount }), this.onNextFrame(function() {
1770
- return e.smoothEndTick();
1771
- });
1772
- } else
1773
- n.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
1774
- } }, { key: "resume", value: function(e) {
1775
- var n = e.pointer, r = e.event, i = e.eventTarget, o = this.interaction;
1776
- o.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), o.updatePointer(n, r, i, !0), o._doPhase({ interaction: o, event: r, phase: "resume" }), pt(o.coords.prev, o.coords.cur), this.stop();
1777
- } }, { key: "end", value: function() {
1778
- this.interaction.move(), this.interaction.end(), this.stop();
1779
- } }, { key: "stop", value: function() {
1780
- this.active = this.smoothEnd = !1, this.interaction.simulation = null, Pe.cancel(this.timeout);
1781
- } }]), t;
1782
- }();
1783
- function mt(t) {
1784
- var e = t.interactable, n = t.prepared;
1785
- return e && e.options && n.name && e.options[n.name].inertia;
1786
- }
1787
- var Mr = { id: "inertia", before: ["modifiers", "actions"], install: function(t) {
1788
- var e = t.defaults;
1789
- t.usePlugin(Pn), t.usePlugin(_n), t.actions.phases.inertiastart = !0, t.actions.phases.resume = !0, e.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
1790
- }, listeners: { "interactions:new": function(t) {
1791
- var e = t.interaction;
1792
- e.inertia = new Dr(e);
1793
- }, "interactions:before-action-end": function(t) {
1794
- var e = t.interaction, n = t.event;
1795
- return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;
1796
- }, "interactions:down": function(t) {
1797
- var e = t.interaction, n = t.eventTarget, r = e.inertia;
1798
- if (r.active)
1799
- for (var i = n; d.element(i); ) {
1800
- if (i === e.element) {
1801
- r.resume(t);
1802
- break;
1803
- }
1804
- i = fe(i);
1805
- }
1806
- }, "interactions:stop": function(t) {
1807
- var e = t.interaction.inertia;
1808
- e.active && e.stop();
1809
- }, "interactions:before-action-resume": function(t) {
1810
- var e = t.interaction.modification;
1811
- e.stop(t), e.start(t, t.interaction.coords.cur.page), e.applyToInteraction(t);
1812
- }, "interactions:before-action-inertiastart": function(t) {
1813
- return t.interaction.modification.setAndApply(t);
1814
- }, "interactions:action-resume": Qe, "interactions:action-inertiastart": Qe, "interactions:after-action-inertiastart": function(t) {
1815
- return t.interaction.modification.restoreInteractionCoords(t);
1816
- }, "interactions:after-action-resume": function(t) {
1817
- return t.interaction.modification.restoreInteractionCoords(t);
1818
- } } };
1819
- function On(t, e, n, r) {
1820
- var i = 1 - t;
1821
- return i * i * e + 2 * i * t * n + t * t * r;
1822
- }
1823
- function In(t, e, n, r) {
1824
- return -n * (t /= r) * (t - 2) + e;
1825
- }
1826
- var zr = Mr;
1827
- function Dn(t, e) {
1828
- for (var n = 0; n < e.length; n++) {
1829
- var r = e[n];
1830
- if (t.immediatePropagationStopped)
1831
- break;
1832
- r(t);
1833
- }
1834
- }
1835
- var Mn = function() {
1836
- function t(e) {
1837
- A(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = y({}, e || {});
1838
- }
1839
- return P(t, [{ key: "fire", value: function(e) {
1840
- var n, r = this.global;
1841
- (n = this.types[e.type]) && Dn(e, n), !e.propagationStopped && r && (n = r[e.type]) && Dn(e, n);
1842
- } }, { key: "on", value: function(e, n) {
1843
- var r = Ce(e, n);
1844
- for (e in r)
1845
- this.types[e] = an(this.types[e] || [], r[e]);
1846
- } }, { key: "off", value: function(e, n) {
1847
- var r = Ce(e, n);
1848
- for (e in r) {
1849
- var i = this.types[e];
1850
- if (i && i.length)
1851
- for (var o = 0, a = r[e]; o < a.length; o++) {
1852
- var s = a[o], l = i.indexOf(s);
1853
- l !== -1 && i.splice(l, 1);
1854
- }
1855
- }
1856
- } }, { key: "getRect", value: function(e) {
1857
- return null;
1858
- } }]), t;
1859
- }(), Ar = function() {
1860
- function t(e) {
1861
- A(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, ut(this, e);
1862
- }
1863
- return P(t, [{ key: "preventOriginalDefault", value: function() {
1864
- this.originalEvent.preventDefault();
1865
- } }, { key: "stopPropagation", value: function() {
1866
- this.originalEvent.stopPropagation();
1867
- } }, { key: "stopImmediatePropagation", value: function() {
1868
- this.originalEvent.stopImmediatePropagation();
1869
- } }]), t;
1870
- }();
1871
- function Ze(t) {
1872
- return d.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
1873
- }
1874
- function yt(t, e) {
1875
- return t === e || (typeof t == "boolean" ? !!e.capture === t && !e.passive : !!t.capture == !!e.capture && !!t.passive == !!e.passive);
1876
- }
1877
- var Cr = { id: "events", install: function(t) {
1878
- var e, n = [], r = {}, i = [], o = { add: a, remove: s, addDelegate: function(c, p, f, h, v) {
1879
- var g = Ze(v);
1880
- if (!r[f]) {
1881
- r[f] = [];
1882
- for (var b = 0; b < i.length; b++) {
1883
- var m = i[b];
1884
- a(m, f, l), a(m, f, u, !0);
1885
- }
1886
- }
1887
- var w = r[f], S = Ke(w, function(k) {
1888
- return k.selector === c && k.context === p;
1889
- });
1890
- S || (S = { selector: c, context: p, listeners: [] }, w.push(S)), S.listeners.push({ func: h, options: g });
1891
- }, removeDelegate: function(c, p, f, h, v) {
1892
- var g, b = Ze(v), m = r[f], w = !1;
1893
- if (m)
1894
- for (g = m.length - 1; g >= 0; g--) {
1895
- var S = m[g];
1896
- if (S.selector === c && S.context === p) {
1897
- for (var k = S.listeners, _ = k.length - 1; _ >= 0; _--) {
1898
- var T = k[_];
1899
- if (T.func === h && yt(T.options, b)) {
1900
- k.splice(_, 1), k.length || (m.splice(g, 1), s(p, f, l), s(p, f, u, !0)), w = !0;
1901
- break;
1902
- }
1903
- }
1904
- if (w)
1905
- break;
1906
- }
1907
- }
1908
- }, delegateListener: l, delegateUseCapture: u, delegatedEvents: r, documents: i, targets: n, supportsOptions: !1, supportsPassive: !1 };
1909
- function a(c, p, f, h) {
1910
- if (c.addEventListener) {
1911
- var v = Ze(h), g = Ke(n, function(b) {
1912
- return b.eventTarget === c;
1913
- });
1914
- g || (g = { eventTarget: c, events: {} }, n.push(g)), g.events[p] || (g.events[p] = []), Ke(g.events[p], function(b) {
1915
- return b.func === f && yt(b.options, v);
1916
- }) || (c.addEventListener(p, f, o.supportsOptions ? v : v.capture), g.events[p].push({ func: f, options: v }));
1917
- }
1918
- }
1919
- function s(c, p, f, h) {
1920
- if (c.addEventListener && c.removeEventListener) {
1921
- var v = Ge(n, function(ae) {
1922
- return ae.eventTarget === c;
1923
- }), g = n[v];
1924
- if (g && g.events)
1925
- if (p !== "all") {
1926
- var b = !1, m = g.events[p];
1927
- if (m) {
1928
- if (f === "all") {
1929
- for (var w = m.length - 1; w >= 0; w--) {
1930
- var S = m[w];
1931
- s(c, p, S.func, S.options);
1932
- }
1933
- return;
1934
- }
1935
- for (var k = Ze(h), _ = 0; _ < m.length; _++) {
1936
- var T = m[_];
1937
- if (T.func === f && yt(T.options, k)) {
1938
- c.removeEventListener(p, f, o.supportsOptions ? k : k.capture), m.splice(_, 1), m.length === 0 && (delete g.events[p], b = !0);
1939
- break;
1940
- }
1941
- }
1942
- }
1943
- b && !Object.keys(g.events).length && n.splice(v, 1);
1944
- } else
1945
- for (p in g.events)
1946
- g.events.hasOwnProperty(p) && s(c, p, "all");
1947
- }
1948
- }
1949
- function l(c, p) {
1950
- for (var f = Ze(p), h = new Ar(c), v = r[c.type], g = on(c)[0], b = g; d.element(b); ) {
1951
- for (var m = 0; m < v.length; m++) {
1952
- var w = v[m], S = w.selector, k = w.context;
1953
- if (me(b, S) && ye(k, g) && ye(k, b)) {
1954
- var _ = w.listeners;
1955
- h.currentTarget = b;
1956
- for (var T = 0; T < _.length; T++) {
1957
- var ae = _[T];
1958
- yt(ae.options, f) && ae.func(h);
1959
- }
1960
- }
1961
- }
1962
- b = fe(b);
1963
- }
1964
- }
1965
- function u(c) {
1966
- return l(c, !0);
1967
- }
1968
- return (e = t.document) == null || e.createElement("div").addEventListener("test", null, { get capture() {
1969
- return o.supportsOptions = !0;
1970
- }, get passive() {
1971
- return o.supportsPassive = !0;
1972
- } }), t.events = o, o;
1973
- } }, Lt = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
1974
- for (var e = 0, n = Lt.methodOrder; e < n.length; e++) {
1975
- var r = n[e], i = Lt[r](t);
1976
- if (i)
1977
- return i;
1978
- }
1979
- return null;
1980
- }, simulationResume: function(t) {
1981
- var e = t.pointerType, n = t.eventType, r = t.eventTarget, i = t.scope;
1982
- if (!/down|start/i.test(n))
1983
- return null;
1984
- for (var o = 0, a = i.interactions.list; o < a.length; o++) {
1985
- var s = a[o], l = r;
1986
- if (s.simulation && s.simulation.allowResume && s.pointerType === e)
1987
- for (; l; ) {
1988
- if (l === s.element)
1989
- return s;
1990
- l = fe(l);
1991
- }
1992
- }
1993
- return null;
1994
- }, mouseOrPen: function(t) {
1995
- var e, n = t.pointerId, r = t.pointerType, i = t.eventType, o = t.scope;
1996
- if (r !== "mouse" && r !== "pen")
1997
- return null;
1998
- for (var a = 0, s = o.interactions.list; a < s.length; a++) {
1999
- var l = s[a];
2000
- if (l.pointerType === r) {
2001
- if (l.simulation && !zn(l, n))
2002
- continue;
2003
- if (l.interacting())
2004
- return l;
2005
- e || (e = l);
2006
- }
2007
- }
2008
- if (e)
2009
- return e;
2010
- for (var u = 0, c = o.interactions.list; u < c.length; u++) {
2011
- var p = c[u];
2012
- if (!(p.pointerType !== r || /down/i.test(i) && p.simulation))
2013
- return p;
2014
- }
2015
- return null;
2016
- }, hasPointer: function(t) {
2017
- for (var e = t.pointerId, n = 0, r = t.scope.interactions.list; n < r.length; n++) {
2018
- var i = r[n];
2019
- if (zn(i, e))
2020
- return i;
2021
- }
2022
- return null;
2023
- }, idle: function(t) {
2024
- for (var e = t.pointerType, n = 0, r = t.scope.interactions.list; n < r.length; n++) {
2025
- var i = r[n];
2026
- if (i.pointers.length === 1) {
2027
- var o = i.interactable;
2028
- if (o && (!o.options.gesture || !o.options.gesture.enabled))
2029
- continue;
2030
- } else if (i.pointers.length >= 2)
2031
- continue;
2032
- if (!i.interacting() && e === i.pointerType)
2033
- return i;
2034
- }
2035
- return null;
2036
- } };
2037
- function zn(t, e) {
2038
- return t.pointers.some(function(n) {
2039
- return n.id === e;
2040
- });
2041
- }
2042
- var Rr = Lt, Wt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2043
- function An(t, e) {
2044
- return function(n) {
2045
- var r = e.interactions.list, i = rn(n), o = on(n), a = o[0], s = o[1], l = [];
2046
- if (/^touch/.test(n.type)) {
2047
- e.prevTouchTime = e.now();
2048
- for (var u = 0, c = n.changedTouches; u < c.length; u++) {
2049
- var p = c[u], f = { pointer: p, pointerId: He(p), pointerType: i, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, h = Cn(f);
2050
- l.push([f.pointer, f.eventTarget, f.curEventTarget, h]);
2051
- }
2052
- } else {
2053
- var v = !1;
2054
- if (!ce.supportsPointerEvent && /mouse/.test(n.type)) {
2055
- for (var g = 0; g < r.length && !v; g++)
2056
- v = r[g].pointerType !== "mouse" && r[g].pointerIsDown;
2057
- v = v || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2058
- }
2059
- if (!v) {
2060
- var b = { pointer: n, pointerId: He(n), pointerType: i, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, m = Cn(b);
2061
- l.push([b.pointer, b.eventTarget, b.curEventTarget, m]);
2062
- }
2063
- }
2064
- for (var w = 0; w < l.length; w++) {
2065
- var S = l[w], k = S[0], _ = S[1], T = S[2];
2066
- S[3][t](k, n, _, T);
2067
- }
2068
- };
2069
- }
2070
- function Cn(t) {
2071
- var e = t.pointerType, n = t.scope, r = { interaction: Rr.search(t), searchDetails: t };
2072
- return n.fire("interactions:find", r), r.interaction || n.interactions.new({ pointerType: e });
2073
- }
2074
- function Xt(t, e) {
2075
- var n = t.doc, r = t.scope, i = t.options, o = r.interactions.docEvents, a = r.events, s = a[e];
2076
- for (var l in r.browser.isIOS && !i.events && (i.events = { passive: !1 }), a.delegatedEvents)
2077
- s(n, l, a.delegateListener), s(n, l, a.delegateUseCapture, !0);
2078
- for (var u = i && i.events, c = 0; c < o.length; c++) {
2079
- var p = o[c];
2080
- s(n, p.type, p.listener, u);
2081
- }
2082
- }
2083
- var jr = { id: "core/interactions", install: function(t) {
2084
- for (var e = {}, n = 0; n < Wt.length; n++) {
2085
- var r = Wt[n];
2086
- e[r] = An(r, t);
2087
- }
2088
- var i, o = ce.pEventTypes;
2089
- function a() {
2090
- for (var s = 0, l = t.interactions.list; s < l.length; s++) {
2091
- var u = l[s];
2092
- if (u.pointerIsDown && u.pointerType === "touch" && !u._interacting)
2093
- for (var c = function() {
2094
- var h = f[p];
2095
- t.documents.some(function(v) {
2096
- return ye(v.doc, h.downTarget);
2097
- }) || u.removePointer(h.pointer, h.event);
2098
- }, p = 0, f = u.pointers; p < f.length; p++)
2099
- c();
2100
- }
2101
- }
2102
- (i = K.PointerEvent ? [{ type: o.down, listener: a }, { type: o.down, listener: e.pointerDown }, { type: o.move, listener: e.pointerMove }, { type: o.up, listener: e.pointerUp }, { type: o.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
2103
- for (var l = 0, u = t.interactions.list; l < u.length; l++)
2104
- u[l].documentBlur(s);
2105
- } }), t.prevTouchTime = 0, t.Interaction = function(s) {
2106
- W(u, s);
2107
- var l = le(u);
2108
- function u() {
2109
- return A(this, u), l.apply(this, arguments);
2110
- }
2111
- return P(u, [{ key: "pointerMoveTolerance", get: function() {
2112
- return t.interactions.pointerMoveTolerance;
2113
- }, set: function(c) {
2114
- t.interactions.pointerMoveTolerance = c;
2115
- } }, { key: "_now", value: function() {
2116
- return t.now();
2117
- } }]), u;
2118
- }(Pr), t.interactions = { list: [], new: function(s) {
2119
- s.scopeFire = function(u, c) {
2120
- return t.fire(u, c);
2121
- };
2122
- var l = new t.Interaction(s);
2123
- return t.interactions.list.push(l), l;
2124
- }, listeners: e, docEvents: i, pointerMoveTolerance: 1 }, t.usePlugin(wn);
2125
- }, listeners: { "scope:add-document": function(t) {
2126
- return Xt(t, "add");
2127
- }, "scope:remove-document": function(t) {
2128
- return Xt(t, "remove");
2129
- }, "interactable:unset": function(t, e) {
2130
- for (var n = t.interactable, r = e.interactions.list.length - 1; r >= 0; r--) {
2131
- var i = e.interactions.list[r];
2132
- i.interactable === n && (i.stop(), e.fire("interactions:destroy", { interaction: i }), i.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
2133
- }
2134
- } }, onDocSignal: Xt, doOnInteractions: An, methodNames: Wt }, Fr = jr, Ie = function(t) {
2135
- return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2136
- }(Ie || {}), Vr = function() {
2137
- function t(e, n, r, i) {
2138
- A(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new Mn(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || r, this._win = X(L(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = i, this.set(n);
2139
- }
2140
- return P(t, [{ key: "_defaults", get: function() {
2141
- return { base: {}, perAction: {}, actions: {} };
2142
- } }, { key: "setOnEvents", value: function(e, n) {
2143
- return d.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), d.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), d.func(n.onend) && this.on("".concat(e, "end"), n.onend), d.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
2144
- } }, { key: "updatePerActionListeners", value: function(e, n, r) {
2145
- var i, o = this, a = (i = this._actions.map[e]) == null ? void 0 : i.filterEventType, s = function(l) {
2146
- return (a == null || a(l)) && ht(l, o._actions);
2147
- };
2148
- (d.array(n) || d.object(n)) && this._onOff(Ie.Off, e, n, void 0, s), (d.array(r) || d.object(r)) && this._onOff(Ie.On, e, r, void 0, s);
2149
- } }, { key: "setPerAction", value: function(e, n) {
2150
- var r = this._defaults;
2151
- for (var i in n) {
2152
- var o = i, a = this.options[e], s = n[o];
2153
- o === "listeners" && this.updatePerActionListeners(e, a.listeners, s), d.array(s) ? a[o] = sn(s) : d.plainObject(s) ? (a[o] = y(a[o] || {}, We(s)), d.object(r.perAction[o]) && "enabled" in r.perAction[o] && (a[o].enabled = s.enabled !== !1)) : d.bool(s) && d.object(r.perAction[o]) ? a[o].enabled = s : a[o] = s;
2154
- }
2155
- } }, { key: "getRect", value: function(e) {
2156
- return e = e || (d.element(this.target) ? this.target : null), d.string(this.target) && (e = e || this._context.querySelector(this.target)), Be(e);
2157
- } }, { key: "rectChecker", value: function(e) {
2158
- var n = this;
2159
- return d.func(e) ? (this.getRect = function(r) {
2160
- var i = y({}, e.apply(n, r));
2161
- return "width" in i || (i.width = i.right - i.left, i.height = i.bottom - i.top), i;
2162
- }, this) : e === null ? (delete this.getRect, this) : this.getRect;
2163
- } }, { key: "_backCompatOption", value: function(e, n) {
2164
- if (L(n) || d.object(n)) {
2165
- for (var r in this.options[e] = n, this._actions.map)
2166
- this.options[r][e] = n;
2167
- return this;
2168
- }
2169
- return this.options[e];
2170
- } }, { key: "origin", value: function(e) {
2171
- return this._backCompatOption("origin", e);
2172
- } }, { key: "deltaSource", value: function(e) {
2173
- return e === "page" || e === "client" ? (this.options.deltaSource = e, this) : this.options.deltaSource;
2174
- } }, { key: "getAllElements", value: function() {
2175
- var e = this.target;
2176
- return d.string(e) ? Array.from(this._context.querySelectorAll(e)) : d.func(e) && e.getAllElements ? e.getAllElements() : d.element(e) ? [e] : [];
2177
- } }, { key: "context", value: function() {
2178
- return this._context;
2179
- } }, { key: "inContext", value: function(e) {
2180
- return this._context === e.ownerDocument || ye(this._context, e);
2181
- } }, { key: "testIgnoreAllow", value: function(e, n, r) {
2182
- return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
2183
- } }, { key: "testAllow", value: function(e, n, r) {
2184
- return !e || !!d.element(r) && (d.string(e) ? Ye(r, e, n) : !!d.element(e) && ye(e, r));
2185
- } }, { key: "testIgnore", value: function(e, n, r) {
2186
- return !(!e || !d.element(r)) && (d.string(e) ? Ye(r, e, n) : !!d.element(e) && ye(e, r));
2187
- } }, { key: "fire", value: function(e) {
2188
- return this.events.fire(e), this;
2189
- } }, { key: "_onOff", value: function(e, n, r, i, o) {
2190
- d.object(n) && !d.array(n) && (i = r, r = null);
2191
- var a = Ce(n, r, o);
2192
- for (var s in a) {
2193
- s === "wheel" && (s = ce.wheelEvent);
2194
- for (var l = 0, u = a[s]; l < u.length; l++) {
2195
- var c = u[l];
2196
- ht(s, this._actions) ? this.events[e === Ie.On ? "on" : "off"](s, c) : d.string(this.target) ? this._scopeEvents[e === Ie.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, i) : this._scopeEvents[e === Ie.On ? "add" : "remove"](this.target, s, c, i);
2197
- }
2198
- }
2199
- return this;
2200
- } }, { key: "on", value: function(e, n, r) {
2201
- return this._onOff(Ie.On, e, n, r);
2202
- } }, { key: "off", value: function(e, n, r) {
2203
- return this._onOff(Ie.Off, e, n, r);
2204
- } }, { key: "set", value: function(e) {
2205
- var n = this._defaults;
2206
- for (var r in d.object(e) || (e = {}), this.options = We(n.base), this._actions.methodDict) {
2207
- var i = r, o = this._actions.methodDict[i];
2208
- this.options[i] = {}, this.setPerAction(i, y(y({}, n.perAction), n.actions[i])), this[o](e[i]);
2209
- }
2210
- for (var a in e)
2211
- a !== "getRect" ? d.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2212
- return this;
2213
- } }, { key: "unset", value: function() {
2214
- if (d.string(this.target))
2215
- for (var e in this._scopeEvents.delegatedEvents)
2216
- for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2217
- var i = n[r], o = i.selector, a = i.context, s = i.listeners;
2218
- o === this.target && a === this._context && n.splice(r, 1);
2219
- for (var l = s.length - 1; l >= 0; l--)
2220
- this._scopeEvents.removeDelegate(this.target, this._context, e, s[l][0], s[l][1]);
2221
- }
2222
- else
2223
- this._scopeEvents.remove(this.target, "all");
2224
- } }]), t;
2225
- }(), $r = function() {
2226
- function t(e) {
2227
- var n = this;
2228
- A(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2229
- var i = r.interactable, o = i.target, a = d.string(o) ? n.selectorMap[o] : o[n.scope.id], s = Ge(a, function(l) {
2230
- return l === i;
2231
- });
2232
- a.splice(s, 1);
2233
- } });
2234
- }
2235
- return P(t, [{ key: "new", value: function(e, n) {
2236
- n = y(n || {}, { actions: this.scope.actions });
2237
- var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
2238
- return this.scope.addDocument(r._doc), this.list.push(r), d.string(e) ? (this.selectorMap[e] || (this.selectorMap[e] = []), this.selectorMap[e].push(r)) : (r.target[this.scope.id] || Object.defineProperty(e, this.scope.id, { value: [], configurable: !0 }), e[this.scope.id].push(r)), this.scope.fire("interactable:new", { target: e, options: n, interactable: r, win: this.scope._win }), r;
2239
- } }, { key: "getExisting", value: function(e, n) {
2240
- var r = n && n.context || this.scope.document, i = d.string(e), o = i ? this.selectorMap[e] : e[this.scope.id];
2241
- if (o)
2242
- return Ke(o, function(a) {
2243
- return a._context === r && (i || a.inContext(e));
2244
- });
2245
- } }, { key: "forEachMatch", value: function(e, n) {
2246
- for (var r = 0, i = this.list; r < i.length; r++) {
2247
- var o = i[r], a = void 0;
2248
- if ((d.string(o.target) ? d.element(e) && me(e, o.target) : e === o.target) && o.inContext(e) && (a = n(o)), a !== void 0)
2249
- return a;
2250
- }
2251
- } }]), t;
2252
- }(), Nr = function() {
2253
- function t() {
2254
- var e = this;
2255
- A(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = ce, this.defaults = We(En), this.Eventable = Mn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = function(r) {
2256
- var i = function o(a, s) {
2257
- var l = r.interactables.getExisting(a, s);
2258
- return l || ((l = r.interactables.new(a, s)).events.global = o.globalEvents), l;
2259
- };
2260
- return i.getPointerAverage = nn, i.getTouchBBox = Pt, i.getTouchDistance = Ot, i.getTouchAngle = It, i.getElementRect = Be, i.getElementClientRect = Me, i.matchesSelector = me, i.closest = st, i.globalEvents = {}, i.version = "1.10.27", i.scope = r, i.use = function(o, a) {
2261
- return this.scope.usePlugin(o, a), this;
2262
- }, i.isSet = function(o, a) {
2263
- return !!this.scope.interactables.get(o, a && a.context);
2264
- }, i.on = Je(function(o, a, s) {
2265
- if (d.string(o) && o.search(" ") !== -1 && (o = o.trim().split(/ +/)), d.array(o)) {
2266
- for (var l = 0, u = o; l < u.length; l++) {
2267
- var c = u[l];
2268
- this.on(c, a, s);
2269
- }
2270
- return this;
2271
- }
2272
- if (d.object(o)) {
2273
- for (var p in o)
2274
- this.on(p, o[p], a);
2275
- return this;
2276
- }
2277
- return ht(o, this.scope.actions) ? this.globalEvents[o] ? this.globalEvents[o].push(a) : this.globalEvents[o] = [a] : this.scope.events.add(this.scope.document, o, a, { options: s }), this;
2278
- }, "The interact.on() method is being deprecated"), i.off = Je(function(o, a, s) {
2279
- if (d.string(o) && o.search(" ") !== -1 && (o = o.trim().split(/ +/)), d.array(o)) {
2280
- for (var l = 0, u = o; l < u.length; l++) {
2281
- var c = u[l];
2282
- this.off(c, a, s);
2283
- }
2284
- return this;
2285
- }
2286
- if (d.object(o)) {
2287
- for (var p in o)
2288
- this.off(p, o[p], a);
2289
- return this;
2290
- }
2291
- var f;
2292
- return ht(o, this.scope.actions) ? o in this.globalEvents && (f = this.globalEvents[o].indexOf(a)) !== -1 && this.globalEvents[o].splice(f, 1) : this.scope.events.remove(this.scope.document, o, a, s), this;
2293
- }, "The interact.off() method is being deprecated"), i.debug = function() {
2294
- return this.scope;
2295
- }, i.supportsTouch = function() {
2296
- return ce.supportsTouch;
2297
- }, i.supportsPointerEvent = function() {
2298
- return ce.supportsPointerEvent;
2299
- }, i.stop = function() {
2300
- for (var o = 0, a = this.scope.interactions.list; o < a.length; o++)
2301
- a[o].stop();
2302
- return this;
2303
- }, i.pointerMoveTolerance = function(o) {
2304
- return d.number(o) ? (this.scope.interactions.pointerMoveTolerance = o, this) : this.scope.interactions.pointerMoveTolerance;
2305
- }, i.addDocument = function(o, a) {
2306
- this.scope.addDocument(o, a);
2307
- }, i.removeDocument = function(o) {
2308
- this.scope.removeDocument(o);
2309
- }, i;
2310
- }(this), this.InteractEvent = Nt, this.Interactable = void 0, this.interactables = new $r(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(r) {
2311
- return e.removeDocument(r.target);
2312
- };
2313
- var n = this;
2314
- this.Interactable = function(r) {
2315
- W(o, r);
2316
- var i = le(o);
2317
- function o() {
2318
- return A(this, o), i.apply(this, arguments);
2319
- }
2320
- return P(o, [{ key: "_defaults", get: function() {
2321
- return n.defaults;
2322
- } }, { key: "set", value: function(a) {
2323
- return $(C(o.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2324
- } }, { key: "unset", value: function() {
2325
- $(C(o.prototype), "unset", this).call(this);
2326
- var a = n.interactables.list.indexOf(this);
2327
- a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
2328
- } }]), o;
2329
- }(Vr);
2330
- }
2331
- return P(t, [{ key: "addListeners", value: function(e, n) {
2332
- this.listenerMaps.push({ id: n, map: e });
2333
- } }, { key: "fire", value: function(e, n) {
2334
- for (var r = 0, i = this.listenerMaps; r < i.length; r++) {
2335
- var o = i[r].map[e];
2336
- if (o && o(n, this, e) === !1)
2337
- return !1;
2338
- }
2339
- } }, { key: "init", value: function(e) {
2340
- return this.isInitialized ? this : function(n, r) {
2341
- return n.isInitialized = !0, d.window(r) && B(r), K.init(r), ce.init(r), Pe.init(r), n.window = r, n.document = r.document, n.usePlugin(Fr), n.usePlugin(Cr), n;
2342
- }(this, e);
2343
- } }, { key: "pluginIsInstalled", value: function(e) {
2344
- var n = e.id;
2345
- return n ? !!this._plugins.map[n] : this._plugins.list.indexOf(e) !== -1;
2346
- } }, { key: "usePlugin", value: function(e, n) {
2347
- if (!this.isInitialized)
2348
- return this;
2349
- if (this.pluginIsInstalled(e))
2350
- return this;
2351
- if (e.id && (this._plugins.map[e.id] = e), this._plugins.list.push(e), e.install && e.install(this, n), e.listeners && e.before) {
2352
- for (var r = 0, i = this.listenerMaps.length, o = e.before.reduce(function(s, l) {
2353
- return s[l] = !0, s[Rn(l)] = !0, s;
2354
- }, {}); r < i; r++) {
2355
- var a = this.listenerMaps[r].id;
2356
- if (a && (o[a] || o[Rn(a)]))
2357
- break;
2358
- }
2359
- this.listenerMaps.splice(r, 0, { id: e.id, map: e.listeners });
2360
- } else
2361
- e.listeners && this.listenerMaps.push({ id: e.id, map: e.listeners });
2362
- return this;
2363
- } }, { key: "addDocument", value: function(e, n) {
2364
- if (this.getDocIndex(e) !== -1)
2365
- return !1;
2366
- var r = X(e);
2367
- n = n ? y({}, n) : {}, this.documents.push({ doc: e, options: n }), this.events.documents.push(e), e !== this.document && this.events.add(r, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: e, window: r, scope: this, options: n });
2368
- } }, { key: "removeDocument", value: function(e) {
2369
- var n = this.getDocIndex(e), r = X(e), i = this.documents[n].options;
2370
- this.events.remove(r, "unload", this.onWindowUnload), this.documents.splice(n, 1), this.events.documents.splice(n, 1), this.fire("scope:remove-document", { doc: e, window: r, scope: this, options: i });
2371
- } }, { key: "getDocIndex", value: function(e) {
2372
- for (var n = 0; n < this.documents.length; n++)
2373
- if (this.documents[n].doc === e)
2374
- return n;
2375
- return -1;
2376
- } }, { key: "getDocOptions", value: function(e) {
2377
- var n = this.getDocIndex(e);
2378
- return n === -1 ? null : this.documents[n].options;
2379
- } }, { key: "now", value: function() {
2380
- return (this.window.Date || Date).now();
2381
- } }]), t;
2382
- }();
2383
- function Rn(t) {
2384
- return t && t.replace(/\/.*$/, "");
2385
- }
2386
- var jn = new Nr(), oe = jn.interactStatic, Br = typeof globalThis < "u" ? globalThis : window;
2387
- jn.init(Br);
2388
- var Lr = Object.freeze({ __proto__: null, edgeTarget: function() {
2389
- }, elements: function() {
2390
- }, grid: function(t) {
2391
- var e = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter(function(r) {
2392
- var i = r[0], o = r[1];
2393
- return i in t || o in t;
2394
- }), n = function(r, i) {
2395
- for (var o = t.range, a = t.limits, s = a === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : a, l = t.offset, u = l === void 0 ? { x: 0, y: 0 } : l, c = { range: o, grid: t, x: null, y: null }, p = 0; p < e.length; p++) {
2396
- var f = e[p], h = f[0], v = f[1], g = Math.round((r - u.x) / t[h]), b = Math.round((i - u.y) / t[v]);
2397
- c[h] = Math.max(s.left, Math.min(s.right, g * t[h] + u.x)), c[v] = Math.max(s.top, Math.min(s.bottom, b * t[v] + u.y));
2398
- }
2399
- return c;
2400
- };
2401
- return n.grid = t, n.coordFields = e, n;
2402
- } }), Wr = { id: "snappers", install: function(t) {
2403
- var e = t.interactStatic;
2404
- e.snappers = y(e.snappers || {}, Lr), e.createSnapGrid = e.snappers.grid;
2405
- } }, Xr = Wr, Yr = { start: function(t) {
2406
- var e = t.state, n = t.rect, r = t.edges, i = t.pageCoords, o = e.options, a = o.ratio, s = o.enabled, l = e.options, u = l.equalDelta, c = l.modifiers;
2407
- a === "preserve" && (a = n.width / n.height), e.startCoords = y({}, i), e.startRect = y({}, n), e.ratio = a, e.equalDelta = u;
2408
- var p = e.linkedEdges = { top: r.top || r.left && !r.bottom, left: r.left || r.top && !r.right, bottom: r.bottom || r.right && !r.top, right: r.right || r.bottom && !r.left };
2409
- if (e.xIsPrimaryAxis = !(!r.left && !r.right), e.equalDelta) {
2410
- var f = (p.left ? 1 : -1) * (p.top ? 1 : -1);
2411
- e.edgeSign = { x: f, y: f };
2412
- } else
2413
- e.edgeSign = { x: p.left ? -1 : 1, y: p.top ? -1 : 1 };
2414
- if (s !== !1 && y(r, p), c != null && c.length) {
2415
- var h = new $t(t.interaction);
2416
- h.copyFrom(t.interaction.modification), h.prepareStates(c), e.subModification = h, h.startAll(z({}, t));
2417
- }
2418
- }, set: function(t) {
2419
- var e = t.state, n = t.rect, r = t.coords, i = e.linkedEdges, o = y({}, r), a = e.equalDelta ? qr : Ur;
2420
- if (y(t.edges, i), a(e, e.xIsPrimaryAxis, r, n), !e.subModification)
2421
- return null;
2422
- var s = y({}, n);
2423
- ct(i, s, { x: r.x - o.x, y: r.y - o.y });
2424
- var l = e.subModification.setAll(z(z({}, t), {}, { rect: s, edges: i, pageCoords: r, prevCoords: r, prevRect: s })), u = l.delta;
2425
- return l.changed && (a(e, Math.abs(u.x) > Math.abs(u.y), l.coords, l.rect), y(r, l.coords)), l.eventProps;
2426
- }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
2427
- function qr(t, e, n) {
2428
- var r = t.startCoords, i = t.edgeSign;
2429
- e ? n.y = r.y + (n.x - r.x) * i.y : n.x = r.x + (n.y - r.y) * i.x;
2430
- }
2431
- function Ur(t, e, n, r) {
2432
- var i = t.startRect, o = t.startCoords, a = t.ratio, s = t.edgeSign;
2433
- if (e) {
2434
- var l = r.width / a;
2435
- n.y = o.y + (l - i.height) * s.y;
2436
- } else {
2437
- var u = r.height * a;
2438
- n.x = o.x + (u - i.width) * s.x;
2439
- }
2440
- }
2441
- var Hr = Oe(Yr, "aspectRatio"), Fn = function() {
2442
- };
2443
- Fn._defaults = {};
2444
- var bt = Fn;
2445
- function je(t, e, n) {
2446
- return d.func(t) ? we(t, e.interactable, e.element, [n.x, n.y, e]) : we(t, e.interactable, e.element);
2447
- }
2448
- var xt = { start: function(t) {
2449
- var e = t.rect, n = t.startOffset, r = t.state, i = t.interaction, o = t.pageCoords, a = r.options, s = a.elementRect, l = y({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2450
- if (e && s) {
2451
- var u = je(a.restriction, i, o);
2452
- if (u) {
2453
- var c = u.right - u.left - e.width, p = u.bottom - u.top - e.height;
2454
- c < 0 && (l.left += c, l.right += c), p < 0 && (l.top += p, l.bottom += p);
2455
- }
2456
- l.left += n.left - e.width * s.left, l.top += n.top - e.height * s.top, l.right += n.right - e.width * (1 - s.right), l.bottom += n.bottom - e.height * (1 - s.bottom);
2457
- }
2458
- r.offset = l;
2459
- }, set: function(t) {
2460
- var e = t.coords, n = t.interaction, r = t.state, i = r.options, o = r.offset, a = je(i.restriction, n, e);
2461
- if (a) {
2462
- var s = function(l) {
2463
- return !l || "left" in l && "top" in l || ((l = y({}, l)).left = l.x || 0, l.top = l.y || 0, l.right = l.right || l.left + l.width, l.bottom = l.bottom || l.top + l.height), l;
2464
- }(a);
2465
- e.x = Math.max(Math.min(s.right - o.right, e.x), s.left + o.left), e.y = Math.max(Math.min(s.bottom - o.bottom, e.y), s.top + o.top);
2466
- }
2467
- }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Gr = Oe(xt, "restrict"), Vn = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, $n = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2468
- function Nn(t, e) {
2469
- for (var n = 0, r = ["top", "left", "bottom", "right"]; n < r.length; n++) {
2470
- var i = r[n];
2471
- i in t || (t[i] = e[i]);
2472
- }
2473
- return t;
2474
- }
2475
- var et = { noInner: Vn, noOuter: $n, start: function(t) {
2476
- var e, n = t.interaction, r = t.startOffset, i = t.state, o = i.options;
2477
- o && (e = ze(je(o.offset, n, n.coords.start.page))), e = e || { x: 0, y: 0 }, i.offset = { top: e.y + r.top, left: e.x + r.left, bottom: e.y - r.bottom, right: e.x - r.right };
2478
- }, set: function(t) {
2479
- var e = t.coords, n = t.edges, r = t.interaction, i = t.state, o = i.offset, a = i.options;
2480
- if (n) {
2481
- var s = y({}, e), l = je(a.inner, r, s) || {}, u = je(a.outer, r, s) || {};
2482
- Nn(l, Vn), Nn(u, $n), n.top ? e.y = Math.min(Math.max(u.top + o.top, s.y), l.top + o.top) : n.bottom && (e.y = Math.max(Math.min(u.bottom + o.bottom, s.y), l.bottom + o.bottom)), n.left ? e.x = Math.min(Math.max(u.left + o.left, s.x), l.left + o.left) : n.right && (e.x = Math.max(Math.min(u.right + o.right, s.x), l.right + o.right));
2483
- }
2484
- }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Kr = Oe(et, "restrictEdges"), Jr = y({ get elementRect() {
2485
- return { top: 0, left: 0, bottom: 1, right: 1 };
2486
- }, set elementRect(t) {
2487
- } }, xt.defaults), Qr = Oe({ start: xt.start, set: xt.set, defaults: Jr }, "restrictRect"), Zr = { width: -1 / 0, height: -1 / 0 }, ei = { width: 1 / 0, height: 1 / 0 }, ti = Oe({ start: function(t) {
2488
- return et.start(t);
2489
- }, set: function(t) {
2490
- var e = t.interaction, n = t.state, r = t.rect, i = t.edges, o = n.options;
2491
- if (i) {
2492
- var a = Ae(je(o.min, e, t.coords)) || Zr, s = Ae(je(o.max, e, t.coords)) || ei;
2493
- n.options = { endOnly: o.endOnly, inner: y({}, et.noInner), outer: y({}, et.noOuter) }, i.top ? (n.options.inner.top = r.bottom - a.height, n.options.outer.top = r.bottom - s.height) : i.bottom && (n.options.inner.bottom = r.top + a.height, n.options.outer.bottom = r.top + s.height), i.left ? (n.options.inner.left = r.right - a.width, n.options.outer.left = r.right - s.width) : i.right && (n.options.inner.right = r.left + a.width, n.options.outer.right = r.left + s.width), et.set(t), n.options = o;
2494
- }
2495
- }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Yt = { start: function(t) {
2496
- var e, n = t.interaction, r = t.interactable, i = t.element, o = t.rect, a = t.state, s = t.startOffset, l = a.options, u = l.offsetWithOrigin ? function(f) {
2497
- var h = f.interaction.element, v = ze(we(f.state.options.origin, null, null, [h])), g = v || qe(f.interactable, h, f.interaction.prepared.name);
2498
- return g;
2499
- }(t) : { x: 0, y: 0 };
2500
- if (l.offset === "startCoords")
2501
- e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
2502
- else {
2503
- var c = we(l.offset, r, i, [n]);
2504
- (e = ze(c) || { x: 0, y: 0 }).x += u.x, e.y += u.y;
2505
- }
2506
- var p = l.relativePoints;
2507
- a.offsets = o && p && p.length ? p.map(function(f, h) {
2508
- return { index: h, relativePoint: f, x: s.left - o.width * f.x + e.x, y: s.top - o.height * f.y + e.y };
2509
- }) : [{ index: 0, relativePoint: null, x: e.x, y: e.y }];
2510
- }, set: function(t) {
2511
- var e = t.interaction, n = t.coords, r = t.state, i = r.options, o = r.offsets, a = qe(e.interactable, e.element, e.prepared.name), s = y({}, n), l = [];
2512
- i.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
2513
- for (var u = 0, c = o; u < c.length; u++)
2514
- for (var p = c[u], f = s.x - p.x, h = s.y - p.y, v = 0, g = i.targets.length; v < g; v++) {
2515
- var b = i.targets[v], m = void 0;
2516
- (m = d.func(b) ? b(f, h, e._proxy, p, v) : b) && l.push({ x: (d.number(m.x) ? m.x : f) + p.x, y: (d.number(m.y) ? m.y : h) + p.y, range: d.number(m.range) ? m.range : i.range, source: b, index: v, offset: p });
2517
- }
2518
- for (var w = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, S = 0; S < l.length; S++) {
2519
- var k = l[S], _ = k.range, T = k.x - s.x, ae = k.y - s.y, j = Ue(T, ae), ue = j <= _;
2520
- _ === 1 / 0 && w.inRange && w.range !== 1 / 0 && (ue = !1), w.target && !(ue ? w.inRange && _ !== 1 / 0 ? j / _ < w.distance / w.range : _ === 1 / 0 && w.range !== 1 / 0 || j < w.distance : !w.inRange && j < w.distance) || (w.target = k, w.distance = j, w.range = _, w.inRange = ue, w.delta.x = T, w.delta.y = ae);
2521
- }
2522
- return w.inRange && (n.x = w.target.x, n.y = w.target.y), r.closest = w, w;
2523
- }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, ni = Oe(Yt, "snap"), wt = { start: function(t) {
2524
- var e = t.state, n = t.edges, r = e.options;
2525
- if (!n)
2526
- return null;
2527
- t.state = { options: { targets: null, relativePoints: [{ x: n.left ? 0 : 1, y: n.top ? 0 : 1 }], offset: r.offset || "self", origin: { x: 0, y: 0 }, range: r.range } }, e.targetFields = e.targetFields || [["width", "height"], ["x", "y"]], Yt.start(t), e.offsets = t.state.offsets, t.state = e;
2528
- }, set: function(t) {
2529
- var e = t.interaction, n = t.state, r = t.coords, i = n.options, o = n.offsets, a = { x: r.x - o[0].x, y: r.y - o[0].y };
2530
- n.options = y({}, i), n.options.targets = [];
2531
- for (var s = 0, l = i.targets || []; s < l.length; s++) {
2532
- var u = l[s], c = void 0;
2533
- if (c = d.func(u) ? u(a.x, a.y, e) : u) {
2534
- for (var p = 0, f = n.targetFields; p < f.length; p++) {
2535
- var h = f[p], v = h[0], g = h[1];
2536
- if (v in c || g in c) {
2537
- c.x = c[v], c.y = c[g];
2538
- break;
2539
- }
2540
- }
2541
- n.options.targets.push(c);
2542
- }
2543
- }
2544
- var b = Yt.set(t);
2545
- return n.options = i, b;
2546
- }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, ri = Oe(wt, "snapSize"), qt = { aspectRatio: Hr, restrictEdges: Kr, restrict: Gr, restrictRect: Qr, restrictSize: ti, snapEdges: Oe({ start: function(t) {
2547
- var e = t.edges;
2548
- return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], wt.start(t)) : null;
2549
- }, set: wt.set, defaults: y(We(wt.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: ni, snapSize: ri, spring: bt, avoid: bt, transform: bt, rubberband: bt }, ii = { id: "modifiers", install: function(t) {
2550
- var e = t.interactStatic;
2551
- for (var n in t.usePlugin(_n), t.usePlugin(Xr), e.modifiers = qt, qt) {
2552
- var r = qt[n], i = r._defaults, o = r._methods;
2553
- i._methods = o, t.defaults.perAction[n] = i;
2554
- }
2555
- } }, oi = ii, Bn = function(t) {
2556
- W(n, t);
2557
- var e = le(n);
2558
- function n(r, i, o, a, s, l) {
2559
- var u;
2560
- if (A(this, n), ut(J(u = e.call(this, s)), o), o !== i && ut(J(u), i), u.timeStamp = l, u.originalEvent = o, u.type = r, u.pointerId = He(i), u.pointerType = rn(i), u.target = a, u.currentTarget = null, r === "tap") {
2561
- var c = s.getPointerIndex(i);
2562
- u.dt = u.timeStamp - s.pointers[c].downTime;
2563
- var p = u.timeStamp - s.tapTime;
2564
- u.double = !!s.prevTap && s.prevTap.type !== "doubletap" && s.prevTap.target === u.target && p < 500;
2565
- } else
2566
- r === "doubletap" && (u.dt = i.timeStamp - s.tapTime, u.double = !0);
2567
- return u;
2568
- }
2569
- return P(n, [{ key: "_subtractOrigin", value: function(r) {
2570
- var i = r.x, o = r.y;
2571
- return this.pageX -= i, this.pageY -= o, this.clientX -= i, this.clientY -= o, this;
2572
- } }, { key: "_addOrigin", value: function(r) {
2573
- var i = r.x, o = r.y;
2574
- return this.pageX += i, this.pageY += o, this.clientX += i, this.clientY += o, this;
2575
- } }, { key: "preventDefault", value: function() {
2576
- this.originalEvent.preventDefault();
2577
- } }]), n;
2578
- }(ft), tt = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(t) {
2579
- t.pointerEvents = tt, t.defaults.actions.pointerEvents = tt.defaults, y(t.actions.phaselessTypes, tt.types);
2580
- }, listeners: { "interactions:new": function(t) {
2581
- var e = t.interaction;
2582
- e.prevTap = null, e.tapTime = 0;
2583
- }, "interactions:update-pointer": function(t) {
2584
- var e = t.down, n = t.pointerInfo;
2585
- !e && n.hold || (n.hold = { duration: 1 / 0, timeout: null });
2586
- }, "interactions:move": function(t, e) {
2587
- var n = t.interaction, r = t.pointer, i = t.event, o = t.eventTarget;
2588
- t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && Ut(t), De({ interaction: n, pointer: r, event: i, eventTarget: o, type: "move" }, e));
2589
- }, "interactions:down": function(t, e) {
2590
- (function(n, r) {
2591
- for (var i = n.interaction, o = n.pointer, a = n.event, s = n.eventTarget, l = n.pointerIndex, u = i.pointers[l].hold, c = x(s), p = { interaction: i, pointer: o, event: a, eventTarget: s, type: "hold", targets: [], path: c, node: null }, f = 0; f < c.length; f++) {
2592
- var h = c[f];
2593
- p.node = h, r.fire("pointerEvents:collect-targets", p);
2594
- }
2595
- if (p.targets.length) {
2596
- for (var v = 1 / 0, g = 0, b = p.targets; g < b.length; g++) {
2597
- var m = b[g].eventable.options.holdDuration;
2598
- m < v && (v = m);
2599
- }
2600
- u.duration = v, u.timeout = setTimeout(function() {
2601
- De({ interaction: i, eventTarget: s, pointer: o, event: a, type: "hold" }, r);
2602
- }, v);
2603
- }
2604
- })(t, e), De(t, e);
2605
- }, "interactions:up": function(t, e) {
2606
- Ut(t), De(t, e), function(n, r) {
2607
- var i = n.interaction, o = n.pointer, a = n.event, s = n.eventTarget;
2608
- i.pointerWasMoved || De({ interaction: i, eventTarget: s, pointer: o, event: a, type: "tap" }, r);
2609
- }(t, e);
2610
- }, "interactions:cancel": function(t, e) {
2611
- Ut(t), De(t, e);
2612
- } }, PointerEvent: Bn, fire: De, collectEventTargets: Ln, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
2613
- function De(t, e) {
2614
- var n = t.interaction, r = t.pointer, i = t.event, o = t.eventTarget, a = t.type, s = t.targets, l = s === void 0 ? Ln(t, e) : s, u = new Bn(a, r, i, o, n, e.now());
2615
- e.fire("pointerEvents:new", { pointerEvent: u });
2616
- for (var c = { interaction: n, pointer: r, event: i, eventTarget: o, targets: l, type: a, pointerEvent: u }, p = 0; p < l.length; p++) {
2617
- var f = l[p];
2618
- for (var h in f.props || {})
2619
- u[h] = f.props[h];
2620
- var v = qe(f.eventable, f.node);
2621
- if (u._subtractOrigin(v), u.eventable = f.eventable, u.currentTarget = f.node, f.eventable.fire(u), u._addOrigin(v), u.immediatePropagationStopped || u.propagationStopped && p + 1 < l.length && l[p + 1].node !== u.currentTarget)
2622
- break;
2623
- }
2624
- if (e.fire("pointerEvents:fired", c), a === "tap") {
2625
- var g = u.double ? De({ interaction: n, pointer: r, event: i, eventTarget: o, type: "doubletap" }, e) : u;
2626
- n.prevTap = g, n.tapTime = g.timeStamp;
2627
- }
2628
- return u;
2629
- }
2630
- function Ln(t, e) {
2631
- var n = t.interaction, r = t.pointer, i = t.event, o = t.eventTarget, a = t.type, s = n.getPointerIndex(r), l = n.pointers[s];
2632
- if (a === "tap" && (n.pointerWasMoved || !l || l.downTarget !== o))
2633
- return [];
2634
- for (var u = x(o), c = { interaction: n, pointer: r, event: i, eventTarget: o, type: a, path: u, targets: [], node: null }, p = 0; p < u.length; p++) {
2635
- var f = u[p];
2636
- c.node = f, e.fire("pointerEvents:collect-targets", c);
2637
- }
2638
- return a === "hold" && (c.targets = c.targets.filter(function(h) {
2639
- var v, g;
2640
- return h.eventable.options.holdDuration === ((v = n.pointers[s]) == null || (g = v.hold) == null ? void 0 : g.duration);
2641
- })), c.targets;
2642
- }
2643
- function Ut(t) {
2644
- var e = t.interaction, n = t.pointerIndex, r = e.pointers[n].hold;
2645
- r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
2646
- }
2647
- var ai = Object.freeze({ __proto__: null, default: tt });
2648
- function si(t) {
2649
- var e = t.interaction;
2650
- e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
2651
- }
2652
- var li = { id: "pointer-events/holdRepeat", install: function(t) {
2653
- t.usePlugin(tt);
2654
- var e = t.pointerEvents;
2655
- e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t.actions.phaselessTypes.holdrepeat = !0;
2656
- }, listeners: ["move", "up", "cancel", "endall"].reduce(function(t, e) {
2657
- return t["pointerEvents:".concat(e)] = si, t;
2658
- }, { "pointerEvents:new": function(t) {
2659
- var e = t.pointerEvent;
2660
- e.type === "hold" && (e.count = (e.count || 0) + 1);
2661
- }, "pointerEvents:fired": function(t, e) {
2662
- var n = t.interaction, r = t.pointerEvent, i = t.eventTarget, o = t.targets;
2663
- if (r.type === "hold" && o.length) {
2664
- var a = o[0].eventable.options.holdRepeatInterval;
2665
- a <= 0 || (n.holdIntervalHandle = setTimeout(function() {
2666
- e.pointerEvents.fire({ interaction: n, eventTarget: i, type: "hold", pointer: r, event: r }, e);
2667
- }, a));
2668
- }
2669
- } }) }, ci = li, ui = { id: "pointer-events/interactableTargets", install: function(t) {
2670
- var e = t.Interactable;
2671
- e.prototype.pointerEvents = function(r) {
2672
- return y(this.events.options, r), this;
2673
- };
2674
- var n = e.prototype._backCompatOption;
2675
- e.prototype._backCompatOption = function(r, i) {
2676
- var o = n.call(this, r, i);
2677
- return o === this && (this.events.options[r] = i), o;
2678
- };
2679
- }, listeners: { "pointerEvents:collect-targets": function(t, e) {
2680
- var n = t.targets, r = t.node, i = t.type, o = t.eventTarget;
2681
- e.interactables.forEachMatch(r, function(a) {
2682
- var s = a.events, l = s.options;
2683
- s.types[i] && s.types[i].length && a.testIgnoreAllow(l, r, o) && n.push({ node: r, eventable: s, props: { interactable: a } });
2684
- });
2685
- }, "interactable:new": function(t) {
2686
- var e = t.interactable;
2687
- e.events.getRect = function(n) {
2688
- return e.getRect(n);
2689
- };
2690
- }, "interactable:set": function(t, e) {
2691
- var n = t.interactable, r = t.options;
2692
- y(n.events.options, e.pointerEvents.defaults), y(n.events.options, r.pointerEvents || {});
2693
- } } }, pi = ui, di = { id: "pointer-events", install: function(t) {
2694
- t.usePlugin(ai), t.usePlugin(ci), t.usePlugin(pi);
2695
- } }, fi = di, vi = { id: "reflow", install: function(t) {
2696
- var e = t.Interactable;
2697
- t.actions.phases.reflow = !0, e.prototype.reflow = function(n) {
2698
- return function(r, i, o) {
2699
- for (var a = r.getAllElements(), s = o.window.Promise, l = s ? [] : null, u = function() {
2700
- var p = a[c], f = r.getRect(p);
2701
- if (!f)
2702
- return 1;
2703
- var h, v = Ke(o.interactions.list, function(m) {
2704
- return m.interacting() && m.interactable === r && m.element === p && m.prepared.name === i.name;
2705
- });
2706
- if (v)
2707
- v.move(), l && (h = v._reflowPromise || new s(function(m) {
2708
- v._reflowResolve = m;
2709
- }));
2710
- else {
2711
- var g = Ae(f), b = function(m) {
2712
- return { coords: m, get page() {
2713
- return this.coords.page;
2714
- }, get client() {
2715
- return this.coords.client;
2716
- }, get timeStamp() {
2717
- return this.coords.timeStamp;
2718
- }, get pageX() {
2719
- return this.coords.page.x;
2720
- }, get pageY() {
2721
- return this.coords.page.y;
2722
- }, get clientX() {
2723
- return this.coords.client.x;
2724
- }, get clientY() {
2725
- return this.coords.client.y;
2726
- }, get pointerId() {
2727
- return this.coords.pointerId;
2728
- }, get target() {
2729
- return this.coords.target;
2730
- }, get type() {
2731
- return this.coords.type;
2732
- }, get pointerType() {
2733
- return this.coords.pointerType;
2734
- }, get buttons() {
2735
- return this.coords.buttons;
2736
- }, preventDefault: function() {
2737
- } };
2738
- }({ page: { x: g.x, y: g.y }, client: { x: g.x, y: g.y }, timeStamp: o.now() });
2739
- h = function(m, w, S, k, _) {
2740
- var T = m.interactions.new({ pointerType: "reflow" }), ae = { interaction: T, event: _, pointer: _, eventTarget: S, phase: "reflow" };
2741
- T.interactable = w, T.element = S, T.prevEvent = _, T.updatePointer(_, _, S, !0), Zt(T.coords.delta), Rt(T.prepared, k), T._doPhase(ae);
2742
- var j = m.window, ue = j.Promise, ve = ue ? new ue(function(Se) {
2743
- T._reflowResolve = Se;
2744
- }) : void 0;
2745
- return T._reflowPromise = ve, T.start(k, w, S), T._interacting ? (T.move(ae), T.end(_)) : (T.stop(), T._reflowResolve()), T.removePointer(_, _), ve;
2746
- }(o, r, p, i, b);
2747
- }
2748
- l && l.push(h);
2749
- }, c = 0; c < a.length && !u(); c++)
2750
- ;
2751
- return l && s.all(l).then(function() {
2752
- return r;
2753
- });
2754
- }(this, n, t);
2755
- };
2756
- }, listeners: { "interactions:stop": function(t, e) {
2757
- var n = t.interaction;
2758
- n.pointerType === "reflow" && (n._reflowResolve && n._reflowResolve(), function(r, i) {
2759
- r.splice(r.indexOf(i), 1);
2760
- }(e.interactions.list, n));
2761
- } } }, hi = vi;
2762
- if (oe.use(wn), oe.use(Pn), oe.use(fi), oe.use(zr), oe.use(oi), oe.use(xr), oe.use(cr), oe.use(pr), oe.use(hi), oe.default = oe, re(I) === "object" && I)
2763
- try {
2764
- I.exports = oe;
2765
- } catch {
2766
- }
2767
- return oe.default = oe, oe;
2768
- });
2769
- })(Tt, Tt.exports);
2770
- var eo = Tt.exports;
2771
- const qn = /* @__PURE__ */ $i(eo);
2772
- const to = { class: "variety-auto-complete" }, no = { key: 0 }, ro = { class: "label" }, io = {
341
+ var dt = /* @__PURE__ */ ze(pt, [["__file", "autocomplete.vue"]]);
342
+ const ft = Ke(dt);
343
+ const mt = { class: "variety-auto-complete" }, vt = { key: 0 }, gt = { class: "label" }, ht = {
2773
344
  __name: "VarietySelect",
2774
345
  props: {
2775
346
  size: { type: String, default: "default" },
@@ -2780,53 +351,53 @@ const to = { class: "variety-auto-complete" }, no = { key: 0 }, ro = { class: "l
2780
351
  // 是否开启选择回调后清除输入框值
2781
352
  },
2782
353
  emits: ["select", "change"],
2783
- setup(I, { emit: $e }) {
2784
- const Y = Qn("stConfig"), z = $e, re = I, A = H(""), he = async (W, C) => {
2785
- if (W === "" || W === "null")
2786
- C([]);
354
+ setup(o, { emit: K }) {
355
+ const _ = ye("stConfig"), d = K, I = o, x = y(""), A = async (S, V) => {
356
+ if (S === "" || S === "null")
357
+ V([]);
2787
358
  else {
2788
- const ee = {
2789
- keyWord: W,
359
+ const c = {
360
+ keyWord: S,
2790
361
  pageNum: 1,
2791
362
  pageSize: 999,
2792
- userId: Xi("id"),
363
+ userId: st("id"),
2793
364
  hotSearchFlag: 1
2794
- }, { body: J } = await Y.request.post("/common/qt/getFeatureInfosByPage", ee), le = J.list.map(({ code: $, featureName: O }) => ({
2795
- label: `${$}   ${O}`,
2796
- value: $
365
+ }, { body: r } = await _.request.post("/common/qt/getFeatureInfosByPage", c), C = r.list.map(({ code: u, featureName: t }) => ({
366
+ label: `${u}   ${t}`,
367
+ value: u
2797
368
  }));
2798
- C(le);
369
+ V(C);
2799
370
  }
2800
- }, P = ({ label: W, value: C }) => {
2801
- const ee = W.split(" ").at(-1);
2802
- z("select", { name: ee, code: C }), re.selectClearEnable && (A.value = "");
2803
- }, F = (W) => {
2804
- z("change", W);
371
+ }, f = ({ label: S, value: V }) => {
372
+ const c = S.split(" ").at(-1);
373
+ d("select", { name: c, code: V }), I.selectClearEnable && (x.value = "");
374
+ }, b = (S) => {
375
+ d("change", S);
2805
376
  };
2806
- return (W, C) => {
2807
- const ee = Zi;
2808
- return V(), Z("div", to, [
2809
- I.labelShowEnable ? (V(), Z("span", no, "品种搜索:")) : Te("", !0),
2810
- de(ee, {
2811
- modelValue: A.value,
2812
- "onUpdate:modelValue": C[0] || (C[0] = (J) => A.value = J),
377
+ return (S, V) => {
378
+ const c = ft;
379
+ return n(), g("div", mt, [
380
+ o.labelShowEnable ? (n(), g("span", vt, "品种搜索:")) : T("", !0),
381
+ $(c, {
382
+ modelValue: x.value,
383
+ "onUpdate:modelValue": V[0] || (V[0] = (r) => x.value = r),
2813
384
  clearable: "",
2814
- size: re.size,
2815
- placeholder: re.placeholder,
2816
- "fetch-suggestions": he,
2817
- onSelect: P,
2818
- onChange: F
385
+ size: I.size,
386
+ placeholder: I.placeholder,
387
+ "fetch-suggestions": A,
388
+ onSelect: f,
389
+ onChange: b
2819
390
  }, {
2820
- default: ne(({ item: J }) => [
2821
- pe("div", ro, Ve(J.label), 1)
391
+ default: h(({ item: r }) => [
392
+ k("div", gt, U(r.label), 1)
2822
393
  ]),
2823
394
  _: 1
2824
395
  }, 8, ["modelValue", "size", "placeholder"])
2825
396
  ]);
2826
397
  };
2827
398
  }
2828
- }, oo = /* @__PURE__ */ er(io, [["__scopeId", "data-v-d433c4b8"]]);
2829
- const ao = (I) => (Fi("data-v-a9c66896"), I = I(), Vi(), I), so = { class: "custom-header" }, lo = { class: "left" }, co = /* @__PURE__ */ ao(() => /* @__PURE__ */ pe("span", null, " 选择变量 ", -1)), uo = { class: "right" }, po = { class: "custom-body" }, fo = { class: "config-list" }, vo = { class: "config-item" }, ho = { key: 0 }, go = { key: 0 }, mo = { key: 1 }, yo = { key: 0 }, bo = { style: { "max-width": "820px" } }, xo = { style: { "white-space": "pre-line" } }, wo = {
399
+ }, _t = /* @__PURE__ */ Se(ht, [["__scopeId", "data-v-d433c4b8"]]);
400
+ const bt = (o) => (et("data-v-338eb1cd"), o = o(), tt(), o), yt = { class: "custom-header" }, Vt = { class: "left" }, St = /* @__PURE__ */ bt(() => /* @__PURE__ */ k("span", null, " 选择变量 ", -1)), Et = { class: "right" }, kt = { class: "custom-body" }, $t = { class: "config-list" }, Ct = { class: "config-item" }, wt = { key: 0 }, Nt = { key: 0 }, It = { key: 1 }, xt = { key: 0 }, Tt = { style: { "max-width": "820px" } }, At = { style: { "white-space": "pre-line" } }, Bt = {
2830
401
  __name: "index",
2831
402
  props: {
2832
403
  useCase: {
@@ -2835,218 +406,209 @@ const ao = (I) => (Fi("data-v-a9c66896"), I = I(), Vi(), I), so = { class: "cust
2835
406
  // 1-选股, 2-回测
2836
407
  }
2837
408
  },
2838
- setup(I, { expose: $e }) {
2839
- const Y = Qn("stConfig"), z = I, re = H(null), A = H((window.innerHeight - 542) / 2 - 220 > 0 ? (window.innerHeight - 542) / 2 - 220 : 0), he = H((window.innerWidth - 1e3) / 2 > 0 ? (window.innerWidth - 1e3) / 2 : 0), P = H(null), F = H(!1), W = H(0), C = H(null), ee = H([]), J = it(() => {
2840
- var O;
2841
- return ((O = ee.value.find((q) => q.varName === C.value)) == null ? void 0 : O.formatList) ?? [];
2842
- }), le = (O) => O.replace(/^\[|\]$/g, "").split("],[").map((R) => {
2843
- const B = R.replace(/\[|\]/g, ""), [X, ie] = B.split(",");
409
+ setup(o, { expose: K }) {
410
+ const _ = ye("stConfig"), d = o, I = y(null), x = y(!1), A = y(null), f = y([]), b = O(() => {
411
+ var c;
412
+ return ((c = f.value.find((r) => r.varName === A.value)) == null ? void 0 : c.formatList) ?? [];
413
+ }), S = (c) => c.replace(/^\[|\]$/g, "").split("],[").map((u) => {
414
+ const t = u.replace(/\[|\]/g, ""), [P, m] = t.split(",");
2844
415
  return {
2845
- label: X.trim(),
2846
- value: ie.trim()
416
+ label: P.trim(),
417
+ value: m.trim()
2847
418
  };
2848
- }), $ = (O) => {
2849
- const q = [];
2850
- for (let U = 0; U < O.length; U++) {
2851
- const d = O[U];
2852
- switch (console.log(d), d.vtype) {
419
+ }), V = (c) => {
420
+ const r = [];
421
+ for (let E = 0; E < c.length; E++) {
422
+ const p = c[E];
423
+ switch (console.log(p), p.vtype) {
2853
424
  case "text": {
2854
- q.push(d.param);
425
+ r.push(p.param);
2855
426
  break;
2856
427
  }
2857
428
  default: {
2858
- if (!d.modelValue)
2859
- return Yn.error("请检查插入格式内是否填写完整");
2860
- let G = d.modelValue;
2861
- d.prefix && (G = `${d.prefix}${G}`), d.suffix && (G = `${G}${d.suffix}`), q.push(G);
429
+ if (!p.modelValue)
430
+ return de.error("请检查插入格式内是否填写完整");
431
+ let s = p.modelValue;
432
+ p.prefix && (s = `${p.prefix}${s}`), p.suffix && (s = `${s}${p.suffix}`), r.push(s);
2862
433
  break;
2863
434
  }
2864
435
  }
2865
436
  }
2866
- if (!P.value)
2867
- return Yn.error("未检测到编辑器实例");
2868
- const N = q.join("_"), R = P.value.getInstance(), B = R.getPosition(), ie = P.value.getValue().split(`
437
+ if (!I.value)
438
+ return de.error("未检测到编辑器实例");
439
+ const C = r.join("_"), u = I.value.getInstance(), t = u.getPosition(), m = I.value.getValue().split(`
2869
440
  `);
2870
- if (B.lineNumber <= ie.length) {
2871
- const U = B.lineNumber - 1, d = ie[U], G = d.substring(0, B.column - 1) + N + d.substring(B.column - 1);
2872
- ie[U] = G;
2873
- const D = ie.join(`
441
+ if (t.lineNumber <= m.length) {
442
+ const E = t.lineNumber - 1, p = m[E], s = p.substring(0, t.column - 1) + C + p.substring(t.column - 1);
443
+ m[E] = s;
444
+ const B = m.join(`
2874
445
  `);
2875
- P.value.setValue(D);
2876
- const ge = B.column + N.length;
2877
- R.setPosition({
2878
- lineNumber: B.lineNumber,
2879
- column: ge
2880
- }), R.focus();
446
+ I.value.setValue(B);
447
+ const l = t.column + C.length;
448
+ u.setPosition({
449
+ lineNumber: t.lineNumber,
450
+ column: l
451
+ }), u.focus();
2881
452
  }
2882
453
  };
2883
- return Kn(async () => {
2884
- const { body: O } = await Y.request.post("/common/conf/queryAllBackVariables", { useCase: z.useCase });
2885
- ee.value = O ?? [];
2886
- }), $e({
454
+ return _e(async () => {
455
+ const { body: c } = await _.request.post("/common/conf/queryAllBackVariables", { useCase: d.useCase });
456
+ f.value = c ?? [];
457
+ }), K({
2887
458
  /**
2888
459
  * @description: 打开变量选择器窗口
2889
460
  * @editor 脚本编辑器实例
2890
461
  * @newZindex Number 窗口定位层级
2891
462
  */
2892
- open: (O, q = 1002) => {
2893
- P.value = O, W.value = q, F.value = !0;
2894
- const N = document.querySelector("body");
2895
- qn(re.value).draggable({
2896
- allowFrom: ".custom-header",
2897
- // 只有 .custom-header 元素可以触发拖拽
2898
- // 限制拖拽范围
2899
- modifiers: [
2900
- qn.modifiers.restrictRect({
2901
- restriction: N,
2902
- // 限制在拖拽区域内
2903
- endOnly: !1
2904
- // 实时限制
2905
- })
2906
- ],
2907
- listeners: {
2908
- move(R) {
2909
- he.value -= R.dx, A.value += R.dy;
2910
- }
2911
- }
2912
- });
463
+ open: (c) => {
464
+ I.value = c, x.value = !0;
2913
465
  },
2914
466
  close: () => {
2915
- F.value = !1;
2916
- }
2917
- }), (O, q) => {
2918
- const N = Oi, R = Ii, B = Zn, X = Hn, ie = ki, U = Un;
2919
- return Ri((V(), Z("div", {
2920
- class: "var-select-dialog",
2921
- ref_key: "dialogRef",
2922
- ref: re,
2923
- style: Kt({ right: `${he.value}px`, top: `${A.value}px`, zIndex: W.value })
2924
- }, [
2925
- pe("div", so, [
2926
- pe("div", lo, [
2927
- co,
2928
- de(R, {
2929
- modelValue: C.value,
2930
- "onUpdate:modelValue": q[0] || (q[0] = (d) => C.value = d),
2931
- placeholder: "选择变量",
2932
- filterable: "",
2933
- clearable: ""
2934
- }, {
2935
- default: ne(() => [
2936
- (V(!0), Z(Fe, null, at(ee.value, (d, G) => (V(), ot(N, {
2937
- key: G,
2938
- label: d.varName,
2939
- value: d.varName
2940
- }, null, 8, ["label", "value"]))), 128))
2941
- ]),
2942
- _: 1
2943
- }, 8, ["modelValue"])
2944
- ]),
2945
- pe("div", uo, [
2946
- de(B, {
2947
- class: "el-icon--left",
2948
- onClick: q[1] || (q[1] = (d) => F.value = !1)
2949
- }, {
2950
- default: ne(() => [
2951
- de(M(Li))
2952
- ]),
2953
- _: 1
2954
- })
467
+ x.value = !1;
468
+ }
469
+ }), (c, r) => {
470
+ const C = He, u = Ge, t = Ve, P = ge, m = je, E = me, p = Re;
471
+ return n(), z(p, {
472
+ "modal-class": "var-select-dialog",
473
+ modelValue: x.value,
474
+ "onUpdate:modelValue": r[2] || (r[2] = (s) => x.value = s),
475
+ width: "660px",
476
+ "align-center": "",
477
+ "destroy-on-close": "",
478
+ draggable: "",
479
+ overflow: "",
480
+ modal: !1,
481
+ "modal-penetrable": !0,
482
+ "show-close": !1
483
+ }, {
484
+ header: h(() => [
485
+ k("div", yt, [
486
+ k("div", Vt, [
487
+ St,
488
+ $(u, {
489
+ modelValue: A.value,
490
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => A.value = s),
491
+ placeholder: "选择变量",
492
+ filterable: "",
493
+ clearable: ""
494
+ }, {
495
+ default: h(() => [
496
+ (n(!0), g(D, null, M(f.value, (s, B) => (n(), z(C, {
497
+ key: B,
498
+ label: s.varName,
499
+ value: s.varName
500
+ }, null, 8, ["label", "value"]))), 128))
501
+ ]),
502
+ _: 1
503
+ }, 8, ["modelValue"])
504
+ ]),
505
+ k("div", Et, [
506
+ $(t, {
507
+ class: "el-icon--left",
508
+ onClick: r[1] || (r[1] = (s) => x.value = !1)
509
+ }, {
510
+ default: h(() => [
511
+ $(a(ot))
512
+ ]),
513
+ _: 1
514
+ })
515
+ ])
2955
516
  ])
2956
517
  ]),
2957
- pe("div", po, [
2958
- J.value.length ? (V(!0), Z(Fe, { key: 0 }, at(J.value, (d, G) => (V(), Z("div", {
2959
- class: "format-item",
2960
- key: G
2961
- }, [
2962
- pe("span", null, "格式" + Ve(G + 1) + ":", 1),
2963
- pe("div", fo, [
2964
- (V(!0), Z(Fe, null, at(d.configList, (D, ge) => (V(), Z(Fe, null, [
2965
- pe("div", vo, [
2966
- D.vtype === "text" ? (V(), Z("span", ho, Ve(D.param), 1)) : Te("", !0),
2967
- D.vtype === "inputVariety" ? (V(), ot(oo, {
2968
- key: 1,
2969
- size: "small",
2970
- placeholder: D.param,
2971
- selectClearEnable: !1,
2972
- labelShowEnable: !1,
2973
- onSelect: ({ name: te, code: Q }) => D.modelValue = Q,
2974
- onChange: (te) => D.modelValue = te,
2975
- style: { width: "100px" }
2976
- }, null, 8, ["placeholder", "onSelect", "onChange"])) : Te("", !0),
2977
- D.vtype === "input" ? (V(), Z(Fe, { key: 2 }, [
2978
- D.prefix ? (V(), Z("span", go, Ve(D.prefix), 1)) : Te("", !0),
2979
- de(X, {
2980
- modelValue: D.modelValue,
2981
- "onUpdate:modelValue": (te) => D.modelValue = te,
2982
- placeholder: D.param,
518
+ default: h(() => [
519
+ k("div", kt, [
520
+ b.value.length ? (n(!0), g(D, { key: 0 }, M(b.value, (s, B) => (n(), g("div", {
521
+ class: "format-item",
522
+ key: B
523
+ }, [
524
+ k("span", null, "格式" + U(B + 1) + ":", 1),
525
+ k("div", $t, [
526
+ (n(!0), g(D, null, M(s.configList, (l, W) => (n(), g(D, null, [
527
+ k("div", Ct, [
528
+ l.vtype === "text" ? (n(), g("span", wt, U(l.param), 1)) : T("", !0),
529
+ l.vtype === "inputVariety" ? (n(), z(_t, {
530
+ key: 1,
531
+ size: "small",
532
+ placeholder: l.param,
533
+ selectClearEnable: !1,
534
+ labelShowEnable: !1,
535
+ onSelect: ({ name: w, code: G }) => l.modelValue = G,
536
+ onChange: (w) => l.modelValue = w,
537
+ style: { width: "100px" }
538
+ }, null, 8, ["placeholder", "onSelect", "onChange"])) : T("", !0),
539
+ l.vtype === "input" ? (n(), g(D, { key: 2 }, [
540
+ l.prefix ? (n(), g("span", Nt, U(l.prefix), 1)) : T("", !0),
541
+ $(P, {
542
+ modelValue: l.modelValue,
543
+ "onUpdate:modelValue": (w) => l.modelValue = w,
544
+ placeholder: l.param,
545
+ size: "small"
546
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
547
+ l.suffix ? (n(), g("span", It, U(l.suffix), 1)) : T("", !0)
548
+ ], 64)) : T("", !0),
549
+ l.vtype === "select" ? (n(), z(u, {
550
+ key: 3,
551
+ modelValue: l.modelValue,
552
+ "onUpdate:modelValue": (w) => l.modelValue = w,
553
+ placeholder: l.param,
554
+ clearable: "",
2983
555
  size: "small"
2984
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
2985
- D.suffix ? (V(), Z("span", mo, Ve(D.suffix), 1)) : Te("", !0)
2986
- ], 64)) : Te("", !0),
2987
- D.vtype === "select" ? (V(), ot(R, {
2988
- key: 3,
2989
- modelValue: D.modelValue,
2990
- "onUpdate:modelValue": (te) => D.modelValue = te,
2991
- placeholder: D.param,
2992
- clearable: "",
2993
- size: "small"
2994
- }, {
2995
- default: ne(() => [
2996
- (V(!0), Z(Fe, null, at(le(D.optionsStr), (te) => (V(), ot(N, {
2997
- key: te.value,
2998
- label: te.label,
2999
- value: te.value
3000
- }, null, 8, ["label", "value"]))), 128))
3001
- ]),
3002
- _: 2
3003
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : Te("", !0)
3004
- ]),
3005
- ge !== d.configList.length - 1 ? (V(), Z("span", yo, "_")) : Te("", !0)
3006
- ], 64))), 256))
3007
- ]),
3008
- de(ie, {
3009
- type: "primary",
3010
- plain: "",
3011
- size: "small",
3012
- onClick: (D) => $(d.configList)
3013
- }, {
3014
- default: ne(() => [
3015
- Jn(" 插入变量 ")
3016
- ]),
3017
- _: 2
3018
- }, 1032, ["onClick"]),
3019
- de(U, {
3020
- effect: "dark",
3021
- placement: "top-start"
3022
- }, {
3023
- content: ne(() => [
3024
- pe("div", bo, [
3025
- pe("span", xo, Ve(d.tip), 1)
3026
- ])
3027
- ]),
3028
- default: ne(() => [
3029
- de(B, null, {
3030
- default: ne(() => [
3031
- de(M(Wi))
556
+ }, {
557
+ default: h(() => [
558
+ (n(!0), g(D, null, M(S(l.optionsStr), (w) => (n(), z(C, {
559
+ key: w.value,
560
+ label: w.label,
561
+ value: w.value
562
+ }, null, 8, ["label", "value"]))), 128))
563
+ ]),
564
+ _: 2
565
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : T("", !0)
3032
566
  ]),
3033
- _: 1
3034
- })
567
+ W !== s.configList.length - 1 ? (n(), g("span", xt, "_")) : T("", !0)
568
+ ], 64))), 256))
3035
569
  ]),
3036
- _: 2
3037
- }, 1024)
3038
- ]))), 128)) : Te("", !0)
3039
- ])
3040
- ], 4)), [
3041
- [ji, F.value]
3042
- ]);
570
+ $(m, {
571
+ type: "primary",
572
+ plain: "",
573
+ size: "small",
574
+ onClick: (l) => V(s.configList)
575
+ }, {
576
+ default: h(() => [
577
+ be(" 插入变量 ")
578
+ ]),
579
+ _: 2
580
+ }, 1032, ["onClick"]),
581
+ $(E, {
582
+ effect: "dark",
583
+ placement: "top-start"
584
+ }, {
585
+ content: h(() => [
586
+ k("div", Tt, [
587
+ k("span", At, U(s.tip), 1)
588
+ ])
589
+ ]),
590
+ default: h(() => [
591
+ $(t, null, {
592
+ default: h(() => [
593
+ $(a(at))
594
+ ]),
595
+ _: 1
596
+ })
597
+ ]),
598
+ _: 2
599
+ }, 1024)
600
+ ]))), 128)) : T("", !0)
601
+ ])
602
+ ]),
603
+ _: 1
604
+ }, 8, ["modelValue"]);
3043
605
  };
3044
606
  }
3045
- }, _o = /* @__PURE__ */ er(wo, [["__scopeId", "data-v-a9c66896"]]), Ko = {
3046
- install(I) {
3047
- I.component("st-varSelectDialog", _o);
607
+ }, Ft = /* @__PURE__ */ Se(Bt, [["__scopeId", "data-v-338eb1cd"]]), nl = {
608
+ install(o) {
609
+ o.component("st-varSelectDialog", Ft);
3048
610
  }
3049
611
  };
3050
612
  export {
3051
- Ko as default
613
+ nl as default
3052
614
  };