ics-ui-kit 0.1.0-alpha.12 → 0.1.0-alpha.13

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 (227) hide show
  1. package/dist/Button-DQtBfU9y.js +57 -0
  2. package/dist/Button-DQtBfU9y.js.map +1 -0
  3. package/dist/{Button-DhfE69q0.js → ButtonBase-BEM8SNmT.js} +27 -56
  4. package/dist/ButtonBase-BEM8SNmT.js.map +1 -0
  5. package/dist/CarouselItem-pSHe0ufN.js +1500 -0
  6. package/dist/CarouselItem-pSHe0ufN.js.map +1 -0
  7. package/dist/CheckboxField-i_-dPpFM.js +370 -0
  8. package/dist/CheckboxField-i_-dPpFM.js.map +1 -0
  9. package/dist/Divider-C0Ss5GJT.js +47 -0
  10. package/dist/{Divider-D3NvaU8c.js.map → Divider-C0Ss5GJT.js.map} +1 -1
  11. package/dist/Field-3XJNFTql.js +78 -0
  12. package/dist/Field-3XJNFTql.js.map +1 -0
  13. package/dist/FieldLabel-CAbVan3E.js +97 -0
  14. package/dist/FieldLabel-CAbVan3E.js.map +1 -0
  15. package/dist/FormBody-4HptEjhb.js +103 -0
  16. package/dist/FormBody-4HptEjhb.js.map +1 -0
  17. package/dist/{IconButton-BUPs2kEo.js → IconButton-BkBsOIf5.js} +15 -15
  18. package/dist/{IconButton-BUPs2kEo.js.map → IconButton-BkBsOIf5.js.map} +1 -1
  19. package/dist/ImagePlaceholder-CNAKQWTh.js +45 -0
  20. package/dist/ImagePlaceholder-CNAKQWTh.js.map +1 -0
  21. package/dist/ImagePreview-DHi7A8md.js +156 -0
  22. package/dist/ImagePreview-DHi7A8md.js.map +1 -0
  23. package/dist/ImageUploader-46sxdmt5.js +123 -0
  24. package/dist/ImageUploader-46sxdmt5.js.map +1 -0
  25. package/dist/IsolatedStylesWrapper-WgaoHh7y.js +179 -0
  26. package/dist/IsolatedStylesWrapper-WgaoHh7y.js.map +1 -0
  27. package/dist/Modal-D33MSQot.js +125 -0
  28. package/dist/Modal-D33MSQot.js.map +1 -0
  29. package/dist/ScrollShadowContainer-ByNH68Kg.js +636 -0
  30. package/dist/ScrollShadowContainer-ByNH68Kg.js.map +1 -0
  31. package/dist/Toggle-7AlEmn8A.js +104 -0
  32. package/dist/Toggle-7AlEmn8A.js.map +1 -0
  33. package/dist/ToggleGroup-CT453MNp.js +200 -0
  34. package/dist/ToggleGroup-CT453MNp.js.map +1 -0
  35. package/dist/Tooltip-C4BbGF2_.js +372 -0
  36. package/dist/Tooltip-C4BbGF2_.js.map +1 -0
  37. package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-LhQum_e3.js} +676 -425
  38. package/dist/bundle-mjs-LhQum_e3.js.map +1 -0
  39. package/dist/check-C-TqZgvb.js.map +1 -1
  40. package/dist/chevron-right-CobOebzi.js.map +1 -1
  41. package/dist/components/badge.js +1 -1
  42. package/dist/components/button/icon-button/IconButton.stories.d.ts +330 -2
  43. package/dist/components/button/loading-button/LoadingButton.d.ts +249 -0
  44. package/dist/components/button/loading-button/LoadingButton.stories.d.ts +219 -0
  45. package/dist/components/button.js +6 -5
  46. package/dist/components/button.js.map +1 -1
  47. package/dist/components/carousel.js +65 -1532
  48. package/dist/components/carousel.js.map +1 -1
  49. package/dist/components/checkbox.js +1 -1
  50. package/dist/components/divider/content-divider/ContentDivider.d.ts +14 -0
  51. package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
  52. package/dist/components/divider/index.d.ts +1 -0
  53. package/dist/components/divider.js +45 -2
  54. package/dist/components/divider.js.map +1 -1
  55. package/dist/components/drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts +3 -0
  56. package/dist/components/drawer.js +450 -447
  57. package/dist/components/drawer.js.map +1 -1
  58. package/dist/components/dropdown.js +37 -33
  59. package/dist/components/dropdown.js.map +1 -1
  60. package/dist/components/empty-state/EmptyState.d.ts +2 -2
  61. package/dist/components/empty-state.js +1 -1
  62. package/dist/components/empty-state.js.map +1 -1
  63. package/dist/components/field/Field.d.ts +35 -0
  64. package/dist/components/field.js +1 -1
  65. package/dist/components/form/components/form-header/FormHeader.d.ts +2 -2
  66. package/dist/components/form.js +289 -288
  67. package/dist/components/form.js.map +1 -1
  68. package/dist/components/gallery/Gallery.d.ts +21 -0
  69. package/dist/components/gallery/Gallery.stories.d.ts +26 -0
  70. package/dist/components/gallery/index.d.ts +1 -0
  71. package/dist/components/gallery.d.ts +2 -0
  72. package/dist/components/gallery.js +130 -0
  73. package/dist/components/gallery.js.map +1 -0
  74. package/dist/components/icon-tooltip/IconTooltip.d.ts +2 -1
  75. package/dist/components/image-placeholder.js +2 -42
  76. package/dist/components/image-placeholder.js.map +1 -1
  77. package/dist/components/image-preview/ImagePreview.d.ts +6 -6
  78. package/dist/components/image-preview.js +2 -136
  79. package/dist/components/image-preview.js.map +1 -1
  80. package/dist/components/image-uploader.js +2 -118
  81. package/dist/components/image-uploader.js.map +1 -1
  82. package/dist/components/input/file-input/FileInput.d.ts +3 -1
  83. package/dist/components/input-otp.js +1 -1
  84. package/dist/components/input-otp.js.map +1 -1
  85. package/dist/components/input.js +176 -195
  86. package/dist/components/input.js.map +1 -1
  87. package/dist/components/isolated-styles-wrapper/IsolatedStylesWrapper.d.ts +1 -1
  88. package/dist/components/label/Label.stories.d.ts +0 -2
  89. package/dist/components/label/field-label/FieldLabel.d.ts +11 -0
  90. package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
  91. package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
  92. package/dist/components/label.js +1 -1
  93. package/dist/components/loading/Loading.d.ts +4 -4
  94. package/dist/components/loading.js +2 -2
  95. package/dist/components/loading.js.map +1 -1
  96. package/dist/components/modal.js +12 -122
  97. package/dist/components/modal.js.map +1 -1
  98. package/dist/components/option-group.js +1 -1
  99. package/dist/components/popover.js +34 -31
  100. package/dist/components/popover.js.map +1 -1
  101. package/dist/components/scheduler.js +11 -11
  102. package/dist/components/scheduler.js.map +1 -1
  103. package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +1 -0
  104. package/dist/components/scroll-shadow-container.js +1 -1
  105. package/dist/components/select.js +487 -519
  106. package/dist/components/select.js.map +1 -1
  107. package/dist/components/shortcut/Shortcut.d.ts +14 -14
  108. package/dist/components/shortcut/Shortcut.stories.d.ts +7 -7
  109. package/dist/components/shortcut.js +16 -16
  110. package/dist/components/shortcut.js.map +1 -1
  111. package/dist/components/skeleton/Skeleton.d.ts +1 -0
  112. package/dist/components/skeleton/Skeleton.stories.d.ts +7 -0
  113. package/dist/components/skeleton/index.d.ts +1 -0
  114. package/dist/components/skeleton.d.ts +2 -0
  115. package/dist/components/skeleton.js +33 -0
  116. package/dist/components/skeleton.js.map +1 -0
  117. package/dist/components/switch.js +147 -126
  118. package/dist/components/switch.js.map +1 -1
  119. package/dist/components/tabs.js +9 -8
  120. package/dist/components/tabs.js.map +1 -1
  121. package/dist/components/tag.js +3 -3
  122. package/dist/components/toast.js +4 -4
  123. package/dist/components/toast.js.map +1 -1
  124. package/dist/components/toggle-group.js +1 -1
  125. package/dist/components/toggle.js +1 -1
  126. package/dist/components/tooltip/Tooltip.stories.d.ts +7 -0
  127. package/dist/components/tooltip/index.d.ts +1 -0
  128. package/dist/components/tooltip.d.ts +2 -0
  129. package/dist/components/tooltip.js +8 -0
  130. package/dist/components/tooltip.js.map +1 -0
  131. package/dist/createLucideIcon-DgrNxRV5.js.map +1 -1
  132. package/dist/design-tokens.source.json +1 -1
  133. package/dist/download-CVOGyQ0e.js.map +1 -1
  134. package/dist/downloadFile-yZV-aaO2.js +15 -0
  135. package/dist/downloadFile-yZV-aaO2.js.map +1 -0
  136. package/dist/index-B6K06mzp.js +67 -0
  137. package/dist/index-B6K06mzp.js.map +1 -0
  138. package/dist/index-BCZIl2rL.js +68 -0
  139. package/dist/index-BCZIl2rL.js.map +1 -0
  140. package/dist/index-BZPx6jYI.js.map +1 -1
  141. package/dist/index-Bj6ZBhqh.js +105 -0
  142. package/dist/index-Bj6ZBhqh.js.map +1 -0
  143. package/dist/index-ByaXH_ih.js.map +1 -1
  144. package/dist/index-CACw01gt.js +702 -0
  145. package/dist/index-CACw01gt.js.map +1 -0
  146. package/dist/index-COBL2CQB.js +14 -0
  147. package/dist/index-COBL2CQB.js.map +1 -0
  148. package/dist/index-CR-odn5-.js.map +1 -1
  149. package/dist/{index-BjbwEU_d.js → index-ClwWa5fz.js} +20 -20
  150. package/dist/index-ClwWa5fz.js.map +1 -0
  151. package/dist/{index-DwbC6luJ.js → index-Cx4x7Bv2.js} +52 -50
  152. package/dist/index-Cx4x7Bv2.js.map +1 -0
  153. package/dist/index-CzNelU6n.js +55 -0
  154. package/dist/index-CzNelU6n.js.map +1 -0
  155. package/dist/index-DBsc8nMF.js +43 -0
  156. package/dist/index-DBsc8nMF.js.map +1 -0
  157. package/dist/index-Mbnk_gHS.js +102 -0
  158. package/dist/index-Mbnk_gHS.js.map +1 -0
  159. package/dist/index-bhXb51Q1.js +215 -0
  160. package/dist/index-bhXb51Q1.js.map +1 -0
  161. package/dist/index-n71RB2rx.js +1592 -0
  162. package/dist/index-n71RB2rx.js.map +1 -0
  163. package/dist/index-rKs9bXHr.js +7 -0
  164. package/dist/index-rKs9bXHr.js.map +1 -0
  165. package/dist/lib/utils/file/downloadFile.d.ts +2 -0
  166. package/dist/lib/utils/image/imageConverter.d.ts +23 -0
  167. package/dist/styles-scoped.css +72 -18
  168. package/dist/styles.css +72 -18
  169. package/dist/{utils-DGzAmwok.js → utils-BK4mPzkB.js} +2 -2
  170. package/dist/utils-BK4mPzkB.js.map +1 -0
  171. package/dist/x-JgjNP5oH.js.map +1 -1
  172. package/package.json +1 -1
  173. package/dist/Button-DhfE69q0.js.map +0 -1
  174. package/dist/CheckboxField-CL1Tc7P4.js +0 -257
  175. package/dist/CheckboxField-CL1Tc7P4.js.map +0 -1
  176. package/dist/Divider-D3NvaU8c.js +0 -46
  177. package/dist/Field-COOo8o9f.js +0 -80
  178. package/dist/Field-COOo8o9f.js.map +0 -1
  179. package/dist/FieldLabel-BGxT_RaE.js +0 -64
  180. package/dist/FieldLabel-BGxT_RaE.js.map +0 -1
  181. package/dist/FormBody-DM52shm4.js +0 -101
  182. package/dist/FormBody-DM52shm4.js.map +0 -1
  183. package/dist/IsolatedStylesWrapper-B_Qu75eR.js +0 -555
  184. package/dist/IsolatedStylesWrapper-B_Qu75eR.js.map +0 -1
  185. package/dist/ScrollShadowContainer-DSKr3_fV.js +0 -690
  186. package/dist/ScrollShadowContainer-DSKr3_fV.js.map +0 -1
  187. package/dist/Toggle-BuYtICWv.js +0 -129
  188. package/dist/Toggle-BuYtICWv.js.map +0 -1
  189. package/dist/ToggleGroup-CMyUAz04.js +0 -467
  190. package/dist/ToggleGroup-CMyUAz04.js.map +0 -1
  191. package/dist/bundle-mjs-D6wdQkGI.js.map +0 -1
  192. package/dist/floating-ui.react-dom-CWfR7VfF.js +0 -1346
  193. package/dist/floating-ui.react-dom-CWfR7VfF.js.map +0 -1
  194. package/dist/index-0WznJ1QS.js +0 -276
  195. package/dist/index-0WznJ1QS.js.map +0 -1
  196. package/dist/index-BjbwEU_d.js.map +0 -1
  197. package/dist/index-BqriTm0o.js +0 -47
  198. package/dist/index-BqriTm0o.js.map +0 -1
  199. package/dist/index-C6bvrqL8.js +0 -563
  200. package/dist/index-C6bvrqL8.js.map +0 -1
  201. package/dist/index-C6t9z3on.js +0 -97
  202. package/dist/index-C6t9z3on.js.map +0 -1
  203. package/dist/index-CaQG3DzJ.js +0 -64
  204. package/dist/index-CaQG3DzJ.js.map +0 -1
  205. package/dist/index-ChTGHCkY.js +0 -255
  206. package/dist/index-ChTGHCkY.js.map +0 -1
  207. package/dist/index-D808y1pT.js +0 -178
  208. package/dist/index-D808y1pT.js.map +0 -1
  209. package/dist/index-DE3fiSzl.js +0 -28
  210. package/dist/index-DE3fiSzl.js.map +0 -1
  211. package/dist/index-DPws5oAn.js +0 -90
  212. package/dist/index-DPws5oAn.js.map +0 -1
  213. package/dist/index-DeUgDpdG.js +0 -80
  214. package/dist/index-DeUgDpdG.js.map +0 -1
  215. package/dist/index-DvquTpxI.js +0 -140
  216. package/dist/index-DvquTpxI.js.map +0 -1
  217. package/dist/index-DwbC6luJ.js.map +0 -1
  218. package/dist/index-Ncxt32Wo.js +0 -174
  219. package/dist/index-Ncxt32Wo.js.map +0 -1
  220. package/dist/index-U7y6nBZR.js +0 -179
  221. package/dist/index-U7y6nBZR.js.map +0 -1
  222. package/dist/index-pysSAa5G.js +0 -57
  223. package/dist/index-pysSAa5G.js.map +0 -1
  224. package/dist/tooltip-DI3_ZKNk.js +0 -365
  225. package/dist/tooltip-DI3_ZKNk.js.map +0 -1
  226. package/dist/utils-DGzAmwok.js.map +0 -1
  227. /package/dist/components/{ui/tooltip.d.ts → tooltip/Tooltip.d.ts} +0 -0
@@ -1,1508 +1,41 @@
1
- var bn = Object.defineProperty, zn = Object.defineProperties;
2
- var En = Object.getOwnPropertyDescriptors;
3
- var bt = Object.getOwnPropertySymbols;
4
- var Jt = Object.prototype.hasOwnProperty, Xt = Object.prototype.propertyIsEnumerable;
5
- var _t = (t, n, e) => n in t ? bn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, et = (t, n) => {
6
- for (var e in n || (n = {}))
7
- Jt.call(n, e) && _t(t, e, n[e]);
8
- if (bt)
9
- for (var e of bt(n))
10
- Xt.call(n, e) && _t(t, e, n[e]);
1
+ var g = Object.defineProperty, P = Object.defineProperties;
2
+ var R = Object.getOwnPropertyDescriptors;
3
+ var i = Object.getOwnPropertySymbols;
4
+ var x = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
+ var v = (t, e, o) => e in t ? g(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, u = (t, e) => {
6
+ for (var o in e || (e = {}))
7
+ x.call(e, o) && v(t, o, e[o]);
8
+ if (i)
9
+ for (var o of i(e))
10
+ y.call(e, o) && v(t, o, e[o]);
11
11
  return t;
12
- }, dt = (t, n) => zn(t, En(n));
13
- var ct = (t, n) => {
14
- var e = {};
15
- for (var o in t)
16
- Jt.call(t, o) && n.indexOf(o) < 0 && (e[o] = t[o]);
17
- if (t != null && bt)
18
- for (var o of bt(t))
19
- n.indexOf(o) < 0 && Xt.call(t, o) && (e[o] = t[o]);
20
- return e;
21
- };
22
- import { jsx as X, jsxs as on } from "react/jsx-runtime";
23
- import * as $ from "react";
24
- import xt, { useRef as Yt, useState as Zt, useCallback as wn, useEffect as Dt } from "react";
25
- import { c as Cn } from "../utils-DGzAmwok.js";
26
- import { c as Ot } from "../index-CR-odn5-.js";
27
- import { B as rn } from "../Button-DhfE69q0.js";
28
- import { C as Ln } from "../chevron-right-CobOebzi.js";
29
- import { c as In } from "../createLucideIcon-DgrNxRV5.js";
30
- function Tn(t) {
31
- return Object.prototype.toString.call(t) === "[object Object]";
32
- }
33
- function Wt(t) {
34
- return Tn(t) || Array.isArray(t);
35
- }
36
- function Nn() {
37
- return !!(typeof window != "undefined" && window.document && window.document.createElement);
38
- }
39
- function Mt(t, n) {
40
- const e = Object.keys(t), o = Object.keys(n);
41
- if (e.length !== o.length) return !1;
42
- const c = JSON.stringify(Object.keys(t.breakpoints || {})), s = JSON.stringify(Object.keys(n.breakpoints || {}));
43
- return c !== s ? !1 : e.every((r) => {
44
- const a = t[r], i = n[r];
45
- return typeof a == "function" ? `${a}` == `${i}` : !Wt(a) || !Wt(i) ? a === i : Mt(a, i);
46
- });
47
- }
48
- function tn(t) {
49
- return t.concat().sort((n, e) => n.name > e.name ? 1 : -1).map((n) => n.options);
50
- }
51
- function Dn(t, n) {
52
- if (t.length !== n.length) return !1;
53
- const e = tn(t), o = tn(n);
54
- return e.every((c, s) => {
55
- const r = o[s];
56
- return Mt(c, r);
57
- });
58
- }
59
- function kt(t) {
60
- return typeof t == "number";
61
- }
62
- function Pt(t) {
63
- return typeof t == "string";
64
- }
65
- function Et(t) {
66
- return typeof t == "boolean";
67
- }
68
- function nn(t) {
69
- return Object.prototype.toString.call(t) === "[object Object]";
70
- }
71
- function D(t) {
72
- return Math.abs(t);
73
- }
74
- function Ft(t) {
75
- return Math.sign(t);
76
- }
77
- function pt(t, n) {
78
- return D(t - n);
79
- }
80
- function Pn(t, n) {
81
- if (t === 0 || n === 0 || D(t) <= D(n)) return 0;
82
- const e = pt(D(t), D(n));
83
- return D(e / t);
84
- }
85
- function An(t) {
86
- return Math.round(t * 100) / 100;
87
- }
88
- function gt(t) {
89
- return ht(t).map(Number);
90
- }
91
- function B(t) {
92
- return t[St(t)];
93
- }
94
- function St(t) {
95
- return Math.max(0, t.length - 1);
96
- }
97
- function Vt(t, n) {
98
- return n === St(t);
99
- }
100
- function en(t, n = 0) {
101
- return Array.from(Array(t), (e, o) => n + o);
102
- }
103
- function ht(t) {
104
- return Object.keys(t);
105
- }
106
- function sn(t, n) {
107
- return [t, n].reduce((e, o) => (ht(o).forEach((c) => {
108
- const s = e[c], r = o[c], a = nn(s) && nn(r);
109
- e[c] = a ? sn(s, r) : r;
110
- }), e), {});
111
- }
112
- function At(t, n) {
113
- return typeof n.MouseEvent != "undefined" && t instanceof n.MouseEvent;
114
- }
115
- function On(t, n) {
116
- const e = {
117
- start: o,
118
- center: c,
119
- end: s
120
- };
121
- function o() {
122
- return 0;
123
- }
124
- function c(i) {
125
- return s(i) / 2;
126
- }
127
- function s(i) {
128
- return n - i;
129
- }
130
- function r(i, u) {
131
- return Pt(t) ? e[t](i) : t(n, i, u);
132
- }
133
- return {
134
- measure: r
135
- };
136
- }
137
- function yt() {
138
- let t = [];
139
- function n(c, s, r, a = {
140
- passive: !0
141
- }) {
142
- let i;
143
- if ("addEventListener" in c)
144
- c.addEventListener(s, r, a), i = () => c.removeEventListener(s, r, a);
145
- else {
146
- const u = c;
147
- u.addListener(r), i = () => u.removeListener(r);
148
- }
149
- return t.push(i), o;
150
- }
151
- function e() {
152
- t = t.filter((c) => c());
153
- }
154
- const o = {
155
- add: n,
156
- clear: e
157
- };
12
+ }, d = (t, e) => P(t, R(e));
13
+ var h = (t, e) => {
14
+ var o = {};
15
+ for (var n in t)
16
+ x.call(t, n) && e.indexOf(n) < 0 && (o[n] = t[n]);
17
+ if (t != null && i)
18
+ for (var n of i(t))
19
+ e.indexOf(n) < 0 && y.call(t, n) && (o[n] = t[n]);
158
20
  return o;
159
- }
160
- function Mn(t, n, e, o) {
161
- const c = yt(), s = 1e3 / 60;
162
- let r = null, a = 0, i = 0;
163
- function u() {
164
- c.add(t, "visibilitychange", () => {
165
- t.hidden && d();
166
- });
167
- }
168
- function p() {
169
- S(), c.clear();
170
- }
171
- function m(y) {
172
- if (!i) return;
173
- r || (r = y, e(), e());
174
- const f = y - r;
175
- for (r = y, a += f; a >= s; )
176
- e(), a -= s;
177
- const h = a / s;
178
- o(h), i && (i = n.requestAnimationFrame(m));
179
- }
180
- function l() {
181
- i || (i = n.requestAnimationFrame(m));
182
- }
183
- function S() {
184
- n.cancelAnimationFrame(i), r = null, a = 0, i = 0;
185
- }
186
- function d() {
187
- r = null, a = 0;
188
- }
189
- return {
190
- init: u,
191
- destroy: p,
192
- start: l,
193
- stop: S,
194
- update: e,
195
- render: o
196
- };
197
- }
198
- function kn(t, n) {
199
- const e = n === "rtl", o = t === "y", c = o ? "y" : "x", s = o ? "x" : "y", r = !o && e ? -1 : 1, a = p(), i = m();
200
- function u(d) {
201
- const {
202
- height: g,
203
- width: y
204
- } = d;
205
- return o ? g : y;
206
- }
207
- function p() {
208
- return o ? "top" : e ? "right" : "left";
209
- }
210
- function m() {
211
- return o ? "bottom" : e ? "left" : "right";
212
- }
213
- function l(d) {
214
- return d * r;
215
- }
216
- return {
217
- scroll: c,
218
- cross: s,
219
- startEdge: a,
220
- endEdge: i,
221
- measureSize: u,
222
- direction: l
223
- };
224
- }
225
- function ot(t = 0, n = 0) {
226
- const e = D(t - n);
227
- function o(u) {
228
- return u < t;
229
- }
230
- function c(u) {
231
- return u > n;
232
- }
233
- function s(u) {
234
- return o(u) || c(u);
235
- }
236
- function r(u) {
237
- return s(u) ? o(u) ? t : n : u;
238
- }
239
- function a(u) {
240
- return e ? u - e * Math.ceil((u - n) / e) : u;
241
- }
242
- return {
243
- length: e,
244
- max: n,
245
- min: t,
246
- constrain: r,
247
- reachedAny: s,
248
- reachedMax: c,
249
- reachedMin: o,
250
- removeOffset: a
251
- };
252
- }
253
- function cn(t, n, e) {
254
- const {
255
- constrain: o
256
- } = ot(0, t), c = t + 1;
257
- let s = r(n);
258
- function r(l) {
259
- return e ? D((c + l) % c) : o(l);
260
- }
261
- function a() {
262
- return s;
263
- }
264
- function i(l) {
265
- return s = r(l), m;
266
- }
267
- function u(l) {
268
- return p().set(a() + l);
269
- }
270
- function p() {
271
- return cn(t, a(), e);
272
- }
273
- const m = {
274
- get: a,
275
- set: i,
276
- add: u,
277
- clone: p
278
- };
279
- return m;
280
- }
281
- function Fn(t, n, e, o, c, s, r, a, i, u, p, m, l, S, d, g, y, f, h) {
282
- const {
283
- cross: v,
284
- direction: w
285
- } = t, z = ["INPUT", "SELECT", "TEXTAREA"], C = {
286
- passive: !1
287
- }, b = yt(), E = yt(), L = ot(50, 225).constrain(S.measure(20)), P = {
288
- mouse: 300,
289
- touch: 400
290
- }, I = {
291
- mouse: 500,
292
- touch: 600
293
- }, k = d ? 43 : 25;
294
- let R = !1, j = 0, G = 0, W = !1, Y = !1, K = !1, U = !1;
295
- function at(x) {
296
- if (!h) return;
297
- function T(M) {
298
- (Et(h) || h(x, M)) && lt(M);
299
- }
300
- const A = n;
301
- b.add(A, "dragstart", (M) => M.preventDefault(), C).add(A, "touchmove", () => {
302
- }, C).add(A, "touchend", () => {
303
- }).add(A, "touchstart", T).add(A, "mousedown", T).add(A, "touchcancel", O).add(A, "contextmenu", O).add(A, "click", _, !0);
304
- }
305
- function H() {
306
- b.clear(), E.clear();
307
- }
308
- function rt() {
309
- const x = U ? e : n;
310
- E.add(x, "touchmove", F, C).add(x, "touchend", O).add(x, "mousemove", F, C).add(x, "mouseup", O);
311
- }
312
- function st(x) {
313
- const T = x.nodeName || "";
314
- return z.includes(T);
315
- }
316
- function Q() {
317
- return (d ? I : P)[U ? "mouse" : "touch"];
318
- }
319
- function ut(x, T) {
320
- const A = m.add(Ft(x) * -1), M = p.byDistance(x, !d).distance;
321
- return d || D(x) < L ? M : y && T ? M * 0.5 : p.byIndex(A.get(), 0).distance;
322
- }
323
- function lt(x) {
324
- const T = At(x, o);
325
- U = T, K = d && T && !x.buttons && R, R = pt(c.get(), r.get()) >= 2, !(T && x.button !== 0) && (st(x.target) || (W = !0, s.pointerDown(x), u.useFriction(0).useDuration(0), c.set(r), rt(), j = s.readPoint(x), G = s.readPoint(x, v), l.emit("pointerDown")));
326
- }
327
- function F(x) {
328
- if (!At(x, o) && x.touches.length >= 2) return O(x);
329
- const A = s.readPoint(x), M = s.readPoint(x, v), q = pt(A, j), J = pt(M, G);
330
- if (!Y && !U && (!x.cancelable || (Y = q > J, !Y)))
331
- return O(x);
332
- const tt = s.pointerMove(x);
333
- q > g && (K = !0), u.useFriction(0.3).useDuration(0.75), a.start(), c.add(w(tt)), x.preventDefault();
334
- }
335
- function O(x) {
336
- const A = p.byDistance(0, !1).index !== m.get(), M = s.pointerUp(x) * Q(), q = ut(w(M), A), J = Pn(M, q), tt = k - 10 * J, Z = f + J / 50;
337
- Y = !1, W = !1, E.clear(), u.useDuration(tt).useFriction(Z), i.distance(q, !d), U = !1, l.emit("pointerUp");
338
- }
339
- function _(x) {
340
- K && (x.stopPropagation(), x.preventDefault(), K = !1);
341
- }
342
- function V() {
343
- return W;
344
- }
345
- return {
346
- init: at,
347
- destroy: H,
348
- pointerDown: V
349
- };
350
- }
351
- function Vn(t, n) {
352
- let o, c;
353
- function s(m) {
354
- return m.timeStamp;
355
- }
356
- function r(m, l) {
357
- const d = `client${(l || t.scroll) === "x" ? "X" : "Y"}`;
358
- return (At(m, n) ? m : m.touches[0])[d];
359
- }
360
- function a(m) {
361
- return o = m, c = m, r(m);
362
- }
363
- function i(m) {
364
- const l = r(m) - r(c), S = s(m) - s(o) > 170;
365
- return c = m, S && (o = m), l;
366
- }
367
- function u(m) {
368
- if (!o || !c) return 0;
369
- const l = r(c) - r(o), S = s(m) - s(o), d = s(m) - s(c) > 170, g = l / S;
370
- return S && !d && D(g) > 0.1 ? g : 0;
371
- }
372
- return {
373
- pointerDown: a,
374
- pointerMove: i,
375
- pointerUp: u,
376
- readPoint: r
377
- };
378
- }
379
- function Bn() {
380
- function t(e) {
381
- const {
382
- offsetTop: o,
383
- offsetLeft: c,
384
- offsetWidth: s,
385
- offsetHeight: r
386
- } = e;
387
- return {
388
- top: o,
389
- right: c + s,
390
- bottom: o + r,
391
- left: c,
392
- width: s,
393
- height: r
394
- };
395
- }
396
- return {
397
- measure: t
398
- };
399
- }
400
- function Rn(t) {
401
- function n(o) {
402
- return t * (o / 100);
403
- }
404
- return {
405
- measure: n
406
- };
407
- }
408
- function jn(t, n, e, o, c, s, r) {
409
- const a = [t].concat(o);
410
- let i, u, p = [], m = !1;
411
- function l(y) {
412
- return c.measureSize(r.measure(y));
413
- }
414
- function S(y) {
415
- if (!s) return;
416
- u = l(t), p = o.map(l);
417
- function f(h) {
418
- for (const v of h) {
419
- if (m) return;
420
- const w = v.target === t, z = o.indexOf(v.target), C = w ? u : p[z], b = l(w ? t : o[z]);
421
- if (D(b - C) >= 0.5) {
422
- y.reInit(), n.emit("resize");
423
- break;
424
- }
425
- }
426
- }
427
- i = new ResizeObserver((h) => {
428
- (Et(s) || s(y, h)) && f(h);
429
- }), e.requestAnimationFrame(() => {
430
- a.forEach((h) => i.observe(h));
431
- });
432
- }
433
- function d() {
434
- m = !0, i && i.disconnect();
435
- }
436
- return {
437
- init: S,
438
- destroy: d
439
- };
440
- }
441
- function Gn(t, n, e, o, c, s) {
442
- let r = 0, a = 0, i = c, u = s, p = t.get(), m = 0;
443
- function l() {
444
- const C = o.get() - t.get(), b = !i;
445
- let E = 0;
446
- return b ? (r = 0, e.set(o), t.set(o), E = C) : (e.set(t), r += C / i, r *= u, p += r, t.add(r), E = p - m), a = Ft(E), m = p, z;
447
- }
448
- function S() {
449
- const C = o.get() - n.get();
450
- return D(C) < 1e-3;
451
- }
452
- function d() {
453
- return i;
454
- }
455
- function g() {
456
- return a;
457
- }
458
- function y() {
459
- return r;
460
- }
461
- function f() {
462
- return v(c);
463
- }
464
- function h() {
465
- return w(s);
466
- }
467
- function v(C) {
468
- return i = C, z;
469
- }
470
- function w(C) {
471
- return u = C, z;
472
- }
473
- const z = {
474
- direction: g,
475
- duration: d,
476
- velocity: y,
477
- seek: l,
478
- settled: S,
479
- useBaseFriction: h,
480
- useBaseDuration: f,
481
- useFriction: w,
482
- useDuration: v
483
- };
484
- return z;
485
- }
486
- function Hn(t, n, e, o, c) {
487
- const s = c.measure(10), r = c.measure(50), a = ot(0.1, 0.99);
488
- let i = !1;
489
- function u() {
490
- return !(i || !t.reachedAny(e.get()) || !t.reachedAny(n.get()));
491
- }
492
- function p(S) {
493
- if (!u()) return;
494
- const d = t.reachedMin(n.get()) ? "min" : "max", g = D(t[d] - n.get()), y = e.get() - n.get(), f = a.constrain(g / r);
495
- e.subtract(y * f), !S && D(y) < s && (e.set(t.constrain(e.get())), o.useDuration(25).useBaseFriction());
496
- }
497
- function m(S) {
498
- i = !S;
499
- }
500
- return {
501
- shouldConstrain: u,
502
- constrain: p,
503
- toggleActive: m
504
- };
505
- }
506
- function qn(t, n, e, o, c) {
507
- const s = ot(-n + t, 0), r = m(), a = p(), i = l();
508
- function u(d, g) {
509
- return pt(d, g) <= 1;
510
- }
511
- function p() {
512
- const d = r[0], g = B(r), y = r.lastIndexOf(d), f = r.indexOf(g) + 1;
513
- return ot(y, f);
514
- }
515
- function m() {
516
- return e.map((d, g) => {
517
- const {
518
- min: y,
519
- max: f
520
- } = s, h = s.constrain(d), v = !g, w = Vt(e, g);
521
- return v ? f : w || u(y, h) ? y : u(f, h) ? f : h;
522
- }).map((d) => parseFloat(d.toFixed(3)));
523
- }
524
- function l() {
525
- if (n <= t + c) return [s.max];
526
- if (o === "keepSnaps") return r;
527
- const {
528
- min: d,
529
- max: g
530
- } = a;
531
- return r.slice(d, g);
532
- }
533
- return {
534
- snapsContained: i,
535
- scrollContainLimit: a
536
- };
537
- }
538
- function $n(t, n, e) {
539
- const o = n[0], c = e ? o - t : B(n);
540
- return {
541
- limit: ot(c, o)
542
- };
543
- }
544
- function Kn(t, n, e, o) {
545
- const s = n.min + 0.1, r = n.max + 0.1, {
546
- reachedMin: a,
547
- reachedMax: i
548
- } = ot(s, r);
549
- function u(l) {
550
- return l === 1 ? i(e.get()) : l === -1 ? a(e.get()) : !1;
551
- }
552
- function p(l) {
553
- if (!u(l)) return;
554
- const S = t * (l * -1);
555
- o.forEach((d) => d.add(S));
556
- }
557
- return {
558
- loop: p
559
- };
560
- }
561
- function Un(t) {
562
- const {
563
- max: n,
564
- length: e
565
- } = t;
566
- function o(s) {
567
- const r = s - n;
568
- return e ? r / -e : 0;
569
- }
570
- return {
571
- get: o
572
- };
573
- }
574
- function Qn(t, n, e, o, c) {
575
- const {
576
- startEdge: s,
577
- endEdge: r
578
- } = t, {
579
- groupSlides: a
580
- } = c, i = m().map(n.measure), u = l(), p = S();
581
- function m() {
582
- return a(o).map((g) => B(g)[r] - g[0][s]).map(D);
583
- }
584
- function l() {
585
- return o.map((g) => e[s] - g[s]).map((g) => -D(g));
586
- }
587
- function S() {
588
- return a(u).map((g) => g[0]).map((g, y) => g + i[y]);
589
- }
590
- return {
591
- snaps: u,
592
- snapsAligned: p
593
- };
594
- }
595
- function _n(t, n, e, o, c, s) {
596
- const {
597
- groupSlides: r
598
- } = c, {
599
- min: a,
600
- max: i
601
- } = o, u = p();
602
- function p() {
603
- const l = r(s), S = !t || n === "keepSnaps";
604
- return e.length === 1 ? [s] : S ? l : l.slice(a, i).map((d, g, y) => {
605
- const f = !g, h = Vt(y, g);
606
- if (f) {
607
- const v = B(y[0]) + 1;
608
- return en(v);
609
- }
610
- if (h) {
611
- const v = St(s) - B(y)[0] + 1;
612
- return en(v, B(y)[0]);
613
- }
614
- return d;
615
- });
616
- }
617
- return {
618
- slideRegistry: u
619
- };
620
- }
621
- function Jn(t, n, e, o, c) {
622
- const {
623
- reachedAny: s,
624
- removeOffset: r,
625
- constrain: a
626
- } = o;
627
- function i(d) {
628
- return d.concat().sort((g, y) => D(g) - D(y))[0];
629
- }
630
- function u(d) {
631
- const g = t ? r(d) : a(d), y = n.map((h, v) => ({
632
- diff: p(h - g, 0),
633
- index: v
634
- })).sort((h, v) => D(h.diff) - D(v.diff)), {
635
- index: f
636
- } = y[0];
637
- return {
638
- index: f,
639
- distance: g
640
- };
641
- }
642
- function p(d, g) {
643
- const y = [d, d + e, d - e];
644
- if (!t) return d;
645
- if (!g) return i(y);
646
- const f = y.filter((h) => Ft(h) === g);
647
- return f.length ? i(f) : B(y) - e;
648
- }
649
- function m(d, g) {
650
- const y = n[d] - c.get(), f = p(y, g);
651
- return {
652
- index: d,
653
- distance: f
654
- };
655
- }
656
- function l(d, g) {
657
- const y = c.get() + d, {
658
- index: f,
659
- distance: h
660
- } = u(y), v = !t && s(y);
661
- if (!g || v) return {
662
- index: f,
663
- distance: d
664
- };
665
- const w = n[f] - h, z = d + p(w, 0);
666
- return {
667
- index: f,
668
- distance: z
669
- };
670
- }
671
- return {
672
- byDistance: l,
673
- byIndex: m,
674
- shortcut: p
675
- };
676
- }
677
- function Xn(t, n, e, o, c, s, r) {
678
- function a(m) {
679
- const l = m.distance, S = m.index !== n.get();
680
- s.add(l), l && (o.duration() ? t.start() : (t.update(), t.render(1), t.update())), S && (e.set(n.get()), n.set(m.index), r.emit("select"));
681
- }
682
- function i(m, l) {
683
- const S = c.byDistance(m, l);
684
- a(S);
685
- }
686
- function u(m, l) {
687
- const S = n.clone().set(m), d = c.byIndex(S.get(), l);
688
- a(d);
689
- }
690
- return {
691
- distance: i,
692
- index: u
693
- };
694
- }
695
- function Yn(t, n, e, o, c, s, r, a) {
696
- const i = {
697
- passive: !0,
698
- capture: !0
699
- };
700
- let u = 0;
701
- function p(S) {
702
- if (!a) return;
703
- function d(g) {
704
- if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
705
- r.emit("slideFocusStart"), t.scrollLeft = 0;
706
- const h = e.findIndex((v) => v.includes(g));
707
- kt(h) && (c.useDuration(0), o.index(h, 0), r.emit("slideFocus"));
708
- }
709
- s.add(document, "keydown", m, !1), n.forEach((g, y) => {
710
- s.add(g, "focus", (f) => {
711
- (Et(a) || a(S, f)) && d(y);
712
- }, i);
713
- });
714
- }
715
- function m(S) {
716
- S.code === "Tab" && (u = (/* @__PURE__ */ new Date()).getTime());
717
- }
718
- return {
719
- init: p
720
- };
721
- }
722
- function mt(t) {
723
- let n = t;
724
- function e() {
725
- return n;
726
- }
727
- function o(i) {
728
- n = r(i);
729
- }
730
- function c(i) {
731
- n += r(i);
732
- }
733
- function s(i) {
734
- n -= r(i);
735
- }
736
- function r(i) {
737
- return kt(i) ? i : i.get();
738
- }
739
- return {
740
- get: e,
741
- set: o,
742
- add: c,
743
- subtract: s
744
- };
745
- }
746
- function an(t, n) {
747
- const e = t.scroll === "x" ? r : a, o = n.style;
748
- let c = null, s = !1;
749
- function r(l) {
750
- return `translate3d(${l}px,0px,0px)`;
751
- }
752
- function a(l) {
753
- return `translate3d(0px,${l}px,0px)`;
754
- }
755
- function i(l) {
756
- if (s) return;
757
- const S = An(t.direction(l));
758
- S !== c && (o.transform = e(S), c = S);
759
- }
760
- function u(l) {
761
- s = !l;
762
- }
763
- function p() {
764
- s || (o.transform = "", n.getAttribute("style") || n.removeAttribute("style"));
765
- }
766
- return {
767
- clear: p,
768
- to: i,
769
- toggleActive: u
770
- };
771
- }
772
- function Zn(t, n, e, o, c, s, r, a, i) {
773
- const p = gt(c), m = gt(c).reverse(), l = f().concat(h());
774
- function S(b, E) {
775
- return b.reduce((L, P) => L - c[P], E);
776
- }
777
- function d(b, E) {
778
- return b.reduce((L, P) => S(L, E) > 0 ? L.concat([P]) : L, []);
779
- }
780
- function g(b) {
781
- return s.map((E, L) => ({
782
- start: E - o[L] + 0.5 + b,
783
- end: E + n - 0.5 + b
784
- }));
785
- }
786
- function y(b, E, L) {
787
- const P = g(E);
788
- return b.map((I) => {
789
- const k = L ? 0 : -e, R = L ? e : 0, j = L ? "end" : "start", G = P[I][j];
790
- return {
791
- index: I,
792
- loopPoint: G,
793
- slideLocation: mt(-1),
794
- translate: an(t, i[I]),
795
- target: () => a.get() > G ? k : R
796
- };
797
- });
798
- }
799
- function f() {
800
- const b = r[0], E = d(m, b);
801
- return y(E, e, !1);
802
- }
803
- function h() {
804
- const b = n - r[0] - 1, E = d(p, b);
805
- return y(E, -e, !0);
806
- }
807
- function v() {
808
- return l.every(({
809
- index: b
810
- }) => {
811
- const E = p.filter((L) => L !== b);
812
- return S(E, n) <= 0.1;
813
- });
814
- }
815
- function w() {
816
- l.forEach((b) => {
817
- const {
818
- target: E,
819
- translate: L,
820
- slideLocation: P
821
- } = b, I = E();
822
- I !== P.get() && (L.to(I), P.set(I));
823
- });
824
- }
825
- function z() {
826
- l.forEach((b) => b.translate.clear());
827
- }
828
- return {
829
- canLoop: v,
830
- clear: z,
831
- loop: w,
832
- loopPoints: l
833
- };
834
- }
835
- function Wn(t, n, e) {
836
- let o, c = !1;
837
- function s(i) {
838
- if (!e) return;
839
- function u(p) {
840
- for (const m of p)
841
- if (m.type === "childList") {
842
- i.reInit(), n.emit("slidesChanged");
843
- break;
844
- }
845
- }
846
- o = new MutationObserver((p) => {
847
- c || (Et(e) || e(i, p)) && u(p);
848
- }), o.observe(t, {
849
- childList: !0
850
- });
851
- }
852
- function r() {
853
- o && o.disconnect(), c = !0;
854
- }
855
- return {
856
- init: s,
857
- destroy: r
858
- };
859
- }
860
- function te(t, n, e, o) {
861
- const c = {};
862
- let s = null, r = null, a, i = !1;
863
- function u() {
864
- a = new IntersectionObserver((d) => {
865
- i || (d.forEach((g) => {
866
- const y = n.indexOf(g.target);
867
- c[y] = g;
868
- }), s = null, r = null, e.emit("slidesInView"));
869
- }, {
870
- root: t.parentElement,
871
- threshold: o
872
- }), n.forEach((d) => a.observe(d));
873
- }
874
- function p() {
875
- a && a.disconnect(), i = !0;
876
- }
877
- function m(d) {
878
- return ht(c).reduce((g, y) => {
879
- const f = parseInt(y), {
880
- isIntersecting: h
881
- } = c[f];
882
- return (d && h || !d && !h) && g.push(f), g;
883
- }, []);
884
- }
885
- function l(d = !0) {
886
- if (d && s) return s;
887
- if (!d && r) return r;
888
- const g = m(d);
889
- return d && (s = g), d || (r = g), g;
890
- }
891
- return {
892
- init: u,
893
- destroy: p,
894
- get: l
895
- };
896
- }
897
- function ne(t, n, e, o, c, s) {
898
- const {
899
- measureSize: r,
900
- startEdge: a,
901
- endEdge: i
902
- } = t, u = e[0] && c, p = d(), m = g(), l = e.map(r), S = y();
903
- function d() {
904
- if (!u) return 0;
905
- const h = e[0];
906
- return D(n[a] - h[a]);
907
- }
908
- function g() {
909
- if (!u) return 0;
910
- const h = s.getComputedStyle(B(o));
911
- return parseFloat(h.getPropertyValue(`margin-${i}`));
912
- }
913
- function y() {
914
- return e.map((h, v, w) => {
915
- const z = !v, C = Vt(w, v);
916
- return z ? l[v] + p : C ? l[v] + m : w[v + 1][a] - h[a];
917
- }).map(D);
918
- }
919
- return {
920
- slideSizes: l,
921
- slideSizesWithGaps: S,
922
- startGap: p,
923
- endGap: m
924
- };
925
- }
926
- function ee(t, n, e, o, c, s, r, a, i) {
927
- const {
928
- startEdge: u,
929
- endEdge: p,
930
- direction: m
931
- } = t, l = kt(e);
932
- function S(f, h) {
933
- return gt(f).filter((v) => v % h === 0).map((v) => f.slice(v, v + h));
934
- }
935
- function d(f) {
936
- return f.length ? gt(f).reduce((h, v, w) => {
937
- const z = B(h) || 0, C = z === 0, b = v === St(f), E = c[u] - s[z][u], L = c[u] - s[v][p], P = !o && C ? m(r) : 0, I = !o && b ? m(a) : 0, k = D(L - I - (E + P));
938
- return w && k > n + i && h.push(v), b && h.push(f.length), h;
939
- }, []).map((h, v, w) => {
940
- const z = Math.max(w[v - 1] || 0);
941
- return f.slice(z, h);
942
- }) : [];
943
- }
944
- function g(f) {
945
- return l ? S(f, e) : d(f);
946
- }
947
- return {
948
- groupSlides: g
949
- };
950
- }
951
- function oe(t, n, e, o, c, s, r) {
952
- const {
953
- align: a,
954
- axis: i,
955
- direction: u,
956
- startIndex: p,
957
- loop: m,
958
- duration: l,
959
- dragFree: S,
960
- dragThreshold: d,
961
- inViewThreshold: g,
962
- slidesToScroll: y,
963
- skipSnaps: f,
964
- containScroll: h,
965
- watchResize: v,
966
- watchSlides: w,
967
- watchDrag: z,
968
- watchFocus: C
969
- } = s, b = 2, E = Bn(), L = E.measure(n), P = e.map(E.measure), I = kn(i, u), k = I.measureSize(L), R = Rn(k), j = On(a, k), G = !m && !!h, W = m || !!h, {
970
- slideSizes: Y,
971
- slideSizesWithGaps: K,
972
- startGap: U,
973
- endGap: at
974
- } = ne(I, L, P, e, W, c), H = ee(I, k, y, m, L, P, U, at, b), {
975
- snaps: rt,
976
- snapsAligned: st
977
- } = Qn(I, j, L, P, H), Q = -B(rt) + B(K), {
978
- snapsContained: ut,
979
- scrollContainLimit: lt
980
- } = qn(k, Q, st, h, b), F = G ? ut : st, {
981
- limit: O
982
- } = $n(Q, F, m), _ = cn(St(F), p, m), V = _.clone(), N = gt(e), x = ({
983
- dragHandler: it,
984
- scrollBody: Tt,
985
- scrollBounds: Nt,
986
- options: {
987
- loop: vt
988
- }
989
- }) => {
990
- vt || Nt.constrain(it.pointerDown()), Tt.seek();
991
- }, T = ({
992
- scrollBody: it,
993
- translate: Tt,
994
- location: Nt,
995
- offsetLocation: vt,
996
- previousLocation: mn,
997
- scrollLooper: pn,
998
- slideLooper: gn,
999
- dragHandler: hn,
1000
- animation: yn,
1001
- eventHandler: Ht,
1002
- scrollBounds: xn,
1003
- options: {
1004
- loop: qt
1005
- }
1006
- }, $t) => {
1007
- const Kt = it.settled(), Sn = !xn.shouldConstrain(), Ut = qt ? Kt : Kt && Sn, Qt = Ut && !hn.pointerDown();
1008
- Qt && yn.stop();
1009
- const vn = Nt.get() * $t + mn.get() * (1 - $t);
1010
- vt.set(vn), qt && (pn.loop(it.direction()), gn.loop()), Tt.to(vt.get()), Qt && Ht.emit("settle"), Ut || Ht.emit("scroll");
1011
- }, A = Mn(o, c, () => x(It), (it) => T(It, it)), M = 0.68, q = F[_.get()], J = mt(q), tt = mt(q), Z = mt(q), nt = mt(q), ft = Gn(J, Z, tt, nt, l, M), Ct = Jn(m, F, Q, O, nt), Lt = Xn(A, _, V, ft, Ct, nt, r), Rt = Un(O), jt = yt(), fn = te(n, e, r, g), {
1012
- slideRegistry: Gt
1013
- } = _n(G, h, F, lt, H, N), dn = Yn(t, e, Gt, Lt, ft, jt, r, C), It = {
1014
- ownerDocument: o,
1015
- ownerWindow: c,
1016
- eventHandler: r,
1017
- containerRect: L,
1018
- slideRects: P,
1019
- animation: A,
1020
- axis: I,
1021
- dragHandler: Fn(I, t, o, c, nt, Vn(I, c), J, A, Lt, ft, Ct, _, r, R, S, d, f, M, z),
1022
- eventStore: jt,
1023
- percentOfView: R,
1024
- index: _,
1025
- indexPrevious: V,
1026
- limit: O,
1027
- location: J,
1028
- offsetLocation: Z,
1029
- previousLocation: tt,
1030
- options: s,
1031
- resizeHandler: jn(n, r, c, e, I, v, E),
1032
- scrollBody: ft,
1033
- scrollBounds: Hn(O, Z, nt, ft, R),
1034
- scrollLooper: Kn(Q, O, Z, [J, Z, tt, nt]),
1035
- scrollProgress: Rt,
1036
- scrollSnapList: F.map(Rt.get),
1037
- scrollSnaps: F,
1038
- scrollTarget: Ct,
1039
- scrollTo: Lt,
1040
- slideLooper: Zn(I, k, Q, Y, K, rt, F, Z, e),
1041
- slideFocus: dn,
1042
- slidesHandler: Wn(n, r, w),
1043
- slidesInView: fn,
1044
- slideIndexes: N,
1045
- slideRegistry: Gt,
1046
- slidesToScroll: H,
1047
- target: nt,
1048
- translate: an(I, n)
1049
- };
1050
- return It;
1051
- }
1052
- function re() {
1053
- let t = {}, n;
1054
- function e(u) {
1055
- n = u;
1056
- }
1057
- function o(u) {
1058
- return t[u] || [];
1059
- }
1060
- function c(u) {
1061
- return o(u).forEach((p) => p(n, u)), i;
1062
- }
1063
- function s(u, p) {
1064
- return t[u] = o(u).concat([p]), i;
1065
- }
1066
- function r(u, p) {
1067
- return t[u] = o(u).filter((m) => m !== p), i;
1068
- }
1069
- function a() {
1070
- t = {};
1071
- }
1072
- const i = {
1073
- init: e,
1074
- emit: c,
1075
- off: r,
1076
- on: s,
1077
- clear: a
1078
- };
1079
- return i;
1080
- }
1081
- const se = {
1082
- align: "center",
1083
- axis: "x",
1084
- container: null,
1085
- slides: null,
1086
- containScroll: "trimSnaps",
1087
- direction: "ltr",
1088
- slidesToScroll: 1,
1089
- inViewThreshold: 0,
1090
- breakpoints: {},
1091
- dragFree: !1,
1092
- dragThreshold: 10,
1093
- loop: !1,
1094
- skipSnaps: !1,
1095
- duration: 25,
1096
- startIndex: 0,
1097
- active: !0,
1098
- watchDrag: !0,
1099
- watchResize: !0,
1100
- watchSlides: !0,
1101
- watchFocus: !0
1102
21
  };
1103
- function ie(t) {
1104
- function n(s, r) {
1105
- return sn(s, r || {});
1106
- }
1107
- function e(s) {
1108
- const r = s.breakpoints || {}, a = ht(r).filter((i) => t.matchMedia(i).matches).map((i) => r[i]).reduce((i, u) => n(i, u), {});
1109
- return n(s, a);
1110
- }
1111
- function o(s) {
1112
- return s.map((r) => ht(r.breakpoints || {})).reduce((r, a) => r.concat(a), []).map(t.matchMedia);
1113
- }
1114
- return {
1115
- mergeOptions: n,
1116
- optionsAtMedia: e,
1117
- optionsMediaQueries: o
1118
- };
1119
- }
1120
- function ce(t) {
1121
- let n = [];
1122
- function e(s, r) {
1123
- return n = r.filter(({
1124
- options: a
1125
- }) => t.optionsAtMedia(a).active !== !1), n.forEach((a) => a.init(s, t)), r.reduce((a, i) => Object.assign(a, {
1126
- [i.name]: i
1127
- }), {});
1128
- }
1129
- function o() {
1130
- n = n.filter((s) => s.destroy());
1131
- }
1132
- return {
1133
- init: e,
1134
- destroy: o
1135
- };
1136
- }
1137
- function zt(t, n, e) {
1138
- const o = t.ownerDocument, c = o.defaultView, s = ie(c), r = ce(s), a = yt(), i = re(), {
1139
- mergeOptions: u,
1140
- optionsAtMedia: p,
1141
- optionsMediaQueries: m
1142
- } = s, {
1143
- on: l,
1144
- off: S,
1145
- emit: d
1146
- } = i, g = I;
1147
- let y = !1, f, h = u(se, zt.globalOptions), v = u(h), w = [], z, C, b;
1148
- function E() {
1149
- const {
1150
- container: N,
1151
- slides: x
1152
- } = v;
1153
- C = (Pt(N) ? t.querySelector(N) : N) || t.children[0];
1154
- const A = Pt(x) ? C.querySelectorAll(x) : x;
1155
- b = [].slice.call(A || C.children);
1156
- }
1157
- function L(N) {
1158
- const x = oe(t, C, b, o, c, N, i);
1159
- if (N.loop && !x.slideLooper.canLoop()) {
1160
- const T = Object.assign({}, N, {
1161
- loop: !1
1162
- });
1163
- return L(T);
1164
- }
1165
- return x;
1166
- }
1167
- function P(N, x) {
1168
- y || (h = u(h, N), v = p(h), w = x || w, E(), f = L(v), m([h, ...w.map(({
1169
- options: T
1170
- }) => T)]).forEach((T) => a.add(T, "change", I)), v.active && (f.translate.to(f.location.get()), f.animation.init(), f.slidesInView.init(), f.slideFocus.init(V), f.eventHandler.init(V), f.resizeHandler.init(V), f.slidesHandler.init(V), f.options.loop && f.slideLooper.loop(), C.offsetParent && b.length && f.dragHandler.init(V), z = r.init(V, w)));
1171
- }
1172
- function I(N, x) {
1173
- const T = H();
1174
- k(), P(u({
1175
- startIndex: T
1176
- }, N), x), i.emit("reInit");
1177
- }
1178
- function k() {
1179
- f.dragHandler.destroy(), f.eventStore.clear(), f.translate.clear(), f.slideLooper.clear(), f.resizeHandler.destroy(), f.slidesHandler.destroy(), f.slidesInView.destroy(), f.animation.destroy(), r.destroy(), a.clear();
1180
- }
1181
- function R() {
1182
- y || (y = !0, a.clear(), k(), i.emit("destroy"), i.clear());
1183
- }
1184
- function j(N, x, T) {
1185
- !v.active || y || (f.scrollBody.useBaseFriction().useDuration(x === !0 ? 0 : v.duration), f.scrollTo.index(N, T || 0));
1186
- }
1187
- function G(N) {
1188
- const x = f.index.add(1).get();
1189
- j(x, N, -1);
1190
- }
1191
- function W(N) {
1192
- const x = f.index.add(-1).get();
1193
- j(x, N, 1);
1194
- }
1195
- function Y() {
1196
- return f.index.add(1).get() !== H();
1197
- }
1198
- function K() {
1199
- return f.index.add(-1).get() !== H();
1200
- }
1201
- function U() {
1202
- return f.scrollSnapList;
1203
- }
1204
- function at() {
1205
- return f.scrollProgress.get(f.offsetLocation.get());
1206
- }
1207
- function H() {
1208
- return f.index.get();
1209
- }
1210
- function rt() {
1211
- return f.indexPrevious.get();
1212
- }
1213
- function st() {
1214
- return f.slidesInView.get();
1215
- }
1216
- function Q() {
1217
- return f.slidesInView.get(!1);
1218
- }
1219
- function ut() {
1220
- return z;
1221
- }
1222
- function lt() {
1223
- return f;
1224
- }
1225
- function F() {
1226
- return t;
1227
- }
1228
- function O() {
1229
- return C;
1230
- }
1231
- function _() {
1232
- return b;
1233
- }
1234
- const V = {
1235
- canScrollNext: Y,
1236
- canScrollPrev: K,
1237
- containerNode: O,
1238
- internalEngine: lt,
1239
- destroy: R,
1240
- off: S,
1241
- on: l,
1242
- emit: d,
1243
- plugins: ut,
1244
- previousScrollSnap: rt,
1245
- reInit: g,
1246
- rootNode: F,
1247
- scrollNext: G,
1248
- scrollPrev: W,
1249
- scrollProgress: at,
1250
- scrollSnapList: U,
1251
- scrollTo: j,
1252
- selectedScrollSnap: H,
1253
- slideNodes: _,
1254
- slidesInView: st,
1255
- slidesNotInView: Q
1256
- };
1257
- return P(n, e), setTimeout(() => i.emit("init"), 0), V;
1258
- }
1259
- zt.globalOptions = void 0;
1260
- function Bt(t = {}, n = []) {
1261
- const e = Yt(t), o = Yt(n), [c, s] = Zt(), [r, a] = Zt(), i = wn(() => {
1262
- c && c.reInit(e.current, o.current);
1263
- }, [c]);
1264
- return Dt(() => {
1265
- Mt(e.current, t) || (e.current = t, i());
1266
- }, [t, i]), Dt(() => {
1267
- Dn(o.current, n) || (o.current = n, i());
1268
- }, [n, i]), Dt(() => {
1269
- if (Nn() && r) {
1270
- zt.globalOptions = Bt.globalOptions;
1271
- const u = zt(r, e.current, o.current);
1272
- return s(u), () => u.destroy();
1273
- } else
1274
- s(void 0);
1275
- }, [r, s]), [a, c];
1276
- }
1277
- Bt.globalOptions = void 0;
1278
- const un = xt.createContext(null);
1279
- function wt() {
1280
- const t = xt.useContext(un);
1281
- if (!t)
1282
- throw new Error("useCarousel must be used within a <Carousel />");
1283
- return t;
1284
- }
1285
- const ae = $.forwardRef(
1286
- (u, i) => {
1287
- var p = u, { orientation: t = "horizontal", size: n, opts: e, setApi: o, plugins: c, className: s, children: r } = p, a = ct(p, ["orientation", "size", "opts", "setApi", "plugins", "className", "children"]);
1288
- const [m, l] = Bt(
1289
- dt(et({}, e), {
1290
- axis: t === "horizontal" ? "x" : "y"
1291
- }),
1292
- c
1293
- ), [S, d] = $.useState(!1), [g, y] = $.useState(!1), f = $.useCallback((z) => {
1294
- z && (d(z.canScrollPrev()), y(z.canScrollNext()));
1295
- }, []), h = $.useCallback(() => {
1296
- l == null || l.scrollPrev();
1297
- }, [l]), v = $.useCallback(() => {
1298
- l == null || l.scrollNext();
1299
- }, [l]), w = $.useCallback(
1300
- (z) => {
1301
- z.key === "ArrowLeft" ? (z.preventDefault(), h()) : z.key === "ArrowRight" && (z.preventDefault(), v());
1302
- },
1303
- [h, v]
1304
- );
1305
- return $.useEffect(() => {
1306
- !l || !o || o(l);
1307
- }, [l, o]), $.useEffect(() => {
1308
- if (l)
1309
- return f(l), l.on("reInit", f), l.on("select", f), () => {
1310
- l == null || l.off("select", f);
1311
- };
1312
- }, [l, f]), /* @__PURE__ */ X(
1313
- un.Provider,
1314
- {
1315
- value: {
1316
- carouselRef: m,
1317
- api: l,
1318
- opts: e,
1319
- size: n,
1320
- orientation: t || ((e == null ? void 0 : e.axis) === "y" ? "vertical" : "horizontal"),
1321
- scrollPrev: h,
1322
- scrollNext: v,
1323
- canScrollPrev: S,
1324
- canScrollNext: g
1325
- },
1326
- children: /* @__PURE__ */ X(
1327
- "div",
1328
- dt(et({
1329
- ref: i,
1330
- onKeyDownCapture: w,
1331
- className: Cn("relative", s),
1332
- role: "region",
1333
- "aria-roledescription": "carousel"
1334
- }, a), {
1335
- children: r
1336
- })
1337
- )
1338
- }
1339
- );
1340
- }
1341
- );
1342
- ae.displayName = "Carousel";
1343
- const ue = Ot({
1344
- slots: {
1345
- container: "flex"
1346
- },
1347
- variants: {
1348
- orientation: {
1349
- horizontal: { container: "-ml-4" },
1350
- vertical: { container: "-mt-4 flex-col" }
1351
- },
1352
- size: {
1353
- xs: {},
1354
- sm: {},
1355
- md: {},
1356
- lg: {},
1357
- xl: {}
1358
- }
1359
- },
1360
- compoundVariants: [
1361
- {
1362
- orientation: "horizontal",
1363
- size: "xs",
1364
- class: { container: "-ml-2" }
1365
- },
1366
- {
1367
- orientation: "horizontal",
1368
- size: "sm",
1369
- class: { container: "-ml-2" }
1370
- },
1371
- {
1372
- orientation: "horizontal",
1373
- size: "md",
1374
- class: { container: "-ml-3" }
1375
- },
1376
- {
1377
- orientation: "vertical",
1378
- size: "xs",
1379
- class: { container: "-mt-2" }
1380
- },
1381
- {
1382
- orientation: "vertical",
1383
- size: "sm",
1384
- class: { container: "-mt-2" }
1385
- },
1386
- {
1387
- orientation: "vertical",
1388
- size: "md",
1389
- class: { container: "-mt-3" }
1390
- },
1391
- {
1392
- orientation: "vertical",
1393
- size: "lg",
1394
- class: { container: "-mt-3" }
1395
- }
1396
- ],
1397
- defaultVariants: {
1398
- orientation: "horizontal",
1399
- size: "md"
1400
- }
1401
- }), le = $.forwardRef(
1402
- (o, e) => {
1403
- var c = o, { className: t } = c, n = ct(c, ["className"]);
1404
- const { carouselRef: s, orientation: r, size: a } = wt(), i = ue();
1405
- return /* @__PURE__ */ X("div", { ref: s, className: "overflow-hidden", children: /* @__PURE__ */ X("div", et({ ref: e, className: i.container({ className: t, orientation: r, size: a }) }, n)) });
1406
- }
1407
- );
1408
- le.displayName = "CarouselContent";
1409
- const fe = Ot({
1410
- base: "aspect-square min-w-0 shrink-0 grow-0",
1411
- variants: {
1412
- orientation: {
1413
- horizontal: "ml-4",
1414
- vertical: "mt-4"
1415
- },
1416
- size: {
1417
- xs: {},
1418
- sm: {},
1419
- md: {},
1420
- lg: {},
1421
- xl: {}
1422
- }
1423
- },
1424
- compoundVariants: [
1425
- {
1426
- orientation: "horizontal",
1427
- size: "xs",
1428
- class: "ml-2 w-[3.75rem]"
1429
- },
1430
- {
1431
- orientation: "horizontal",
1432
- size: "sm",
1433
- class: "ml-2 w-20"
1434
- },
1435
- {
1436
- orientation: "horizontal",
1437
- size: "md",
1438
- class: "ml-3 w-[7.5rem]"
1439
- },
1440
- {
1441
- orientation: "horizontal",
1442
- size: "lg",
1443
- class: "w-[11.5rem]"
1444
- },
1445
- {
1446
- orientation: "horizontal",
1447
- size: "xl",
1448
- class: "w-96"
1449
- },
1450
- {
1451
- orientation: "vertical",
1452
- size: "xs",
1453
- class: "mt-2 h-[3.75rem]"
1454
- },
1455
- {
1456
- orientation: "vertical",
1457
- size: "sm",
1458
- class: "mt-2 h-20"
1459
- },
1460
- {
1461
- orientation: "vertical",
1462
- size: "md",
1463
- class: "mt-3 h-[7.5rem]"
1464
- },
1465
- {
1466
- orientation: "vertical",
1467
- size: "lg",
1468
- class: "mt-3 h-[5.5rem] w-80"
1469
- },
1470
- {
1471
- orientation: "vertical",
1472
- size: "xl",
1473
- class: "h-96"
1474
- }
1475
- ],
1476
- defaultVariants: {
1477
- orientation: "horizontal",
1478
- size: "md"
1479
- }
1480
- }), de = xt.forwardRef(
1481
- (o, e) => {
1482
- var c = o, { className: t } = c, n = ct(c, ["className"]);
1483
- const { orientation: s, size: r } = wt();
1484
- return /* @__PURE__ */ X(
1485
- "div",
1486
- et({
1487
- ref: e,
1488
- role: "group",
1489
- "aria-roledescription": "slide",
1490
- "data-slot": "carousel-item",
1491
- className: fe({ className: t, orientation: s, size: r })
1492
- }, n)
1493
- );
1494
- }
1495
- );
1496
- de.displayName = "CarouselItem";
22
+ import { u as f } from "../CarouselItem-pSHe0ufN.js";
23
+ import { C as K, a as M, b as O } from "../CarouselItem-pSHe0ufN.js";
24
+ import { jsxs as z, jsx as r } from "react/jsx-runtime";
25
+ import { B as C } from "../Button-DQtBfU9y.js";
26
+ import N from "react";
27
+ import { c as k } from "../index-CR-odn5-.js";
28
+ import { C as B } from "../chevron-right-CobOebzi.js";
29
+ import { c as L } from "../createLucideIcon-DgrNxRV5.js";
1497
30
  /**
1498
31
  * @license lucide-react v0.460.0 - ISC
1499
32
  *
1500
33
  * This source code is licensed under the ISC license.
1501
34
  * See the LICENSE file in the root directory of this source tree.
1502
35
  */
1503
- const me = In("ChevronLeft", [
36
+ const S = L("ChevronLeft", [
1504
37
  ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
1505
- ]), ln = Ot({
38
+ ]), w = k({
1506
39
  slots: {
1507
40
  container: "absolute hidden h-8 w-8 rounded-full p-2 lg:flex",
1508
41
  icon: "h-4 w-4",
@@ -1649,56 +182,56 @@ const me = In("ChevronLeft", [
1649
182
  }
1650
183
  }
1651
184
  ]
1652
- }), pe = xt.forwardRef(
1653
- (c, o) => {
1654
- var s = c, { className: t, variant: n = "outline" } = s, e = ct(s, ["className", "variant"]);
1655
- const { orientation: r, size: a, scrollPrev: i, canScrollPrev: u } = wt(), p = ln({ orientation: r, size: a, type: "previous" });
1656
- return /* @__PURE__ */ on(
1657
- rn,
1658
- dt(et({
185
+ }), j = N.forwardRef(
186
+ (b, n) => {
187
+ var a = b, { className: t, variant: e = "outline" } = a, o = h(a, ["className", "variant"]);
188
+ const { orientation: l, size: c, scrollPrev: p, canScrollPrev: m } = f(), s = w({ orientation: l, size: c, type: "previous" });
189
+ return /* @__PURE__ */ z(
190
+ C,
191
+ d(u({
1659
192
  "data-slot": "carousel-previous",
1660
- ref: o,
1661
- variant: n,
1662
- className: p.container({ className: t }),
1663
- disabled: !u,
1664
- onClick: i
1665
- }, e), {
193
+ ref: n,
194
+ variant: e,
195
+ className: s.container({ className: t }),
196
+ disabled: !m,
197
+ onClick: p
198
+ }, o), {
1666
199
  children: [
1667
- /* @__PURE__ */ X(me, { className: p.icon() }),
1668
- /* @__PURE__ */ X("span", { className: p.sr(), children: "Previous slide" })
200
+ /* @__PURE__ */ r(S, { className: s.icon() }),
201
+ /* @__PURE__ */ r("span", { className: s.sr(), children: "Previous slide" })
1669
202
  ]
1670
203
  })
1671
204
  );
1672
205
  }
1673
- ), ge = xt.forwardRef(
1674
- (c, o) => {
1675
- var s = c, { className: t, variant: n = "outline" } = s, e = ct(s, ["className", "variant"]);
1676
- const { orientation: r, size: a, scrollNext: i, canScrollNext: u } = wt(), p = ln({ orientation: r, size: a, type: "next" });
1677
- return /* @__PURE__ */ on(
1678
- rn,
1679
- dt(et({
206
+ ), I = N.forwardRef(
207
+ (b, n) => {
208
+ var a = b, { className: t, variant: e = "outline" } = a, o = h(a, ["className", "variant"]);
209
+ const { orientation: l, size: c, scrollNext: p, canScrollNext: m } = f(), s = w({ orientation: l, size: c, type: "next" });
210
+ return /* @__PURE__ */ z(
211
+ C,
212
+ d(u({
1680
213
  "data-slot": "carousel-next",
1681
- ref: o,
1682
- variant: n,
1683
- className: p.container({ className: t }),
1684
- disabled: !u,
1685
- onClick: i
1686
- }, e), {
214
+ ref: n,
215
+ variant: e,
216
+ className: s.container({ className: t }),
217
+ disabled: !m,
218
+ onClick: p
219
+ }, o), {
1687
220
  children: [
1688
- /* @__PURE__ */ X(Ln, { className: p.icon() }),
1689
- /* @__PURE__ */ X("span", { className: p.sr(), children: "Next slide" })
221
+ /* @__PURE__ */ r(B, { className: s.icon() }),
222
+ /* @__PURE__ */ r("span", { className: s.sr(), children: "Next slide" })
1690
223
  ]
1691
224
  })
1692
225
  );
1693
226
  }
1694
227
  );
1695
- ge.displayName = "CarouselNext";
1696
- pe.displayName = "CarouselPrevious";
228
+ I.displayName = "CarouselNext";
229
+ j.displayName = "CarouselPrevious";
1697
230
  export {
1698
- ae as Carousel,
1699
- le as CarouselContent,
1700
- de as CarouselItem,
1701
- ge as CarouselNext,
1702
- pe as CarouselPrevious
231
+ K as Carousel,
232
+ M as CarouselContent,
233
+ O as CarouselItem,
234
+ I as CarouselNext,
235
+ j as CarouselPrevious
1703
236
  };
1704
237
  //# sourceMappingURL=carousel.js.map