@anoki/fse-ui 1.0.761 → 1.0.762

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 (191) hide show
  1. package/dist/index.cjs197.js +1 -1
  2. package/dist/index.cjs197.js.map +1 -1
  3. package/dist/index.cjs198.js +1 -1
  4. package/dist/index.cjs198.js.map +1 -1
  5. package/dist/index.cjs202.js +1 -1
  6. package/dist/index.cjs202.js.map +1 -1
  7. package/dist/index.cjs211.js +1 -1
  8. package/dist/index.cjs211.js.map +1 -1
  9. package/dist/index.cjs215.js +1 -1
  10. package/dist/index.cjs215.js.map +1 -1
  11. package/dist/index.cjs220.js +1 -1
  12. package/dist/index.cjs227.js +1 -1
  13. package/dist/index.cjs23.js +1 -1
  14. package/dist/index.cjs23.js.map +1 -1
  15. package/dist/index.cjs270.js +1 -1
  16. package/dist/index.cjs283.js +1 -1
  17. package/dist/index.cjs288.js +1 -1
  18. package/dist/index.cjs295.js +1 -1
  19. package/dist/index.cjs370.js +1 -1
  20. package/dist/index.cjs371.js +1 -1
  21. package/dist/index.cjs381.js +1 -1
  22. package/dist/index.cjs389.js +1 -1
  23. package/dist/index.cjs390.js +3 -12
  24. package/dist/index.cjs390.js.map +1 -1
  25. package/dist/index.cjs391.js +27 -1
  26. package/dist/index.cjs391.js.map +1 -1
  27. package/dist/index.cjs392.js +1 -2
  28. package/dist/index.cjs392.js.map +1 -1
  29. package/dist/index.cjs393.js +1 -27
  30. package/dist/index.cjs393.js.map +1 -1
  31. package/dist/index.cjs394.js +1 -1
  32. package/dist/index.cjs394.js.map +1 -1
  33. package/dist/index.cjs395.js +2 -1
  34. package/dist/index.cjs395.js.map +1 -1
  35. package/dist/index.cjs399.js +1 -1
  36. package/dist/index.cjs401.js +1 -1
  37. package/dist/index.cjs402.js +1 -1
  38. package/dist/index.cjs408.js +1 -1
  39. package/dist/index.cjs409.js +1 -1
  40. package/dist/index.cjs410.js +1 -1
  41. package/dist/index.cjs410.js.map +1 -1
  42. package/dist/index.cjs412.js +1 -1
  43. package/dist/index.cjs412.js.map +1 -1
  44. package/dist/index.cjs416.js +1 -1
  45. package/dist/index.cjs417.js +1 -1
  46. package/dist/index.cjs418.js +1 -1
  47. package/dist/index.cjs431.js +2 -0
  48. package/dist/index.cjs431.js.map +1 -0
  49. package/dist/index.cjs432.js +2 -0
  50. package/dist/index.cjs432.js.map +1 -0
  51. package/dist/{index.cjs437.js → index.cjs433.js} +1 -1
  52. package/dist/{index.cjs437.js.map → index.cjs433.js.map} +1 -1
  53. package/dist/{index.cjs438.js → index.cjs434.js} +2 -2
  54. package/dist/{index.cjs438.js.map → index.cjs434.js.map} +1 -1
  55. package/dist/index.cjs435.js +1 -1
  56. package/dist/index.cjs435.js.map +1 -1
  57. package/dist/index.cjs436.js +1 -1
  58. package/dist/index.cjs436.js.map +1 -1
  59. package/dist/index.cjs441.js +1 -1
  60. package/dist/index.cjs457.js +1 -1
  61. package/dist/index.cjs458.js +1 -1
  62. package/dist/index.cjs463.js +2 -0
  63. package/dist/index.cjs463.js.map +1 -0
  64. package/dist/index.cjs464.js +2 -0
  65. package/dist/index.cjs464.js.map +1 -0
  66. package/dist/index.cjs465.js +1 -1
  67. package/dist/index.cjs465.js.map +1 -1
  68. package/dist/index.cjs466.js +1 -1
  69. package/dist/index.cjs466.js.map +1 -1
  70. package/dist/index.cjs469.js +1 -1
  71. package/dist/index.cjs472.js +1 -1
  72. package/dist/index.cjs479.js +1 -1
  73. package/dist/index.cjs480.js +2 -0
  74. package/dist/index.cjs480.js.map +1 -0
  75. package/dist/index.cjs481.js +2 -0
  76. package/dist/index.cjs481.js.map +1 -0
  77. package/dist/index.cjs482.js +1 -1
  78. package/dist/index.cjs482.js.map +1 -1
  79. package/dist/index.cjs483.js +1 -1
  80. package/dist/index.cjs483.js.map +1 -1
  81. package/dist/index.cjs496.js +1 -1
  82. package/dist/index.es197.js +76 -71
  83. package/dist/index.es197.js.map +1 -1
  84. package/dist/index.es198.js +11 -1
  85. package/dist/index.es198.js.map +1 -1
  86. package/dist/index.es202.js +63 -58
  87. package/dist/index.es202.js.map +1 -1
  88. package/dist/index.es211.js +29 -26
  89. package/dist/index.es211.js.map +1 -1
  90. package/dist/index.es215.js +18 -15
  91. package/dist/index.es215.js.map +1 -1
  92. package/dist/index.es220.js +1 -1
  93. package/dist/index.es227.js +2 -2
  94. package/dist/index.es23.js +25 -15
  95. package/dist/index.es23.js.map +1 -1
  96. package/dist/index.es270.js +1 -1
  97. package/dist/index.es283.js +1 -1
  98. package/dist/index.es288.js +1 -1
  99. package/dist/index.es295.js +1 -1
  100. package/dist/index.es370.js +2 -2
  101. package/dist/index.es371.js +3 -3
  102. package/dist/index.es381.js +1 -1
  103. package/dist/index.es389.js +1 -1
  104. package/dist/index.es390.js +146 -307
  105. package/dist/index.es390.js.map +1 -1
  106. package/dist/index.es391.js +3674 -5
  107. package/dist/index.es391.js.map +1 -1
  108. package/dist/index.es392.js +5 -520
  109. package/dist/index.es392.js.map +1 -1
  110. package/dist/index.es393.js +2 -3675
  111. package/dist/index.es393.js.map +1 -1
  112. package/dist/index.es394.js +5 -5
  113. package/dist/index.es394.js.map +1 -1
  114. package/dist/index.es395.js +521 -2
  115. package/dist/index.es395.js.map +1 -1
  116. package/dist/index.es399.js +1 -1
  117. package/dist/index.es401.js +5 -5
  118. package/dist/index.es402.js +1 -1
  119. package/dist/index.es408.js +1 -1
  120. package/dist/index.es409.js +1 -1
  121. package/dist/index.es410.js +2 -15
  122. package/dist/index.es410.js.map +1 -1
  123. package/dist/index.es411.js +2 -2
  124. package/dist/index.es412.js +15 -2
  125. package/dist/index.es412.js.map +1 -1
  126. package/dist/index.es416.js +1 -1
  127. package/dist/index.es417.js +1 -1
  128. package/dist/index.es418.js +1 -1
  129. package/dist/index.es431.js +14 -0
  130. package/dist/index.es431.js.map +1 -0
  131. package/dist/index.es432.js +49 -0
  132. package/dist/index.es432.js.map +1 -0
  133. package/dist/{index.es437.js → index.es433.js} +1 -1
  134. package/dist/{index.es437.js.map → index.es433.js.map} +1 -1
  135. package/dist/{index.es438.js → index.es434.js} +3 -3
  136. package/dist/{index.es438.js.map → index.es434.js.map} +1 -1
  137. package/dist/index.es435.js +177 -10
  138. package/dist/index.es435.js.map +1 -1
  139. package/dist/index.es436.js +4 -46
  140. package/dist/index.es436.js.map +1 -1
  141. package/dist/index.es441.js +1 -1
  142. package/dist/index.es457.js +1 -1
  143. package/dist/index.es458.js +1 -1
  144. package/dist/index.es463.js +26 -0
  145. package/dist/index.es463.js.map +1 -0
  146. package/dist/index.es464.js +16 -0
  147. package/dist/index.es464.js.map +1 -0
  148. package/dist/index.es465.js +25 -20
  149. package/dist/index.es465.js.map +1 -1
  150. package/dist/index.es466.js +4 -12
  151. package/dist/index.es466.js.map +1 -1
  152. package/dist/index.es469.js +2 -2
  153. package/dist/index.es472.js +1 -1
  154. package/dist/index.es479.js +3 -3
  155. package/dist/index.es480.js +13 -0
  156. package/dist/index.es480.js.map +1 -0
  157. package/dist/index.es481.js +181 -0
  158. package/dist/index.es481.js.map +1 -0
  159. package/dist/index.es482.js +3 -9
  160. package/dist/index.es482.js.map +1 -1
  161. package/dist/index.es483.js +126 -171
  162. package/dist/index.es483.js.map +1 -1
  163. package/dist/index.es496.js +1 -1
  164. package/dist/styles/index.css +1 -1
  165. package/dist/styles/typography.css +1 -1
  166. package/package.json +1 -1
  167. package/dist/index.cjs439.js +0 -2
  168. package/dist/index.cjs439.js.map +0 -1
  169. package/dist/index.cjs440.js +0 -2
  170. package/dist/index.cjs440.js.map +0 -1
  171. package/dist/index.cjs467.js +0 -2
  172. package/dist/index.cjs467.js.map +0 -1
  173. package/dist/index.cjs468.js +0 -2
  174. package/dist/index.cjs468.js.map +0 -1
  175. package/dist/index.cjs484.js +0 -2
  176. package/dist/index.cjs484.js.map +0 -1
  177. package/dist/index.cjs485.js +0 -2
  178. package/dist/index.cjs485.js.map +0 -1
  179. package/dist/index.es439.js +0 -181
  180. package/dist/index.es439.js.map +0 -1
  181. package/dist/index.es440.js +0 -7
  182. package/dist/index.es440.js.map +0 -1
  183. package/dist/index.es467.js +0 -31
  184. package/dist/index.es467.js.map +0 -1
  185. package/dist/index.es468.js +0 -8
  186. package/dist/index.es468.js.map +0 -1
  187. package/dist/index.es484.js +0 -7
  188. package/dist/index.es484.js.map +0 -1
  189. package/dist/index.es485.js +0 -136
  190. package/dist/index.es485.js.map +0 -1
  191. /package/dist/components/ui/{ConsentModal/ConsentModalFooter/ConsentModalFooter.css → DoctorModal/DoctorModalFooter/DoctorModalFooter.css} +0 -0
@@ -0,0 +1,49 @@
1
+ import r from "react";
2
+ import { createContextScope as y } from "./index.es398.js";
3
+ import { useComposedRefs as S } from "./index.es397.js";
4
+ import { createSlot as M } from "./index.es422.js";
5
+ import { j as d } from "./index.es216.js";
6
+ function D(s) {
7
+ const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
8
+ m,
9
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
+ ), p = (c) => {
11
+ const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
12
+ return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
13
+ };
14
+ p.displayName = m;
15
+ const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
16
+ (c, e) => {
17
+ const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
18
+ return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
19
+ }
20
+ );
21
+ C.displayName = a;
22
+ const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
23
+ (c, e) => {
24
+ const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
25
+ return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
26
+ }
27
+ );
28
+ x.displayName = u;
29
+ function O(c) {
30
+ const e = f(s + "CollectionConsumer", c);
31
+ return r.useCallback(() => {
32
+ const o = e.collectionRef.current;
33
+ if (!o) return [];
34
+ const t = Array.from(o.querySelectorAll(`[${R}]`));
35
+ return Array.from(e.itemMap.values()).sort(
36
+ (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
37
+ );
38
+ }, [e.collectionRef, e.itemMap]);
39
+ }
40
+ return [
41
+ { Provider: p, Slot: C, ItemSlot: x },
42
+ O,
43
+ E
44
+ ];
45
+ }
46
+ export {
47
+ D as createCollection
48
+ };
49
+ //# sourceMappingURL=index.es432.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es432.js","sources":["../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/collection/src/collection.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\nexport {\n createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR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IAAI,GACvBS,IAAeC,EAAgBH,GAAcR,CAAG,GAChDS,IAAUd,EAAqBiB,GAAgBd,CAAK;AAC1DG,aAAAA,EAAM,UAAU,OACdQ,EAAQ,QAAQ,IAAIT,GAAK,EAAE,KAAAA,GAAK,GAAGgB,GAAU,GACtC,MAAM,KAAKP,EAAQ,QAAQ,OAAOT,CAAG,EAC7C,GACsBG,gBAAAA,MAAIW,GAAwB,EAAO,CAACD,CAAc,GAAG,IAAM,KAAKH,GAAc,UAAAX,GAAU;AAAA,IACrH;AAAA,EACG;AACD,EAAAgB,EAAmB,cAAcH;AACjC,WAASK,EAAcnB,GAAO;AAC5B,UAAMW,IAAUd,EAAqBN,IAAO,sBAAsBS,CAAK;AAWvE,WAViBG,EAAM,YAAY,MAAM;AACvC,YAAMiB,IAAiBT,EAAQ,cAAc;AAC7C,UAAI,CAACS,EAAgB,QAAO,CAAE;AAC9B,YAAMC,IAAe,MAAM,KAAKD,EAAe,iBAAiB,IAAIL,CAAc,GAAG,CAAC;AAKtF,aAJc,MAAM,KAAKJ,EAAQ,QAAQ,QAAQ,EACtB;AAAA,QACzB,CAACW,GAAGC,MAAMF,EAAa,QAAQC,EAAE,IAAI,OAAO,IAAID,EAAa,QAAQE,EAAE,IAAI,OAAO;AAAA,MACnF;AAAA,IAEF,GAAE,CAACZ,EAAQ,eAAeA,EAAQ,OAAO,CAAC;AAAA,EAE/C;AACE,SAAO;AAAA,IACL,EAAE,UAAUb,GAAoB,MAAMW,GAAgB,UAAUQ,EAAoB;AAAA,IACpFE;AAAA,IACAzB;AAAA,EACD;AACH;","x_google_ignoreList":[0]}
@@ -8,4 +8,4 @@ function n(o) {
8
8
  export {
9
9
  n as useDirection
10
10
  };
11
- //# sourceMappingURL=index.es437.js.map
11
+ //# sourceMappingURL=index.es433.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es437.js","sources":["../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","useDirection","localDir","globalDir"],"mappings":";;AAGA,IAAIA,IAAmBC,EAAM,cAAc,MAAM;AAKjD,SAASC,EAAaC,GAAU;AAC9B,QAAMC,IAAYH,EAAM,WAAWD,CAAgB;AACnD,SAAOG,KAAYC,KAAa;AAClC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es433.js","sources":["../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","useDirection","localDir","globalDir"],"mappings":";;AAGA,IAAIA,IAAmBC,EAAM,cAAc,MAAM;AAKjD,SAASC,EAAaC,GAAU;AAC9B,QAAMC,IAAYH,EAAM,WAAWD,CAAgB;AACnD,SAAOG,KAAYC,KAAa;AAClC;","x_google_ignoreList":[0]}
@@ -4,8 +4,8 @@ import { Root as Oe } from "./index.es443.js";
4
4
  import { useComposedRefs as T } from "./index.es397.js";
5
5
  import { createContextScope as Re } from "./index.es398.js";
6
6
  import { Primitive as z } from "./index.es400.js";
7
- import { useCallbackRef as Ee } from "./index.es435.js";
8
- import { useLayoutEffect as B } from "./index.es440.js";
7
+ import { useCallbackRef as Ee } from "./index.es431.js";
8
+ import { useLayoutEffect as B } from "./index.es436.js";
9
9
  import { useSize as Ne } from "./index.es408.js";
10
10
  import { j as f } from "./index.es216.js";
11
11
  import { autoUpdate as _e } from "./index.es444.js";
@@ -218,4 +218,4 @@ export {
218
218
  qe as Root,
219
219
  Ue as createPopperScope
220
220
  };
221
- //# sourceMappingURL=index.es438.js.map
221
+ //# sourceMappingURL=index.es434.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es438.js","sources":["../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/popper/src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n context.onAnchorChange(virtualRef?.current || ref.current);\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["POPPER_NAME","createPopperContext","createPopperScope","createContextScope","PopperProvider","usePopperContext","Popper","props","__scopePopper","children","anchor","setAnchor","React","jsx","ANCHOR_NAME","PopperAnchor","forwardedRef","virtualRef","anchorProps","context","ref","composedRefs","useComposedRefs","Primitive","CONTENT_NAME","PopperContentProvider","useContentContext","PopperContent","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPaddingProp","sticky","hideWhenDetached","updatePositionStrategy","onPlaced","contentProps","content","setContent","node","arrow","setArrow","arrowSize","useSize","arrowWidth","arrowHeight","desiredPlacement","collisionPadding","boundary","hasExplicitBoundaries","detectOverflowOptions","isNotNull","refs","floatingStyles","placement","isPositioned","middlewareData","useFloating","args","autoUpdate","offset","shift","limitShift","flip","size","elements","rects","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","floatingUIarrow","transformOrigin","hide","placedSide","placedAlign","getSideAndAlignFromPlacement","handlePlaced","useCallbackRef","useLayoutEffect","arrowX","_a","arrowY","_b","cannotCenterArrow","_c","contentZIndex","setContentZIndex","_d","_e","_f","ARROW_NAME","OPPOSITE_SIDE","PopperArrow","arrowProps","contentContext","baseSide","ArrowPrimitive.Root","value","options","data","isArrowHidden","noArrowAlign","arrowXCenter","arrowYCenter","x","y","Root2","Anchor","Content","Arrow"],"mappings":";;;;;;;;;;;AAyBA,IAAIA,IAAc,UACd,CAACC,GAAqBC,EAAiB,IAAIC,GAAmBH,CAAW,GACzE,CAACI,IAAgBC,CAAgB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F,EAAQ,YACzCvD,IAAcyD,IAAgB,IAAIF,EAAQ,aAC1C,CAACzB,GAAYC,CAAW,IAAIC,EAA6BvB,CAAS,GAClEiD,IAAe,EAAE,OAAO,MAAM,QAAQ,OAAO,KAAK,OAAQ,EAAC3B,CAAW,GACtE4B,OAAgBpB,IAAA5B,EAAe,UAAf,gBAAA4B,EAAsB,MAAK,KAAKxC,IAAa,GAC7D6D,OAAgBnB,IAAA9B,EAAe,UAAf,gBAAA8B,EAAsB,MAAK,KAAKzC,IAAc;AACpE,QAAI6D,IAAI,IACJC,IAAI;AACR,WAAIhC,MAAe,YACjB+B,IAAIJ,IAAgBC,IAAe,GAAGC,CAAY,MAClDG,IAAI,GAAG,CAAC9D,CAAW,QACV8B,MAAe,SACxB+B,IAAIJ,IAAgBC,IAAe,GAAGC,CAAY,MAClDG,IAAI,GAAGzC,EAAM,SAAS,SAASrB,CAAW,QACjC8B,MAAe,WACxB+B,IAAI,GAAG,CAAC7D,CAAW,MACnB8D,IAAIL,IAAgBC,IAAe,GAAGE,CAAY,QACzC9B,MAAe,WACxB+B,IAAI,GAAGxC,EAAM,SAAS,QAAQrB,CAAW,MACzC8D,IAAIL,IAAgBC,IAAe,GAAGE,CAAY,OAE7C,EAAE,MAAM,EAAE,GAAAC,GAAG,GAAAC,EAAC,EAAI;AAAA,EAC7B;AACA;AACA,SAAS9B,EAA6BvB,GAAW;AAC/C,QAAM,CAAC9B,GAAME,IAAQ,QAAQ,IAAI4B,EAAU,MAAM,GAAG;AACpD,SAAO,CAAC9B,GAAME,CAAK;AACrB;AACG,IAACkF,KAAQ1G,GACR2G,KAASlG,GACTmG,KAAUvF,GACVwF,KAAQjB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es434.js","sources":["../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/popper/src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n context.onAnchorChange(virtualRef?.current || ref.current);\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["POPPER_NAME","createPopperContext","createPopperScope","createContextScope","PopperProvider","usePopperContext","Popper","props","__scopePopper","children","anchor","setAnchor","React","jsx","ANCHOR_NAME","PopperAnchor","forwardedRef","virtualRef","anchorProps","context","ref","composedRefs","useComposedRefs","Primitive","CONTENT_NAME","PopperContentProvider","useContentContext","PopperContent","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPaddingProp","sticky","hideWhenDetached","updatePositionStrategy","onPlaced","contentProps","content","setContent","node","arrow","setArrow","arrowSize","useSize","arrowWidth","arrowHeight","desiredPlacement","collisionPadding","boundary","hasExplicitBoundaries","detectOverflowOptions","isNotNull","refs","floatingStyles","placement","isPositioned","middlewareData","useFloating","args","autoUpdate","offset","shift","limitShift","flip","size","elements","rects","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","floatingUIarrow","transformOrigin","hide","placedSide","placedAlign","getSideAndAlignFromPlacement","handlePlaced","useCallbackRef","useLayoutEffect","arrowX","_a","arrowY","_b","cannotCenterArrow","_c","contentZIndex","setContentZIndex","_d","_e","_f","ARROW_NAME","OPPOSITE_SIDE","PopperArrow","arrowProps","contentContext","baseSide","ArrowPrimitive.Root","value","options","data","isArrowHidden","noArrowAlign","arrowXCenter","arrowYCenter","x","y","Root2","Anchor","Content","Arrow"],"mappings":";;;;;;;;;;;AAyBA,IAAIA,IAAc,UACd,CAACC,GAAqBC,EAAiB,IAAIC,GAAmBH,CAAW,GACzE,CAACI,IAAgBC,CAAgB,IAAIJ,EAAoBD,CAAW,GACpEM,IAAS,CAACC,MAAU;AACtB,QAAM,EAAE,eAAAC,GAAe,UAAAC,EAAQ,IAAKF,GAC9B,CAACG,GAAQC,CAAS,IAAIC,EAAM,SAAS,IAAI;AAC/C,SAAuBC,gBAAAA,EAAG,IAACT,IAAgB,EAAE,OAAOI,GAAe,QAAAE,GAAQ,gBAAgBC,GAAW,UAAAF,GAAU;AAClH;AACAH,EAAO,cAAcN;AACrB,IAAIc,IAAc,gBACdC,IAAeH,EAAM;AAAA,EACvB,CAACL,GAAOS,MAAiB;AACvB,UAAM,EAAE,eAAAR,GAAe,YAAAS,GAAY,GAAGC,EAAa,IAAGX,GAChDY,IAAUd,EAAiBS,GAAaN,CAAa,GACrDY,IAAMR,EAAM,OAAO,IAAI,GACvBS,IAAeC,EAAgBN,GAAcI,CAAG;AACtD,WAAAR,EAAM,U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AASrB,CAAW,QACjC8B,MAAe,WACxB+B,IAAI,GAAG,CAAC7D,CAAW,MACnB8D,IAAIL,IAAgBC,IAAe,GAAGE,CAAY,QACzC9B,MAAe,WACxB+B,IAAI,GAAGxC,EAAM,SAAS,QAAQrB,CAAW,MACzC8D,IAAIL,IAAgBC,IAAe,GAAGE,CAAY,OAE7C,EAAE,MAAM,EAAE,GAAAC,GAAG,GAAAC,EAAC,EAAI;AAAA,EAC7B;AACA;AACA,SAAS9B,EAA6BvB,GAAW;AAC/C,QAAM,CAAC9B,GAAME,IAAQ,QAAQ,IAAI4B,EAAU,MAAM,GAAG;AACpD,SAAO,CAAC9B,GAAME,CAAK;AACrB;AACG,IAACkF,KAAQ1G,GACR2G,KAASlG,GACTmG,KAAUvF,GACVwF,KAAQjB;","x_google_ignoreList":[0]}
@@ -1,14 +1,181 @@
1
- import * as r from "react";
2
- function o(t) {
3
- const e = r.useRef(t);
4
- return r.useEffect(() => {
5
- e.current = t;
6
- }), r.useMemo(() => (...n) => {
7
- var u;
8
- return (u = e.current) == null ? void 0 : u.call(e, ...n);
9
- }, []);
1
+ import * as s from "react";
2
+ import { composeEventHandlers as p } from "./index.es396.js";
3
+ import { createCollection as H } from "./index.es432.js";
4
+ import { useComposedRefs as V } from "./index.es397.js";
5
+ import { createContextScope as z } from "./index.es398.js";
6
+ import { useId as q } from "./index.es402.js";
7
+ import { Primitive as P } from "./index.es400.js";
8
+ import { useCallbackRef as J } from "./index.es431.js";
9
+ import { useControllableState as Q } from "./index.es399.js";
10
+ import { useDirection as W } from "./index.es433.js";
11
+ import { j as d } from "./index.es216.js";
12
+ var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, b = "RovingFocusGroup", [h, G, Z] = H(b), [$, Fe] = z(
13
+ b,
14
+ [Z]
15
+ ), [ee, oe] = $(b), N = s.forwardRef(
16
+ (e, r) => /* @__PURE__ */ d.jsx(h.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(h.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(te, { ...e, ref: r }) }) })
17
+ );
18
+ N.displayName = b;
19
+ var te = s.forwardRef((e, r) => {
20
+ const {
21
+ __scopeRovingFocusGroup: c,
22
+ orientation: o,
23
+ loop: F = !1,
24
+ dir: g,
25
+ currentTabStopId: R,
26
+ defaultCurrentTabStopId: E,
27
+ onCurrentTabStopIdChange: m,
28
+ onEntryFocus: u,
29
+ preventScrollOnEntryFocus: w = !1,
30
+ ...C
31
+ } = e, v = s.useRef(null), I = V(r, v), t = W(g), [f = null, T] = Q({
32
+ prop: R,
33
+ defaultProp: E,
34
+ onChange: m
35
+ }), [a, i] = s.useState(!1), S = J(u), M = G(c), x = s.useRef(!1), [k, y] = s.useState(0);
36
+ return s.useEffect(() => {
37
+ const n = v.current;
38
+ if (n)
39
+ return n.addEventListener(_, S), () => n.removeEventListener(_, S);
40
+ }, [S]), /* @__PURE__ */ d.jsx(
41
+ ee,
42
+ {
43
+ scope: c,
44
+ orientation: o,
45
+ dir: t,
46
+ loop: F,
47
+ currentTabStopId: f,
48
+ onItemFocus: s.useCallback(
49
+ (n) => T(n),
50
+ [T]
51
+ ),
52
+ onItemShiftTab: s.useCallback(() => i(!0), []),
53
+ onFocusableItemAdd: s.useCallback(
54
+ () => y((n) => n + 1),
55
+ []
56
+ ),
57
+ onFocusableItemRemove: s.useCallback(
58
+ () => y((n) => n - 1),
59
+ []
60
+ ),
61
+ children: /* @__PURE__ */ d.jsx(
62
+ P.div,
63
+ {
64
+ tabIndex: a || k === 0 ? -1 : 0,
65
+ "data-orientation": o,
66
+ ...C,
67
+ ref: I,
68
+ style: { outline: "none", ...e.style },
69
+ onMouseDown: p(e.onMouseDown, () => {
70
+ x.current = !0;
71
+ }),
72
+ onFocus: p(e.onFocus, (n) => {
73
+ const L = !x.current;
74
+ if (n.target === n.currentTarget && L && !a) {
75
+ const D = new CustomEvent(_, X);
76
+ if (n.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
77
+ const A = M().filter((l) => l.focusable), U = A.find((l) => l.active), B = A.find((l) => l.id === f), Y = [U, B, ...A].filter(
78
+ Boolean
79
+ ).map((l) => l.ref.current);
80
+ j(Y, w);
81
+ }
82
+ }
83
+ x.current = !1;
84
+ }),
85
+ onBlur: p(e.onBlur, () => i(!1))
86
+ }
87
+ )
88
+ }
89
+ );
90
+ }), O = "RovingFocusGroupItem", K = s.forwardRef(
91
+ (e, r) => {
92
+ const {
93
+ __scopeRovingFocusGroup: c,
94
+ focusable: o = !0,
95
+ active: F = !1,
96
+ tabStopId: g,
97
+ ...R
98
+ } = e, E = q(), m = g || E, u = oe(O, c), w = u.currentTabStopId === m, C = G(c), { onFocusableItemAdd: v, onFocusableItemRemove: I } = u;
99
+ return s.useEffect(() => {
100
+ if (o)
101
+ return v(), () => I();
102
+ }, [o, v, I]), /* @__PURE__ */ d.jsx(
103
+ h.ItemSlot,
104
+ {
105
+ scope: c,
106
+ id: m,
107
+ focusable: o,
108
+ active: F,
109
+ children: /* @__PURE__ */ d.jsx(
110
+ P.span,
111
+ {
112
+ tabIndex: w ? 0 : -1,
113
+ "data-orientation": u.orientation,
114
+ ...R,
115
+ ref: r,
116
+ onMouseDown: p(e.onMouseDown, (t) => {
117
+ o ? u.onItemFocus(m) : t.preventDefault();
118
+ }),
119
+ onFocus: p(e.onFocus, () => u.onItemFocus(m)),
120
+ onKeyDown: p(e.onKeyDown, (t) => {
121
+ if (t.key === "Tab" && t.shiftKey) {
122
+ u.onItemShiftTab();
123
+ return;
124
+ }
125
+ if (t.target !== t.currentTarget) return;
126
+ const f = se(t, u.orientation, u.dir);
127
+ if (f !== void 0) {
128
+ if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
129
+ t.preventDefault();
130
+ let a = C().filter((i) => i.focusable).map((i) => i.ref.current);
131
+ if (f === "last") a.reverse();
132
+ else if (f === "prev" || f === "next") {
133
+ f === "prev" && a.reverse();
134
+ const i = a.indexOf(t.currentTarget);
135
+ a = u.loop ? ce(a, i + 1) : a.slice(i + 1);
136
+ }
137
+ setTimeout(() => j(a));
138
+ }
139
+ })
140
+ }
141
+ )
142
+ }
143
+ );
144
+ }
145
+ );
146
+ K.displayName = O;
147
+ var re = {
148
+ ArrowLeft: "prev",
149
+ ArrowUp: "prev",
150
+ ArrowRight: "next",
151
+ ArrowDown: "next",
152
+ PageUp: "first",
153
+ Home: "first",
154
+ PageDown: "last",
155
+ End: "last"
156
+ };
157
+ function ne(e, r) {
158
+ return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
159
+ }
160
+ function se(e, r, c) {
161
+ const o = ne(e.key, c);
162
+ if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
163
+ return re[o];
164
+ }
165
+ function j(e, r = !1) {
166
+ const c = document.activeElement;
167
+ for (const o of e)
168
+ if (o === c || (o.focus({ preventScroll: r }), document.activeElement !== c)) return;
169
+ }
170
+ function ce(e, r) {
171
+ return e.map((c, o) => e[(r + o) % e.length]);
10
172
  }
173
+ var ge = N, Re = K;
11
174
  export {
12
- o as useCallbackRef
175
+ Re as Item,
176
+ ge as Root,
177
+ N as RovingFocusGroup,
178
+ K as RovingFocusGroupItem,
179
+ Fe as createRovingFocusGroupScope
13
180
  };
14
181
  //# sourceMappingURL=index.es435.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es435.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EAC1B,CAAG,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es435.js","sources":["../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IAAIA,IAAc,iCACdC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAM,GACpDC,IAAa,oBACb,CAACC,GAAYC,GAAeC,C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CAAA;AAAA,UACb;AAAA,QACA;AAAA,MACA;AAAA,IACK;AAAA,EACL;AACA;AACAG,EAAqB,cAAcD;AACnC,IAAIgB,KAA0B;AAAA,EAC5B,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AACP;AACA,SAASC,GAAqBC,GAAKvD,GAAK;AACtC,SAAIA,MAAQ,QAAcuD,IACnBA,MAAQ,cAAc,eAAeA,MAAQ,eAAe,cAAcA;AACnF;AACA,SAASL,GAAetB,GAAO9B,GAAaE,GAAK;AAC/C,QAAMuD,IAAMD,GAAqB1B,EAAM,KAAK5B,CAAG;AAC/C,MAAI,EAAAF,MAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAASyD,CAAG,MACtE,EAAAzD,MAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAASyD,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASnB,EAAWoB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAOzE,GACP0E,KAAO3B;","x_google_ignoreList":[0]}
@@ -1,49 +1,7 @@
1
- import r from "react";
2
- import { createContextScope as y } from "./index.es398.js";
3
- import { useComposedRefs as S } from "./index.es397.js";
4
- import { createSlot as M } from "./index.es422.js";
5
- import { j as d } from "./index.es216.js";
6
- function D(s) {
7
- const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
8
- m,
9
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
- ), p = (c) => {
11
- const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
12
- return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
13
- };
14
- p.displayName = m;
15
- const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
16
- (c, e) => {
17
- const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
18
- return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
19
- }
20
- );
21
- C.displayName = a;
22
- const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
23
- (c, e) => {
24
- const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
25
- return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
26
- }
27
- );
28
- x.displayName = u;
29
- function O(c) {
30
- const e = f(s + "CollectionConsumer", c);
31
- return r.useCallback(() => {
32
- const o = e.collectionRef.current;
33
- if (!o) return [];
34
- const t = Array.from(o.querySelectorAll(`[${R}]`));
35
- return Array.from(e.itemMap.values()).sort(
36
- (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
37
- );
38
- }, [e.collectionRef, e.itemMap]);
39
- }
40
- return [
41
- { Provider: p, Slot: C, ItemSlot: x },
42
- O,
43
- E
44
- ];
45
- }
1
+ import * as t from "react";
2
+ var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
3
+ };
46
4
  export {
47
- D as createCollection
5
+ e as useLayoutEffect
48
6
  };
49
7
  //# sourceMappingURL=index.es436.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es436.js","sources":["../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/collection/src/collection.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\nexport {\n createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":";;;;;AAQA,SAASA,EAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAK,EAAA;AAAA,EACvE,GACKM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAG,IAACT,GAAwB,EAAE,OAAAI,GAAO,SAAAI,GAAS,eAAeF,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,YAAMC,IAAe,MAAM,KAAKD,EAAe,iBAAiB,IAAIL,CAAc,GAAG,CAAC;AAKtF,aAJc,MAAM,KAAKJ,EAAQ,QAAQ,QAAQ,EACtB;AAAA,QACzB,CAACW,GAAGC,MAAMF,EAAa,QAAQC,EAAE,IAAI,OAAO,IAAID,EAAa,QAAQE,EAAE,IAAI,OAAO;AAAA,MACnF;AAAA,IAEF,GAAE,CAACZ,EAAQ,eAAeA,EAAQ,OAAO,CAAC;AAAA,EAE/C;AACE,SAAO;AAAA,IACL,EAAE,UAAUb,GAAoB,MAAMW,GAAgB,UAAUQ,EAAoB;AAAA,IACpFE;AAAA,IACAzB;AAAA,EACD;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es436.js","sources":["../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect2","React"],"mappings":";AAEG,IAACA,IAAmB,iCAAY,WAAWC,EAAM,kBAAkB,MAAM;AAC5E;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  import * as r from "react";
2
- import { useCallbackRef as s } from "./index.es435.js";
2
+ import { useCallbackRef as s } from "./index.es431.js";
3
3
  function p(n, e = globalThis == null ? void 0 : globalThis.document) {
4
4
  const t = s(n);
5
5
  r.useEffect(() => {
@@ -1,7 +1,7 @@
1
1
  import * as d from "react";
2
2
  import { styleSingleton as f } from "./index.es458.js";
3
3
  import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./index.es448.js";
4
- import { getGapWidth as m } from "./index.es465.js";
4
+ import { getGapWidth as m } from "./index.es463.js";
5
5
  var b = f(), e = "data-scroll-locked", h = function(n, a, o, t) {
6
6
  var r = n.left, i = n.top, s = n.right, c = n.gap;
7
7
  return o === void 0 && (o = "margin"), `
@@ -1,4 +1,4 @@
1
- import { styleHookSingleton as o } from "./index.es466.js";
1
+ import { styleHookSingleton as o } from "./index.es464.js";
2
2
  var s = function() {
3
3
  var e = o(), n = function(t) {
4
4
  var r = t.styles, l = t.dynamic;
@@ -0,0 +1,26 @@
1
+ var a = {
2
+ left: 0,
3
+ top: 0,
4
+ right: 0,
5
+ gap: 0
6
+ }, e = function(t) {
7
+ return parseInt(t || "", 10) || 0;
8
+ }, o = function(t) {
9
+ var n = window.getComputedStyle(document.body), i = n[t === "padding" ? "paddingLeft" : "marginLeft"], r = n[t === "padding" ? "paddingTop" : "marginTop"], d = n[t === "padding" ? "paddingRight" : "marginRight"];
10
+ return [e(i), e(r), e(d)];
11
+ }, f = function(t) {
12
+ if (t === void 0 && (t = "margin"), typeof window > "u")
13
+ return a;
14
+ var n = o(t), i = document.documentElement.clientWidth, r = window.innerWidth;
15
+ return {
16
+ left: n[0],
17
+ top: n[1],
18
+ right: n[2],
19
+ gap: Math.max(0, r - i + n[2] - n[0])
20
+ };
21
+ };
22
+ export {
23
+ f as getGapWidth,
24
+ a as zeroGap
25
+ };
26
+ //# sourceMappingURL=index.es463.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es463.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/utils.js"],"sourcesContent":["export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n"],"names":["zeroGap","parse","x","getOffset","gapMode","cs","left","top","right","getGapWidth","offsets","documentWidth","windowWidth"],"mappings":"AAAU,IAACA,IAAU;AAAA,EACjB,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,KAAK;AACT,GACIC,IAAQ,SAAUC,GAAG;AAAE,SAAO,SAASA,KAAK,IAAI,EAAE,KAAK;AAAI,GAC3DC,IAAY,SAAUC,GAAS;AAC/B,MAAIC,IAAK,OAAO,iBAAiB,SAAS,IAAI,GAC1CC,IAAOD,EAAGD,MAAY,YAAY,gBAAgB,YAAY,GAC9DG,IAAMF,EAAGD,MAAY,YAAY,eAAe,WAAW,GAC3DI,IAAQH,EAAGD,MAAY,YAAY,iBAAiB,aAAa;AACrE,SAAO,CAACH,EAAMK,CAAI,GAAGL,EAAMM,CAAG,GAAGN,EAAMO,CAAK,CAAC;AACjD,GACWC,IAAc,SAAUL,GAAS;AAExC,MADIA,MAAY,WAAUA,IAAU,WAChC,OAAO,SAAW;AAClB,WAAOJ;AAEX,MAAIU,IAAUP,EAAUC,CAAO,GAC3BO,IAAgB,SAAS,gBAAgB,aACzCC,IAAc,OAAO;AACzB,SAAO;AAAA,IACH,MAAMF,EAAQ,CAAC;AAAA,IACf,KAAKA,EAAQ,CAAC;AAAA,IACd,OAAOA,EAAQ,CAAC;AAAA,IAChB,KAAK,KAAK,IAAI,GAAGE,IAAcD,IAAgBD,EAAQ,CAAC,IAAIA,EAAQ,CAAC,CAAC;AAAA,EACzE;AACL;","x_google_ignoreList":[0]}
@@ -0,0 +1,16 @@
1
+ import * as o from "react";
2
+ import { stylesheetSingleton as r } from "./index.es465.js";
3
+ var i = function() {
4
+ var t = r();
5
+ return function(e, n) {
6
+ o.useEffect(function() {
7
+ return t.add(e), function() {
8
+ t.remove();
9
+ };
10
+ }, [e && n]);
11
+ };
12
+ };
13
+ export {
14
+ i as styleHookSingleton
15
+ };
16
+ //# sourceMappingURL=index.es464.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es464.js","sources":["../node_modules/react-style-singleton/dist/es2015/hook.js"],"sourcesContent":["import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n"],"names":["styleHookSingleton","sheet","stylesheetSingleton","styles","isDynamic","React"],"mappings":";;AAWU,IAACA,IAAqB,WAAY;AACxC,MAAIC,IAAQC,EAAqB;AACjC,SAAO,SAAUC,GAAQC,GAAW;AAChC,IAAAC,EAAM,UAAU,WAAY;AACxB,aAAAJ,EAAM,IAAIE,CAAM,GACT,WAAY;AACf,QAAAF,EAAM,OAAQ;AAAA,MACjB;AAAA,IACb,GAAW,CAACE,KAAUC,CAAS,CAAC;AAAA,EAC3B;AACL;","x_google_ignoreList":[0]}