@saleor/macaw-ui
Version:
Saleor's UI component library
1,506 lines (1,504 loc) • 609 kB
JavaScript
import * as ls from "react";
import ds, { useMemo as Hs, createContext as Se, createElement as E, useContext as Ze, useCallback as os, forwardRef as K, Children as ve, isValidElement as ot, cloneElement as Qt, Fragment as _n, useRef as Y, useEffect as fs, useState as hs, useLayoutEffect as Ue, useReducer as Yi, Component as X1, useImperativeHandle as J1 } from "react";
import * as Q1 from "react-dom";
import Gi, { flushSync as Xi } from "react-dom";
function sr(s) {
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
}
var Ko = { exports: {} }, st = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var K8;
function er() {
if (K8) return st;
K8 = 1;
var s = ds, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, i = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
function f(l, a, r) {
var d, p = {}, _ = null, u = null;
r !== void 0 && (_ = "" + r), a.key !== void 0 && (_ = "" + a.key), a.ref !== void 0 && (u = a.ref);
for (d in a) o.call(a, d) && !n.hasOwnProperty(d) && (p[d] = a[d]);
if (l && l.defaultProps) for (d in a = l.defaultProps, a) p[d] === void 0 && (p[d] = a[d]);
return { $$typeof: e, type: l, key: _, ref: u, props: p, _owner: i.current };
}
return st.Fragment = t, st.jsx = f, st.jsxs = f, st;
}
var et = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var B8;
function tr() {
return B8 || (B8 = 1, process.env.NODE_ENV !== "production" && function() {
var s = ds, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), x = Symbol.iterator, m = "@@iterator";
function v(k) {
if (k === null || typeof k != "object")
return null;
var q = x && k[x] || k[m];
return typeof q == "function" ? q : null;
}
var y = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function h(k) {
{
for (var q = arguments.length, ts = new Array(q > 1 ? q - 1 : 0), ps = 1; ps < q; ps++)
ts[ps - 1] = arguments[ps];
C("error", k, ts);
}
}
function C(k, q, ts) {
{
var ps = y.ReactDebugCurrentFrame, Cs = ps.getStackAddendum();
Cs !== "" && (q += "%s", ts = ts.concat([Cs]));
var Is = ts.map(function(bs) {
return String(bs);
});
Is.unshift("Warning: " + q), Function.prototype.apply.call(console[k], console, Is);
}
}
var g = !1, b = !1, $ = !1, D = !1, P = !1, I;
I = Symbol.for("react.module.reference");
function O(k) {
return !!(typeof k == "string" || typeof k == "function" || k === o || k === n || P || k === i || k === r || k === d || D || k === u || g || b || $ || typeof k == "object" && k !== null && (k.$$typeof === _ || k.$$typeof === p || k.$$typeof === f || k.$$typeof === l || k.$$typeof === a || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
k.$$typeof === I || k.getModuleId !== void 0));
}
function M(k, q, ts) {
var ps = k.displayName;
if (ps)
return ps;
var Cs = q.displayName || q.name || "";
return Cs !== "" ? ts + "(" + Cs + ")" : ts;
}
function W(k) {
return k.displayName || "Context";
}
function Q(k) {
if (k == null)
return null;
if (typeof k.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof k == "function")
return k.displayName || k.name || null;
if (typeof k == "string")
return k;
switch (k) {
case o:
return "Fragment";
case t:
return "Portal";
case n:
return "Profiler";
case i:
return "StrictMode";
case r:
return "Suspense";
case d:
return "SuspenseList";
}
if (typeof k == "object")
switch (k.$$typeof) {
case l:
var q = k;
return W(q) + ".Consumer";
case f:
var ts = k;
return W(ts._context) + ".Provider";
case a:
return M(k, k.render, "ForwardRef");
case p:
var ps = k.displayName || null;
return ps !== null ? ps : Q(k.type) || "Memo";
case _: {
var Cs = k, Is = Cs._payload, bs = Cs._init;
try {
return Q(bs(Is));
} catch {
return null;
}
}
}
return null;
}
var A = Object.assign, Z = 0, B, is, U, T, w, j, V;
function N() {
}
N.__reactDisabledLog = !0;
function R() {
{
if (Z === 0) {
B = console.log, is = console.info, U = console.warn, T = console.error, w = console.group, j = console.groupCollapsed, V = console.groupEnd;
var k = {
configurable: !0,
enumerable: !0,
value: N,
writable: !0
};
Object.defineProperties(console, {
info: k,
log: k,
warn: k,
error: k,
group: k,
groupCollapsed: k,
groupEnd: k
});
}
Z++;
}
}
function H() {
{
if (Z--, Z === 0) {
var k = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: A({}, k, {
value: B
}),
info: A({}, k, {
value: is
}),
warn: A({}, k, {
value: U
}),
error: A({}, k, {
value: T
}),
group: A({}, k, {
value: w
}),
groupCollapsed: A({}, k, {
value: j
}),
groupEnd: A({}, k, {
value: V
})
});
}
Z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var z = y.ReactCurrentDispatcher, G;
function X(k, q, ts) {
{
if (G === void 0)
try {
throw Error();
} catch (Cs) {
var ps = Cs.stack.trim().match(/\n( *(at )?)/);
G = ps && ps[1] || "";
}
return `
` + G + k;
}
}
var es = !1, ns;
{
var cs = typeof WeakMap == "function" ? WeakMap : Map;
ns = new cs();
}
function L(k, q) {
if (!k || es)
return "";
{
var ts = ns.get(k);
if (ts !== void 0)
return ts;
}
var ps;
es = !0;
var Cs = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var Is;
Is = z.current, z.current = null, R();
try {
if (q) {
var bs = function() {
throw Error();
};
if (Object.defineProperty(bs.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(bs, []);
} catch (pe) {
ps = pe;
}
Reflect.construct(k, [], bs);
} else {
try {
bs.call();
} catch (pe) {
ps = pe;
}
k.call(bs.prototype);
}
} else {
try {
throw Error();
} catch (pe) {
ps = pe;
}
k();
}
} catch (pe) {
if (pe && ps && typeof pe.stack == "string") {
for (var us = pe.stack.split(`
`), Ns = ps.stack.split(`
`), Os = us.length - 1, Rs = Ns.length - 1; Os >= 1 && Rs >= 0 && us[Os] !== Ns[Rs]; )
Rs--;
for (; Os >= 1 && Rs >= 0; Os--, Rs--)
if (us[Os] !== Ns[Rs]) {
if (Os !== 1 || Rs !== 1)
do
if (Os--, Rs--, Rs < 0 || us[Os] !== Ns[Rs]) {
var Us = `
` + us[Os].replace(" at new ", " at ");
return k.displayName && Us.includes("<anonymous>") && (Us = Us.replace("<anonymous>", k.displayName)), typeof k == "function" && ns.set(k, Us), Us;
}
while (Os >= 1 && Rs >= 0);
break;
}
}
} finally {
es = !1, z.current = Is, H(), Error.prepareStackTrace = Cs;
}
var Ne = k ? k.displayName || k.name : "", F8 = Ne ? X(Ne) : "";
return typeof k == "function" && ns.set(k, F8), F8;
}
function ms(k, q, ts) {
return L(k, !1);
}
function ss(k) {
var q = k.prototype;
return !!(q && q.isReactComponent);
}
function Es(k, q, ts) {
if (k == null)
return "";
if (typeof k == "function")
return L(k, ss(k));
if (typeof k == "string")
return X(k);
switch (k) {
case r:
return X("Suspense");
case d:
return X("SuspenseList");
}
if (typeof k == "object")
switch (k.$$typeof) {
case a:
return ms(k.render);
case p:
return Es(k.type, q, ts);
case _: {
var ps = k, Cs = ps._payload, Is = ps._init;
try {
return Es(Is(Cs), q, ts);
} catch {
}
}
}
return "";
}
var ws = Object.prototype.hasOwnProperty, Ss = {}, Ms = y.ReactDebugCurrentFrame;
function Vs(k) {
if (k) {
var q = k._owner, ts = Es(k.type, k._source, q ? q.type : null);
Ms.setExtraStackFrame(ts);
} else
Ms.setExtraStackFrame(null);
}
function re(k, q, ts, ps, Cs) {
{
var Is = Function.call.bind(ws);
for (var bs in k)
if (Is(k, bs)) {
var us = void 0;
try {
if (typeof k[bs] != "function") {
var Ns = Error((ps || "React class") + ": " + ts + " type `" + bs + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof k[bs] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw Ns.name = "Invariant Violation", Ns;
}
us = k[bs](q, bs, ps, ts, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (Os) {
us = Os;
}
us && !(us instanceof Error) && (Vs(Cs), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ps || "React class", ts, bs, typeof us), Vs(null)), us instanceof Error && !(us.message in Ss) && (Ss[us.message] = !0, Vs(Cs), h("Failed %s type: %s", ts, us.message), Vs(null));
}
}
}
var js = Array.isArray;
function As(k) {
return js(k);
}
function $e(k) {
{
var q = typeof Symbol == "function" && Symbol.toStringTag, ts = q && k[Symbol.toStringTag] || k.constructor.name || "Object";
return ts;
}
}
function Ve(k) {
try {
return Xs(k), !1;
} catch {
return !0;
}
}
function Xs(k) {
return "" + k;
}
function te(k) {
if (Ve(k))
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", $e(k)), Xs(k);
}
var Js = y.ReactCurrentOwner, qs = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, kt, A8;
function V1(k) {
if (ws.call(k, "ref")) {
var q = Object.getOwnPropertyDescriptor(k, "ref").get;
if (q && q.isReactWarning)
return !1;
}
return k.ref !== void 0;
}
function A1(k) {
if (ws.call(k, "key")) {
var q = Object.getOwnPropertyDescriptor(k, "key").get;
if (q && q.isReactWarning)
return !1;
}
return k.key !== void 0;
}
function N1(k, q) {
typeof k.ref == "string" && Js.current;
}
function W1(k, q) {
{
var ts = function() {
kt || (kt = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", q));
};
ts.isReactWarning = !0, Object.defineProperty(k, "key", {
get: ts,
configurable: !0
});
}
}
function L1(k, q) {
{
var ts = function() {
A8 || (A8 = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", q));
};
ts.isReactWarning = !0, Object.defineProperty(k, "ref", {
get: ts,
configurable: !0
});
}
}
var z1 = function(k, q, ts, ps, Cs, Is, bs) {
var us = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: e,
// Built-in properties that belong on the element
type: k,
key: q,
ref: ts,
props: bs,
// Record the component responsible for creating this element.
_owner: Is
};
return us._store = {}, Object.defineProperty(us._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(us, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: ps
}), Object.defineProperty(us, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Cs
}), Object.freeze && (Object.freeze(us.props), Object.freeze(us)), us;
};
function H1(k, q, ts, ps, Cs) {
{
var Is, bs = {}, us = null, Ns = null;
ts !== void 0 && (te(ts), us = "" + ts), A1(q) && (te(q.key), us = "" + q.key), V1(q) && (Ns = q.ref, N1(q, Cs));
for (Is in q)
ws.call(q, Is) && !qs.hasOwnProperty(Is) && (bs[Is] = q[Is]);
if (k && k.defaultProps) {
var Os = k.defaultProps;
for (Is in Os)
bs[Is] === void 0 && (bs[Is] = Os[Is]);
}
if (us || Ns) {
var Rs = typeof k == "function" ? k.displayName || k.name || "Unknown" : k;
us && W1(bs, Rs), Ns && L1(bs, Rs);
}
return z1(k, us, Ns, Cs, ps, Js.current, bs);
}
}
var wo = y.ReactCurrentOwner, N8 = y.ReactDebugCurrentFrame;
function Ae(k) {
if (k) {
var q = k._owner, ts = Es(k.type, k._source, q ? q.type : null);
N8.setExtraStackFrame(ts);
} else
N8.setExtraStackFrame(null);
}
var $o;
$o = !1;
function Io(k) {
return typeof k == "object" && k !== null && k.$$typeof === e;
}
function W8() {
{
if (wo.current) {
var k = Q(wo.current.type);
if (k)
return `
Check the render method of \`` + k + "`.";
}
return "";
}
}
function q1(k) {
return "";
}
var L8 = {};
function F1(k) {
{
var q = W8();
if (!q) {
var ts = typeof k == "string" ? k : k.displayName || k.name;
ts && (q = `
Check the top-level render call using <` + ts + ">.");
}
return q;
}
}
function z8(k, q) {
{
if (!k._store || k._store.validated || k.key != null)
return;
k._store.validated = !0;
var ts = F1(q);
if (L8[ts])
return;
L8[ts] = !0;
var ps = "";
k && k._owner && k._owner !== wo.current && (ps = " It was passed a child from " + Q(k._owner.type) + "."), Ae(k), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ts, ps), Ae(null);
}
}
function H8(k, q) {
{
if (typeof k != "object")
return;
if (As(k))
for (var ts = 0; ts < k.length; ts++) {
var ps = k[ts];
Io(ps) && z8(ps, q);
}
else if (Io(k))
k._store && (k._store.validated = !0);
else if (k) {
var Cs = v(k);
if (typeof Cs == "function" && Cs !== k.entries)
for (var Is = Cs.call(k), bs; !(bs = Is.next()).done; )
Io(bs.value) && z8(bs.value, q);
}
}
}
function K1(k) {
{
var q = k.type;
if (q == null || typeof q == "string")
return;
var ts;
if (typeof q == "function")
ts = q.propTypes;
else if (typeof q == "object" && (q.$$typeof === a || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
q.$$typeof === p))
ts = q.propTypes;
else
return;
if (ts) {
var ps = Q(q);
re(ts, k.props, "prop", ps, k);
} else if (q.PropTypes !== void 0 && !$o) {
$o = !0;
var Cs = Q(q);
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Cs || "Unknown");
}
typeof q.getDefaultProps == "function" && !q.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function B1(k) {
{
for (var q = Object.keys(k.props), ts = 0; ts < q.length; ts++) {
var ps = q[ts];
if (ps !== "children" && ps !== "key") {
Ae(k), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ps), Ae(null);
break;
}
}
k.ref !== null && (Ae(k), h("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
}
}
function q8(k, q, ts, ps, Cs, Is) {
{
var bs = O(k);
if (!bs) {
var us = "";
(k === void 0 || typeof k == "object" && k !== null && Object.keys(k).length === 0) && (us += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var Ns = q1();
Ns ? us += Ns : us += W8();
var Os;
k === null ? Os = "null" : As(k) ? Os = "array" : k !== void 0 && k.$$typeof === e ? (Os = "<" + (Q(k.type) || "Unknown") + " />", us = " Did you accidentally export a JSX literal instead of a component?") : Os = typeof k, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Os, us);
}
var Rs = H1(k, q, ts, Cs, Is);
if (Rs == null)
return Rs;
if (bs) {
var Us = q.children;
if (Us !== void 0)
if (ps)
if (As(Us)) {
for (var Ne = 0; Ne < Us.length; Ne++)
H8(Us[Ne], k);
Object.freeze && Object.freeze(Us);
} else
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
H8(Us, k);
}
return k === o ? B1(Rs) : K1(Rs), Rs;
}
}
function Z1(k, q, ts) {
return q8(k, q, ts, !0);
}
function U1(k, q, ts) {
return q8(k, q, ts, !1);
}
var Y1 = U1, G1 = Z1;
et.Fragment = o, et.jsx = Y1, et.jsxs = G1;
}()), et;
}
process.env.NODE_ENV === "production" ? Ko.exports = er() : Ko.exports = tr();
var c = Ko.exports;
function S() {
return S = Object.assign ? Object.assign.bind() : function(s) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var o in t) ({}).hasOwnProperty.call(t, o) && (s[o] = t[o]);
}
return s;
}, S.apply(null, arguments);
}
function or(s, e) {
const t = /* @__PURE__ */ Se(e);
function o(n) {
const { children: f, ...l } = n, a = Hs(
() => l,
Object.values(l)
);
return /* @__PURE__ */ E(t.Provider, {
value: a
}, f);
}
function i(n) {
const f = Ze(t);
if (f) return f;
if (e !== void 0) return e;
throw new Error(`\`${n}\` must be used within \`${s}\``);
}
return o.displayName = s + "Provider", [
o,
i
];
}
function Bs(s, e = []) {
let t = [];
function o(n, f) {
const l = /* @__PURE__ */ Se(f), a = t.length;
t = [
...t,
f
];
function r(p) {
const { scope: _, children: u, ...x } = p, m = (_ == null ? void 0 : _[s][a]) || l, v = Hs(
() => x,
Object.values(x)
);
return /* @__PURE__ */ E(m.Provider, {
value: v
}, u);
}
function d(p, _) {
const u = (_ == null ? void 0 : _[s][a]) || l, x = Ze(u);
if (x) return x;
if (f !== void 0) return f;
throw new Error(`\`${p}\` must be used within \`${n}\``);
}
return r.displayName = n + "Provider", [
r,
d
];
}
const i = () => {
const n = t.map((f) => /* @__PURE__ */ Se(f));
return function(l) {
const a = (l == null ? void 0 : l[s]) || n;
return Hs(
() => ({
[`__scope${s}`]: {
...l,
[s]: a
}
}),
[
l,
a
]
);
};
};
return i.scopeName = s, [
o,
nr(i, ...e)
];
}
function nr(...s) {
const e = s[0];
if (s.length === 1) return e;
const t = () => {
const o = s.map(
(i) => ({
useScope: i(),
scopeName: i.scopeName
})
);
return function(n) {
const f = o.reduce((l, { useScope: a, scopeName: r }) => {
const p = a(n)[`__scope${r}`];
return {
...l,
...p
};
}, {});
return Hs(
() => ({
[`__scope${e.scopeName}`]: f
}),
[
f
]
);
};
};
return t.scopeName = e.scopeName, t;
}
function ir(s, e) {
typeof s == "function" ? s(e) : s != null && (s.current = e);
}
function hn(...s) {
return (e) => s.forEach(
(t) => ir(t, e)
);
}
function Ps(...s) {
return os(hn(...s), s);
}
const je = /* @__PURE__ */ K((s, e) => {
const { children: t, ...o } = s, i = ve.toArray(t), n = i.find(fr);
if (n) {
const f = n.props.children, l = i.map((a) => a === n ? ve.count(f) > 1 ? ve.only(null) : /* @__PURE__ */ ot(f) ? f.props.children : null : a);
return /* @__PURE__ */ E(Bo, S({}, o, {
ref: e
}), /* @__PURE__ */ ot(f) ? /* @__PURE__ */ Qt(f, void 0, l) : null);
}
return /* @__PURE__ */ E(Bo, S({}, o, {
ref: e
}), t);
});
je.displayName = "Slot";
const Bo = /* @__PURE__ */ K((s, e) => {
const { children: t, ...o } = s;
return /* @__PURE__ */ ot(t) ? /* @__PURE__ */ Qt(t, {
...lr(o, t.props),
ref: e ? hn(e, t.ref) : t.ref
}) : ve.count(t) > 1 ? ve.only(null) : null;
});
Bo.displayName = "SlotClone";
const Ji = ({ children: s }) => /* @__PURE__ */ E(_n, null, s);
function fr(s) {
return /* @__PURE__ */ ot(s) && s.type === Ji;
}
function lr(s, e) {
const t = {
...e
};
for (const o in e) {
const i = s[o], n = e[o];
/^on[A-Z]/.test(o) ? i && n ? t[o] = (...l) => {
n(...l), i(...l);
} : i && (t[o] = i) : o === "style" ? t[o] = {
...i,
...n
} : o === "className" && (t[o] = [
i,
n
].filter(Boolean).join(" "));
}
return {
...s,
...t
};
}
function bn(s) {
const e = s + "CollectionProvider", [t, o] = Bs(e), [i, n] = t(e, {
collectionRef: {
current: null
},
itemMap: /* @__PURE__ */ new Map()
}), f = (u) => {
const { scope: x, children: m } = u, v = ds.useRef(null), y = ds.useRef(/* @__PURE__ */ new Map()).current;
return /* @__PURE__ */ ds.createElement(i, {
scope: x,
itemMap: y,
collectionRef: v
}, m);
}, l = s + "CollectionSlot", a = /* @__PURE__ */ ds.forwardRef((u, x) => {
const { scope: m, children: v } = u, y = n(l, m), h = Ps(x, y.collectionRef);
return /* @__PURE__ */ ds.createElement(je, {
ref: h
}, v);
}), r = s + "CollectionItemSlot", d = "data-radix-collection-item", p = /* @__PURE__ */ ds.forwardRef((u, x) => {
const { scope: m, children: v, ...y } = u, h = ds.useRef(null), C = Ps(x, h), g = n(r, m);
return ds.useEffect(() => (g.itemMap.set(h, {
ref: h,
...y
}), () => void g.itemMap.delete(h))), /* @__PURE__ */ ds.createElement(je, {
[d]: "",
ref: C
}, v);
});
function _(u) {
const x = n(s + "CollectionConsumer", u);
return ds.useCallback(() => {
const v = x.collectionRef.current;
if (!v) return [];
const y = Array.from(v.querySelectorAll(`[${d}]`));
return Array.from(x.itemMap.values()).sort(
(g, b) => y.indexOf(g.ref.current) - y.indexOf(b.ref.current)
);
}, [
x.collectionRef,
x.itemMap
]);
}
return [
{
Provider: f,
Slot: a,
ItemSlot: p
},
_,
o
];
}
function rs(s, e, { checkForDefaultPrevented: t = !0 } = {}) {
return function(i) {
if (s == null || s(i), t === !1 || !i.defaultPrevented) return e == null ? void 0 : e(i);
};
}
function fe(s) {
const e = Y(s);
return fs(() => {
e.current = s;
}), Hs(
() => (...t) => {
var o;
return (o = e.current) === null || o === void 0 ? void 0 : o.call(e, ...t);
},
[]
);
}
function ee({ prop: s, defaultProp: e, onChange: t = () => {
} }) {
const [o, i] = ar({
defaultProp: e,
onChange: t
}), n = s !== void 0, f = n ? s : o, l = fe(t), a = os((r) => {
if (n) {
const p = typeof r == "function" ? r(s) : r;
p !== s && l(p);
} else i(r);
}, [
n,
s,
i,
l
]);
return [
f,
a
];
}
function ar({ defaultProp: s, onChange: e }) {
const t = hs(s), [o] = t, i = Y(o), n = fe(e);
return fs(() => {
i.current !== o && (n(o), i.current = o);
}, [
o,
i,
n
]), t;
}
const rr = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"span",
"svg",
"ul"
], $s = rr.reduce((s, e) => {
const t = /* @__PURE__ */ K((o, i) => {
const { asChild: n, ...f } = o, l = n ? je : e;
return fs(() => {
window[Symbol.for("radix-ui")] = !0;
}, []), /* @__PURE__ */ E(l, S({}, f, {
ref: i
}));
});
return t.displayName = `Primitive.${e}`, {
...s,
[e]: t
};
}, {});
function Qi(s, e) {
s && Xi(
() => s.dispatchEvent(e)
);
}
const Oe = globalThis != null && globalThis.document ? Ue : () => {
};
function pr(s, e) {
return Yi((t, o) => {
const i = e[t][o];
return i ?? t;
}, s);
}
const Zs = (s) => {
const { present: e, children: t } = s, o = dr(e), i = typeof t == "function" ? t({
present: o.isPresent
}) : ve.only(t), n = Ps(o.ref, i.ref);
return typeof t == "function" || o.isPresent ? /* @__PURE__ */ Qt(i, {
ref: n
}) : null;
};
Zs.displayName = "Presence";
function dr(s) {
const [e, t] = hs(), o = Y({}), i = Y(s), n = Y("none"), f = s ? "mounted" : "unmounted", [l, a] = pr(f, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
return fs(() => {
const r = wt(o.current);
n.current = l === "mounted" ? r : "none";
}, [
l
]), Oe(() => {
const r = o.current, d = i.current;
if (d !== s) {
const _ = n.current, u = wt(r);
s ? a("MOUNT") : u === "none" || (r == null ? void 0 : r.display) === "none" ? a("UNMOUNT") : a(d && _ !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = s;
}
}, [
s,
a
]), Oe(() => {
if (e) {
const r = (p) => {
const u = wt(o.current).includes(p.animationName);
p.target === e && u && Xi(
() => a("ANIMATION_END")
);
}, d = (p) => {
p.target === e && (n.current = wt(o.current));
};
return e.addEventListener("animationstart", d), e.addEventListener("animationcancel", r), e.addEventListener("animationend", r), () => {
e.removeEventListener("animationstart", d), e.removeEventListener("animationcancel", r), e.removeEventListener("animationend", r);
};
} else
a("ANIMATION_END");
}, [
e,
a
]), {
isPresent: [
"mounted",
"unmountSuspended"
].includes(l),
ref: os((r) => {
r && (o.current = getComputedStyle(r)), t(r);
}, [])
};
}
function wt(s) {
return (s == null ? void 0 : s.animationName) || "none";
}
const cr = ls.useId || (() => {
});
let ur = 0;
function ne(s) {
const [e, t] = ls.useState(cr());
return Oe(() => {
t(
(o) => o ?? String(ur++)
);
}, [
s
]), e ? `radix-${e}` : "";
}
const sf = "Collapsible", [_r, ef] = Bs(sf), [hr, vn] = _r(sf), br = /* @__PURE__ */ K((s, e) => {
const { __scopeCollapsible: t, open: o, defaultOpen: i, disabled: n, onOpenChange: f, ...l } = s, [a = !1, r] = ee({
prop: o,
defaultProp: i,
onChange: f
});
return /* @__PURE__ */ E(hr, {
scope: t,
disabled: n,
contentId: ne(),
open: a,
onOpenToggle: os(
() => r(
(d) => !d
),
[
r
]
)
}, /* @__PURE__ */ E($s.div, S({
"data-state": mn(a),
"data-disabled": n ? "" : void 0
}, l, {
ref: e
})));
}), vr = "CollapsibleTrigger", mr = /* @__PURE__ */ K((s, e) => {
const { __scopeCollapsible: t, ...o } = s, i = vn(vr, t);
return /* @__PURE__ */ E($s.button, S({
type: "button",
"aria-controls": i.contentId,
"aria-expanded": i.open || !1,
"data-state": mn(i.open),
"data-disabled": i.disabled ? "" : void 0,
disabled: i.disabled
}, o, {
ref: e,
onClick: rs(s.onClick, i.onOpenToggle)
}));
}), tf = "CollapsibleContent", Cr = /* @__PURE__ */ K((s, e) => {
const { forceMount: t, ...o } = s, i = vn(tf, s.__scopeCollapsible);
return /* @__PURE__ */ E(
Zs,
{
present: t || i.open
},
({ present: n }) => /* @__PURE__ */ E(gr, S({}, o, {
ref: e,
present: n
}))
);
}), gr = /* @__PURE__ */ K((s, e) => {
const { __scopeCollapsible: t, present: o, children: i, ...n } = s, f = vn(tf, t), [l, a] = hs(o), r = Y(null), d = Ps(e, r), p = Y(0), _ = p.current, u = Y(0), x = u.current, m = f.open || l, v = Y(m), y = Y();
return fs(() => {
const h = requestAnimationFrame(
() => v.current = !1
);
return () => cancelAnimationFrame(h);
}, []), Oe(() => {
const h = r.current;
if (h) {
y.current = y.current || {
transitionDuration: h.style.transitionDuration,
animationName: h.style.animationName
}, h.style.transitionDuration = "0s", h.style.animationName = "none";
const C = h.getBoundingClientRect();
p.current = C.height, u.current = C.width, v.current || (h.style.transitionDuration = y.current.transitionDuration, h.style.animationName = y.current.animationName), a(o);
}
}, [
f.open,
o
]), /* @__PURE__ */ E($s.div, S({
"data-state": mn(f.open),
"data-disabled": f.disabled ? "" : void 0,
id: f.contentId,
hidden: !m
}, n, {
ref: d,
style: {
"--radix-collapsible-content-height": _ ? `${_}px` : void 0,
"--radix-collapsible-content-width": x ? `${x}px` : void 0,
...s.style
}
}), m && i);
});
function mn(s) {
return s ? "open" : "closed";
}
const xr = br, yr = mr, kr = Cr, wr = /* @__PURE__ */ Se(void 0);
function so(s) {
const e = Ze(wr);
return s || e || "ltr";
}
const ke = "Accordion", $r = [
"Home",
"End",
"ArrowDown",
"ArrowUp",
"ArrowLeft",
"ArrowRight"
], [Cn, Ir, Er] = bn(ke), [eo] = Bs(ke, [
Er,
ef
]), gn = ef(), of = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { type: t, ...o } = s, i = o, n = o;
return /* @__PURE__ */ ds.createElement(Cn.Provider, {
scope: s.__scopeAccordion
}, t === "multiple" ? /* @__PURE__ */ ds.createElement(jr, S({}, n, {
ref: e
})) : /* @__PURE__ */ ds.createElement(Sr, S({}, i, {
ref: e
})));
});
of.propTypes = {
type(s) {
const e = s.value || s.defaultValue;
return s.type && ![
"single",
"multiple"
].includes(s.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : s.type === "multiple" && typeof e == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : s.type === "single" && Array.isArray(e) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
}
};
const [nf, Pr] = eo(ke), [ff, Dr] = eo(ke, {
collapsible: !1
}), Sr = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { value: t, defaultValue: o, onValueChange: i = () => {
}, collapsible: n = !1, ...f } = s, [l, a] = ee({
prop: t,
defaultProp: o,
onChange: i
});
return /* @__PURE__ */ ds.createElement(nf, {
scope: s.__scopeAccordion,
value: l ? [
l
] : [],
onItemOpen: a,
onItemClose: ds.useCallback(
() => n && a(""),
[
n,
a
]
)
}, /* @__PURE__ */ ds.createElement(ff, {
scope: s.__scopeAccordion,
collapsible: n
}, /* @__PURE__ */ ds.createElement(lf, S({}, f, {
ref: e
}))));
}), jr = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { value: t, defaultValue: o, onValueChange: i = () => {
}, ...n } = s, [f = [], l] = ee({
prop: t,
defaultProp: o,
onChange: i
}), a = ds.useCallback(
(d) => l(
(p = []) => [
...p,
d
]
),
[
l
]
), r = ds.useCallback(
(d) => l(
(p = []) => p.filter(
(_) => _ !== d
)
),
[
l
]
);
return /* @__PURE__ */ ds.createElement(nf, {
scope: s.__scopeAccordion,
value: f,
onItemOpen: a,
onItemClose: r
}, /* @__PURE__ */ ds.createElement(ff, {
scope: s.__scopeAccordion,
collapsible: !0
}, /* @__PURE__ */ ds.createElement(lf, S({}, n, {
ref: e
}))));
}), [Or, to] = eo(ke), lf = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { __scopeAccordion: t, disabled: o, dir: i, orientation: n = "vertical", ...f } = s, l = ds.useRef(null), a = Ps(l, e), r = Ir(t), p = so(i) === "ltr", _ = rs(s.onKeyDown, (u) => {
var x;
if (!$r.includes(u.key)) return;
const m = u.target, v = r().filter((I) => {
var O;
return !((O = I.ref.current) !== null && O !== void 0 && O.disabled);
}), y = v.findIndex(
(I) => I.ref.current === m
), h = v.length;
if (y === -1) return;
u.preventDefault();
let C = y;
const g = 0, b = h - 1, $ = () => {
C = y + 1, C > b && (C = g);
}, D = () => {
C = y - 1, C < g && (C = b);
};
switch (u.key) {
case "Home":
C = g;
break;
case "End":
C = b;
break;
case "ArrowRight":
n === "horizontal" && (p ? $() : D());
break;
case "ArrowDown":
n === "vertical" && $();
break;
case "ArrowLeft":
n === "horizontal" && (p ? D() : $());
break;
case "ArrowUp":
n === "vertical" && D();
break;
}
const P = C % h;
(x = v[P].ref.current) === null || x === void 0 || x.focus();
});
return /* @__PURE__ */ ds.createElement(Or, {
scope: t,
disabled: o,
direction: i,
orientation: n
}, /* @__PURE__ */ ds.createElement(Cn.Slot, {
scope: t
}, /* @__PURE__ */ ds.createElement($s.div, S({}, f, {
"data-orientation": n,
ref: a,
onKeyDown: o ? void 0 : _
}))));
}), Zo = "AccordionItem", [Rr, xn] = eo(Zo), Tr = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { __scopeAccordion: t, value: o, ...i } = s, n = to(Zo, t), f = Pr(Zo, t), l = gn(t), a = ne(), r = o && f.value.includes(o) || !1, d = n.disabled || s.disabled;
return /* @__PURE__ */ ds.createElement(Rr, {
scope: t,
open: r,
disabled: d,
triggerId: a
}, /* @__PURE__ */ ds.createElement(xr, S({
"data-orientation": n.orientation,
"data-state": pf(r)
}, l, i, {
ref: e,
disabled: d,
open: r,
onOpenChange: (p) => {
p ? f.onItemOpen(o) : f.onItemClose(o);
}
})));
}), Mr = "AccordionHeader", Vr = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { __scopeAccordion: t, ...o } = s, i = to(ke, t), n = xn(Mr, t);
return /* @__PURE__ */ ds.createElement($s.h3, S({
"data-orientation": i.orientation,
"data-state": pf(n.open),
"data-disabled": n.disabled ? "" : void 0
}, o, {
ref: e
}));
}), Z8 = "AccordionTrigger", af = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { __scopeAccordion: t, ...o } = s, i = to(ke, t), n = xn(Z8, t), f = Dr(Z8, t), l = gn(t);
return /* @__PURE__ */ ds.createElement(Cn.ItemSlot, {
scope: t
}, /* @__PURE__ */ ds.createElement(yr, S({
"aria-disabled": n.open && !f.collapsible || void 0,
"data-orientation": i.orientation,
id: n.triggerId
}, l, o, {
ref: e
})));
}), Ar = "AccordionContent", rf = /* @__PURE__ */ ds.forwardRef((s, e) => {
const { __scopeAccordion: t, ...o } = s, i = to(ke, t), n = xn(Ar, t), f = gn(t);
return /* @__PURE__ */ ds.createElement(kr, S({
role: "region",
"aria-labelledby": n.triggerId,
"data-orientation": i.orientation
}, f, o, {
ref: e,
style: {
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
...s.style
}
}));
});
function pf(s) {
return s ? "open" : "closed";
}
const Uo = of, df = Tr, Nr = Vr, Wr = af, Lr = rf;
function zr(...s) {
const e = s.filter((t) => !!t && t !== " ").map((t) => t == null ? void 0 : t.toString().trim());
return e.length === 0 ? void 0 : e.join(" ");
}
function Hr(s, e) {
let t = !1, o = {}, i = {}, n = {};
for (const f in s)
if (f[0] === "_" && f[1] === "_") {
const l = f.substring(2);
n[l] = s[f];
} else e.properties.has(f) ? (t = !0, o[f] = s[f]) : i[f] = s[f];
return {
hasAtomProps: t,
atomProps: o,
otherProps: i,
customProps: n
};
}
function qr({
atoms: s,
defaultClassName: e
}) {
const t = /* @__PURE__ */ K(({
as: o = "div",
className: i,
style: n,
...f
}, l) => {
const {
atomProps: a,
customProps: r,
otherProps: d
} = Hr(f, s);
return /* @__PURE__ */ E(o, {
ref: l,
style: {
...n,
...r
},
...d,
className: zr(i, s(a), e)
});
});
return t.displayName = "DessertBox", t;
}
var Lt = { spacing: { 0: "var(--mu-spacing-0)", 1: "var(--mu-spacing-1)", 2: "var(--mu-spacing-2)", 3: "var(--mu-spacing-3)", 4: "var(--mu-spacing-4)", 5: "var(--mu-spacing-5)", 6: "var(--mu-spacing-6)", 7: "var(--mu-spacing-7)", 8: "var(--mu-spacing-8)", 9: "var(--mu-spacing-9)", 10: "var(--mu-spacing-10)", 11: "var(--mu-spacing-11)", 12: "var(--mu-spacing-12)", 14: "var(--mu-spacing-14)", 16: "var(--mu-spacing-16)", 20: "var(--mu-spacing-20)", 24: "var(--mu-spacing-24)", 28: "var(--mu-spacing-28)", 32: "var(--mu-spacing-32)", 36: "var(--mu-spacing-36)", 40: "var(--mu-spacing-40)", 44: "var(--mu-spacing-44)", 48: "var(--mu-spacing-48)", 52: "var(--mu-spacing-52)", px: "var(--mu-spacing-px)", "0.5": "var(--mu-spacing-0-5)", "1.5": "var(--mu-spacing-1-5)", "2.5": "var(--mu-spacing-2-5)", "3.5": "var(--mu-spacing-3-5)" }, colors: { background: { accent1: "var(--mu-colors-background-accent1)", accent1Hovered: "var(--mu-colors-background-accent1-hovered)", accent1Focused: "var(--mu-colors-background-accent1-focused)", accent1Pressed: "var(--mu-colors-background-accent1-pressed)", buttonCriticalDisabled: "var(--mu-colors-background-button-critical-disabled)", buttonCriticalPrimary: "var(--mu-colors-background-button-critical-primary)", buttonCriticalPrimaryFocused: "var(--mu-colors-background-button-critical-primary-focused)", buttonCriticalPrimaryHovered: "var(--mu-colors-background-button-critical-primary-hovered)", buttonCriticalPrimaryPressed: "var(--mu-colors-background-button-critical-primary-pressed)", buttonDefaultDisabled: "var(--mu-colors-background-button-default-disabled)", buttonDefaultPrimary: "var(--mu-colors-background-button-default-primary)", buttonDefaultPrimaryFocused: "var(--mu-colors-background-button-default-primary-focused)", buttonDefaultPrimaryHovered: "var(--mu-colors-background-button-default-primary-hovered)", buttonDefaultPrimaryPressed: "var(--mu-colors-background-button-default-primary-pressed)", buttonDefaultSecondary: "var(--mu-colors-background-button-default-secondary)", buttonDefaultSecondaryFocused: "var(--mu-colors-background-button-default-secondary-focused)", buttonDefaultSecondaryHovered: "var(--mu-colors-background-button-default-secondary-hovered)", buttonDefaultSecondaryPressed: "var(--mu-colors-background-button-default-secondary-pressed)", buttonDefaultTertiary: "var(--mu-colors-background-button-default-tertiary)", buttonDefaultTertiaryFocused: "var(--mu-colors-background-button-default-tertiary-focused)", buttonDefaultTertiaryHovered: "var(--mu-colors-background-button-default-tertiary-hovered)", buttonDefaultTertiaryPressed: "var(--mu-colors-background-button-default-tertiary-pressed)", critical1: "var(--mu-colors-background-critical1)", critical1Focused: "var(--mu-colors-background-critical1-focused)", critical1Hovered: "var(--mu-colors-background-critical1-hovered)", critical1Pressed: "var(--mu-colors-background-critical1-pressed)", critical2: "var(--mu-colors-background-critical2)", default1: "var(--mu-colors-background-default1)", default1Focused: "var(--mu-colors-background-default1-focused)", default1Hovered: "var(--mu-colors-background-default1-hovered)", default1Pressed: "var(--mu-colors-background-default1-pressed)", default2: "var(--mu-colors-background-default2)", default3: "var(--mu-colors-background-default3)", defaultDisabled: "var(--mu-colors-background-default-disabled)", info1: "var(--mu-colors-background-info1)", success1: "var(--mu-colors-background-success1)", warning1: "var(--mu-colors-background-warning1)" }, text: { accent1: "var(--mu-colors-text-accent1)", buttonCriticalDisabled: "var(--mu-colors-text-button-critical-disabled)", buttonCriticalPrimary: "var(--mu-colors-text-button-critical-primary)", buttonDefaultPrimary: "var(--mu-colors-text-button-default-primary)", buttonDefaultSecondary: "var(--mu-colors-text-button-default-secondary)", buttonDefaultTertiary: "var(--mu-colors-text-button-default-tertiary)", critical1: "var(--mu-colors-text-critical1)", critical2: "var(--mu-colors-text-critical2)", default1: "var(--mu-colors-text-default1)", default2: "var(--mu-colors-text-default2)", defaultDisabled: "var(--mu-colors-text-default-disabled)", info1: "var(--mu-colors-text-info1)", success1: "var(--mu-colors-text-success1)", warning1: "var(--mu-colors-text-warning1)" }, border: { accent1: "var(--mu-colors-border-accent1)", critical1: "var(--mu-colors-border-critical1)", default1: "var(--mu-colors-border-default1)", default1Focused: "var(--mu-colors-border-default1-focused)", default1Hovered: "var(--mu-colors-border-default1-hovered)", default2: "var(--mu-colors-border-default2)", defaultDisabled: "var(--mu-colors-border-default-disabled)", info1: "var(--mu-colors-border-info1)", success1: "var(--mu-colors-border-success1)", warning1: "var(--mu-colors-border-warning1)" } }, fontSize: { 1: "var(--mu-font-size-1)", 2: "var(--mu-font-size-2)", 3: "var(--mu-font-size-3)", 4: "var(--mu-font-size-4)", 5: "var(--mu-font-size-5)", 6: "var(--mu-font-size-6)", 7: "var(--mu-font-size-7)", 8: "var(--mu-font-size-8)", 9: "var(--mu-font-size-9)", 10: "var(--mu-font-size-10)", 11: "var(--mu-font-size-11)" }, borderRadius: { 1: "var(--mu-border-radius-1)", 2: "var(--mu-border-radius-2)", 3: "var(--mu-border-radius-3)", 4: "var(--mu-border-radius-4)", 5: "var(--mu-border-radius-5)", 6: "var(--mu-border-radius-6)", 7: "var(--mu-border-radius-7)", 8: "var(--mu-border-radius-8)", 9: "var(--mu-border-radius-9)" }, lineHeight: { 1: "var(--mu-line-height-1)", 2: "var(--mu-line-height-2)", 3: "var(--mu-line-height-3)", 4: "var(--mu-line-height-4)", 5: "var(--mu-line-height-5)", 6: "var(--mu-line-height-6)", 7: "var(--mu-line-height-7)", 8: "var(--mu-line-height-8)", 9: "var(--mu-line-height-9)", 10: "var(--mu-line-height-10)", 11: "var(--mu-line-height-11)" }, fontWeight: { light: "var(--mu-font-weight-light)", regular: "var(--mu-font-weight-regular)", medium: "var(--mu-font-weight-medium)", bold: "var(--mu-font-weight-bold)" }, letterSpacing: { 1: "var(--mu-letter-spacing-1)", 2: "var(--mu-letter-spacing-2)", 3: "var(--mu-letter-spacing-3)", 4: "var(--mu-letter-spacing-4)", 5: "var(--mu-letter-spacing-5)", 6: "var(--mu-letter-spacing-6)", 7: "var(--mu-letter-spacing-7)", 8: "var(--mu-letter-spacing-8)", 9: "var(--mu-letter-spacing-9)", 10: "var(--mu-letter-spacing-10)", 11: "var(--mu-letter-spacing-11)" }, boxShadow: { defaultFocused: "var(--mu-box-shadow-default-focused)", defaultHovered: "var(--mu-box-shadow-default-hovered)", defaultOverlay: "var(--mu-box-shadow-default-overlay)", defaultModal: "var(--mu-box-shadow-default-modal)" }, borderWidth: { 0: "var(--mu-border-width-0)", 1: "var(--mu-border-width-1)" } };
function Yo(s) {
var e = s.match(/^var\((.*)\)$/);
return e ? e[1] : s;
}
function cf(s, e) {
var t = s;
for (var o of e) {
if (!(o in t))
throw new Error("Path ".concat(e.join(" -> "), " does not exist in object"));
t = t[o];
}
return t;
}
function yn(s, e) {
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], o = {};
for (var i in s) {
var n = s[i], f = [...t, i];
typeof n == "string" || typeof n == "number" || n == null ? o[i] = e(n, f) : typeof n == "object" && !Array.isArray(n) ? o[i] = yn(n, e, f) : console.warn('Skipping invalid key "'.concat(f.join("."), '". Should be a string, number, null or object. Received: "').concat(Array.isArray(n) ? "Array" : typeof n, '"'));
}
return o;
}
function Fr(s, e) {
var t = {};
if (typeof e == "object") {
var o = s;
yn(e, (l, a) => {
if (l != null) {
var r = cf(o, a);
t[Yo(r)] = String(l);
}
});
} else {
var i = s;
for (var n in i) {
var f = i[n];
f != null && (t[Yo(n)] = f);
}
}
return Object.defineProperty(t, "toString", {
value: function() {
return Object.keys(this).map((a) => "".concat(a, ":").concat(this[a])).join(";");
},
writable: !1
}), t;
}
function U8(s, e, t) {
s.style.setProperty(Yo(e), t);
}
function Kr(s, e, t) {
if (typeof t == "object") {
var o = e;
yn(t, (l, a) => {
l != null && U8(s, cf(o, a), String(l));
});
} else {
var i = e;
for (var n in i) {
var f = i[n];
f != null && U8(s, n, i[n]);
}
}
}
const uf = {
0: "0px",
px: "1px",
0.5: "2px",
1: "4px",
1.5: "6px",
2: "8px",
2.5: "10px",
3: "12px",
3.5: "14px",
4: "16px",
5: "20px",
6: "24px",
7: "28px",
8: "32px",
9: "36px",
10: "40px",
11: "44px",
12: "48px",
14: "56px",
16: "64px",
20: "80px",
24: "96px",
28: "112px",
32: "128px",
36: "144px",
40: "160px",
44: "176px",
48: "192px",
52: "208px"
}, _f = {
1: "11px",
2: "12px",
3: "13px",
4: "14px",
5: "16px",
6: "18px",
7: "20px",
8: "22px",
9: "24px",
10: "28px",
11: "34px"
}, hf = {
1: "2px",
2: "4px",
3: "6px",
4: "8px",
5: "12px",
6: "14px",
7: "16px",
8: "18px",
9: "20px"
}, bf = {
1: "16px",
2: "18px",
3: "20px",
4: "20px",
5: "22px",
6: "24px",
7: "26px",
8: "28px",
9: "30px",
10: "36px",
11: "40px"
}, vf = {
light: "300",
regular: "400",
medium: "500",
bold: "600"
}, mf = {
1: "0.025em",
2: "0.015em",
3: "0.015em",
4: "0.01em",
5: "0em",
6: "0em",
7: "0em",
8: "0em",
9: "-0.01em",
10: "-0.01em",
11: "-0.01em"
}, Cf = {
0: "0px",
1: "1px"
}, Br = {
spacing: uf,
colors: {
background: {
accent1: "hsla(215, 100%, 62%, 1)",
accent1Hovered: "hsla(215, 100%, 51%,