import * as require$$0 from "react";
import require$$0__default, { useEffect } from "react";
const pxToRem = (...e) => e.map((r) => `${r / 16}rem`).join(" "), pxToEm = (...e) => e.map((r) => `${r / 16}em`).join(" ");
function getDefaultExportFromCjs(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var jsxRuntime = { exports: {} }, reactJsxRuntime_production_min = {};
/**
 * @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 hasRequiredReactJsxRuntime_production_min;
function requireReactJsxRuntime_production_min() {
  if (hasRequiredReactJsxRuntime_production_min)
    return reactJsxRuntime_production_min;
  hasRequiredReactJsxRuntime_production_min = 1;
  var e = require$$0__default, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
  function l(u, d, h) {
    var m, y = {}, x = null, w = null;
    h !== void 0 && (x = "" + h), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (w = d.ref);
    for (m in d)
      s.call(d, m) && !i.hasOwnProperty(m) && (y[m] = d[m]);
    if (u && u.defaultProps)
      for (m in d = u.defaultProps, d)
        y[m] === void 0 && (y[m] = d[m]);
    return { $$typeof: r, type: u, key: x, ref: w, props: y, _owner: n.current };
  }
  return reactJsxRuntime_production_min.Fragment = a, reactJsxRuntime_production_min.jsx = l, reactJsxRuntime_production_min.jsxs = l, reactJsxRuntime_production_min;
}
var reactJsxRuntime_development = {};
/**
 * @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 hasRequiredReactJsxRuntime_development;
function requireReactJsxRuntime_development() {
  return hasRequiredReactJsxRuntime_development || (hasRequiredReactJsxRuntime_development = 1, process.env.NODE_ENV !== "production" && function() {
    var e = require$$0__default, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), R = Symbol.iterator, M = "@@iterator";
    function V(t) {
      if (t === null || typeof t != "object")
        return null;
      var o = R && t[R] || t[M];
      return typeof o == "function" ? o : null;
    }
    var T = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    function _(t) {
      {
        for (var o = arguments.length, c = new Array(o > 1 ? o - 1 : 0), f = 1; f < o; f++)
          c[f - 1] = arguments[f];
        N("error", t, c);
      }
    }
    function N(t, o, c) {
      {
        var f = T.ReactDebugCurrentFrame, g = f.getStackAddendum();
        g !== "" && (o += "%s", c = c.concat([g]));
        var b = c.map(function(v) {
          return String(v);
        });
        b.unshift("Warning: " + o), Function.prototype.apply.call(console[t], console, b);
      }
    }
    var ne = !1, pe = !1, j = !1, S = !1, B = !1, U;
    U = Symbol.for("react.module.reference");
    function X(t) {
      return !!(typeof t == "string" || typeof t == "function" || t === s || t === i || B || t === n || t === h || t === m || S || t === w || ne || pe || j || typeof t == "object" && t !== null && (t.$$typeof === x || t.$$typeof === y || t.$$typeof === l || t.$$typeof === u || t.$$typeof === d || // 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.
      t.$$typeof === U || t.getModuleId !== void 0));
    }
    function J(t, o, c) {
      var f = t.displayName;
      if (f)
        return f;
      var g = o.displayName || o.name || "";
      return g !== "" ? c + "(" + g + ")" : c;
    }
    function W(t) {
      return t.displayName || "Context";
    }
    function E(t) {
      if (t == null)
        return null;
      if (typeof t.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
        return t.displayName || t.name || null;
      if (typeof t == "string")
        return t;
      switch (t) {
        case s:
          return "Fragment";
        case a:
          return "Portal";
        case i:
          return "Profiler";
        case n:
          return "StrictMode";
        case h:
          return "Suspense";
        case m:
          return "SuspenseList";
      }
      if (typeof t == "object")
        switch (t.$$typeof) {
          case u:
            var o = t;
            return W(o) + ".Consumer";
          case l:
            var c = t;
            return W(c._context) + ".Provider";
          case d:
            return J(t, t.render, "ForwardRef");
          case y:
            var f = t.displayName || null;
            return f !== null ? f : E(t.type) || "Memo";
          case x: {
            var g = t, b = g._payload, v = g._init;
            try {
              return E(v(b));
            } catch {
              return null;
            }
          }
        }
      return null;
    }
    var P = Object.assign, L = 0, K, z, $, Z, D, A, q;
    function Q() {
    }
    Q.__reactDisabledLog = !0;
    function Ee() {
      {
        if (L === 0) {
          K = console.log, z = console.info, $ = console.warn, Z = console.error, D = console.group, A = console.groupCollapsed, q = console.groupEnd;
          var t = {
            configurable: !0,
            enumerable: !0,
            value: Q,
            writable: !0
          };
          Object.defineProperties(console, {
            info: t,
            log: t,
            warn: t,
            error: t,
            group: t,
            groupCollapsed: t,
            groupEnd: t
          });
        }
        L++;
      }
    }
    function Ce() {
      {
        if (L--, L === 0) {
          var t = {
            configurable: !0,
            enumerable: !0,
            writable: !0
          };
          Object.defineProperties(console, {
            log: P({}, t, {
              value: K
            }),
            info: P({}, t, {
              value: z
            }),
            warn: P({}, t, {
              value: $
            }),
            error: P({}, t, {
              value: Z
            }),
            group: P({}, t, {
              value: D
            }),
            groupCollapsed: P({}, t, {
              value: A
            }),
            groupEnd: P({}, t, {
              value: q
            })
          });
        }
        L < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
      }
    }
    var ie = T.ReactCurrentDispatcher, oe;
    function ee(t, o, c) {
      {
        if (oe === void 0)
          try {
            throw Error();
          } catch (g) {
            var f = g.stack.trim().match(/\n( *(at )?)/);
            oe = f && f[1] || "";
          }
        return `
` + oe + t;
      }
    }
    var le = !1, te;
    {
      var Oe = typeof WeakMap == "function" ? WeakMap : Map;
      te = new Oe();
    }
    function he(t, o) {
      if (!t || le)
        return "";
      {
        var c = te.get(t);
        if (c !== void 0)
          return c;
      }
      var f;
      le = !0;
      var g = Error.prepareStackTrace;
      Error.prepareStackTrace = void 0;
      var b;
      b = ie.current, ie.current = null, Ee();
      try {
        if (o) {
          var v = function() {
            throw Error();
          };
          if (Object.defineProperty(v.prototype, "props", {
            set: function() {
              throw Error();
            }
          }), typeof Reflect == "object" && Reflect.construct) {
            try {
              Reflect.construct(v, []);
            } catch (I) {
              f = I;
            }
            Reflect.construct(t, [], v);
          } else {
            try {
              v.call();
            } catch (I) {
              f = I;
            }
            t.call(v.prototype);
          }
        } else {
          try {
            throw Error();
          } catch (I) {
            f = I;
          }
          t();
        }
      } catch (I) {
        if (I && f && typeof I.stack == "string") {
          for (var p = I.stack.split(`
`), C = f.stack.split(`
`), k = p.length - 1, F = C.length - 1; k >= 1 && F >= 0 && p[k] !== C[F]; )
            F--;
          for (; k >= 1 && F >= 0; k--, F--)
            if (p[k] !== C[F]) {
              if (k !== 1 || F !== 1)
                do
                  if (k--, F--, F < 0 || p[k] !== C[F]) {
                    var O = `
` + p[k].replace(" at new ", " at ");
                    return t.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", t.displayName)), typeof t == "function" && te.set(t, O), O;
                  }
                while (k >= 1 && F >= 0);
              break;
            }
        }
      } finally {
        le = !1, ie.current = b, Ce(), Error.prepareStackTrace = g;
      }
      var Y = t ? t.displayName || t.name : "", we = Y ? ee(Y) : "";
      return typeof t == "function" && te.set(t, we), we;
    }
    function Re(t, o, c) {
      return he(t, !1);
    }
    function Te(t) {
      var o = t.prototype;
      return !!(o && o.isReactComponent);
    }
    function re(t, o, c) {
      if (t == null)
        return "";
      if (typeof t == "function")
        return he(t, Te(t));
      if (typeof t == "string")
        return ee(t);
      switch (t) {
        case h:
          return ee("Suspense");
        case m:
          return ee("SuspenseList");
      }
      if (typeof t == "object")
        switch (t.$$typeof) {
          case d:
            return Re(t.render);
          case y:
            return re(t.type);
          case x: {
            var f = t, g = f._payload, b = f._init;
            try {
              return re(b(g));
            } catch {
            }
          }
        }
      return "";
    }
    var ae = Object.prototype.hasOwnProperty, ve = {}, ge = T.ReactDebugCurrentFrame;
    function se(t) {
      if (t) {
        var o = re(t.type);
        ge.setExtraStackFrame(o);
      } else
        ge.setExtraStackFrame(null);
    }
    function Pe(t, o, c, f, g) {
      {
        var b = Function.call.bind(ae);
        for (var v in t)
          if (b(t, v)) {
            var p = void 0;
            try {
              if (typeof t[v] != "function") {
                var C = Error((f || "React class") + ": " + c + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                throw C.name = "Invariant Violation", C;
              }
              p = t[v](o, v, f, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
            } catch (k) {
              p = k;
            }
            p && !(p instanceof Error) && (se(g), _("%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).", f || "React class", c, v, typeof p), se(null)), p instanceof Error && !(p.message in ve) && (ve[p.message] = !0, se(g), _("Failed %s type: %s", c, p.message), se(null));
          }
      }
    }
    var De = Array.isArray;
    function ue(t) {
      return De(t);
    }
    function Ae(t) {
      {
        var o = typeof Symbol == "function" && Symbol.toStringTag, c = o && t[Symbol.toStringTag] || t.constructor.name || "Object";
        return c;
      }
    }
    function Ie(t) {
      try {
        return !1;
      } catch {
        return !0;
      }
    }
    function Le(t) {
      return "" + t;
    }
    function ye(t) {
      if (Ie())
        return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ae(t)), Le(t);
    }
    var H = T.ReactCurrentOwner, $e = {
      key: !0,
      ref: !0,
      __self: !0,
      __source: !0
    }, be, xe, ce;
    ce = {};
    function Me(t) {
      if (ae.call(t, "ref")) {
        var o = Object.getOwnPropertyDescriptor(t, "ref").get;
        if (o && o.isReactWarning)
          return !1;
      }
      return t.ref !== void 0;
    }
    function Ve(t) {
      if (ae.call(t, "key")) {
        var o = Object.getOwnPropertyDescriptor(t, "key").get;
        if (o && o.isReactWarning)
          return !1;
      }
      return t.key !== void 0;
    }
    function Be(t, o) {
      if (typeof t.ref == "string" && H.current && o && H.current.stateNode !== o) {
        var c = E(H.current.type);
        ce[c] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', E(H.current.type), t.ref), ce[c] = !0);
      }
    }
    function Ue(t, o) {
      {
        var c = function() {
          be || (be = !0, _("%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)", o));
        };
        c.isReactWarning = !0, Object.defineProperty(t, "key", {
          get: c,
          configurable: !0
        });
      }
    }
    function We(t, o) {
      {
        var c = function() {
          xe || (xe = !0, _("%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)", o));
        };
        c.isReactWarning = !0, Object.defineProperty(t, "ref", {
          get: c,
          configurable: !0
        });
      }
    }
    var ze = function(t, o, c, f, g, b, v) {
      var p = {
        // This tag allows us to uniquely identify this as a React Element
        $$typeof: r,
        // Built-in properties that belong on the element
        type: t,
        key: o,
        ref: c,
        props: v,
        // Record the component responsible for creating this element.
        _owner: b
      };
      return p._store = {}, Object.defineProperty(p._store, "validated", {
        configurable: !1,
        enumerable: !1,
        writable: !0,
        value: !1
      }), Object.defineProperty(p, "_self", {
        configurable: !1,
        enumerable: !1,
        writable: !1,
        value: f
      }), Object.defineProperty(p, "_source", {
        configurable: !1,
        enumerable: !1,
        writable: !1,
        value: g
      }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
    };
    function qe(t, o, c, f, g) {
      {
        var b, v = {}, p = null, C = null;
        c !== void 0 && (ye(c), p = "" + c), Ve(o) && (ye(o.key), p = "" + o.key), Me(o) && (C = o.ref, Be(o, g));
        for (b in o)
          ae.call(o, b) && !$e.hasOwnProperty(b) && (v[b] = o[b]);
        if (t && t.defaultProps) {
          var k = t.defaultProps;
          for (b in k)
            v[b] === void 0 && (v[b] = k[b]);
        }
        if (p || C) {
          var F = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
          p && Ue(v, F), C && We(v, F);
        }
        return ze(t, p, C, g, f, H.current, v);
      }
    }
    var de = T.ReactCurrentOwner, Se = T.ReactDebugCurrentFrame;
    function G(t) {
      if (t) {
        var o = re(t.type);
        Se.setExtraStackFrame(o);
      } else
        Se.setExtraStackFrame(null);
    }
    var fe;
    fe = !1;
    function me(t) {
      return typeof t == "object" && t !== null && t.$$typeof === r;
    }
    function je() {
      {
        if (de.current) {
          var t = E(de.current.type);
          if (t)
            return `

Check the render method of \`` + t + "`.";
        }
        return "";
      }
    }
    function Ge(t) {
      {
        if (t !== void 0) {
          var o = t.fileName.replace(/^.*[\\\/]/, ""), c = t.lineNumber;
          return `

Check your code at ` + o + ":" + c + ".";
        }
        return "";
      }
    }
    var _e = {};
    function Ye(t) {
      {
        var o = je();
        if (!o) {
          var c = typeof t == "string" ? t : t.displayName || t.name;
          c && (o = `

Check the top-level render call using <` + c + ">.");
        }
        return o;
      }
    }
    function ke(t, o) {
      {
        if (!t._store || t._store.validated || t.key != null)
          return;
        t._store.validated = !0;
        var c = Ye(o);
        if (_e[c])
          return;
        _e[c] = !0;
        var f = "";
        t && t._owner && t._owner !== de.current && (f = " It was passed a child from " + E(t._owner.type) + "."), G(t), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, f), G(null);
      }
    }
    function Fe(t, o) {
      {
        if (typeof t != "object")
          return;
        if (ue(t))
          for (var c = 0; c < t.length; c++) {
            var f = t[c];
            me(f) && ke(f, o);
          }
        else if (me(t))
          t._store && (t._store.validated = !0);
        else if (t) {
          var g = V(t);
          if (typeof g == "function" && g !== t.entries)
            for (var b = g.call(t), v; !(v = b.next()).done; )
              me(v.value) && ke(v.value, o);
        }
      }
    }
    function Je(t) {
      {
        var o = t.type;
        if (o == null || typeof o == "string")
          return;
        var c;
        if (typeof o == "function")
          c = o.propTypes;
        else if (typeof o == "object" && (o.$$typeof === d || // Note: Memo only checks outer props here.
        // Inner props are checked in the reconciler.
        o.$$typeof === y))
          c = o.propTypes;
        else
          return;
        if (c) {
          var f = E(o);
          Pe(c, t.props, "prop", f, t);
        } else if (o.PropTypes !== void 0 && !fe) {
          fe = !0;
          var g = E(o);
          _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown");
        }
        typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
      }
    }
    function Ke(t) {
      {
        for (var o = Object.keys(t.props), c = 0; c < o.length; c++) {
          var f = o[c];
          if (f !== "children" && f !== "key") {
            G(t), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), G(null);
            break;
          }
        }
        t.ref !== null && (G(t), _("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
      }
    }
    function Ne(t, o, c, f, g, b) {
      {
        var v = X(t);
        if (!v) {
          var p = "";
          (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (p += " 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 C = Ge(g);
          C ? p += C : p += je();
          var k;
          t === null ? k = "null" : ue(t) ? k = "array" : t !== void 0 && t.$$typeof === r ? (k = "<" + (E(t.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : k = typeof t, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, p);
        }
        var F = qe(t, o, c, g, b);
        if (F == null)
          return F;
        if (v) {
          var O = o.children;
          if (O !== void 0)
            if (f)
              if (ue(O)) {
                for (var Y = 0; Y < O.length; Y++)
                  Fe(O[Y], t);
                Object.freeze && Object.freeze(O);
              } else
                _("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
              Fe(O, t);
        }
        return t === s ? Ke(F) : Je(F), F;
      }
    }
    function He(t, o, c) {
      return Ne(t, o, c, !0);
    }
    function Xe(t, o, c) {
      return Ne(t, o, c, !1);
    }
    var Ze = Xe, Qe = He;
    reactJsxRuntime_development.Fragment = s, reactJsxRuntime_development.jsx = Ze, reactJsxRuntime_development.jsxs = Qe;
  }()), reactJsxRuntime_development;
}
process.env.NODE_ENV === "production" ? jsxRuntime.exports = requireReactJsxRuntime_production_min() : jsxRuntime.exports = requireReactJsxRuntime_development();
var jsxRuntimeExports = jsxRuntime.exports;
const Fragment = jsxRuntimeExports.Fragment, jsx = jsxRuntimeExports.jsx, jsxs = jsxRuntimeExports.jsxs, theme_css_ts_vanilla = "", button_css_ts_vanilla = "";
function _toPrimitive$1(e, r) {
  if (typeof e != "object" || e === null)
    return e;
  var a = e[Symbol.toPrimitive];
  if (a !== void 0) {
    var s = a.call(e, r || "default");
    if (typeof s != "object")
      return s;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (r === "string" ? String : Number)(e);
}
function _toPropertyKey$1(e) {
  var r = _toPrimitive$1(e, "string");
  return typeof r == "symbol" ? r : String(r);
}
function _defineProperty$1(e, r, a) {
  return r = _toPropertyKey$1(r), r in e ? Object.defineProperty(e, r, {
    value: a,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = a, e;
}
function ownKeys$1(e, r) {
  var a = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var s = Object.getOwnPropertySymbols(e);
    r && (s = s.filter(function(n) {
      return Object.getOwnPropertyDescriptor(e, n).enumerable;
    })), a.push.apply(a, s);
  }
  return a;
}
function _objectSpread2$1(e) {
  for (var r = 1; r < arguments.length; r++) {
    var a = arguments[r] != null ? arguments[r] : {};
    r % 2 ? ownKeys$1(Object(a), !0).forEach(function(s) {
      _defineProperty$1(e, s, a[s]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : ownKeys$1(Object(a)).forEach(function(s) {
      Object.defineProperty(e, s, Object.getOwnPropertyDescriptor(a, s));
    });
  }
  return e;
}
var shouldApplyCompound = (e, r, a) => {
  for (var s of Object.keys(e)) {
    var n;
    if (e[s] !== ((n = r[s]) !== null && n !== void 0 ? n : a[s]))
      return !1;
  }
  return !0;
}, createRuntimeFn = (e) => {
  var r = (a) => {
    var s = e.defaultClassName, n = _objectSpread2$1(_objectSpread2$1({}, e.defaultVariants), a);
    for (var i in n) {
      var l, u = (l = n[i]) !== null && l !== void 0 ? l : e.defaultVariants[i];
      if (u != null) {
        var d = u;
        typeof d == "boolean" && (d = d === !0 ? "true" : "false");
        var h = (
          // @ts-expect-error
          e.variantClassNames[i][d]
        );
        h && (s += " " + h);
      }
    }
    for (var [m, y] of e.compoundVariants)
      shouldApplyCompound(m, n, e.defaultVariants) && (s += " " + y);
    return s;
  };
  return r.variants = () => Object.keys(e.variantClassNames), r;
}, buttonStyle = createRuntimeFn({ defaultClassName: "hm2git0", variantClassNames: { size: { medium: "hm2git1", small: "hm2git2", large: "hm2git3" }, variant: { regular: "hm2git4", semibold: "hm2git5", outline: "hm2git6", error: "hm2git7" } }, defaultVariants: { size: "medium", variant: "regular" }, compoundVariants: [] });
const Button = ({
  header: e,
  size: r,
  variant: a,
  fullWidth: s,
  className: n,
  ...i
}) => /* @__PURE__ */ jsx("div", { className: n, children: /* @__PURE__ */ jsx(
  "button",
  {
    className: buttonStyle({ size: r, variant: a }),
    style: { width: s ? "100%" : "auto" },
    ...i,
    children: e
  }
) });
var classnames = { exports: {} };
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/
(function(e) {
  (function() {
    var r = {}.hasOwnProperty;
    function a() {
      for (var s = [], n = 0; n < arguments.length; n++) {
        var i = arguments[n];
        if (i) {
          var l = typeof i;
          if (l === "string" || l === "number")
            s.push(i);
          else if (Array.isArray(i)) {
            if (i.length) {
              var u = a.apply(null, i);
              u && s.push(u);
            }
          } else if (l === "object") {
            if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) {
              s.push(i.toString());
              continue;
            }
            for (var d in i)
              r.call(i, d) && i[d] && s.push(d);
          }
        }
      }
      return s.join(" ");
    }
    e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
  })();
})(classnames);
var classnamesExports = classnames.exports;
const cn = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports), buttonLink_css_ts_vanilla = "";
var buttonLinkContainerStyle = createRuntimeFn({ defaultClassName: "_1kxba131", variantClassNames: { position: { inline: "_1kxba132", left: "_1kxba133", center: "_1kxba134", right: "_1kxba135" } }, defaultVariants: { position: "inline" }, compoundVariants: [] }), buttonLinkIconStyle = "_1kxba136", buttonLinkStyle = createRuntimeFn({ defaultClassName: "_1kxba130", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
const buttonSocial_css_ts_vanilla = "";
var buttonSocialIconEndStyle = createRuntimeFn({ defaultClassName: "i8n2ika", variantClassNames: { size: { small: "i8n2ikb", medium: "i8n2ikc", large: "i8n2ikd" } }, defaultVariants: {}, compoundVariants: [] }), buttonSocialIconStartStyle = createRuntimeFn({ defaultClassName: "i8n2ik6", variantClassNames: { size: { small: "i8n2ik7", medium: "i8n2ik8", large: "i8n2ik9" } }, defaultVariants: {}, compoundVariants: [] }), buttonSocialStyle = createRuntimeFn({ defaultClassName: "i8n2ik0", variantClassNames: { size: { small: "i8n2ik1", medium: "i8n2ik2", large: "i8n2ik3" }, variant: { regular: "i8n2ik4", semibold: "i8n2ik5" } }, defaultVariants: { size: "medium" }, compoundVariants: [] });
const card_css_ts_vanilla = "";
var cardStyle = createRuntimeFn({ defaultClassName: "_1xqjo9i0", variantClassNames: { size: { default: "_1xqjo9i3", wide: "_1xqjo9i4" } }, defaultVariants: { size: "default" }, compoundVariants: [] }), cardTitleImage = "_1xqjo9i2", cardTitleStyle = "_1xqjo9i1";
const checkbox_css_ts_vanilla = "";
var checkboxInputStyle = "_13ulsr11", checkboxStyle = "_13ulsr10";
const codebox_css_ts_vanilla = "";
var codeboxContentStyle = "gasiv42", codeboxHeaderStyle = "gasiv41", codeboxStyle = "gasiv40";
const colors_css_ts_vanilla = "";
function _toPrimitive(e, r) {
  if (typeof e != "object" || e === null)
    return e;
  var a = e[Symbol.toPrimitive];
  if (a !== void 0) {
    var s = a.call(e, r || "default");
    if (typeof s != "object")
      return s;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (r === "string" ? String : Number)(e);
}
function _toPropertyKey(e) {
  var r = _toPrimitive(e, "string");
  return typeof r == "symbol" ? r : String(r);
}
function _defineProperty(e, r, a) {
  return r = _toPropertyKey(r), r in e ? Object.defineProperty(e, r, {
    value: a,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = a, e;
}
function ownKeys(e, r) {
  var a = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var s = Object.getOwnPropertySymbols(e);
    r && (s = s.filter(function(n) {
      return Object.getOwnPropertyDescriptor(e, n).enumerable;
    })), a.push.apply(a, s);
  }
  return a;
}
function _objectSpread2(e) {
  for (var r = 1; r < arguments.length; r++) {
    var a = arguments[r] != null ? arguments[r] : {};
    r % 2 ? ownKeys(Object(a), !0).forEach(function(s) {
      _defineProperty(e, s, a[s]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : ownKeys(Object(a)).forEach(function(s) {
      Object.defineProperty(e, s, Object.getOwnPropertyDescriptor(a, s));
    });
  }
  return e;
}
var createSprinkles$1 = (e) => function() {
  for (var r = arguments.length, a = new Array(r), s = 0; s < r; s++)
    a[s] = arguments[s];
  var n = Object.assign({}, ...a.map((d) => d.styles)), i = Object.keys(n), l = i.filter((d) => "mappings" in n[d]), u = (d) => {
    var h = [], m = {}, y = _objectSpread2({}, d), x = !1;
    for (var w of l) {
      var R = d[w];
      if (R != null) {
        var M = n[w];
        x = !0;
        for (var V of M.mappings)
          m[V] = R, y[V] == null && delete y[V];
      }
    }
    var T = x ? _objectSpread2(_objectSpread2({}, m), y) : d, _ = function() {
      var j = T[N], S = n[N];
      try {
        if (S.mappings)
          return "continue";
        if (typeof j == "string" || typeof j == "number") {
          if (process.env.NODE_ENV !== "production" && !S.values[j].defaultClass)
            throw new Error();
          h.push(S.values[j].defaultClass);
        } else if (Array.isArray(j))
          for (var B = 0; B < j.length; B++) {
            var U = j[B];
            if (U != null) {
              var X = S.responsiveArray[B];
              if (process.env.NODE_ENV !== "production" && !S.values[U].conditions[X])
                throw new Error();
              h.push(S.values[U].conditions[X]);
            }
          }
        else
          for (var J in j) {
            var W = j[J];
            if (W != null) {
              if (process.env.NODE_ENV !== "production" && !S.values[W].conditions[J])
                throw new Error();
              h.push(S.values[W].conditions[J]);
            }
          }
      } catch (Z) {
        if (process.env.NODE_ENV !== "production") {
          class D extends Error {
            constructor(q) {
              super(q), this.name = "SprinklesError";
            }
          }
          var E = (A) => typeof A == "string" ? '"'.concat(A, '"') : A, P = (A, q, Q) => {
            throw new D('"'.concat(A, '" has no value ').concat(E(q), ". Possible values are ").concat(Object.keys(Q).map(E).join(", ")));
          };
          if (!S)
            throw new D('"'.concat(N, '" is not a valid sprinkle'));
          if ((typeof j == "string" || typeof j == "number") && (j in S.values || P(N, j, S.values), !S.values[j].defaultClass))
            throw new D('"'.concat(N, '" has no default condition. You must specify which conditions to target explicitly. Possible options are ').concat(Object.keys(S.values[j].conditions).map(E).join(", ")));
          if (typeof j == "object") {
            if (!("conditions" in S.values[Object.keys(S.values)[0]]))
              throw new D('"'.concat(N, '" is not a conditional property'));
            if (Array.isArray(j)) {
              if (!("responsiveArray" in S))
                throw new D('"'.concat(N, '" does not support responsive arrays'));
              var L = S.responsiveArray.length;
              if (L < j.length)
                throw new D('"'.concat(N, '" only supports up to ').concat(L, " breakpoints. You passed ").concat(j.length));
              for (var K of j)
                S.values[K] || P(N, K, S.values);
            } else
              for (var z in j) {
                var $ = j[z];
                if ($ != null && (S.values[$] || P(N, $, S.values), !S.values[$].conditions[z]))
                  throw new D('"'.concat(N, '" has no condition named ').concat(E(z), ". Possible values are ").concat(Object.keys(S.values[$].conditions).map(E).join(", ")));
              }
          }
        }
        throw Z;
      }
    };
    for (var N in T)
      var ne = _();
    return e(h.join(" "));
  };
  return Object.assign(u, {
    properties: new Set(i)
  });
}, composeStyles = (e) => e, createSprinkles = function() {
  return createSprinkles$1(composeStyles)(...arguments);
}, colorProperties = { conditions: void 0, styles: { color: { values: { accentDisabled: { defaultClass: "_8awkg00" }, accentDefault: { defaultClass: "_8awkg01" }, accentMuted: { defaultClass: "_8awkg02" }, accentSubtle: { defaultClass: "_8awkg03" }, accentEmphasis: { defaultClass: "_8awkg04" }, foregroundDefault: { defaultClass: "_8awkg05" }, foregroundMuted: { defaultClass: "_8awkg06" }, foregroundSubtle: { defaultClass: "_8awkg07" }, foregroundDisabled: { defaultClass: "_8awkg08" }, foregroundOnDisabled: { defaultClass: "_8awkg09" }, foregroundOnDark: { defaultClass: "_8awkg0a" }, foregroundOnAccent: { defaultClass: "_8awkg0b" }, backgroundSurface: { defaultClass: "_8awkg0c" }, backgroundCanvas: { defaultClass: "_8awkg0d" }, backgroundSubtle: { defaultClass: "_8awkg0e" }, errorDefault: { defaultClass: "_8awkg0f" }, errorSubtle: { defaultClass: "_8awkg0g" }, errorMuted: { defaultClass: "_8awkg0h" }, errorEmphasis: { defaultClass: "_8awkg0i" }, successEmphasis: { defaultClass: "_8awkg0j" }, borderDefault: { defaultClass: "_8awkg0k" }, textDefault: { defaultClass: "_8awkg0l" }, textDisabled: { defaultClass: "_8awkg0m" }, inputBackground: { defaultClass: "_8awkg0n" }, inputDisabled: { defaultClass: "_8awkg0o" }, inputPlaceholder: { defaultClass: "_8awkg0p" }, inputText: { defaultClass: "_8awkg0q" } } } } }, colorSprinkle = createSprinkles(colorProperties);
const defaultBreakpoints = {
  // using em here as it is more consistent across browsers
  xs: pxToEm(390),
  sm: pxToEm(640),
  md: pxToEm(768),
  lg: pxToEm(1024),
  xl: pxToEm(1280),
  xl2: pxToEm(1536)
}, defaultFont = {
  fontFamily: "Inter",
  fontFamilyMono: "JetBrainsMono",
  fontStyle: "normal"
}, defaultLightTheme = {
  fontFamily: "Inter",
  fontFamilyMono: "JetBrainsMono",
  fontStyle: "normal",
  accent: {
    def: "#3D53F5",
    muted: "#6475F7",
    emphasis: "#3142C4",
    disabled: "#E0E0E0",
    subtle: "#eceefe"
  },
  foreground: {
    def: "#171717",
    muted: "#616161",
    subtle: "#9E9E9E",
    disabled: "#BDBDBD",
    onDark: "#FFFFFF",
    onAccent: "#FFFFFF",
    onDisabled: "#e0e0e0"
  },
  background: {
    surface: "#FFFFFF",
    canvas: "#FCFCFC",
    subtle: "#EEEEEE"
  },
  error: {
    def: "#9c0f2e",
    subtle: "#fce8ec",
    muted: "#e95c7b",
    emphasis: "#DF1642"
  },
  success: {
    emphasis: "#18A957"
  },
  border: {
    def: "#EEEEEE"
  },
  text: {
    def: "#FFFFFF",
    disabled: "#757575"
  },
  input: {
    background: "#FFFFFF",
    disabled: "#E0E0E0",
    placeholder: "#9E9E9E",
    text: "#424242"
  }
}, defaultDarkTheme = {
  fontFamily: "Inter",
  fontFamilyMono: "JetBrainsMono",
  fontStyle: "normal",
  accent: {
    def: "#6475f7",
    disabled: "#757575",
    muted: "#3142c4",
    emphasis: "#3d53f5",
    subtle: "#0c1131"
  },
  foreground: {
    def: "#FFFFFF",
    muted: "#ddd9f7",
    subtle: "#9a8ce8",
    onDark: "#FFFFFF",
    onAccent: "#FFFFFF",
    onDisabled: "#e0e0e0",
    disabled: "#bdbdbd"
  },
  background: {
    surface: "#110d2b",
    canvas: "#090616",
    subtle: "#221C56"
  },
  border: {
    def: "#221956"
  },
  error: {
    def: "#e95c7b",
    subtle: "#2d040d",
    muted: "#9c0f2e",
    emphasis: "#df1642"
  },
  success: {
    emphasis: "#18a957"
  },
  input: {
    background: "#FFFFFF",
    text: "#424242",
    placeholder: "#9e9e9e",
    disabled: "#eeeeee"
  },
  text: {
    def: "#FFFFFF",
    disabled: "#757575"
  }
}, divider_css_ts_vanilla = "";
var dividerStyle = createRuntimeFn({ defaultClassName: "_15i54991", variantClassNames: { sizes: { fullWidth: "_15i54992" } }, defaultVariants: {}, compoundVariants: [] }), dividerTextStyle = "_15i54990";
const form_css_ts_vanilla = "";
var formStyle = "_1pmqm1m0";
const grid_css_ts_vanilla = "";
var gridStyle = createRuntimeFn({ defaultClassName: "v30igv0", variantClassNames: { direction: { row: "v30igv1", column: "v30igv2" }, gap: { 4: "v30igv3", 8: "v30igv4", 16: "v30igv5", 24: "v30igv6", 32: "v30igv7", 64: "v30igv8" } }, defaultVariants: {}, compoundVariants: [] });
const inputField_css_ts_vanilla = "";
var inputFieldStyle = "db4loq1", inputFieldTitleStyle = "db4loq0";
const menuLink_css_ts_vanilla = "";
var menuLinkIconLeftStyle = "_1p4e0o41", menuLinkStyle = "_1p4e0o40", menuLinkTextStyle = "_1p4e0o42";
const message_css_ts_vanilla = "";
var messageStyle = createRuntimeFn({ defaultClassName: "_5sut1r0", variantClassNames: { textPosition: { start: "_5sut1r1", center: "_5sut1r2", end: "_5sut1r3" }, severity: { error: "_5sut1r4", success: "_5sut1r5", info: "_5sut1r6", disabled: "_5sut1r7", default: "_5sut1r8" } }, defaultVariants: { textPosition: "center", severity: "default" }, compoundVariants: [] });
const nav_css_ts_vanilla = "";
var navMainSectionStyle = "_946e774", navMenuLinkSelectedStyle = "_946e773", navMenuSectionStyle = "_946e772", navSectionBottom = "_946e775", navSectionTitleStyle = "_946e771", navStyle = "_946e770", oryTheme = { fontFamily: "var(--ory-theme-font-family)", fontFamilyMono: "var(--ory-theme-font-family-mono)", fontStyle: "var(--ory-theme-font-style)", accent: { def: "var(--ory-theme-accent-def)", muted: "var(--ory-theme-accent-muted)", emphasis: "var(--ory-theme-accent-emphasis)", disabled: "var(--ory-theme-accent-disabled)", subtle: "var(--ory-theme-accent-subtle)" }, foreground: { def: "var(--ory-theme-foreground-def)", muted: "var(--ory-theme-foreground-muted)", subtle: "var(--ory-theme-foreground-subtle)", disabled: "var(--ory-theme-foreground-disabled)", onDark: "var(--ory-theme-foreground-on-dark)", onAccent: "var(--ory-theme-foreground-on-accent)", onDisabled: "var(--ory-theme-foreground-on-disabled)" }, background: { surface: "var(--ory-theme-background-surface)", canvas: "var(--ory-theme-background-canvas)", subtle: "var(--ory-theme-background-subtle)" }, error: { def: "var(--ory-theme-error-def)", subtle: "var(--ory-theme-error-subtle)", muted: "var(--ory-theme-error-muted)", emphasis: "var(--ory-theme-error-emphasis)" }, success: { emphasis: "var(--ory-theme-success-emphasis)" }, border: { def: "var(--ory-theme-border-def)" }, text: { def: "var(--ory-theme-text-def)", disabled: "var(--ory-theme-text-disabled)" }, input: { background: "var(--ory-theme-input-background)", disabled: "var(--ory-theme-input-disabled)", placeholder: "var(--ory-theme-input-placeholder)", text: "var(--ory-theme-input-text)" } };
const typography_css_ts_vanilla = "";
var inputTypographyStyle = createRuntimeFn({ defaultClassName: "_1nljf820", variantClassNames: { size: { 16: "_1nljf821", 18: "_1nljf822" }, type: { regular: "_1nljf823", semiBold: "_1nljf824" } }, defaultVariants: { size: 16, type: "regular" }, compoundVariants: [] }), typographyStyle = createRuntimeFn({ defaultClassName: "_1nljf825", variantClassNames: { size: { tiny: "_1nljf826", xsmall: "_1nljf827", small: "_1nljf828", caption: "_1nljf829", body: "_1nljf82a", lead: "_1nljf82b", headline21: "_1nljf82c", headline26: "_1nljf82d", headline31: "_1nljf82e", headline37: "_1nljf82f", headline48: "_1nljf82g", display: "_1nljf82h", hero: "_1nljf82i", uber: "_1nljf82j", colossus: "_1nljf82k", monoCaption: "_1nljf82l" }, type: { regular: "_1nljf82m", bold: "_1nljf82n" } }, defaultVariants: { type: "regular" }, compoundVariants: [] });
const isCustomHref = (e) => e !== void 0 && e.href !== void 0, ButtonLink = ({
  href: e,
  className: r,
  icon: a,
  children: s,
  position: n,
  ...i
}) => {
  let l = {
    ...i
  };
  return isCustomHref(e) ? l = {
    ...l,
    href: e.href,
    onClick: (u) => {
      u.preventDefault(), e.handler(e.href);
    }
  } : l = {
    ...l,
    href: e
  }, /* @__PURE__ */ jsx(
    "div",
    {
      className: cn(
        r,
        typographyStyle({ size: "caption", type: "regular" }),
        buttonLinkContainerStyle({ position: n })
      ),
      children: /* @__PURE__ */ jsxs("a", { className: buttonLinkStyle(), ...l, children: [
        a && /* @__PURE__ */ jsx("i", { className: cn(`fa fa-${a}`, buttonLinkIconStyle) }),
        s
      ] })
    }
  );
}, ButtonSocial = ({
  header: e,
  brand: r,
  size: a,
  variant: s,
  fullWidth: n,
  className: i,
  ...l
}) => {
  const u = r !== "generic" ? `fa-brands fa-${r}` : "fa-solid fa-layer-group";
  return /* @__PURE__ */ jsx("div", { className: i, children: /* @__PURE__ */ jsxs(
    "button",
    {
      className: buttonSocialStyle({ size: a, variant: s }),
      style: { width: n ? "100%" : "auto" },
      ...l,
      children: [
        /* @__PURE__ */ jsx("i", { className: cn(u, buttonSocialIconStartStyle({ size: a })) }),
        e,
        /* @__PURE__ */ jsx(
          "i",
          {
            className: cn(u, buttonSocialIconEndStyle({ size: a })),
            style: { visibility: "hidden", opacity: 0 }
          }
        )
      ]
    }
  ) });
}, Card = ({
  heading: e,
  image: r,
  className: a,
  children: s,
  size: n,
  ...i
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      cardStyle({
        size: n
      }),
      typographyStyle({ type: "regular", size: "small" }),
      a
    ),
    ...i,
    children: /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
      r && /* @__PURE__ */ jsx(Fragment, { children: typeof r == "string" ? /* @__PURE__ */ jsx(
        "img",
        {
          className: cardTitleImage,
          src: r,
          alt: r,
          width: "100%",
          height: "100%"
        }
      ) : r }),
      /* @__PURE__ */ jsx("div", { className: cardTitleStyle, children: typeof e == "string" ? /* @__PURE__ */ jsx("h3", { className: typographyStyle({ type: "regular", size: "small" }), children: e }) : e }),
      /* @__PURE__ */ jsx("div", { children: s })
    ] })
  }
), cardGradient_css_ts_vanilla = "";
var cardContainer = "ut7kc70", cardGradientActionStyle = createRuntimeFn({ defaultClassName: "ut7kc74", variantClassNames: { disabled: { true: "ut7kc75", false: "ut7kc76" } }, defaultVariants: { disabled: !1 }, compoundVariants: [] }), cardGradientOverlayStyle = createRuntimeFn({ defaultClassName: "ut7kc71", variantClassNames: { disabled: { true: "ut7kc72", false: "ut7kc73" } }, defaultVariants: { disabled: !1 }, compoundVariants: [] });
const CardGradient = ({
  heading: e,
  content: r,
  action: a,
  target: s,
  disabled: n,
  className: i,
  ...l
}) => /* @__PURE__ */ jsxs(
  "a",
  {
    className: cn(cardContainer, cardGradientOverlayStyle({ disabled: n })),
    target: s,
    "aria-disabled": n,
    ...!n && { href: a },
    ...l,
    children: [
      /* @__PURE__ */ jsx(
        "div",
        {
          className: cn(
            colorSprinkle({
              color: n ? "foregroundOnDisabled" : "foregroundOnDark"
            }),
            i
          ),
          children: /* @__PURE__ */ jsxs("div", { className: cn(gridStyle({ gap: 16 })), children: [
            typeof e == "string" ? /* @__PURE__ */ jsx(
              "div",
              {
                className: typographyStyle({ size: "headline21", type: "bold" }),
                children: e
              }
            ) : e,
            typeof r == "string" ? /* @__PURE__ */ jsx("div", { className: typographyStyle({ size: "small", type: "regular" }), children: r }) : r
          ] })
        }
      ),
      /* @__PURE__ */ jsx(
        "i",
        {
          className: cn("fa fa-arrow-right", cardGradientActionStyle({ disabled: n }))
        }
      )
    ]
  }
), Message = ({
  severity: e,
  textPosition: r,
  className: a,
  children: s,
  ...n
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      messageStyle({ severity: e, textPosition: r }),
      typographyStyle({ size: "caption", type: "regular" }),
      a
    ),
    ...n,
    children: s
  }
), fallback = () => Math.random().toString(36).substring(2), useIdWithFallback = () => {
  try {
    require$$0["useId".toString()]() ?? fallback();
  } catch {
    return fallback();
  }
}, Checkbox = ({
  className: e,
  label: r,
  helperMessage: a,
  messageTestId: s,
  dataTestid: n,
  ...i
}) => {
  const l = i.id ?? useIdWithFallback();
  return /* @__PURE__ */ jsxs(
    "div",
    {
      "data-testid": n,
      className: gridStyle({ gap: 4, direction: "column" }),
      children: [
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: cn(
              e,
              typographyStyle({ type: "regular", size: "caption" }),
              checkboxStyle
            ),
            children: [
              /* @__PURE__ */ jsx(
                "input",
                {
                  className: checkboxInputStyle,
                  id: l,
                  type: "checkbox",
                  value: 1,
                  ...i
                }
              ),
              r && /* @__PURE__ */ jsx("label", { htmlFor: l, children: /* @__PURE__ */ jsx("span", { children: r }) })
            ]
          }
        ),
        typeof a == "string" ? /* @__PURE__ */ jsx(
          Message,
          {
            "data-testid": s,
            severity: i.severity,
            textPosition: "start",
            children: a
          }
        ) : a
      ]
    }
  );
}, CodeBox = ({
  children: e,
  className: r,
  toggleText: a,
  ...s
}) => {
  const n = useIdWithFallback();
  return /* @__PURE__ */ jsxs(
    "div",
    {
      className: cn(r, gridStyle({ gap: 16 }), codeboxStyle),
      ...s,
      children: [
        /* @__PURE__ */ jsx("input", { id: n, type: "checkbox" }),
        /* @__PURE__ */ jsxs(
          "label",
          {
            htmlFor: n,
            className: cn(typographyStyle({ size: "small" }), codeboxHeaderStyle),
            children: [
              /* @__PURE__ */ jsx("div", { children: a || "Toggle content" }),
              /* @__PURE__ */ jsxs("span", { children: [
                /* @__PURE__ */ jsx(
                  "i",
                  {
                    className: cn(
                      "fa fa-caret-down",
                      colorSprinkle({ color: "accentDefault" })
                    )
                  }
                ),
                /* @__PURE__ */ jsx(
                  "i",
                  {
                    className: cn(
                      "fa fa-caret-up",
                      colorSprinkle({ color: "accentDefault" })
                    )
                  }
                )
              ] })
            ]
          }
        ),
        /* @__PURE__ */ jsx(
          "pre",
          {
            className: cn(
              colorSprinkle({ color: "accentEmphasis" }),
              codeboxContentStyle
            ),
            children: e
          }
        )
      ]
    }
  );
}, Divider = ({
  className: e,
  fullWidth: r,
  text: a,
  ...s
}) => a ? /* @__PURE__ */ jsx("div", { className: cn(dividerTextStyle, e), ...s, children: a }) : /* @__PURE__ */ jsx(
  "hr",
  {
    className: cn(
      dividerStyle(r ? { sizes: "fullWidth" } : {}),
      e
    ),
    ...s
  }
), InputField = ({
  header: e,
  helperMessage: r,
  messageTestId: a,
  fullWidth: s,
  className: n,
  dataTestid: i,
  id: l,
  ...u
}) => {
  const d = l ?? useIdWithFallback();
  return /* @__PURE__ */ jsxs(
    "div",
    {
      "data-testid": i,
      className: cn(n, gridStyle({ gap: 4 })),
      children: [
        e && /* @__PURE__ */ jsxs(
          "label",
          {
            htmlFor: d,
            className: typographyStyle({ size: "small", type: "regular" }),
            children: [
              e,
              " ",
              u.required && /* @__PURE__ */ jsx("span", { className: inputFieldTitleStyle, children: "*" })
            ]
          }
        ),
        /* @__PURE__ */ jsx(
          "input",
          {
            className: cn(
              inputFieldStyle,
              typographyStyle({ size: "small", type: "regular" })
            ),
            style: { width: s ? "100%" : "auto" },
            placeholder: " ",
            id: d,
            ...u
          }
        ),
        typeof r == "string" ? /* @__PURE__ */ jsx(Message, { "data-testid": a, severity: u.severity, children: r }) : r
      ]
    }
  );
}, MenuLink = ({
  href: e,
  children: r,
  target: a,
  disabled: s,
  iconLeft: n,
  iconRight: i,
  className: l,
  ...u
}) => /* @__PURE__ */ jsxs("div", { className: cn(l, menuLinkStyle), ...u, children: [
  /* @__PURE__ */ jsxs(
    "a",
    {
      className: cn(
        typographyStyle({ size: "small", type: "regular" }),
        colorSprinkle({
          color: s ? "foregroundDisabled" : "foregroundMuted"
        }),
        menuLinkTextStyle
      ),
      "aria-disabled": s,
      ...!s && { href: e },
      ...a && { target: a },
      children: [
        n && /* @__PURE__ */ jsx("i", { className: cn("fa", `fa-${n}`, menuLinkIconLeftStyle) }),
        r
      ]
    }
  ),
  i && /* @__PURE__ */ jsx(
    "i",
    {
      className: cn(
        "fa",
        `fa-${i}`,
        colorSprinkle({
          color: s ? "foregroundDisabled" : "foregroundMuted"
        })
      )
    }
  )
] }), Nav = ({
  navTitle: e,
  navSections: r,
  className: a,
  ...s
}) => {
  const n = `collapse-ory-elements-nav-${useIdWithFallback()}`;
  return /* @__PURE__ */ jsxs("nav", { role: "navigation", className: cn(navStyle, a), ...s, children: [
    /* @__PURE__ */ jsx("input", { id: n, type: "checkbox" }),
    /* @__PURE__ */ jsxs(
      "div",
      {
        className: cn(
          navSectionTitleStyle,
          typographyStyle({ size: "caption" }),
          colorSprinkle({ color: "accentDefault" })
        ),
        children: [
          e,
          /* @__PURE__ */ jsxs("label", { htmlFor: n, children: [
            /* @__PURE__ */ jsx("i", { className: cn("fa", "fa-bars") }),
            /* @__PURE__ */ jsx("i", { className: cn("fa", "fa-xmark") })
          ] })
        ]
      }
    ),
    /* @__PURE__ */ jsx(
      "ul",
      {
        className: cn(
          navMainSectionStyle,
          navMenuSectionStyle,
          gridStyle({ gap: 24 })
        ),
        children: r.map((i, l) => /* @__PURE__ */ jsxs(
          "li",
          {
            ...i.floatBottom && { className: navSectionBottom },
            children: [
              i.title && /* @__PURE__ */ jsxs(
                "div",
                {
                  className: cn(
                    typographyStyle({ size: "xsmall", type: "bold" }),
                    colorSprinkle({ color: "foregroundDefault" }),
                    navSectionTitleStyle
                  ),
                  children: [
                    i.title,
                    /* @__PURE__ */ jsx("i", { className: `fa fa-${i.titleIcon}` })
                  ]
                }
              ),
              /* @__PURE__ */ jsx("ul", { className: navMenuSectionStyle, children: i.links.map(({ testId: u, ...d }, h) => /* @__PURE__ */ jsx(
                "li",
                {
                  ...d.selected && {
                    className: navMenuLinkSelectedStyle
                  },
                  children: /* @__PURE__ */ jsx(MenuLink, { "data-testid": u, ...d, children: d.name })
                },
                h
              )) })
            ]
          },
          l
        ))
      }
    )
  ] });
}, MessageSection = ({
  text: e,
  url: r,
  buttonText: a,
  dataTestId: s
}) => /* @__PURE__ */ jsxs(Message, { className: colorSprinkle({ color: "foregroundMuted" }), children: [
  e,
  " ",
  /* @__PURE__ */ jsx(ButtonLink, { "data-testid": s, href: r, children: a })
] }), nodeMessage = ({ text: e, id: r, type: a, key: s, ...n }) => /* @__PURE__ */ jsx(
  Message,
  {
    "data-testid": `ui/message/${r}`,
    severity: a,
    ...n,
    children: e
  },
  s
), NodeMessages = ({
  nodes: e,
  uiMessages: r,
  ...a
}) => {
  const { gap: s, direction: n, ...i } = a, l = e?.reduce(
    (h, { messages: m }) => (h.push(
      ...m.map(({ text: y, id: x, type: w }, R) => nodeMessage({
        text: y,
        id: x,
        type: w,
        key: `node-group-message-${x}-${R}`,
        ...i
      })).filter(Boolean)
    ), h),
    []
  ), u = r?.map(
    ({ text: h, id: m, type: y }, x) => nodeMessage({ text: h, id: m, type: y, key: `ui-messsage-${m}-${x}` })
  ), d = [...l || [], ...u || []];
  return d.length > 0 ? /* @__PURE__ */ jsx(
    "div",
    {
      className: gridStyle({
        gap: s || 16,
        direction: n
      }),
      children: d
    }
  ) : null;
}, getNodeLabel = (e) => {
  const r = e.attributes;
  return isUiNodeAnchorAttributes(r) ? r.title.text : isUiNodeImageAttributes(r) ? e.meta.label?.text || "" : isUiNodeInputAttributes(r) && r.label?.text ? r.label.text : e.meta.label?.text || "";
};
function isUiNodeAnchorAttributes(e) {
  return e.node_type === "a";
}
function isUiNodeImageAttributes(e) {
  return e.node_type === "img";
}
function isUiNodeInputAttributes(e) {
  return e.node_type === "input";
}
function isUiNodeTextAttributes(e) {
  return e.node_type === "text";
}
const getNodeInputType = (e) => e?.type ?? "", filterNodesByGroups = ({
  nodes: e,
  groups: r,
  withoutDefaultGroup: a,
  attributes: s,
  withoutDefaultAttributes: n,
  excludeAttributes: i
}) => {
  const l = (u) => typeof u == "string" ? u.split(",") : u;
  return e.filter(({ group: u, attributes: d }) => {
    if (!r && !s && !i)
      return !0;
    const h = l(r) || [];
    a || h.push("default");
    const m = l(s) || [];
    n || (u.includes("default") && m.push("hidden"), (u.includes("webauthn") || u.includes("totp")) && m.push("input", "script"));
    const y = l(i) || [], x = r ? h.includes(u) : !0, w = s ? m.includes(getNodeInputType(d)) : !0, R = i ? !y.includes(getNodeInputType(d)) : !0;
    return x && w && R;
  });
}, Image = ({ header: e, className: r, ...a }) => /* @__PURE__ */ jsxs("div", { className: cn(r, gridStyle({ gap: 4 })), children: [
  e && /* @__PURE__ */ jsx("div", { className: typographyStyle({ size: "small", type: "regular" }), children: e }),
  /* @__PURE__ */ jsx("img", { ...a })
] }), Typography = ({
  children: e,
  size: r,
  type: a,
  color: s,
  className: n,
  ...i
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      typographyStyle({ size: r, type: a }),
      colorSprinkle({ color: s }),
      n
    ),
    ...i,
    children: e
  }
), Node = ({
  node,
  className,
  buttonOverrideProps,
  buttonSocialOverrideProps
}) => {
  if (isUiNodeImageAttributes(node.attributes))
    return /* @__PURE__ */ jsx(
      Image,
      {
        src: node.attributes.src,
        alt: node.meta.label?.text,
        "data-testid": `node/image/${node.attributes.id}`,
        header: node.meta.label?.text,
        width: node.attributes.width,
        height: node.attributes.height
      }
    );
  if (isUiNodeTextAttributes(node.attributes)) {
    const e = node.attributes.id;
    return node.attributes.text.id === 1050015 ? /* @__PURE__ */ jsxs(
      "div",
      {
        className: gridStyle({ gap: 4, direction: "row" }),
        style: {
          display: "inline-flex",
          flexWrap: "wrap",
          gap: pxToRem(48),
          maxWidth: "fit-content",
          alignItems: "center"
        },
        "data-testid": `node/text/${e}`,
        children: [
          /* @__PURE__ */ jsx(
            Typography,
            {
              variant: "body1",
              "data-testid": `node/text/${node.attributes.id}/label`,
              style: { flexBasis: "100%" },
              children: node.meta.label?.text
            }
          ),
          node.attributes.text.context.secrets.map(
            ({ text: r, id: a }, s) => a === 1050014 ? /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("del", { "data-testid": "node/text/lookup_secret_codes/text", children: /* @__PURE__ */ jsx("code", { children: "Used" }) }) }, s) : /* @__PURE__ */ jsx(
              "pre",
              {
                "data-testid": "node/text/lookup_secret_codes/text",
                children: /* @__PURE__ */ jsx("code", { children: r })
              },
              s
            )
          )
        ]
      }
    ) : /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 4 }), "data-testid": `node/text/${e}`, children: [
      /* @__PURE__ */ jsx(
        Typography,
        {
          variant: "body1",
          "data-testid": `node/text/${node.attributes.id}/label`,
          children: node.meta.label?.text
        }
      ),
      /* @__PURE__ */ jsx("pre", { "data-testid": `node/text/${e}/text`, children: /* @__PURE__ */ jsx("code", { children: node.attributes.text.text }) })
    ] });
  } else if (isUiNodeInputAttributes(node.attributes)) {
    const attrs = node.attributes, nodeType = attrs.type, isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc", submit = {
      type: attrs.type,
      name: attrs.name,
      ...attrs.value && { value: attrs.value }
    };
    switch (nodeType) {
      case "button":
      case "submit":
        if (isSocial && (submit.formNoValidate = !0, submit.onClick = (e) => {
          e.currentTarget.type = "submit", e.currentTarget.dispatchEvent(
            new Event("submit", { cancelable: !0, bubbles: !0 })
          );
        }), attrs.onclick) {
          const oc = attrs.onclick;
          submit.onClick = () => {
            eval(oc);
          };
        }
        return (node.meta.label?.id === 1070007 || // TODO: remove this once everyone has migrated to the fix (https://github.com/ory/kratos/pull/3067)
        node.meta.label?.id === 1070008) && (submit.formNoValidate = !0), isSocial ? /* @__PURE__ */ jsx(
          ButtonSocial,
          {
            className,
            header: getNodeLabel(node),
            brand: attrs.value.toLowerCase(),
            variant: "semibold",
            size: "medium",
            fullWidth: !0,
            disabled: attrs.disabled,
            ...buttonSocialOverrideProps && buttonSocialOverrideProps,
            ...submit
          }
        ) : /* @__PURE__ */ jsx(
          Button,
          {
            className,
            header: getNodeLabel(node),
            variant: "semibold",
            size: "medium",
            fullWidth: !0,
            disabled: attrs.disabled,
            ...buttonOverrideProps && buttonOverrideProps,
            ...submit
          }
        );
      case "datetime-local":
      case "checkbox":
        return /* @__PURE__ */ jsx(
          Checkbox,
          {
            className,
            helperMessage: /* @__PURE__ */ jsx(NodeMessages, { nodes: [node], gap: 4, textPosition: "start" }),
            label: getNodeLabel(node),
            name: attrs.name,
            required: attrs.required,
            defaultValue: attrs.value,
            disabled: attrs.disabled,
            defaultChecked: !!attrs.value,
            dataTestid: `node/input/${attrs.name}`
          }
        );
      default:
        return /* @__PURE__ */ jsx(
          InputField,
          {
            helperMessage: /* @__PURE__ */ jsx(NodeMessages, { nodes: [node], gap: 4, textPosition: "start" }),
            dataTestid: `node/input/${attrs.name}`,
            className,
            name: attrs.name,
            header: getNodeLabel(node),
            type: attrs.type,
            autoComplete: attrs.autocomplete || (attrs.name === "identifier" ? "username" : ""),
            defaultValue: attrs.value,
            required: attrs.required,
            disabled: attrs.disabled,
            fullWidth: !0
          }
        );
    }
  } else if (isUiNodeAnchorAttributes(node.attributes))
    return /* @__PURE__ */ jsx(
      ButtonLink,
      {
        href: node.attributes.href,
        title: node.attributes.title.text,
        "data-testid": `node/anchor/${node.attributes.id}`,
        className,
        position: "center",
        children: node.attributes.title.text
      }
    );
  return null;
}, FilterFlowNodes = ({
  filter: e,
  includeCSRF: r,
  ...a
}) => {
  const s = (i) => isUiNodeInputAttributes(i.attributes) ? i.attributes.name : "", n = filterNodesByGroups(e).filter(
    (i) => !(s(i) === "csrf_token" && !r)
  ).map(
    (i, l) => ["hidden"].includes(getNodeInputType(i.attributes)) ? {
      node: /* @__PURE__ */ jsx(Node, { node: i, ...a }, l),
      hidden: !0
    } : {
      node: /* @__PURE__ */ jsx(Node, { node: i, ...a }, l),
      hidden: !1
    }
  );
  return n.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
    n.filter((i) => i.hidden).map((i) => i.node),
    /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: n.filter((i) => !i.hidden).map((i) => i.node) })
  ] }) : null;
}, useScriptNodes = ({ nodes: e }) => {
  useEffect(() => {
    const r = filterNodesByGroups({
      nodes: e,
      groups: "webauthn",
      attributes: "text/javascript",
      withoutDefaultGroup: !0,
      withoutDefaultAttributes: !0
    }).map((a) => {
      const s = a.attributes, n = document.createElement("script");
      return n.setAttribute("data-testid", `node/script/${n.id}`), n.src = s.src, n.type = s.type, n.async = s.async, n.referrerPolicy = s.referrerpolicy, n.crossOrigin = s.crossorigin, n.integrity = s.integrity, document.body.appendChild(n), n;
    });
    return () => {
      r.forEach((a) => {
        document.body.removeChild(a);
      });
    };
  }, [e]);
}, UserAuthForm = ({
  flow: e,
  children: r,
  submitOnEnter: a,
  onSubmit: s,
  formFilterOverride: n,
  className: i,
  ...l
}) => /* @__PURE__ */ jsx(
  "form",
  {
    className: cn(i, formStyle),
    action: e.ui.action,
    method: e.ui.method,
    onKeyDown: (u) => {
      u.key === "Enter" && !a && (u.stopPropagation(), u.preventDefault());
    },
    ...s && {
      onSubmit: (u) => {
        u.preventDefault();
        const d = u.currentTarget, h = new FormData(d);
        let m = Object.fromEntries(h);
        if ("submitter" in u.nativeEvent) {
          const y = u.nativeEvent.submitter;
          m = {
            ...m,
            [y.name]: y.value
          };
        }
        s({ body: m, event: u });
      }
    },
    ...l,
    children: /* @__PURE__ */ jsxs(Fragment, { children: [
      /* @__PURE__ */ jsx(
        FilterFlowNodes,
        {
          filter: n || {
            nodes: e.ui.nodes,
            groups: "default",
            // we only want to map hidden default fields here
            attributes: "hidden"
          },
          includeCSRF: !0
        }
      ),
      r
    ] })
  }
), hasOidc = (e) => e.some(({ group: r }) => r === "oidc"), hasPassword = (e) => e.some(({ group: r }) => r === "password"), hasWebauthn = (e) => e.some(({ group: r }) => r === "webauthn"), hasLookupSecret = (e) => e.some(({ group: r }) => r === "lookup_secret"), hasTotp = (e) => e.some(({ group: r }) => r === "totp"), hasHiddenIdentifier = (e) => e.some(
  ({ attributes: r }) => "name" in r && r.name === "identifier" && r.type === "hidden"
), LinkSection = ({ nodes: e }) => /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["link", "code"],
        excludeAttributes: "submit"
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["link", "code"],
        attributes: "submit"
      }
    }
  )
] }), LoginSection = ({
  nodes: e,
  forgotPasswordURL: r
}) => hasPassword(e) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 16 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e,
          groups: ["default", "password"],
          excludeAttributes: ["submit", "hidden"]
        }
      }
    ),
    r && /* @__PURE__ */ jsx(
      ButtonLink,
      {
        "data-testid": "forgot-password-link",
        href: r,
        children: "Forgot Password?"
      }
    )
  ] }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["password"],
        attributes: "submit"
      }
    }
  )
] }) : null, LookupSecretSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "lookup_secret",
    withoutDefaultGroup: !0
  };
  return hasLookupSecret(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, OIDCSection = (e) => {
  const r = filterNodesByGroups({
    nodes: e.ui.nodes,
    groups: "oidc",
    withoutDefaultGroup: !0,
    excludeAttributes: "submit"
  }).length > 0;
  return hasOidc(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    r && /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e.ui.nodes,
          groups: "oidc",
          withoutDefaultGroup: !0,
          excludeAttributes: "submit"
        }
      }
    ) }),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e.ui.nodes,
          groups: "oidc",
          attributes: "submit"
        }
      }
    )
  ] }) : null;
}, OIDCSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "oidc",
    withoutDefaultGroup: !0
  };
  return hasOidc(e.ui.nodes) ? /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 32 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: r,
      buttonOverrideProps: { fullWidth: !1 }
    }
  ) }) : null;
}, PasswordSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "password",
    withoutDefaultGroup: !0
  };
  return hasPassword(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, PasswordlessSection = (e) => hasWebauthn(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e.ui.nodes,
        // we will also map default fields here but not oidc and password fields
        groups: ["webauthn"],
        withoutDefaultAttributes: !0,
        excludeAttributes: ["hidden", "button", "submit"]
        // the form will take care of hidden fields
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e.ui.nodes,
        groups: ["webauthn"],
        withoutDefaultAttributes: !0,
        attributes: ["button", "submit"]
      }
    }
  )
] }) : null, ProfileSettingsSection = ({
  flow: e
}) => {
  const r = { nodes: e.ui.nodes, groups: "profile" };
  return /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] });
}, RegistrationSection = ({
  nodes: e
}) => hasPassword(e) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["password"],
        excludeAttributes: "submit"
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["password"],
        attributes: "submit"
      }
    }
  )
] }) : null, TOTPSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "totp",
    withoutDefaultGroup: !0
  };
  return hasTotp(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, WebAuthnSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "webauthn",
    withoutDefaultGroup: !0
  };
  return hasWebauthn(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, identifier_css_ts_vanilla = "";
var identifierNameStyle = "kdu3q91", identifierStyle = "kdu3q90";
const LoggedInfo = ({ flow: e }) => {
  const r = e.ui.nodes.find(
    (a) => "name" in a.attributes && a.attributes.name === "identifier"
  )?.attributes;
  return !r || !("value" in r) ? null : /* @__PURE__ */ jsxs("div", { className: identifierStyle, children: [
    "You're logged in as:",
    /* @__PURE__ */ jsx("div", { className: identifierNameStyle, children: r.value })
  ] });
}, UserAuthCard = ({
  flow: e,
  title: r,
  subtitle: a,
  flowType: s,
  additionalProps: n,
  cardImage: i,
  onSubmit: l,
  includeScripts: u,
  className: d
}) => {
  u && useScriptNodes({ nodes: e.ui.nodes });
  let h = null, m = null, y = null, x = null;
  const w = (_) => _.refresh || _.requested_aal === "aal2", R = () => !!y && (!w(e) || s === "registration"), M = () => w(e) && s === "login" && (hasTotp(e.ui.nodes) || hasWebauthn(e.ui.nodes) || hasLookupSecret(e.ui.nodes)), V = hasHiddenIdentifier(e.ui.nodes), T = () => M() && [
    hasWebauthn(e.ui.nodes) && /* @__PURE__ */ jsx(UserAuthForm, { flow: e, "data-testid": "webauthn-flow", children: /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e.ui.nodes,
          groups: "webauthn",
          withoutDefaultGroup: !0
        }
      }
    ) }),
    hasPassword(e.ui.nodes) && /* @__PURE__ */ jsx(UserAuthForm, { flow: e, "data-testid": "password-flow", children: /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e.ui.nodes,
          groups: "password",
          withoutDefaultGroup: !0
        }
      }
    ) }),
    hasTotp(e.ui.nodes) && /* @__PURE__ */ jsx(
      UserAuthForm,
      {
        flow: e,
        "data-testid": "totp-flow",
        onSubmit: l,
        submitOnEnter: !0,
        children: /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
          /* @__PURE__ */ jsx(
            FilterFlowNodes,
            {
              filter: {
                nodes: e.ui.nodes,
                groups: "totp",
                withoutDefaultGroup: !0,
                excludeAttributes: "submit"
              }
            }
          ),
          /* @__PURE__ */ jsx(
            FilterFlowNodes,
            {
              filter: {
                nodes: e.ui.nodes,
                groups: "totp",
                withoutDefaultGroup: !0,
                attributes: "submit"
              }
            }
          )
        ] })
      }
    ),
    hasLookupSecret(e.ui.nodes) && /* @__PURE__ */ jsx(
      UserAuthForm,
      {
        flow: e,
        "data-testid": "lookup-secret-flow",
        onSubmit: l,
        submitOnEnter: !0,
        children: /* @__PURE__ */ jsx(
          FilterFlowNodes,
          {
            filter: {
              nodes: e.ui.nodes,
              groups: "lookup_secret",
              withoutDefaultGroup: !0
            }
          }
        )
      }
    )
  ].filter(Boolean).map((_, N) => /* @__PURE__ */ jsx("div", { children: N > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx(Divider, {}),
    " ",
    _
  ] }) : _ }, N));
  switch (s) {
    case "login":
      y = PasswordlessSection(e), m = OIDCSection(e), h = LoginSection({
        nodes: e.ui.nodes,
        ...n
      }), w(e) ? x = {
        text: /* @__PURE__ */ jsx(Fragment, { children: "Something's not working?" }),
        buttonText: "Logout",
        url: n.logoutURL,
        dataTestId: "logout-link"
      } : n.signupURL && (x = {
        buttonText: "Sign up",
        url: n.signupURL,
        text: /* @__PURE__ */ jsx(Fragment, { children: "Don't have an account?" }),
        dataTestId: "signup-link"
      });
      break;
    case "registration":
      y = PasswordlessSection(e), m = OIDCSection(e), h = RegistrationSection({
        nodes: e.ui.nodes
      }), x = {
        text: "Already have an account?",
        url: n.loginURL,
        buttonText: "Sign in",
        dataTestId: "cta-link"
      };
      break;
    case "recovery":
      h = LinkSection({
        nodes: e.ui.nodes
      }), x = {
        text: "Remember your credentials?",
        url: n.loginURL,
        buttonText: "Sign in",
        dataTestId: "cta-link"
      };
      break;
    case "verification":
      h = LinkSection({
        nodes: e.ui.nodes
      }), x = {
        text: "Don't have an account?",
        url: n.signupURL,
        buttonText: "Sign up",
        dataTestId: "cta-link"
      };
      break;
    default:
      h = null;
  }
  return /* @__PURE__ */ jsx(
    Card,
    {
      className: d,
      heading: /* @__PURE__ */ jsx("h2", { className: typographyStyle({ type: "regular", size: "small" }), children: r }),
      image: i,
      "data-testid": `${s}-auth-card`,
      children: /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
        a && /* @__PURE__ */ jsx(Message, { severity: "default", children: a }),
        /* @__PURE__ */ jsx(NodeMessages, { uiMessages: e.ui.messages }),
        m && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(Divider, {}),
          /* @__PURE__ */ jsx(UserAuthForm, { flow: e, "data-testid": `${s}-flow-oidc`, children: m })
        ] }),
        h && !M() && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(Divider, {}),
          /* @__PURE__ */ jsxs(
            UserAuthForm,
            {
              flow: e,
              submitOnEnter: !0,
              onSubmit: l,
              "data-testid": `${s}-flow`,
              children: [
                h,
                V && /* @__PURE__ */ jsx(LoggedInfo, { flow: e })
              ]
            }
          )
        ] }),
        M() && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(
            NodeMessages,
            {
              nodes: filterNodesByGroups({
                nodes: e.ui.nodes,
                groups: ["password", "webauthn", "totp", "lookup_secret"]
              })
            }
          ),
          T()
        ] }),
        R() && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(Divider, {}),
          /* @__PURE__ */ jsx(
            UserAuthForm,
            {
              flow: e,
              submitOnEnter: !0,
              onSubmit: l,
              "data-testid": "passwordless-flow",
              formFilterOverride: {
                nodes: e.ui.nodes,
                attributes: "hidden"
              },
              children: y
            }
          )
        ] }),
        x && MessageSection(x)
      ] })
    }
  );
}, UserErrorCard = ({
  title: e,
  error: r,
  backUrl: a,
  cardImage: s,
  contactSupportEmail: n,
  className: i
}) => {
  const l = r.error, d = l.code >= 500;
  return /* @__PURE__ */ jsx(
    Card,
    {
      className: i,
      heading: /* @__PURE__ */ jsx("h2", { className: typographyStyle({ type: "regular", size: "small" }), children: e }),
      image: s,
      size: "wide",
      children: /* @__PURE__ */ jsxs(
        "div",
        {
          className: gridStyle({ gap: 32, direction: "column" }),
          "data-testid": "ui/error/message",
          children: [
            !d && /* @__PURE__ */ jsxs(Message, { severity: "error", children: [
              "An error occurred with the following message: ",
              l.reason
            ] }),
            /* @__PURE__ */ jsx(CodeBox, { "data-testid": "code-box", toggleText: "Error details", children: JSON.stringify(r, null, 2) }),
            n && /* @__PURE__ */ jsxs(Message, { className: colorSprinkle({ color: "foregroundMuted" }), children: [
              "If the problem persists, please contact ",
              /* @__PURE__ */ jsx(ButtonLink, { href: `mailto:${n}`, children: n })
            ] }),
            /* @__PURE__ */ jsx(Message, { children: /* @__PURE__ */ jsx(ButtonLink, { href: a, children: "Go Back" }) })
          ]
        }
      )
    }
  );
}, UserSettingsCard = ({
  flow: e,
  flowType: r,
  title: a,
  includeScripts: s,
  onSubmit: n,
  className: i
}) => {
  s && useScriptNodes({ nodes: e.ui.nodes });
  let l = !1, u = null, d = "";
  switch (r) {
    case "profile":
      l = !0, d = a || "Profile Settings", u = /* @__PURE__ */ jsx(ProfileSettingsSection, { flow: e });
      break;
    case "password":
      hasPassword(e.ui.nodes) && (l = !0, d = a || "Change Password", u = /* @__PURE__ */ jsx(PasswordSettingsSection, { flow: e }));
      break;
    case "webauthn":
      hasWebauthn(e.ui.nodes) && (l = !0, d = a || "Manage Hardware Tokens", u = /* @__PURE__ */ jsx(WebAuthnSettingsSection, { flow: e }));
      break;
    case "lookupSecret":
      hasLookupSecret(e.ui.nodes) && (l = !0, d = a || "Manage 2FA Backup Recovery Codes", u = /* @__PURE__ */ jsx(LookupSecretSettingsSection, { flow: e }));
      break;
    case "oidc":
      hasOidc(e.ui.nodes) && (l = !0, d = a || "Social Sign In", u = /* @__PURE__ */ jsx(OIDCSettingsSection, { flow: e }));
      break;
    case "totp":
      hasTotp(e.ui.nodes) && (l = !0, d = a || "Manage 2FA TOTP Authenticator App", u = /* @__PURE__ */ jsx(TOTPSettingsSection, { flow: e }));
      break;
    default:
      u = null;
  }
  return l ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    d && /* @__PURE__ */ jsx(
      "h3",
      {
        className: cn(
          typographyStyle({ size: "headline26", type: "regular" }),
          colorSprinkle({ color: "foregroundDefault" })
        ),
        children: d
      }
    ),
    /* @__PURE__ */ jsx(
      UserAuthForm,
      {
        flow: e,
        onSubmit: n,
        className: i,
        "data-testid": `${r}-settings-card`,
        children: u
      }
    )
  ] }) : null;
}, UserConsentCard = ({
  csrfToken: e,
  consent: r,
  cardImage: a,
  client_name: s = "Unnamed Client",
  requested_scope: n = [],
  client: i,
  action: l,
  className: u
}) => /* @__PURE__ */ jsx(
  Card,
  {
    className: u,
    heading: /* @__PURE__ */ jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Typography, { type: "bold", children: s }) }),
    image: a,
    children: /* @__PURE__ */ jsxs("form", { action: l, method: "post", children: [
      /* @__PURE__ */ jsx("input", { type: "hidden", name: "_csrf", value: e }),
      /* @__PURE__ */ jsx(
        "input",
        {
          type: "hidden",
          name: "consent_challenge",
          value: r?.challenge
        }
      ),
      /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 16 }), children: [
        /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 4 }), style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx(Typography, { children: "The application requests access to the following permissions:" }) }),
        /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 4 }), children: n.map((d) => /* @__PURE__ */ jsx(
          Checkbox,
          {
            label: d,
            value: d,
            name: "grant_scope"
          },
          d
        )) }),
        /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 4 }), children: /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Only grant permissions if you trust this site or app. You do not need to accept all permissions." }) }),
        /* @__PURE__ */ jsxs("div", { className: gridStyle({ direction: "row" }), children: [
          i?.policy_uri && /* @__PURE__ */ jsx("a", { href: i.policy_uri, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Privacy Policy" }) }),
          i?.tos_uri && /* @__PURE__ */ jsx("a", { href: i.tos_uri, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Terms of Service" }) })
        ] }),
        /* @__PURE__ */ jsx(Divider, {}),
        /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 8 }), children: [
          /* @__PURE__ */ jsx(
            Checkbox,
            {
              label: "remember my decision",
              id: "remember",
              name: "remember"
            }
          ),
          /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Remember this decision for next time. The application will not be able to ask for additional permissions without your consent." })
        ] }),
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: gridStyle({ direction: "row" }),
            style: { justifyContent: "space-between", alignItems: "center" },
            children: [
              /* @__PURE__ */ jsx(
                Button,
                {
                  type: "submit",
                  id: "reject",
                  name: "consent_action",
                  value: "reject",
                  variant: "error",
                  header: "Deny"
                }
              ),
              /* @__PURE__ */ jsx(
                Button,
                {
                  type: "submit",
                  id: "accept",
                  name: "consent_action",
                  value: "accept",
                  variant: "semibold",
                  header: "Allow"
                }
              )
            ]
          }
        )
      ] })
    ] })
  }
), UserLogoutCard = ({
  csrfToken: e,
  challenge: r,
  action: a,
  className: s,
  cardImage: n
}) => /* @__PURE__ */ jsx(
  Card,
  {
    className: s,
    heading: /* @__PURE__ */ jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Typography, { children: "Do you wish to log out?" }) }),
    image: n,
    children: /* @__PURE__ */ jsxs("form", { action: a, method: "post", children: [
      /* @__PURE__ */ jsx("input", { type: "hidden", name: "_csrf", value: e }),
      /* @__PURE__ */ jsx("input", { type: "hidden", name: "challenge", value: r }),
      /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsxs(
        "div",
        {
          className: gridStyle({ direction: "row" }),
          style: { justifyContent: "space-between", alignItems: "center" },
          children: [
            /* @__PURE__ */ jsx(
              Button,
              {
                type: "submit",
                id: "reject",
                value: "No",
                name: "submit",
                variant: "error",
                header: "No"
              }
            ),
            /* @__PURE__ */ jsx(
              Button,
              {
                type: "submit",
                id: "accept",
                value: "Yes",
                name: "submit",
                variant: "semibold",
                header: "Yes"
              }
            )
          ]
        }
      ) })
    ] })
  }
);
function getVarName(e) {
  var r = e.match(/^var\((.*)\)$/);
  return r ? r[1] : e;
}
function get(e, r) {
  var a = e;
  for (var s of r) {
    if (!(s in a))
      throw new Error("Path ".concat(r.join(" -> "), " does not exist in object"));
    a = a[s];
  }
  return a;
}
function walkObject(e, r) {
  var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], s = e.constructor();
  for (var n in e) {
    var i = e[n], l = [...a, n];
    typeof i == "string" || typeof i == "number" || i == null ? s[n] = r(i, l) : typeof i == "object" && !Array.isArray(i) ? s[n] = walkObject(i, r, l) : console.warn('Skipping invalid key "'.concat(l.join("."), '". Should be a string, number, null or object. Received: "').concat(Array.isArray(i) ? "Array" : typeof i, '"'));
  }
  return s;
}
function assignInlineVars(e, r) {
  var a = {};
  if (typeof r == "object") {
    var s = e;
    walkObject(r, (l, u) => {
      var d = get(s, u);
      a[getVarName(d)] = String(l);
    });
  } else {
    var n = e;
    for (var i in n)
      a[getVarName(i)] = n[i];
  }
  return Object.defineProperty(a, "toString", {
    value: function() {
      return Object.keys(this).map((u) => "".concat(u, ":").concat(this[u])).join(";");
    },
    writable: !1
  }), a;
}
const themeProvider_css_ts_vanilla = "";
var themeProviderFontRenderingStyle = "m6lo4u1", themeProviderStyle = "m6lo4u0";
const ThemeProvider = ({
  children: e,
  theme: r,
  themeOverrides: a,
  enableFontSmoothing: s
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      themeProviderStyle,
      s && themeProviderFontRenderingStyle
    ),
    style: assignInlineVars(oryTheme, {
      ...r === "dark" ? defaultDarkTheme : defaultLightTheme,
      ...a
    }),
    children: e
  }
);
export {
  Button,
  ButtonLink,
  ButtonSocial,
  Card,
  CardGradient,
  Checkbox,
  CodeBox,
  Divider,
  FilterFlowNodes,
  InputField,
  LinkSection,
  LoginSection,
  LookupSecretSettingsSection,
  MenuLink,
  Message,
  MessageSection,
  Nav,
  Node,
  NodeMessages,
  OIDCSection,
  OIDCSettingsSection,
  PasswordSettingsSection,
  PasswordlessSection,
  ProfileSettingsSection,
  RegistrationSection,
  TOTPSettingsSection,
  ThemeProvider,
  Typography,
  UserAuthCard,
  UserAuthForm,
  UserConsentCard,
  UserErrorCard,
  UserLogoutCard,
  UserSettingsCard,
  WebAuthnSettingsSection,
  buttonLinkContainerStyle,
  buttonLinkIconStyle,
  buttonLinkStyle,
  buttonSocialIconEndStyle,
  buttonSocialIconStartStyle,
  buttonSocialStyle,
  buttonStyle,
  cardStyle,
  cardTitleImage,
  cardTitleStyle,
  checkboxInputStyle,
  checkboxStyle,
  codeboxContentStyle,
  codeboxHeaderStyle,
  codeboxStyle,
  colorProperties,
  colorSprinkle,
  defaultBreakpoints,
  defaultDarkTheme,
  defaultFont,
  defaultLightTheme,
  dividerStyle,
  dividerTextStyle,
  formStyle,
  gridStyle,
  hasHiddenIdentifier,
  hasLookupSecret,
  hasOidc,
  hasPassword,
  hasTotp,
  hasWebauthn,
  inputFieldStyle,
  inputFieldTitleStyle,
  inputTypographyStyle,
  menuLinkIconLeftStyle,
  menuLinkStyle,
  menuLinkTextStyle,
  messageStyle,
  navMainSectionStyle,
  navMenuLinkSelectedStyle,
  navMenuSectionStyle,
  navSectionBottom,
  navSectionTitleStyle,
  navStyle,
  oryTheme,
  pxToEm,
  pxToRem,
  typographyStyle,
  useScriptNodes
};
