commerce-toolkit 0.2.0 → 0.4.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 (167) hide show
  1. package/dist/Combination-BYVrsWzR.js +674 -0
  2. package/dist/Combination-BYVrsWzR.js.map +1 -0
  3. package/dist/Combination-CMyKl2HP.cjs +42 -0
  4. package/dist/Combination-CMyKl2HP.cjs.map +1 -0
  5. package/dist/{checkbox-indicator-os50dewx.js → checkbox-indicator-C9hf5wZD.js} +2 -2
  6. package/dist/{checkbox-indicator-os50dewx.js.map → checkbox-indicator-C9hf5wZD.js.map} +1 -1
  7. package/dist/{checkbox-indicator-GNoyS6OL.cjs → checkbox-indicator-D3X4eolv.cjs} +2 -2
  8. package/dist/{checkbox-indicator-GNoyS6OL.cjs.map → checkbox-indicator-D3X4eolv.cjs.map} +1 -1
  9. package/dist/{checkbox-root-B9W2Y8rY.js → checkbox-root-CFYnDr-v.js} +115 -118
  10. package/dist/checkbox-root-CFYnDr-v.js.map +1 -0
  11. package/dist/checkbox-root-oz6K_T-0.cjs +2 -0
  12. package/dist/checkbox-root-oz6K_T-0.cjs.map +1 -0
  13. package/dist/checkbox.cjs +1 -1
  14. package/dist/checkbox.js +2 -2
  15. package/dist/compare-card.cjs +1 -1
  16. package/dist/compare-card.js +2 -2
  17. package/dist/components/counter/counter.d.ts +25 -0
  18. package/dist/components/counter/counter.d.ts.map +1 -0
  19. package/dist/components/counter/index.d.ts +3 -0
  20. package/dist/components/counter/index.d.ts.map +1 -0
  21. package/dist/components/counter/primitives/counter-decrease.d.ts +4 -0
  22. package/dist/components/counter/primitives/counter-decrease.d.ts.map +1 -0
  23. package/dist/components/counter/primitives/counter-increase.d.ts +4 -0
  24. package/dist/components/counter/primitives/counter-increase.d.ts.map +1 -0
  25. package/dist/components/counter/primitives/counter-input.d.ts +4 -0
  26. package/dist/components/counter/primitives/counter-input.d.ts.map +1 -0
  27. package/dist/components/counter/primitives/counter-root.d.ts +16 -0
  28. package/dist/components/counter/primitives/counter-root.d.ts.map +1 -0
  29. package/dist/components/counter/primitives.d.ts +5 -0
  30. package/dist/components/counter/primitives.d.ts.map +1 -0
  31. package/dist/components/form-status/form-status.d.ts +27 -0
  32. package/dist/components/form-status/form-status.d.ts.map +1 -0
  33. package/dist/components/form-status/index.d.ts +3 -0
  34. package/dist/components/form-status/index.d.ts.map +1 -0
  35. package/dist/components/form-status/primitives/form-status-root.d.ts +7 -0
  36. package/dist/components/form-status/primitives/form-status-root.d.ts.map +1 -0
  37. package/dist/components/form-status/primitives.d.ts +2 -0
  38. package/dist/components/form-status/primitives.d.ts.map +1 -0
  39. package/dist/components/logo/index.d.ts +0 -1
  40. package/dist/components/logo/index.d.ts.map +1 -1
  41. package/dist/components/logo/primitives/logo-text.d.ts +3 -1
  42. package/dist/components/logo/primitives/logo-text.d.ts.map +1 -1
  43. package/dist/components/navigation-menu/index.d.ts +3 -0
  44. package/dist/components/navigation-menu/index.d.ts.map +1 -0
  45. package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
  46. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  47. package/dist/components/navigation-menu/primitives/navigation-menu-content.d.ts +5 -0
  48. package/dist/components/navigation-menu/primitives/navigation-menu-content.d.ts.map +1 -0
  49. package/dist/components/navigation-menu/primitives/navigation-menu-grid-column.d.ts +4 -0
  50. package/dist/components/navigation-menu/primitives/navigation-menu-grid-column.d.ts.map +1 -0
  51. package/dist/components/navigation-menu/primitives/navigation-menu-grid-label.d.ts +5 -0
  52. package/dist/components/navigation-menu/primitives/navigation-menu-grid-label.d.ts.map +1 -0
  53. package/dist/components/navigation-menu/primitives/navigation-menu-grid-link.d.ts +5 -0
  54. package/dist/components/navigation-menu/primitives/navigation-menu-grid-link.d.ts.map +1 -0
  55. package/dist/components/navigation-menu/primitives/navigation-menu-grid.d.ts +4 -0
  56. package/dist/components/navigation-menu/primitives/navigation-menu-grid.d.ts.map +1 -0
  57. package/dist/components/navigation-menu/primitives/navigation-menu-item.d.ts +5 -0
  58. package/dist/components/navigation-menu/primitives/navigation-menu-item.d.ts.map +1 -0
  59. package/dist/components/navigation-menu/primitives/navigation-menu-link.d.ts +5 -0
  60. package/dist/components/navigation-menu/primitives/navigation-menu-link.d.ts.map +1 -0
  61. package/dist/components/navigation-menu/primitives/navigation-menu-list.d.ts +5 -0
  62. package/dist/components/navigation-menu/primitives/navigation-menu-list.d.ts.map +1 -0
  63. package/dist/components/navigation-menu/primitives/navigation-menu-panel.d.ts +4 -0
  64. package/dist/components/navigation-menu/primitives/navigation-menu-panel.d.ts.map +1 -0
  65. package/dist/components/navigation-menu/primitives/navigation-menu-root.d.ts +8 -0
  66. package/dist/components/navigation-menu/primitives/navigation-menu-root.d.ts.map +1 -0
  67. package/dist/components/navigation-menu/primitives/navigation-menu-slot.d.ts +4 -0
  68. package/dist/components/navigation-menu/primitives/navigation-menu-slot.d.ts.map +1 -0
  69. package/dist/components/navigation-menu/primitives/navigation-menu-trigger.d.ts +5 -0
  70. package/dist/components/navigation-menu/primitives/navigation-menu-trigger.d.ts.map +1 -0
  71. package/dist/components/navigation-menu/primitives/navigation-menu-viewport.d.ts +5 -0
  72. package/dist/components/navigation-menu/primitives/navigation-menu-viewport.d.ts.map +1 -0
  73. package/dist/components/navigation-menu/primitives.d.ts +13 -0
  74. package/dist/components/navigation-menu/primitives.d.ts.map +1 -0
  75. package/dist/counter-input-BJov0Fub.cjs +2 -0
  76. package/dist/counter-input-BJov0Fub.cjs.map +1 -0
  77. package/dist/counter-input-hbz8NVA1.js +106 -0
  78. package/dist/counter-input-hbz8NVA1.js.map +1 -0
  79. package/dist/counter.cjs +2 -0
  80. package/dist/counter.cjs.map +1 -0
  81. package/dist/counter.js +9 -0
  82. package/dist/counter.js.map +1 -0
  83. package/dist/{dropdown-menu-node-zOplWIzZ.cjs → dropdown-menu-node-C0Oe_nJV.cjs} +3 -3
  84. package/dist/{dropdown-menu-node-zOplWIzZ.cjs.map → dropdown-menu-node-C0Oe_nJV.cjs.map} +1 -1
  85. package/dist/{dropdown-menu-node-4Pe3uXjC.js → dropdown-menu-node-CrYNKRZ0.js} +20 -19
  86. package/dist/{dropdown-menu-node-4Pe3uXjC.js.map → dropdown-menu-node-CrYNKRZ0.js.map} +1 -1
  87. package/dist/dropdown-menu.cjs +1 -1
  88. package/dist/dropdown-menu.js +1 -1
  89. package/dist/form-status.cjs +2 -0
  90. package/dist/form-status.cjs.map +1 -0
  91. package/dist/form-status.js +33 -0
  92. package/dist/form-status.js.map +1 -0
  93. package/dist/index-BSyIT6yC.cjs +2 -0
  94. package/dist/index-BSyIT6yC.cjs.map +1 -0
  95. package/dist/index-BZPx6jYI.js +9 -0
  96. package/dist/index-BZPx6jYI.js.map +1 -0
  97. package/dist/index-CY_4_uMy.cjs +6 -0
  98. package/dist/{index-BppAzNV8.cjs.map → index-CY_4_uMy.cjs.map} +1 -1
  99. package/dist/index-DYxWvftI.cjs +2 -0
  100. package/dist/index-DYxWvftI.cjs.map +1 -0
  101. package/dist/index-DoAIVWjZ.js +135 -0
  102. package/dist/index-DoAIVWjZ.js.map +1 -0
  103. package/dist/{index-ChSlzMYI.js → index-DthUnpqb.js} +17 -16
  104. package/dist/{index-ChSlzMYI.js.map → index-DthUnpqb.js.map} +1 -1
  105. package/dist/index.cjs +16 -6
  106. package/dist/index.cjs.map +1 -1
  107. package/dist/index.d.ts +2 -1
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +887 -832
  110. package/dist/index.js.map +1 -1
  111. package/dist/logo-skeleton-CgTRdVwc.js +44 -0
  112. package/dist/logo-skeleton-CgTRdVwc.js.map +1 -0
  113. package/dist/logo-skeleton-CpbzziY-.cjs +2 -0
  114. package/dist/logo-skeleton-CpbzziY-.cjs.map +1 -0
  115. package/dist/logo.cjs +1 -1
  116. package/dist/logo.cjs.map +1 -1
  117. package/dist/logo.js +4 -10
  118. package/dist/logo.js.map +1 -1
  119. package/dist/{modal-title-CuB6IpxH.cjs → modal-title-BrR2NosO.cjs} +2 -2
  120. package/dist/{modal-title-CuB6IpxH.cjs.map → modal-title-BrR2NosO.cjs.map} +1 -1
  121. package/dist/{modal-title-MIH3Xsp2.js → modal-title-ji5CKbNn.js} +2 -2
  122. package/dist/{modal-title-MIH3Xsp2.js.map → modal-title-ji5CKbNn.js.map} +1 -1
  123. package/dist/modal.cjs +1 -1
  124. package/dist/modal.js +1 -1
  125. package/dist/navigation-menu.cjs +2 -0
  126. package/dist/navigation-menu.cjs.map +1 -0
  127. package/dist/navigation-menu.js +880 -0
  128. package/dist/navigation-menu.js.map +1 -0
  129. package/dist/{product-card-label-D43AXtRL.cjs → product-card-label-B1EwGQhM.cjs} +2 -2
  130. package/dist/{product-card-label-D43AXtRL.cjs.map → product-card-label-B1EwGQhM.cjs.map} +1 -1
  131. package/dist/{product-card-label-CJmC9ICf.js → product-card-label-Djn5qQC4.js} +3 -3
  132. package/dist/{product-card-label-CJmC9ICf.js.map → product-card-label-Djn5qQC4.js.map} +1 -1
  133. package/dist/{product-card-skeleton-CCQkDMNl.cjs → product-card-skeleton-B2lGkIgo.cjs} +2 -2
  134. package/dist/{product-card-skeleton-CCQkDMNl.cjs.map → product-card-skeleton-B2lGkIgo.cjs.map} +1 -1
  135. package/dist/{product-card-skeleton-Dkqf-bfA.js → product-card-skeleton-Rvy8Ocb0.js} +2 -2
  136. package/dist/{product-card-skeleton-Dkqf-bfA.js.map → product-card-skeleton-Rvy8Ocb0.js.map} +1 -1
  137. package/dist/product-card.cjs +1 -1
  138. package/dist/product-card.js +2 -2
  139. package/dist/{side-panel-close-DVJwOxdM.js → side-panel-close-BtypdE9q.js} +2 -2
  140. package/dist/{side-panel-close-DVJwOxdM.js.map → side-panel-close-BtypdE9q.js.map} +1 -1
  141. package/dist/{side-panel-close-Bjcn4BEE.cjs → side-panel-close-DIP8gLRZ.cjs} +2 -2
  142. package/dist/{side-panel-close-Bjcn4BEE.cjs.map → side-panel-close-DIP8gLRZ.cjs.map} +1 -1
  143. package/dist/side-panel.cjs +1 -1
  144. package/dist/side-panel.js +1 -1
  145. package/package.json +31 -1
  146. package/dist/Combination-49q9aXeT.js +0 -801
  147. package/dist/Combination-49q9aXeT.js.map +0 -1
  148. package/dist/Combination-DAFZFTdA.cjs +0 -42
  149. package/dist/Combination-DAFZFTdA.cjs.map +0 -1
  150. package/dist/checkbox-root-B9W2Y8rY.js.map +0 -1
  151. package/dist/checkbox-root-g9HcYZCP.cjs +0 -2
  152. package/dist/checkbox-root-g9HcYZCP.cjs.map +0 -1
  153. package/dist/components/logo/logo.d.ts +0 -32
  154. package/dist/components/logo/logo.d.ts.map +0 -1
  155. package/dist/index-BppAzNV8.cjs +0 -6
  156. package/dist/logo-text-CK4vcNPY.js +0 -39
  157. package/dist/logo-text-CK4vcNPY.js.map +0 -1
  158. package/dist/logo-text-Db3yd3b1.cjs +0 -2
  159. package/dist/logo-text-Db3yd3b1.cjs.map +0 -1
  160. package/dist/minus-BJih_7bh.cjs +0 -7
  161. package/dist/minus-BJih_7bh.cjs.map +0 -1
  162. package/dist/minus-B_YS3-aV.js +0 -13
  163. package/dist/minus-B_YS3-aV.js.map +0 -1
  164. package/dist/plus-DNl2AbQ2.js +0 -16
  165. package/dist/plus-DNl2AbQ2.js.map +0 -1
  166. package/dist/plus-De3UvuAJ.cjs +0 -7
  167. package/dist/plus-De3UvuAJ.cjs.map +0 -1
@@ -0,0 +1,674 @@
1
+ import * as u from "react";
2
+ import { useState as he } from "react";
3
+ import { u as me } from "./index-DLcqcWxM.js";
4
+ import { P as pe } from "./index-BzgbBl8b.js";
5
+ import { u as z } from "./index-0ioNhtNM.js";
6
+ import { jsx as ge } from "react/jsx-runtime";
7
+ var U = 0;
8
+ function gt() {
9
+ u.useEffect(() => {
10
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
11
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Z()), document.body.insertAdjacentElement("beforeend", e[1] ?? Z()), U++, () => {
12
+ U === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), U--;
13
+ };
14
+ }, []);
15
+ }
16
+ function Z() {
17
+ const e = document.createElement("span");
18
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
19
+ }
20
+ var _ = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q = { bubbles: !1, cancelable: !0 }, ye = "FocusScope", be = u.forwardRef((e, t) => {
21
+ const {
22
+ loop: n = !1,
23
+ trapped: r = !1,
24
+ onMountAutoFocus: c,
25
+ onUnmountAutoFocus: i,
26
+ ...s
27
+ } = e, [a, S] = u.useState(null), b = z(c), g = z(i), f = u.useRef(null), v = me(t, (o) => S(o)), h = u.useRef({
28
+ paused: !1,
29
+ pause() {
30
+ this.paused = !0;
31
+ },
32
+ resume() {
33
+ this.paused = !1;
34
+ }
35
+ }).current;
36
+ u.useEffect(() => {
37
+ if (r) {
38
+ let o = function(p) {
39
+ if (h.paused || !a) return;
40
+ const y = p.target;
41
+ a.contains(y) ? f.current = y : k(f.current, { select: !0 });
42
+ }, l = function(p) {
43
+ if (h.paused || !a) return;
44
+ const y = p.relatedTarget;
45
+ y !== null && (a.contains(y) || k(f.current, { select: !0 }));
46
+ }, d = function(p) {
47
+ if (document.activeElement === document.body)
48
+ for (const E of p)
49
+ E.removedNodes.length > 0 && k(a);
50
+ };
51
+ document.addEventListener("focusin", o), document.addEventListener("focusout", l);
52
+ const m = new MutationObserver(d);
53
+ return a && m.observe(a, { childList: !0, subtree: !0 }), () => {
54
+ document.removeEventListener("focusin", o), document.removeEventListener("focusout", l), m.disconnect();
55
+ };
56
+ }
57
+ }, [r, a, h.paused]), u.useEffect(() => {
58
+ if (a) {
59
+ $.add(h);
60
+ const o = document.activeElement;
61
+ if (!a.contains(o)) {
62
+ const d = new CustomEvent(_, q);
63
+ a.addEventListener(_, b), a.dispatchEvent(d), d.defaultPrevented || (Ee(ke(oe(a)), { select: !0 }), document.activeElement === o && k(a));
64
+ }
65
+ return () => {
66
+ a.removeEventListener(_, b), setTimeout(() => {
67
+ const d = new CustomEvent(j, q);
68
+ a.addEventListener(j, g), a.dispatchEvent(d), d.defaultPrevented || k(o ?? document.body, { select: !0 }), a.removeEventListener(j, g), $.remove(h);
69
+ }, 0);
70
+ };
71
+ }
72
+ }, [a, b, g, h]);
73
+ const w = u.useCallback(
74
+ (o) => {
75
+ if (!n && !r || h.paused) return;
76
+ const l = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
77
+ if (l && d) {
78
+ const m = o.currentTarget, [p, y] = Se(m);
79
+ p && y ? !o.shiftKey && d === y ? (o.preventDefault(), n && k(p, { select: !0 })) : o.shiftKey && d === p && (o.preventDefault(), n && k(y, { select: !0 })) : d === m && o.preventDefault();
80
+ }
81
+ },
82
+ [n, r, h.paused]
83
+ );
84
+ return /* @__PURE__ */ ge(pe.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
85
+ });
86
+ be.displayName = ye;
87
+ function Ee(e, { select: t = !1 } = {}) {
88
+ const n = document.activeElement;
89
+ for (const r of e)
90
+ if (k(r, { select: t }), document.activeElement !== n) return;
91
+ }
92
+ function Se(e) {
93
+ const t = oe(e), n = Q(t, e), r = Q(t.reverse(), e);
94
+ return [n, r];
95
+ }
96
+ function oe(e) {
97
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
98
+ acceptNode: (r) => {
99
+ const c = r.tagName === "INPUT" && r.type === "hidden";
100
+ return r.disabled || r.hidden || c ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
101
+ }
102
+ });
103
+ for (; n.nextNode(); ) t.push(n.currentNode);
104
+ return t;
105
+ }
106
+ function Q(e, t) {
107
+ for (const n of e)
108
+ if (!we(n, { upTo: t })) return n;
109
+ }
110
+ function we(e, { upTo: t }) {
111
+ if (getComputedStyle(e).visibility === "hidden") return !0;
112
+ for (; e; ) {
113
+ if (t !== void 0 && e === t) return !1;
114
+ if (getComputedStyle(e).display === "none") return !0;
115
+ e = e.parentElement;
116
+ }
117
+ return !1;
118
+ }
119
+ function Ce(e) {
120
+ return e instanceof HTMLInputElement && "select" in e;
121
+ }
122
+ function k(e, { select: t = !1 } = {}) {
123
+ if (e && e.focus) {
124
+ const n = document.activeElement;
125
+ e.focus({ preventScroll: !0 }), e !== n && Ce(e) && t && e.select();
126
+ }
127
+ }
128
+ var $ = Re();
129
+ function Re() {
130
+ let e = [];
131
+ return {
132
+ add(t) {
133
+ const n = e[0];
134
+ t !== n && n?.pause(), e = J(e, t), e.unshift(t);
135
+ },
136
+ remove(t) {
137
+ e = J(e, t), e[0]?.resume();
138
+ }
139
+ };
140
+ }
141
+ function J(e, t) {
142
+ const n = [...e], r = n.indexOf(t);
143
+ return r !== -1 && n.splice(r, 1), n;
144
+ }
145
+ function ke(e) {
146
+ return e.filter((t) => t.tagName !== "A");
147
+ }
148
+ var Ae = function(e) {
149
+ if (typeof document > "u")
150
+ return null;
151
+ var t = Array.isArray(e) ? e[0] : e;
152
+ return t.ownerDocument.body;
153
+ }, T = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), L = {}, K = 0, ce = function(e) {
154
+ return e && (e.host || ce(e.parentNode));
155
+ }, Te = function(e, t) {
156
+ return t.map(function(n) {
157
+ if (e.contains(n))
158
+ return n;
159
+ var r = ce(n);
160
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
161
+ }).filter(function(n) {
162
+ return !!n;
163
+ });
164
+ }, Ne = function(e, t, n, r) {
165
+ var c = Te(t, Array.isArray(e) ? e : [e]);
166
+ L[n] || (L[n] = /* @__PURE__ */ new WeakMap());
167
+ var i = L[n], s = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
168
+ !f || a.has(f) || (a.add(f), b(f.parentNode));
169
+ };
170
+ c.forEach(b);
171
+ var g = function(f) {
172
+ !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
173
+ if (a.has(v))
174
+ g(v);
175
+ else
176
+ try {
177
+ var h = v.getAttribute(r), w = h !== null && h !== "false", o = (T.get(v) || 0) + 1, l = (i.get(v) || 0) + 1;
178
+ T.set(v, o), i.set(v, l), s.push(v), o === 1 && w && O.set(v, !0), l === 1 && v.setAttribute(n, "true"), w || v.setAttribute(r, "true");
179
+ } catch (d) {
180
+ console.error("aria-hidden: cannot operate on ", v, d);
181
+ }
182
+ });
183
+ };
184
+ return g(t), a.clear(), K++, function() {
185
+ s.forEach(function(f) {
186
+ var v = T.get(f) - 1, h = i.get(f) - 1;
187
+ T.set(f, v), i.set(f, h), v || (O.has(f) || f.removeAttribute(r), O.delete(f)), h || f.removeAttribute(n);
188
+ }), K--, K || (T = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), L = {});
189
+ };
190
+ }, yt = function(e, t, n) {
191
+ n === void 0 && (n = "data-aria-hidden");
192
+ var r = Array.from(Array.isArray(e) ? e : [e]), c = Ae(e);
193
+ return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), Ne(r, c, n, "aria-hidden")) : function() {
194
+ return null;
195
+ };
196
+ }, C = function() {
197
+ return C = Object.assign || function(t) {
198
+ for (var n, r = 1, c = arguments.length; r < c; r++) {
199
+ n = arguments[r];
200
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
201
+ }
202
+ return t;
203
+ }, C.apply(this, arguments);
204
+ };
205
+ function ue(e, t) {
206
+ var n = {};
207
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
208
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
209
+ for (var c = 0, r = Object.getOwnPropertySymbols(e); c < r.length; c++)
210
+ t.indexOf(r[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[c]) && (n[r[c]] = e[r[c]]);
211
+ return n;
212
+ }
213
+ function Me(e, t, n) {
214
+ if (n || arguments.length === 2) for (var r = 0, c = t.length, i; r < c; r++)
215
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
216
+ return e.concat(i || Array.prototype.slice.call(t));
217
+ }
218
+ var W = "right-scroll-bar-position", B = "width-before-scroll-bar", Fe = "with-scroll-bars-hidden", Pe = "--removed-body-scroll-bar-size";
219
+ function H(e, t) {
220
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
221
+ }
222
+ function Oe(e, t) {
223
+ var n = he(function() {
224
+ return {
225
+ // value
226
+ value: e,
227
+ // last callback
228
+ callback: t,
229
+ // "memoized" public interface
230
+ facade: {
231
+ get current() {
232
+ return n.value;
233
+ },
234
+ set current(r) {
235
+ var c = n.value;
236
+ c !== r && (n.value = r, n.callback(r, c));
237
+ }
238
+ }
239
+ };
240
+ })[0];
241
+ return n.callback = t, n.facade;
242
+ }
243
+ var Le = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
244
+ function Ie(e, t) {
245
+ var n = Oe(null, function(r) {
246
+ return e.forEach(function(c) {
247
+ return H(c, r);
248
+ });
249
+ });
250
+ return Le(function() {
251
+ var r = ee.get(n);
252
+ if (r) {
253
+ var c = new Set(r), i = new Set(e), s = n.current;
254
+ c.forEach(function(a) {
255
+ i.has(a) || H(a, null);
256
+ }), i.forEach(function(a) {
257
+ c.has(a) || H(a, s);
258
+ });
259
+ }
260
+ ee.set(n, e);
261
+ }, [e]), n;
262
+ }
263
+ function xe(e) {
264
+ return e;
265
+ }
266
+ function We(e, t) {
267
+ t === void 0 && (t = xe);
268
+ var n = [], r = !1, c = {
269
+ read: function() {
270
+ if (r)
271
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
272
+ return n.length ? n[n.length - 1] : e;
273
+ },
274
+ useMedium: function(i) {
275
+ var s = t(i, r);
276
+ return n.push(s), function() {
277
+ n = n.filter(function(a) {
278
+ return a !== s;
279
+ });
280
+ };
281
+ },
282
+ assignSyncMedium: function(i) {
283
+ for (r = !0; n.length; ) {
284
+ var s = n;
285
+ n = [], s.forEach(i);
286
+ }
287
+ n = {
288
+ push: function(a) {
289
+ return i(a);
290
+ },
291
+ filter: function() {
292
+ return n;
293
+ }
294
+ };
295
+ },
296
+ assignMedium: function(i) {
297
+ r = !0;
298
+ var s = [];
299
+ if (n.length) {
300
+ var a = n;
301
+ n = [], a.forEach(i), s = n;
302
+ }
303
+ var S = function() {
304
+ var g = s;
305
+ s = [], g.forEach(i);
306
+ }, b = function() {
307
+ return Promise.resolve().then(S);
308
+ };
309
+ b(), n = {
310
+ push: function(g) {
311
+ s.push(g), b();
312
+ },
313
+ filter: function(g) {
314
+ return s = s.filter(g), n;
315
+ }
316
+ };
317
+ }
318
+ };
319
+ return c;
320
+ }
321
+ function Be(e) {
322
+ e === void 0 && (e = {});
323
+ var t = We(null);
324
+ return t.options = C({ async: !0, ssr: !1 }, e), t;
325
+ }
326
+ var ie = function(e) {
327
+ var t = e.sideCar, n = ue(e, ["sideCar"]);
328
+ if (!t)
329
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
330
+ var r = t.read();
331
+ if (!r)
332
+ throw new Error("Sidecar medium not found");
333
+ return u.createElement(r, C({}, n));
334
+ };
335
+ ie.isSideCarExport = !0;
336
+ function De(e, t) {
337
+ return e.useMedium(t), ie;
338
+ }
339
+ var le = Be(), V = function() {
340
+ }, D = u.forwardRef(function(e, t) {
341
+ var n = u.useRef(null), r = u.useState({
342
+ onScrollCapture: V,
343
+ onWheelCapture: V,
344
+ onTouchMoveCapture: V
345
+ }), c = r[0], i = r[1], s = e.forwardProps, a = e.children, S = e.className, b = e.removeScrollBar, g = e.enabled, f = e.shards, v = e.sideCar, h = e.noRelative, w = e.noIsolation, o = e.inert, l = e.allowPinchZoom, d = e.as, m = d === void 0 ? "div" : d, p = e.gapMode, y = ue(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, A = Ie([n, t]), R = C(C({}, y), c);
346
+ return u.createElement(
347
+ u.Fragment,
348
+ null,
349
+ g && u.createElement(E, { sideCar: le, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: p }),
350
+ s ? u.cloneElement(u.Children.only(a), C(C({}, R), { ref: A })) : u.createElement(m, C({}, R, { className: S, ref: A }), a)
351
+ );
352
+ });
353
+ D.defaultProps = {
354
+ enabled: !0,
355
+ removeScrollBar: !0,
356
+ inert: !1
357
+ };
358
+ D.classNames = {
359
+ fullWidth: B,
360
+ zeroRight: W
361
+ };
362
+ var Ue = function() {
363
+ if (typeof __webpack_nonce__ < "u")
364
+ return __webpack_nonce__;
365
+ };
366
+ function _e() {
367
+ if (!document)
368
+ return null;
369
+ var e = document.createElement("style");
370
+ e.type = "text/css";
371
+ var t = Ue();
372
+ return t && e.setAttribute("nonce", t), e;
373
+ }
374
+ function je(e, t) {
375
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
376
+ }
377
+ function Ke(e) {
378
+ var t = document.head || document.getElementsByTagName("head")[0];
379
+ t.appendChild(e);
380
+ }
381
+ var He = function() {
382
+ var e = 0, t = null;
383
+ return {
384
+ add: function(n) {
385
+ e == 0 && (t = _e()) && (je(t, n), Ke(t)), e++;
386
+ },
387
+ remove: function() {
388
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
389
+ }
390
+ };
391
+ }, Ve = function() {
392
+ var e = He();
393
+ return function(t, n) {
394
+ u.useEffect(function() {
395
+ return e.add(t), function() {
396
+ e.remove();
397
+ };
398
+ }, [t && n]);
399
+ };
400
+ }, se = function() {
401
+ var e = Ve(), t = function(n) {
402
+ var r = n.styles, c = n.dynamic;
403
+ return e(r, c), null;
404
+ };
405
+ return t;
406
+ }, Xe = {
407
+ left: 0,
408
+ top: 0,
409
+ right: 0,
410
+ gap: 0
411
+ }, X = function(e) {
412
+ return parseInt(e || "", 10) || 0;
413
+ }, Ye = function(e) {
414
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
415
+ return [X(n), X(r), X(c)];
416
+ }, Ge = function(e) {
417
+ if (e === void 0 && (e = "margin"), typeof window > "u")
418
+ return Xe;
419
+ var t = Ye(e), n = document.documentElement.clientWidth, r = window.innerWidth;
420
+ return {
421
+ left: t[0],
422
+ top: t[1],
423
+ right: t[2],
424
+ gap: Math.max(0, r - n + t[2] - t[0])
425
+ };
426
+ }, ze = se(), F = "data-scroll-locked", Ze = function(e, t, n, r) {
427
+ var c = e.left, i = e.top, s = e.right, a = e.gap;
428
+ return n === void 0 && (n = "margin"), `
429
+ .`.concat(Fe, ` {
430
+ overflow: hidden `).concat(r, `;
431
+ padding-right: `).concat(a, "px ").concat(r, `;
432
+ }
433
+ body[`).concat(F, `] {
434
+ overflow: hidden `).concat(r, `;
435
+ overscroll-behavior: contain;
436
+ `).concat([
437
+ t && "position: relative ".concat(r, ";"),
438
+ n === "margin" && `
439
+ padding-left: `.concat(c, `px;
440
+ padding-top: `).concat(i, `px;
441
+ padding-right: `).concat(s, `px;
442
+ margin-left:0;
443
+ margin-top:0;
444
+ margin-right: `).concat(a, "px ").concat(r, `;
445
+ `),
446
+ n === "padding" && "padding-right: ".concat(a, "px ").concat(r, ";")
447
+ ].filter(Boolean).join(""), `
448
+ }
449
+
450
+ .`).concat(W, ` {
451
+ right: `).concat(a, "px ").concat(r, `;
452
+ }
453
+
454
+ .`).concat(B, ` {
455
+ margin-right: `).concat(a, "px ").concat(r, `;
456
+ }
457
+
458
+ .`).concat(W, " .").concat(W, ` {
459
+ right: 0 `).concat(r, `;
460
+ }
461
+
462
+ .`).concat(B, " .").concat(B, ` {
463
+ margin-right: 0 `).concat(r, `;
464
+ }
465
+
466
+ body[`).concat(F, `] {
467
+ `).concat(Pe, ": ").concat(a, `px;
468
+ }
469
+ `);
470
+ }, te = function() {
471
+ var e = parseInt(document.body.getAttribute(F) || "0", 10);
472
+ return isFinite(e) ? e : 0;
473
+ }, qe = function() {
474
+ u.useEffect(function() {
475
+ return document.body.setAttribute(F, (te() + 1).toString()), function() {
476
+ var e = te() - 1;
477
+ e <= 0 ? document.body.removeAttribute(F) : document.body.setAttribute(F, e.toString());
478
+ };
479
+ }, []);
480
+ }, Qe = function(e) {
481
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, c = r === void 0 ? "margin" : r;
482
+ qe();
483
+ var i = u.useMemo(function() {
484
+ return Ge(c);
485
+ }, [c]);
486
+ return u.createElement(ze, { styles: Ze(i, !t, c, n ? "" : "!important") });
487
+ }, Y = !1;
488
+ if (typeof window < "u")
489
+ try {
490
+ var I = Object.defineProperty({}, "passive", {
491
+ get: function() {
492
+ return Y = !0, !0;
493
+ }
494
+ });
495
+ window.addEventListener("test", I, I), window.removeEventListener("test", I, I);
496
+ } catch {
497
+ Y = !1;
498
+ }
499
+ var N = Y ? { passive: !1 } : !1, $e = function(e) {
500
+ return e.tagName === "TEXTAREA";
501
+ }, fe = function(e, t) {
502
+ if (!(e instanceof Element))
503
+ return !1;
504
+ var n = window.getComputedStyle(e);
505
+ return (
506
+ // not-not-scrollable
507
+ n[t] !== "hidden" && // contains scroll inside self
508
+ !(n.overflowY === n.overflowX && !$e(e) && n[t] === "visible")
509
+ );
510
+ }, Je = function(e) {
511
+ return fe(e, "overflowY");
512
+ }, et = function(e) {
513
+ return fe(e, "overflowX");
514
+ }, ne = function(e, t) {
515
+ var n = t.ownerDocument, r = t;
516
+ do {
517
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
518
+ var c = de(e, r);
519
+ if (c) {
520
+ var i = ve(e, r), s = i[1], a = i[2];
521
+ if (s > a)
522
+ return !0;
523
+ }
524
+ r = r.parentNode;
525
+ } while (r && r !== n.body);
526
+ return !1;
527
+ }, tt = function(e) {
528
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
529
+ return [
530
+ t,
531
+ n,
532
+ r
533
+ ];
534
+ }, nt = function(e) {
535
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
536
+ return [
537
+ t,
538
+ n,
539
+ r
540
+ ];
541
+ }, de = function(e, t) {
542
+ return e === "v" ? Je(t) : et(t);
543
+ }, ve = function(e, t) {
544
+ return e === "v" ? tt(t) : nt(t);
545
+ }, rt = function(e, t) {
546
+ return e === "h" && t === "rtl" ? -1 : 1;
547
+ }, at = function(e, t, n, r, c) {
548
+ var i = rt(e, window.getComputedStyle(t).direction), s = i * r, a = n.target, S = t.contains(a), b = !1, g = s > 0, f = 0, v = 0;
549
+ do {
550
+ if (!a)
551
+ break;
552
+ var h = ve(e, a), w = h[0], o = h[1], l = h[2], d = o - l - i * w;
553
+ (w || d) && de(e, a) && (f += d, v += w);
554
+ var m = a.parentNode;
555
+ a = m && m.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? m.host : m;
556
+ } while (
557
+ // portaled content
558
+ !S && a !== document.body || // self content
559
+ S && (t.contains(a) || t === a)
560
+ );
561
+ return (g && Math.abs(f) < 1 || !g && Math.abs(v) < 1) && (b = !0), b;
562
+ }, x = function(e) {
563
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
564
+ }, re = function(e) {
565
+ return [e.deltaX, e.deltaY];
566
+ }, ae = function(e) {
567
+ return e && "current" in e ? e.current : e;
568
+ }, ot = function(e, t) {
569
+ return e[0] === t[0] && e[1] === t[1];
570
+ }, ct = function(e) {
571
+ return `
572
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
573
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
574
+ `);
575
+ }, ut = 0, M = [];
576
+ function it(e) {
577
+ var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(ut++)[0], i = u.useState(se)[0], s = u.useRef(e);
578
+ u.useEffect(function() {
579
+ s.current = e;
580
+ }, [e]), u.useEffect(function() {
581
+ if (e.inert) {
582
+ document.body.classList.add("block-interactivity-".concat(c));
583
+ var o = Me([e.lockRef.current], (e.shards || []).map(ae), !0).filter(Boolean);
584
+ return o.forEach(function(l) {
585
+ return l.classList.add("allow-interactivity-".concat(c));
586
+ }), function() {
587
+ document.body.classList.remove("block-interactivity-".concat(c)), o.forEach(function(l) {
588
+ return l.classList.remove("allow-interactivity-".concat(c));
589
+ });
590
+ };
591
+ }
592
+ }, [e.inert, e.lockRef.current, e.shards]);
593
+ var a = u.useCallback(function(o, l) {
594
+ if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
595
+ return !s.current.allowPinchZoom;
596
+ var d = x(o), m = n.current, p = "deltaX" in o ? o.deltaX : m[0] - d[0], y = "deltaY" in o ? o.deltaY : m[1] - d[1], E, A = o.target, R = Math.abs(p) > Math.abs(y) ? "h" : "v";
597
+ if ("touches" in o && R === "h" && A.type === "range")
598
+ return !1;
599
+ var P = ne(R, A);
600
+ if (!P)
601
+ return !0;
602
+ if (P ? E = R : (E = R === "v" ? "h" : "v", P = ne(R, A)), !P)
603
+ return !1;
604
+ if (!r.current && "changedTouches" in o && (p || y) && (r.current = E), !E)
605
+ return !0;
606
+ var G = r.current || E;
607
+ return at(G, l, o, G === "h" ? p : y);
608
+ }, []), S = u.useCallback(function(o) {
609
+ var l = o;
610
+ if (!(!M.length || M[M.length - 1] !== i)) {
611
+ var d = "deltaY" in l ? re(l) : x(l), m = t.current.filter(function(E) {
612
+ return E.name === l.type && (E.target === l.target || l.target === E.shadowParent) && ot(E.delta, d);
613
+ })[0];
614
+ if (m && m.should) {
615
+ l.cancelable && l.preventDefault();
616
+ return;
617
+ }
618
+ if (!m) {
619
+ var p = (s.current.shards || []).map(ae).filter(Boolean).filter(function(E) {
620
+ return E.contains(l.target);
621
+ }), y = p.length > 0 ? a(l, p[0]) : !s.current.noIsolation;
622
+ y && l.cancelable && l.preventDefault();
623
+ }
624
+ }
625
+ }, []), b = u.useCallback(function(o, l, d, m) {
626
+ var p = { name: o, delta: l, target: d, should: m, shadowParent: lt(d) };
627
+ t.current.push(p), setTimeout(function() {
628
+ t.current = t.current.filter(function(y) {
629
+ return y !== p;
630
+ });
631
+ }, 1);
632
+ }, []), g = u.useCallback(function(o) {
633
+ n.current = x(o), r.current = void 0;
634
+ }, []), f = u.useCallback(function(o) {
635
+ b(o.type, re(o), o.target, a(o, e.lockRef.current));
636
+ }, []), v = u.useCallback(function(o) {
637
+ b(o.type, x(o), o.target, a(o, e.lockRef.current));
638
+ }, []);
639
+ u.useEffect(function() {
640
+ return M.push(i), e.setCallbacks({
641
+ onScrollCapture: f,
642
+ onWheelCapture: f,
643
+ onTouchMoveCapture: v
644
+ }), document.addEventListener("wheel", S, N), document.addEventListener("touchmove", S, N), document.addEventListener("touchstart", g, N), function() {
645
+ M = M.filter(function(o) {
646
+ return o !== i;
647
+ }), document.removeEventListener("wheel", S, N), document.removeEventListener("touchmove", S, N), document.removeEventListener("touchstart", g, N);
648
+ };
649
+ }, []);
650
+ var h = e.removeScrollBar, w = e.inert;
651
+ return u.createElement(
652
+ u.Fragment,
653
+ null,
654
+ w ? u.createElement(i, { styles: ct(c) }) : null,
655
+ h ? u.createElement(Qe, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
656
+ );
657
+ }
658
+ function lt(e) {
659
+ for (var t = null; e !== null; )
660
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
661
+ return t;
662
+ }
663
+ const st = De(le, it);
664
+ var ft = u.forwardRef(function(e, t) {
665
+ return u.createElement(D, C({}, e, { ref: t, sideCar: st }));
666
+ });
667
+ ft.classNames = D.classNames;
668
+ export {
669
+ be as F,
670
+ ft as R,
671
+ yt as h,
672
+ gt as u
673
+ };
674
+ //# sourceMappingURL=Combination-BYVrsWzR.js.map