@okam/stack-ui 1.27.0 → 1.27.2

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 (391) hide show
  1. package/components/Carousel/components/CarouselNavigationButton.d.ts +1 -1
  2. package/index.d.ts +2 -0
  3. package/index.js +1 -1
  4. package/index.mjs +158 -151
  5. package/index10.js +1 -1
  6. package/index10.mjs +2 -2
  7. package/index100.js +1 -2
  8. package/index100.mjs +17 -12
  9. package/index101.js +2 -1
  10. package/index101.mjs +22 -45
  11. package/index102.js +1 -1
  12. package/index102.mjs +1 -1
  13. package/index103.js +1 -1
  14. package/index103.mjs +1 -1
  15. package/index107.js +1 -1
  16. package/index107.mjs +1 -1
  17. package/index108.js +1 -1
  18. package/index108.mjs +1 -1
  19. package/index11.js +1 -1
  20. package/index11.mjs +3 -3
  21. package/index112.js +1 -1
  22. package/index112.mjs +1 -1
  23. package/index113.js +1 -1
  24. package/index113.mjs +1 -1
  25. package/index114.js +1 -1
  26. package/index114.mjs +2 -2
  27. package/index116.js +1 -1
  28. package/index116.mjs +3 -3
  29. package/index118.js +1 -1
  30. package/index118.mjs +1 -1
  31. package/index119.js +1 -1
  32. package/index119.mjs +1 -1
  33. package/index12.js +1 -1
  34. package/index12.mjs +44 -15
  35. package/index121.js +1 -1
  36. package/index121.mjs +1 -1
  37. package/index122.js +1 -1
  38. package/index122.mjs +3 -3
  39. package/index124.js +1 -1
  40. package/index124.mjs +2 -2
  41. package/index125.js +1 -1
  42. package/index125.mjs +2 -2
  43. package/index126.js +1 -1
  44. package/index126.mjs +1 -1
  45. package/index128.js +1 -1
  46. package/index128.mjs +1 -1
  47. package/index13.js +1 -2
  48. package/index13.mjs +17 -20
  49. package/index131.js +1 -1
  50. package/index131.mjs +1 -1
  51. package/index132.js +1 -1
  52. package/index132.mjs +1 -1
  53. package/index133.js +1 -1
  54. package/index133.mjs +19 -49
  55. package/index134.js +1 -1
  56. package/index134.mjs +49 -25
  57. package/index135.js +1 -1
  58. package/index135.mjs +25 -19
  59. package/index137.js +1 -1
  60. package/index137.mjs +14 -14
  61. package/index138.js +1 -1
  62. package/index138.mjs +1 -1
  63. package/index139.js +1 -1
  64. package/index139.mjs +3 -3
  65. package/index14.js +1 -1
  66. package/index14.mjs +18 -17
  67. package/index140.js +1 -1
  68. package/index140.mjs +2 -2
  69. package/index143.js +1 -1
  70. package/index143.mjs +1 -1
  71. package/index147.js +1 -1
  72. package/index147.mjs +1 -1
  73. package/index15.js +1 -1
  74. package/index15.mjs +16 -83
  75. package/index159.js +11 -1
  76. package/index159.mjs +116 -2
  77. package/index16.js +1 -1
  78. package/index16.mjs +81 -28
  79. package/index160.js +1 -1
  80. package/index160.mjs +2 -6
  81. package/index161.js +1 -1
  82. package/index161.mjs +5 -64
  83. package/index162.js +1 -1
  84. package/index162.mjs +54 -16
  85. package/index163.js +1 -1
  86. package/index163.mjs +21 -49
  87. package/index164.js +1 -1
  88. package/index164.mjs +42 -143
  89. package/index165.js +1 -1
  90. package/index165.mjs +151 -18
  91. package/index166.js +1 -1
  92. package/index166.mjs +17 -14
  93. package/index167.js +1 -1
  94. package/index167.mjs +14 -34
  95. package/index168.js +1 -1
  96. package/index168.mjs +36 -79
  97. package/index169.js +1 -1
  98. package/index169.mjs +75 -23
  99. package/index17.js +1 -1
  100. package/index17.mjs +30 -32
  101. package/index170.js +1 -1
  102. package/index170.mjs +22 -13
  103. package/index171.js +1 -1
  104. package/index171.mjs +16 -48
  105. package/index172.js +1 -1
  106. package/index172.mjs +54 -2
  107. package/index173.js +1 -11
  108. package/index173.mjs +2 -116
  109. package/index174.js +1 -1
  110. package/index174.mjs +2 -2
  111. package/index175.js +1 -1
  112. package/index175.mjs +2 -2
  113. package/index176.js +1 -1
  114. package/index176.mjs +2 -2
  115. package/index177.js +1 -1
  116. package/index177.mjs +2 -2
  117. package/index178.js +1 -1
  118. package/index178.mjs +3 -3
  119. package/index179.js +1 -1
  120. package/index179.mjs +4 -4
  121. package/index18.js +1 -1
  122. package/index18.mjs +33 -31
  123. package/index180.js +1 -1
  124. package/index180.mjs +1 -1
  125. package/index181.js +1 -1
  126. package/index181.mjs +2 -2
  127. package/index182.js +1 -1
  128. package/index182.mjs +1 -1
  129. package/index183.js +1 -1
  130. package/index183.mjs +2 -2
  131. package/index184.js +1 -1
  132. package/index184.mjs +1 -1
  133. package/index185.js +1 -1
  134. package/index185.mjs +2 -2
  135. package/index186.js +1 -1
  136. package/index186.mjs +1 -1
  137. package/index187.js +1 -1
  138. package/index187.mjs +2 -2
  139. package/index188.js +1 -1
  140. package/index188.mjs +1 -1
  141. package/index19.js +1 -1
  142. package/index19.mjs +30 -33
  143. package/index191.js +1 -1
  144. package/index191.mjs +4 -4
  145. package/index192.js +1 -1
  146. package/index192.mjs +2 -2
  147. package/index193.js +1 -1
  148. package/index193.mjs +5 -5
  149. package/index194.js +1 -1
  150. package/index194.mjs +4 -4
  151. package/index195.js +1 -1
  152. package/index195.mjs +5 -5
  153. package/index196.js +1 -1
  154. package/index196.mjs +5 -5
  155. package/index197.js +1 -1
  156. package/index197.mjs +2 -2
  157. package/index2.js +1 -1
  158. package/index2.mjs +20 -20
  159. package/index20.js +1 -1
  160. package/index20.mjs +32 -67
  161. package/index21.js +1 -1
  162. package/index21.mjs +61 -58
  163. package/index22.js +1 -1
  164. package/index22.mjs +66 -52
  165. package/index224.js +1 -1
  166. package/index224.mjs +123 -306
  167. package/index225.js +1 -1
  168. package/index225.mjs +173 -186
  169. package/index226.js +1 -1
  170. package/index226.mjs +9 -8
  171. package/index227.js +1 -1
  172. package/index227.mjs +3 -26
  173. package/index228.js +1 -1
  174. package/index228.mjs +34 -53
  175. package/index229.js +1 -1
  176. package/index229.mjs +5 -46
  177. package/index23.js +1 -1
  178. package/index23.mjs +37 -41
  179. package/index230.js +1 -1
  180. package/index230.mjs +28 -123
  181. package/index231.js +1 -1
  182. package/index231.mjs +6 -130
  183. package/index232.js +1 -1
  184. package/index232.mjs +293 -159
  185. package/index233.js +1 -1
  186. package/index233.mjs +192 -9
  187. package/index234.js +1 -1
  188. package/index234.mjs +8 -3
  189. package/index235.js +1 -1
  190. package/index235.mjs +25 -35
  191. package/index236.js +1 -1
  192. package/index236.mjs +55 -5
  193. package/index237.js +1 -1
  194. package/index237.mjs +44 -27
  195. package/index238.js +1 -1
  196. package/index238.mjs +124 -6
  197. package/index24.js +1 -1
  198. package/index24.mjs +57 -20
  199. package/index242.js +1 -1
  200. package/index242.mjs +1 -1
  201. package/index243.js +1 -1
  202. package/index243.mjs +1 -1
  203. package/index245.js +1 -1
  204. package/index245.mjs +1 -1
  205. package/index246.js +1 -1
  206. package/index246.mjs +2 -2
  207. package/index248.js +1 -1
  208. package/index248.mjs +2 -2
  209. package/index249.js +1 -1
  210. package/index249.mjs +3 -3
  211. package/index25.js +1 -1
  212. package/index25.mjs +20 -50
  213. package/index251.js +1 -1
  214. package/index251.mjs +1 -1
  215. package/index26.js +1 -1
  216. package/index26.mjs +50 -17
  217. package/index260.js +1 -1
  218. package/index260.mjs +6 -2
  219. package/index261.mjs +2 -2
  220. package/index262.mjs +2 -2
  221. package/index263.mjs +2 -2
  222. package/index264.js +1 -1
  223. package/index264.mjs +2 -72
  224. package/index265.js +1 -1
  225. package/index265.mjs +72 -2
  226. package/index266.mjs +2 -2
  227. package/index267.js +1 -1
  228. package/index267.mjs +2 -19
  229. package/index268.js +1 -1
  230. package/index268.mjs +19 -2
  231. package/index269.js +1 -1
  232. package/index269.mjs +2 -6
  233. package/index27.js +1 -1
  234. package/index27.mjs +16 -32
  235. package/index28.js +1 -1
  236. package/index28.mjs +32 -23
  237. package/index29.js +1 -1
  238. package/index29.mjs +24 -8
  239. package/index3.js +1 -1
  240. package/index3.mjs +1 -1
  241. package/index30.js +1 -1
  242. package/index30.mjs +8 -32
  243. package/index31.js +1 -1
  244. package/index31.mjs +29 -30
  245. package/index32.js +1 -1
  246. package/index32.mjs +28 -98
  247. package/index33.js +1 -1
  248. package/index33.mjs +102 -8
  249. package/index34.js +1 -1
  250. package/index34.mjs +8 -46
  251. package/index35.js +1 -1
  252. package/index35.mjs +46 -18
  253. package/index36.js +2 -1
  254. package/index36.mjs +19 -6
  255. package/index37.js +1 -1
  256. package/index37.mjs +6 -46
  257. package/index38.js +1 -1
  258. package/index38.mjs +45 -23
  259. package/index39.js +2 -1
  260. package/index39.mjs +26 -5
  261. package/index4.js +1 -1
  262. package/index4.mjs +5 -5
  263. package/index40.js +1 -1
  264. package/index40.mjs +4 -7
  265. package/index41.js +1 -1
  266. package/index41.mjs +5 -5
  267. package/index42.js +1 -1
  268. package/index42.mjs +8 -5
  269. package/index43.js +1 -1
  270. package/index43.mjs +2 -2
  271. package/index44.js +1 -1
  272. package/index44.mjs +1 -1
  273. package/index45.js +1 -1
  274. package/index45.mjs +4 -4
  275. package/index46.js +1 -1
  276. package/index46.mjs +3 -9
  277. package/index47.js +1 -1
  278. package/index47.mjs +7 -9
  279. package/index48.js +1 -1
  280. package/index48.mjs +9 -9
  281. package/index49.js +1 -1
  282. package/index49.mjs +13 -46
  283. package/index50.js +1 -1
  284. package/index50.mjs +46 -8
  285. package/index51.js +1 -1
  286. package/index51.mjs +6 -69
  287. package/index52.js +1 -1
  288. package/index52.mjs +71 -8
  289. package/index53.js +1 -1
  290. package/index53.mjs +7 -12
  291. package/index54.js +1 -1
  292. package/index54.mjs +12 -9
  293. package/index55.js +1 -1
  294. package/index55.mjs +10 -17
  295. package/index56.js +1 -1
  296. package/index56.mjs +17 -13
  297. package/index57.js +1 -1
  298. package/index57.mjs +5 -5
  299. package/index58.js +1 -1
  300. package/index58.mjs +6 -6
  301. package/index59.js +1 -1
  302. package/index59.mjs +10 -8
  303. package/index6.js +1 -1
  304. package/index6.mjs +1 -1
  305. package/index60.js +1 -1
  306. package/index60.mjs +5 -5
  307. package/index61.js +1 -1
  308. package/index61.mjs +6 -8
  309. package/index62.js +1 -1
  310. package/index62.mjs +13 -14
  311. package/index63.js +1 -2
  312. package/index63.mjs +14 -23
  313. package/index64.js +1 -1
  314. package/index64.mjs +21 -15
  315. package/index65.js +1 -1
  316. package/index65.mjs +16 -14
  317. package/index66.js +1 -1
  318. package/index66.mjs +13 -40
  319. package/index67.js +1 -1
  320. package/index67.mjs +39 -36
  321. package/index68.js +1 -1
  322. package/index68.mjs +37 -11
  323. package/index69.js +1 -1
  324. package/index69.mjs +11 -10
  325. package/index7.js +1 -1
  326. package/index7.mjs +2 -2
  327. package/index70.js +1 -1
  328. package/index70.mjs +10 -13
  329. package/index71.js +2 -1
  330. package/index71.mjs +15 -2
  331. package/index72.js +1 -1
  332. package/index72.mjs +11 -8
  333. package/index73.js +1 -2
  334. package/index73.mjs +1 -7
  335. package/index74.js +1 -1
  336. package/index74.mjs +7 -6
  337. package/index75.js +1 -1
  338. package/index75.mjs +6 -6
  339. package/index76.js +2 -1
  340. package/index76.mjs +8 -25
  341. package/index77.js +2 -1
  342. package/index77.mjs +8 -2
  343. package/index78.js +1 -6
  344. package/index78.mjs +25 -94
  345. package/index79.js +1 -1
  346. package/index79.mjs +2 -69
  347. package/index8.js +1 -1
  348. package/index8.mjs +5 -5
  349. package/index80.js +6 -1
  350. package/index80.mjs +82 -29
  351. package/index81.js +1 -42
  352. package/index81.mjs +64 -65
  353. package/index82.js +1 -1
  354. package/index82.mjs +32 -150
  355. package/index83.js +42 -9
  356. package/index83.mjs +65 -52
  357. package/index84.js +1 -1
  358. package/index84.mjs +145 -31
  359. package/index85.js +9 -1
  360. package/index85.mjs +54 -10
  361. package/index86.js +1 -1
  362. package/index86.mjs +38 -28
  363. package/index87.js +1 -1
  364. package/index87.mjs +12 -5
  365. package/index88.js +1 -12
  366. package/index88.mjs +31 -36
  367. package/index89.js +1 -1
  368. package/index89.mjs +6 -29
  369. package/index9.js +1 -1
  370. package/index9.mjs +4 -4
  371. package/index90.js +12 -1
  372. package/index90.mjs +39 -12
  373. package/index91.js +1 -7
  374. package/index91.mjs +23 -13
  375. package/index92.js +1 -15
  376. package/index92.mjs +9 -67
  377. package/index93.js +7 -1
  378. package/index93.mjs +17 -5
  379. package/index94.js +13 -14
  380. package/index94.mjs +63 -17
  381. package/index95.js +1 -1
  382. package/index95.mjs +7 -42
  383. package/index96.js +16 -1
  384. package/index96.mjs +24 -44
  385. package/index97.js +1 -1
  386. package/index97.mjs +42 -48
  387. package/index98.js +1 -1
  388. package/index98.mjs +45 -17
  389. package/index99.js +1 -2
  390. package/index99.mjs +47 -21
  391. package/package.json +1 -1
package/index23.mjs CHANGED
@@ -1,60 +1,56 @@
1
1
  "use client";
2
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
3
- import { useDateRangePicker as $ } from "@react-aria/datepicker";
4
- import { useDateRangePickerState as x } from "@react-stately/datepicker";
5
- import { useRef as T } from "react";
6
- import s from "./index64.mjs";
7
- import C from "./index6.mjs";
8
- import S from "./index114.mjs";
9
- import { Dialog as j } from "./index111.mjs";
10
- import w from "./index13.mjs";
2
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
+ import { useDatePicker as C } from "@react-aria/datepicker";
4
+ import { useDatePickerState as F } from "@react-stately/datepicker";
5
+ import { useRef as S } from "react";
6
+ import l from "./index65.mjs";
7
+ import j from "./index6.mjs";
8
+ import k from "./index26.mjs";
9
+ import { Dialog as w } from "./index111.mjs";
10
+ import R from "./index14.mjs";
11
11
  import { CalendarPopover as y } from "./index112.mjs";
12
- import i from "./index113.mjs";
13
- function K(a) {
14
- const t = x(a), l = T(null), {
15
- labelProps: u,
16
- descriptionProps: v,
17
- groupProps: b,
18
- startFieldProps: c,
19
- endFieldProps: m,
20
- buttonProps: d,
21
- dialogProps: g,
22
- calendarProps: k
23
- } = $(a, t, l), { label: p, buttonLabel: h, description: f, themeName: o = "datePicker", tokens: r, popoverPlacement: D, icon: N } = a, R = s(`${o}.container`, r), P = s(`${o}.dateField`, r), F = s(`${o}.label`, r);
24
- return /* @__PURE__ */ n("div", { className: R, children: [
25
- p && /* @__PURE__ */ e("span", { ...u, children: p }),
26
- f && /* @__PURE__ */ e("div", { ...v, children: f }),
27
- /* @__PURE__ */ e("div", { ...b, ref: l, children: /* @__PURE__ */ n(
28
- C,
12
+ import f from "./index113.mjs";
13
+ function M({
14
+ popoverPlacement: h = "bottom start",
15
+ tokens: r,
16
+ customTheme: A,
17
+ themeName: o = "datePicker",
18
+ icon: P = "ArrowDown",
19
+ description: s,
20
+ buttonLabel: c,
21
+ ...n
22
+ }) {
23
+ const t = F({ ...n }), a = S(null), { groupProps: u, fieldProps: d, labelProps: v, descriptionProps: D, buttonProps: m, dialogProps: b, calendarProps: g } = C({ ...n }, t, a), { label: p } = { ...n }, T = l(`${o}.container`, r), $ = l(`${o}.dateField`, r), x = l(`${o}.label`, r);
24
+ return /* @__PURE__ */ i("div", { className: T, children: [
25
+ p && /* @__PURE__ */ e("span", { ...v, children: p }),
26
+ s && /* @__PURE__ */ e("div", { ...D, children: s }),
27
+ /* @__PURE__ */ e("div", { ...u, ref: a, children: /* @__PURE__ */ i(
28
+ j,
29
29
  {
30
30
  themeName: `${o}.button`,
31
31
  tokens: { ...r },
32
32
  type: "button",
33
- ...d,
34
- handlePress: d.onPress,
33
+ ...m,
34
+ handlePress: m.onPress,
35
35
  children: [
36
- h && /* @__PURE__ */ e("p", { className: F, children: h }),
37
- /* @__PURE__ */ n("div", { className: P, children: [
38
- /* @__PURE__ */ e(i, { ...c }),
39
- " -",
40
- /* @__PURE__ */ e(i, { ...m }),
36
+ c && /* @__PURE__ */ e("p", { className: x, children: c }),
37
+ /* @__PURE__ */ i("div", { className: $, children: [
38
+ /* @__PURE__ */ e(f, { ...d }),
41
39
  t.validationState === "invalid" && "❌"
42
40
  ] }),
43
- /* @__PURE__ */ e(w, { themeName: `${o}.icon`, tokens: { ...r }, icon: N ?? "ArrowDown" })
41
+ /* @__PURE__ */ e(R, { themeName: `${o}.icon`, tokens: { ...r }, icon: P })
44
42
  ]
45
43
  }
46
44
  ) }),
47
- t.isOpen && /* @__PURE__ */ e(y, { triggerRef: l, state: t, placement: D, children: /* @__PURE__ */ n(j, { ...g, children: [
48
- /* @__PURE__ */ n("div", { className: P, children: [
49
- /* @__PURE__ */ e(i, { ...c }),
50
- " -",
51
- /* @__PURE__ */ e(i, { ...m }),
45
+ t.isOpen && /* @__PURE__ */ e(y, { triggerRef: a, state: t, placement: h, children: /* @__PURE__ */ i(w, { ...b, children: [
46
+ /* @__PURE__ */ i("div", { children: [
47
+ /* @__PURE__ */ e(f, { ...d }),
52
48
  t.validationState === "invalid" && "❌"
53
49
  ] }),
54
- /* @__PURE__ */ e(S, { ...k })
50
+ /* @__PURE__ */ e(k, { ...g })
55
51
  ] }) })
56
52
  ] });
57
53
  }
58
54
  export {
59
- K as default
55
+ M as default
60
56
  };
package/index230.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@react-aria/utils");class h{isDisabled(t){var e;return this.disabledBehavior==="all"&&(((e=t.props)===null||e===void 0?void 0:e.isDisabled)||this.disabledKeys.has(t.key))}getNextKey(t){for(t=this.collection.getKeyAfter(t);t!=null;){let e=this.collection.getItem(t);if(e.type==="item"&&!this.isDisabled(e))return t;t=this.collection.getKeyAfter(t)}return null}getPreviousKey(t){for(t=this.collection.getKeyBefore(t);t!=null;){let e=this.collection.getItem(t);if(e.type==="item"&&!this.isDisabled(e))return t;t=this.collection.getKeyBefore(t)}return null}findKey(t,e,i){let n=this.getItem(t);if(!n)return null;let l=n.getBoundingClientRect();do t=e(t),n=this.getItem(t);while(n&&i(l,n.getBoundingClientRect()));return t}isSameRow(t,e){return t.top===e.top||t.left!==e.left}isSameColumn(t,e){return t.left===e.left||t.top!==e.top}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,e){return e?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,e=>this.getNextColumn(e,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,e=>this.getNextColumn(e,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();for(;t!=null;){let e=this.collection.getItem(t);if((e==null?void 0:e.type)==="item"&&!this.isDisabled(e))return t;t=this.collection.getKeyAfter(t)}return null}getLastKey(){let t=this.collection.getLastKey();for(;t!=null;){let e=this.collection.getItem(t);if(e.type==="item"&&!this.isDisabled(e))return t;t=this.collection.getKeyBefore(t)}return null}getItem(t){return t!==null?this.ref.current.querySelector(`[data-key="${CSS.escape(t.toString())}"]`):null}getKeyPageAbove(t){let e=this.ref.current,i=this.getItem(t);if(!i)return null;if(!s.isScrollable(e))return this.getFirstKey();let n=e.getBoundingClientRect(),l=i.getBoundingClientRect();if(this.orientation==="horizontal"){let o=n.x-e.scrollLeft,r=Math.max(0,l.x-o+l.width-n.width);for(;i&&l.x-o>r;)t=this.getKeyAbove(t),i=t==null?null:this.getItem(t),l=i==null?void 0:i.getBoundingClientRect()}else{let o=n.y-e.scrollTop,r=Math.max(0,l.y-o+l.height-n.height);for(;i&&l.y-o>r;)t=this.getKeyAbove(t),i=t==null?null:this.getItem(t),l=i==null?void 0:i.getBoundingClientRect()}return t??this.getFirstKey()}getKeyPageBelow(t){let e=this.ref.current,i=this.getItem(t);if(!i)return null;if(!s.isScrollable(e))return this.getLastKey();let n=e.getBoundingClientRect(),l=i.getBoundingClientRect();if(this.orientation==="horizontal"){let o=n.x-e.scrollLeft,r=Math.min(e.scrollWidth,l.x-o-l.width+n.width);for(;i&&l.x-o<r;)t=this.getKeyBelow(t),i=t==null?null:this.getItem(t),l=i==null?void 0:i.getBoundingClientRect()}else{let o=n.y-e.scrollTop,r=Math.min(e.scrollHeight,l.y-o-l.height+n.height);for(;i&&l.y-o<r;)t=this.getKeyBelow(t),i=t==null?null:this.getItem(t),l=i==null?void 0:i.getBoundingClientRect()}return t??this.getLastKey()}getKeyForSearch(t,e){if(!this.collator)return null;let i=this.collection,n=e||this.getFirstKey();for(;n!=null;){let l=i.getItem(n),o=l.textValue.slice(0,t.length);if(l.textValue&&this.collator.compare(o,t)===0)return n;n=this.getKeyBelow(n)}return null}constructor(...t){if(t.length===1){let e=t[0];this.collection=e.collection,this.ref=e.ref,this.collator=e.collator,this.disabledKeys=e.disabledKeys||new Set,this.disabledBehavior=e.disabledBehavior||"all",this.orientation=e.orientation,this.direction=e.direction,this.layout=e.layout||"stack"}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all";this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}exports.ListKeyboardDelegate=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index225.js");function f(a){let{swiper:e,duration:l,transformElements:s,allSlides:o}=a;const{activeIndex:d}=e,u=n=>n.parentElement?n.parentElement:e.slides.filter(t=>t.shadowRoot&&t.shadowRoot===n.parentNode)[0];if(e.params.virtualTranslate&&l!==0){let n=!1,r;o?r=s:r=s.filter(t=>{const i=t.classList.contains("swiper-slide-transform")?u(t):t;return e.getSlideIndex(i)===d}),r.forEach(t=>{c.j(t,()=>{if(n||!e||e.destroyed)return;n=!0,e.animating=!1;const i=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});e.wrapperEl.dispatchEvent(i)})})}}exports.e=f;
package/index230.mjs CHANGED
@@ -1,127 +1,32 @@
1
- import { isScrollable as s } from "@react-aria/utils";
2
- class a {
3
- isDisabled(t) {
4
- var e;
5
- return this.disabledBehavior === "all" && (((e = t.props) === null || e === void 0 ? void 0 : e.isDisabled) || this.disabledKeys.has(t.key));
6
- }
7
- getNextKey(t) {
8
- for (t = this.collection.getKeyAfter(t); t != null; ) {
9
- let e = this.collection.getItem(t);
10
- if (e.type === "item" && !this.isDisabled(e)) return t;
11
- t = this.collection.getKeyAfter(t);
12
- }
13
- return null;
14
- }
15
- getPreviousKey(t) {
16
- for (t = this.collection.getKeyBefore(t); t != null; ) {
17
- let e = this.collection.getItem(t);
18
- if (e.type === "item" && !this.isDisabled(e)) return t;
19
- t = this.collection.getKeyBefore(t);
20
- }
21
- return null;
22
- }
23
- findKey(t, e, i) {
24
- let n = this.getItem(t);
25
- if (!n) return null;
26
- let l = n.getBoundingClientRect();
27
- do
28
- t = e(t), n = this.getItem(t);
29
- while (n && i(l, n.getBoundingClientRect()));
30
- return t;
31
- }
32
- isSameRow(t, e) {
33
- return t.top === e.top || t.left !== e.left;
34
- }
35
- isSameColumn(t, e) {
36
- return t.left === e.left || t.top !== e.top;
37
- }
38
- getKeyBelow(t) {
39
- return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(t, (e) => this.getNextKey(e), this.isSameRow) : this.getNextKey(t);
40
- }
41
- getKeyAbove(t) {
42
- return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(t, (e) => this.getPreviousKey(e), this.isSameRow) : this.getPreviousKey(t);
43
- }
44
- getNextColumn(t, e) {
45
- return e ? this.getPreviousKey(t) : this.getNextKey(t);
46
- }
47
- getKeyRightOf(t) {
48
- return this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(t, this.direction === "rtl") : this.findKey(t, (e) => this.getNextColumn(e, this.direction === "rtl"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(t, this.direction === "rtl") : null;
49
- }
50
- getKeyLeftOf(t) {
51
- return this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(t, this.direction === "ltr") : this.findKey(t, (e) => this.getNextColumn(e, this.direction === "ltr"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(t, this.direction === "ltr") : null;
52
- }
53
- getFirstKey() {
54
- let t = this.collection.getFirstKey();
55
- for (; t != null; ) {
56
- let e = this.collection.getItem(t);
57
- if ((e == null ? void 0 : e.type) === "item" && !this.isDisabled(e)) return t;
58
- t = this.collection.getKeyAfter(t);
59
- }
60
- return null;
61
- }
62
- getLastKey() {
63
- let t = this.collection.getLastKey();
64
- for (; t != null; ) {
65
- let e = this.collection.getItem(t);
66
- if (e.type === "item" && !this.isDisabled(e)) return t;
67
- t = this.collection.getKeyBefore(t);
68
- }
69
- return null;
70
- }
71
- getItem(t) {
72
- return t !== null ? this.ref.current.querySelector(`[data-key="${CSS.escape(t.toString())}"]`) : null;
73
- }
74
- getKeyPageAbove(t) {
75
- let e = this.ref.current, i = this.getItem(t);
76
- if (!i) return null;
77
- if (!s(e)) return this.getFirstKey();
78
- let n = e.getBoundingClientRect(), l = i.getBoundingClientRect();
79
- if (this.orientation === "horizontal") {
80
- let o = n.x - e.scrollLeft, r = Math.max(0, l.x - o + l.width - n.width);
81
- for (; i && l.x - o > r; )
82
- t = this.getKeyAbove(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
83
- } else {
84
- let o = n.y - e.scrollTop, r = Math.max(0, l.y - o + l.height - n.height);
85
- for (; i && l.y - o > r; )
86
- t = this.getKeyAbove(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
87
- }
88
- return t ?? this.getFirstKey();
89
- }
90
- getKeyPageBelow(t) {
91
- let e = this.ref.current, i = this.getItem(t);
92
- if (!i) return null;
93
- if (!s(e)) return this.getLastKey();
94
- let n = e.getBoundingClientRect(), l = i.getBoundingClientRect();
95
- if (this.orientation === "horizontal") {
96
- let o = n.x - e.scrollLeft, r = Math.min(e.scrollWidth, l.x - o - l.width + n.width);
97
- for (; i && l.x - o < r; )
98
- t = this.getKeyBelow(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
99
- } else {
100
- let o = n.y - e.scrollTop, r = Math.min(e.scrollHeight, l.y - o - l.height + n.height);
101
- for (; i && l.y - o < r; )
102
- t = this.getKeyBelow(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
103
- }
104
- return t ?? this.getLastKey();
105
- }
106
- getKeyForSearch(t, e) {
107
- if (!this.collator) return null;
108
- let i = this.collection, n = e || this.getFirstKey();
109
- for (; n != null; ) {
110
- let l = i.getItem(n), o = l.textValue.slice(0, t.length);
111
- if (l.textValue && this.collator.compare(o, t) === 0) return n;
112
- n = this.getKeyBelow(n);
113
- }
114
- return null;
115
- }
116
- constructor(...t) {
117
- if (t.length === 1) {
118
- let e = t[0];
119
- this.collection = e.collection, this.ref = e.ref, this.collator = e.collator, this.disabledKeys = e.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = e.disabledBehavior || "all", this.orientation = e.orientation, this.direction = e.direction, this.layout = e.layout || "stack";
120
- } else
121
- this.collection = t[0], this.disabledKeys = t[1], this.ref = t[2], this.collator = t[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all";
122
- this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
1
+ import { j as f } from "./index225.mjs";
2
+ function p(a) {
3
+ let {
4
+ swiper: e,
5
+ duration: o,
6
+ transformElements: s,
7
+ allSlides: l
8
+ } = a;
9
+ const {
10
+ activeIndex: d
11
+ } = e, c = (n) => n.parentElement ? n.parentElement : e.slides.filter((t) => t.shadowRoot && t.shadowRoot === n.parentNode)[0];
12
+ if (e.params.virtualTranslate && o !== 0) {
13
+ let n = !1, r;
14
+ l ? r = s : r = s.filter((t) => {
15
+ const i = t.classList.contains("swiper-slide-transform") ? c(t) : t;
16
+ return e.getSlideIndex(i) === d;
17
+ }), r.forEach((t) => {
18
+ f(t, () => {
19
+ if (n || !e || e.destroyed) return;
20
+ n = !0, e.animating = !1;
21
+ const i = new window.CustomEvent("transitionend", {
22
+ bubbles: !0,
23
+ cancelable: !0
24
+ });
25
+ e.wrapperEl.dispatchEvent(i);
26
+ });
27
+ });
123
28
  }
124
29
  }
125
30
  export {
126
- a as ListKeyboardDelegate
31
+ p as e
127
32
  };
package/index231.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function o(e,n){e===void 0&&(e={}),n===void 0&&(n={}),Object.keys(n).forEach(t=>{typeof e[t]>"u"?e[t]=n[t]:r(n[t])&&r(e[t])&&Object.keys(n[t]).length>0&&o(e[t],n[t])})}const u={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function i(){const e=typeof document<"u"?document:{};return o(e,u),e}const c={document:u,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function s(){const e=typeof window<"u"?window:{};return o(e,c),e}exports.a=s;exports.g=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index225.js");function a(t,l,o){const s=`swiper-slide-shadow${o?`-${o}`:""}${t?` swiper-slide-shadow-${t}`:""}`,i=r.l(l);let e=i.querySelector(`.${s.split(" ").join(".")}`);return e||(e=r.c("div",s.split(" ")),i.append(e)),e}exports.c=a;
package/index231.mjs CHANGED
@@ -1,133 +1,9 @@
1
- function r(e) {
2
- return e !== null && typeof e == "object" && "constructor" in e && e.constructor === Object;
3
- }
4
- function o(e, n) {
5
- e === void 0 && (e = {}), n === void 0 && (n = {}), Object.keys(n).forEach((t) => {
6
- typeof e[t] > "u" ? e[t] = n[t] : r(n[t]) && r(e[t]) && Object.keys(n[t]).length > 0 && o(e[t], n[t]);
7
- });
8
- }
9
- const u = {
10
- body: {},
11
- addEventListener() {
12
- },
13
- removeEventListener() {
14
- },
15
- activeElement: {
16
- blur() {
17
- },
18
- nodeName: ""
19
- },
20
- querySelector() {
21
- return null;
22
- },
23
- querySelectorAll() {
24
- return [];
25
- },
26
- getElementById() {
27
- return null;
28
- },
29
- createEvent() {
30
- return {
31
- initEvent() {
32
- }
33
- };
34
- },
35
- createElement() {
36
- return {
37
- children: [],
38
- childNodes: [],
39
- style: {},
40
- setAttribute() {
41
- },
42
- getElementsByTagName() {
43
- return [];
44
- }
45
- };
46
- },
47
- createElementNS() {
48
- return {};
49
- },
50
- importNode() {
51
- return null;
52
- },
53
- location: {
54
- hash: "",
55
- host: "",
56
- hostname: "",
57
- href: "",
58
- origin: "",
59
- pathname: "",
60
- protocol: "",
61
- search: ""
62
- }
63
- };
64
- function c() {
65
- const e = typeof document < "u" ? document : {};
66
- return o(e, u), e;
67
- }
68
- const i = {
69
- document: u,
70
- navigator: {
71
- userAgent: ""
72
- },
73
- location: {
74
- hash: "",
75
- host: "",
76
- hostname: "",
77
- href: "",
78
- origin: "",
79
- pathname: "",
80
- protocol: "",
81
- search: ""
82
- },
83
- history: {
84
- replaceState() {
85
- },
86
- pushState() {
87
- },
88
- go() {
89
- },
90
- back() {
91
- }
92
- },
93
- CustomEvent: function() {
94
- return this;
95
- },
96
- addEventListener() {
97
- },
98
- removeEventListener() {
99
- },
100
- getComputedStyle() {
101
- return {
102
- getPropertyValue() {
103
- return "";
104
- }
105
- };
106
- },
107
- Image() {
108
- },
109
- Date() {
110
- },
111
- screen: {},
112
- setTimeout() {
113
- },
114
- clearTimeout() {
115
- },
116
- matchMedia() {
117
- return {};
118
- },
119
- requestAnimationFrame(e) {
120
- return typeof setTimeout > "u" ? (e(), null) : setTimeout(e, 0);
121
- },
122
- cancelAnimationFrame(e) {
123
- typeof setTimeout > "u" || clearTimeout(e);
124
- }
125
- };
126
- function s() {
127
- const e = typeof window < "u" ? window : {};
128
- return o(e, i), e;
1
+ import { l, c as i } from "./index225.mjs";
2
+ function d(s, r, o) {
3
+ const a = `swiper-slide-shadow${o ? `-${o}` : ""}${s ? ` swiper-slide-shadow-${s}` : ""}`, t = l(r);
4
+ let e = t.querySelector(`.${a.split(" ").join(".")}`);
5
+ return e || (e = i("div", a.split(" ")), t.append(e)), e;
129
6
  }
130
7
  export {
131
- s as a,
132
- c as g
8
+ d as c
133
9
  };
package/index232.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index231.js");function h(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function S(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function T(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function b(){return Date.now()}function x(e){const t=c.a();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function E(e,t){t===void 0&&(t="x");const n=c.a();let r,i,l;const s=x(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(o=>o.replace(",",".")).join(", ")),l=new n.WebKitCSSMatrix(i==="none"?"":i)):(l=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=l.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=l.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=l.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function f(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function v(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function d(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(r!=null&&!v(r)){const i=Object.keys(Object(r)).filter(l=>t.indexOf(l)<0);for(let l=0,s=i.length;l<s;l+=1){const o=i[l],a=Object.getOwnPropertyDescriptor(r,o);a!==void 0&&a.enumerable&&(f(e[o])&&f(r[o])?r[o].__swiper__?e[o]=r[o]:d(e[o],r[o]):!f(e[o])&&f(r[o])?(e[o]={},r[o].__swiper__?e[o]=r[o]:d(e[o],r[o])):e[o]=r[o])}}}return e}function M(e,t,n){e.style.setProperty(t,n)}function O(e){let{swiper:t,targetPosition:n,side:r}=e;const i=c.a(),l=-t.translate;let s=null,o;const a=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const y=n>l?"next":"prev",g=(p,m)=>y==="next"&&p>=m||y==="prev"&&p<=m,w=()=>{o=new Date().getTime(),s===null&&(s=o);const p=Math.max(Math.min((o-s)/a,1),0),m=.5-Math.cos(p*Math.PI)/2;let u=l+m*(n-l);if(g(u,n)&&(u=n),t.wrapperEl.scrollTo({[r]:u}),g(u,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:u})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(w)};w()}function P(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function C(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function j(e){try{console.warn(e);return}catch{}}function _(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:h(t)),n}function F(e){const t=c.a(),n=c.g(),r=e.getBoundingClientRect(),i=n.body,l=e.clientTop||i.clientTop||0,s=e.clientLeft||i.clientLeft||0,o=e===t?t.scrollY:e.scrollTop,a=e===t?t.scrollX:e.scrollLeft;return{top:r.top+o-l,left:r.left+a-s}}function A(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function L(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function k(e,t){return c.a().getComputedStyle(e,null).getPropertyValue(t)}function W(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function D(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function I(e,t){function n(r){r.target===e&&(t.call(e,r),e.removeEventListener("transitionend",n))}t&&e.addEventListener("transitionend",n)}function q(e,t,n){const r=c.a();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function K(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}exports.a=D;exports.b=F;exports.c=_;exports.d=b;exports.e=C;exports.f=q;exports.g=W;exports.h=h;exports.i=E;exports.j=I;exports.k=f;exports.l=P;exports.m=K;exports.n=T;exports.o=k;exports.p=L;exports.q=A;exports.r=O;exports.s=M;exports.t=j;exports.u=d;exports.v=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index272.js"),B=require("./index273.js"),N=require("./index274.js"),j=require("./index148.js"),U=require("./index275.js"),o=require("@react-aria/utils"),w=require("react");function z(i){let s=w.useContext(B.PressResponderContext);if(s){let{register:u,...c}=s;i=o.mergeProps(c,i),u()}return o.useSyncRef(s,i.ref),i}var x=new WeakMap;class C{continuePropagation(){U._class_private_field_set(this,x,!1)}get shouldStopPropagation(){return N._class_private_field_get(this,x)}constructor(s,u,c){j._class_private_field_init(this,x,{writable:!0,value:void 0}),U._class_private_field_set(this,x,!0),this.type=s,this.pointerType=u,this.target=c.currentTarget,this.shiftKey=c.shiftKey,this.metaKey=c.metaKey,this.ctrlKey=c.ctrlKey,this.altKey=c.altKey}}const R=Symbol("linkClicked");function J(i){let{onPress:s,onPressChange:u,onPressStart:c,onPressEnd:g,onPressUp:M,isDisabled:v,isPressed:H,preventFocusOnPress:k,shouldCancelOnPointerExit:G,allowTextSelectionOnPress:y,ref:re,...V}=z(i),[X,A]=w.useState(!1),S=w.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:h,removeAllGlobalListeners:$}=o.useGlobalListeners(),T=o.useEffectEvent((e,a)=>{let d=S.current;if(v||d.didFirePressStart)return!1;let n=!0;if(d.isTriggeringEvent=!0,c){let l=new C("pressstart",a,e);c(l),n=l.shouldStopPropagation}return u&&u(!0),d.isTriggeringEvent=!1,d.didFirePressStart=!0,A(!0),n}),p=o.useEffectEvent((e,a,d=!0)=>{let n=S.current;if(!n.didFirePressStart)return!1;n.ignoreClickAfterPress=!0,n.didFirePressStart=!1,n.isTriggeringEvent=!0;let l=!0;if(g){let t=new C("pressend",a,e);g(t),l=t.shouldStopPropagation}if(u&&u(!1),A(!1),s&&d&&!v){let t=new C("press",a,e);s(t),l&&(l=t.shouldStopPropagation)}return n.isTriggeringEvent=!1,l}),m=o.useEffectEvent((e,a)=>{let d=S.current;if(v)return!1;if(M){d.isTriggeringEvent=!0;let n=new C("pressup",a,e);return M(n),d.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),E=o.useEffectEvent(e=>{let a=S.current;a.isPressed&&a.target&&(a.isOverTarget&&a.pointerType!=null&&p(P(a.target,e),a.pointerType,!1),a.isPressed=!1,a.isOverTarget=!1,a.activePointerId=null,a.pointerType=null,$(),y||b.restoreTextSelection(a.target))}),_=o.useEffectEvent(e=>{G&&E(e)}),Y=w.useMemo(()=>{let e=S.current,a={onKeyDown(n){if(D(n.nativeEvent,n.currentTarget)&&n.currentTarget.contains(n.target)){var l;W(n.target,n.key)&&n.preventDefault();let t=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,t=T(n,"keyboard");let r=n.currentTarget,f=O=>{D(O,r)&&!O.repeat&&r.contains(O.target)&&e.target&&m(P(e.target,O),"keyboard")};h(o.getOwnerDocument(n.currentTarget),"keyup",o.chain(f,d),!0)}t&&n.stopPropagation(),n.metaKey&&o.isMac()&&((l=e.metaKeyEvents)===null||l===void 0||l.set(n.key,n.nativeEvent))}else n.key==="Meta"&&(e.metaKeyEvents=new Map)},onClick(n){if(!(n&&!n.currentTarget.contains(n.target))&&n&&n.button===0&&!e.isTriggeringEvent&&!o.openLink.isOpening){let l=!0;if(v&&n.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType==="virtual"||o.isVirtualClick(n.nativeEvent))){!v&&!k&&o.focusWithoutScrolling(n.currentTarget);let t=T(n,"virtual"),r=m(n,"virtual"),f=p(n,"virtual");l=t&&r&&f}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,l&&n.stopPropagation()}}},d=n=>{var l;if(e.isPressed&&e.target&&D(n,e.target)){var t;W(n.target,n.key)&&n.preventDefault();let f=n.target;p(P(e.target,n),"keyboard",e.target.contains(f)),$(),n.key!=="Enter"&&L(e.target)&&e.target.contains(f)&&!n[R]&&(n[R]=!0,o.openLink(e.target,n,!1)),e.isPressed=!1,(t=e.metaKeyEvents)===null||t===void 0||t.delete(n.key)}else if(n.key==="Meta"&&(!((l=e.metaKeyEvents)===null||l===void 0)&&l.size)){var r;let f=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let O of f.values())(r=e.target)===null||r===void 0||r.dispatchEvent(new KeyboardEvent("keyup",O))}};if(typeof PointerEvent<"u"){a.onPointerDown=r=>{if(r.button!==0||!r.currentTarget.contains(r.target))return;if(o.isVirtualPointerEvent(r.nativeEvent)){e.pointerType="virtual";return}I(r.currentTarget)&&r.preventDefault(),e.pointerType=r.pointerType;let f=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=r.pointerId,e.target=r.currentTarget,!v&&!k&&o.focusWithoutScrolling(r.currentTarget),y||b.disableTextSelection(e.target),f=T(r,e.pointerType),h(o.getOwnerDocument(r.currentTarget),"pointermove",n,!1),h(o.getOwnerDocument(r.currentTarget),"pointerup",l,!1),h(o.getOwnerDocument(r.currentTarget),"pointercancel",t,!1)),f&&r.stopPropagation()},a.onMouseDown=r=>{r.currentTarget.contains(r.target)&&r.button===0&&(I(r.currentTarget)&&r.preventDefault(),r.stopPropagation())},a.onPointerUp=r=>{!r.currentTarget.contains(r.target)||e.pointerType==="virtual"||r.button===0&&K(r,r.currentTarget)&&m(r,e.pointerType||r.pointerType)};let n=r=>{r.pointerId===e.activePointerId&&(e.target&&K(r,e.target)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,T(P(e.target,r),e.pointerType)):e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,p(P(e.target,r),e.pointerType,!1),_(r)))},l=r=>{r.pointerId===e.activePointerId&&e.isPressed&&r.button===0&&e.target&&(K(r,e.target)&&e.pointerType!=null?p(P(e.target,r),e.pointerType):e.isOverTarget&&e.pointerType!=null&&p(P(e.target,r),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,$(),y||b.restoreTextSelection(e.target))},t=r=>{E(r)};a.onDragStart=r=>{r.currentTarget.contains(r.target)&&E(r)}}else{a.onMouseDown=t=>{if(t.button!==0||!t.currentTarget.contains(t.target))return;if(I(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=o.isVirtualClick(t.nativeEvent)?"virtual":"mouse",!v&&!k&&o.focusWithoutScrolling(t.currentTarget),T(t,e.pointerType)&&t.stopPropagation(),h(o.getOwnerDocument(t.currentTarget),"mouseup",n,!1)},a.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!0,r=T(t,e.pointerType)),r&&t.stopPropagation()},a.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!1,r=p(t,e.pointerType,!1),_(t)),r&&t.stopPropagation()},a.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&t.button===0&&m(t,e.pointerType||"mouse")};let n=t=>{if(t.button===0){if(e.isPressed=!1,$(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&K(t,e.target)&&e.pointerType!=null?p(P(e.target,t),e.pointerType):e.target&&e.isOverTarget&&e.pointerType!=null&&p(P(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};a.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let r=Q(t.nativeEvent);if(!r)return;e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",!v&&!k&&o.focusWithoutScrolling(t.currentTarget),y||b.disableTextSelection(e.target),T(t,e.pointerType)&&t.stopPropagation(),h(o.getOwnerWindow(t.currentTarget),"scroll",l,!0)},a.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=F(t.nativeEvent,e.activePointerId),f=!0;r&&K(r,t.currentTarget)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,f=T(t,e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,f=p(t,e.pointerType,!1),_(t)),f&&t.stopPropagation()},a.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=F(t.nativeEvent,e.activePointerId),f=!0;r&&K(r,t.currentTarget)&&e.pointerType!=null?(m(t,e.pointerType),f=p(t,e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(f=p(t,e.pointerType,!1)),f&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!y&&b.restoreTextSelection(e.target),$()},a.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&E(t))};let l=t=>{e.isPressed&&t.target.contains(e.target)&&E({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};a.onDragStart=t=>{t.currentTarget.contains(t.target)&&E(t)}}return a},[h,v,k,$,y,E,_,p,T,m]);return w.useEffect(()=>()=>{var e;y||b.restoreTextSelection((e=S.current.target)!==null&&e!==void 0?e:void 0)},[y]),{isPressed:H||X,pressProps:o.mergeProps(V,Y)}}function L(i){return i.tagName==="A"&&i.hasAttribute("href")}function D(i,s){const{key:u,code:c}=i,g=s,M=g.getAttribute("role");return(u==="Enter"||u===" "||u==="Spacebar"||c==="Space")&&!(g instanceof o.getOwnerWindow(g).HTMLInputElement&&!q(g,u)||g instanceof o.getOwnerWindow(g).HTMLTextAreaElement||g.isContentEditable)&&!((M==="link"||!M&&L(g))&&u!=="Enter")}function Q(i){const{targetTouches:s}=i;return s.length>0?s[0]:null}function F(i,s){const u=i.changedTouches;for(let c=0;c<u.length;c++){const g=u[c];if(g.identifier===s)return g}return null}function P(i,s){return{currentTarget:i,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey}}function Z(i){let s=0,u=0;return i.width!==void 0?s=i.width/2:i.radiusX!==void 0&&(s=i.radiusX),i.height!==void 0?u=i.height/2:i.radiusY!==void 0&&(u=i.radiusY),{top:i.clientY-u,right:i.clientX+s,bottom:i.clientY+u,left:i.clientX-s}}function ee(i,s){return!(i.left>s.right||s.left>i.right||i.top>s.bottom||s.top>i.bottom)}function K(i,s){let u=s.getBoundingClientRect(),c=Z(i);return ee(u,c)}function I(i){return!(i instanceof HTMLElement)||!i.hasAttribute("draggable")}function W(i,s){return i instanceof HTMLInputElement?!q(i,s):i instanceof HTMLButtonElement?i.type!=="submit"&&i.type!=="reset":!L(i)}const te=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function q(i,s){return i.type==="checkbox"||i.type==="radio"?s===" ":te.has(i.type)}exports.usePress=J;