@quoreadmin/ui 1.7.19 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +42 -40
  3. package/dist/index10.js +2 -2
  4. package/dist/{index100.js → index101.js} +1 -1
  5. package/dist/index103.js +138 -6
  6. package/dist/index104.js +4 -0
  7. package/dist/index107.js +2 -2
  8. package/dist/index109.js +1 -1
  9. package/dist/index11.js +2 -2
  10. package/dist/index111.js +3 -3
  11. package/dist/index113.js +6 -6
  12. package/dist/index115.js +1 -1
  13. package/dist/index117.js +5 -5
  14. package/dist/index12.js +2 -2
  15. package/dist/index127.js +2 -14
  16. package/dist/index128.js +16 -0
  17. package/dist/index13.js +2 -2
  18. package/dist/{index129.js → index130.js} +1 -1
  19. package/dist/{index131.js → index132.js} +2 -2
  20. package/dist/{index136.js → index137.js} +1 -1
  21. package/dist/index14.js +2 -2
  22. package/dist/{index140.js → index141.js} +7 -7
  23. package/dist/{index142.js → index143.js} +1 -1
  24. package/dist/{index144.js → index145.js} +10 -10
  25. package/dist/index15.js +2 -2
  26. package/dist/{index152.js → index153.js} +1 -1
  27. package/dist/{index155.js → index156.js} +1 -1
  28. package/dist/{index157.js → index158.js} +1 -1
  29. package/dist/index16.js +2 -2
  30. package/dist/{index159.js → index160.js} +9 -9
  31. package/dist/index163.js +111 -492
  32. package/dist/index164.js +471 -5498
  33. package/dist/index165.js +5511 -80
  34. package/dist/index166.js +86 -856
  35. package/dist/index167.js +844 -21
  36. package/dist/index168.js +23 -265
  37. package/dist/index169.js +256 -126
  38. package/dist/index17.js +2 -2
  39. package/dist/index170.js +146 -1195
  40. package/dist/index171.js +1139 -712
  41. package/dist/index172.js +704 -1240
  42. package/dist/index173.js +1280 -248
  43. package/dist/index174.js +266 -96
  44. package/dist/index175.js +106 -2
  45. package/dist/index176.js +2 -1376
  46. package/dist/index177.js +1378 -0
  47. package/dist/index179.js +12 -12
  48. package/dist/index18.js +2 -2
  49. package/dist/index180.js +10 -10
  50. package/dist/index181.js +12 -12
  51. package/dist/index182.js +14 -21
  52. package/dist/index183.js +23 -757
  53. package/dist/index184.js +759 -1122
  54. package/dist/index185.js +1122 -1234
  55. package/dist/index186.js +1205 -11248
  56. package/dist/index187.js +11260 -1173
  57. package/dist/index188.js +38 -0
  58. package/dist/index189.js +44 -36
  59. package/dist/index19.js +2 -2
  60. package/dist/index190.js +1188 -42
  61. package/dist/index192.js +5830 -99
  62. package/dist/index193.js +188 -16
  63. package/dist/index194.js +24 -7
  64. package/dist/index195.js +16 -76
  65. package/dist/index196.js +74 -249
  66. package/dist/index197.js +229 -13660
  67. package/dist/index198.js +13684 -27
  68. package/dist/index199.js +26 -62
  69. package/dist/index2.js +2 -2
  70. package/dist/index20.js +2 -2
  71. package/dist/index200.js +40 -215
  72. package/dist/index201.js +206 -276
  73. package/dist/index202.js +278 -258
  74. package/dist/index203.js +287 -32
  75. package/dist/index204.js +30 -113
  76. package/dist/index205.js +110 -30
  77. package/dist/index206.js +36 -26
  78. package/dist/index207.js +26 -36
  79. package/dist/index208.js +36 -9
  80. package/dist/index209.js +9 -19
  81. package/dist/index21.js +2 -2
  82. package/dist/index210.js +19 -10
  83. package/dist/index211.js +10 -10
  84. package/dist/index212.js +10 -51
  85. package/dist/index213.js +45 -37
  86. package/dist/index214.js +42 -3
  87. package/dist/index215.js +3 -38
  88. package/dist/index216.js +39 -21
  89. package/dist/index217.js +21 -127
  90. package/dist/index218.js +84 -34
  91. package/dist/index219.js +3 -3
  92. package/dist/index22.js +3 -3
  93. package/dist/index220.js +17 -75
  94. package/dist/index221.js +160 -19
  95. package/dist/index222.js +222 -82
  96. package/dist/index223.js +36 -19
  97. package/dist/index224.js +10 -20
  98. package/dist/index225.js +126 -19
  99. package/dist/index226.js +37 -19
  100. package/dist/index227.js +75 -17
  101. package/dist/index228.js +19 -160
  102. package/dist/index229.js +11 -11
  103. package/dist/index23.js +2 -2
  104. package/dist/index230.js +13 -15
  105. package/dist/index231.js +19 -198
  106. package/dist/index232.js +19 -69
  107. package/dist/index233.js +159 -32
  108. package/dist/index234.js +19 -39
  109. package/dist/index235.js +21 -160
  110. package/dist/index236.js +189 -218
  111. package/dist/index237.js +69 -36
  112. package/dist/index238.js +34 -10
  113. package/dist/index239.js +33 -3625
  114. package/dist/index24.js +2 -2
  115. package/dist/index240.js +22 -55
  116. package/dist/index241.js +22 -77
  117. package/dist/index242.js +20 -52
  118. package/dist/index243.js +822 -201
  119. package/dist/index244.js +702 -10
  120. package/dist/index245.js +174 -55
  121. package/dist/index246.js +22 -61
  122. package/dist/index247.js +20 -54
  123. package/dist/index248.js +20 -75
  124. package/dist/index249.js +3 -723
  125. package/dist/index25.js +53 -12
  126. package/dist/index250.js +182 -34
  127. package/dist/index251.js +128 -59
  128. package/dist/index252.js +1222 -10
  129. package/dist/index253.js +20 -705
  130. package/dist/index254.js +22 -820
  131. package/dist/index255.js +9 -9
  132. package/dist/index256.js +22 -15
  133. package/dist/index257.js +6 -6
  134. package/dist/index258.js +20 -836
  135. package/dist/index259.js +2 -702
  136. package/dist/index26.js +1 -1
  137. package/dist/index260.js +2 -176
  138. package/dist/index261.js +3632 -22
  139. package/dist/index262.js +55 -20
  140. package/dist/index263.js +77 -20
  141. package/dist/index264.js +52 -3
  142. package/dist/index265.js +208 -180
  143. package/dist/index266.js +10 -133
  144. package/dist/index267.js +51 -1217
  145. package/dist/index268.js +61 -20
  146. package/dist/index269.js +54 -22
  147. package/dist/index27.js +1 -1
  148. package/dist/index270.js +75 -22
  149. package/dist/index271.js +722 -28
  150. package/dist/index272.js +39 -20
  151. package/dist/index273.js +64 -20
  152. package/dist/index274.js +11 -2
  153. package/dist/index275.js +705 -2
  154. package/dist/index276.js +801 -234
  155. package/dist/index277.js +253 -8
  156. package/dist/index278.js +8 -138
  157. package/dist/index279.js +123 -68
  158. package/dist/index28.js +1 -1
  159. package/dist/index280.js +83 -2
  160. package/dist/index281.js +3 -79
  161. package/dist/index282.js +26 -53
  162. package/dist/index283.js +2 -26
  163. package/dist/index284.js +78 -21
  164. package/dist/index285.js +53 -21
  165. package/dist/index286.js +26 -16
  166. package/dist/index287.js +22 -17
  167. package/dist/index288.js +21 -22
  168. package/dist/index289.js +15 -261
  169. package/dist/index29.js +1 -1
  170. package/dist/index290.js +17 -6
  171. package/dist/index291.js +21 -138
  172. package/dist/index292.js +77 -71
  173. package/dist/index293.js +21 -86
  174. package/dist/index294.js +932 -26
  175. package/dist/index295.js +20 -14
  176. package/dist/index296.js +19 -74
  177. package/dist/index297.js +19 -3
  178. package/dist/index298.js +69 -2
  179. package/dist/index299.js +18 -82
  180. package/dist/index3.js +2 -2
  181. package/dist/index30.js +1 -1
  182. package/dist/index300.js +19 -53
  183. package/dist/index301.js +21 -5
  184. package/dist/index302.js +21 -4
  185. package/dist/index303.js +62 -178
  186. package/dist/index304.js +1509 -54
  187. package/dist/index305.js +385 -74
  188. package/dist/index306.js +2488 -1275
  189. package/dist/index307.js +70 -370
  190. package/dist/index308.js +3442 -2403
  191. package/dist/index309.js +51 -77
  192. package/dist/index31.js +1 -1
  193. package/dist/index310.js +13 -3768
  194. package/dist/index311.js +79 -55
  195. package/dist/index312.js +202 -15
  196. package/dist/index313.js +232 -70
  197. package/dist/index314.js +250 -190
  198. package/dist/index315.js +4 -244
  199. package/dist/index316.js +140 -3
  200. package/dist/index317.js +70 -24
  201. package/dist/index318.js +83 -75
  202. package/dist/index319.js +28 -21
  203. package/dist/index32.js +1 -1
  204. package/dist/index320.js +14 -933
  205. package/dist/index321.js +74 -21
  206. package/dist/index322.js +3 -19
  207. package/dist/index323.js +2 -20
  208. package/dist/index324.js +80 -66
  209. package/dist/index325.js +53 -19
  210. package/dist/index326.js +6 -19
  211. package/dist/index327.js +4 -21
  212. package/dist/index328.js +178 -21
  213. package/dist/index329.js +62 -62
  214. package/dist/index33.js +1 -1
  215. package/dist/index330.js +74 -36
  216. package/dist/index331.js +8 -18
  217. package/dist/index332.js +12 -56
  218. package/dist/index333.js +53 -27
  219. package/dist/index334.js +11 -6
  220. package/dist/index335.js +12 -50
  221. package/dist/index336.js +58 -7
  222. package/dist/index337.js +50 -10
  223. package/dist/index338.js +31 -7
  224. package/dist/index339.js +2 -28
  225. package/dist/index34.js +1 -1
  226. package/dist/index340.js +5 -2
  227. package/dist/index341.js +2 -70
  228. package/dist/index342.js +21 -165
  229. package/dist/index343.js +40 -8
  230. package/dist/index344.js +2 -13
  231. package/dist/index345.js +11 -55
  232. package/dist/index346.js +18 -10
  233. package/dist/index347.js +15 -12
  234. package/dist/index348.js +10 -58
  235. package/dist/index349.js +10 -52
  236. package/dist/index35.js +1 -1
  237. package/dist/index350.js +2 -31
  238. package/dist/index351.js +9 -2
  239. package/dist/index352.js +10 -5
  240. package/dist/index353.js +14 -2
  241. package/dist/index354.js +37 -23
  242. package/dist/index355.js +19 -40
  243. package/dist/index356.js +20 -2
  244. package/dist/index357.js +64 -11
  245. package/dist/index358.js +36 -19
  246. package/dist/index359.js +18 -16
  247. package/dist/index36.js +1 -1
  248. package/dist/index360.js +57 -10
  249. package/dist/index361.js +29 -10
  250. package/dist/index362.js +7 -2
  251. package/dist/index363.js +51 -8
  252. package/dist/index364.js +7 -10
  253. package/dist/index365.js +12 -14
  254. package/dist/index366.js +7 -20
  255. package/dist/index367.js +28 -20
  256. package/dist/index368.js +2 -64
  257. package/dist/index369.js +70 -37
  258. package/dist/index37.js +47 -17
  259. package/dist/index370.js +164 -28
  260. package/dist/index371.js +17 -11
  261. package/dist/index372.js +98 -4
  262. package/dist/index373.js +100 -3
  263. package/dist/index374.js +91 -13
  264. package/dist/index375.js +31 -7
  265. package/dist/index376.js +10 -11
  266. package/dist/index377.js +3 -4
  267. package/dist/index378.js +4 -33
  268. package/dist/index379.js +12 -30
  269. package/dist/index38.js +15 -43
  270. package/dist/index380.js +7 -28
  271. package/dist/index381.js +12 -61
  272. package/dist/index382.js +5 -98
  273. package/dist/index383.js +33 -101
  274. package/dist/index384.js +31 -91
  275. package/dist/index385.js +27 -16
  276. package/dist/index386.js +61 -3
  277. package/dist/index387.js +3 -2
  278. package/dist/index388.js +2 -2
  279. package/dist/index389.js +2 -17
  280. package/dist/index39.js +42 -67
  281. package/dist/index390.js +15 -11
  282. package/dist/index391.js +13 -6
  283. package/dist/index392.js +6 -32
  284. package/dist/index393.js +34 -0
  285. package/dist/index4.js +2 -2
  286. package/dist/index40.js +66 -26
  287. package/dist/index41.js +25 -32
  288. package/dist/index42.js +32 -37
  289. package/dist/index43.js +37 -1298
  290. package/dist/index44.js +1273 -337
  291. package/dist/index45.js +357 -145
  292. package/dist/index46.js +155 -18
  293. package/dist/index47.js +16 -42
  294. package/dist/index48.js +44 -68
  295. package/dist/index49.js +67 -61
  296. package/dist/index5.js +2 -2
  297. package/dist/index50.js +57 -175
  298. package/dist/index51.js +173 -77
  299. package/dist/index52.js +79 -200
  300. package/dist/index53.js +206 -68
  301. package/dist/index54.js +69 -20
  302. package/dist/index55.js +20 -11
  303. package/dist/index56.js +10 -6
  304. package/dist/index57.js +5 -209
  305. package/dist/index58.js +210 -12
  306. package/dist/index59.js +12 -184
  307. package/dist/index6.js +2 -2
  308. package/dist/index60.js +176 -68
  309. package/dist/index61.js +79 -0
  310. package/dist/index63.js +7 -63
  311. package/dist/index64.js +65 -0
  312. package/dist/index7.js +2 -2
  313. package/dist/{index71.js → index72.js} +2 -2
  314. package/dist/index76.js +40 -308
  315. package/dist/index77.js +330 -0
  316. package/dist/index8.js +3 -3
  317. package/dist/{index80.js → index81.js} +5 -5
  318. package/dist/{index82.js → index83.js} +1 -1
  319. package/dist/index85.js +23 -131
  320. package/dist/index86.js +144 -0
  321. package/dist/{index87.js → index88.js} +5 -5
  322. package/dist/index9.js +2 -2
  323. package/dist/{index89.js → index90.js} +5 -5
  324. package/dist/{index95.js → index96.js} +2 -2
  325. package/dist/index98.js +20 -25
  326. package/dist/index99.js +34 -0
  327. package/dist/src/components/footer-actions/footer-actions.stories.d.ts +33 -1
  328. package/dist/src/components/footer-actions/footer-actions.vue.d.ts +29 -2
  329. package/dist/src/components/page-header/page-header.stories.d.ts +376 -0
  330. package/dist/src/components/page-header/page-header.vue.d.ts +41 -0
  331. package/dist/src/index.d.ts +1 -0
  332. package/package.json +1 -1
  333. package/src/assets/illustrations/app-icon-news.svg +1 -0
  334. package/dist/index102.js +0 -142
  335. package/dist/index162.js +0 -116
  336. package/dist/index178.js +0 -20
  337. package/dist/index191.js +0 -5940
  338. package/dist/index62.js +0 -9
  339. package/dist/index75.js +0 -62
  340. package/dist/index84.js +0 -36
  341. package/dist/index97.js +0 -29
  342. package/dist/src/components/footer-actions/footer-actions.d.ts +0 -3
  343. /package/dist/{index134.js → index135.js} +0 -0
  344. /package/dist/{index138.js → index139.js} +0 -0
  345. /package/dist/{index146.js → index147.js} +0 -0
  346. /package/dist/{index148.js → index149.js} +0 -0
  347. /package/dist/{index150.js → index151.js} +0 -0
  348. /package/dist/{index65.js → index66.js} +0 -0
  349. /package/dist/{index67.js → index68.js} +0 -0
  350. /package/dist/{index69.js → index70.js} +0 -0
  351. /package/dist/{index73.js → index74.js} +0 -0
  352. /package/dist/{index78.js → index79.js} +0 -0
  353. /package/dist/{index91.js → index92.js} +0 -0
  354. /package/dist/{index93.js → index94.js} +0 -0
package/dist/index172.js CHANGED
@@ -1,1310 +1,774 @@
1
- import st from "./index203.js";
2
- import { reactive as V, watch as h, ref as g, defineComponent as Z, useSlots as H, h as K, Fragment as at, inject as ct, computed as A, toRaw as lt, unref as x } from "vue";
3
- import { unrefElement as ut, useIntersectionObserver as ft, useEventListener as m } from "./index204.js";
4
- import { tryOnUnmounted as pt, isObject as yt } from "./index205.js";
5
- import D, { getFrameData as dt } from "./index206.js";
6
- import { complex as $ } from "./index207.js";
7
- import { number as mt, alpha as C, scale as j } from "./index208.js";
8
- import { filter as P } from "./index209.js";
9
- import { px as c, progressPercentage as F, degrees as O } from "./index210.js";
10
- import { color as b } from "./index211.js";
11
- import { inertia as bt } from "./index212.js";
12
- import { animate as ht } from "./index213.js";
13
- import { velocityPerSecond as vt } from "./index214.js";
14
- import { cubicBezier as gt } from "./index215.js";
15
- import { bounceOut as Ot, bounceInOut as Tt, bounceIn as At, anticipate as xt, backOut as jt, backInOut as Vt, backIn as St, circOut as Ct, circInOut as Et, circIn as Nt, easeOut as Pt, easeInOut as _t, easeIn as wt, linear as Rt } from "./index216.js";
16
- const R = {};
17
- class Mt {
18
- subscriptions = /* @__PURE__ */ new Set();
19
- add(e) {
20
- return this.subscriptions.add(e), () => this.subscriptions.delete(e);
21
- }
22
- notify(e, i, r) {
23
- if (this.subscriptions.size)
24
- for (const n of this.subscriptions) n(e, i, r);
25
- }
26
- clear() {
27
- this.subscriptions.clear();
1
+ import { ref as Z, getCurrentInstance as tt, onMounted as et, onUnmounted as st, unref as w, nextTick as nt } from "vue";
2
+ function rt() {
3
+ try {
4
+ return "constructor" in GestureEvent;
5
+ } catch {
6
+ return !1;
28
7
  }
29
8
  }
30
- function z(t) {
31
- return !Number.isNaN(Number.parseFloat(t));
9
+ function j() {
10
+ return typeof window < "u" && "ontouchstart" in window;
32
11
  }
33
- class Lt {
34
- /**
35
- * The current state of the `MotionValue`.
36
- */
37
- current;
38
- /**
39
- * The previous state of the `MotionValue`.
40
- */
41
- prev;
42
- /**
43
- * Duration, in milliseconds, since last updating frame.
44
- */
45
- timeDelta = 0;
46
- /**
47
- * Timestamp of the last time this `MotionValue` was updated.
48
- */
49
- lastUpdated = 0;
50
- /**
51
- * Functions to notify when the `MotionValue` updates.
52
- */
53
- updateSubscribers = new Mt();
54
- /**
55
- * A reference to the currently-controlling Popmotion animation
56
- */
57
- stopAnimation;
58
- /**
59
- * Tracks whether this value can output a velocity.
60
- */
61
- canTrackVelocity = !1;
62
- /**
63
- * init - The initiating value
64
- * config - Optional configuration options
65
- */
66
- constructor(e) {
67
- this.prev = this.current = e, this.canTrackVelocity = z(this.current);
68
- }
69
- /**
70
- * Adds a function that will be notified when the `MotionValue` is updated.
71
- *
72
- * It returns a function that, when called, will cancel the subscription.
73
- */
74
- onChange(e) {
75
- return this.updateSubscribers.add(e);
76
- }
77
- clearListeners() {
78
- this.updateSubscribers.clear();
79
- }
80
- /**
81
- * Sets the state of the `MotionValue`.
82
- *
83
- * @param v
84
- * @param render
85
- */
86
- set(e) {
87
- this.updateAndNotify(e);
88
- }
89
- /**
90
- * Update and notify `MotionValue` subscribers.
91
- *
92
- * @param v
93
- * @param render
94
- */
95
- updateAndNotify = (e) => {
96
- this.prev = this.current, this.current = e;
97
- const { delta: i, timestamp: r } = dt();
98
- this.lastUpdated !== r && (this.timeDelta = i, this.lastUpdated = r), D.postRender(this.scheduleVelocityCheck), this.updateSubscribers.notify(this.current);
99
- };
100
- /**
101
- * Returns the latest state of `MotionValue`
102
- *
103
- * @returns - The latest state of `MotionValue`
104
- */
105
- get() {
106
- return this.current;
107
- }
108
- /**
109
- * Get previous value.
110
- *
111
- * @returns - The previous latest state of `MotionValue`
112
- */
113
- getPrevious() {
114
- return this.prev;
115
- }
116
- /**
117
- * Returns the latest velocity of `MotionValue`
118
- *
119
- * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
120
- */
121
- getVelocity() {
122
- return this.canTrackVelocity ? vt(Number.parseFloat(this.current) - Number.parseFloat(this.prev), this.timeDelta) : 0;
123
- }
124
- /**
125
- * Schedule a velocity check for the next frame.
126
- */
127
- scheduleVelocityCheck = () => D.postRender(this.velocityCheck);
128
- /**
129
- * Updates `prev` with `current` if the value hasn't been updated this frame.
130
- * This ensures velocity calculations return `0`.
131
- */
132
- velocityCheck = ({ timestamp: e }) => {
133
- this.canTrackVelocity || (this.canTrackVelocity = z(this.current)), e !== this.lastUpdated && (this.prev = this.current);
134
- };
135
- /**
136
- * Registers a new animation to control this `MotionValue`. Only one
137
- * animation can drive a `MotionValue` at one time.
138
- */
139
- start(e) {
140
- return this.stop(), new Promise((i) => {
141
- const { stop: r } = e(i);
142
- this.stopAnimation = r;
143
- }).then(() => this.clearAnimation());
144
- }
145
- /**
146
- * Stop the currently active animation.
147
- */
148
- stop() {
149
- this.stopAnimation && this.stopAnimation(), this.clearAnimation();
150
- }
151
- /**
152
- * Returns `true` if this value is currently animating.
153
- */
154
- isAnimating() {
155
- return !!this.stopAnimation;
156
- }
157
- /**
158
- * Clear the current animation reference.
159
- */
160
- clearAnimation() {
161
- this.stopAnimation = null;
162
- }
163
- /**
164
- * Destroy and clean up subscribers to this `MotionValue`.
165
- */
166
- destroy() {
167
- this.updateSubscribers.clear(), this.stop();
168
- }
12
+ function V(e) {
13
+ return "pointerId" in e ? null : e.type === "touchend" ? e.changedTouches : e.targetTouches;
169
14
  }
170
- function kt(t) {
171
- return new Lt(t);
15
+ function Y(e) {
16
+ return Array.from(V(e)).map((t) => t.identifier);
172
17
  }
173
- const { isArray: qt } = Array;
174
- function Bt() {
175
- const t = g({}), e = (r) => {
176
- const n = (o) => {
177
- t.value[o] && (t.value[o].stop(), t.value[o].destroy(), delete t.value[o]);
178
- };
179
- r ? qt(r) ? r.forEach(n) : n(r) : Object.keys(t.value).forEach(n);
180
- }, i = (r, n, o) => {
181
- if (t.value[r])
182
- return t.value[r];
183
- const s = kt(n);
184
- return s.onChange((a) => o[r] = a), t.value[r] = s, s;
185
- };
186
- return pt(e), {
187
- motionValues: t,
188
- get: i,
189
- stop: e
190
- };
18
+ function L(e) {
19
+ const t = "buttons" in e ? e.buttons : 0, { shiftKey: s, altKey: n, metaKey: r, ctrlKey: i } = e;
20
+ return { buttons: t, shiftKey: s, altKey: n, metaKey: r, ctrlKey: i };
191
21
  }
192
- function Dt(t) {
193
- return Array.isArray(t);
22
+ const it = (e) => e;
23
+ function G(e, t = it) {
24
+ const s = V(e), { clientX: n, clientY: r } = s ? s[0] : e;
25
+ return t([n, r]);
194
26
  }
195
- function T() {
196
- return {
197
- type: "spring",
198
- stiffness: 500,
199
- damping: 25,
200
- restDelta: 0.5,
201
- restSpeed: 10
202
- };
27
+ function $() {
203
28
  }
204
- function E(t) {
205
- return {
206
- type: "spring",
207
- stiffness: 550,
208
- damping: t === 0 ? 2 * Math.sqrt(550) : 30,
209
- restDelta: 0.01,
210
- restSpeed: 10
29
+ function F(...e) {
30
+ return e.length === 0 ? $ : e.length === 1 ? e[0] : function() {
31
+ var t;
32
+ for (let s of e)
33
+ t = s.apply(this, arguments) || t;
34
+ return t;
211
35
  };
212
36
  }
213
- function Ft(t) {
214
- return {
215
- type: "spring",
216
- stiffness: 550,
217
- damping: t === 0 ? 100 : 30,
218
- restDelta: 0.01,
219
- restSpeed: 10
220
- };
37
+ function g(e, t) {
38
+ if (e === void 0) {
39
+ if (t === void 0)
40
+ throw new Error("Must define fallback value if undefined is expected");
41
+ e = t;
42
+ }
43
+ return Array.isArray(e) ? e : [e, e];
221
44
  }
222
- function N() {
223
- return {
224
- type: "keyframes",
225
- ease: "linear",
226
- duration: 300
227
- };
45
+ function K(e, ...t) {
46
+ return typeof e == "function" ? e(...t) : e;
228
47
  }
229
- function zt(t) {
48
+ function _(e) {
230
49
  return {
231
- type: "keyframes",
232
- duration: 800,
233
- values: t
50
+ _active: !1,
51
+ _blocked: !1,
52
+ _intentional: [!1, !1],
53
+ _movement: [0, 0],
54
+ _initial: [0, 0],
55
+ _bounds: [
56
+ [-1 / 0, 1 / 0],
57
+ [-1 / 0, 1 / 0]
58
+ ],
59
+ _lastEventType: void 0,
60
+ _dragStarted: !1,
61
+ _dragPreventScroll: !1,
62
+ _dragIsTap: !0,
63
+ _dragDelayed: !1,
64
+ event: void 0,
65
+ intentional: !1,
66
+ values: [0, 0],
67
+ velocities: [0, 0],
68
+ delta: [0, 0],
69
+ movement: [0, 0],
70
+ offset: [0, 0],
71
+ lastOffset: [0, 0],
72
+ direction: [0, 0],
73
+ initial: [0, 0],
74
+ previous: [0, 0],
75
+ first: !1,
76
+ last: !1,
77
+ active: !1,
78
+ timeStamp: 0,
79
+ startTime: 0,
80
+ elapsedTime: 0,
81
+ cancel: $,
82
+ canceled: !1,
83
+ memo: void 0,
84
+ args: void 0,
85
+ ...e
234
86
  };
235
87
  }
236
- const I = {
237
- default: Ft,
238
- x: T,
239
- y: T,
240
- z: T,
241
- rotate: T,
242
- rotateX: T,
243
- rotateY: T,
244
- rotateZ: T,
245
- scaleX: E,
246
- scaleY: E,
247
- scale: E,
248
- backgroundColor: N,
249
- color: N,
250
- opacity: N
251
- };
252
- function G(t, e) {
253
- let i;
254
- return Dt(e) ? i = zt : i = I[t] || I.default, { to: e, ...i(e) };
255
- }
256
- const U = {
257
- ...mt,
258
- transform: Math.round
259
- }, J = {
260
- // Color props
261
- color: b,
262
- backgroundColor: b,
263
- outlineColor: b,
264
- fill: b,
265
- stroke: b,
266
- // Border props
267
- borderColor: b,
268
- borderTopColor: b,
269
- borderRightColor: b,
270
- borderBottomColor: b,
271
- borderLeftColor: b,
272
- borderWidth: c,
273
- borderTopWidth: c,
274
- borderRightWidth: c,
275
- borderBottomWidth: c,
276
- borderLeftWidth: c,
277
- borderRadius: c,
278
- radius: c,
279
- borderTopLeftRadius: c,
280
- borderTopRightRadius: c,
281
- borderBottomRightRadius: c,
282
- borderBottomLeftRadius: c,
283
- // Positioning props
284
- width: c,
285
- maxWidth: c,
286
- height: c,
287
- maxHeight: c,
288
- size: c,
289
- top: c,
290
- right: c,
291
- bottom: c,
292
- left: c,
293
- // Spacing props
294
- padding: c,
295
- paddingTop: c,
296
- paddingRight: c,
297
- paddingBottom: c,
298
- paddingLeft: c,
299
- margin: c,
300
- marginTop: c,
301
- marginRight: c,
302
- marginBottom: c,
303
- marginLeft: c,
304
- // Transform props
305
- rotate: O,
306
- rotateX: O,
307
- rotateY: O,
308
- rotateZ: O,
309
- scale: j,
310
- scaleX: j,
311
- scaleY: j,
312
- scaleZ: j,
313
- skew: O,
314
- skewX: O,
315
- skewY: O,
316
- distance: c,
317
- translateX: c,
318
- translateY: c,
319
- translateZ: c,
320
- x: c,
321
- y: c,
322
- z: c,
323
- perspective: c,
324
- transformPerspective: c,
325
- opacity: C,
326
- originX: F,
327
- originY: F,
328
- originZ: c,
329
- // Misc
330
- zIndex: U,
331
- filter: P,
332
- WebkitFilter: P,
333
- // SVG
334
- fillOpacity: C,
335
- strokeOpacity: C,
336
- numOctaves: U
337
- }, M = (t) => J[t];
338
- function _(t, e) {
339
- return e && typeof t == "number" && e.transform ? e.transform(t) : t;
88
+ function P() {
89
+ const e = {
90
+ hovering: !1,
91
+ scrolling: !1,
92
+ wheeling: !1,
93
+ dragging: !1,
94
+ moving: !1,
95
+ pinching: !1,
96
+ touches: 0,
97
+ buttons: 0,
98
+ down: !1,
99
+ shiftKey: !1,
100
+ altKey: !1,
101
+ metaKey: !1,
102
+ ctrlKey: !1,
103
+ locked: !1
104
+ }, t = _({
105
+ _pointerId: void 0,
106
+ axis: void 0,
107
+ xy: [0, 0],
108
+ vxvy: [0, 0],
109
+ velocity: 0,
110
+ distance: 0,
111
+ tap: !1,
112
+ swipe: [0, 0]
113
+ }), s = _({
114
+ // @ts-expect-error when used _pointerIds we can assert its type will be [number, number]
115
+ _pointerIds: [],
116
+ da: [0, 0],
117
+ vdva: [0, 0],
118
+ // @ts-expect-error origin can never be passed as undefined in userland
119
+ origin: void 0,
120
+ turns: 0
121
+ }), n = _({
122
+ axis: void 0,
123
+ xy: [0, 0],
124
+ vxvy: [0, 0],
125
+ velocity: 0,
126
+ distance: 0
127
+ }), r = _({
128
+ axis: void 0,
129
+ xy: [0, 0],
130
+ vxvy: [0, 0],
131
+ velocity: 0,
132
+ distance: 0
133
+ }), i = _({
134
+ axis: void 0,
135
+ xy: [0, 0],
136
+ vxvy: [0, 0],
137
+ velocity: 0,
138
+ distance: 0
139
+ });
140
+ return { shared: e, drag: t, pinch: s, wheel: n, move: r, scroll: i };
141
+ }
142
+ var ot = Object.defineProperty, at = (e, t, s) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, h = (e, t, s) => (at(e, typeof t != "symbol" ? t + "" : t, s), s);
143
+ class ct {
144
+ constructor(t) {
145
+ this.classes = t, h(this, "nativeRefs"), h(this, "config"), h(this, "handlers"), h(this, "state"), h(this, "timeouts"), h(this, "domListeners"), h(this, "windowListeners"), h(this, "pointerIds", /* @__PURE__ */ new Set()), h(this, "touchIds", /* @__PURE__ */ new Set()), h(this, "supportsTouchEvents", j()), h(this, "supportsGestureEvents", rt()), h(this, "bind", (...s) => {
146
+ const n = {};
147
+ for (let r of this.classes)
148
+ new r(this, s).addBindings(n);
149
+ for (let r in this.nativeRefs)
150
+ p(
151
+ n,
152
+ r,
153
+ (i) => this.nativeRefs[r]({ ...this.state.shared, event: i, args: s })
154
+ );
155
+ return this.config.domTarget ? pt(this, n) : gt(this, n);
156
+ }), h(this, "clean", () => {
157
+ const { eventOptions: s, domTarget: n } = this.config, r = w(n);
158
+ r && b(r, B(this.domListeners), s), Object.values(this.timeouts).forEach(clearTimeout), ft(this);
159
+ }), h(this, "reset", () => {
160
+ this.state = P();
161
+ }), this.classes = t, this.state = P(), this.timeouts = {}, this.domListeners = [], this.windowListeners = {};
162
+ }
163
+ }
164
+ function lt(e, t) {
165
+ "pointerId" in t ? e.pointerIds.add(t.pointerId) : e.touchIds = new Set(Y(t));
166
+ }
167
+ function ut(e, t) {
168
+ "pointerId" in t ? e.pointerIds.delete(t.pointerId) : Y(t).forEach((s) => e.touchIds.delete(s));
169
+ }
170
+ function ft(e) {
171
+ const {
172
+ config: { window: t, eventOptions: s },
173
+ windowListeners: n
174
+ } = e, r = w(t);
175
+ if (r) {
176
+ for (let i in n) {
177
+ const a = n[i];
178
+ b(r, a, s);
179
+ }
180
+ e.windowListeners = {};
181
+ }
340
182
  }
341
- function It(t, e) {
342
- let i = M(t);
343
- return i !== P && (i = $), i.getAnimatableNone ? i.getAnimatableNone(e) : void 0;
183
+ function ht({ config: e, windowListeners: t }, s, n = e.eventOptions) {
184
+ const r = w(e.window);
185
+ r && (b(r, t[s], n), delete t[s]);
344
186
  }
345
- const Ut = {
346
- linear: Rt,
347
- easeIn: wt,
348
- easeInOut: _t,
349
- easeOut: Pt,
350
- circIn: Nt,
351
- circInOut: Et,
352
- circOut: Ct,
353
- backIn: St,
354
- backInOut: Vt,
355
- backOut: jt,
356
- anticipate: xt,
357
- bounceIn: At,
358
- bounceInOut: Tt,
359
- bounceOut: Ot
360
- };
361
- function W(t) {
362
- if (Array.isArray(t)) {
363
- const [e, i, r, n] = t;
364
- return gt(e, i, r, n);
365
- } else if (typeof t == "string")
366
- return Ut[t];
367
- return t;
187
+ function dt({ config: e, windowListeners: t }, s, n = [], r = e.eventOptions) {
188
+ const i = w(e.window);
189
+ i && (b(i, t[s], r), X(i, t[s] = n, r));
368
190
  }
369
- function Wt(t) {
370
- return Array.isArray(t) && typeof t[0] != "number";
191
+ function pt({ config: e, domListeners: t }, s) {
192
+ const { eventOptions: n, domTarget: r } = e, i = w(r);
193
+ if (!i)
194
+ throw new Error("domTarget must be defined");
195
+ b(i, B(t), n);
196
+ for (let [a, o] of Object.entries(s)) {
197
+ const u = a.slice(2).toLowerCase();
198
+ t.push([u, F(...o)]);
199
+ }
200
+ X(i, t, n);
371
201
  }
372
- function X(t, e) {
373
- return t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && $.test(e) && !e.startsWith("url("));
202
+ function gt({ config: e }, t) {
203
+ const s = {}, n = e.eventOptions.capture ? "Capture" : "";
204
+ for (let [r, i] of Object.entries(t)) {
205
+ const a = Array.isArray(i) ? i : [i], o = r + n;
206
+ s[o] = F(...a);
207
+ }
208
+ return s;
374
209
  }
375
- function Xt(t) {
376
- return Array.isArray(t.to) && t.to[0] === null && (t.to = [...t.to], t.to[0] = t.from), t;
210
+ function B(e = []) {
211
+ return e.splice(0, e.length);
377
212
  }
378
- function Yt({ ease: t, times: e, delay: i, ...r }) {
379
- const n = { ...r };
380
- return e && (n.offset = e), t && (n.ease = Wt(t) ? t.map(W) : W(t)), i && (n.elapsed = -i), n;
213
+ function p(e, t, s) {
214
+ e[t] || (e[t] = []), e[t].push(s);
381
215
  }
382
- function Zt(t, e, i) {
383
- return Array.isArray(e.to) && (t.duration || (t.duration = 800)), Xt(e), Ht(t) || (t = {
384
- ...t,
385
- ...G(i, e.to)
386
- }), {
387
- ...e,
388
- ...Yt(t)
389
- };
216
+ function X(e, t = [], s = {}) {
217
+ if (e)
218
+ for (let [n, r] of t)
219
+ e.addEventListener(n, r, s);
390
220
  }
391
- function Ht({ delay: t, repeat: e, repeatType: i, repeatDelay: r, from: n, ...o }) {
392
- return !!Object.keys(o).length;
221
+ function b(e, t = [], s = {}) {
222
+ if (e)
223
+ for (let [n, r] of t)
224
+ e.removeEventListener(n, r, s);
393
225
  }
394
- function Kt(t, e) {
395
- return t[e] || t.default || t;
226
+ function x(e, t) {
227
+ return e.map((s, n) => s + t[n]);
396
228
  }
397
- function $t(t, e, i, r, n) {
398
- const o = Kt(r, t);
399
- let s = o.from === null || o.from === void 0 ? e.get() : o.from;
400
- const a = X(t, i);
401
- s === "none" && a && typeof i == "string" && (s = It(t, i));
402
- const l = X(t, s);
403
- function p(f) {
404
- const y = {
405
- from: s,
406
- to: i,
407
- velocity: r.velocity ? r.velocity : e.getVelocity(),
408
- onUpdate: (d) => e.set(d)
409
- };
410
- return o.type === "inertia" || o.type === "decay" ? bt({ ...y, ...o }) : ht({
411
- ...Zt(o, y, t),
412
- onUpdate: (d) => {
413
- y.onUpdate(d), o.onUpdate && o.onUpdate(d);
414
- },
415
- onComplete: () => {
416
- n && n(), f && f();
417
- }
418
- });
419
- }
420
- function u(f) {
421
- return e.set(i), n && n(), f && f(), { stop: () => {
422
- } };
423
- }
424
- return !l || !a || o.type === !1 ? u : p;
229
+ function H(e, t) {
230
+ return e.map((s, n) => s - t[n]);
425
231
  }
426
- function Gt() {
427
- const { motionValues: t, stop: e, get: i } = Bt();
428
- return { motionValues: t, stop: e, push: (n, o, s, a = {}, l) => {
429
- const p = s[n], u = i(n, p, s);
430
- if (a && a.immediate) {
431
- u.set(o);
432
- return;
433
- }
434
- const f = $t(n, u, o, a, l);
435
- u.start(f);
436
- } };
232
+ function C(e) {
233
+ return Math.hypot(...e);
437
234
  }
438
- function Jt(t, e = {}, { motionValues: i, push: r, stop: n } = Gt()) {
439
- const o = x(e), s = g(!1);
440
- h(
441
- i,
442
- (f) => {
443
- s.value = Object.values(f).filter((y) => y.isAnimating()).length > 0;
444
- },
445
- {
446
- immediate: !0,
447
- deep: !0
448
- }
449
- );
450
- const a = (f) => {
451
- if (!o || !o[f])
452
- throw new Error(`The variant ${f} does not exist.`);
453
- return o[f];
454
- }, l = (f) => {
455
- typeof f == "string" && (f = a(f));
456
- const y = Object.entries(f).map(([v, S]) => {
457
- if (v !== "transition")
458
- return new Promise(
459
- (ot) => (
460
- // @ts-expect-error - Fix errors later for typescript 5
461
- r(v, S, t, f.transition || G(v, f[v]), ot)
462
- )
463
- );
464
- }).filter(Boolean);
465
- async function d() {
466
- await Promise.all(y), f.transition?.onComplete?.();
467
- }
468
- return Promise.all([d()]);
469
- };
470
- return {
471
- isAnimating: s,
472
- apply: l,
473
- set: (f) => {
474
- const y = yt(f) ? f : a(f);
475
- Object.entries(y).forEach(([d, v]) => {
476
- d !== "transition" && r(d, v, t, {
477
- immediate: !0
478
- });
479
- });
480
- },
481
- leave: async (f) => {
482
- let y;
483
- if (o && (o.leave && (y = o.leave), !o.leave && o.initial && (y = o.initial)), !y) {
484
- f();
485
- return;
486
- }
487
- await l(y), f();
488
- },
489
- stop: n
490
- };
235
+ function mt(e, t, s) {
236
+ const n = C(t), r = n === 0 ? 0 : 1 / n, i = s === 0 ? 0 : 1 / s, a = i * n, o = t.map((c) => i * c), u = t.map((c) => r * c), f = C(e);
237
+ return { velocities: o, velocity: a, distance: f, direction: u };
491
238
  }
492
- const L = typeof window < "u", Qt = () => L && (window.onpointerdown === null || R?.TEST), te = () => L && (window.ontouchstart === null || R?.TEST), ee = () => L && (window.onmousedown === null || R?.TEST);
493
- function ie({ target: t, state: e, variants: i, apply: r }) {
494
- const n = x(i), o = g(!1), s = g(!1), a = g(!1), l = A(() => {
495
- let u = [...Object.keys(e.value || {})];
496
- return n && (n.hovered && (u = [...u, ...Object.keys(n.hovered)]), n.tapped && (u = [...u, ...Object.keys(n.tapped)]), n.focused && (u = [...u, ...Object.keys(n.focused)])), u;
497
- }), p = A(() => {
498
- const u = {};
499
- Object.assign(u, e.value), o.value && n.hovered && Object.assign(u, n.hovered), s.value && n.tapped && Object.assign(u, n.tapped), a.value && n.focused && Object.assign(u, n.focused);
500
- for (const f in u)
501
- l.value.includes(f) || delete u[f];
502
- return u;
503
- });
504
- n.hovered && (m(t, "mouseenter", () => o.value = !0), m(t, "mouseleave", () => {
505
- o.value = !1, s.value = !1;
506
- })), n.tapped && (ee() && (m(t, "mousedown", () => s.value = !0), m(t, "mouseup", () => s.value = !1)), Qt() && (m(t, "pointerdown", () => s.value = !0), m(t, "pointerup", () => s.value = !1)), te() && (m(t, "touchstart", () => s.value = !0), m(t, "touchend", () => s.value = !1))), n.focused && (m(t, "focus", () => a.value = !0), m(t, "blur", () => a.value = !1)), h([o, s, a], () => {
507
- r(p.value);
508
- });
239
+ function M(e) {
240
+ return Math.sign ? Math.sign(e) : +(e > 0) - +(e < 0) || +e;
509
241
  }
510
- function re({ set: t, target: e, variants: i, variant: r }) {
511
- const n = x(i);
512
- h(
513
- () => e,
514
- () => {
515
- n && (n.initial && (t("initial"), r.value = "initial"), n.enter && (r.value = "enter"));
516
- },
517
- {
518
- immediate: !0,
519
- flush: "pre"
520
- }
521
- );
242
+ function vt(e, t, s) {
243
+ return Math.max(t, Math.min(e, s));
522
244
  }
523
- function ne({ state: t, apply: e }) {
524
- h(
525
- t,
526
- (i) => {
527
- i && e(i);
528
- },
529
- {
530
- immediate: !0
531
- }
532
- );
245
+ function yt(e, t) {
246
+ return Math.pow(e, t * 5);
533
247
  }
534
- function oe({ target: t, variants: e, variant: i }) {
535
- const r = x(e);
536
- r && (r.visible || r.visibleOnce) && ft(t, ([{ isIntersecting: n }]) => {
537
- r.visible ? n ? i.value = "visible" : i.value = "initial" : r.visibleOnce && (n && i.value !== "visibleOnce" ? i.value = "visibleOnce" : i.value || (i.value = "initial"));
538
- });
248
+ function z(e, t, s) {
249
+ return t === 0 || Math.abs(t) === 1 / 0 ? yt(e, s) : e * t * s / (t + s * e);
539
250
  }
540
- function se(t, e = {
541
- syncVariants: !0,
542
- lifeCycleHooks: !0,
543
- visibilityHooks: !0,
544
- eventListeners: !0
545
- }) {
546
- e.lifeCycleHooks && re(t), e.syncVariants && ne(t), e.visibilityHooks && oe(t), e.eventListeners && ie(t);
251
+ function R(e, t, s, n = 0.15) {
252
+ return n === 0 ? vt(e, t, s) : e < t ? -z(t - e, s - t, n) + t : e > s ? +z(e - s, s - t, n) + s : e;
547
253
  }
548
- function Q(t = {}) {
549
- const e = V({
550
- ...t
551
- }), i = g({});
552
- return h(
553
- e,
554
- () => {
555
- const r = {};
556
- for (const [n, o] of Object.entries(e)) {
557
- const s = M(n), a = _(o, s);
558
- r[n] = a;
254
+ var _t = Object.defineProperty, wt = (e, t, s) => t in e ? _t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, T = (e, t, s) => (wt(e, typeof t != "symbol" ? t + "" : t, s), s);
255
+ const v = /* @__PURE__ */ new Map(), bt = (e) => e;
256
+ class St {
257
+ /**
258
+ * Creates an instance of a gesture recognizer.
259
+ * @param stateKey drag, move, pinch, etc.
260
+ * @param controller the controller attached to the gesture
261
+ * @param [args] the args that should be passed to the gesture handler
262
+ */
263
+ constructor(t, s = []) {
264
+ this.controller = t, this.args = s, T(this, "debounced", !0), T(this, "setTimeout", (n, r = 140, ...i) => {
265
+ clearTimeout(this.controller.timeouts[this.stateKey]), this.controller.timeouts[this.stateKey] = window.setTimeout(
266
+ n,
267
+ r,
268
+ ...i
269
+ );
270
+ }), T(this, "clearTimeout", () => {
271
+ clearTimeout(this.controller.timeouts[this.stateKey]);
272
+ }), T(this, "fireGestureHandler", (n = !1) => {
273
+ if (this.state._blocked)
274
+ return this.debounced || (this.state._active = !1, this.clean()), null;
275
+ if (!n && !this.state.intentional && !this.config.triggerAllEvents)
276
+ return null;
277
+ if (this.state.intentional) {
278
+ const u = this.state.active, f = this.state._active;
279
+ this.state.active = f, this.state.first = f && !u, this.state.last = u && !f, this.controller.state.shared[this.ingKey] = f;
559
280
  }
560
- i.value = r;
561
- },
562
- {
563
- immediate: !0,
564
- deep: !0
565
- }
566
- ), {
567
- state: e,
568
- style: i
281
+ const r = this.controller.pointerIds.size || this.controller.touchIds.size, i = this.controller.state.shared.buttons > 0 || r > 0, a = {
282
+ ...this.controller.state.shared,
283
+ ...this.state,
284
+ ...this.mapStateValues(this.state),
285
+ // Sets xy or da to the gesture state values
286
+ locked: !!document.pointerLockElement,
287
+ touches: r,
288
+ down: i
289
+ }, o = this.handler(a);
290
+ return this.state.memo = o !== void 0 ? o : this.state.memo, a;
291
+ }), this.controller = t, this.args = s;
292
+ }
293
+ // Returns the gesture config
294
+ get config() {
295
+ return this.controller.config[this.stateKey];
296
+ }
297
+ // Is the gesture enabled
298
+ get enabled() {
299
+ return this.controller.config.enabled && this.config.enabled;
300
+ }
301
+ // Returns the controller state for a given gesture
302
+ get state() {
303
+ return this.controller.state[this.stateKey];
304
+ }
305
+ // Returns the gesture handler
306
+ get handler() {
307
+ return this.controller.handlers[this.stateKey];
308
+ }
309
+ get transform() {
310
+ return this.config.transform || this.controller.config.transform || bt;
311
+ }
312
+ // Convenience method to update the shared state
313
+ updateSharedState(t) {
314
+ Object.assign(this.controller.state.shared, t);
315
+ }
316
+ // Convenience method to update the gesture state
317
+ updateGestureState(t) {
318
+ Object.assign(this.state, t);
319
+ }
320
+ /**
321
+ * Returns state properties depending on the movement and state.
322
+ *
323
+ * Should be overriden for custom behavior, doesn't do anything in the implementation
324
+ * below.
325
+ */
326
+ checkIntentionality(t, s) {
327
+ return { _intentional: t, _blocked: !1 };
328
+ }
329
+ /**
330
+ * Returns basic movement properties for the gesture based on the next values and current state.
331
+ */
332
+ getMovement(t) {
333
+ const { rubberband: s, threshold: n } = this.config, {
334
+ _bounds: r,
335
+ _initial: i,
336
+ _active: a,
337
+ _intentional: o,
338
+ lastOffset: u,
339
+ movement: f
340
+ } = this.state, c = this.getInternalMovement(t, this.state), S = this.transform(n).map(Math.abs), E = o[0] === !1 ? N(c[0], S[0]) : o[0], D = o[1] === !1 ? N(c[1], S[1]) : o[1], m = this.checkIntentionality([E, D], c);
341
+ if (m._blocked)
342
+ return { ...m, _movement: c, delta: [0, 0] };
343
+ const d = m._intentional, J = c;
344
+ let y = [
345
+ d[0] !== !1 ? c[0] - d[0] : 0,
346
+ d[1] !== !1 ? c[1] - d[1] : 0
347
+ ];
348
+ const Q = x(y, u), A = a ? s : [0, 0];
349
+ return y = W(r, x(y, i), A), {
350
+ ...m,
351
+ intentional: d[0] !== !1 || d[1] !== !1,
352
+ _initial: i,
353
+ _movement: J,
354
+ movement: y,
355
+ values: t,
356
+ offset: W(r, Q, A),
357
+ delta: H(y, f)
358
+ };
359
+ }
360
+ // Cleans the gesture. Can be overriden by gestures.
361
+ clean() {
362
+ this.clearTimeout();
363
+ }
364
+ }
365
+ function N(e, t) {
366
+ return Math.abs(e) >= t ? M(e) * t : !1;
367
+ }
368
+ function W(e, [t, s], [n, r]) {
369
+ const [[i, a], [o, u]] = e;
370
+ return [
371
+ R(t, i, a, n),
372
+ R(s, o, u, r)
373
+ ];
374
+ }
375
+ function O({ state: e }, t, s) {
376
+ const { timeStamp: n, type: r } = t, i = e.values, a = s ? 0 : n - e.startTime;
377
+ return { _lastEventType: r, event: t, timeStamp: n, elapsedTime: a, previous: i };
378
+ }
379
+ function Tt({ state: e, config: t, stateKey: s, args: n }, r, i) {
380
+ const a = e.offset, o = i.timeStamp, { initial: u, bounds: f } = t, c = {
381
+ ...P()[s],
382
+ _active: !0,
383
+ args: n,
384
+ values: r,
385
+ initial: r,
386
+ offset: a,
387
+ lastOffset: a,
388
+ startTime: o
569
389
  };
570
- }
571
- function k(t, e) {
572
- h(
573
- () => ut(t),
574
- (i) => {
575
- i && e(i);
576
- },
577
- {
578
- immediate: !0
579
- }
580
- );
581
- }
582
- const ae = {
583
- x: "translateX",
584
- y: "translateY",
585
- z: "translateZ"
586
- };
587
- function tt(t = {}, e = !0) {
588
- const i = V({ ...t }), r = g("");
589
- return h(
590
- i,
591
- (n) => {
592
- let o = "", s = !1;
593
- if (e && (n.x || n.y || n.z)) {
594
- const a = [n.x || 0, n.y || 0, n.z || 0].map((l) => _(l, c)).join(",");
595
- o += `translate3d(${a}) `, s = !0;
596
- }
597
- for (const [a, l] of Object.entries(n)) {
598
- if (e && (a === "x" || a === "y" || a === "z"))
599
- continue;
600
- const p = M(a), u = _(l, p);
601
- o += `${ae[a] || a}(${u}) `;
602
- }
603
- e && !s && (o += "translateZ(0px) "), r.value = o.trim();
604
- },
605
- {
606
- immediate: !0,
607
- deep: !0
608
- }
609
- ), {
610
- state: i,
611
- transform: r
390
+ return {
391
+ ...c,
392
+ _initial: K(u, c),
393
+ _bounds: K(f, c)
612
394
  };
613
395
  }
614
- const ce = ["", "X", "Y", "Z"], le = ["perspective", "translate", "scale", "rotate", "skew"], et = ["transformPerspective", "x", "y", "z"];
615
- le.forEach((t) => {
616
- ce.forEach((e) => {
617
- const i = t + e;
618
- et.push(i);
619
- });
620
- });
621
- const ue = new Set(et);
622
- function q(t) {
623
- return ue.has(t);
624
- }
625
- const fe = /* @__PURE__ */ new Set(["originX", "originY", "originZ"]);
626
- function it(t) {
627
- return fe.has(t);
628
- }
629
- function pe(t) {
630
- const e = {}, i = {};
631
- return Object.entries(t).forEach(([r, n]) => {
632
- q(r) || it(r) ? e[r] = n : i[r] = n;
633
- }), { transform: e, style: i };
634
- }
635
- function B(t) {
636
- const { transform: e, style: i } = pe(t), { transform: r } = tt(e), { style: n } = Q(i);
637
- return r.value && (n.value.transform = r.value), n.value;
638
- }
639
- function ye(t, e) {
640
- let i, r;
641
- const { state: n, style: o } = Q();
642
- return k(t, (s) => {
643
- r = s;
644
- for (const a of Object.keys(J))
645
- s.style[a] === null || s.style[a] === "" || q(a) || it(a) || (n[a] = s.style[a]);
646
- i && Object.entries(i).forEach(([a, l]) => s.style[a] = l), e && e(n);
647
- }), h(
648
- o,
649
- (s) => {
650
- if (!r) {
651
- i = s;
652
- return;
653
- }
654
- for (const a in s) r.style[a] = s[a];
655
- },
656
- {
657
- immediate: !0
396
+ class It extends St {
397
+ /**
398
+ * Returns the real movement (without taking intentionality into account)
399
+ */
400
+ getInternalMovement(t, s) {
401
+ return H(t, s.initial);
402
+ }
403
+ /**
404
+ * In coordinates-based gesture, this function will detect the first intentional axis,
405
+ * lock the gesture axis if lockDirection is specified in the config, block the gesture
406
+ * if the first intentional axis doesn't match the specified axis in config.
407
+ */
408
+ checkIntentionality(t, s) {
409
+ if (t[0] === !1 && t[1] === !1)
410
+ return { _intentional: t, axis: this.state.axis };
411
+ const [n, r] = s.map(Math.abs), i = this.state.axis || (n > r ? "x" : n < r ? "y" : void 0);
412
+ return !this.config.axis && !this.config.lockDirection ? { _intentional: t, _blocked: !1, axis: i } : i ? this.config.axis && i !== this.config.axis ? { _intentional: t, _blocked: !0, axis: i } : (t[i === "x" ? 1 : 0] = !1, { _intentional: t, _blocked: !1, axis: i }) : { _intentional: [!1, !1], _blocked: !1, axis: i };
413
+ }
414
+ getKinematics(t, s) {
415
+ const n = this.getMovement(t);
416
+ if (!n._blocked) {
417
+ const r = s.timeStamp - this.state.timeStamp;
418
+ Object.assign(
419
+ n,
420
+ mt(n.movement, n.delta, r)
421
+ );
658
422
  }
659
- ), {
660
- style: n
661
- };
423
+ return n;
424
+ }
425
+ mapStateValues(t) {
426
+ return { xy: t.values, vxvy: t.velocities };
427
+ }
662
428
  }
663
- function de(t) {
664
- const e = t.trim().split(/\) |\)/);
665
- if (e.length === 1)
666
- return {};
667
- const i = (r) => r.endsWith("px") || r.endsWith("deg") ? Number.parseFloat(r) : Number.isNaN(Number(r)) ? Number(r) : r;
668
- return e.reduce((r, n) => {
669
- if (!n)
670
- return r;
671
- const [o, s] = n.split("("), l = s.split(",").map((u) => i(u.endsWith(")") ? u.replace(")", "") : u.trim())), p = l.length === 1 ? l[0] : l;
672
- return {
673
- ...r,
674
- [o]: p
675
- };
676
- }, {});
429
+ var Et = Object.defineProperty, Dt = (e, t, s) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, l = (e, t, s) => (Dt(e, typeof t != "symbol" ? t + "" : t, s), s);
430
+ const Ot = 3;
431
+ function U(e) {
432
+ "persist" in e && typeof e.persist == "function" && e.persist();
677
433
  }
678
- function me(t, e) {
679
- Object.entries(de(e)).forEach(([i, r]) => {
680
- const n = ["x", "y", "z"];
681
- if (i === "translate3d") {
682
- if (r === 0) {
683
- n.forEach((o) => t[o] = 0);
434
+ class Pt extends It {
435
+ constructor() {
436
+ super(...arguments), l(this, "ingKey", "dragging"), l(this, "stateKey", "drag"), l(this, "setPointerCapture", (t) => {
437
+ if (this.config.useTouch || document.pointerLockElement)
684
438
  return;
439
+ const { target: s, pointerId: n } = t;
440
+ s && "setPointerCapture" in s && s.setPointerCapture(n), this.updateGestureState({
441
+ _dragTarget: s,
442
+ _dragPointerId: n
443
+ });
444
+ }), l(this, "releasePointerCapture", () => {
445
+ if (this.config.useTouch || document.pointerLockElement)
446
+ return;
447
+ const { _dragTarget: t, _dragPointerId: s } = this.state;
448
+ if (s && t && "releasePointerCapture" in t && (!("hasPointerCapture" in t) || t.hasPointerCapture(s)))
449
+ try {
450
+ t.releasePointerCapture(s);
451
+ } catch {
452
+ }
453
+ }), l(this, "preventScroll", (t) => {
454
+ this.state._dragPreventScroll && t.cancelable && t.preventDefault();
455
+ }), l(this, "getEventId", (t) => this.config.useTouch ? t.changedTouches[0].identifier : t.pointerId), l(this, "isValidEvent", (t) => this.state._pointerId === this.getEventId(t)), l(this, "shouldPreventWindowScrollY", this.config.preventWindowScrollY && this.controller.supportsTouchEvents), l(this, "setUpWindowScrollDetection", (t) => {
456
+ U(t), dt(
457
+ this.controller,
458
+ this.stateKey,
459
+ [
460
+ ["touchmove", this.preventScroll],
461
+ ["touchend", this.clean.bind(this)],
462
+ ["touchcancel", this.clean.bind(this)]
463
+ ],
464
+ { passive: !1 }
465
+ ), this.setTimeout(this.startDrag.bind(this), 250, t);
466
+ }), l(this, "setUpDelayedDragTrigger", (t) => {
467
+ this.state._dragDelayed = !0, U(t), this.setTimeout(this.startDrag.bind(this), this.config.delay, t);
468
+ }), l(this, "setStartState", (t) => {
469
+ const s = G(t, this.transform);
470
+ this.updateSharedState(L(t)), this.updateGestureState({
471
+ ...Tt(this, s, t),
472
+ ...O(this, t, !0),
473
+ _pointerId: this.getEventId(t)
474
+ // setting pointerId locks the gesture to this specific event
475
+ }), this.updateGestureState(this.getMovement(s));
476
+ }), l(this, "onDragStart", (t) => {
477
+ lt(this.controller, t), !(!this.enabled || this.state._active) && (this.setStartState(t), this.setPointerCapture(t), this.shouldPreventWindowScrollY ? this.setUpWindowScrollDetection(t) : this.config.delay > 0 ? this.setUpDelayedDragTrigger(t) : this.startDrag(t, !0));
478
+ }), l(this, "onDragChange", (t) => {
479
+ if (
480
+ // if the gesture was canceled or
481
+ this.state.canceled || // if onDragStart wasn't fired or
482
+ !this.state._active || // if the event pointerId doesn't match the one that initiated the drag
483
+ !this.isValidEvent(t) || // if the event has the same timestamp as the previous event
484
+ // note that checking type equality is ONLY for tests ¯\_(ツ)_/¯
485
+ this.state._lastEventType === t.type && t.timeStamp === this.state.timeStamp
486
+ )
487
+ return;
488
+ let s;
489
+ if (document.pointerLockElement) {
490
+ const { movementX: u, movementY: f } = t;
491
+ s = x(this.transform([u, f]), this.state.values);
492
+ } else
493
+ s = G(t, this.transform);
494
+ const n = this.getKinematics(s, t);
495
+ if (!this.state._dragStarted) {
496
+ if (this.state._dragDelayed) {
497
+ this.startDrag(t);
498
+ return;
499
+ }
500
+ if (this.shouldPreventWindowScrollY)
501
+ if (!this.state._dragPreventScroll && n.axis)
502
+ if (n.axis === "x")
503
+ this.startDrag(t);
504
+ else {
505
+ this.state._active = !1;
506
+ return;
507
+ }
508
+ else
509
+ return;
510
+ else
511
+ return;
685
512
  }
686
- r.forEach((o, s) => t[n[s]] = o);
687
- return;
513
+ const r = L(t);
514
+ this.updateSharedState(r);
515
+ const i = O(this, t), a = C(n._movement);
516
+ let { _dragIsTap: o } = this.state;
517
+ o && a >= Ot && (o = !1), this.updateGestureState({ ...i, ...n, _dragIsTap: o }), this.fireGestureHandler();
518
+ }), l(this, "onDragEnd", (t) => {
519
+ if (ut(this.controller, t), !this.isValidEvent(t) || (this.clean(), !this.state._active))
520
+ return;
521
+ this.state._active = !1;
522
+ const s = this.state._dragIsTap, [n, r] = this.state.velocities, [i, a] = this.state.movement, [o, u] = this.state._intentional, [f, c] = this.config.swipeVelocity, [S, E] = this.config.swipeDistance, D = this.config.swipeDuration, m = {
523
+ ...O(this, t),
524
+ ...this.getMovement(this.state.values)
525
+ }, d = [0, 0];
526
+ m.elapsedTime < D && (o !== !1 && Math.abs(n) > f && Math.abs(i) > S && (d[0] = M(n)), u !== !1 && Math.abs(r) > c && Math.abs(a) > E && (d[1] = M(r))), this.updateSharedState({ buttons: 0 }), this.updateGestureState({ ...m, tap: s, swipe: d }), this.fireGestureHandler(this.config.filterTaps && s === !0);
527
+ }), l(this, "clean", () => {
528
+ super.clean(), this.state._dragStarted = !1, this.releasePointerCapture(), ht(this.controller, this.stateKey);
529
+ }), l(this, "onCancel", () => {
530
+ this.state.canceled || (this.updateGestureState({ canceled: !0, _active: !1 }), this.updateSharedState({ buttons: 0 }), nt(this.fireGestureHandler));
531
+ }), l(this, "onClick", (t) => {
532
+ this.state._dragIsTap || t.stopPropagation();
533
+ });
534
+ }
535
+ startDrag(t, s = !1) {
536
+ // if the gesture isn't active (probably means)
537
+ !this.state._active || // if the drag has already started we should ignore subsequent attempts
538
+ this.state._dragStarted || (s || this.setStartState(t), this.updateGestureState({
539
+ _dragStarted: !0,
540
+ _dragPreventScroll: !0,
541
+ cancel: this.onCancel
542
+ }), this.clearTimeout(), this.fireGestureHandler());
543
+ }
544
+ addBindings(t) {
545
+ if (this.config.useTouch ? (p(t, "onTouchStart", this.onDragStart), p(t, "onTouchMove", this.onDragChange), p(t, "onTouchEnd", this.onDragEnd), p(t, "onTouchCancel", this.onDragEnd)) : (p(t, "onPointerDown", this.onDragStart), p(t, "onPointerMove", this.onDragChange), p(t, "onPointerUp", this.onDragEnd), p(t, "onPointerCancel", this.onDragEnd)), this.config.filterTaps) {
546
+ const s = this.controller.config.eventOptions.capture ? "onClick" : "onClickCapture";
547
+ p(t, s, this.onClick);
688
548
  }
689
- if (r = Number.parseFloat(`${r}`), i === "translateX") {
690
- t.x = r;
691
- return;
549
+ }
550
+ }
551
+ function xt(e, t) {
552
+ let s, n = [], r, i = !1;
553
+ function a(...o) {
554
+ return i && s === this && t(o, n) || (r = e.apply(this, o), i = !0, s = this, n = o), r;
555
+ }
556
+ return a;
557
+ }
558
+ function I(e, t) {
559
+ if (e === t)
560
+ return !0;
561
+ if (e && t && typeof e == "object" && typeof t == "object") {
562
+ if (e.constructor !== t.constructor)
563
+ return !1;
564
+ let s, n, r;
565
+ if (Array.isArray(e)) {
566
+ if (s = e.length, s !== t.length)
567
+ return !1;
568
+ for (n = s; n-- !== 0; )
569
+ if (!I(e[n], t[n]))
570
+ return !1;
571
+ return !0;
692
572
  }
693
- if (i === "translateY") {
694
- t.y = r;
695
- return;
573
+ let i;
574
+ if (typeof Map == "function" && e instanceof Map && t instanceof Map) {
575
+ if (e.size !== t.size)
576
+ return !1;
577
+ for (i = e.entries(); !(n = i.next()).done; )
578
+ if (!t.has(n.value[0]))
579
+ return !1;
580
+ for (i = e.entries(); !(n = i.next()).done; )
581
+ if (!I(n.value[1], t.get(n.value[0])))
582
+ return !1;
583
+ return !0;
696
584
  }
697
- if (i === "translateZ") {
698
- t.z = r;
699
- return;
585
+ if (typeof Set == "function" && e instanceof Set && t instanceof Set) {
586
+ if (e.size !== t.size)
587
+ return !1;
588
+ for (i = e.entries(); !(n = i.next()).done; )
589
+ if (!t.has(n.value[0]))
590
+ return !1;
591
+ return !0;
700
592
  }
701
- t[i] = r;
702
- });
703
- }
704
- function be(t, e) {
705
- let i, r;
706
- const { state: n, transform: o } = tt();
707
- return k(t, (s) => {
708
- r = s, s.style.transform && me(n, s.style.transform), i && (s.style.transform = i), e && e(n);
709
- }), h(
710
- o,
711
- (s) => {
712
- if (!r) {
713
- i = s;
714
- return;
715
- }
716
- r.style.transform = s;
717
- },
718
- {
719
- immediate: !0
593
+ if (e.constructor === RegExp)
594
+ return e.source === t.source && e.flags === t.flags;
595
+ if (e.valueOf !== Object.prototype.valueOf)
596
+ return e.valueOf() === t.valueOf();
597
+ if (e.toString !== Object.prototype.toString)
598
+ return e.toString() === t.toString();
599
+ if (r = Object.keys(e), s = r.length, s !== Object.keys(t).length)
600
+ return !1;
601
+ for (n = s; n-- !== 0; )
602
+ if (!Object.prototype.hasOwnProperty.call(t, r[n]))
603
+ return !1;
604
+ if (typeof Element < "u" && e instanceof Element)
605
+ return !1;
606
+ for (n = s; n-- !== 0; )
607
+ if (!(r[n] === "_owner" && e.$$typeof) && !I(e[r[n]], t[r[n]]))
608
+ return !1;
609
+ return !0;
610
+ }
611
+ return e !== e && t !== t;
612
+ }
613
+ function Ct(e, t) {
614
+ try {
615
+ return I(e, t);
616
+ } catch (s) {
617
+ if ((s.message || "").match(/stack|recursion/i))
618
+ return console.warn("react-fast-compare cannot handle circular refs"), !1;
619
+ throw s;
620
+ }
621
+ }
622
+ function k(e = {}, t) {
623
+ const s = {};
624
+ for (const [n, r] of Object.entries(t))
625
+ switch (typeof r) {
626
+ case "function":
627
+ s[n] = r.call(s, e[n], n, e);
628
+ break;
629
+ case "object":
630
+ s[n] = k(e[n], r);
631
+ break;
632
+ case "boolean":
633
+ r && (s[n] = e[n]);
634
+ break;
720
635
  }
721
- ), {
722
- transform: n
723
- };
724
- }
725
- function he(t) {
726
- return Object.entries(t);
727
- }
728
- function ve(t, e) {
729
- const i = V({}), r = (s) => Object.entries(s).forEach(([a, l]) => i[a] = l), { style: n } = ye(t, r), { transform: o } = be(t, r);
730
- return h(
731
- i,
732
- (s) => {
733
- he(s).forEach(([a, l]) => {
734
- const p = q(a) ? o : n;
735
- p[a] && p[a] === l || (p[a] = l);
736
- });
737
- },
738
- {
739
- immediate: !0,
740
- deep: !0
636
+ return s;
637
+ }
638
+ const Mt = 180, kt = 0.15, At = 0.5, Lt = 50, Gt = 250, Kt = {
639
+ threshold(e = 0) {
640
+ return g(e);
641
+ },
642
+ rubberband(e = 0) {
643
+ switch (e) {
644
+ case !0:
645
+ return g(kt);
646
+ case !1:
647
+ return g(0);
648
+ default:
649
+ return g(e);
741
650
  }
742
- ), k(t, () => e), {
743
- motionProperties: i,
744
- style: n,
745
- transform: o
746
- };
747
- }
748
- function ge(t = {}) {
749
- const e = x(t), i = g();
750
- return {
751
- state: A(() => {
752
- if (i.value)
753
- return e[i.value];
754
- }),
755
- variant: i
756
- };
757
- }
758
- function Oe(t, e = {}, i) {
759
- const { motionProperties: r } = ve(t), { variant: n, state: o } = ge(e), s = Jt(r, e), a = {
760
- target: t,
761
- variant: n,
762
- variants: e,
763
- state: o,
764
- motionProperties: r,
765
- ...s
766
- };
767
- return se(a, i), a;
768
- }
769
- const Te = {
770
- initial: {
771
- opacity: 0
772
- },
773
- enter: {
774
- opacity: 1
775
- }
776
- }, Ae = {
777
- initial: {
778
- opacity: 0
779
- },
780
- visible: {
781
- opacity: 1
782
- }
783
- }, xe = {
784
- initial: {
785
- opacity: 0
786
- },
787
- visibleOnce: {
788
- opacity: 1
789
- }
790
- }, je = {
791
- initial: {
792
- scale: 0,
793
- opacity: 0
794
- },
795
- enter: {
796
- scale: 1,
797
- opacity: 1
798
- }
799
- }, Ve = {
800
- initial: {
801
- scale: 0,
802
- opacity: 0
803
- },
804
- visible: {
805
- scale: 1,
806
- opacity: 1
807
- }
808
- }, Se = {
809
- initial: {
810
- scale: 0,
811
- opacity: 0
812
- },
813
- visibleOnce: {
814
- scale: 1,
815
- opacity: 1
816
- }
817
- }, Ce = {
818
- initial: {
819
- x: -100,
820
- rotate: 90,
821
- opacity: 0
822
- },
823
- enter: {
824
- x: 0,
825
- rotate: 0,
826
- opacity: 1
827
- }
828
- }, Ee = {
829
- initial: {
830
- x: -100,
831
- rotate: 90,
832
- opacity: 0
833
- },
834
- visible: {
835
- x: 0,
836
- rotate: 0,
837
- opacity: 1
838
- }
839
- }, Ne = {
840
- initial: {
841
- x: -100,
842
- rotate: 90,
843
- opacity: 0
844
- },
845
- visibleOnce: {
846
- x: 0,
847
- rotate: 0,
848
- opacity: 1
849
- }
850
- }, Pe = {
851
- initial: {
852
- x: 100,
853
- rotate: -90,
854
- opacity: 0
855
- },
856
- enter: {
857
- x: 0,
858
- rotate: 0,
859
- opacity: 1
860
- }
861
- }, _e = {
862
- initial: {
863
- x: 100,
864
- rotate: -90,
865
- opacity: 0
866
- },
867
- visible: {
868
- x: 0,
869
- rotate: 0,
870
- opacity: 1
871
- }
872
- }, we = {
873
- initial: {
874
- x: 100,
875
- rotate: -90,
876
- opacity: 0
877
- },
878
- visibleOnce: {
879
- x: 0,
880
- rotate: 0,
881
- opacity: 1
882
- }
883
- }, Re = {
884
- initial: {
885
- y: -100,
886
- rotate: -90,
887
- opacity: 0
888
- },
889
- enter: {
890
- y: 0,
891
- rotate: 0,
892
- opacity: 1
893
- }
894
- }, Me = {
895
- initial: {
896
- y: -100,
897
- rotate: -90,
898
- opacity: 0
899
- },
900
- visible: {
901
- y: 0,
902
- rotate: 0,
903
- opacity: 1
904
- }
905
- }, Le = {
906
- initial: {
907
- y: -100,
908
- rotate: -90,
909
- opacity: 0
910
- },
911
- visibleOnce: {
912
- y: 0,
913
- rotate: 0,
914
- opacity: 1
915
- }
916
- }, ke = {
917
- initial: {
918
- y: 100,
919
- rotate: 90,
920
- opacity: 0
921
651
  },
922
- enter: {
923
- y: 0,
924
- rotate: 0,
925
- opacity: 1
926
- }
927
- }, qe = {
928
- initial: {
929
- y: 100,
930
- rotate: 90,
931
- opacity: 0
932
- },
933
- visible: {
934
- y: 0,
935
- rotate: 0,
936
- opacity: 1
937
- }
938
- }, Be = {
939
- initial: {
940
- y: 100,
941
- rotate: 90,
942
- opacity: 0
943
- },
944
- visibleOnce: {
945
- y: 0,
946
- rotate: 0,
947
- opacity: 1
948
- }
949
- }, De = {
950
- initial: {
951
- x: -100,
952
- opacity: 0
953
- },
954
- enter: {
955
- x: 0,
956
- opacity: 1
957
- }
958
- }, Fe = {
959
- initial: {
960
- x: -100,
961
- opacity: 0
962
- },
963
- visible: {
964
- x: 0,
965
- opacity: 1
966
- }
967
- }, ze = {
968
- initial: {
969
- x: -100,
970
- opacity: 0
971
- },
972
- visibleOnce: {
973
- x: 0,
974
- opacity: 1
975
- }
976
- }, Ie = {
977
- initial: {
978
- x: 100,
979
- opacity: 0
980
- },
981
- enter: {
982
- x: 0,
983
- opacity: 1
984
- }
985
- }, Ue = {
986
- initial: {
987
- x: 100,
988
- opacity: 0
989
- },
990
- visible: {
991
- x: 0,
992
- opacity: 1
993
- }
994
- }, We = {
995
- initial: {
996
- x: 100,
997
- opacity: 0
998
- },
999
- visibleOnce: {
1000
- x: 0,
1001
- opacity: 1
1002
- }
1003
- }, Xe = {
1004
- initial: {
1005
- y: -100,
1006
- opacity: 0
1007
- },
1008
- enter: {
1009
- y: 0,
1010
- opacity: 1
1011
- }
1012
- }, Ye = {
1013
- initial: {
1014
- y: -100,
1015
- opacity: 0
1016
- },
1017
- visible: {
1018
- y: 0,
1019
- opacity: 1
1020
- }
1021
- }, Ze = {
1022
- initial: {
1023
- y: -100,
1024
- opacity: 0
1025
- },
1026
- visibleOnce: {
1027
- y: 0,
1028
- opacity: 1
1029
- }
1030
- }, He = {
1031
- initial: {
1032
- y: 100,
1033
- opacity: 0
1034
- },
1035
- enter: {
1036
- y: 0,
1037
- opacity: 1
1038
- }
1039
- }, Ke = {
1040
- initial: {
1041
- y: 100,
1042
- opacity: 0
1043
- },
1044
- visible: {
1045
- y: 0,
1046
- opacity: 1
1047
- }
1048
- }, $e = {
1049
- initial: {
1050
- y: 100,
1051
- opacity: 0
652
+ enabled(e = !0) {
653
+ return e;
1052
654
  },
1053
- visibleOnce: {
1054
- y: 0,
1055
- opacity: 1
1056
- }
1057
- }, Y = {
1058
- __proto__: null,
1059
- fade: Te,
1060
- fadeVisible: Ae,
1061
- fadeVisibleOnce: xe,
1062
- pop: je,
1063
- popVisible: Ve,
1064
- popVisibleOnce: Se,
1065
- rollBottom: ke,
1066
- rollLeft: Ce,
1067
- rollRight: Pe,
1068
- rollTop: Re,
1069
- rollVisibleBottom: qe,
1070
- rollVisibleLeft: Ee,
1071
- rollVisibleOnceBottom: Be,
1072
- rollVisibleOnceLeft: Ne,
1073
- rollVisibleOnceRight: we,
1074
- rollVisibleOnceTop: Le,
1075
- rollVisibleRight: _e,
1076
- rollVisibleTop: Me,
1077
- slideBottom: He,
1078
- slideLeft: De,
1079
- slideRight: Ie,
1080
- slideTop: Xe,
1081
- slideVisibleBottom: Ke,
1082
- slideVisibleLeft: Fe,
1083
- slideVisibleOnceBottom: $e,
1084
- slideVisibleOnceLeft: ze,
1085
- slideVisibleOnceRight: We,
1086
- slideVisibleOnceTop: Ze,
1087
- slideVisibleRight: Ue,
1088
- slideVisibleTop: Ye
1089
- }, Ge = /* @__PURE__ */ Symbol(
1090
- ""
1091
- ), rt = {
1092
- // Preset to be loaded
1093
- preset: {
1094
- type: String,
1095
- required: !1
655
+ triggerAllEvents(e = !1) {
656
+ return e;
1096
657
  },
1097
- // Instance
1098
- instance: {
1099
- type: Object,
1100
- required: !1
658
+ initial(e = 0) {
659
+ return typeof e == "function" ? e : g(e);
1101
660
  },
1102
- // Variants
1103
- variants: {
1104
- type: Object,
1105
- required: !1
661
+ transform: !0
662
+ }, q = {
663
+ ...Kt,
664
+ axis: !0,
665
+ lockDirection(e = !1) {
666
+ return e;
1106
667
  },
1107
- // Initial variant
1108
- initial: {
1109
- type: Object,
1110
- required: !1
668
+ bounds(e = {}) {
669
+ if (typeof e == "function")
670
+ return (i) => q.bounds(e(i));
671
+ const {
672
+ left: t = -1 / 0,
673
+ right: s = 1 / 0,
674
+ top: n = -1 / 0,
675
+ bottom: r = 1 / 0
676
+ } = e;
677
+ return [
678
+ [t, s],
679
+ [n, r]
680
+ ];
681
+ }
682
+ }, zt = typeof window < "u" && window.document && window.document.createElement, Rt = {
683
+ enabled(e = !0) {
684
+ return e;
1111
685
  },
1112
- // Lifecycle hooks variants
1113
- enter: {
1114
- type: Object,
1115
- required: !1
686
+ domTarget: !0,
687
+ window(e = zt ? window : void 0) {
688
+ return e;
1116
689
  },
1117
- leave: {
1118
- type: Object,
1119
- required: !1
690
+ eventOptions({ passive: e = !0, capture: t = !1 } = {}) {
691
+ return { passive: e, capture: t };
1120
692
  },
1121
- // Intersection observer variants
1122
- visible: {
1123
- type: Object,
1124
- required: !1
693
+ transform: !0
694
+ }, Nt = {
695
+ ...q,
696
+ useTouch(e = !0) {
697
+ return e && j();
1125
698
  },
1126
- visibleOnce: {
1127
- type: Object,
1128
- required: !1
699
+ preventWindowScrollY(e = !1) {
700
+ return e;
1129
701
  },
1130
- // Event listeners variants
1131
- hovered: {
1132
- type: Object,
1133
- required: !1
702
+ threshold(e, t, { filterTaps: s = !1, lockDirection: n = !1, axis: r = void 0 }) {
703
+ const i = g(
704
+ e,
705
+ s ? 3 : n || r ? 1 : 0
706
+ );
707
+ return this.filterTaps = s, i;
1134
708
  },
1135
- tapped: {
1136
- type: Object,
1137
- required: !1
709
+ swipeVelocity(e = At) {
710
+ return g(e);
1138
711
  },
1139
- focused: {
1140
- type: Object,
1141
- required: !1
712
+ swipeDistance(e = Lt) {
713
+ return g(e);
1142
714
  },
1143
- // Helpers
1144
- delay: {
1145
- type: [Number, String],
1146
- required: !1
715
+ swipeDuration(e = Gt) {
716
+ return e;
1147
717
  },
1148
- duration: {
1149
- type: [Number, String],
1150
- required: !1
718
+ delay(e = 0) {
719
+ switch (e) {
720
+ case !0:
721
+ return Mt;
722
+ case !1:
723
+ return 0;
724
+ default:
725
+ return e;
726
+ }
1151
727
  }
1152
728
  };
1153
- function Je(t) {
1154
- return Object.prototype.toString.call(t) === "[object Object]";
729
+ function Wt(e) {
730
+ return k(
731
+ e,
732
+ Rt
733
+ );
1155
734
  }
1156
- function w(t) {
1157
- if (Array.isArray(t))
1158
- return t.map(w);
1159
- if (Je(t)) {
1160
- const e = {};
1161
- for (const i in t)
1162
- e[i] = w(t[i]);
1163
- return e;
1164
- }
1165
- return t;
735
+ function Ut(e = {}) {
736
+ return k(
737
+ e,
738
+ Nt
739
+ );
1166
740
  }
1167
- function nt(t) {
1168
- const e = V({}), i = ct(Ge, {}), r = A(() => t.preset == null ? {} : i != null && t.preset in i ? structuredClone(lt(i)[t.preset]) : t.preset in Y ? structuredClone(Y[t.preset]) : {}), n = A(() => ({
1169
- initial: t.initial,
1170
- enter: t.enter,
1171
- leave: t.leave,
1172
- visible: t.visible,
1173
- visibleOnce: t.visibleOnce,
1174
- hovered: t.hovered,
1175
- tapped: t.tapped,
1176
- focused: t.focused
1177
- }));
1178
- function o(l, p) {
1179
- for (const u of ["delay", "duration"]) {
1180
- if (p[u] == null)
1181
- continue;
1182
- const f = Number.parseInt(
1183
- p[u]
1184
- );
1185
- for (const y of ["enter", "visible", "visibleOnce"]) {
1186
- const d = l[y];
1187
- d != null && (d.transition ??= {}, d.transition[u] = f);
1188
- }
1189
- }
1190
- return l;
1191
- }
1192
- const s = A(() => {
1193
- const l = st(
1194
- {},
1195
- n.value,
1196
- r.value,
1197
- t.variants || {}
1198
- );
1199
- return o({ ...l }, t);
741
+ function jt({
742
+ domTarget: e,
743
+ eventOptions: t,
744
+ window: s,
745
+ enabled: n,
746
+ ...r
747
+ }) {
748
+ const i = Wt({
749
+ domTarget: e,
750
+ eventOptions: t,
751
+ window: s,
752
+ enabled: n
1200
753
  });
1201
- function a(l, p, u) {
1202
- l.props ??= {}, l.props.style ??= {}, l.props.style = { ...l.props.style, ...u };
1203
- const f = o(
1204
- w(s.value),
1205
- l.props
1206
- );
1207
- return l.props.onVnodeMounted = ({ el: y }) => {
1208
- e[p] = Oe(
1209
- y,
1210
- f
1211
- );
1212
- }, l.props.onVnodeUpdated = ({ el: y }) => {
1213
- const d = B(e[p].state);
1214
- for (const [v, S] of Object.entries(d))
1215
- y.style[v] = S;
1216
- }, l;
1217
- }
1218
- return {
1219
- motionConfig: s,
1220
- setNodeInstance: a
1221
- };
754
+ return i.drag = Ut(r), i;
755
+ }
756
+ function Vt(e, t, s = {}) {
757
+ const n = Yt(e), r = new ct(n);
758
+ return r.config = t, r.handlers = e, r.nativeRefs = s, tt() && !t.manual && (et(r.bind), st(r.clean)), r;
759
+ }
760
+ function Yt(e) {
761
+ const t = /* @__PURE__ */ new Set();
762
+ return e.drag && t.add(v.get("drag")), e.wheel && t.add(v.get("wheel")), e.scroll && t.add(v.get("scroll")), e.move && t.add(v.get("move")), e.pinch && t.add(v.get("pinch")), e.hover && t.add(v.get("hover")), t;
763
+ }
764
+ function Ft(e, t = {}) {
765
+ v.set("drag", Pt);
766
+ const s = Z();
767
+ return s.value || (s.value = xt(jt, Ct)), Vt({ drag: e }, s.value(t));
1222
768
  }
1223
- Z({
1224
- name: "Motion",
1225
- props: {
1226
- ...rt,
1227
- is: {
1228
- type: [String, Object],
1229
- default: "div"
1230
- }
1231
- },
1232
- setup(t) {
1233
- const e = H(), { motionConfig: i, setNodeInstance: r } = nt(t);
1234
- return () => {
1235
- const n = B(i.value.initial || {}), o = K(t.is, void 0, e);
1236
- return r(o, 0, n), o;
1237
- };
1238
- }
1239
- });
1240
- Z({
1241
- name: "MotionGroup",
1242
- props: {
1243
- ...rt,
1244
- is: {
1245
- type: [String, Object],
1246
- required: !1
1247
- }
1248
- },
1249
- setup(t) {
1250
- const e = H(), { motionConfig: i, setNodeInstance: r } = nt(t);
1251
- return () => {
1252
- const n = B(i.value.initial || {}), o = e.default?.() || [];
1253
- for (let s = 0; s < o.length; s++) {
1254
- const a = o[s];
1255
- a.type === at && Array.isArray(a.children) ? a.children.forEach(function l(p, u) {
1256
- if (p != null) {
1257
- if (Array.isArray(p)) {
1258
- l(p, u);
1259
- return;
1260
- }
1261
- typeof p == "object" && r(p, u, n);
1262
- }
1263
- }) : r(a, s, n);
1264
- }
1265
- return t.is ? K(t.is, void 0, o) : o;
1266
- };
1267
- }
1268
- });
1269
769
  export {
1270
- Te as fade,
1271
- Ae as fadeVisible,
1272
- xe as fadeVisibleOnce,
1273
- je as pop,
1274
- Ve as popVisible,
1275
- Se as popVisibleOnce,
1276
- Q as reactiveStyle,
1277
- tt as reactiveTransform,
1278
- ke as rollBottom,
1279
- Ce as rollLeft,
1280
- Pe as rollRight,
1281
- Re as rollTop,
1282
- qe as rollVisibleBottom,
1283
- Ee as rollVisibleLeft,
1284
- Be as rollVisibleOnceBottom,
1285
- Ne as rollVisibleOnceLeft,
1286
- we as rollVisibleOnceRight,
1287
- Le as rollVisibleOnceTop,
1288
- _e as rollVisibleRight,
1289
- Me as rollVisibleTop,
1290
- He as slideBottom,
1291
- De as slideLeft,
1292
- Ie as slideRight,
1293
- Xe as slideTop,
1294
- Ke as slideVisibleBottom,
1295
- Fe as slideVisibleLeft,
1296
- $e as slideVisibleOnceBottom,
1297
- ze as slideVisibleOnceLeft,
1298
- We as slideVisibleOnceRight,
1299
- Ze as slideVisibleOnceTop,
1300
- Ue as slideVisibleRight,
1301
- Ye as slideVisibleTop,
1302
- ye as useElementStyle,
1303
- be as useElementTransform,
1304
- Oe as useMotion,
1305
- Jt as useMotionControls,
1306
- se as useMotionFeatures,
1307
- ve as useMotionProperties,
1308
- Gt as useMotionTransitions,
1309
- ge as useMotionVariants
770
+ x as addV,
771
+ R as rubberbandIfOutOfBounds,
772
+ H as subV,
773
+ Ft as useDrag
1310
774
  };