UNPKG

entropretty-editor

Version:
4,290 lines 122 kB
import * as F from "react";
import ne, { useCallback as Wr, useEffect as nr, useState as Mt, useRef as Dt, useMemo as Vr } from "react";
function zt(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var Ce = { exports: {} }, be = {};
/**
 * @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 Er;
function Lt() {
  if (Er) return be;
  Er = 1;
  var e = ne, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
  function l(i, u, c) {
    var f, h = {}, g = null, v = null;
    c !== void 0 && (g = "" + c), u.key !== void 0 && (g = "" + u.key), u.ref !== void 0 && (v = u.ref);
    for (f in u) o.call(u, f) && !a.hasOwnProperty(f) && (h[f] = u[f]);
    if (i && i.defaultProps) for (f in u = i.defaultProps, u) h[f] === void 0 && (h[f] = u[f]);
    return { $$typeof: t, type: i, key: g, ref: v, props: h, _owner: s.current };
  }
  return be.Fragment = r, be.jsx = l, be.jsxs = l, be;
}
var ve = {};
/**
 * @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 Sr;
function Nt() {
  return Sr || (Sr = 1, process.env.NODE_ENV !== "production" && function() {
    var e = ne, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), i = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), w = Symbol.iterator, p = "@@iterator";
    function m(n) {
      if (n === null || typeof n != "object")
        return null;
      var d = w && n[w] || n[p];
      return typeof d == "function" ? d : null;
    }
    var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    function b(n) {
      {
        for (var d = arguments.length, y = new Array(d > 1 ? d - 1 : 0), S = 1; S < d; S++)
          y[S - 1] = arguments[S];
        O("error", n, y);
      }
    }
    function O(n, d, y) {
      {
        var S = x.ReactDebugCurrentFrame, k = S.getStackAddendum();
        k !== "" && (d += "%s", y = y.concat([k]));
        var P = y.map(function(C) {
          return String(C);
        });
        P.unshift("Warning: " + d), Function.prototype.apply.call(console[n], console, P);
      }
    }
    var M = !1, W = !1, I = !1, L = !1, H = !1, oe;
    oe = Symbol.for("react.module.reference");
    function fe(n) {
      return !!(typeof n == "string" || typeof n == "function" || n === o || n === a || H || n === s || n === c || n === f || L || n === v || M || W || I || typeof n == "object" && n !== null && (n.$$typeof === g || n.$$typeof === h || n.$$typeof === l || n.$$typeof === i || n.$$typeof === u || // 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.
      n.$$typeof === oe || n.getModuleId !== void 0));
    }
    function pe(n, d, y) {
      var S = n.displayName;
      if (S)
        return S;
      var k = d.displayName || d.name || "";
      return k !== "" ? y + "(" + k + ")" : y;
    }
    function j(n) {
      return n.displayName || "Context";
    }
    function $(n) {
      if (n == null)
        return null;
      if (typeof n.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
        return n.displayName || n.name || null;
      if (typeof n == "string")
        return n;
      switch (n) {
        case o:
          return "Fragment";
        case r:
          return "Portal";
        case a:
          return "Profiler";
        case s:
          return "StrictMode";
        case c:
          return "Suspense";
        case f:
          return "SuspenseList";
      }
      if (typeof n == "object")
        switch (n.$$typeof) {
          case i:
            var d = n;
            return j(d) + ".Consumer";
          case l:
            var y = n;
            return j(y._context) + ".Provider";
          case u:
            return pe(n, n.render, "ForwardRef");
          case h:
            var S = n.displayName || null;
            return S !== null ? S : $(n.type) || "Memo";
          case g: {
            var k = n, P = k._payload, C = k._init;
            try {
              return $(C(P));
            } catch {
              return null;
            }
          }
        }
      return null;
    }
    var G = Object.assign, J = 0, ee, me, se, X, ge, B, sr;
    function ar() {
    }
    ar.__reactDisabledLog = !0;
    function it() {
      {
        if (J === 0) {
          ee = console.log, me = console.info, se = console.warn, X = console.error, ge = console.group, B = console.groupCollapsed, sr = console.groupEnd;
          var n = {
            configurable: !0,
            enumerable: !0,
            value: ar,
            writable: !0
          };
          Object.defineProperties(console, {
            info: n,
            log: n,
            warn: n,
            error: n,
            group: n,
            groupCollapsed: n,
            groupEnd: n
          });
        }
        J++;
      }
    }
    function lt() {
      {
        if (J--, J === 0) {
          var n = {
            configurable: !0,
            enumerable: !0,
            writable: !0
          };
          Object.defineProperties(console, {
            log: G({}, n, {
              value: ee
            }),
            info: G({}, n, {
              value: me
            }),
            warn: G({}, n, {
              value: se
            }),
            error: G({}, n, {
              value: X
            }),
            group: G({}, n, {
              value: ge
            }),
            groupCollapsed: G({}, n, {
              value: B
            }),
            groupEnd: G({}, n, {
              value: sr
            })
          });
        }
        J < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
      }
    }
    var De = x.ReactCurrentDispatcher, ze;
    function Ee(n, d, y) {
      {
        if (ze === void 0)
          try {
            throw Error();
          } catch (k) {
            var S = k.stack.trim().match(/\n( *(at )?)/);
            ze = S && S[1] || "";
          }
        return `
` + ze + n;
      }
    }
    var Le = !1, Se;
    {
      var ct = typeof WeakMap == "function" ? WeakMap : Map;
      Se = new ct();
    }
    function ir(n, d) {
      if (!n || Le)
        return "";
      {
        var y = Se.get(n);
        if (y !== void 0)
          return y;
      }
      var S;
      Le = !0;
      var k = Error.prepareStackTrace;
      Error.prepareStackTrace = void 0;
      var P;
      P = De.current, De.current = null, it();
      try {
        if (d) {
          var C = function() {
            throw Error();
          };
          if (Object.defineProperty(C.prototype, "props", {
            set: function() {
              throw Error();
            }
          }), typeof Reflect == "object" && Reflect.construct) {
            try {
              Reflect.construct(C, []);
            } catch (V) {
              S = V;
            }
            Reflect.construct(n, [], C);
          } else {
            try {
              C.call();
            } catch (V) {
              S = V;
            }
            n.call(C.prototype);
          }
        } else {
          try {
            throw Error();
          } catch (V) {
            S = V;
          }
          n();
        }
      } catch (V) {
        if (V && S && typeof V.stack == "string") {
          for (var R = V.stack.split(`
`), N = S.stack.split(`
`), D = R.length - 1, z = N.length - 1; D >= 1 && z >= 0 && R[D] !== N[z]; )
            z--;
          for (; D >= 1 && z >= 0; D--, z--)
            if (R[D] !== N[z]) {
              if (D !== 1 || z !== 1)
                do
                  if (D--, z--, z < 0 || R[D] !== N[z]) {
                    var U = `
` + R[D].replace(" at new ", " at ");
                    return n.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", n.displayName)), typeof n == "function" && Se.set(n, U), U;
                  }
                while (D >= 1 && z >= 0);
              break;
            }
        }
      } finally {
        Le = !1, De.current = P, lt(), Error.prepareStackTrace = k;
      }
      var ie = n ? n.displayName || n.name : "", re = ie ? Ee(ie) : "";
      return typeof n == "function" && Se.set(n, re), re;
    }
    function ut(n, d, y) {
      return ir(n, !1);
    }
    function dt(n) {
      var d = n.prototype;
      return !!(d && d.isReactComponent);
    }
    function _e(n, d, y) {
      if (n == null)
        return "";
      if (typeof n == "function")
        return ir(n, dt(n));
      if (typeof n == "string")
        return Ee(n);
      switch (n) {
        case c:
          return Ee("Suspense");
        case f:
          return Ee("SuspenseList");
      }
      if (typeof n == "object")
        switch (n.$$typeof) {
          case u:
            return ut(n.render);
          case h:
            return _e(n.type, d, y);
          case g: {
            var S = n, k = S._payload, P = S._init;
            try {
              return _e(P(k), d, y);
            } catch {
            }
          }
        }
      return "";
    }
    var he = Object.prototype.hasOwnProperty, lr = {}, cr = x.ReactDebugCurrentFrame;
    function Re(n) {
      if (n) {
        var d = n._owner, y = _e(n.type, n._source, d ? d.type : null);
        cr.setExtraStackFrame(y);
      } else
        cr.setExtraStackFrame(null);
    }
    function ft(n, d, y, S, k) {
      {
        var P = Function.call.bind(he);
        for (var C in n)
          if (P(n, C)) {
            var R = void 0;
            try {
              if (typeof n[C] != "function") {
                var N = Error((S || "React class") + ": " + y + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                throw N.name = "Invariant Violation", N;
              }
              R = n[C](d, C, S, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
            } catch (D) {
              R = D;
            }
            R && !(R instanceof Error) && (Re(k), b("%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).", S || "React class", y, C, typeof R), Re(null)), R instanceof Error && !(R.message in lr) && (lr[R.message] = !0, Re(k), b("Failed %s type: %s", y, R.message), Re(null));
          }
      }
    }
    var pt = Array.isArray;
    function Ne(n) {
      return pt(n);
    }
    function mt(n) {
      {
        var d = typeof Symbol == "function" && Symbol.toStringTag, y = d && n[Symbol.toStringTag] || n.constructor.name || "Object";
        return y;
      }
    }
    function gt(n) {
      try {
        return ur(n), !1;
      } catch {
        return !0;
      }
    }
    function ur(n) {
      return "" + n;
    }
    function dr(n) {
      if (gt(n))
        return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", mt(n)), ur(n);
    }
    var fr = x.ReactCurrentOwner, ht = {
      key: !0,
      ref: !0,
      __self: !0,
      __source: !0
    }, pr, mr;
    function bt(n) {
      if (he.call(n, "ref")) {
        var d = Object.getOwnPropertyDescriptor(n, "ref").get;
        if (d && d.isReactWarning)
          return !1;
      }
      return n.ref !== void 0;
    }
    function vt(n) {
      if (he.call(n, "key")) {
        var d = Object.getOwnPropertyDescriptor(n, "key").get;
        if (d && d.isReactWarning)
          return !1;
      }
      return n.key !== void 0;
    }
    function yt(n, d) {
      typeof n.ref == "string" && fr.current;
    }
    function wt(n, d) {
      {
        var y = function() {
          pr || (pr = !0, b("%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)", d));
        };
        y.isReactWarning = !0, Object.defineProperty(n, "key", {
          get: y,
          configurable: !0
        });
      }
    }
    function xt(n, d) {
      {
        var y = function() {
          mr || (mr = !0, b("%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)", d));
        };
        y.isReactWarning = !0, Object.defineProperty(n, "ref", {
          get: y,
          configurable: !0
        });
      }
    }
    var Et = function(n, d, y, S, k, P, C) {
      var R = {
        // This tag allows us to uniquely identify this as a React Element
        $$typeof: t,
        // Built-in properties that belong on the element
        type: n,
        key: d,
        ref: y,
        props: C,
        // Record the component responsible for creating this element.
        _owner: P
      };
      return R._store = {}, Object.defineProperty(R._store, "validated", {
        configurable: !1,
        enumerable: !1,
        writable: !0,
        value: !1
      }), Object.defineProperty(R, "_self", {
        configurable: !1,
        enumerable: !1,
        writable: !1,
        value: S
      }), Object.defineProperty(R, "_source", {
        configurable: !1,
        enumerable: !1,
        writable: !1,
        value: k
      }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
    };
    function St(n, d, y, S, k) {
      {
        var P, C = {}, R = null, N = null;
        y !== void 0 && (dr(y), R = "" + y), vt(d) && (dr(d.key), R = "" + d.key), bt(d) && (N = d.ref, yt(d, k));
        for (P in d)
          he.call(d, P) && !ht.hasOwnProperty(P) && (C[P] = d[P]);
        if (n && n.defaultProps) {
          var D = n.defaultProps;
          for (P in D)
            C[P] === void 0 && (C[P] = D[P]);
        }
        if (R || N) {
          var z = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
          R && wt(C, z), N && xt(C, z);
        }
        return Et(n, R, N, k, S, fr.current, C);
      }
    }
    var Fe = x.ReactCurrentOwner, gr = x.ReactDebugCurrentFrame;
    function ae(n) {
      if (n) {
        var d = n._owner, y = _e(n.type, n._source, d ? d.type : null);
        gr.setExtraStackFrame(y);
      } else
        gr.setExtraStackFrame(null);
    }
    var We;
    We = !1;
    function Ve(n) {
      return typeof n == "object" && n !== null && n.$$typeof === t;
    }
    function hr() {
      {
        if (Fe.current) {
          var n = $(Fe.current.type);
          if (n)
            return `

Check the render method of \`` + n + "`.";
        }
        return "";
      }
    }
    function _t(n) {
      return "";
    }
    var br = {};
    function Rt(n) {
      {
        var d = hr();
        if (!d) {
          var y = typeof n == "string" ? n : n.displayName || n.name;
          y && (d = `

Check the top-level render call using <` + y + ">.");
        }
        return d;
      }
    }
    function vr(n, d) {
      {
        if (!n._store || n._store.validated || n.key != null)
          return;
        n._store.validated = !0;
        var y = Rt(d);
        if (br[y])
          return;
        br[y] = !0;
        var S = "";
        n && n._owner && n._owner !== Fe.current && (S = " It was passed a child from " + $(n._owner.type) + "."), ae(n), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, S), ae(null);
      }
    }
    function yr(n, d) {
      {
        if (typeof n != "object")
          return;
        if (Ne(n))
          for (var y = 0; y < n.length; y++) {
            var S = n[y];
            Ve(S) && vr(S, d);
          }
        else if (Ve(n))
          n._store && (n._store.validated = !0);
        else if (n) {
          var k = m(n);
          if (typeof k == "function" && k !== n.entries)
            for (var P = k.call(n), C; !(C = P.next()).done; )
              Ve(C.value) && vr(C.value, d);
        }
      }
    }
    function Ct(n) {
      {
        var d = n.type;
        if (d == null || typeof d == "string")
          return;
        var y;
        if (typeof d == "function")
          y = d.propTypes;
        else if (typeof d == "object" && (d.$$typeof === u || // Note: Memo only checks outer props here.
        // Inner props are checked in the reconciler.
        d.$$typeof === h))
          y = d.propTypes;
        else
          return;
        if (y) {
          var S = $(d);
          ft(y, n.props, "prop", S, n);
        } else if (d.PropTypes !== void 0 && !We) {
          We = !0;
          var k = $(d);
          b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
        }
        typeof d.getDefaultProps == "function" && !d.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
      }
    }
    function Ot(n) {
      {
        for (var d = Object.keys(n.props), y = 0; y < d.length; y++) {
          var S = d[y];
          if (S !== "children" && S !== "key") {
            ae(n), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), ae(null);
            break;
          }
        }
        n.ref !== null && (ae(n), b("Invalid attribute `ref` supplied to `React.Fragment`."), ae(null));
      }
    }
    var wr = {};
    function xr(n, d, y, S, k, P) {
      {
        var C = fe(n);
        if (!C) {
          var R = "";
          (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (R += " 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 N = _t();
          N ? R += N : R += hr();
          var D;
          n === null ? D = "null" : Ne(n) ? D = "array" : n !== void 0 && n.$$typeof === t ? (D = "<" + ($(n.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : D = typeof n, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, R);
        }
        var z = St(n, d, y, k, P);
        if (z == null)
          return z;
        if (C) {
          var U = d.children;
          if (U !== void 0)
            if (S)
              if (Ne(U)) {
                for (var ie = 0; ie < U.length; ie++)
                  yr(U[ie], n);
                Object.freeze && Object.freeze(U);
              } else
                b("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
              yr(U, n);
        }
        if (he.call(d, "key")) {
          var re = $(n), V = Object.keys(d).filter(function(It) {
            return It !== "key";
          }), Ge = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}";
          if (!wr[re + Ge]) {
            var At = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}";
            b(`A props object containing a "key" prop is being spread into JSX:
  let props = %s;
  <%s {...props} />
React keys must be passed directly to JSX without using spread:
  let props = %s;
  <%s key={someKey} {...props} />`, Ge, re, At, re), wr[re + Ge] = !0;
          }
        }
        return n === o ? Ot(z) : Ct(z), z;
      }
    }
    function kt(n, d, y) {
      return xr(n, d, y, !0);
    }
    function jt(n, d, y) {
      return xr(n, d, y, !1);
    }
    var Pt = jt, Tt = kt;
    ve.Fragment = o, ve.jsx = Pt, ve.jsxs = Tt;
  }()), ve;
}
var _r;
function Ft() {
  return _r || (_r = 1, process.env.NODE_ENV === "production" ? Ce.exports = Lt() : Ce.exports = Nt()), Ce.exports;
}
var E = Ft();
function Rr(e, t) {
  if (typeof e == "function")
    return e(t);
  e != null && (e.current = t);
}
function Wt(...e) {
  return (t) => {
    let r = !1;
    const o = e.map((s) => {
      const a = Rr(s, t);
      return !r && typeof a == "function" && (r = !0), a;
    });
    if (r)
      return () => {
        for (let s = 0; s < o.length; s++) {
          const a = o[s];
          typeof a == "function" ? a() : Rr(e[s], null);
        }
      };
  };
}
var Gr = F.forwardRef((e, t) => {
  const { children: r, ...o } = e, s = F.Children.toArray(r), a = s.find(Gt);
  if (a) {
    const l = a.props.children, i = s.map((u) => u === a ? F.Children.count(l) > 1 ? F.Children.only(null) : F.isValidElement(l) ? l.props.children : null : u);
    return /* @__PURE__ */ E.jsx(Ze, { ...o, ref: t, children: F.isValidElement(l) ? F.cloneElement(l, void 0, i) : null });
  }
  return /* @__PURE__ */ E.jsx(Ze, { ...o, ref: t, children: r });
});
Gr.displayName = "Slot";
var Ze = F.forwardRef((e, t) => {
  const { children: r, ...o } = e;
  if (F.isValidElement(r)) {
    const s = Ut(r), a = Bt(o, r.props);
    return r.type !== F.Fragment && (a.ref = t ? Wt(t, s) : s), F.cloneElement(r, a);
  }
  return F.Children.count(r) > 1 ? F.Children.only(null) : null;
});
Ze.displayName = "SlotClone";
var Vt = ({ children: e }) => /* @__PURE__ */ E.jsx(E.Fragment, { children: e });
function Gt(e) {
  return F.isValidElement(e) && e.type === Vt;
}
function Bt(e, t) {
  const r = { ...t };
  for (const o in t) {
    const s = e[o], a = t[o];
    /^on[A-Z]/.test(o) ? s && a ? r[o] = (...i) => {
      a(...i), s(...i);
    } : s && (r[o] = s) : o === "style" ? r[o] = { ...s, ...a } : o === "className" && (r[o] = [s, a].filter(Boolean).join(" "));
  }
  return { ...e, ...r };
}
function Ut(e) {
  var o, s;
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
  return r ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
}
function Br(e) {
  var t, r, o = "";
  if (typeof e == "string" || typeof e == "number") o += e;
  else if (typeof e == "object") if (Array.isArray(e)) {
    var s = e.length;
    for (t = 0; t < s; t++) e[t] && (r = Br(e[t])) && (o && (o += " "), o += r);
  } else for (r in e) e[r] && (o && (o += " "), o += r);
  return o;
}
function Ur() {
  for (var e, t, r = 0, o = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = Br(e)) && (o && (o += " "), o += t);
  return o;
}
const Cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Or = Ur, $t = (e, t) => (r) => {
  var o;
  if ((t == null ? void 0 : t.variants) == null) return Or(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
  const { variants: s, defaultVariants: a } = t, l = Object.keys(s).map((c) => {
    const f = r == null ? void 0 : r[c], h = a == null ? void 0 : a[c];
    if (f === null) return null;
    const g = Cr(f) || Cr(h);
    return s[c][g];
  }), i = r && Object.entries(r).reduce((c, f) => {
    let [h, g] = f;
    return g === void 0 || (c[h] = g), c;
  }, {}), u = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((c, f) => {
    let { class: h, className: g, ...v } = f;
    return Object.entries(v).every((w) => {
      let [p, m] = w;
      return Array.isArray(m) ? m.includes({
        ...a,
        ...i
      }[p]) : {
        ...a,
        ...i
      }[p] === m;
    }) ? [
      ...c,
      h,
      g
    ] : c;
  }, []);
  return Or(e, l, u, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
}, or = "-", Ht = (e) => {
  const t = Kt(e), {
    conflictingClassGroups: r,
    conflictingClassGroupModifiers: o
  } = e;
  return {
    getClassGroupId: (l) => {
      const i = l.split(or);
      return i[0] === "" && i.length !== 1 && i.shift(), $r(i, t) || Yt(l);
    },
    getConflictingClassGroupIds: (l, i) => {
      const u = r[l] || [];
      return i && o[l] ? [...u, ...o[l]] : u;
    }
  };
}, $r = (e, t) => {
  var l;
  if (e.length === 0)
    return t.classGroupId;
  const r = e[0], o = t.nextPart.get(r), s = o ? $r(e.slice(1), o) : void 0;
  if (s)
    return s;
  if (t.validators.length === 0)
    return;
  const a = e.join(or);
  return (l = t.validators.find(({
    validator: i
  }) => i(a))) == null ? void 0 : l.classGroupId;
}, kr = /^\[(.+)\]$/, Yt = (e) => {
  if (kr.test(e)) {
    const t = kr.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
    if (r)
      return "arbitrary.." + r;
  }
}, Kt = (e) => {
  const {
    theme: t,
    prefix: r
  } = e, o = {
    nextPart: /* @__PURE__ */ new Map(),
    validators: []
  };
  return Jt(Object.entries(e.classGroups), r).forEach(([a, l]) => {
    Qe(l, o, a, t);
  }), o;
}, Qe = (e, t, r, o) => {
  e.forEach((s) => {
    if (typeof s == "string") {
      const a = s === "" ? t : jr(t, s);
      a.classGroupId = r;
      return;
    }
    if (typeof s == "function") {
      if (qt(s)) {
        Qe(s(o), t, r, o);
        return;
      }
      t.validators.push({
        validator: s,
        classGroupId: r
      });
      return;
    }
    Object.entries(s).forEach(([a, l]) => {
      Qe(l, jr(t, a), r, o);
    });
  });
}, jr = (e, t) => {
  let r = e;
  return t.split(or).forEach((o) => {
    r.nextPart.has(o) || r.nextPart.set(o, {
      nextPart: /* @__PURE__ */ new Map(),
      validators: []
    }), r = r.nextPart.get(o);
  }), r;
}, qt = (e) => e.isThemeGetter, Jt = (e, t) => t ? e.map(([r, o]) => {
  const s = o.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, i]) => [t + l, i])) : a);
  return [r, s];
}) : e, Xt = (e) => {
  if (e < 1)
    return {
      get: () => {
      },
      set: () => {
      }
    };
  let t = 0, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
  const s = (a, l) => {
    r.set(a, l), t++, t > e && (t = 0, o = r, r = /* @__PURE__ */ new Map());
  };
  return {
    get(a) {
      let l = r.get(a);
      if (l !== void 0)
        return l;
      if ((l = o.get(a)) !== void 0)
        return s(a, l), l;
    },
    set(a, l) {
      r.has(a) ? r.set(a, l) : s(a, l);
    }
  };
}, Hr = "!", Zt = (e) => {
  const {
    separator: t,
    experimentalParseClassName: r
  } = e, o = t.length === 1, s = t[0], a = t.length, l = (i) => {
    const u = [];
    let c = 0, f = 0, h;
    for (let m = 0; m < i.length; m++) {
      let x = i[m];
      if (c === 0) {
        if (x === s && (o || i.slice(m, m + a) === t)) {
          u.push(i.slice(f, m)), f = m + a;
          continue;
        }
        if (x === "/") {
          h = m;
          continue;
        }
      }
      x === "[" ? c++ : x === "]" && c--;
    }
    const g = u.length === 0 ? i : i.substring(f), v = g.startsWith(Hr), w = v ? g.substring(1) : g, p = h && h > f ? h - f : void 0;
    return {
      modifiers: u,
      hasImportantModifier: v,
      baseClassName: w,
      maybePostfixModifierPosition: p
    };
  };
  return r ? (i) => r({
    className: i,
    parseClassName: l
  }) : l;
}, Qt = (e) => {
  if (e.length <= 1)
    return e;
  const t = [];
  let r = [];
  return e.forEach((o) => {
    o[0] === "[" ? (t.push(...r.sort(), o), r = []) : r.push(o);
  }), t.push(...r.sort()), t;
}, en = (e) => ({
  cache: Xt(e.cacheSize),
  parseClassName: Zt(e),
  ...Ht(e)
}), rn = /\s+/, tn = (e, t) => {
  const {
    parseClassName: r,
    getClassGroupId: o,
    getConflictingClassGroupIds: s
  } = t, a = [], l = e.trim().split(rn);
  let i = "";
  for (let u = l.length - 1; u >= 0; u -= 1) {
    const c = l[u], {
      modifiers: f,
      hasImportantModifier: h,
      baseClassName: g,
      maybePostfixModifierPosition: v
    } = r(c);
    let w = !!v, p = o(w ? g.substring(0, v) : g);
    if (!p) {
      if (!w) {
        i = c + (i.length > 0 ? " " + i : i);
        continue;
      }
      if (p = o(g), !p) {
        i = c + (i.length > 0 ? " " + i : i);
        continue;
      }
      w = !1;
    }
    const m = Qt(f).join(":"), x = h ? m + Hr : m, b = x + p;
    if (a.includes(b))
      continue;
    a.push(b);
    const O = s(p, w);
    for (let M = 0; M < O.length; ++M) {
      const W = O[M];
      a.push(x + W);
    }
    i = c + (i.length > 0 ? " " + i : i);
  }
  return i;
};
function nn() {
  let e = 0, t, r, o = "";
  for (; e < arguments.length; )
    (t = arguments[e++]) && (r = Yr(t)) && (o && (o += " "), o += r);
  return o;
}
const Yr = (e) => {
  if (typeof e == "string")
    return e;
  let t, r = "";
  for (let o = 0; o < e.length; o++)
    e[o] && (t = Yr(e[o])) && (r && (r += " "), r += t);
  return r;
};
function on(e, ...t) {
  let r, o, s, a = l;
  function l(u) {
    const c = t.reduce((f, h) => h(f), e());
    return r = en(c), o = r.cache.get, s = r.cache.set, a = i, i(u);
  }
  function i(u) {
    const c = o(u);
    if (c)
      return c;
    const f = tn(u, r);
    return s(u, f), f;
  }
  return function() {
    return a(nn.apply(null, arguments));
  };
}
const A = (e) => {
  const t = (r) => r[e] || [];
  return t.isThemeGetter = !0, t;
}, Kr = /^\[(?:([a-z-]+):)?(.+)\]$/i, sn = /^\d+\/\d+$/, an = /* @__PURE__ */ new Set(["px", "full", "screen"]), ln = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, cn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, un = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, dn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, fn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Y = (e) => ue(e) || an.has(e) || sn.test(e), Z = (e) => de(e, "length", wn), ue = (e) => !!e && !Number.isNaN(Number(e)), Be = (e) => de(e, "number", ue), ye = (e) => !!e && Number.isInteger(Number(e)), pn = (e) => e.endsWith("%") && ue(e.slice(0, -1)), _ = (e) => Kr.test(e), Q = (e) => ln.test(e), mn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), gn = (e) => de(e, mn, qr), hn = (e) => de(e, "position", qr), bn = /* @__PURE__ */ new Set(["image", "url"]), vn = (e) => de(e, bn, En), yn = (e) => de(e, "", xn), we = () => !0, de = (e, t, r) => {
  const o = Kr.exec(e);
  return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : r(o[2]) : !1;
}, wn = (e) => (
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
  cn.test(e) && !un.test(e)
), qr = () => !1, xn = (e) => dn.test(e), En = (e) => fn.test(e), Sn = () => {
  const e = A("colors"), t = A("spacing"), r = A("blur"), o = A("brightness"), s = A("borderColor"), a = A("borderRadius"), l = A("borderSpacing"), i = A("borderWidth"), u = A("contrast"), c = A("grayscale"), f = A("hueRotate"), h = A("invert"), g = A("gap"), v = A("gradientColorStops"), w = A("gradientColorStopPositions"), p = A("inset"), m = A("margin"), x = A("opacity"), b = A("padding"), O = A("saturate"), M = A("scale"), W = A("sepia"), I = A("skew"), L = A("space"), H = A("translate"), oe = () => ["auto", "contain", "none"], fe = () => ["auto", "hidden", "clip", "visible", "scroll"], pe = () => ["auto", _, t], j = () => [_, t], $ = () => ["", Y, Z], G = () => ["auto", ue, _], J = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], ee = () => ["solid", "dashed", "dotted", "double", "none"], me = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], se = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], X = () => ["", "0", _], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], B = () => [ue, _];
  return {
    cacheSize: 500,
    separator: ":",
    theme: {
      colors: [we],
      spacing: [Y, Z],
      blur: ["none", "", Q, _],
      brightness: B(),
      borderColor: [e],
      borderRadius: ["none", "", "full", Q, _],
      borderSpacing: j(),
      borderWidth: $(),
      contrast: B(),
      grayscale: X(),
      hueRotate: B(),
      invert: X(),
      gap: j(),
      gradientColorStops: [e],
      gradientColorStopPositions: [pn, Z],
      inset: pe(),
      margin: pe(),
      opacity: B(),
      padding: j(),
      saturate: B(),
      scale: B(),
      sepia: X(),
      skew: B(),
      space: j(),
      translate: j()
    },
    classGroups: {
      // Layout
      /**
       * Aspect Ratio
       * @see https://tailwindcss.com/docs/aspect-ratio
       */
      aspect: [{
        aspect: ["auto", "square", "video", _]
      }],
      /**
       * Container
       * @see https://tailwindcss.com/docs/container
       */
      container: ["container"],
      /**
       * Columns
       * @see https://tailwindcss.com/docs/columns
       */
      columns: [{
        columns: [Q]
      }],
      /**
       * Break After
       * @see https://tailwindcss.com/docs/break-after
       */
      "break-after": [{
        "break-after": ge()
      }],
      /**
       * Break Before
       * @see https://tailwindcss.com/docs/break-before
       */
      "break-before": [{
        "break-before": ge()
      }],
      /**
       * Break Inside
       * @see https://tailwindcss.com/docs/break-inside
       */
      "break-inside": [{
        "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
      }],
      /**
       * Box Decoration Break
       * @see https://tailwindcss.com/docs/box-decoration-break
       */
      "box-decoration": [{
        "box-decoration": ["slice", "clone"]
      }],
      /**
       * Box Sizing
       * @see https://tailwindcss.com/docs/box-sizing
       */
      box: [{
        box: ["border", "content"]
      }],
      /**
       * Display
       * @see https://tailwindcss.com/docs/display
       */
      display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
      /**
       * Floats
       * @see https://tailwindcss.com/docs/float
       */
      float: [{
        float: ["right", "left", "none", "start", "end"]
      }],
      /**
       * Clear
       * @see https://tailwindcss.com/docs/clear
       */
      clear: [{
        clear: ["left", "right", "both", "none", "start", "end"]
      }],
      /**
       * Isolation
       * @see https://tailwindcss.com/docs/isolation
       */
      isolation: ["isolate", "isolation-auto"],
      /**
       * Object Fit
       * @see https://tailwindcss.com/docs/object-fit
       */
      "object-fit": [{
        object: ["contain", "cover", "fill", "none", "scale-down"]
      }],
      /**
       * Object Position
       * @see https://tailwindcss.com/docs/object-position
       */
      "object-position": [{
        object: [...J(), _]
      }],
      /**
       * Overflow
       * @see https://tailwindcss.com/docs/overflow
       */
      overflow: [{
        overflow: fe()
      }],
      /**
       * Overflow X
       * @see https://tailwindcss.com/docs/overflow
       */
      "overflow-x": [{
        "overflow-x": fe()
      }],
      /**
       * Overflow Y
       * @see https://tailwindcss.com/docs/overflow
       */
      "overflow-y": [{
        "overflow-y": fe()
      }],
      /**
       * Overscroll Behavior
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      overscroll: [{
        overscroll: oe()
      }],
      /**
       * Overscroll Behavior X
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      "overscroll-x": [{
        "overscroll-x": oe()
      }],
      /**
       * Overscroll Behavior Y
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      "overscroll-y": [{
        "overscroll-y": oe()
      }],
      /**
       * Position
       * @see https://tailwindcss.com/docs/position
       */
      position: ["static", "fixed", "absolute", "relative", "sticky"],
      /**
       * Top / Right / Bottom / Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      inset: [{
        inset: [p]
      }],
      /**
       * Right / Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      "inset-x": [{
        "inset-x": [p]
      }],
      /**
       * Top / Bottom
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      "inset-y": [{
        "inset-y": [p]
      }],
      /**
       * Start
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      start: [{
        start: [p]
      }],
      /**
       * End
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      end: [{
        end: [p]
      }],
      /**
       * Top
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      top: [{
        top: [p]
      }],
      /**
       * Right
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      right: [{
        right: [p]
      }],
      /**
       * Bottom
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      bottom: [{
        bottom: [p]
      }],
      /**
       * Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      left: [{
        left: [p]
      }],
      /**
       * Visibility
       * @see https://tailwindcss.com/docs/visibility
       */
      visibility: ["visible", "invisible", "collapse"],
      /**
       * Z-Index
       * @see https://tailwindcss.com/docs/z-index
       */
      z: [{
        z: ["auto", ye, _]
      }],
      // Flexbox and Grid
      /**
       * Flex Basis
       * @see https://tailwindcss.com/docs/flex-basis
       */
      basis: [{
        basis: pe()
      }],
      /**
       * Flex Direction
       * @see https://tailwindcss.com/docs/flex-direction
       */
      "flex-direction": [{
        flex: ["row", "row-reverse", "col", "col-reverse"]
      }],
      /**
       * Flex Wrap
       * @see https://tailwindcss.com/docs/flex-wrap
       */
      "flex-wrap": [{
        flex: ["wrap", "wrap-reverse", "nowrap"]
      }],
      /**
       * Flex
       * @see https://tailwindcss.com/docs/flex
       */
      flex: [{
        flex: ["1", "auto", "initial", "none", _]
      }],
      /**
       * Flex Grow
       * @see https://tailwindcss.com/docs/flex-grow
       */
      grow: [{
        grow: X()
      }],
      /**
       * Flex Shrink
       * @see https://tailwindcss.com/docs/flex-shrink
       */
      shrink: [{
        shrink: X()
      }],
      /**
       * Order
       * @see https://tailwindcss.com/docs/order
       */
      order: [{
        order: ["first", "last", "none", ye, _]
      }],
      /**
       * Grid Template Columns
       * @see https://tailwindcss.com/docs/grid-template-columns
       */
      "grid-cols": [{
        "grid-cols": [we]
      }],
      /**
       * Grid Column Start / End
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-start-end": [{
        col: ["auto", {
          span: ["full", ye, _]
        }, _]
      }],
      /**
       * Grid Column Start
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-start": [{
        "col-start": G()
      }],
      /**
       * Grid Column End
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-end": [{
        "col-end": G()
      }],
      /**
       * Grid Template Rows
       * @see https://tailwindcss.com/docs/grid-template-rows
       */
      "grid-rows": [{
        "grid-rows": [we]
      }],
      /**
       * Grid Row Start / End
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-start-end": [{
        row: ["auto", {
          span: [ye, _]
        }, _]
      }],
      /**
       * Grid Row Start
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-start": [{
        "row-start": G()
      }],
      /**
       * Grid Row End
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-end": [{
        "row-end": G()
      }],
      /**
       * Grid Auto Flow
       * @see https://tailwindcss.com/docs/grid-auto-flow
       */
      "grid-flow": [{
        "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
      }],
      /**
       * Grid Auto Columns
       * @see https://tailwindcss.com/docs/grid-auto-columns
       */
      "auto-cols": [{
        "auto-cols": ["auto", "min", "max", "fr", _]
      }],
      /**
       * Grid Auto Rows
       * @see https://tailwindcss.com/docs/grid-auto-rows
       */
      "auto-rows": [{
        "auto-rows": ["auto", "min", "max", "fr", _]
      }],
      /**
       * Gap
       * @see https://tailwindcss.com/docs/gap
       */
      gap: [{
        gap: [g]
      }],
      /**
       * Gap X
       * @see https://tailwindcss.com/docs/gap
       */
      "gap-x": [{
        "gap-x": [g]
      }],
      /**
       * Gap Y
       * @see https://tailwindcss.com/docs/gap
       */
      "gap-y": [{
        "gap-y": [g]
      }],
      /**
       * Justify Content
       * @see https://tailwindcss.com/docs/justify-content
       */
      "justify-content": [{
        justify: ["normal", ...se()]
      }],
      /**
       * Justify Items
       * @see https://tailwindcss.com/docs/justify-items
       */
      "justify-items": [{
        "justify-items": ["start", "end", "center", "stretch"]
      }],
      /**
       * Justify Self
       * @see https://tailwindcss.com/docs/justify-self
       */
      "justify-self": [{
        "justify-self": ["auto", "start", "end", "center", "stretch"]
      }],
      /**
       * Align Content
       * @see https://tailwindcss.com/docs/align-content
       */
      "align-content": [{
        content: ["normal", ...se(), "baseline"]
      }],
      /**
       * Align Items
       * @see https://tailwindcss.com/docs/align-items
       */
      "align-items": [{
        items: ["start", "end", "center", "baseline", "stretch"]
      }],
      /**
       * Align Self
       * @see https://tailwindcss.com/docs/align-self
       */
      "align-self": [{
        self: ["auto", "start", "end", "center", "stretch", "baseline"]
      }],
      /**
       * Place Content
       * @see https://tailwindcss.com/docs/place-content
       */
      "place-content": [{
        "place-content": [...se(), "baseline"]
      }],
      /**
       * Place Items
       * @see https://tailwindcss.com/docs/place-items
       */
      "place-items": [{
        "place-items": ["start", "end", "center", "baseline", "stretch"]
      }],
      /**
       * Place Self
       * @see https://tailwindcss.com/docs/place-self
       */
      "place-self": [{
        "place-self": ["auto", "start", "end", "center", "stretch"]
      }],
      // Spacing
      /**
       * Padding
       * @see https://tailwindcss.com/docs/padding
       */
      p: [{
        p: [b]
      }],
      /**
       * Padding X
       * @see https://tailwindcss.com/docs/padding
       */
      px: [{
        px: [b]
      }],
      /**
       * Padding Y
       * @see https://tailwindcss.com/docs/padding
       */
      py: [{
        py: [b]
      }],
      /**
       * Padding Start
       * @see https://tailwindcss.com/docs/padding
       */
      ps: [{
        ps: [b]
      }],
      /**
       * Padding End
       * @see https://tailwindcss.com/docs/padding
       */
      pe: [{
        pe: [b]
      }],
      /**
       * Padding Top
       * @see https://tailwindcss.com/docs/padding
       */
      pt: [{
        pt: [b]
      }],
      /**
       * Padding Right
       * @see https://tailwindcss.com/docs/padding
       */
      pr: [{
        pr: [b]
      }],
      /**
       * Padding Bottom
       * @see https://tailwindcss.com/docs/padding
       */
      pb: [{
        pb: [b]
      }],
      /**
       * Padding Left
       * @see https://tailwindcss.com/docs/padding
       */
      pl: [{
        pl: [b]
      }],
      /**
       * Margin
       * @see https://tailwindcss.com/docs/margin
       */
      m: [{
        m: [m]
      }],
      /**
       * Margin X
       * @see https://tailwindcss.com/docs/margin
       */
      mx: [{
        mx: [m]
      }],
      /**
       * Margin Y
       * @see https://tailwindcss.com/docs/margin
       */
      my: [{
        my: [m]
      }],
      /**
       * Margin Start
       * @see https://tailwindcss.com/docs/margin
       */
      ms: [{
        ms: [m]
      }],
      /**
       * Margin End
       * @see https://tailwindcss.com/docs/margin
       */
      me: [{
        me: [m]
      }],
      /**
       * Margin Top
       * @see https://tailwindcss.com/docs/margin
       */
      mt: [{
        mt: [m]
      }],
      /**
       * Margin Right
       * @see https://tailwindcss.com/docs/margin
       */
      mr: [{
        mr: [m]
      }],
      /**
       * Margin Bottom
       * @see https://tailwindcss.com/docs/margin
       */
      mb: [{
        mb: [m]
      }],
      /**
       * Margin Left
       * @see https://tailwindcss.com/docs/margin
       */
      ml: [{
        ml: [m]
      }],
      /**
       * Space Between X
       * @see https://tailwindcss.com/docs/space
       */
      "space-x": [{
        "space-x": [L]
      }],
      /**
       * Space Between X Reverse
       * @see https://tailwindcss.com/docs/space
       */
      "space-x-reverse": ["space-x-reverse"],
      /**
       * Space Between Y
       * @see https://tailwindcss.com/docs/space
       */
      "space-y": [{
        "space-y": [L]
      }],
      /**
       * Space Between Y Reverse
       * @see https://tailwindcss.com/docs/space
       */
      "space-y-reverse": ["space-y-reverse"],
      // Sizing
      /**
       * Width
       * @see https://tailwindcss.com/docs/width
       */
      w: [{
        w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", _, t]
      }],
      /**
       * Min-Width
       * @see https://tailwindcss.com/docs/min-width
       */
      "min-w": [{
        "min-w": [_, t, "min", "max", "fit"]
      }],
      /**
       * Max-Width
       * @see https://tailwindcss.com/docs/max-width
       */
      "max-w": [{
        "max-w": [_, t, "none", "full", "min", "max", "fit", "prose", {
          screen: [Q]
        }, Q]
      }],
      /**
       * Height
       * @see https://tailwindcss.com/docs/height
       */
      h: [{
        h: [_, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
      }],
      /**
       * Min-Height
       * @see https://tailwindcss.com/docs/min-height
       */
      "min-h": [{
        "min-h": [_, t, "min", "max", "fit", "svh", "lvh", "dvh"]
      }],
      /**
       * Max-Height
       * @see https://tailwindcss.com/docs/max-height
       */
      "max-h": [{
        "max-h": [_, t, "min", "max", "fit", "svh", "lvh", "dvh"]
      }],
      /**
       * Size
       * @see https://tailwindcss.com/docs/size
       */
      size: [{
        size: [_, t, "auto", "min", "max", "fit"]
      }],
      // Typography
      /**
       * Font Size
       * @see https://tailwindcss.com/docs/font-size
       */
      "font-size": [{
        text: ["base", Q, Z]
      }],
      /**
       * Font Smoothing
       * @see https://tailwindcss.com/docs/font-smoothing
       */
      "font-smoothing": ["antialiased", "subpixel-antialiased"],
      /**
       * Font Style
       * @see https://tailwindcss.com/docs/font-style
       */
      "font-style": ["italic", "not-italic"],
      /**
       * Font Weight
       * @see https://tailwindcss.com/docs/font-weight
       */
      "font-weight": [{
        font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Be]
      }],
      /**
       * Font Family
       * @see https://tailwindcss.com/docs/font-family
       */
      "font-family": [{
        font: [we]
      }],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-normal": ["normal-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-ordinal": ["ordinal"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-slashed-zero": ["slashed-zero"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-figure": ["lining-nums", "oldstyle-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-spacing": ["proportional-nums", "tabular-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
      /**
       * Letter Spacing
       * @see https://tailwindcss.com/docs/letter-spacing
       */
      tracking: [{
        tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", _]
      }],
      /**
       * Line Clamp
       * @see https://tailwindcss.com/docs/line-clamp
       */
      "line-clamp": [{
        "line-clamp": ["none", ue, Be]
      }],
      /**
       * Line Height
       * @see https://tailwindcss.com/docs/line-height
       */
      leading: [{
        leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Y, _]
      }],
      /**
       * List Style Image
       * @see https://tailwindcss.com/docs/list-style-image
       */
      "list-image": [{
        "list-image": ["none", _]
      }],
      /**
       * List Style Type
       * @see https://tailwindcss.com/docs/list-style-type
       */
      "list-style-type": [{
        list: ["none", "disc", "decimal", _]
      }],
      /**
       * List Style Position
       * @see https://tailwindcss.com/docs/list-style-position
       */
      "list-style-position": [{
        list: ["inside", "outside"]
      }],
      /**
       * Placeholder Color
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/placeholder-color
       */
      "placeholder-color": [{
        placeholder: [e]
      }],
      /**
       * Placeholder Opacity
       * @see https://tailwindcss.com/docs/placeholder-opacity
       */
      "placeholder-opacity": [{
        "placeholder-opacity": [x]
      }],
      /**
       * Text Alignment
       * @see https://tailwindcss.com/docs/text-align
       */
      "text-alignment": [{
        text: ["left", "center", "right", "justify", "start", "end"]
      }],
      /**
       * Text Color
       * @see https://tailwindcss.com/docs/text-color
       */
      "text-color": [{
        text: [e]
      }],
      /**
       * Text Opacity
       * @see https://tailwindcss.com/docs/text-opacity
       */
      "text-opacity": [{
        "text-opacity": [x]
      }],
      /**
       * Text Decoration
       * @see https://tailwindcss.com/docs/text-decoration
       */
      "text-decoration": ["underline", "overline", "line-through", "no-underline"],
      /**
       * Text Decoration Style
       * @see https://tailwindcss.com/docs/text-decoration-style
       */
      "text-decoration-style": [{
        decoration: [...ee(), "wavy"]
      }],
      /**
       * Text Decoration Thickness
       * @see https://tailwindcss.com/docs/text-decoration-thickness
       */
      "text-decoration-thickness": [{
        decoration: ["auto", "from-font", Y, Z]
      }],
      /**
       * Text Underline Offset
       * @see https://tailwindcss.com/docs/text-underline-offset
       */
      "underline-offset": [{
        "underline-offset": ["auto", Y, _]
      }],
      /**
       * Text Decoration Color
       * @see https://tailwindcss.com/docs/text-decoration-color
       */
      "text-decoration-color": [{
        decoration: [e]
      }],
      /**
       * Text Transform
       * @see https://tailwindcss.com/docs/text-transform
       */
      "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
      /**
       * Text Overflow
       * @see https://tailwindcss.com/docs/text-overflow
       */
      "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
      /**
       * Text Wrap
       * @see https://tailwindcss.com/docs/text-wrap
       */
      "text-wrap": [{
        text: ["wrap", "nowrap", "balance", "pretty"]
      }],
      /**
       * Text Indent
       * @see https://tailwindcss.com/docs/text-indent
       */
      indent: [{
        indent: j()
      }],
      /**
       * Vertical Alignment
       * @see https://tailwindcss.com/docs/vertical-align
       */
      "vertical-align": [{
        align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", _]
      }],
      /**
       * Whitespace
       * @see https://tailwindcss.com/docs/whitespace
       */
      whitespace: [{
        whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
      }],
      /**
       * Word Break
       * @see https://tailwindcss.com/docs/word-break
       */
      break: [{
        break: ["normal", "words", "all", "keep"]
      }],
      /**
       * Hyphens
       * @see https://tailwindcss.com/docs/hyphens
       */
      hyphens: [{
        hyphens: ["none", "manual", "auto"]
      }],
      /**
       * Content
       * @see https://tailwindcss.com/docs/content
       */
      content: [{
        content: ["none", _]
      }],
      // Backgrounds
      /**
       * Background Attachment
       * @see https://tailwindcss.com/docs/background-attachment
       */
      "bg-attachment": [{
        bg: ["fixed", "local", "scroll"]
      }],
      /**
       * Background Clip
       * @see https://tailwindcss.com/docs/background-clip
       */
      "bg-clip": [{
        "bg-clip": ["border", "padding", "content", "text"]
      }],
      /**
       * Background Opacity
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/background-opacity
       */
      "bg-opacity": [{
        "bg-opacity": [x]
      }],
      /**
       * Background Origin
       * @see https://tailwindcss.com/docs/background-origin
       */
      "bg-origin": [{
        "bg-origin": ["border", "padding", "content"]
      }],
      /**
       * Background Position
       * @see https://tailwindcss.com/docs/background-position
       */
      "bg-position": [{
        bg: [...J(), hn]
      }],
      /**
       * Background Repeat
       * @see https://tailwindcss.com/docs/background-repeat
       */
      "bg-repeat": [{
        bg: ["no-repeat", {
          repeat: ["", "x", "y", "round", "space"]
        }]
      }],
      /**
       * Background Size
       * @see https://tailwindcss.com/docs/background-size
       */
      "bg-size": [{
        bg: ["auto", "cover", "contain", gn]
      }],
      /**
       * Background Image
       * @see https://tailwindcss.com/docs/background-image
       */
      "bg-image": [{
        bg: ["none", {
          "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
        }, vn]
      }],
      /**
       * Background Color
       * @see https://tailwindcss.com/docs/background-color
       */
      "bg-color": [{
        bg: [e]
      }],
      /**
       * Gradient Color Stops From Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-from-pos": [{
        from: [w]
      }],
      /**
       * Gradient Color Stops Via Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-via-pos": [{
        via: [w]
      }],
      /**
       * Gradient Color Stops To Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-to-pos": [{
        to: [w]
      }],
      /**
       * Gradient Color Stops From
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-from": [{
        from: [v]
      }],
      /**
       * Gradient Color Stops Via
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-via": [{
        via: [v]
      }],
      /**
       * Gradient Color Stops To
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-to": [{
        to: [v]
      }],
      // Borders
      /**
       * Border Radius
       * @see https://tailwindcss.com/docs/border-radius
       */
      rounded: [{
        rounded: [a]
      }],
      /**
       * Border Radius Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-s": [{
        "rounded-s": [a]
      }],
      /**
       * Border Radius End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-e": [{
        "rounded-e": [a]
      }],
      /**
       * Border Radius Top
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-t": [{
        "rounded-t": [a]
      }],
      /**
       * Border Radius Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-r": [{
        "rounded-r": [a]
      }],
      /**
       * Border Radius Bottom
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-b": [{
        "rounded-b": [a]
      }],
      /**
       * Border Radius Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-l": [{
        "rounded-l": [a]
      }],
      /**
       * Border Radius Start Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-ss": [{
        "rounded-ss": [a]
      }],
      /**
       * Border Radius Start End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-se": [{
        "rounded-se": [a]
      }],
      /**
       * Border Radius End End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-ee": [{
        "rounded-ee": [a]
      }],
      /**
       * Border Radius End Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-es": [{
        "rounded-es": [a]
      }],
      /**
       * Border Radius Top Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-tl": [{
        "rounded-tl": [a]
      }],
      /**
       * Border Radius Top Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-tr": [{
        "rounded-tr": [a]
      }],
      /**
       * Border Radius Bottom Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-br": [{
        "rounded-br": [a]
      }],
      /**
       * Border Radius Bottom Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-bl": [{
        "rounded-bl": [a]
      }],
      /**
       * Border Width
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w": [{
        border: [i]
      }],
      /**
       * Border Width X
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-x": [{
        "border-x": [i]
      }],
      /**
       * Border Width Y
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-y": [{
        "border-y": [i]
      }],
      /**
       * Border Width Start
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-s": [{
        "border-s": [i]
      }],
      /**
       * Border Width End
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-e": [{
        "border-e": [i]
      }],
      /**
       * Border Width Top
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-t": [{
        "border-t": [i]
      }],
      /**
       * Border Width Right
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-r": [{
        "border-r": [i]
      }],
      /**
       * Border Width Bottom
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-b": [{
        "border-b": [i]
      }],
      /**
       * Border Width Left
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-l": [{
        "border-l": [i]
      }],
      /**
       * Border Opacity
       * @see https://tailwindcss.com/docs/border-opacity
       */
      "border-opacity": [{
        "border-opacity": [x]
      }],
      /**
       * Border Style
       * @see https://tailwindcss.com/docs/border-style
       */
      "border-style": [{
        border: [...ee(), "hidden"]
      }],
      /**
       * Divide Width X
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-x": [{
        "divide-x": [i]
      }],
      /**
       * Divide Width X Reverse
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-x-reverse": ["divide-x-reverse"],
      /**
       * Divide Width Y
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-y": [{
        "divide-y": [i]
      }],
      /**
       * Divide Width Y Reverse
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-y-reverse": ["divide-y-reverse"],
      /**
       * Divide Opacity
       * @see https://tailwindcss.com/docs/divide-opacity
       */
      "divide-opacity": [{
        "divide-opacity": [x]
      }],
      /**
       * Divide Style
       * @see https://tailwindcss.com/docs/divide-style
       */
      "divide-style": [{
        divide: ee()
      }],
      /**
       * Border Color
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color": [{
        border: [s]
      }],
      /**
       * Border Color X
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-x": [{
        "border-x": [s]
      }],
      /**
       * Border Color Y
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-y": [{
        "border-y": [s]
      }],
      /**
       * Border Color S
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-s": [{
        "border-s": [s]
      }],
      /**
       * Border Color E
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-e": [{
        "border-e": [s]
      }],
      /**
       * Border Color Top
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-t": [{
        "border-t": [s]
      }],
      /**
       * Border Color Right
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-r": [{
        "border-r": [s]
      }],
      /**
       * Border Color Bottom
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-b": [{
        "border-b": [s]
      }],
      /**
       * Border Color Left
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-l": [{
        "border-l": [s]
      }],
      /**
       * Divide Color
       * @see https://tailwindcss.com/docs/divide-color
       */
      "divide-color": [{
        divide: [s]
      }],
      /**
       * Outline Style
       * @see https://tailwindcss.com/docs/outline-style
       */
      "outline-style": [{
        outline: ["", ...ee()]
      }],
      /**
       * Outline Offset
       * @see https://tailwindcss.com/docs/outline-offset
       */
      "outline-offset": [{
        "outline-offset": [Y, _]
      }],
      /**
       * Outline Width
       * @see https://tailwindcss.com/docs/outline-width
       */
      "outline-w": [{
        outline: [Y, Z]
      }],
      /**
       * Outline Color
       * @see https://tailwindcss.com/docs/outline-color
       */
      "outline-color": [{
        outline: [e]
      }],
      /**
       * Ring Width
       * @see https://tailwindcss.com/docs/ring-width
       */
      "ring-w": [{
        ring: $()
      }],
      /**
       * Ring Width Inset
       * @see https://tailwindcss.com/docs/ring-width
       */
      "ring-w-inset": ["ring-inset"],
      /**
       * Ring Color
       * @see https://tailwindcss.com/docs/ring-color
       */
      "ring-color": [{
        ring: [e]
      }],
      /**
       * Ring Opacity
       * @see https://tailwindcss.com/docs/ring-opacity
       */
      "ring-opacity": [{
        "ring-opacity": [x]
      }],
      /**
       * Ring Offset Width
       * @see https://tailwindcss.com/docs/ring-offset-width
       */
      "ring-offset-w": [{
        "ring-offset": [Y, Z]
      }],
      /**
       * Ring Offset Color
       * @see https://tailwindcss.com/docs/ring-offset-color
       */
      "ring-offset-color": [{
        "ring-offset": [e]
      }],
      // Effects
      /**
       * Box Shadow
       * @see https://tailwindcss.com/docs/box-shadow
       */
      shadow: [{
        shadow: ["", "inner", "none", Q, yn]
      }],
      /**
       * Box Shadow Color
       * @see https://tailwindcss.com/docs/box-shadow-color
       */
      "shadow-color": [{
        shadow: [we]
      }],
      /**
       * Opacity
       * @see https://tailwindcss.com/docs/opacity
       */
      opacity: [{
        opacity: [x]
      }],
      /**
       * Mix Blend Mode
       * @see https://tailwindcss.com/docs/mix-blend-mode
       */
      "mix-blend": [{
        "mix-blend": [...me(), "plus-lighter", "plus-darker"]
      }],
      /**
       * Background Blend Mode
       * @see https://tailwindcss.com/docs/background-blend-mode
       */
      "bg-blend": [{
        "bg-blend": me()
      }],
      // Filters
      /**
       * Filter
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/filter
       */
      filter: [{
        filter: ["", "none"]
      }],
      /**
       * Blur
       * @see https://tailwindcss.com/docs/blur
       */
      blur: [{
        blur: [r]
      }],
      /**
       * Brightness
       * @see https://tailwindcss.com/docs/brightness
       */
      brightness: [{
        brightness: [o]
      }],
      /**
       * Contrast
       * @see https://tailwindcss.com/docs/contrast
       */
      contrast: [{
        contrast: [u]
      }],
      /**
       * Drop Shadow
       * @see https://tailwindcss.com/docs/drop-shadow
       */
      "drop-shadow": [{
        "drop-shadow": ["", "none", Q, _]
      }],
      /**
       * Grayscale
       * @see https://tailwindcss.com/docs/grayscale
       */
      grayscale: [{
        grayscale: [c]
      }],
      /**
       * Hue Rotate
       * @see https://tailwindcss.com/docs/hue-rotate
       */
      "hue-rotate": [{
        "hue-rotate": [f]
      }],
      /**
       * Invert
       * @see https://tailwindcss.com/docs/invert
       */
      invert: [{
        invert: [h]
      }],
      /**
       * Saturate
       * @see https://tailwindcss.com/docs/saturate
       */
      saturate: [{
        saturate: [O]
      }],
      /**
       * Sepia
       * @see https://tailwindcss.com/docs/sepia
       */
      sepia: [{
        sepia: [W]
      }],
      /**
       * Backdrop Filter
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/backdrop-filter
       */
      "backdrop-filter": [{
        "backdrop-filter": ["", "none"]
      }],
      /**
       * Backdrop Blur
       * @see https://tailwindcss.com/docs/backdrop-blur
       */
      "backdrop-blur": [{
        "backdrop-blur": [r]
      }],
      /**
       * Backdrop Brightness
       * @see https://tailwindcss.com/docs/backdrop-brightness
       */
      "backdrop-brightness": [{
        "backdrop-brightness": [o]
      }],
      /**
       * Backdrop Contrast
       * @see https://tailwindcss.com/docs/backdrop-contrast
       */
      "backdrop-contrast": [{
        "backdrop-contrast": [u]
      }],
      /**
       * Backdrop Grayscale
       * @see https://tailwindcss.com/docs/backdrop-grayscale
       */
      "backdrop-grayscale": [{
        "backdrop-grayscale": [c]
      }],
      /**
       * Backdrop Hue Rotate
       * @see https://tailwindcss.com/docs/backdrop-hue-rotate
       */
      "backdrop-hue-rotate": [{
        "backdrop-hue-rotate": [f]
      }],
      /**
       * Backdrop Invert
       * @see https://tailwindcss.com/docs/backdrop-invert
       */
      "backdrop-invert": [{
        "backdrop-invert": [h]
      }],
      /**
       * Backdrop Opacity
       * @see https://tailwindcss.com/docs/backdrop-opacity
       */
      "backdrop-opacity": [{
        "backdrop-opacity": [x]
      }],
      /**
       * Backdrop Saturate
       * @see https://tailwindcss.com/docs/backdrop-saturate
       */
      "backdrop-saturate": [{
        "backdrop-saturate": [O]
      }],
      /**
       * Backdrop Sepia
       * @see https://tailwindcss.com/docs/backdrop-sepia
       */
      "backdrop-sepia": [{
        "backdrop-sepia": [W]
      }],
      // Tables
      /**
       * Border Collapse
       * @see https://tailwindcss.com/docs/border-collapse
       */
      "border-collapse": [{
        border: ["collapse", "separate"]
      }],
      /**
       * Border Spacing
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing": [{
        "border-spacing": [l]
      }],
      /**
       * Border Spacing X
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing-x": [{
        "border-spacing-x": [l]
      }],
      /**
       * Border Spacing Y
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing-y": [{
        "border-spacing-y": [l]
      }],
      /**
       * Table Layout
       * @see https://tailwindcss.com/docs/table-layout
       */
      "table-layout": [{
        table: ["auto", "fixed"]
      }],
      /**
       * Caption Side
       * @see https://tailwindcss.com/docs/caption-side
       */
      caption: [{
        caption: ["top", "bottom"]
      }],
      // Transitions and Animation
      /**
       * Tranisition Property
       * @see https://tailwindcss.com/docs/transition-property
       */
      transition: [{
        transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", _]
      }],
      /**
       * Transition Duration
       * @see https://tailwindcss.com/docs/transition-duration
       */
      duration: [{
        duration: B()
      }],
      /**
       * Transition Timing Function
       * @see https://tailwindcss.com/docs/transition-timing-function
       */
      ease: [{
        ease: ["linear", "in", "out", "in-out", _]
      }],
      /**
       * Transition Delay
       * @see https://tailwindcss.com/docs/transition-delay
       */
      delay: [{
        delay: B()
      }],
      /**
       * Animation
       * @see https://tailwindcss.com/docs/animation
       */
      animate: [{
        animate: ["none", "spin", "ping", "pulse", "bounce", _]
      }],
      // Transforms
      /**
       * Transform
       * @see https://tailwindcss.com/docs/transform
       */
      transform: [{
        transform: ["", "gpu", "none"]
      }],
      /**
       * Scale
       * @see https://tailwindcss.com/docs/scale
       */
      scale: [{
        scale: [M]
      }],
      /**
       * Scale X
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-x": [{
        "scale-x": [M]
      }],
      /**
       * Scale Y
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-y": [{
        "scale-y": [M]
      }],
      /**
       * Rotate
       * @see https://tailwindcss.com/docs/rotate
       */
      rotate: [{
        rotate: [ye, _]
      }],
      /**
       * Translate X
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-x": [{
        "translate-x": [H]
      }],
      /**
       * Translate Y
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-y": [{
        "translate-y": [H]
      }],
      /**
       * Skew X
       * @see https://tailwindcss.com/docs/skew
       */
      "skew-x": [{
        "skew-x": [I]
      }],
      /**
       * Skew Y
       * @see https://tailwindcss.com/docs/skew
       */
      "skew-y": [{
        "skew-y": [I]
      }],
      /**
       * Transform Origin
       * @see https://tailwindcss.com/docs/transform-origin
       */
      "transform-origin": [{
        origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", _]
      }],
      // Interactivity
      /**
       * Accent Color
       * @see https://tailwindcss.com/docs/accent-color
       */
      accent: [{
        accent: ["auto", e]
      }],
      /**
       * Appearance
       * @see https://tailwindcss.com/docs/appearance
       */
      appearance: [{
        appearance: ["none", "auto"]
      }],
      /**
       * Cursor
       * @see https://tailwindcss.com/docs/cursor
       */
      cursor: [{
        cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", _]
      }],
      /**
       * Caret Color
       * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
       */
      "caret-color": [{
        caret: [e]
      }],
      /**
       * Pointer Events
       * @see https://tailwindcss.com/docs/pointer-events
       */
      "pointer-events": [{
        "pointer-events": ["none", "auto"]
      }],
      /**
       * Resize
       * @see https://tailwindcss.com/docs/resize
       */
      resize: [{
        resize: ["none", "y", "x", ""]
      }],
      /**
       * Scroll Behavior
       * @see https://tailwindcss.com/docs/scroll-behavior
       */
      "scroll-behavior": [{
        scroll: ["auto", "smooth"]
      }],
      /**
       * Scroll Margin
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-m": [{
        "scroll-m": j()
      }],
      /**
       * Scroll Margin X
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mx": [{
        "scroll-mx": j()
      }],
      /**
       * Scroll Margin Y
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-my": [{
        "scroll-my": j()
      }],
      /**
       * Scroll Margin Start
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-ms": [{
        "scroll-ms": j()
      }],
      /**
       * Scroll Margin End
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-me": [{
        "scroll-me": j()
      }],
      /**
       * Scroll Margin Top
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mt": [{
        "scroll-mt": j()
      }],
      /**
       * Scroll Margin Right
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mr": [{
        "scroll-mr": j()
      }],
      /**
       * Scroll Margin Bottom
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mb": [{
        "scroll-mb": j()
      }],
      /**
       * Scroll Margin Left
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-ml": [{
        "scroll-ml": j()
      }],
      /**
       * Scroll Padding
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-p": [{
        "scroll-p": j()
      }],
      /**
       * Scroll Padding X
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-px": [{
        "scroll-px": j()
      }],
      /**
       * Scroll Padding Y
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-py": [{
        "scroll-py": j()
      }],
      /**
       * Scroll Padding Start
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-ps": [{
        "scroll-ps": j()
      }],
      /**
       * Scroll Padding End
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pe": [{
        "scroll-pe": j()
      }],
      /**
       * Scroll Padding Top
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pt": [{
        "scroll-pt": j()
      }],
      /**
       * Scroll Padding Right
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pr": [{
        "scroll-pr": j()
      }],
      /**
       * Scroll Padding Bottom
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pb": [{
        "scroll-pb": j()
      }],
      /**
       * Scroll Padding Left
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pl": [{
        "scroll-pl": j()
      }],
      /**
       * Scroll Snap Align
       * @see https://tailwindcss.com/docs/scroll-snap-align
       */
      "snap-align": [{
        snap: ["start", "end", "center", "align-none"]
      }],
      /**
       * Scroll Snap Stop
       * @see https://tailwindcss.com/docs/scroll-snap-stop
       */
      "snap-stop": [{
        snap: ["normal", "always"]
      }],
      /**
       * Scroll Snap Type
       * @see https://tailwindcss.com/docs/scroll-snap-type
       */
      "snap-type": [{
        snap: ["none", "x", "y", "both"]
      }],
      /**
       * Scroll Snap Type Strictness
       * @see https://tailwindcss.com/docs/scroll-snap-type
       */
      "snap-strictness": [{
        snap: ["mandatory", "proximity"]
      }],
      /**
       * Touch Action
       * @see https://tailwindcss.com/docs/touch-action
       */
      touch: [{
        touch: ["auto", "none", "manipulation"]
      }],
      /**
       * Touch Action X
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-x": [{
        "touch-pan": ["x", "left", "right"]
      }],
      /**
       * Touch Action Y
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-y": [{
        "touch-pan": ["y", "up", "down"]
      }],
      /**
       * Touch Action Pinch Zoom
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-pz": ["touch-pinch-zoom"],
      /**
       * User Select
       * @see https://tailwindcss.com/docs/user-select
       */
      select: [{
        select: ["none", "text", "all", "auto"]
      }],
      /**
       * Will Change
       * @see https://tailwindcss.com/docs/will-change
       */
      "will-change": [{
        "will-change": ["auto", "scroll", "contents", "transform", _]
      }],
      // SVG
      /**
       * Fill
       * @see https://tailwindcss.com/docs/fill
       */
      fill: [{
        fill: [e, "none"]
      }],
      /**
       * Stroke Width
       * @see https://tailwindcss.com/docs/stroke-width
       */
      "stroke-w": [{
        stroke: [Y, Z, Be]
      }],
      /**
       * Stroke
       * @see https://tailwindcss.com/docs/stroke
       */
      stroke: [{
        stroke: [e, "none"]
      }],
      // Accessibility
      /**
       * Screen Readers
       * @see https://tailwindcss.com/docs/screen-readers
       */
      sr: ["sr-only", "not-sr-only"],
      /**
       * Forced Color Adjust
       * @see https://tailwindcss.com/docs/forced-color-adjust
       */
      "forced-color-adjust": [{
        "forced-color-adjust": ["auto", "none"]
      }]
    },
    conflictingClassGroups: {
      overflow: ["overflow-x", "overflow-y"],
      overscroll: ["overscroll-x", "overscroll-y"],
      inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
      "inset-x": ["right", "left"],
      "inset-y": ["top", "bottom"],
      flex: ["basis", "grow", "shrink"],
      gap: ["gap-x", "gap-y"],
      p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
      px: ["pr", "pl"],
      py: ["pt", "pb"],
      m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
      mx: ["mr", "ml"],
      my: ["mt", "mb"],
      size: ["w", "h"],
      "font-size": ["leading"],
      "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
      "fvn-ordinal": ["fvn-normal"],
      "fvn-slashed-zero": ["fvn-normal"],
      "fvn-figure": ["fvn-normal"],
      "fvn-spacing": ["fvn-normal"],
      "fvn-fraction": ["fvn-normal"],
      "line-clamp": ["display", "overflow"],
      rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
      "rounded-s": ["rounded-ss", "rounded-es"],
      "rounded-e": ["rounded-se", "rounded-ee"],
      "rounded-t": ["rounded-tl", "rounded-tr"],
      "rounded-r": ["rounded-tr", "rounded-br"],
      "rounded-b": ["rounded-br", "rounded-bl"],
      "rounded-l": ["rounded-tl", "rounded-bl"],
      "border-spacing": ["border-spacing-x", "border-spacing-y"],
      "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
      "border-w-x": ["border-w-r", "border-w-l"],
      "border-w-y": ["border-w-t", "border-w-b"],
      "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
      "border-color-x": ["border-color-r", "border-color-l"],
      "border-color-y": ["border-color-t", "border-color-b"],
      "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
      "scroll-mx": ["scroll-mr", "scroll-ml"],
      "scroll-my": ["scroll-mt", "scroll-mb"],
      "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
      "scroll-px": ["scroll-pr", "scroll-pl"],
      "scroll-py": ["scroll-pt", "scroll-pb"],
      touch: ["touch-x", "touch-y", "touch-pz"],
      "touch-x": ["touch"],
      "touch-y": ["touch"],
      "touch-pz": ["touch"]
    },
    conflictingClassGroupModifiers: {
      "font-size": ["leading"]
    }
  };
}, _n = /* @__PURE__ */ on(Sn);
function q(...e) {
  return _n(Ur(e));
}
const Rn = $t(
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
        destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
        outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
        secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline"
      },
      size: {
        default: "h-9 px-4 py-2",
        sm: "h-8 rounded-md px-3 text-xs",
        lg: "h-10 rounded-md px-8",
        icon: "h-9 w-9"
      }
    },
    defaultVariants: {
      variant: "default",
      size: "default"
    }
  }
), K = F.forwardRef(
  ({ className: e, variant: t, size: r, asChild: o = !1, ...s }, a) => {
    const l = o ? Gr : "button";
    return /* @__PURE__ */ E.jsx(
      l,
      {
        className: q(Rn({ variant: t, size: r, className: e })),
        ref: a,
        ...s
      }
    );
  }
);
K.displayName = "Button";
/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
const Jr = Symbol("Comlink.proxy"), Cn = Symbol("Comlink.endpoint"), On = Symbol("Comlink.releaseProxy"), Ue = Symbol("Comlink.finalizer"), Pe = Symbol("Comlink.thrown"), Xr = (e) => typeof e == "object" && e !== null || typeof e == "function", kn = {
  canHandle: (e) => Xr(e) && e[Jr],
  serialize(e) {
    const { port1: t, port2: r } = new MessageChannel();
    return Qr(e, t), [r, [r]];
  },
  deserialize(e) {
    return e.start(), rt(e);
  }
}, jn = {
  canHandle: (e) => Xr(e) && Pe in e,
  serialize({ value: e }) {
    let t;
    return e instanceof Error ? t = {
      isError: !0,
      value: {
        message: e.message,
        name: e.name,
        stack: e.stack
      }
    } : t = { isError: !1, value: e }, [t, []];
  },
  deserialize(e) {
    throw e.isError ? Object.assign(new Error(e.value.message), e.value) : e.value;
  }
}, Zr = /* @__PURE__ */ new Map([
  ["proxy", kn],
  ["throw", jn]
]);
function Pn(e, t) {
  for (const r of e)
    if (t === r || r === "*" || r instanceof RegExp && r.test(t))
      return !0;
  return !1;
}
function Qr(e, t = globalThis, r = ["*"]) {
  t.addEventListener("message", function o(s) {
    if (!s || !s.data)
      return;
    if (!Pn(r, s.origin)) {
      console.warn(`Invalid origin '${s.origin}' for comlink proxy`);
      return;
    }
    const { id: a, type: l, path: i } = Object.assign({ path: [] }, s.data), u = (s.data.argumentList || []).map(te);
    let c;
    try {
      const f = i.slice(0, -1).reduce((g, v) => g[v], e), h = i.reduce((g, v) => g[v], e);
      switch (l) {
        case "GET":
          c = h;
          break;
        case "SET":
          f[i.slice(-1)[0]] = te(s.data.value), c = !0;
          break;
        case "APPLY":
          c = h.apply(f, u);
          break;
        case "CONSTRUCT":
          {
            const g = new h(...u);
            c = Dn(g);
          }
          break;
        case "ENDPOINT":
          {
            const { port1: g, port2: v } = new MessageChannel();
            Qr(e, v), c = ot(g, [g]);
          }
          break;
        case "RELEASE":
          c = void 0;
          break;
        default:
          return;
      }
    } catch (f) {
      c = { value: f, [Pe]: 0 };
    }
    Promise.resolve(c).catch((f) => ({ value: f, [Pe]: 0 })).then((f) => {
      const [h, g] = Ie(f);
      t.postMessage(Object.assign(Object.assign({}, h), { id: a }), g), l === "RELEASE" && (t.removeEventListener("message", o), et(t), Ue in e && typeof e[Ue] == "function" && e[Ue]());
    }).catch((f) => {
      const [h, g] = Ie({
        value: new TypeError("Unserializable return value"),
        [Pe]: 0
      });
      t.postMessage(Object.assign(Object.assign({}, h), { id: a }), g);
    });
  }), t.start && t.start();
}
function Tn(e) {
  return e.constructor.name === "MessagePort";
}
function et(e) {
  Tn(e) && e.close();
}
function rt(e, t) {
  const r = /* @__PURE__ */ new Map();
  return e.addEventListener("message", function(s) {
    const { data: a } = s;
    if (!a || !a.id)
      return;
    const l = r.get(a.id);
    if (l)
      try {
        l(a);
      } finally {
        r.delete(a.id);
      }
  }), er(e, r, [], t);
}
function Oe(e) {
  if (e)
    throw new Error("Proxy has been released and is not useable");
}
function tt(e) {
  return ce(e, /* @__PURE__ */ new Map(), {
    type: "RELEASE"
  }).then(() => {
    et(e);
  });
}
const Te = /* @__PURE__ */ new WeakMap(), Ae = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => {
  const t = (Te.get(e) || 0) - 1;
  Te.set(e, t), t === 0 && tt(e);
});
function An(e, t) {
  const r = (Te.get(t) || 0) + 1;
  Te.set(t, r), Ae && Ae.register(e, t, e);
}
function In(e) {
  Ae && Ae.unregister(e);
}
function er(e, t, r = [], o = function() {
}) {
  let s = !1;
  const a = new Proxy(o, {
    get(l, i) {
      if (Oe(s), i === On)
        return () => {
          In(a), tt(e), t.clear(), s = !0;
        };
      if (i === "then") {
        if (r.length === 0)
          return { then: () => a };
        const u = ce(e, t, {
          type: "GET",
          path: r.map((c) => c.toString())
        }).then(te);
        return u.then.bind(u);
      }
      return er(e, t, [...r, i]);
    },
    set(l, i, u) {
      Oe(s);
      const [c, f] = Ie(u);
      return ce(e, t, {
        type: "SET",
        path: [...r, i].map((h) => h.toString()),
        value: c
      }, f).then(te);
    },
    apply(l, i, u) {
      Oe(s);
      const c = r[r.length - 1];
      if (c === Cn)
        return ce(e, t, {
          type: "ENDPOINT"
        }).then(te);
      if (c === "bind")
        return er(e, t, r.slice(0, -1));
      const [f, h] = Pr(u);
      return ce(e, t, {
        type: "APPLY",
        path: r.map((g) => g.toString()),
        argumentList: f
      }, h).then(te);
    },
    construct(l, i) {
      Oe(s);
      const [u, c] = Pr(i);
      return ce(e, t, {
        type: "CONSTRUCT",
        path: r.map((f) => f.toString()),
        argumentList: u
      }, c).then(te);
    }
  });
  return An(a, e), a;
}
function Mn(e) {
  return Array.prototype.concat.apply([], e);
}
function Pr(e) {
  const t = e.map(Ie);
  return [t.map((r) => r[0]), Mn(t.map((r) => r[1]))];
}
const nt = /* @__PURE__ */ new WeakMap();
function ot(e, t) {
  return nt.set(e, t), e;
}
function Dn(e) {
  return Object.assign(e, { [Jr]: !0 });
}
function Ie(e) {
  for (const [t, r] of Zr)
    if (r.canHandle(e)) {
      const [o, s] = r.serialize(e);
      return [
        {
          type: "HANDLER",
          name: t,
          value: o
        },
        s
      ];
    }
  return [
    {
      type: "RAW",
      value: e
    },
    nt.get(e) || []
  ];
}
function te(e) {
  switch (e.type) {
    case "HANDLER":
      return Zr.get(e.name).deserialize(e.value);
    case "RAW":
      return e.value;
  }
}
function ce(e, t, r, o) {
  return new Promise((s) => {
    const a = zn();
    t.set(a, s), e.start && e.start(), e.postMessage(Object.assign({ id: a }, r), o);
  });
}
function zn() {
  return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
}
var $e = Wn(1, 2, 3, 4);
function Ln(e) {
  return {
    Procedural: He(4, $e),
    ProceduralPersonal: Uint8Array.from([
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      ...He(1, $e)
    ]),
    ProceduralAccount: He(32, $e)
  }[e];
}
function Me(e) {
  return Array.from(e).join(",");
}
function le(e, t = 16) {
  const r = Ln(e);
  return Fn(r, { size: t });
}
function Nn(e, t = {
  minBits: 1,
  maxBits: 3
}) {
  if (t.minBits > t.maxBits)
    throw new Error("minBits must be less than maxBits");
  if (t.minBits < 1)
    throw new Error("minBits must be greater than 0");
  if (t.maxBits < 1)
    throw new Error("maxBits must be greater than 0");
  const r = Array.from(e);
  if (e.length === 8) {
    const a = r.slice(-4);
    Tr(
      Math.max(Math.floor(Math.random() * t.maxBits), t.minBits)
    )(a), r.splice(-4, 4, ...a);
  } else
    Tr(Math.floor(Math.random() * 3) + 1)(r);
  return r;
}
function Fn(e, t) {
  const r = /* @__PURE__ */ new Map();
  for (r.set(Me(e), Array.from(e)); r.size < t.size; ) {
    const o = Nn(e), s = Me(o);
    r.has(s) || r.set(s, o);
  }
  return [...r.values()];
}
function He(e, t) {
  const r = new Uint8Array(e);
  for (let o = 0; o < e; o++)
    r[o] = Math.floor(t() * 255);
  return r;
}
function Wn(e, t, r, o) {
  return function() {
    e |= 0, t |= 0, r |= 0, o |= 0;
    const s = (e + t | 0) + o | 0;
    return o = o + 1 | 0, e = t ^ t >>> 9, t = r + (r << 3) | 0, r = r << 21 | r >>> 11, r = r + s | 0, (s >>> 0) / 4294967296;
  };
}
function Tr(e) {
  return (t) => {
    for (let r = 0; r < e; ++r) {
      const o = 2 ** Math.floor(Math.random() * 8), s = Math.floor(Math.random() * 4);
      t[s] ^= o;
    }
  };
}
const Vn = {}, Ar = (e) => {
  let t;
  const r = /* @__PURE__ */ new Set(), o = (f, h) => {
    const g = typeof f == "function" ? f(t) : f;
    if (!Object.is(g, t)) {
      const v = t;
      t = h ?? (typeof g != "object" || g === null) ? g : Object.assign({}, t, g), r.forEach((w) => w(t, v));
    }
  }, s = () => t, u = { setState: o, getState: s, getInitialState: () => c, subscribe: (f) => (r.add(f), () => r.delete(f)), destroy: () => {
    (Vn ? "production" : void 0) !== "production" && console.warn(
      "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
    ), r.clear();
  } }, c = t = e(o, s, u);
  return u;
}, Gn = (e) => e ? Ar(e) : Ar;
var ke = { exports: {} }, Ye = {}, je = { exports: {} }, Ke = {};
/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Ir;
function Bn() {
  if (Ir) return Ke;
  Ir = 1;
  var e = ne;
  function t(h, g) {
    return h === g && (h !== 0 || 1 / h === 1 / g) || h !== h && g !== g;
  }
  var r = typeof Object.is == "function" ? Object.is : t, o = e.useState, s = e.useEffect, a = e.useLayoutEffect, l = e.useDebugValue;
  function i(h, g) {
    var v = g(), w = o({ inst: { value: v, getSnapshot: g } }), p = w[0].inst, m = w[1];
    return a(
      function() {
        p.value = v, p.getSnapshot = g, u(p) && m({ inst: p });
      },
      [h, v, g]
    ), s(
      function() {
        return u(p) && m({ inst: p }), h(function() {
          u(p) && m({ inst: p });
        });
      },
      [h]
    ), l(v), v;
  }
  function u(h) {
    var g = h.getSnapshot;
    h = h.value;
    try {
      var v = g();
      return !r(h, v);
    } catch {
      return !0;
    }
  }
  function c(h, g) {
    return g();
  }
  var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? c : i;
  return Ke.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Ke;
}
var qe = {};
/**
 * @license React
 * use-sync-external-store-shim.development.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Mr;
function Un() {
  return Mr || (Mr = 1, process.env.NODE_ENV !== "production" && function() {
    function e(v, w) {
      return v === w && (v !== 0 || 1 / v === 1 / w) || v !== v && w !== w;
    }
    function t(v, w) {
      f || s.startTransition === void 0 || (f = !0, console.error(
        "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
      ));
      var p = w();
      if (!h) {
        var m = w();
        a(p, m) || (console.error(
          "The result of getSnapshot should be cached to avoid an infinite loop"
        ), h = !0);
      }
      m = l({
        inst: { value: p, getSnapshot: w }
      });
      var x = m[0].inst, b = m[1];
      return u(
        function() {
          x.value = p, x.getSnapshot = w, r(x) && b({ inst: x });
        },
        [v, p, w]
      ), i(
        function() {
          return r(x) && b({ inst: x }), v(function() {
            r(x) && b({ inst: x });
          });
        },
        [v]
      ), c(p), p;
    }
    function r(v) {
      var w = v.getSnapshot;
      v = v.value;
      try {
        var p = w();
        return !a(v, p);
      } catch {
        return !0;
      }
    }
    function o(v, w) {
      return w();
    }
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
    var s = ne, a = typeof Object.is == "function" ? Object.is : e, l = s.useState, i = s.useEffect, u = s.useLayoutEffect, c = s.useDebugValue, f = !1, h = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? o : t;
    qe.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  }()), qe;
}
var Dr;
function st() {
  return Dr || (Dr = 1, process.env.NODE_ENV === "production" ? je.exports = Bn() : je.exports = Un()), je.exports;
}
/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var zr;
function $n() {
  if (zr) return Ye;
  zr = 1;
  var e = ne, t = st();
  function r(c, f) {
    return c === f && (c !== 0 || 1 / c === 1 / f) || c !== c && f !== f;
  }
  var o = typeof Object.is == "function" ? Object.is : r, s = t.useSyncExternalStore, a = e.useRef, l = e.useEffect, i = e.useMemo, u = e.useDebugValue;
  return Ye.useSyncExternalStoreWithSelector = function(c, f, h, g, v) {
    var w = a(null);
    if (w.current === null) {
      var p = { hasValue: !1, value: null };
      w.current = p;
    } else p = w.current;
    w = i(
      function() {
        function x(I) {
          if (!b) {
            if (b = !0, O = I, I = g(I), v !== void 0 && p.hasValue) {
              var L = p.value;
              if (v(L, I))
                return M = L;
            }
            return M = I;
          }
          if (L = M, o(O, I)) return L;
          var H = g(I);
          return v !== void 0 && v(L, H) ? (O = I, L) : (O = I, M = H);
        }
        var b = !1, O, M, W = h === void 0 ? null : h;
        return [
          function() {
            return x(f());
          },
          W === null ? void 0 : function() {
            return x(W());
          }
        ];
      },
      [f, h, g, v]
    );
    var m = s(c, w[0], w[1]);
    return l(
      function() {
        p.hasValue = !0, p.value = m;
      },
      [m]
    ), u(m), m;
  }, Ye;
}
var Je = {};
/**
 * @license React
 * use-sync-external-store-shim/with-selector.development.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Lr;
function Hn() {
  return Lr || (Lr = 1, process.env.NODE_ENV !== "production" && function() {
    function e(c, f) {
      return c === f && (c !== 0 || 1 / c === 1 / f) || c !== c && f !== f;
    }
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
    var t = ne, r = st(), o = typeof Object.is == "function" ? Object.is : e, s = r.useSyncExternalStore, a = t.useRef, l = t.useEffect, i = t.useMemo, u = t.useDebugValue;
    Je.useSyncExternalStoreWithSelector = function(c, f, h, g, v) {
      var w = a(null);
      if (w.current === null) {
        var p = { hasValue: !1, value: null };
        w.current = p;
      } else p = w.current;
      w = i(
        function() {
          function x(I) {
            if (!b) {
              if (b = !0, O = I, I = g(I), v !== void 0 && p.hasValue) {
                var L = p.value;
                if (v(L, I))
                  return M = L;
              }
              return M = I;
            }
            if (L = M, o(O, I))
              return L;
            var H = g(I);
            return v !== void 0 && v(L, H) ? (O = I, L) : (O = I, M = H);
          }
          var b = !1, O, M, W = h === void 0 ? null : h;
          return [
            function() {
              return x(f());
            },
            W === null ? void 0 : function() {
              return x(W());
            }
          ];
        },
        [f, h, g, v]
      );
      var m = s(c, w[0], w[1]);
      return l(
        function() {
          p.hasValue = !0, p.value = m;
        },
        [m]
      ), u(m), m;
    }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  }()), Je;
}
var Nr;
function Yn() {
  return Nr || (Nr = 1, process.env.NODE_ENV === "production" ? ke.exports = $n() : ke.exports = Hn()), ke.exports;
}
var Kn = Yn();
const qn = /* @__PURE__ */ zt(Kn), at = {}, { useDebugValue: Jn } = ne, { useSyncExternalStoreWithSelector: Xn } = qn;
let Fr = !1;
const Zn = (e) => e;
function Qn(e, t = Zn, r) {
  (at ? "production" : void 0) !== "production" && r && !Fr && (console.warn(
    "[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
  ), Fr = !0);
  const o = Xn(
    e.subscribe,
    e.getState,
    e.getServerState || e.getInitialState,
    t,
    r
  );
  return Jn(o), o;
}
const eo = (e) => {
  (at ? "production" : void 0) !== "production" && typeof e != "function" && console.warn(
    "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
  );
  const t = typeof e == "function" ? Gn(e) : e, r = (o, s) => Qn(t, o, s);
  return Object.assign(r, t), r;
}, ro = (e) => eo, to = {};
function no(e, t) {
  let r;
  try {
    r = e();
  } catch {
    return;
  }
  return {
    getItem: (s) => {
      var a;
      const l = (u) => u === null ? null : JSON.parse(u, void 0), i = (a = r.getItem(s)) != null ? a : null;
      return i instanceof Promise ? i.then(l) : l(i);
    },
    setItem: (s, a) => r.setItem(
      s,
      JSON.stringify(a, void 0)
    ),
    removeItem: (s) => r.removeItem(s)
  };
}
const xe = (e) => (t) => {
  try {
    const r = e(t);
    return r instanceof Promise ? r : {
      then(o) {
        return xe(o)(r);
      },
      catch(o) {
        return this;
      }
    };
  } catch (r) {
    return {
      then(o) {
        return this;
      },
      catch(o) {
        return xe(o)(r);
      }
    };
  }
}, oo = (e, t) => (r, o, s) => {
  let a = {
    getStorage: () => localStorage,
    serialize: JSON.stringify,
    deserialize: JSON.parse,
    partialize: (m) => m,
    version: 0,
    merge: (m, x) => ({
      ...x,
      ...m
    }),
    ...t
  }, l = !1;
  const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
  let c;
  try {
    c = a.getStorage();
  } catch {
  }
  if (!c)
    return e(
      (...m) => {
        console.warn(
          `[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`
        ), r(...m);
      },
      o,
      s
    );
  const f = xe(a.serialize), h = () => {
    const m = a.partialize({ ...o() });
    let x;
    const b = f({ state: m, version: a.version }).then(
      (O) => c.setItem(a.name, O)
    ).catch((O) => {
      x = O;
    });
    if (x)
      throw x;
    return b;
  }, g = s.setState;
  s.setState = (m, x) => {
    g(m, x), h();
  };
  const v = e(
    (...m) => {
      r(...m), h();
    },
    o,
    s
  );
  let w;
  const p = () => {
    var m;
    if (!c) return;
    l = !1, i.forEach((b) => b(o()));
    const x = ((m = a.onRehydrateStorage) == null ? void 0 : m.call(a, o())) || void 0;
    return xe(c.getItem.bind(c))(a.name).then((b) => {
      if (b)
        return a.deserialize(b);
    }).then((b) => {
      if (b)
        if (typeof b.version == "number" && b.version !== a.version) {
          if (a.migrate)
            return a.migrate(
              b.state,
              b.version
            );
          console.error(
            "State loaded from storage couldn't be migrated since no migrate function was provided"
          );
        } else
          return b.state;
    }).then((b) => {
      var O;
      return w = a.merge(
        b,
        (O = o()) != null ? O : v
      ), r(w, !0), h();
    }).then(() => {
      x == null || x(w, void 0), l = !0, u.forEach((b) => b(w));
    }).catch((b) => {
      x == null || x(void 0, b);
    });
  };
  return s.persist = {
    setOptions: (m) => {
      a = {
        ...a,
        ...m
      }, m.getStorage && (c = m.getStorage());
    },
    clearStorage: () => {
      c == null || c.removeItem(a.name);
    },
    getOptions: () => a,
    rehydrate: () => p(),
    hasHydrated: () => l,
    onHydrate: (m) => (i.add(m), () => {
      i.delete(m);
    }),
    onFinishHydration: (m) => (u.add(m), () => {
      u.delete(m);
    })
  }, p(), w || v;
}, so = (e, t) => (r, o, s) => {
  let a = {
    storage: no(() => localStorage),
    partialize: (p) => p,
    version: 0,
    merge: (p, m) => ({
      ...m,
      ...p
    }),
    ...t
  }, l = !1;
  const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
  let c = a.storage;
  if (!c)
    return e(
      (...p) => {
        console.warn(
          `[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`
        ), r(...p);
      },
      o,
      s
    );
  const f = () => {
    const p = a.partialize({ ...o() });
    return c.setItem(a.name, {
      state: p,
      version: a.version
    });
  }, h = s.setState;
  s.setState = (p, m) => {
    h(p, m), f();
  };
  const g = e(
    (...p) => {
      r(...p), f();
    },
    o,
    s
  );
  s.getInitialState = () => g;
  let v;
  const w = () => {
    var p, m;
    if (!c) return;
    l = !1, i.forEach((b) => {
      var O;
      return b((O = o()) != null ? O : g);
    });
    const x = ((m = a.onRehydrateStorage) == null ? void 0 : m.call(a, (p = o()) != null ? p : g)) || void 0;
    return xe(c.getItem.bind(c))(a.name).then((b) => {
      if (b)
        if (typeof b.version == "number" && b.version !== a.version) {
          if (a.migrate)
            return [
              !0,
              a.migrate(
                b.state,
                b.version
              )
            ];
          console.error(
            "State loaded from storage couldn't be migrated since no migrate function was provided"
          );
        } else
          return [!1, b.state];
      return [!1, void 0];
    }).then((b) => {
      var O;
      const [M, W] = b;
      if (v = a.merge(
        W,
        (O = o()) != null ? O : g
      ), r(v, !0), M)
        return f();
    }).then(() => {
      x == null || x(v, void 0), v = o(), l = !0, u.forEach((b) => b(v));
    }).catch((b) => {
      x == null || x(void 0, b);
    });
  };
  return s.persist = {
    setOptions: (p) => {
      a = {
        ...a,
        ...p
      }, p.storage && (c = p.storage);
    },
    clearStorage: () => {
      c == null || c.removeItem(a.name);
    },
    getOptions: () => a,
    rehydrate: () => w(),
    hasHydrated: () => l,
    onHydrate: (p) => (i.add(p), () => {
      i.delete(p);
    }),
    onFinishHydration: (p) => (u.add(p), () => {
      u.delete(p);
    })
  }, a.skipHydration || w(), v || g;
}, ao = (e, t) => "getStorage" in t || "serialize" in t || "deserialize" in t ? ((to ? "production" : void 0) !== "production" && console.warn(
  "[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."
), oo(e, t)) : so(e, t), io = ao, Xe = [
  "horizontal",
  "vertical",
  "grid",
  "single",
  "families"
], T = ro()(
  io(
    (e, t) => {
      const r = Array(8).fill(1), o = {
        Procedural: r.map(() => le("Procedural")),
        ProceduralPersonal: r.map(
          () => le("ProceduralPersonal")
        ),
        ProceduralAccount: r.map(() => le("ProceduralAccount"))
      };
      return {
        worker: null,
        schema: null,
        schemas: [],
        showControls: !0,
        seeds: o,
        showDetails: !1,
        focus: [0, 0],
        familyIndex: 0,
        focusIndex: 0,
        toggleDetails() {
          e({ showDetails: !t().showDetails });
        },
        setFocus(s, a) {
          e({ familyIndex: s, focusIndex: a });
        },
        refreshSeeds() {
          e({
            seeds: {
              Procedural: r.map(() => le("Procedural")),
              ProceduralPersonal: r.map(
                () => le("ProceduralPersonal")
              ),
              ProceduralAccount: r.map(
                () => le("ProceduralAccount")
              )
            }
          });
        },
        toggleControls() {
          e({ showControls: !t().showControls });
        },
        async init(s) {
          const a = rt(s), l = await a.init();
          if (l.length === 0) throw new Error("No schemas found");
          const i = t().schema;
          i && l.find((u) => u.name === i.name) ? e({ schema: i }) : e({ schema: l[0] }), e({
            worker: a,
            schemas: l
          });
        },
        setSchema(s) {
          const a = t().schemas.find((l) => l.name === s);
          e({ schema: a });
        },
        mode: "horizontal",
        cycleMode() {
          const s = t().mode, l = (Xe.indexOf(s) + 1) % Xe.length;
          e({ mode: Xe[l] });
        }
      };
    },
    {
      name: "entropretty-editor-state",
      partialize: (e) => ({
        mode: e.mode,
        showControls: e.showControls,
        schema: e.schema,
        showDetails: e.showDetails,
        focusIndex: e.focusIndex,
        familyIndex: e.familyIndex
      })
    }
  )
), lo = () => {
  const e = T((u) => u.cycleMode), t = T((u) => u.mode), r = T((u) => u.schema), o = T((u) => u.showControls), s = T((u) => u.toggleControls), a = T((u) => u.refreshSeeds), l = T((u) => u.toggleDetails), i = Wr(() => {
    const u = document.getElementById("focus-canvas");
    if (!u) return;
    const c = document.createElement("a");
    c.href = u.toDataURL("image/png"), c.download = ((r == null ? void 0 : r.name) || "entropretty") + ".png", c.click();
  }, [r == null ? void 0 : r.name]);
  return nr(() => {
    const u = (c) => {
      c.key === "q" && e(), c.key === "w" && s(), c.key === "r" && location.reload(), c.key === "d" && l();
    };
    return document.addEventListener("keydown", u), () => {
      document.removeEventListener("keydown", u);
    };
  }, [e, s, l]), r ? /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
    /* @__PURE__ */ E.jsxs(
      "nav",
      {
        className: q(
          "bg-background/95 supports-[backdrop-filter]:bg-background/30 fixed bottom-4 left-4 flex flex-row items-center justify-center overflow-hidden rounded-md border text-sm backdrop-blur transition-all duration-300 ease-in-out",
          { hidden: !o }
        ),
        children: [
          /* @__PURE__ */ E.jsx(
            "div",
            {
              className: q(
                "flex h-10 w-fit flex-row items-center justify-center rounded-r-md px-4",
                {
                  "bg-yellow-400": r.kind === "Procedural",
                  "bg-blue-400": r.kind === "ProceduralAccount",
                  "bg-red-400": r.kind === "ProceduralPersonal"
                }
              ),
              children: r == null ? void 0 : r.kind
            }
          ),
          /* @__PURE__ */ E.jsxs("div", { className: "flex flex-row px-[2px]", children: [
            /* @__PURE__ */ E.jsx(K, { variant: "ghost", className: "w-36", onClick: e, children: `(q) ${t}` }),
            /* @__PURE__ */ E.jsx(K, { variant: "ghost", onClick: s, children: "(w) hide" }),
            /* @__PURE__ */ E.jsx(K, { variant: "ghost", children: "(r) reload" }),
            /* @__PURE__ */ E.jsx(K, { variant: "ghost", onMouseDown: l, children: "(d) details" }),
            /* @__PURE__ */ E.jsx(K, { variant: "ghost", onMouseDown: a, children: "new seeds" }),
            /* @__PURE__ */ E.jsx(
              K,
              {
                disabled: ["families", "grid"].includes(t),
                variant: "ghost",
                onMouseDown: i,
                children: "download"
              }
            )
          ] })
        ]
      }
    ),
    !o && /* @__PURE__ */ E.jsx(
      K,
      {
        variant: "ghost",
        onMouseDown: s,
        className: "text-muted-foreground fixed bottom-4 left-4 h-10 text-sm",
        children: "show"
      }
    )
  ] }) : null;
}, rr = ({
  seed: e,
  schema: t,
  size: r,
  scale: o = 2,
  id: s
}) => {
  const [a, l] = Mt(!1), i = Dt(null), u = T((f) => f.worker), c = Vr(() => r * o, [r, o]);
  return nr(() => {
    i.current !== null && u.drawTransfer(t, e, c).then((f) => {
      const h = i.current.getContext("2d");
      h.clearRect(0, 0, c, c), h.drawImage(f, 0, 0, c, c), l(!0);
    });
  }, [e, t, r, u, c]), /* @__PURE__ */ E.jsx(
    "canvas",
    {
      id: s,
      className: q("cursor-pointer", { hidden: !a }),
      ref: i,
      width: c,
      height: c,
      style: { width: r, height: r }
    }
  );
}, tr = ({
  familyIndex: e,
  seedIndex: t,
  seed: r
}) => {
  const [o, s] = T((c) => [
    c.familyIndex,
    c.focusIndex
  ]), a = T((c) => c.schema), l = T((c) => c.setFocus), i = T((c) => c.showDetails), u = Wr(() => {
    l(e, t);
  }, [e, t, l]);
  return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
    i && /* @__PURE__ */ E.jsxs("div", { className: "bg-background/50 absolute bottom-0 left-0 flex h-full w-full whitespace-normal border text-[9px]", children: [
      "[",
      r.join(", "),
      "]"
    ] }),
    i && /* @__PURE__ */ E.jsx("div", { className: "absolute left-0 top-0 flex h-full w-full items-center justify-center", children: "×" }),
    /* @__PURE__ */ E.jsx(
      "div",
      {
        title: r.join(","),
        className: q(
          "absolute bottom-0 h-full w-full cursor-pointer border-b-4",
          {
            "opacity-0": e !== o || t !== s,
            "border-b-yellow-400": (a == null ? void 0 : a.kind) === "Procedural",
            "border-b-blue-400": (a == null ? void 0 : a.kind) === "ProceduralAccount",
            "border-b-red-400": (a == null ? void 0 : a.kind) === "ProceduralPersonal"
          }
        ),
        onClick: u
      }
    )
  ] });
}, co = ({ familyIndex: e }) => {
  const [t] = T((o) => [o.familyIndex]), r = T((o) => o.schema);
  return /* @__PURE__ */ E.jsx(E.Fragment, { children: /* @__PURE__ */ E.jsx(
    "div",
    {
      className: q(
        "pointer-events-none absolute h-full w-full rounded-md border",
        {
          "opacity-0": e !== t,
          "border-yellow-400": (r == null ? void 0 : r.kind) === "Procedural",
          "border-blue-400": (r == null ? void 0 : r.kind) === "ProceduralAccount",
          "border-red-400": (r == null ? void 0 : r.kind) === "ProceduralPersonal"
        }
      )
    }
  ) });
};
function uo({ schema: e }) {
  const t = T((l) => l.seeds[e.kind]), [r] = T((l) => [l.familyIndex]), o = T((l) => l.mode), [s, a] = Vr(() => {
    const l = window.innerWidth || 1e3, i = window.innerHeight || 1e3, u = {
      horizontal: l / 2,
      vertical: i / 2,
      grid: 0,
      single: i < l ? i : l,
      families: 0
    }[o], c = {
      horizontal: l / 8,
      vertical: i / 8,
      grid: i < l ? i / 4 : l / 4,
      single: 0,
      families: l / 16
    }[o];
    return [u, c];
  }, [o]);
  return /* @__PURE__ */ E.jsxs("div", { className: "flex flex-col", children: [
    t && o === "families" && t.map((l, i) => /* @__PURE__ */ E.jsx("div", { children: /* @__PURE__ */ E.jsxs("div", { className: "grid-cols-16 relative grid", children: [
      l.map((u, c) => /* @__PURE__ */ E.jsxs(
        "div",
        {
          className: "relative overflow-hidden",
          children: [
            /* @__PURE__ */ E.jsx(
              rr,
              {
                schema: e.name,
                seed: u,
                size: a
              }
            ),
            /* @__PURE__ */ E.jsx(
              tr,
              {
                familyIndex: i,
                seedIndex: c,
                seed: u
              }
            )
          ]
        },
        Me(u)
      )),
      /* @__PURE__ */ E.jsx(co, { familyIndex: i })
    ] }) }, l.toString())),
    t && o !== "families" && /* @__PURE__ */ E.jsxs(
      "div",
      {
        className: q("flex items-start justify-start", {
          "flex-row": o === "horizontal",
          "flex-col": o === "vertical"
        }),
        children: [
          /* @__PURE__ */ E.jsx(fo, { schema: e, size: s }),
          o !== "single" && /* @__PURE__ */ E.jsx("div", { className: "grid grid-cols-4", children: t[r].map((l, i) => /* @__PURE__ */ E.jsxs("div", { className: "relative", children: [
            /* @__PURE__ */ E.jsx(
              rr,
              {
                schema: e.name,
                seed: l,
                size: a
              }
            ),
            /* @__PURE__ */ E.jsx(
              tr,
              {
                familyIndex: r,
                seedIndex: i,
                seed: l
              }
            )
          ] }, Me(l))) })
        ]
      }
    )
  ] });
}
function fo({
  schema: e,
  size: t
}) {
  const r = T((a) => a.seeds[e.kind]), [o, s] = T((a) => [
    a.familyIndex,
    a.focusIndex
  ]);
  return /* @__PURE__ */ E.jsxs("div", { className: "relative overflow-hidden", children: [
    /* @__PURE__ */ E.jsx(
      rr,
      {
        id: "focus-canvas",
        schema: e.name,
        seed: r[o][s],
        size: t
      }
    ),
    /* @__PURE__ */ E.jsx(
      tr,
      {
        familyIndex: o,
        seedIndex: s,
        seed: r[o][s]
      }
    )
  ] });
}
const po = () => {
  const e = T((s) => s.schemas), t = T((s) => s.schema), r = T((s) => s.setSchema), o = T((s) => s.showControls);
  return /* @__PURE__ */ E.jsx(
    "aside",
    {
      className: q(
        "bg-background/95 supports-[backdrop-filter]:bg-background/30 fixed left-4 top-4 flex h-10 flex-row items-center justify-center rounded-md border backdrop-blur transition-all duration-300 ease-in-out",
        { hidden: !o || e.length <= 1 }
      ),
      children: e.map((s) => /* @__PURE__ */ E.jsx(
        K,
        {
          className: q({
            underline: (t == null ? void 0 : t.name) === s.name
          }),
          variant: (t == null ? void 0 : t.name) === s.name ? "link" : "ghost",
          onClick: () => r(s.name),
          children: `${s.name}`
        },
        s.name
      ))
    }
  );
}, go = ({ worker: e }) => {
  const t = T((s) => s.init), r = T((s) => s.worker), o = T((s) => s.schema);
  return nr(() => {
    t(e);
  }, [t, e]), r ? /* @__PURE__ */ E.jsxs("main", { className: "flex h-screen w-screen flex-col items-center justify-center", children: [
    o && /* @__PURE__ */ E.jsx(uo, { schema: o }),
    /* @__PURE__ */ E.jsx(lo, {}),
    /* @__PURE__ */ E.jsx(po, {})
  ] }) : (console.info("Worker not set"), /* @__PURE__ */ E.jsx("div", { children: "Loading..." }));
}, ho = (e) => {
  const t = /* @__PURE__ */ new Map();
  let r = !1;
  return {
    init: async () => {
      const o = [];
      return await Promise.all(
        Object.values(e).map(async (s) => {
          try {
            const l = (await s()).schema;
            t.set(l.name, l);
            const { draw: i, ...u } = l;
            u.kind === void 0 && (console.warn(
              `Schema kind for '${u.name}' not defined, defaulting to 'Procedural'`
            ), u.kind = "Procedural"), o.push(u);
          } catch (a) {
            console.log({ e: a });
          }
        })
      ), r = !0, Array.from(o).sort((s, a) => s.name.localeCompare(a.name));
    },
    isInitialized: () => r,
    hasSchema: (o) => t.has(o),
    drawTransfer: async (o, s, a) => {
      const l = new OffscreenCanvas(a, a), i = l.getContext("2d");
      if (!i) throw "Unable to get Context from OffscreenCanvas in Worker";
      const u = t.get(o);
      if (u === void 0)
        throw "Schema not loaded, try adding it before drawing";
      i.clearRect(0, 0, l.width, l.height), i.scale(l.width / 100, l.width / 100), i.lineWidth = 1, i.lineCap = "butt", i.lineJoin = "miter", i.strokeStyle = "black", i.fillStyle = "black", i.textAlign = "center", i.textBaseline = "bottom";
      try {
        u.draw(i, s);
      } catch (f) {
        console.error("Error drawing", o), console.info(f);
      }
      const c = l.transferToImageBitmap();
      return ot(c, [c]);
    }
  };
};
export {
  go as EntroprettyEditor,
  ho as createWorker
};