zudoku 0.3.0-dev.16 → 0.3.0-dev.17

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 (51) hide show
  1. package/dist/config/config.d.ts +1 -1
  2. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  3. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  4. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  5. package/dist/vite/plugin-api-keys.js +2 -2
  6. package/dist/vite/plugin-api-keys.js.map +1 -1
  7. package/dist/vite/plugin-api.js +2 -2
  8. package/dist/vite/plugin-api.js.map +1 -1
  9. package/dist/vite/plugin-docs.js +1 -1
  10. package/dist/vite/plugin-docs.js.map +1 -1
  11. package/dist/vite/plugin-redirect.js +2 -2
  12. package/dist/vite/plugin-redirect.js.map +1 -1
  13. package/lib/DevPortalProvider-CRKuwoXc.js +4123 -0
  14. package/lib/Markdown-5LmPZyLV.js +8620 -0
  15. package/lib/MdxComponents-DYD_QPVF.js +3017 -0
  16. package/lib/Select-DR3PiqjV.js +4569 -0
  17. package/lib/Spinner-DjQ2eBxC.js +181 -0
  18. package/lib/_commonjsHelpers-BkfeUUK-.js +28 -0
  19. package/lib/hook-FCY9-FHO.js +24 -0
  20. package/lib/index-By9bEW57.js +411 -0
  21. package/lib/{loglevel-CoH7VSwE.js → loglevel-CA34MiFn.js} +10 -10
  22. package/lib/state-Ds_OxRHP.js +288 -0
  23. package/lib/util-voKLTRDG.js +740 -0
  24. package/lib/zudoku.auth-auth0.js +1 -1
  25. package/lib/zudoku.auth-clerk.js +1 -1
  26. package/lib/zudoku.auth-openid.js +2 -2
  27. package/lib/zudoku.components.js +111 -104
  28. package/lib/zudoku.plugin-api-keys.js +292 -0
  29. package/lib/zudoku.plugin-markdown.js +255 -0
  30. package/lib/zudoku.plugin-openapi.js +6240 -0
  31. package/lib/zudoku.plugin-redirect.js +10 -0
  32. package/package.json +12 -3
  33. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  34. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  35. package/dist/lib/plugins/api-key/index.js.map +0 -1
  36. package/dist/lib/plugins/index.d.ts +0 -4
  37. package/dist/lib/plugins/index.js +0 -5
  38. package/dist/lib/plugins/index.js.map +0 -1
  39. package/lib/Spinner-Cf0Eb7YI.js +0 -8460
  40. package/lib/state-2Hu1renZ.js +0 -313
  41. package/lib/zudoku.plugins.js +0 -19918
  42. package/src/lib/plugins/index.ts +0 -4
  43. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  44. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +0 -0
  45. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  46. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.js +0 -0
  47. /package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +0 -0
  48. /package/dist/lib/plugins/{api-key → api-keys}/index.js +0 -0
  49. /package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +0 -0
  50. /package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +0 -0
  51. /package/src/lib/plugins/{api-key → api-keys}/index.tsx +0 -0
@@ -0,0 +1,181 @@
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-By9bEW57.js";
3
+ import * as W from "react-dom";
4
+ import { j as N } from "./index-PyGcnQFX.js";
5
+ import { c as F } from "./DevPortalProvider-CRKuwoXc.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
+ };
@@ -0,0 +1,28 @@
1
+ var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function f(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ function l(e) {
6
+ if (e.__esModule) return e;
7
+ var r = e.default;
8
+ if (typeof r == "function") {
9
+ var t = function o() {
10
+ return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
11
+ };
12
+ t.prototype = r.prototype;
13
+ } else t = {};
14
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
15
+ var n = Object.getOwnPropertyDescriptor(e, o);
16
+ Object.defineProperty(t, o, n.get ? n : {
17
+ enumerable: !0,
18
+ get: function() {
19
+ return e[o];
20
+ }
21
+ });
22
+ }), t;
23
+ }
24
+ export {
25
+ l as a,
26
+ u as c,
27
+ f as g
28
+ };
@@ -0,0 +1,24 @@
1
+ import { u as e } from "./DevPortalProvider-CRKuwoXc.js";
2
+ import { u as i } from "./state-Ds_OxRHP.js";
3
+ const s = () => {
4
+ const { authentication: t } = e(), o = i(), n = typeof t < "u";
5
+ return {
6
+ isAuthEnabled: n,
7
+ isPending: o.isPending,
8
+ profile: o.profile,
9
+ isAuthenticated: o.profile,
10
+ login: async () => {
11
+ if (!n)
12
+ throw new Error("Authentication is not enabled.");
13
+ await t.login();
14
+ },
15
+ logout: async () => {
16
+ if (!n)
17
+ throw new Error("Authentication is not enabled.");
18
+ await t.logout(), window.location.href = "/";
19
+ }
20
+ };
21
+ };
22
+ export {
23
+ s as u
24
+ };
@@ -0,0 +1,411 @@
1
+ var W = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var N = (e, t, s) => t.has(e) || W("Cannot " + s);
5
+ var c = (e, t, s) => (N(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) => (N(e, t, "write to private field"), n ? n.call(e, s) : t.set(e, s), s), C = (e, t, s) => (N(e, t, "access private method"), s);
6
+ import { H as L, I as Z, n as q } from "./DevPortalProvider-CRKuwoXc.js";
7
+ import * as r from "react";
8
+ import { j as P } from "./index-PyGcnQFX.js";
9
+ import * as z from "react-dom";
10
+ var y, h, w, x, S, k, ct = (k = class extends L {
11
+ constructor(t) {
12
+ super();
13
+ b(this, x);
14
+ b(this, y);
15
+ b(this, h);
16
+ b(this, w);
17
+ this.mutationId = t.mutationId, E(this, h, t.mutationCache), E(this, y, []), this.state = t.state || J(), this.setOptions(t.options), this.scheduleGc();
18
+ }
19
+ setOptions(t) {
20
+ this.options = t, this.updateGcTime(this.options.gcTime);
21
+ }
22
+ get meta() {
23
+ return this.options.meta;
24
+ }
25
+ addObserver(t) {
26
+ c(this, y).includes(t) || (c(this, y).push(t), this.clearGcTimeout(), c(this, h).notify({
27
+ type: "observerAdded",
28
+ mutation: this,
29
+ observer: t
30
+ }));
31
+ }
32
+ removeObserver(t) {
33
+ E(this, y, c(this, y).filter((s) => s !== t)), this.scheduleGc(), c(this, h).notify({
34
+ type: "observerRemoved",
35
+ mutation: this,
36
+ observer: t
37
+ });
38
+ }
39
+ optionalRemove() {
40
+ c(this, y).length || (this.state.status === "pending" ? this.scheduleGc() : c(this, h).remove(this));
41
+ }
42
+ continue() {
43
+ var t;
44
+ return ((t = c(this, w)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
45
+ this.execute(this.state.variables);
46
+ }
47
+ async execute(t) {
48
+ var o, i, u, a, l, d, g, p, m, R, v, j, M, $, I, A, _, F, G, V;
49
+ E(this, w, Z({
50
+ fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
51
+ onFail: (f, O) => {
52
+ C(this, x, S).call(this, { type: "failed", failureCount: f, error: O });
53
+ },
54
+ onPause: () => {
55
+ C(this, x, S).call(this, { type: "pause" });
56
+ },
57
+ onContinue: () => {
58
+ C(this, x, S).call(this, { type: "continue" });
59
+ },
60
+ retry: this.options.retry ?? 0,
61
+ retryDelay: this.options.retryDelay,
62
+ networkMode: this.options.networkMode,
63
+ canRun: () => c(this, h).canRun(this)
64
+ }));
65
+ const s = this.state.status === "pending", n = !c(this, w).canStart();
66
+ try {
67
+ if (!s) {
68
+ 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(
69
+ o,
70
+ t,
71
+ this
72
+ ));
73
+ const O = await ((a = (u = this.options).onMutate) == null ? void 0 : a.call(u, t));
74
+ O !== this.state.context && C(this, x, S).call(this, {
75
+ type: "pending",
76
+ context: O,
77
+ variables: t,
78
+ isPaused: n
79
+ });
80
+ }
81
+ const f = await c(this, w).start();
82
+ return await ((d = (l = c(this, h).config).onSuccess) == null ? void 0 : d.call(
83
+ l,
84
+ f,
85
+ t,
86
+ this.state.context,
87
+ this
88
+ )), await ((p = (g = this.options).onSuccess) == null ? void 0 : p.call(g, f, t, this.state.context)), await ((R = (m = c(this, h).config).onSettled) == null ? void 0 : R.call(
89
+ m,
90
+ f,
91
+ null,
92
+ this.state.variables,
93
+ this.state.context,
94
+ this
95
+ )), 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;
96
+ } catch (f) {
97
+ try {
98
+ throw await (($ = (M = c(this, h).config).onError) == null ? void 0 : $.call(
99
+ M,
100
+ f,
101
+ t,
102
+ this.state.context,
103
+ this
104
+ )), await ((A = (I = this.options).onError) == null ? void 0 : A.call(
105
+ I,
106
+ f,
107
+ t,
108
+ this.state.context
109
+ )), await ((F = (_ = c(this, h).config).onSettled) == null ? void 0 : F.call(
110
+ _,
111
+ void 0,
112
+ f,
113
+ this.state.variables,
114
+ this.state.context,
115
+ this
116
+ )), await ((V = (G = this.options).onSettled) == null ? void 0 : V.call(
117
+ G,
118
+ void 0,
119
+ f,
120
+ t,
121
+ this.state.context
122
+ )), f;
123
+ } finally {
124
+ C(this, x, S).call(this, { type: "error", error: f });
125
+ }
126
+ } finally {
127
+ c(this, h).runNext(this);
128
+ }
129
+ }
130
+ }, y = new WeakMap(), h = new WeakMap(), w = new WeakMap(), x = new WeakSet(), S = function(t) {
131
+ const s = (n) => {
132
+ switch (t.type) {
133
+ case "failed":
134
+ return {
135
+ ...n,
136
+ failureCount: t.failureCount,
137
+ failureReason: t.error
138
+ };
139
+ case "pause":
140
+ return {
141
+ ...n,
142
+ isPaused: !0
143
+ };
144
+ case "continue":
145
+ return {
146
+ ...n,
147
+ isPaused: !1
148
+ };
149
+ case "pending":
150
+ return {
151
+ ...n,
152
+ context: t.context,
153
+ data: void 0,
154
+ failureCount: 0,
155
+ failureReason: null,
156
+ error: null,
157
+ isPaused: t.isPaused,
158
+ status: "pending",
159
+ variables: t.variables,
160
+ submittedAt: Date.now()
161
+ };
162
+ case "success":
163
+ return {
164
+ ...n,
165
+ data: t.data,
166
+ failureCount: 0,
167
+ failureReason: null,
168
+ error: null,
169
+ status: "success",
170
+ isPaused: !1
171
+ };
172
+ case "error":
173
+ return {
174
+ ...n,
175
+ data: void 0,
176
+ error: t.error,
177
+ failureCount: n.failureCount + 1,
178
+ failureReason: t.error,
179
+ isPaused: !1,
180
+ status: "error"
181
+ };
182
+ }
183
+ };
184
+ this.state = s(this.state), q.batch(() => {
185
+ c(this, y).forEach((n) => {
186
+ n.onMutationUpdate(t);
187
+ }), c(this, h).notify({
188
+ mutation: this,
189
+ type: "updated",
190
+ action: t
191
+ });
192
+ });
193
+ }, k);
194
+ function J() {
195
+ return {
196
+ context: void 0,
197
+ data: void 0,
198
+ error: null,
199
+ failureCount: 0,
200
+ failureReason: null,
201
+ isPaused: !1,
202
+ status: "idle",
203
+ variables: void 0,
204
+ submittedAt: 0
205
+ };
206
+ }
207
+ function lt(e, t, { checkForDefaultPrevented: s = !0 } = {}) {
208
+ return function(o) {
209
+ if (e == null || e(o), s === !1 || !o.defaultPrevented)
210
+ return t == null ? void 0 : t(o);
211
+ };
212
+ }
213
+ function ft(e, t) {
214
+ const s = r.createContext(t);
215
+ function n(i) {
216
+ const { children: u, ...a } = i, l = r.useMemo(() => a, Object.values(a));
217
+ return /* @__PURE__ */ P.jsx(s.Provider, { value: l, children: u });
218
+ }
219
+ function o(i) {
220
+ const u = r.useContext(s);
221
+ if (u) return u;
222
+ if (t !== void 0) return t;
223
+ throw new Error(`\`${i}\` must be used within \`${e}\``);
224
+ }
225
+ return n.displayName = e + "Provider", [n, o];
226
+ }
227
+ function ht(e, t = []) {
228
+ let s = [];
229
+ function n(i, u) {
230
+ const a = r.createContext(u), l = s.length;
231
+ s = [...s, u];
232
+ function d(p) {
233
+ const { scope: m, children: R, ...v } = p, j = (m == null ? void 0 : m[e][l]) || a, M = r.useMemo(() => v, Object.values(v));
234
+ return /* @__PURE__ */ P.jsx(j.Provider, { value: M, children: R });
235
+ }
236
+ function g(p, m) {
237
+ const R = (m == null ? void 0 : m[e][l]) || a, v = r.useContext(R);
238
+ if (v) return v;
239
+ if (u !== void 0) return u;
240
+ throw new Error(`\`${p}\` must be used within \`${i}\``);
241
+ }
242
+ return d.displayName = i + "Provider", [d, g];
243
+ }
244
+ const o = () => {
245
+ const i = s.map((u) => r.createContext(u));
246
+ return function(a) {
247
+ const l = (a == null ? void 0 : a[e]) || i;
248
+ return r.useMemo(
249
+ () => ({ [`__scope${e}`]: { ...a, [e]: l } }),
250
+ [a, l]
251
+ );
252
+ };
253
+ };
254
+ return o.scopeName = e, [n, K(o, ...t)];
255
+ }
256
+ function K(...e) {
257
+ const t = e[0];
258
+ if (e.length === 1) return t;
259
+ const s = () => {
260
+ const n = e.map((o) => ({
261
+ useScope: o(),
262
+ scopeName: o.scopeName
263
+ }));
264
+ return function(i) {
265
+ const u = n.reduce((a, { useScope: l, scopeName: d }) => {
266
+ const p = l(i)[`__scope${d}`];
267
+ return { ...a, ...p };
268
+ }, {});
269
+ return r.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
270
+ };
271
+ };
272
+ return s.scopeName = t.scopeName, s;
273
+ }
274
+ function T(e) {
275
+ const t = r.useRef(e);
276
+ return r.useEffect(() => {
277
+ t.current = e;
278
+ }), r.useMemo(() => (...s) => {
279
+ var n;
280
+ return (n = t.current) == null ? void 0 : n.call(t, ...s);
281
+ }, []);
282
+ }
283
+ function dt({
284
+ prop: e,
285
+ defaultProp: t,
286
+ onChange: s = () => {
287
+ }
288
+ }) {
289
+ const [n, o] = Q({ defaultProp: t, onChange: s }), i = e !== void 0, u = i ? e : n, a = T(s), l = r.useCallback(
290
+ (d) => {
291
+ if (i) {
292
+ const p = typeof d == "function" ? d(e) : d;
293
+ p !== e && a(p);
294
+ } else
295
+ o(d);
296
+ },
297
+ [i, e, o, a]
298
+ );
299
+ return [u, l];
300
+ }
301
+ function Q({
302
+ defaultProp: e,
303
+ onChange: t
304
+ }) {
305
+ const s = r.useState(e), [n] = s, o = r.useRef(n), i = T(t);
306
+ return r.useEffect(() => {
307
+ o.current !== n && (i(n), o.current = n);
308
+ }, [n, o, i]), s;
309
+ }
310
+ var X = globalThis != null && globalThis.document ? r.useLayoutEffect : () => {
311
+ };
312
+ function Y(e, t) {
313
+ typeof e == "function" ? e(t) : e != null && (e.current = t);
314
+ }
315
+ function B(...e) {
316
+ return (t) => e.forEach((s) => Y(s, t));
317
+ }
318
+ function pt(...e) {
319
+ return r.useCallback(B(...e), e);
320
+ }
321
+ var U = r.forwardRef((e, t) => {
322
+ const { children: s, ...n } = e, o = r.Children.toArray(s), i = o.find(tt);
323
+ if (i) {
324
+ 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);
325
+ return /* @__PURE__ */ P.jsx(D, { ...n, ref: t, children: r.isValidElement(u) ? r.cloneElement(u, void 0, a) : null });
326
+ }
327
+ return /* @__PURE__ */ P.jsx(D, { ...n, ref: t, children: s });
328
+ });
329
+ U.displayName = "Slot";
330
+ var D = r.forwardRef((e, t) => {
331
+ const { children: s, ...n } = e;
332
+ if (r.isValidElement(s)) {
333
+ const o = st(s);
334
+ return r.cloneElement(s, {
335
+ ...et(n, s.props),
336
+ // @ts-ignore
337
+ ref: t ? B(t, o) : o
338
+ });
339
+ }
340
+ return r.Children.count(s) > 1 ? r.Children.only(null) : null;
341
+ });
342
+ D.displayName = "SlotClone";
343
+ var H = ({ children: e }) => /* @__PURE__ */ P.jsx(P.Fragment, { children: e });
344
+ function tt(e) {
345
+ return r.isValidElement(e) && e.type === H;
346
+ }
347
+ function et(e, t) {
348
+ const s = { ...t };
349
+ for (const n in t) {
350
+ const o = e[n], i = t[n];
351
+ /^on[A-Z]/.test(n) ? o && i ? s[n] = (...a) => {
352
+ i(...a), o(...a);
353
+ } : o && (s[n] = o) : n === "style" ? s[n] = { ...o, ...i } : n === "className" && (s[n] = [o, i].filter(Boolean).join(" "));
354
+ }
355
+ return { ...e, ...s };
356
+ }
357
+ function st(e) {
358
+ var n, o;
359
+ let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, s = t && "isReactWarning" in t && t.isReactWarning;
360
+ 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);
361
+ }
362
+ var nt = [
363
+ "a",
364
+ "button",
365
+ "div",
366
+ "form",
367
+ "h2",
368
+ "h3",
369
+ "img",
370
+ "input",
371
+ "label",
372
+ "li",
373
+ "nav",
374
+ "ol",
375
+ "p",
376
+ "span",
377
+ "svg",
378
+ "ul"
379
+ ], mt = nt.reduce((e, t) => {
380
+ const s = r.forwardRef((n, o) => {
381
+ const { asChild: i, ...u } = n, a = i ? U : t;
382
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ P.jsx(a, { ...u, ref: o });
383
+ });
384
+ return s.displayName = `Primitive.${t}`, { ...e, [t]: s };
385
+ }, {});
386
+ function yt(e, t) {
387
+ e && z.flushSync(() => e.dispatchEvent(t));
388
+ }
389
+ var ot = r.useId || (() => {
390
+ }), rt = 0;
391
+ function xt(e) {
392
+ const [t, s] = r.useState(ot());
393
+ return X(() => {
394
+ s((n) => n ?? String(rt++));
395
+ }, [e]), t ? `radix-${t}` : "";
396
+ }
397
+ export {
398
+ ct as M,
399
+ mt as P,
400
+ U as S,
401
+ dt as a,
402
+ T as b,
403
+ ht as c,
404
+ lt as d,
405
+ xt as e,
406
+ ft as f,
407
+ X as g,
408
+ J as h,
409
+ yt as i,
410
+ pt as u
411
+ };
@@ -1,4 +1,4 @@
1
- import { a as N, g as _ } from "./state-2Hu1renZ.js";
1
+ import { c as N, g as _ } from "./_commonjsHelpers-BkfeUUK-.js";
2
2
  var I = { exports: {} };
3
3
  (function(w) {
4
4
  (function(g, i) {
@@ -30,7 +30,7 @@ var I = { exports: {} };
30
30
  function x(o) {
31
31
  return o === "debug" && (o = "log"), typeof console === i ? !1 : o === "trace" && C ? T : console[o] !== void 0 ? h(console, o) : console.log !== void 0 ? h(console, "log") : g;
32
32
  }
33
- function u() {
33
+ function c() {
34
34
  for (var o = this.getLevel(), t = 0; t < p.length; t++) {
35
35
  var e = p[t];
36
36
  this[e] = t < o ? g : this.methodFactory(e, o, this.name);
@@ -40,7 +40,7 @@ var I = { exports: {} };
40
40
  }
41
41
  function F(o) {
42
42
  return function() {
43
- typeof console !== i && (u.call(this), this[o].apply(this, arguments));
43
+ typeof console !== i && (c.call(this), this[o].apply(this, arguments));
44
44
  };
45
45
  }
46
46
  function R(o, t, e) {
@@ -93,7 +93,7 @@ var I = { exports: {} };
93
93
  }
94
94
  }
95
95
  }
96
- function c(n) {
96
+ function u(n) {
97
97
  var r = n;
98
98
  if (typeof r == "string" && e.levels[r.toUpperCase()] !== void 0 && (r = e.levels[r.toUpperCase()]), typeof r == "number" && r >= 0 && r <= e.levels.SILENT)
99
99
  return r;
@@ -109,24 +109,24 @@ var I = { exports: {} };
109
109
  }, e.methodFactory = t || R, e.getLevel = function() {
110
110
  return f ?? y ?? v;
111
111
  }, e.setLevel = function(n, r) {
112
- return f = c(n), r !== !1 && S(f), u.call(e);
112
+ return f = u(n), r !== !1 && S(f), c.call(e);
113
113
  }, e.setDefaultLevel = function(n) {
114
- y = c(n), b() || e.setLevel(n, !1);
114
+ y = u(n), b() || e.setLevel(n, !1);
115
115
  }, e.resetLevel = function() {
116
- f = null, U(), u.call(e);
116
+ f = null, U(), c.call(e);
117
117
  }, e.enableAll = function(n) {
118
118
  e.setLevel(e.levels.TRACE, n);
119
119
  }, e.disableAll = function(n) {
120
120
  e.setLevel(e.levels.SILENT, n);
121
121
  }, e.rebuild = function() {
122
- if (l !== e && (v = c(l.getLevel())), u.call(e), l === e)
122
+ if (l !== e && (v = u(l.getLevel())), c.call(e), l === e)
123
123
  for (var n in a)
124
124
  a[n].rebuild();
125
- }, v = c(
125
+ }, v = u(
126
126
  l ? l.getLevel() : "WARN"
127
127
  );
128
128
  var E = b();
129
- E != null && (f = c(E)), u.call(e);
129
+ E != null && (f = u(E)), c.call(e);
130
130
  }
131
131
  l = new L(), l.getLogger = function(t) {
132
132
  if (typeof t != "symbol" && typeof t != "string" || t === "")