zudoku 0.3.0-dev.57 → 0.3.0-dev.59

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 (199) hide show
  1. package/dist/app/entry.client.js +1 -1
  2. package/dist/app/entry.client.js.map +1 -1
  3. package/dist/app/entry.server.d.ts +2 -0
  4. package/dist/app/entry.server.js +1 -0
  5. package/dist/app/entry.server.js.map +1 -1
  6. package/dist/app/main.js +8 -2
  7. package/dist/app/main.js.map +1 -1
  8. package/dist/config/validators/validate.d.ts +121 -102
  9. package/dist/config/validators/validate.js +4 -0
  10. package/dist/config/validators/validate.js.map +1 -1
  11. package/dist/lib/authentication/AuthenticationPlugin.d.ts +16 -0
  12. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  13. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  14. package/dist/lib/authentication/authentication.d.ts +3 -4
  15. package/dist/lib/authentication/components/Login.d.ts +1 -0
  16. package/dist/lib/authentication/components/Login.js +10 -0
  17. package/dist/lib/authentication/components/Login.js.map +1 -0
  18. package/dist/lib/authentication/components/Logout.d.ts +1 -0
  19. package/dist/lib/authentication/components/Logout.js +10 -0
  20. package/dist/lib/authentication/components/Logout.js.map +1 -0
  21. package/dist/lib/authentication/providers/clerk.js +43 -27
  22. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  23. package/dist/lib/authentication/providers/openid.d.ts +11 -3
  24. package/dist/lib/authentication/providers/openid.js +22 -11
  25. package/dist/lib/authentication/providers/openid.js.map +1 -1
  26. package/dist/lib/authentication/routes.d.ts +5 -0
  27. package/dist/lib/authentication/routes.js +12 -0
  28. package/dist/lib/authentication/routes.js.map +1 -0
  29. package/dist/lib/components/Bootstrap.d.ts +2 -1
  30. package/dist/lib/components/Bootstrap.js +4 -1
  31. package/dist/lib/components/Bootstrap.js.map +1 -1
  32. package/dist/lib/components/DevPortal.js +14 -2
  33. package/dist/lib/components/DevPortal.js.map +1 -1
  34. package/dist/lib/components/Header.js +16 -2
  35. package/dist/lib/components/Header.js.map +1 -1
  36. package/dist/lib/components/InlineCode.js +1 -1
  37. package/dist/lib/components/InlineCode.js.map +1 -1
  38. package/dist/lib/components/TopNavigation.js +1 -1
  39. package/dist/lib/components/TopNavigation.js.map +1 -1
  40. package/dist/lib/components/context/DevPortalProvider.js +18 -1
  41. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  42. package/dist/lib/components/index.d.ts +5 -1
  43. package/dist/lib/components/index.js +4 -0
  44. package/dist/lib/components/index.js.map +1 -1
  45. package/dist/lib/components/navigation/SideNavigationItem.js +1 -1
  46. package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -1
  47. package/dist/lib/core/DevPortalContext.d.ts +1 -1
  48. package/dist/lib/core/DevPortalContext.js.map +1 -1
  49. package/dist/lib/core/plugins.d.ts +10 -1
  50. package/dist/lib/core/plugins.js +1 -0
  51. package/dist/lib/core/plugins.js.map +1 -1
  52. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  53. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  54. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +2 -2
  55. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  56. package/dist/lib/plugins/api-keys/index.d.ts +2 -2
  57. package/dist/lib/plugins/api-keys/index.js +6 -0
  58. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  59. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  60. package/dist/lib/plugins/custom-page/index.js +12 -0
  61. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  62. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  63. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  64. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  65. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  66. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  67. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  68. package/dist/lib/plugins/openapi/SchemaListViewItem.js +3 -3
  69. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -1
  70. package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
  71. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  72. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +3 -0
  73. package/dist/lib/plugins/openapi/StaggeredRender.js +10 -5
  74. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -1
  75. package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
  76. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  77. package/dist/lib/ui/Card.js +1 -1
  78. package/dist/lib/ui/Card.js.map +1 -1
  79. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  80. package/dist/lib/ui/DropdownMenu.js +36 -0
  81. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  82. package/dist/lib/ui/button-variants.d.ts +2 -2
  83. package/dist/lib/ui/button-variants.js +1 -0
  84. package/dist/lib/ui/button-variants.js.map +1 -1
  85. package/dist/lib/util/MdxComponents.js +1 -1
  86. package/dist/lib/util/MdxComponents.js.map +1 -1
  87. package/dist/lib/util/joinPath.js +2 -1
  88. package/dist/lib/util/joinPath.js.map +1 -1
  89. package/dist/vite/build.js +5 -2
  90. package/dist/vite/build.js.map +1 -1
  91. package/dist/vite/config.d.ts +8 -1
  92. package/dist/vite/config.js +13 -6
  93. package/dist/vite/config.js.map +1 -1
  94. package/dist/vite/plugin-component.js +1 -0
  95. package/dist/vite/plugin-component.js.map +1 -1
  96. package/dist/vite/prerender.d.ts +1 -1
  97. package/dist/vite/prerender.js +23 -3
  98. package/dist/vite/prerender.js.map +1 -1
  99. package/lib/{AnchorLink-GNsUeGSX.js → AnchorLink-Bj1hwDuD.js} +3 -3
  100. package/lib/{AnchorLink-GNsUeGSX.js.map → AnchorLink-Bj1hwDuD.js.map} +1 -1
  101. package/lib/AuthenticationPlugin-CG6Bw32B.js +46 -0
  102. package/lib/AuthenticationPlugin-CG6Bw32B.js.map +1 -0
  103. package/lib/CategoryHeading-DMkTmmBh.js +10 -0
  104. package/lib/CategoryHeading-DMkTmmBh.js.map +1 -0
  105. package/lib/Combination-lAFQBd6U.js +2774 -0
  106. package/lib/Combination-lAFQBd6U.js.map +1 -0
  107. package/lib/DevPortalProvider-BBhQ8kgI.js +1125 -0
  108. package/lib/DevPortalProvider-BBhQ8kgI.js.map +1 -0
  109. package/lib/{Markdown-DtLFdxD1.js → Markdown-BjRJKl_E.js} +1376 -1379
  110. package/lib/Markdown-BjRJKl_E.js.map +1 -0
  111. package/lib/{MdxPage-CbwYRKf5.js → MdxPage-DJTFOCbZ.js} +17 -17
  112. package/lib/{MdxPage-CbwYRKf5.js.map → MdxPage-DJTFOCbZ.js.map} +1 -1
  113. package/lib/OperationList-DDTtK3I7.js +5403 -0
  114. package/lib/OperationList-DDTtK3I7.js.map +1 -0
  115. package/lib/{Route-C1LyvITr.js → Route-Bsrd0acQ.js} +2 -2
  116. package/lib/{Route-C1LyvITr.js.map → Route-Bsrd0acQ.js.map} +1 -1
  117. package/lib/Select-CEnkyfyn.js +2223 -0
  118. package/lib/Select-CEnkyfyn.js.map +1 -0
  119. package/lib/Spinner-Ciq_pWU7.js +359 -0
  120. package/lib/Spinner-Ciq_pWU7.js.map +1 -0
  121. package/lib/{hook-Biq3zYel.js → hook-Q_gAL2NZ.js} +20 -19
  122. package/lib/{hook-Biq3zYel.js.map → hook-Q_gAL2NZ.js.map} +1 -1
  123. package/lib/{index-Bg82-bqR.js → index-BE2a6gGC.js} +24 -23
  124. package/lib/{index-Bg82-bqR.js.map → index-BE2a6gGC.js.map} +1 -1
  125. package/lib/{jsx-runtime-CJZJivg2.js → jsx-runtime-BIr0WBt_.js} +119 -119
  126. package/lib/jsx-runtime-BIr0WBt_.js.map +1 -0
  127. package/lib/{router-CBw2vqJE.js → router-BiRCp01d.js} +671 -673
  128. package/lib/router-BiRCp01d.js.map +1 -0
  129. package/lib/zudoku.auth-clerk.js +47 -32
  130. package/lib/zudoku.auth-clerk.js.map +1 -1
  131. package/lib/zudoku.auth-openid.js +170 -159
  132. package/lib/zudoku.auth-openid.js.map +1 -1
  133. package/lib/zudoku.components.js +1514 -598
  134. package/lib/zudoku.components.js.map +1 -1
  135. package/lib/zudoku.plugin-api-keys.js +30 -24
  136. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  137. package/lib/zudoku.plugin-custom-page.js +13 -0
  138. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  139. package/lib/zudoku.plugin-markdown.js +19 -20
  140. package/lib/zudoku.plugin-markdown.js.map +1 -1
  141. package/lib/zudoku.plugin-openapi.js +4 -4
  142. package/lib/zudoku.plugin-redirect.js +3 -3
  143. package/package.json +29 -14
  144. package/src/app/entry.client.tsx +1 -1
  145. package/src/app/entry.server.tsx +2 -0
  146. package/src/app/main.css +6 -0
  147. package/src/app/main.tsx +8 -2
  148. package/src/lib/authentication/AuthenticationPlugin.tsx +36 -0
  149. package/src/lib/authentication/authentication.ts +3 -4
  150. package/src/lib/authentication/components/Login.tsx +11 -0
  151. package/src/lib/authentication/components/Logout.tsx +11 -0
  152. package/src/lib/authentication/providers/clerk.tsx +43 -27
  153. package/src/lib/authentication/providers/openid.tsx +25 -13
  154. package/src/lib/authentication/routes.tsx +10 -0
  155. package/src/lib/components/Bootstrap.tsx +14 -7
  156. package/src/lib/components/DevPortal.tsx +29 -9
  157. package/src/lib/components/Header.tsx +80 -30
  158. package/src/lib/components/InlineCode.tsx +1 -1
  159. package/src/lib/components/TopNavigation.tsx +1 -1
  160. package/src/lib/components/context/DevPortalProvider.ts +22 -2
  161. package/src/lib/components/index.ts +4 -0
  162. package/src/lib/components/navigation/SideNavigationItem.tsx +1 -1
  163. package/src/lib/core/DevPortalContext.ts +1 -1
  164. package/src/lib/core/plugins.ts +16 -0
  165. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  166. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +4 -4
  167. package/src/lib/plugins/api-keys/index.tsx +8 -1
  168. package/src/lib/plugins/custom-page/index.tsx +22 -0
  169. package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
  170. package/src/lib/plugins/openapi/OperationListItem.tsx +1 -4
  171. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  172. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +3 -3
  173. package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
  174. package/src/lib/plugins/openapi/StaggeredRender.tsx +19 -5
  175. package/src/lib/plugins/openapi/playground/Playground.tsx +2 -2
  176. package/src/lib/ui/Card.tsx +1 -1
  177. package/src/lib/ui/DropdownMenu.tsx +199 -0
  178. package/src/lib/ui/button-variants.ts +1 -0
  179. package/src/lib/util/MdxComponents.tsx +1 -1
  180. package/src/lib/util/joinPath.tsx +2 -1
  181. package/dist/app/zudoku-manifest.d.ts +0 -1
  182. package/dist/app/zudoku-manifest.js +0 -20
  183. package/dist/app/zudoku-manifest.js.map +0 -1
  184. package/lib/Button-DpHMZvVs.js +0 -4571
  185. package/lib/Button-DpHMZvVs.js.map +0 -1
  186. package/lib/DevPortalProvider-Do9oJqme.js +0 -1081
  187. package/lib/DevPortalProvider-Do9oJqme.js.map +0 -1
  188. package/lib/Markdown-DtLFdxD1.js.map +0 -1
  189. package/lib/OperationList-DypxLtSC.js +0 -5578
  190. package/lib/OperationList-DypxLtSC.js.map +0 -1
  191. package/lib/Spinner-Bhbs5aPI.js +0 -182
  192. package/lib/Spinner-Bhbs5aPI.js.map +0 -1
  193. package/lib/index-gsAuUwQh.js +0 -418
  194. package/lib/index-gsAuUwQh.js.map +0 -1
  195. package/lib/jsx-runtime-CJZJivg2.js.map +0 -1
  196. package/lib/router-CBw2vqJE.js.map +0 -1
  197. package/lib/util-_jwUlTBU.js +0 -41
  198. package/lib/util-_jwUlTBU.js.map +0 -1
  199. package/src/app/zudoku-manifest.ts +0 -22
@@ -1,182 +0,0 @@
1
- import * as s from "react";
2
- import { u as M, g as h, c as w, a as D, e as U, P as A, d as k } from "./index-gsAuUwQh.js";
3
- import * as W from "react-dom";
4
- import { j as N } from "./jsx-runtime-CJZJivg2.js";
5
- import { c as F } from "./Markdown-DtLFdxD1.js";
6
- /**
7
- * @license lucide-react v0.378.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */
12
- const B = F("LoaderCircle", [
13
- ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
14
- ]);
15
- function G(e, n) {
16
- return s.useReducer((r, t) => n[r][t] ?? r, e);
17
- }
18
- var S = (e) => {
19
- const { present: n, children: r } = e, t = $(n), o = typeof r == "function" ? r({ present: t.isPresent }) : s.Children.only(r), c = M(t.ref, q(o));
20
- return typeof r == "function" || t.isPresent ? s.cloneElement(o, { ref: c }) : null;
21
- };
22
- S.displayName = "Presence";
23
- function $(e) {
24
- const [n, r] = s.useState(), t = s.useRef({}), o = s.useRef(e), c = s.useRef("none"), l = e ? "mounted" : "unmounted", [f, i] = G(l, {
25
- mounted: {
26
- UNMOUNT: "unmounted",
27
- ANIMATION_OUT: "unmountSuspended"
28
- },
29
- unmountSuspended: {
30
- MOUNT: "mounted",
31
- ANIMATION_END: "unmounted"
32
- },
33
- unmounted: {
34
- MOUNT: "mounted"
35
- }
36
- });
37
- return s.useEffect(() => {
38
- const a = v(t.current);
39
- c.current = f === "mounted" ? a : "none";
40
- }, [f]), h(() => {
41
- const a = t.current, d = o.current;
42
- if (d !== e) {
43
- const g = c.current, m = v(a);
44
- e ? i("MOUNT") : m === "none" || (a == null ? void 0 : a.display) === "none" ? i("UNMOUNT") : i(d && g !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
45
- }
46
- }, [e, i]), h(() => {
47
- if (n) {
48
- const a = (p) => {
49
- const m = v(t.current).includes(p.animationName);
50
- p.target === n && m && W.flushSync(() => i("ANIMATION_END"));
51
- }, d = (p) => {
52
- p.target === n && (c.current = v(t.current));
53
- };
54
- return n.addEventListener("animationstart", d), n.addEventListener("animationcancel", a), n.addEventListener("animationend", a), () => {
55
- n.removeEventListener("animationstart", d), n.removeEventListener("animationcancel", a), n.removeEventListener("animationend", a);
56
- };
57
- } else
58
- i("ANIMATION_END");
59
- }, [n, i]), {
60
- isPresent: ["mounted", "unmountSuspended"].includes(f),
61
- ref: s.useCallback((a) => {
62
- a && (t.current = getComputedStyle(a)), r(a);
63
- }, [])
64
- };
65
- }
66
- function v(e) {
67
- return (e == null ? void 0 : e.animationName) || "none";
68
- }
69
- function q(e) {
70
- var t, o;
71
- let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
72
- return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
73
- }
74
- var O = "Collapsible", [z, X] = w(O), [H, P] = z(O), I = s.forwardRef(
75
- (e, n) => {
76
- const {
77
- __scopeCollapsible: r,
78
- open: t,
79
- defaultOpen: o,
80
- disabled: c,
81
- onOpenChange: l,
82
- ...f
83
- } = e, [i = !1, a] = D({
84
- prop: t,
85
- defaultProp: o,
86
- onChange: l
87
- });
88
- return /* @__PURE__ */ N.jsx(
89
- H,
90
- {
91
- scope: r,
92
- disabled: c,
93
- contentId: U(),
94
- open: i,
95
- onOpenToggle: s.useCallback(() => a((d) => !d), [a]),
96
- children: /* @__PURE__ */ N.jsx(
97
- A.div,
98
- {
99
- "data-state": E(i),
100
- "data-disabled": c ? "" : void 0,
101
- ...f,
102
- ref: n
103
- }
104
- )
105
- }
106
- );
107
- }
108
- );
109
- I.displayName = O;
110
- var _ = "CollapsibleTrigger", L = s.forwardRef(
111
- (e, n) => {
112
- const { __scopeCollapsible: r, ...t } = e, o = P(_, r);
113
- return /* @__PURE__ */ N.jsx(
114
- A.button,
115
- {
116
- type: "button",
117
- "aria-controls": o.contentId,
118
- "aria-expanded": o.open || !1,
119
- "data-state": E(o.open),
120
- "data-disabled": o.disabled ? "" : void 0,
121
- disabled: o.disabled,
122
- ...t,
123
- ref: n,
124
- onClick: k(e.onClick, o.onOpenToggle)
125
- }
126
- );
127
- }
128
- );
129
- L.displayName = _;
130
- var x = "CollapsibleContent", j = s.forwardRef(
131
- (e, n) => {
132
- const { forceMount: r, ...t } = e, o = P(x, e.__scopeCollapsible);
133
- return /* @__PURE__ */ N.jsx(S, { present: r || o.open, children: ({ present: c }) => /* @__PURE__ */ N.jsx(J, { ...t, ref: n, present: c }) });
134
- }
135
- );
136
- j.displayName = x;
137
- var J = s.forwardRef((e, n) => {
138
- const { __scopeCollapsible: r, present: t, children: o, ...c } = e, l = P(x, r), [f, i] = s.useState(t), a = s.useRef(null), d = M(n, a), p = s.useRef(0), g = p.current, m = s.useRef(0), R = m.current, b = l.open || f, T = s.useRef(b), C = s.useRef();
139
- return s.useEffect(() => {
140
- const u = requestAnimationFrame(() => T.current = !1);
141
- return () => cancelAnimationFrame(u);
142
- }, []), h(() => {
143
- const u = a.current;
144
- if (u) {
145
- C.current = C.current || {
146
- transitionDuration: u.style.transitionDuration,
147
- animationName: u.style.animationName
148
- }, u.style.transitionDuration = "0s", u.style.animationName = "none";
149
- const y = u.getBoundingClientRect();
150
- p.current = y.height, m.current = y.width, T.current || (u.style.transitionDuration = C.current.transitionDuration, u.style.animationName = C.current.animationName), i(t);
151
- }
152
- }, [l.open, t]), /* @__PURE__ */ N.jsx(
153
- A.div,
154
- {
155
- "data-state": E(l.open),
156
- "data-disabled": l.disabled ? "" : void 0,
157
- id: l.contentId,
158
- hidden: !b,
159
- ...c,
160
- ref: d,
161
- style: {
162
- "--radix-collapsible-content-height": g ? `${g}px` : void 0,
163
- "--radix-collapsible-content-width": R ? `${R}px` : void 0,
164
- ...e.style
165
- },
166
- children: b && o
167
- }
168
- );
169
- });
170
- function E(e) {
171
- return e ? "open" : "closed";
172
- }
173
- var Y = I, Z = L, ee = j;
174
- const ne = ({ size: e = 16 }) => /* @__PURE__ */ N.jsx(B, { size: e, className: "animate-spin" });
175
- export {
176
- ee as C,
177
- S as P,
178
- Y as R,
179
- ne as S,
180
- Z as T
181
- };
182
- //# sourceMappingURL=Spinner-Bhbs5aPI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Spinner-Bhbs5aPI.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../../../node_modules/.pnpm/@radix-ui+react-presence@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-presence/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3._qjsk5diswkeszbepgt4ntypuku/node_modules/@radix-ui/react-collapsible/dist/index.mjs","../src/lib/components/Spinner.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst LoaderCircle = createLucideIcon(\"LoaderCircle\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]\n]);\n\nexport { LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n ReactDOM.flushSync(() => send(\"ANIMATION_END\"));\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Presence\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/collapsible/src/Collapsible.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar COLLAPSIBLE_NAME = \"Collapsible\";\nvar [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\nvar [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);\nvar Collapsible = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n CollapsibleProvider,\n {\n scope: __scopeCollapsible,\n disabled,\n contentId: useId(),\n open,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(open),\n \"data-disabled\": disabled ? \"\" : void 0,\n ...collapsibleProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nCollapsible.displayName = COLLAPSIBLE_NAME;\nvar TRIGGER_NAME = \"CollapsibleTrigger\";\nvar CollapsibleTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open || false,\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n disabled: context.disabled,\n ...triggerProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nCollapsibleTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"CollapsibleContent\";\nvar CollapsibleContent = React.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });\n }\n);\nCollapsibleContent.displayName = CONTENT_NAME;\nvar CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef();\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n node.style.transitionDuration = \"0s\";\n node.style.animationName = \"none\";\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration;\n node.style.animationName = originalStylesRef.current.animationName;\n }\n setIsPresent(present);\n }\n }, [context.open, present]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n id: context.contentId,\n hidden: !isOpen,\n ...contentProps,\n ref: composedRefs,\n style: {\n [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,\n [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,\n ...props.style\n },\n children: isOpen && children\n }\n );\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root = Collapsible;\nvar Trigger = CollapsibleTrigger;\nvar Content = CollapsibleContent;\nexport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n Content,\n Root,\n Trigger,\n createCollapsibleScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { LoaderCircle } from \"lucide-react\";\n\nexport const Spinner = ({ size = 16 }: { size?: number }) => (\n <LoaderCircle size={size} className=\"animate-spin\" />\n);\n"],"names":["LoaderCircle","createLucideIcon","useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","handleAnimationEnd","isCurrentAnimation","ReactDOM","handleAnimationStart","node2","element","getter","_a","mayWarn","_b","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","createContextScope","CollapsibleProvider","useCollapsibleContext","Collapsible","forwardedRef","__scopeCollapsible","openProp","defaultOpen","disabled","onOpenChange","collapsibleProps","open","setOpen","useControllableState","jsx","useId","prevOpen","Primitive","getState","TRIGGER_NAME","CollapsibleTrigger","triggerProps","context","composeEventHandlers","CONTENT_NAME","CollapsibleContent","forceMount","contentProps","CollapsibleContentImpl","isPresent","setIsPresent","composedRefs","heightRef","height","widthRef","width","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","rect","Root","Trigger","Content","Spinner","size"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAeC,EAAiB,gBAAgB;AAAA,EACpD,CAAC,QAAQ,EAAE,GAAG,+BAA+B,KAAK,SAAQ,CAAE;AAC9D,CAAC;ACDD,SAASC,EAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAAM,WAAW,CAACC,GAAOC,MACZH,EAAQE,CAAK,EAAEC,CAAK,KAClBD,GACnBH,CAAY;AACjB;AAGG,IAACK,IAAW,CAACC,MAAU;AACxB,QAAM,EAAE,SAAAC,GAAS,UAAAC,EAAU,IAAGF,GACxBG,IAAWC,EAAYH,CAAO,GAC9BI,IAAQ,OAAOH,KAAa,aAAaA,EAAS,EAAE,SAASC,EAAS,UAAS,CAAE,IAAIG,EAAO,SAAS,KAAKJ,CAAQ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UlB;AC7ID,MAAAmB,KAAU,CAAC,EAAE,MAAAC,IAAO,SAC9B/B,gBAAAA,MAAA1D,GAAA,EAAa,MAAAyF,GAAY,WAAU,eAAe,CAAA;","x_google_ignoreList":[0,1,2]}
@@ -1,418 +0,0 @@
1
- var W = (e) => {
2
- throw TypeError(e);
3
- };
4
- var D = (e, t, s) => t.has(e) || W("Cannot " + s);
5
- var c = (e, t, s) => (D(e, t, "read from private field"), s ? s.call(e) : t.get(e)), b = (e, t, s) => t.has(e) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), E = (e, t, s, n) => (D(e, t, "write to private field"), n ? n.call(e, s) : t.set(e, s), s), C = (e, t, s) => (D(e, t, "access private method"), s);
6
- import { j as P } from "./jsx-runtime-CJZJivg2.js";
7
- import { R as L, z, n as Z } from "./DevPortalProvider-Do9oJqme.js";
8
- import * as r from "react";
9
- import * as q from "react-dom";
10
- const ct = ({
11
- children: e,
12
- className: t
13
- }) => {
14
- };
15
- var y, h, w, x, S, k, lt = (k = class extends L {
16
- constructor(t) {
17
- super();
18
- b(this, x);
19
- b(this, y);
20
- b(this, h);
21
- b(this, w);
22
- this.mutationId = t.mutationId, E(this, h, t.mutationCache), E(this, y, []), this.state = t.state || J(), this.setOptions(t.options), this.scheduleGc();
23
- }
24
- setOptions(t) {
25
- this.options = t, this.updateGcTime(this.options.gcTime);
26
- }
27
- get meta() {
28
- return this.options.meta;
29
- }
30
- addObserver(t) {
31
- c(this, y).includes(t) || (c(this, y).push(t), this.clearGcTimeout(), c(this, h).notify({
32
- type: "observerAdded",
33
- mutation: this,
34
- observer: t
35
- }));
36
- }
37
- removeObserver(t) {
38
- E(this, y, c(this, y).filter((s) => s !== t)), this.scheduleGc(), c(this, h).notify({
39
- type: "observerRemoved",
40
- mutation: this,
41
- observer: t
42
- });
43
- }
44
- optionalRemove() {
45
- c(this, y).length || (this.state.status === "pending" ? this.scheduleGc() : c(this, h).remove(this));
46
- }
47
- continue() {
48
- var t;
49
- return ((t = c(this, w)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
50
- this.execute(this.state.variables);
51
- }
52
- async execute(t) {
53
- var o, i, u, a, l, d, R, p, m, g, v, j, M, $, A, I, _, F, G, V;
54
- E(this, w, z({
55
- fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
56
- onFail: (f, O) => {
57
- C(this, x, S).call(this, { type: "failed", failureCount: f, error: O });
58
- },
59
- onPause: () => {
60
- C(this, x, S).call(this, { type: "pause" });
61
- },
62
- onContinue: () => {
63
- C(this, x, S).call(this, { type: "continue" });
64
- },
65
- retry: this.options.retry ?? 0,
66
- retryDelay: this.options.retryDelay,
67
- networkMode: this.options.networkMode,
68
- canRun: () => c(this, h).canRun(this)
69
- }));
70
- const s = this.state.status === "pending", n = !c(this, w).canStart();
71
- try {
72
- if (!s) {
73
- C(this, x, S).call(this, { type: "pending", variables: t, isPaused: n }), await ((i = (o = c(this, h).config).onMutate) == null ? void 0 : i.call(
74
- o,
75
- t,
76
- this
77
- ));
78
- const O = await ((a = (u = this.options).onMutate) == null ? void 0 : a.call(u, t));
79
- O !== this.state.context && C(this, x, S).call(this, {
80
- type: "pending",
81
- context: O,
82
- variables: t,
83
- isPaused: n
84
- });
85
- }
86
- const f = await c(this, w).start();
87
- return await ((d = (l = c(this, h).config).onSuccess) == null ? void 0 : d.call(
88
- l,
89
- f,
90
- t,
91
- this.state.context,
92
- this
93
- )), await ((p = (R = this.options).onSuccess) == null ? void 0 : p.call(R, f, t, this.state.context)), await ((g = (m = c(this, h).config).onSettled) == null ? void 0 : g.call(
94
- m,
95
- f,
96
- null,
97
- this.state.variables,
98
- this.state.context,
99
- this
100
- )), await ((j = (v = this.options).onSettled) == null ? void 0 : j.call(v, f, null, t, this.state.context)), C(this, x, S).call(this, { type: "success", data: f }), f;
101
- } catch (f) {
102
- try {
103
- throw await (($ = (M = c(this, h).config).onError) == null ? void 0 : $.call(
104
- M,
105
- f,
106
- t,
107
- this.state.context,
108
- this
109
- )), await ((I = (A = this.options).onError) == null ? void 0 : I.call(
110
- A,
111
- f,
112
- t,
113
- this.state.context
114
- )), await ((F = (_ = c(this, h).config).onSettled) == null ? void 0 : F.call(
115
- _,
116
- void 0,
117
- f,
118
- this.state.variables,
119
- this.state.context,
120
- this
121
- )), await ((V = (G = this.options).onSettled) == null ? void 0 : V.call(
122
- G,
123
- void 0,
124
- f,
125
- t,
126
- this.state.context
127
- )), f;
128
- } finally {
129
- C(this, x, S).call(this, { type: "error", error: f });
130
- }
131
- } finally {
132
- c(this, h).runNext(this);
133
- }
134
- }
135
- }, y = new WeakMap(), h = new WeakMap(), w = new WeakMap(), x = new WeakSet(), S = function(t) {
136
- const s = (n) => {
137
- switch (t.type) {
138
- case "failed":
139
- return {
140
- ...n,
141
- failureCount: t.failureCount,
142
- failureReason: t.error
143
- };
144
- case "pause":
145
- return {
146
- ...n,
147
- isPaused: !0
148
- };
149
- case "continue":
150
- return {
151
- ...n,
152
- isPaused: !1
153
- };
154
- case "pending":
155
- return {
156
- ...n,
157
- context: t.context,
158
- data: void 0,
159
- failureCount: 0,
160
- failureReason: null,
161
- error: null,
162
- isPaused: t.isPaused,
163
- status: "pending",
164
- variables: t.variables,
165
- submittedAt: Date.now()
166
- };
167
- case "success":
168
- return {
169
- ...n,
170
- data: t.data,
171
- failureCount: 0,
172
- failureReason: null,
173
- error: null,
174
- status: "success",
175
- isPaused: !1
176
- };
177
- case "error":
178
- return {
179
- ...n,
180
- data: void 0,
181
- error: t.error,
182
- failureCount: n.failureCount + 1,
183
- failureReason: t.error,
184
- isPaused: !1,
185
- status: "error"
186
- };
187
- }
188
- };
189
- this.state = s(this.state), Z.batch(() => {
190
- c(this, y).forEach((n) => {
191
- n.onMutationUpdate(t);
192
- }), c(this, h).notify({
193
- mutation: this,
194
- type: "updated",
195
- action: t
196
- });
197
- });
198
- }, k);
199
- function J() {
200
- return {
201
- context: void 0,
202
- data: void 0,
203
- error: null,
204
- failureCount: 0,
205
- failureReason: null,
206
- isPaused: !1,
207
- status: "idle",
208
- variables: void 0,
209
- submittedAt: 0
210
- };
211
- }
212
- function ft(e, t, { checkForDefaultPrevented: s = !0 } = {}) {
213
- return function(o) {
214
- if (e == null || e(o), s === !1 || !o.defaultPrevented)
215
- return t == null ? void 0 : t(o);
216
- };
217
- }
218
- function ht(e, t) {
219
- const s = r.createContext(t);
220
- function n(i) {
221
- const { children: u, ...a } = i, l = r.useMemo(() => a, Object.values(a));
222
- return /* @__PURE__ */ P.jsx(s.Provider, { value: l, children: u });
223
- }
224
- function o(i) {
225
- const u = r.useContext(s);
226
- if (u) return u;
227
- if (t !== void 0) return t;
228
- throw new Error(`\`${i}\` must be used within \`${e}\``);
229
- }
230
- return n.displayName = e + "Provider", [n, o];
231
- }
232
- function dt(e, t = []) {
233
- let s = [];
234
- function n(i, u) {
235
- const a = r.createContext(u), l = s.length;
236
- s = [...s, u];
237
- function d(p) {
238
- const { scope: m, children: g, ...v } = p, j = (m == null ? void 0 : m[e][l]) || a, M = r.useMemo(() => v, Object.values(v));
239
- return /* @__PURE__ */ P.jsx(j.Provider, { value: M, children: g });
240
- }
241
- function R(p, m) {
242
- const g = (m == null ? void 0 : m[e][l]) || a, v = r.useContext(g);
243
- if (v) return v;
244
- if (u !== void 0) return u;
245
- throw new Error(`\`${p}\` must be used within \`${i}\``);
246
- }
247
- return d.displayName = i + "Provider", [d, R];
248
- }
249
- const o = () => {
250
- const i = s.map((u) => r.createContext(u));
251
- return function(a) {
252
- const l = (a == null ? void 0 : a[e]) || i;
253
- return r.useMemo(
254
- () => ({ [`__scope${e}`]: { ...a, [e]: l } }),
255
- [a, l]
256
- );
257
- };
258
- };
259
- return o.scopeName = e, [n, K(o, ...t)];
260
- }
261
- function K(...e) {
262
- const t = e[0];
263
- if (e.length === 1) return t;
264
- const s = () => {
265
- const n = e.map((o) => ({
266
- useScope: o(),
267
- scopeName: o.scopeName
268
- }));
269
- return function(i) {
270
- const u = n.reduce((a, { useScope: l, scopeName: d }) => {
271
- const p = l(i)[`__scope${d}`];
272
- return { ...a, ...p };
273
- }, {});
274
- return r.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
275
- };
276
- };
277
- return s.scopeName = t.scopeName, s;
278
- }
279
- function T(e) {
280
- const t = r.useRef(e);
281
- return r.useEffect(() => {
282
- t.current = e;
283
- }), r.useMemo(() => (...s) => {
284
- var n;
285
- return (n = t.current) == null ? void 0 : n.call(t, ...s);
286
- }, []);
287
- }
288
- function pt({
289
- prop: e,
290
- defaultProp: t,
291
- onChange: s = () => {
292
- }
293
- }) {
294
- const [n, o] = Q({ defaultProp: t, onChange: s }), i = e !== void 0, u = i ? e : n, a = T(s), l = r.useCallback(
295
- (d) => {
296
- if (i) {
297
- const p = typeof d == "function" ? d(e) : d;
298
- p !== e && a(p);
299
- } else
300
- o(d);
301
- },
302
- [i, e, o, a]
303
- );
304
- return [u, l];
305
- }
306
- function Q({
307
- defaultProp: e,
308
- onChange: t
309
- }) {
310
- const s = r.useState(e), [n] = s, o = r.useRef(n), i = T(t);
311
- return r.useEffect(() => {
312
- o.current !== n && (i(n), o.current = n);
313
- }, [n, o, i]), s;
314
- }
315
- var X = globalThis != null && globalThis.document ? r.useLayoutEffect : () => {
316
- };
317
- function Y(e, t) {
318
- typeof e == "function" ? e(t) : e != null && (e.current = t);
319
- }
320
- function B(...e) {
321
- return (t) => e.forEach((s) => Y(s, t));
322
- }
323
- function mt(...e) {
324
- return r.useCallback(B(...e), e);
325
- }
326
- var U = r.forwardRef((e, t) => {
327
- const { children: s, ...n } = e, o = r.Children.toArray(s), i = o.find(tt);
328
- if (i) {
329
- const u = i.props.children, a = o.map((l) => l === i ? r.Children.count(u) > 1 ? r.Children.only(null) : r.isValidElement(u) ? u.props.children : null : l);
330
- return /* @__PURE__ */ P.jsx(N, { ...n, ref: t, children: r.isValidElement(u) ? r.cloneElement(u, void 0, a) : null });
331
- }
332
- return /* @__PURE__ */ P.jsx(N, { ...n, ref: t, children: s });
333
- });
334
- U.displayName = "Slot";
335
- var N = r.forwardRef((e, t) => {
336
- const { children: s, ...n } = e;
337
- if (r.isValidElement(s)) {
338
- const o = st(s);
339
- return r.cloneElement(s, {
340
- ...et(n, s.props),
341
- // @ts-ignore
342
- ref: t ? B(t, o) : o
343
- });
344
- }
345
- return r.Children.count(s) > 1 ? r.Children.only(null) : null;
346
- });
347
- N.displayName = "SlotClone";
348
- var H = ({ children: e }) => /* @__PURE__ */ P.jsx(P.Fragment, { children: e });
349
- function tt(e) {
350
- return r.isValidElement(e) && e.type === H;
351
- }
352
- function et(e, t) {
353
- const s = { ...t };
354
- for (const n in t) {
355
- const o = e[n], i = t[n];
356
- /^on[A-Z]/.test(n) ? o && i ? s[n] = (...a) => {
357
- i(...a), o(...a);
358
- } : o && (s[n] = o) : n === "style" ? s[n] = { ...o, ...i } : n === "className" && (s[n] = [o, i].filter(Boolean).join(" "));
359
- }
360
- return { ...e, ...s };
361
- }
362
- function st(e) {
363
- var n, o;
364
- let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, s = t && "isReactWarning" in t && t.isReactWarning;
365
- return s ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, s = t && "isReactWarning" in t && t.isReactWarning, s ? e.props.ref : e.props.ref || e.ref);
366
- }
367
- var nt = [
368
- "a",
369
- "button",
370
- "div",
371
- "form",
372
- "h2",
373
- "h3",
374
- "img",
375
- "input",
376
- "label",
377
- "li",
378
- "nav",
379
- "ol",
380
- "p",
381
- "span",
382
- "svg",
383
- "ul"
384
- ], yt = nt.reduce((e, t) => {
385
- const s = r.forwardRef((n, o) => {
386
- const { asChild: i, ...u } = n, a = i ? U : t;
387
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ P.jsx(a, { ...u, ref: o });
388
- });
389
- return s.displayName = `Primitive.${t}`, { ...e, [t]: s };
390
- }, {});
391
- function xt(e, t) {
392
- e && q.flushSync(() => e.dispatchEvent(t));
393
- }
394
- var ot = r.useId || (() => {
395
- }), rt = 0;
396
- function vt(e) {
397
- const [t, s] = r.useState(ot());
398
- return X(() => {
399
- s((n) => n ?? String(rt++));
400
- }, [e]), t ? `radix-${t}` : "";
401
- }
402
- export {
403
- ct as D,
404
- lt as M,
405
- yt as P,
406
- U as S,
407
- pt as a,
408
- T as b,
409
- dt as c,
410
- ft as d,
411
- vt as e,
412
- ht as f,
413
- X as g,
414
- J as h,
415
- xt as i,
416
- mt as u
417
- };
418
- //# sourceMappingURL=index-gsAuUwQh.js.map